Porting Goofconomy & co.
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
var/mach = 0
|
||||
|
||||
/datum/station_state/proc/count()
|
||||
floor = 0
|
||||
wall = 0
|
||||
r_wall = 0
|
||||
window = 0
|
||||
door = 0
|
||||
grille = 0
|
||||
mach = 0
|
||||
for(var/Z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
for(var/turf/T in block(locate(1,1,Z), locate(world.maxx,world.maxy,Z)))
|
||||
// don't count shuttles since they may have just left
|
||||
@@ -48,6 +55,10 @@
|
||||
else if(ismachinery(O))
|
||||
mach += 1
|
||||
|
||||
CHECK_TICK
|
||||
CHECK_TICK
|
||||
CHECK_TICK
|
||||
|
||||
/datum/station_state/proc/score(datum/station_state/result)
|
||||
if(!result)
|
||||
return 0
|
||||
|
||||
@@ -78,14 +78,28 @@
|
||||
var/mob/living/carbon/human/target = M // After we remove items, at least give them what they need to live.
|
||||
target.dna.species.give_important_for_life(target)
|
||||
handleVictimExperience(M) // After pod is sent we start the victim narrative/heal.
|
||||
var/points_to_check = SSshuttle.points // This is slightly delayed because of the sleep calls above to handle the narrative. We don't want to tell the station instantly.
|
||||
if(points_to_check >= ransom)
|
||||
SSshuttle.points -= ransom
|
||||
else
|
||||
SSshuttle.points -= points_to_check
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
var/points_to_check = min(D.account_balance, ransom)
|
||||
D.adjust_money(min(points_to_check, ransom))
|
||||
priority_announce("One of your crew was captured by a rival organisation - we've needed to pay their ransom to bring them back. \
|
||||
As is policy we've taken a portion of the station's funds to offset the overall cost.", null, "attention", null, "Nanotrasen Asset Protection")
|
||||
|
||||
sleep(30)
|
||||
|
||||
// Pay contractor their portion of ransom
|
||||
if (status == CONTRACT_STATUS_COMPLETE)
|
||||
var/mob/living/carbon/human/H
|
||||
var/obj/item/card/id/C
|
||||
if(ishuman(contract.owner.current))
|
||||
H = contract.owner.current
|
||||
C = H.get_idcard(TRUE)
|
||||
|
||||
if(C && C.registered_account)
|
||||
C.registered_account.adjust_money(points_to_check * 0.35)
|
||||
|
||||
C.registered_account.bank_card_talk("We've processed the ransom, agent. Here's your cut - your balance is now \
|
||||
[C.registered_account.account_balance] cr.", TRUE)
|
||||
|
||||
/datum/syndicate_contract/proc/handleVictimExperience(var/mob/living/M) // They're off to holding - handle the return timer and give some text about what's going on.
|
||||
addtimer(CALLBACK(src, .proc/returnVictim, M), 4 MINUTES) // Ship 'em back - dead or alive... 4 minutes wait.
|
||||
if(M.stat != DEAD) //Even if they weren't the target, we're still treating them the same.
|
||||
|
||||
Reference in New Issue
Block a user