Disallow medicine events before medicine has been discovered.

This commit is contained in:
Michael
2013-10-29 18:06:40 -04:00
parent a96e9c55c2
commit b230d0586a
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -66,7 +66,10 @@ Events.Outside = [
{ /* Sickness */ { /* Sickness */
title: 'Sickness', title: 'Sickness',
isAvailable: function() { isAvailable: function() {
return Engine.activeModule == Outside && $SM.get('game.population', true) > 10 && $SM.get('game.population', true) < 50; return Engine.activeModule == Outside &&
$SM.get('game.population', true) > 10 &&
$SM.get('game.population', true) < 50 &&
$SM.get('stores.medicine', true) > 0;
}, },
scenes: { scenes: {
'start': { 'start': {
@@ -120,7 +123,7 @@ Events.Outside = [
{ /* Plague */ { /* Plague */
title: 'Plague', title: 'Plague',
isAvailable: function() { isAvailable: function() {
return Engine.activeModule == Outside && $SM.get('game.population', true) > 50; return Engine.activeModule == Outside && $SM.get('game.population', true) > 50 && $SM.get('stores.medicine', true) > 0;
}, },
scenes: { scenes: {
'start': { 'start': {
+1 -1
View File
@@ -507,7 +507,7 @@ Events.Room = [
{ /* The Sick Man */ { /* The Sick Man */
title: 'The Sick Man', title: 'The Sick Man',
isAvailable: function() { isAvailable: function() {
return Engine.activeModule == Room && $SM.get('features.location.world'); return Engine.activeModule == Room && $SM.get('stores.medicine', true) > 0;
}, },
scenes: { scenes: {
'start': { 'start': {