mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Disallow medicine events before medicine has been discovered.
This commit is contained in:
@@ -66,7 +66,10 @@ Events.Outside = [
|
||||
{ /* Sickness */
|
||||
title: 'Sickness',
|
||||
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: {
|
||||
'start': {
|
||||
@@ -120,7 +123,7 @@ Events.Outside = [
|
||||
{ /* Plague */
|
||||
title: 'Plague',
|
||||
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: {
|
||||
'start': {
|
||||
|
||||
@@ -507,7 +507,7 @@ Events.Room = [
|
||||
{ /* The Sick Man */
|
||||
title: 'The Sick Man',
|
||||
isAvailable: function() {
|
||||
return Engine.activeModule == Room && $SM.get('features.location.world');
|
||||
return Engine.activeModule == Room && $SM.get('stores.medicine', true) > 0;
|
||||
},
|
||||
scenes: {
|
||||
'start': {
|
||||
|
||||
Reference in New Issue
Block a user