[READY]Refactors uplinks to a component!
This commit is contained in:
committed by
CitadelStationBot
parent
2e9f3bc1c0
commit
cec6c028f5
@@ -264,10 +264,11 @@
|
||||
var/TC_uses = 0
|
||||
for(var/datum/mind/syndicate in syndicates)
|
||||
text += printplayer(syndicate)
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == syndicate.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
purchases += H.purchase_log
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H.purchase_log)
|
||||
purchases += H.purchase_log.generate_render()
|
||||
else
|
||||
stack_trace("WARNING: Uplink with no purchase_log in nuclear mode! Owner: [H.owner]")
|
||||
text += "<br>"
|
||||
text += "(Syndicates used [TC_uses] TC) [purchases]"
|
||||
if(TC_uses == 0 && station_was_nuked && !are_operatives_dead())
|
||||
@@ -325,9 +326,7 @@
|
||||
R.freqlock = 1
|
||||
|
||||
if(tc)
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H)
|
||||
U.hidden_uplink.owner = "[H.key]"
|
||||
U.hidden_uplink.telecrystals = tc
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, slot_in_backpack)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
board.challenge = TRUE
|
||||
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(get_turf(user))
|
||||
U.hidden_uplink.owner = "[user.key]"
|
||||
U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS
|
||||
U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
new /obj/item/device/radio/uplink/nuclear(get_turf(user), user.key, CHALLENGE_TELECRYSTALS)
|
||||
CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY))
|
||||
SSblackbox.set_val("nuclear_challenge_mode",1)
|
||||
qdel(src)
|
||||
@@ -65,22 +62,22 @@
|
||||
/obj/item/device/nuclear_challenge/proc/check_allowed(mob/living/user)
|
||||
if(declaring_war)
|
||||
to_chat(user, "You are already in the process of declaring war! Make your mind up.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(GLOB.player_list.len < CHALLENGE_MIN_PLAYERS)
|
||||
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
to_chat(user, "You have to be at your base to use this.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(world.time-SSticker.round_start_time > CHALLENGE_TIME_LIMIT)
|
||||
to_chat(user, "It's too late to declare hostilities. Your benefactors are already busy with other schemes. You'll have to make do with what you have on hand.")
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/V in GLOB.syndicate_shuttle_boards)
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
if(board.moved)
|
||||
to_chat(user, "The shuttle has already been moved! You have forfeit the right to declare war.")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
#undef CHALLENGE_TELECRYSTALS
|
||||
#undef CHALLENGE_MIN_PLAYERS
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/device/onetankbomb, /obj/item/radio, /obj/item/device/pda/ai,
|
||||
/obj/item/device/uplink, /obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
|
||||
@@ -103,11 +103,11 @@
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = FALSE
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == traitor.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
uplink_true = TRUE
|
||||
purchases += H.purchase_log
|
||||
purchases += H.purchase_log.generate_render(FALSE)
|
||||
|
||||
var/objectives = ""
|
||||
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
|
||||
|
||||
Reference in New Issue
Block a user