Skip to content

Commit

Permalink
Fixed incorrect Yar PDA submission condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Decane committed Mar 29, 2021
1 parent 656a75e commit 47b9521
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
1 change: 1 addition & 0 deletions SRP v1.1.3 - Version History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ v1.1.3
+ Fixed the parting audio of an NPC playing prematurely upon entering the trade or upgrade screen with them. - Decane
+ Fixed the greeting audio of some NPCs (most notably Professor Beanpolev) occasionally playing over their first spoken dialogue when the player opens a dialogue window with them. - Decane
+ Worked around the death of a squad poltergeist failing to be processed correctly if the death callback from its object binder triggers before that of its server entity equivalent, se_monster:on_death(). As a side-effect, poltergeists now leave behind a corpse when killed. - Decane
+ Fixed the issue where Yar's friend's PDA could be returned even if absent from the player's inventory e.g. due to having been moved into a container. - Decane
+ Fixed Sakharov and Lingov not being marked as important characters on the map. - Decane
+ Fixed the issue where a squad commander icon could overlap with a trader icon on the map. - Decane
+ Fixed an SRP v1.0.4 regression that caused the digger captives at the Garbage concentration camp to appear to hold an invisible artifact detector during their artifact search animations. - Decane
Expand Down
4 changes: 2 additions & 2 deletions gamedata/configs/gameplay/dialogs_darkvalley.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1044,13 +1044,13 @@
</phrase>
<phrase id="211">
<text>val_freedom_fixer_hello_dialog_211</text>
<has_info>val_night_bloodsucker_complete</has_info>
<precondition>dialogs_darkvalley.has_pda_bloodsucker</precondition>
<action>dialogs_darkvalley.return_pda_bloodsucker</action>
<next>2111</next>
</phrase>
<phrase id="212">
<text>val_freedom_fixer_hello_dialog_212</text>
<dont_has_info>val_night_bloodsucker_complete</dont_has_info>
<precondition>dialogs_darkvalley.hasnt_pda_bloodsucker</precondition>
<next>2121</next>
</phrase>
<phrase id="311">
Expand Down
62 changes: 62 additions & 0 deletions gamedata/scripts/dialogs_darkvalley.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
function transfer_ammo()
local give_actor = dialogs.relocate_item_section_to_actor
give_actor(nil, nil, "ammo_5.56x45_ap", 4)
give_actor(nil, nil, "grenade_rgd5", 3)
end

function is_day()
local hour = level.get_time_hours()
return hour > 3 and hour < 23
end

function is_not_day()
return not is_day()
end

function return_freedom_pda(first_speaker, second_speaker)
if db.actor:object("device_pda_freedom") ~= nil then
dialogs.relocate_item_section_from_actor(first_speaker, second_speaker, "device_pda_freedom")
end
end

function return_komendant_pda(first_speaker, second_speaker)
if db.actor:object("device_pda_comendant") ~= nil then
dialogs.relocate_item_section_from_actor(first_speaker, second_speaker, "device_pda_comendant")
end
end

function return_pda_bloodsucker(first_speaker, second_speaker)
dialogs.relocate_item_section_from_actor(first_speaker, second_speaker, "device_pda_bloodsucker")
end

function give_reward_for_destroy_killer_base()
dialogs.relocate_item_section_to_actor(nil, nil, "flesh_up_abcd_svu")
end

function freedom_join_reward()
if not has_alife_info("val_joined_freedom") then
local give_actor = dialogs.relocate_item_section_to_actor
give_actor(nil, nil, "svoboda_heavy_outfit")
give_actor(nil, nil, "wpn_sig550_up2")
give_actor(nil, nil, "wpn_addon_scope_susat")
give_actor(nil, nil, "ammo_5.56x45_ap", 3)
give_actor(nil, nil, "medkit_scientic", 3)
db.actor:give_info_portion("val_joined_freedom")
end
end

function barman_give_reward_for_bandits()
dialogs.relocate_money(nil, 1000, "in")
end

function is_bloobsucker_task_complete()
return has_alife_info("val_night_bloodsucker_complete") or has_alife_info("val_night_bloodsucker_fail")
end

function has_pda_bloodsucker()
return db.actor:object("device_pda_bloodsucker") ~= nil
end

function hasnt_pda_bloodsucker()
return not has_pda_bloodsucker()
end

0 comments on commit 47b9521

Please sign in to comment.