Skip to content

Commit

Permalink
Fix gcbrain crash when PLANT_HAS_PART (#108)
Browse files Browse the repository at this point in the history
* fix gcbrain crash when PLANT_HAS_PART

* remove giq_options

* remove unnecessary condition

* Node003 fixes

* default dialog exit options should not be gated with conditions

---------

Co-authored-by: Magus <magus@bgforge.net>
  • Loading branch information
dzmitry-rudnouski and burner1024 authored Feb 22, 2024
1 parent 8833831 commit 6db3823
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions scripts_src/gecko/gcbrain.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -499,13 +499,12 @@ procedure Node003 begin
Reply(603);
else
Reply(600);
//NOption(607,Node041,004);
NOption(607,Node041,004);
end
else if (global_var(GVAR_VAULT_GECKO_PLANT) == 0) then begin
else begin
Reply(600);
NOption(604,Node030,004);
end

NOption(610,Node999,004);
end

Expand Down Expand Up @@ -603,21 +602,14 @@ procedure Node013 begin
Reply(630); //The actions I propose...
NOption(635,Node030,004);
end

//COMMENT OUT BY KILLAP -- lets see what this does
/*else if (global_var(GVAR_VAULT_GECKO_PLANT) < PLANT_REPAIRED) then begin
else begin
Reply(611);
if (global_var(GVAR_GECKO_ANKH) != ANKH_GIVEN) then
NOption(232,Node016,004);
if (global_var(GVAR_VAULT_GECKO_PLANT) < PLANT_NEED_PART) then//RECENT CHANGE TO FIX BRAIN
NOption(234,Node026,004);
NOption(233,Node999,004);
end
if (global_var(GVAR_GECKO_ANKH) != ANKH_GIVEN) then
NOption(232,Node016,004);
if (global_var(GVAR_VAULT_GECKO_PLANT) < PLANT_NEED_PART) then//RECENT CHANGE TO FIX BRAIN
NOption(234,Node026,004);
NOption(233,Node999,004);*/

giq_option(4, SCRIPT_GCBRAIN, 232, Node016, NEUTRAL_REACTION);
giq_option(4, SCRIPT_GCBRAIN, 233, Node999, NEUTRAL_REACTION);
if (global_var(GVAR_VAULT_GECKO_PLANT) < 5) then
giq_option(4, SCRIPT_GCBRAIN, 234, Node026, NEUTRAL_REACTION);
end

procedure Node014 begin
Expand Down Expand Up @@ -653,20 +645,16 @@ procedure Node017 begin
else if (global_var(GVAR_VAULT_GECKO_PLANT) == PLANT_REPAIRED) then begin
Reply(230);
NOption(659,Node015,004);
//NOption(641,Node015,004);
end
else if (global_var(GVAR_VAULT_GECKO_PLANT) == PLANT_NEED_PART) then begin
Reply(653);
NOption(658,Node041,004);
end
else if (global_var(GVAR_VAULT_GECKO_PLANT) < PLANT_NEED_PART) then begin //edit by killap was == 0
else if (global_var(GVAR_VAULT_GECKO_PLANT) < PLANT_NEED_PART) then begin
Reply(270);
NOption(654,Node030,004);
end
// Reply(270);
// NOption(271,Node015,004); comment out by killap - should not ask this yet.
if (local_var(LVAR_brain_friend) == 0) then //added by killap
NOption(272,Node999,004);
NOption(272,Node999,004);
end

procedure Node018 begin
Expand Down Expand Up @@ -712,7 +700,6 @@ procedure Node020 begin
//end major edit by killap
end


procedure Node021 begin
Reply(310);
NOption(311,Node020,004);
Expand All @@ -735,7 +722,6 @@ procedure Node023 begin
else
NOption(187,Node017,004);
//end added
//end added
else
NOption(331,Node032,004);
BOption(332,Node025,004);
Expand Down

0 comments on commit 6db3823

Please sign in to comment.