Skip to content

Commit

Permalink
4th Attempt at 60% shuttle recall gang murderbone thing (tgstation#27414
Browse files Browse the repository at this point in the history
)

Still very important, still a victim of Github memes.

Tried to push to Militairies version but it had like a million commits so fuck that. This accounts for Jordie0608's requested changes. The latest changes moves the "no recall" aspect to the emergency shuttle subsystem so now any future code can simply set SSshuttle.emergencyNoRecall to TRUE if they want to prevent recalls from taking place.

See tgstation#27228 for references to the last 3 PR's.

tweak: Gang mode now calls a 4 minute unrecallable shuttle once 60% of the crew is dead
  • Loading branch information
Robustin authored and optimumtact committed May 25, 2017
1 parent 4cb21f3 commit 4db0385
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SUBSYSTEM_DEF(shuttle)
var/area/emergencyLastCallLoc
var/emergencyCallAmount = 0 //how many times the escape shuttle was called
var/emergencyNoEscape
var/emergencyNoRecall = FALSE
var/list/hostileEnvironments = list()

//supply shuttle stuff
Expand Down
10 changes: 10 additions & 0 deletions code/game/gamemodes/gang/gang.dm
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/
gang_bosses += G.bosses
return gang_bosses

/datum/game_mode/proc/shuttle_check()
var/alive = 0
for(var/mob/living/L in GLOB.player_list)
if(L.stat != DEAD)
alive++
if((alive < (GLOB.joined_player_list.len * 0.4)) && (SSshuttle.emergency.timeLeft(1) < (SSshuttle.emergencyCallTime * 0.4)))
SSshuttle.emergencyNoRecall = TRUE
SSshuttle.emergency.request(null, set_coefficient = 0.4)
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")

/proc/determine_domination_time(var/datum/gang/G)
return max(180,480 - (round((G.territory.len/GLOB.start_state.num_territories)*100, 1) * 9))

Expand Down
4 changes: 3 additions & 1 deletion code/game/gamemodes/gang/gang_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@
return
var/added_names = ""
var/lost_names = ""


SSticker.mode.shuttle_check() // See if its time to start wrapping things up

//Re-add territories that were reclaimed, so if they got tagged over, they can still earn income if they tag it back before the next status report
var/list/reclaimed_territories = territory_new & territory_lost
territory |= reclaimed_territories
Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/gang/recaller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@
if(!can_use(user))
return 0

if(SSshuttle.emergencyNoRecall)
return 0

if(recalling)
to_chat(usr, "<span class='warning'>Error: Recall already in progress.</span>")
return 0
Expand Down
4 changes: 3 additions & 1 deletion code/modules/shuttle/emergency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
if(mode != SHUTTLE_CALL)
return

if(SSshuttle.emergencyNoRecall)
return

invertTimer()
mode = SHUTTLE_RECALL

Expand Down

0 comments on commit 4db0385

Please sign in to comment.