This commit is contained in:
SandPoot
2024-08-24 21:28:55 -03:00
parent 9604090014
commit c07e94be66
218 changed files with 1001 additions and 979 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
// TODO: Implement more logic here. For now it's only a placeholder.
/obj/machinery/ntnet_relay/is_operational()
if(stat & (BROKEN | NOPOWER | EMPED))
if(machine_stat & (BROKEN | NOPOWER | EMPED))
return FALSE
if(dos_failure)
return FALSE
+1 -1
View File
@@ -95,7 +95,7 @@
/obj/effect/station_crash/New()
for(var/S in SSshuttle.stationary)
var/obj/docking_port/stationary/SM = S
if(SM.id == "emergency_home")
if(SM.shuttle_id == "emergency_home")
var/new_dir = turn(SM.dir, 180)
SM.forceMove(get_ranged_target_turf(SM, new_dir, rand(3,15)))
break
+5 -5
View File
@@ -17,14 +17,14 @@
continue // please don't do this
var/obj/docking_port/stationary/S = port
if (canDock(S) == SHUTTLE_CAN_DOCK)
options[S.name || S.id] = S
options[S.name || S.shuttle_id] = S
options += "--------"
options += "Infinite Transit"
options += "Delete Shuttle"
options += "Into The Sunset (delete & greentext 'escape')"
var/selection = input(user, "Select where to fly [name || id]:", "Fly Shuttle") as null|anything in options
var/selection = input(user, "Select where to fly [name || shuttle_id]:", "Fly Shuttle") as null|anything in options
if(!selection)
return
@@ -35,12 +35,12 @@
setTimer(ignitionTime)
if("Delete Shuttle")
if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
if(alert(user, "Really delete [name || shuttle_id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
return
jumpToNullSpace()
if("Into The Sunset (delete & greentext 'escape')")
if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
if(alert(user, "Really delete [name || shuttle_id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
return
intoTheSunset()
@@ -65,7 +65,7 @@
continue // please don't do this
var/obj/docking_port/stationary/S = port
if (canDock(S) == SHUTTLE_CAN_DOCK)
options[S.name || S.id] = S
options[S.name || S.shuttle_id] = S
var/selection = input(user, "Select the new arrivals destination:", "Fly Shuttle") as null|anything in options
if(!selection)
@@ -2,12 +2,12 @@
name = "Human Observation Console"
var/team_number = 0
networks = list("ss13", "abductor")
var/datum/action/innate/teleport_in/tele_in_action = new
var/datum/action/innate/teleport_out/tele_out_action = new
var/datum/action/innate/teleport_self/tele_self_action = new
var/datum/action/innate/vest_mode_swap/vest_mode_action = new
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new
var/datum/action/innate/set_droppoint/set_droppoint_action = new
var/datum/action/innate/teleport_in/tele_in_action = /datum/action/innate/teleport_in
var/datum/action/innate/teleport_out/tele_out_action = /datum/action/innate/teleport_out
var/datum/action/innate/teleport_self/tele_self_action = /datum/action/innate/teleport_self
var/datum/action/innate/vest_mode_swap/vest_mode_action = /datum/action/innate/vest_mode_swap
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = /datum/action/innate/vest_disguise_swap
var/datum/action/innate/set_droppoint/set_droppoint_action = /datum/action/innate/set_droppoint
var/obj/machinery/abductor/console/console
lock_override = TRUE
@@ -22,38 +22,21 @@
eyeobj.icon = 'icons/mob/cameramob.dmi'
eyeobj.icon_state = "generic_camera"
/obj/machinery/computer/camera_advanced/abductor/GrantActions(mob/living/carbon/user)
..()
/obj/machinery/computer/camera_advanced/abductor/Initialize(mapload)
. = ..()
if(tele_in_action)
tele_in_action.target = console.pad
tele_in_action.Grant(user)
actions += tele_in_action
actions += new tele_in_action(src)
if(tele_out_action)
tele_out_action.target = console
tele_out_action.Grant(user)
actions += tele_out_action
actions += new tele_out_action(src)
if(tele_self_action)
tele_self_action.target = console.pad
tele_self_action.Grant(user)
actions += tele_self_action
actions += new tele_self_action(src)
if(vest_mode_action)
vest_mode_action.target = console
vest_mode_action.Grant(user)
actions += vest_mode_action
actions += new vest_mode_action(src)
if(vest_disguise_action)
vest_disguise_action.target = console
vest_disguise_action.Grant(user)
actions += vest_disguise_action
actions += new vest_disguise_action(src)
if(set_droppoint_action)
set_droppoint_action.target = console
set_droppoint_action.Grant(user)
actions += set_droppoint_action
actions += new set_droppoint_action(src)
/obj/machinery/computer/camera_advanced/abductor/proc/IsScientist(mob/living/carbon/human/H)
return HAS_TRAIT(H, TRAIT_ABDUCTOR_SCIENTIST_TRAINING)
@@ -64,10 +47,9 @@
button_icon_state = "beam_down"
/datum/action/innate/teleport_in/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/pad/P = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
@@ -79,7 +61,7 @@
button_icon_state = "beam_up"
/datum/action/innate/teleport_out/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
@@ -91,14 +73,13 @@
button_icon_state = "beam_down"
/datum/action/innate/teleport_self/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/pad/P = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
P.MobToLoc(remote_eye.loc,C)
P.MobToLoc(remote_eye.loc, owner)
/datum/action/innate/vest_mode_swap
name = "Switch Vest Mode"
@@ -106,7 +87,7 @@
button_icon_state = "vest_mode"
/datum/action/innate/vest_mode_swap/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
console.FlipVest()
@@ -118,7 +99,7 @@
button_icon_state = "vest_disguise"
/datum/action/innate/vest_disguise_swap/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
console.SelectDisguise(remote=1)
@@ -129,11 +110,10 @@
button_icon_state = "set_drop"
/datum/action/innate/set_droppoint/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/console/console = target
console.SetDroppoint(remote_eye.loc,owner)
@@ -44,7 +44,7 @@
lock_override = CAMERA_LOCK_STATION
shuttlePortId = "huntership_custom"
see_hidden = FALSE
jumpto_ports = list("huntership_home" = 1, "whiteship_home" = 1, "syndicate_nw" = 1)
jump_to_ports = list("huntership_home" = 1, "whiteship_home" = 1, "syndicate_nw" = 1)
view_range = 4.5
/obj/structure/closet/crate/eva
@@ -487,7 +487,7 @@
/obj/machinery/airalarm/proc/shock(mob/user, prb)
if((stat & (NOPOWER))) // unpowered, no shock
if((machine_stat & (NOPOWER))) // unpowered, no shock
return FALSE
if(!prob(prb))
return FALSE //you lucked out, no shock for you
@@ -682,11 +682,11 @@
))
/obj/machinery/airalarm/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "alarm0"
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "alarmx"
return
@@ -729,7 +729,7 @@
update_light()
/obj/machinery/airalarm/process()
if((stat & (NOPOWER|BROKEN)) || shorted)
if((machine_stat & (NOPOWER|BROKEN)) || shorted)
return
var/turf/location = get_turf(src)
@@ -790,7 +790,7 @@
var/area/A = get_base_area(src)
var/new_area_danger_level = 0
for(var/obj/machinery/airalarm/AA in A)
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
if (!(AA.machine_stat & (NOPOWER|BROKEN)) && !AA.shorted)
new_area_danger_level = clamp(max(new_area_danger_level, AA.danger_level), 0, 1)
var/did_anything_happen
@@ -908,7 +908,7 @@
return TRUE
/obj/machinery/airalarm/proc/togglelock(mob/living/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>It does nothing!</span>")
else
if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
@@ -921,7 +921,7 @@
/obj/machinery/airalarm/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
set_light(0)
update_icon()
@@ -66,9 +66,9 @@
icon_state = "filter_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/filter/power_change()
var/old_stat = stat
var/old_stat = machine_stat
..()
if(stat != old_stat)
if(machine_stat != old_stat)
update_icon()
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
@@ -51,9 +51,9 @@
icon_state = "inje_on"
/obj/machinery/atmospherics/components/unary/outlet_injector/power_change()
var/old_stat = stat
var/old_stat = machine_stat
..()
if(old_stat != stat)
if(old_stat != machine_stat)
update_icon()
@@ -59,7 +59,7 @@
icon_state = "meterX"
return FALSE
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
icon_state = "meter0"
return FALSE
@@ -129,7 +129,7 @@
qdel(src)
/obj/machinery/meter/interact(mob/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
else
to_chat(user, status())
@@ -226,7 +226,7 @@
air_contents.set_moles(GAS_N2, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
/obj/machinery/portable_atmospherics/canister/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[icon_state]-1"
/obj/machinery/portable_atmospherics/canister/update_overlays()
@@ -252,7 +252,7 @@
/obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
canister_break()
if(disassembled)
new /obj/item/stack/sheet/metal (loc, 10)
@@ -280,9 +280,9 @@
return TRUE
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
if((machine_stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
return
stat |= BROKEN
machine_stat |= BROKEN
canister_break()
/obj/machinery/portable_atmospherics/canister/proc/canister_break()
@@ -313,7 +313,7 @@
/obj/machinery/portable_atmospherics/canister/process_atmos()
..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return PROCESS_KILL
if(timing && valve_timer < world.time)
valve_open = !valve_open
@@ -107,7 +107,7 @@
/obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/tank))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
var/obj/item/tank/T = W
if(!user.transferItemToLoc(T, src))
return
@@ -115,7 +115,7 @@
replace_tank(user, FALSE, T)
update_icon()
else if(W.tool_behaviour == TOOL_WRENCH)
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
if(connected_port)
disconnect()
W.play_tool_sound(src)
@@ -147,7 +147,7 @@
return TRUE
/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user, attackchain_flags = NONE, damage_multiplier = 1)
if(I.force < 10 && !(stat & BROKEN))
if(I.force < 10 && !(machine_stat & BROKEN))
take_damage(0)
else
investigate_log("was smacked with \a [I] by [key_name(user)].", INVESTIGATE_ATMOS)
@@ -19,7 +19,7 @@
. = ..()
pump = new(src, FALSE)
pump.on = TRUE
pump.stat = 0
pump.machine_stat = 0
SSair.add_to_rebuild_queue(pump)
/obj/machinery/portable_atmospherics/pump/Destroy()
+1 -1
View File
@@ -204,7 +204,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
portal_visuals.reset_visuals()
/obj/machinery/gateway/process()
if((stat & (NOPOWER)) && use_power)
if((machine_stat & (NOPOWER)) && use_power)
if(target)
deactivate()
return
@@ -54,7 +54,7 @@
queue += purchase
/obj/machinery/ltsrbt/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(recharge_cooldown)
recharge_cooldown--
+2 -2
View File
@@ -156,13 +156,13 @@
return
if(SSshuttle.supply.getDockedId() == "supply_home")
SSshuttle.supply.export_categories = get_export_categories()
SSshuttle.moveShuttle(SSshuttle.supply.id, "supply_away", TRUE)
SSshuttle.moveShuttle(SSshuttle.supply.shuttle_id, "supply_away", TRUE)
say("The supply shuttle is departing.")
investigate_log("[key_name(usr)] sent the supply shuttle away.", INVESTIGATE_CARGO)
else
investigate_log("[key_name(usr)] called the supply shuttle.", INVESTIGATE_CARGO)
say("The supply shuttle has been called and will arrive in [SSshuttle.supply.timeLeft(600)] minutes.")
SSshuttle.moveShuttle(SSshuttle.supply.id, "supply_home", TRUE)
SSshuttle.moveShuttle(SSshuttle.supply.shuttle_id, "supply_home", TRUE)
. = TRUE
if("loan")
if(!SSshuttle.shuttle_loan)
+2 -2
View File
@@ -160,7 +160,7 @@
//interrupt_research
/obj/machinery/shuttle_scrambler/proc/interrupt_research()
for(var/obj/machinery/rnd/server/S in GLOB.machines)
if(S.stat & (NOPOWER|BROKEN))
if(S.machine_stat & (NOPOWER|BROKEN))
continue
S.emp_act(80)
new /obj/effect/temp_visual/emp(get_turf(S))
@@ -210,7 +210,7 @@
/obj/docking_port/mobile/pirate
name = "pirate shuttle"
id = "pirateship"
shuttle_id = "pirateship"
rechargeTime = 3 MINUTES
/obj/machinery/suit_storage_unit/pirate
@@ -45,7 +45,7 @@
. = ..()
if (dirty)
. += "grbloody"
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if (!occupant)
. += "grjam"
@@ -64,7 +64,7 @@
go_out()
/obj/machinery/gibber/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(operating)
to_chat(user, "<span class='danger'>It's locked and running.</span>")
@@ -88,7 +88,7 @@
else
. += "<span class='notice'>\The [src] is empty.</span>"
if(!(stat & (NOPOWER|BROKEN)))
if(!(machine_stat & (NOPOWER|BROKEN)))
. += "<span class='notice'>The status display reads:</span>"
. += "<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.<span>"
. += "<span class='notice'>- Cook time reduced by <b>[(productivity - 1) * 25]%</b>.<span>"
@@ -207,7 +207,7 @@
if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
if(isAI(user) && (stat & NOPOWER))
if(isAI(user) && (machine_stat & NOPOWER))
return
if(!length(ingredients))
@@ -222,7 +222,7 @@
// post choice verification
if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
if(isAI(user) && (stat & NOPOWER))
if(isAI(user) && (machine_stat & NOPOWER))
return
usr.set_machine(src)
@@ -241,7 +241,7 @@
ingredients.Cut()
/obj/machinery/microwave/proc/cook(mob/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(operating || broken > 0 || panel_open || !anchored || dirty == 100)
return
@@ -297,7 +297,7 @@
loop(MICROWAVE_MUCK, 4)
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * productivity, 2), mob/user) // standard wait is 10
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
if(type == MICROWAVE_PRE)
pre_fail()
return
@@ -42,7 +42,7 @@
if(default_deconstruction_crowbar(O))
return
if(stat) //NOPOWER etc
if(machine_stat) //NOPOWER etc
return
else
return ..()
@@ -42,7 +42,7 @@
/obj/machinery/smartfridge/update_icon_state()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(!stat)
if(!machine_stat)
SSvis_overlays.add_vis_overlay(src, icon, "smartfridge-light-mask", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
if (visible_contents)
switch(contents.len)
@@ -61,7 +61,7 @@
/obj/machinery/smartfridge/update_overlays()
. = ..()
if(!stat)
if(!machine_stat)
. += emissive_appearance(icon, "smartfridge-light-mask", alpha = src.alpha)
@@ -88,7 +88,7 @@
updateUsrDialog()
return
if(!stat)
if(!machine_stat)
if(contents.len >= max_n_of_items)
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
+2 -2
View File
@@ -84,7 +84,7 @@
/obj/machinery/computer/holodeck/power_change()
. = ..()
toggle_power(!stat)
toggle_power(!machine_stat)
/obj/machinery/computer/holodeck/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -308,7 +308,7 @@
/obj/machinery/computer/holodeck/proc/derez(obj/O, silent = TRUE, forced = FALSE)
// Emagging a machine creates an anomaly in the derez systems.
if(O && (obj_flags & EMAGGED) && !stat && !forced)
if(O && (obj_flags & EMAGGED) && !machine_stat && !forced)
if((ismob(O) || ismob(O.loc)) && prob(50))
addtimer(CALLBACK(src, PROC_REF(derez), O, silent), 50) // may last a disturbingly long time
return
+1 -1
View File
@@ -165,7 +165,7 @@
. = ..()
if(.)
return
if(user.stat || stat & (NOPOWER|BROKEN))
if(user.stat || machine_stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>This device is not powered!</span>")
return
+2 -2
View File
@@ -163,7 +163,7 @@
/obj/machinery/biogenerator/proc/activate(mob/user)
if(user.stat != CONSCIOUS)
return
if(stat != NONE)
if(machine_stat != NONE)
return
if(processing)
to_chat(user, "<span class='warning'>The biogenerator is in the process of working.</span>")
@@ -249,7 +249,7 @@
update_icon()
/obj/machinery/biogenerator/ui_status(mob/user)
if(stat & BROKEN || panel_open)
if(machine_stat & BROKEN || panel_open)
return UI_CLOSE
return ..()
+1 -1
View File
@@ -54,7 +54,7 @@
min_wrate = 0
/obj/machinery/plantgenes/update_icon_state()
if((stat & (BROKEN|NOPOWER)))
if((machine_stat & (BROKEN|NOPOWER)))
icon_state = "dnamod-off"
else
icon_state = "dnamod"
+2 -2
View File
@@ -579,7 +579,7 @@
return ..()
/obj/machinery/bookbinder/proc/bind_book(mob/user, obj/item/paper/P)
if(stat)
if(machine_stat)
return
if(busy)
to_chat(user, "<span class='warning'>The book binder is busy. Please wait for completion of previous operation.</span>")
@@ -592,7 +592,7 @@
sleep(rand(200,400))
busy = FALSE
if(P)
if(!stat)
if(!machine_stat)
visible_message("<span class='notice'>[src] whirs as it prints and binds a new book.</span>")
var/obj/item/book/B = new(src.loc)
B.dat = P.info
+10 -10
View File
@@ -40,12 +40,12 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(M)
var/destination_found
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
if(!options.Find(S.id))
if(!options.Find(S.shuttle_id))
continue
if(!M.check_dock(S, silent=TRUE))
continue
destination_found = 1
dat += "<A href='?src=[REF(src)];move=[S.id]'>Send to [S.name]</A><br>"
dat += "<A href='?src=[REF(src)];move=[S.shuttle_id]'>Send to [S.name]</A><br>"
if(!destination_found && is_station_level(z)) //Only available if miners are lazy and did not set an LZ using the remote.
dat += "<A href='?src=[REF(src)];random=1'>Prepare for blind drop? (Dangerous)</A><br>"
if(LAZYLEN(turrets))
@@ -56,7 +56,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/obj/machinery/porta_turret/aux_base/T = PDT
var/integrity = max((T.obj_integrity-T.integrity_failure * T.max_integrity)/(T.max_integrity-T.integrity_failure * max_integrity)*100, 0)
var/status
if(T.stat & BROKEN)
if(T.machine_stat & BROKEN)
status = "<span class='bad'>ERROR</span>"
else if(!T.on)
status = "Disabled"
@@ -167,7 +167,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/area/A = get_area(T)
var/obj/docking_port/stationary/landing_zone = new /obj/docking_port/stationary(T)
landing_zone.id = "colony_drop([REF(src)])"
landing_zone.shuttle_id = "colony_drop([REF(src)])"
landing_zone.name = "Landing Zone ([T.x], [T.y])"
landing_zone.dwidth = base_dock.dwidth
landing_zone.dheight = base_dock.dheight
@@ -176,7 +176,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
landing_zone.setDir(base_dock.dir)
landing_zone.area_type = A.type
possible_destinations += "[landing_zone.id];"
possible_destinations += "[landing_zone.shuttle_id];"
//Serves as a nice mechanic to people get ready for the launch.
minor_announce("Auxiliary base landing zone coordinates locked in for [A]. Launch command now available!")
@@ -238,7 +238,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
/obj/docking_port/mobile/auxillary_base
name = "auxillary base"
id = "colony_drop"
shuttle_id = "colony_drop"
//Reminder to map-makers to set these values equal to the size of your base.
dheight = 4
dwidth = 4
@@ -254,7 +254,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
/obj/docking_port/stationary/public_mining_dock
name = "public mining base dock"
id = "disabled" //The Aux Base has to leave before this can be used as a dock.
shuttle_id = "disabled" //The Aux Base has to leave before this can be used as a dock.
//Should be checked on the map to ensure it matchs the mining shuttle dimensions.
dwidth = 3
width = 7
@@ -303,12 +303,12 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
//Mining shuttles may not be created equal, so we find the map's shuttle dock and size accordingly.
for(var/S in SSshuttle.stationary)
var/obj/docking_port/stationary/SM = S //SM is declared outside so it can be checked for null
if(SM.id == "mining_home" || SM.id == "mining_away")
if(SM.shuttle_id == "mining_home" || SM.shuttle_id == "mining_away")
var/area/A = get_area(landing_spot)
Mport = new(landing_spot)
Mport.id = "landing_zone_dock"
Mport.shuttle_id = "landing_zone_dock"
Mport.name = "auxillary base landing site"
Mport.dwidth = SM.dwidth
Mport.dheight = SM.dheight
@@ -326,7 +326,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/list/landing_turfs = list() //List of turfs where the mining shuttle may land.
for(var/S in SSshuttle.mobile)
var/obj/docking_port/mobile/MS = S
if(MS.id != "mining")
if(MS.shuttle_id != "mining")
continue
mining_shuttle = MS
landing_turfs = mining_shuttle.return_ordered_turfs(x,y,z,dir)
+1 -3
View File
@@ -120,15 +120,13 @@
/datum/action/innate/aux_base //Parent aux base action
icon_icon = 'icons/mob/actions/actions_construction.dmi'
var/mob/living/C //Mob using the action
var/mob/camera/aiEye/remote/base_construction/remote_eye //Console's eye mob
var/obj/machinery/computer/camera_advanced/base_construction/B //Console itself
/datum/action/innate/aux_base/Activate()
if(!target)
return TRUE
C = owner
remote_eye = C.remote_control
remote_eye = owner.remote_control
B = target
if(!B.RCD) //The console must always have an RCD.
B.RCD = new /obj/item/construction/rcd/internal(B) //If the RCD is lost somehow, make a new (empty) one!
+1 -1
View File
@@ -914,7 +914,7 @@
malfhacking = 0
clear_alert("hackingapc")
if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN)
if(!istype(apc) || QDELETED(apc) || apc.machine_stat & BROKEN)
to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>")
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE, ignore_walls = FALSE)
else if(apc.aidisabled)
+1 -1
View File
@@ -127,7 +127,7 @@
AIarea = get_base_area(src)
if(AIarea)
for (var/obj/machinery/power/apc/APC in AIarea)
if (!(APC.stat & BROKEN))
if (!(APC.machine_stat & BROKEN))
theAPC = APC
break
if (!theAPC)
@@ -136,7 +136,7 @@ GLOBAL_LIST(bad_gremlin_items)
return FALSE
if(istype(new_target, /obj/machinery))
var/obj/machinery/M = new_target
if(M.stat) //Unpowered or broken
if(M.machine_stat) //Unpowered or broken
return FALSE
else if(istype(new_target, /obj/machinery/door/firedoor))
var/obj/machinery/door/firedoor/F = new_target
@@ -247,7 +247,7 @@
return FALSE
if(P.has_cover &&!P.raised) //Don't attack invincible turrets
return FALSE
if(P.stat & BROKEN) //Or turrets that are already broken
if(P.machine_stat & BROKEN) //Or turrets that are already broken
return FALSE
return TRUE
@@ -71,13 +71,13 @@
set_light(cpu?.enabled ? light_strength : 0)
/obj/machinery/modular_computer/update_icon_state()
icon_state = (cpu?.enabled || (!(stat & NOPOWER) && cpu?.use_power())) ? icon_state_powered : icon_state_unpowered
icon_state = (cpu?.enabled || (!(machine_stat & NOPOWER) && cpu?.use_power())) ? icon_state_powered : icon_state_unpowered
return ..()
/obj/machinery/modular_computer/update_overlays()
. = ..()
if(!cpu?.enabled)
if (!(stat & NOPOWER) && (cpu?.use_power()))
if (!(machine_stat & NOPOWER) && (cpu?.use_power()))
. += screen_icon_screensaver
else
. += cpu.active_program?.program_icon_state || screen_icon_state_menu
@@ -117,13 +117,13 @@
visible_message(span_danger("\The [src]'s screen flickers [battery_module ? "\"BATTERY [malfunction ? "MALFUNCTION" : "CRITICAL"]\"" : "\"EXTERNAL POWER LOSS\""] warning as it shuts down unexpectedly."))
if(cpu)
cpu.shutdown_computer(0)
set_machine_stat(stat | NOPOWER)
set_machine_stat(machine_stat | NOPOWER)
update_appearance()
// Modular computers can have battery in them, we handle power in previous proc, so prevent this from messing it up for us.
/obj/machinery/modular_computer/power_change()
if(cpu?.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline.
set_machine_stat(stat & ~NOPOWER)
set_machine_stat(machine_stat & ~NOPOWER)
update_appearance()
return
. = ..()
@@ -225,7 +225,7 @@
return FALSE
/obj/machinery/lapvend/ui_interact(mob/user, datum/tgui/ui)
if(stat & (BROKEN | NOPOWER | MAINT))
if(machine_stat & (BROKEN | NOPOWER | MAINT))
if(ui)
ui.close()
return FALSE
+12 -12
View File
@@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(allCasters)
return ..()
/obj/machinery/newscaster/update_icon_state()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "newscaster_off"
else
if(GLOB.news_network.wanted_issue.active)
@@ -66,7 +66,7 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/machinery/newscaster/update_overlays()
. = ..()
if(!(stat & (NOPOWER|BROKEN)) && !GLOB.news_network.wanted_issue.active && alert)
if(!(machine_stat & (NOPOWER|BROKEN)) && !GLOB.news_network.wanted_issue.active && alert)
. += "newscaster_alert"
var/hp_percent = obj_integrity * 100 /max_integrity
@@ -81,14 +81,14 @@ GLOBAL_LIST_EMPTY(allCasters)
. += "crack3"
/obj/machinery/newscaster/power_change()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(powered())
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
update_icon()
else
spawn(rand(0, 15))
stat |= NOPOWER
machine_stat |= NOPOWER
update_icon()
/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
@@ -557,7 +557,7 @@ GLOBAL_LIST_EMPTY(allCasters)
I.play_tool_sound(src)
if(I.use_tool(src, user, 60))
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>The broken remains of [src] fall on the ground.</span>")
new /obj/item/stack/sheet/metal(loc, 5)
new /obj/item/shard(loc)
@@ -567,18 +567,18 @@ GLOBAL_LIST_EMPTY(allCasters)
new /obj/item/wallframe/newscaster(loc)
qdel(src)
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(stat & BROKEN)
if(machine_stat & BROKEN)
if(!I.tool_start_check(user, amount=0))
return
user.visible_message("[user] is repairing [src].", \
"<span class='notice'>You begin repairing [src]...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 40, volume=50))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
return
to_chat(user, "<span class='notice'>You repair [src].</span>")
obj_integrity = max_integrity
stat &= ~BROKEN
machine_stat &= ~BROKEN
update_icon()
else
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
@@ -588,7 +588,7 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/machinery/newscaster/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
else
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
@@ -604,8 +604,8 @@ GLOBAL_LIST_EMPTY(allCasters)
qdel(src)
/obj/machinery/newscaster/obj_break()
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
machine_stat |= BROKEN
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
update_icon()
+1 -1
View File
@@ -33,7 +33,7 @@
AddComponent(/datum/component/plumbing/acclimator, bolt)
/obj/machinery/plumbing/acclimator/process()
if(stat & NOPOWER || !enabled || !reagents.total_volume || reagents.chem_temp == target_temperature)
if(machine_stat & NOPOWER || !enabled || !reagents.total_volume || reagents.chem_temp == target_temperature)
if(acclimate_state != NEUTRAL)
acclimate_state = NEUTRAL
update_icon()
+1 -1
View File
@@ -56,7 +56,7 @@
to_chat(user, "<span class='notice'> The [src] will now fill for [wanted_amount]u.</span>")
/obj/machinery/plumbing/bottler/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
///see if machine has enough to fill
if(reagents.total_volume >= wanted_amount && anchored)
+1 -1
View File
@@ -10,7 +10,7 @@
AddComponent(/datum/component/plumbing/simple_demand, bolt)
/obj/machinery/plumbing/disposer/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(reagents.total_volume)
if(icon_state != initial(icon_state) + "_working") //threw it here instead of update icon since it only has two states
+1 -1
View File
@@ -45,7 +45,7 @@
ferment(AM)
/obj/machinery/plumbing/fermenter/proc/ferment(atom/AM)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(reagents.holder_full())
return
@@ -44,7 +44,7 @@
grind(AM)
/obj/machinery/plumbing/grinder_chemical/proc/grind(atom/AM)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(reagents.holder_full())
return
+1 -1
View File
@@ -47,7 +47,7 @@
/obj/machinery/plumbing/pill_press/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(reagents.total_volume >= current_volume)
if (product == "pill")
@@ -51,7 +51,7 @@
AddComponent(/datum/component/plumbing/simple_supply, bolt)
/obj/machinery/plumbing/synthesizer/process()
if(stat & NOPOWER || !reagent_id || !amount)
if(machine_stat & NOPOWER || !reagent_id || !amount)
return
if(reagents.total_volume >= amount) //otherwise we get leftovers, and we need this to be precise
return
+6 -6
View File
@@ -129,9 +129,9 @@
return TRUE
/obj/machinery/pool/controller/attackby(obj/item/W, mob/user)
if(shocked && !(stat & NOPOWER))
if(shocked && !(machine_stat & NOPOWER))
shock(user,50)
if(stat & (BROKEN))
if(machine_stat & (BROKEN))
return
if(istype(W,/obj/item/reagent_containers))
if(W.reagents.total_volume) //check if there's reagent
@@ -188,7 +188,7 @@
//procs
/obj/machinery/pool/controller/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
if(machine_stat & (BROKEN|NOPOWER)) // unpowered, no shock
return FALSE
if(!prob(prb))
return FALSE
@@ -220,7 +220,7 @@
/obj/machinery/pool/controller/process()
updateUsrDialog()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(drained)
return
@@ -372,11 +372,11 @@
. = ..()
if(.)
return
if(shocked && !(stat & NOPOWER))
if(shocked && !(machine_stat & NOPOWER))
shock(user,50)
if(panel_open && !isAI(user))
return wires.interact(user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
var/datum/browser/popup = new(user, "Pool Controller", name, 300, 450)
var/dat = ""
+2 -2
View File
@@ -54,6 +54,6 @@
P.shock(usr, 50)
if(WIRE_SHOCK)
if(mend)
P.stat &= ~NOPOWER
P.machine_stat &= ~NOPOWER
else
P.stat |= NOPOWER
P.machine_stat |= NOPOWER
+4 -4
View File
@@ -53,7 +53,7 @@
check_shield_icons()
update_shield_icons = 0
if(stat & (NOPOWER|BROKEN) || !active)//can update the icons even without power
if(machine_stat & (NOPOWER|BROKEN) || !active)//can update the icons even without power
return
if(!fueljar)//No fuel but we are on, shutdown
@@ -127,13 +127,13 @@
/obj/machinery/power/am_control_unit/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
if(active)
toggle_power(1)
else
use_power = NO_POWER_USE
else if(!stat && anchored)
else if(!machine_stat && anchored)
use_power = IDLE_POWER_USE
return
@@ -265,7 +265,7 @@
/obj/machinery/power/am_control_unit/ui_interact(mob/user)
. = ..()
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if((get_dist(src, user) > 1) || (machine_stat & (BROKEN|NOPOWER)))
if(!isAI(user))
user.unset_machine()
user << browse(null, "window=AMcontrol")
+31 -31
View File
@@ -254,7 +254,7 @@
opened = APC_COVER_OPENED
operating = FALSE
name = "\improper [A.name] APC"
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
update_appearance()
addtimer(CALLBACK(src, PROC_REF(update)), 5)
@@ -291,7 +291,7 @@
opened = APC_COVER_OPENED
operating = FALSE
name = "\improper [get_area_name(area, TRUE)] APC"
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
update_appearance()
addtimer(CALLBACK(src, PROC_REF(update)), 5)
register_context()
@@ -337,7 +337,7 @@
/obj/machinery/power/apc/examine(mob/user)
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(opened)
if(has_electronics && terminal)
@@ -349,7 +349,7 @@
. += "<span class='warning'>[src]'s innards have been replaced by strange brass machinery!</span>"
else
if (stat & MAINT)
if (machine_stat & MAINT)
. += "The cover is closed. Something is wrong with it. It doesn't work."
else if (malfhack)
. += "The cover is broken. It may be hard to force it open."
@@ -419,7 +419,7 @@
/obj/machinery/power/apc/update_overlays()
. = ..()
if((stat & (BROKEN|MAINT)) || update_state)
if((machine_stat & (BROKEN|MAINT)) || update_state)
return
. += mutable_appearance(icon, "apcox-[locked]")
@@ -443,9 +443,9 @@
// Handle icon status:
var/new_update_state = NONE
if(stat & BROKEN)
if(machine_stat & BROKEN)
new_update_state |= UPSTATE_BROKE
if(stat & MAINT)
if(machine_stat & MAINT)
new_update_state |= UPSTATE_MAINT
if(opened)
@@ -504,7 +504,7 @@
if(W.use_tool(src, user, 50))
if (has_electronics == APC_ELECTRONICS_INSTALLED)
has_electronics = APC_ELECTRONICS_MISSING
if (stat & BROKEN)
if (machine_stat & BROKEN)
user.visible_message(\
"[user.name] has broken the power control board inside [src.name]!",\
"<span class='notice'>You break the charred power control board and remove the remains.</span>",
@@ -544,8 +544,8 @@
coverlocked = TRUE //closing cover relocks it
update_appearance()
return
else if (!(stat & BROKEN))
if(coverlocked && !(stat & MAINT)) // locked...
else if (!(machine_stat & BROKEN))
if(coverlocked && !(machine_stat & MAINT)) // locked...
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened!</span>")
return
else if (panel_open)
@@ -575,12 +575,12 @@
switch (has_electronics)
if (APC_ELECTRONICS_INSTALLED)
has_electronics = APC_ELECTRONICS_SECURED
stat &= ~MAINT
machine_stat &= ~MAINT
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit electronics into place.</span>")
if (APC_ELECTRONICS_SECURED)
has_electronics = APC_ELECTRONICS_INSTALLED
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the electronics.</span>")
else
@@ -611,7 +611,7 @@
"<span class='notice'>You start welding the APC frame...</span>", \
"<span class='italics'>You hear welding.</span>")
if(W.use_tool(src, user, 50, volume=50, amount=3))
if ((stat & BROKEN) || opened==APC_COVER_REMOVED)
if ((machine_stat & BROKEN) || opened==APC_COVER_REMOVED)
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\
"[user.name] has cut [src] apart with [W].",\
@@ -634,7 +634,7 @@
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
return
else
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There is no connector for your power cell!</span>")
return
if(!user.transferItemToLoc(W, src))
@@ -685,7 +685,7 @@
if (has_electronics)
to_chat(user, "<span class='warning'>There is already a board inside the [src]!</span>")
return
else if (stat & BROKEN)
else if (machine_stat & BROKEN)
to_chat(user, "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>")
return
@@ -701,7 +701,7 @@
else if(istype(W, /obj/item/electroadaptive_pseudocircuit) && opened)
var/obj/item/electroadaptive_pseudocircuit/P = W
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return
if(!P.adapt_circuit(user, 50))
@@ -711,7 +711,7 @@
has_electronics = APC_ELECTRONICS_INSTALLED
locked = FALSE
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
return
if(!P.adapt_circuit(user, 500))
@@ -727,10 +727,10 @@
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
return
else if (istype(W, /obj/item/wallframe/apc) && opened)
if (!(stat & BROKEN || opened==APC_COVER_REMOVED || obj_integrity < max_integrity)) // There is nothing to repair
if (!(machine_stat & BROKEN || opened==APC_COVER_REMOVED || obj_integrity < max_integrity)) // There is nothing to repair
to_chat(user, "<span class='warning'>You found no reason for repairing this APC</span>")
return
if (!(stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
if (!(machine_stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
user.visible_message("[user.name] replaces missing APC's cover.",\
"<span class='notice'>You begin to replace APC's cover...</span>")
if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame
@@ -747,7 +747,7 @@
if(do_after(user, 50, target = src))
to_chat(user, "<span class='notice'>You replace the damaged APC frame with a new one.</span>")
qdel(W)
stat &= ~BROKEN
machine_stat &= ~BROKEN
obj_integrity = max_integrity
if (opened==APC_COVER_REMOVED)
opened = APC_COVER_OPENED
@@ -787,12 +787,12 @@
/obj/machinery/power/apc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 50, "cost" = 10) //16 for a wall
@@ -805,7 +805,7 @@
switch(passed_mode)
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
@@ -814,7 +814,7 @@
locked = TRUE
return TRUE
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, span_warning("There's no connector for a power cell."))
return FALSE
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
@@ -844,7 +844,7 @@
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel!</span>")
else if(stat & (BROKEN|MAINT))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
else
if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
@@ -863,7 +863,7 @@
set_nightshift(!nightshift_lights)
/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 10 && (!(stat & BROKEN) || malfai))
if(damage_flag == MELEE && damage_amount < 10 && (!(machine_stat & BROKEN) || malfai))
return FALSE
. = ..()
@@ -875,7 +875,7 @@
/obj/machinery/power/apc/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
set_broken()
if(opened != APC_COVER_REMOVED)
opened = APC_COVER_REMOVED
@@ -891,7 +891,7 @@
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel first!</span>")
else if(stat & (BROKEN|MAINT))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
else
flick("apc-spark", src)
@@ -954,7 +954,7 @@
charging = APC_NOT_CHARGING
src.update_appearance()
return
if((stat & MAINT) && !opened) //no board; no interface
if((machine_stat & MAINT) && !opened) //no board; no interface
return
/obj/machinery/power/apc/ui_interact(mob/user, datum/tgui/ui)
@@ -1090,7 +1090,7 @@
switch(action)
if("lock")
if(area.hasSiliconAccessInArea(usr))
if((obj_flags & EMAGGED) || (stat & (BROKEN|MAINT)))
if((obj_flags & EMAGGED) || (machine_stat & (BROKEN|MAINT)))
to_chat(usr, "<span class='warning'>The APC does not respond to the command!</span>")
else
locked = !locked
@@ -1362,7 +1362,7 @@
/obj/machinery/power/apc/process()
if(icon_update_needed)
update_appearance()
if(stat & (BROKEN|MAINT))
if(machine_stat & (BROKEN|MAINT))
return
if(!area || !area.requires_power)
return
+1 -1
View File
@@ -34,7 +34,7 @@
/obj/machinery/power/generator/update_overlays()
. = ..()
if(!(stat & (NOPOWER|BROKEN)))
if(!(machine_stat & (NOPOWER|BROKEN)))
var/L = min(round(lastgenlev/100000),11)
if(L != 0)
. += image('icons/obj/power.dmi', "teg-op[L]")
+9 -9
View File
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
obj_break()
/obj/machinery/gravity_generator/proc/set_fix()
stat &= ~BROKEN
machine_stat &= ~BROKEN
/obj/machinery/gravity_generator/part/Destroy()
if(main_part)
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/part/set_broken()
..()
if(main_part && !(main_part.stat & BROKEN))
if(main_part && !(main_part.machine_stat & BROKEN))
main_part.set_broken()
/// Used to eat args
@@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/set_broken()
..()
for(var/obj/machinery/gravity_generator/M in parts)
if(!(M.stat & BROKEN))
if(!(M.machine_stat & BROKEN))
M.set_broken()
middle.cut_overlays()
charge_count = 0
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/set_fix()
..()
for(var/obj/machinery/gravity_generator/M in parts)
if(M.stat & BROKEN)
if(M.machine_stat & BROKEN)
M.set_fix()
broken_state = FALSE
update_appearance()
@@ -239,7 +239,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
data["charge_count"] = charge_count
data["charging_state"] = charging_state
data["on"] = on
data["operational"] = (stat & BROKEN) ? FALSE : TRUE
data["operational"] = (machine_stat & BROKEN) ? FALSE : TRUE
return data
@@ -259,18 +259,18 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/power_change()
. = ..()
investigate_log("has [stat & NOPOWER ? "lost" : "regained"] power.", INVESTIGATE_GRAVITY)
investigate_log("has [machine_stat & NOPOWER ? "lost" : "regained"] power.", INVESTIGATE_GRAVITY)
set_power()
/obj/machinery/gravity_generator/main/get_status()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return "fix[min(broken_state, 3)]"
return on || charging_state != POWER_IDLE ? "on" : "off"
// Set the charging state based on power/breaker.
/obj/machinery/gravity_generator/main/proc/set_power()
var/new_state = FALSE
if(stat & (NOPOWER|BROKEN) || !breaker)
if(machine_stat & (NOPOWER|BROKEN) || !breaker)
new_state = FALSE
else if(breaker)
new_state = TRUE
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
// Charge/Discharge and turn on/off gravity when you reach 0/100 percent.
// Also emit radiation and handle the overlays.
/obj/machinery/gravity_generator/main/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(charging_state != POWER_IDLE)
if(charging_state == POWER_UP && charge_count >= 100)
+5 -5
View File
@@ -108,18 +108,18 @@
SHOULD_NOT_SLEEP(TRUE)
//SHOULD_CALL_PARENT(TRUE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(powered(power_channel))
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_RESTORED)
. = TRUE
set_machine_stat(stat & ~NOPOWER)
set_machine_stat(machine_stat & ~NOPOWER)
else
if(!(stat & NOPOWER))
if(!(machine_stat & NOPOWER))
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_LOST)
. = TRUE
set_machine_stat(stat | NOPOWER)
set_machine_stat(machine_stat | NOPOWER)
update_appearance()
// connect the machine to a powernet if a node cable is present on the turf
+3 -3
View File
@@ -192,9 +192,9 @@
. += "<span class='notice'><b>[src]'s display displays the words:</b> \"Research point production mode. Please insert <b>Tritium</b> and <b>Oxygen</b>. Use a multitool to change production modes.\"</span>"
/obj/machinery/power/rad_collector/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
eject()
stat |= BROKEN
machine_stat |= BROKEN
/obj/machinery/power/rad_collector/proc/eject()
locked = FALSE
@@ -219,7 +219,7 @@
. = ..()
if(loaded_tank)
. += "ptank"
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(active)
. += "on"
+1 -1
View File
@@ -158,7 +158,7 @@
step(src, get_dir(M, src))
/obj/machinery/power/emitter/process()
if(stat & (BROKEN))
if(machine_stat & (BROKEN))
return
if(state != EMITTER_WELDED || (!powernet && active_power_usage))
active = FALSE
@@ -101,10 +101,10 @@
/obj/machinery/particle_accelerator/control_box/power_change()
. = ..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
active = FALSE
use_power = NO_POWER_USE
else if(!stat && construction_state == PA_CONSTRUCTION_COMPLETE)
else if(!machine_stat && construction_state == PA_CONSTRUCTION_COMPLETE)
use_power = IDLE_POWER_USE
/obj/machinery/particle_accelerator/control_box/process()
+5 -5
View File
@@ -94,7 +94,7 @@
if(!terminal)
to_chat(user, "<span class='alert'>No power terminal found.</span>")
return
stat &= ~BROKEN
machine_stat &= ~BROKEN
update_icon()
return
@@ -189,7 +189,7 @@
terminal = new/obj/machinery/power/terminal(T)
terminal.setDir(get_dir(T,src))
terminal.master = src
stat &= ~BROKEN
machine_stat &= ~BROKEN
/obj/machinery/power/smes/disconnect_terminal()
if(terminal)
@@ -200,7 +200,7 @@
/obj/machinery/power/smes/update_overlays()
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(panel_open)
@@ -225,7 +225,7 @@
return clamp(round(5.5*charge/capacity),0,5)
/obj/machinery/power/smes/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
//store machine state to see if we need to update the icon overlays
@@ -289,7 +289,7 @@
// called after all power processes are finished
// restores charge level to smes if there was excess this ptick
/obj/machinery/power/smes/proc/restore()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(!outputting)
+8 -8
View File
@@ -78,7 +78,7 @@
/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 60, TRUE)
else
playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE)
@@ -97,7 +97,7 @@
if(disassembled)
if(assembly)
assembly.forceMove(loc)
assembly.give_glass(stat & BROKEN)
assembly.give_glass(machine_stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
var/shard = assembly?.glass_type ? assembly.glass_type.shard_type : /obj/item/shard
@@ -110,7 +110,7 @@
var/matrix/turner = matrix()
turner.Turn(azimuth_current)
panel.transform = turner
panel.icon_state = "solar_panel[(stat & BROKEN) ? "-b" : null]"
panel.icon_state = "solar_panel[(machine_stat & BROKEN) ? "-b" : null]"
/obj/machinery/power/solar/proc/queue_turn(azimuth)
needs_to_turn = TRUE
@@ -155,7 +155,7 @@
total_flux += cur_pow
/obj/machinery/power/solar/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(control && (!powernet || control.powernet != powernet))
unset_control()
@@ -331,12 +331,12 @@
/obj/machinery/power/solar_control/update_overlays()
. = ..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
. += mutable_appearance(icon, "[icon_keyboard]_off")
return
. += mutable_appearance(icon, icon_keyboard)
if(stat & BROKEN)
if(machine_stat & BROKEN)
. += mutable_appearance(icon, "[icon_state]_broken")
return
. += mutable_appearance(icon, icon_screen)
@@ -398,7 +398,7 @@
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(I.use_tool(src, user, 20, volume=50))
if (src.stat & BROKEN)
if (src.machine_stat & BROKEN)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
new /obj/item/shard( src.loc )
@@ -429,7 +429,7 @@
/obj/machinery/power/solar_control/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
else
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
+2 -2
View File
@@ -67,7 +67,7 @@
return TRUE
/obj/machinery/power/tracker/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
unset_control()
@@ -76,7 +76,7 @@
if(disassembled)
if(assembly)
assembly.forceMove(loc)
assembly.give_glass(stat & BROKEN)
assembly.give_glass(machine_stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
var/shard = assembly?.glass_type ? assembly.glass_type.shard_type : /obj/item/shard
+11 -11
View File
@@ -109,7 +109,7 @@
locate_machinery()
if(turbine)
to_chat(user, "<span class='notice'>Turbine connected.</span>")
stat &= ~BROKEN
machine_stat &= ~BROKEN
else
to_chat(user, "<span class='alert'>Turbine not connected.</span>")
obj_break()
@@ -120,9 +120,9 @@
/obj/machinery/power/compressor/process()
if(!starter)
return
if(!turbine || (turbine.stat & BROKEN))
if(!turbine || (turbine.machine_stat & BROKEN))
starter = FALSE
if(stat & BROKEN || panel_open)
if(machine_stat & BROKEN || panel_open)
starter = FALSE
return
cut_overlays()
@@ -138,7 +138,7 @@
rpm = min(rpm, (COMPFRICTION*efficiency)/2)
rpm = max(0, rpm - (rpm*rpm)/(COMPFRICTION*efficiency))
if(starter && !(stat & NOPOWER))
if(starter && !(machine_stat & NOPOWER))
use_power(2800)
if(rpm<1000)
rpmtarget = 1000
@@ -192,9 +192,9 @@
/obj/machinery/power/turbine/process()
if(!compressor)
stat = BROKEN
machine_stat = BROKEN
if((stat & BROKEN) || panel_open)
if((machine_stat & BROKEN) || panel_open)
return
if(!compressor.starter)
return
@@ -235,7 +235,7 @@
locate_machinery()
if(compressor)
to_chat(user, "<span class='notice'>Compressor connected.</span>")
stat &= ~BROKEN
machine_stat &= ~BROKEN
else
to_chat(user, "<span class='alert'>Compressor not connected.</span>")
obj_break()
@@ -252,9 +252,9 @@
/obj/machinery/power/turbine/ui_data(mob/user)
var/list/data = list()
data["compressor"] = compressor ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.stat & BROKEN)) ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.machine_stat & BROKEN)) ? TRUE : FALSE
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.stat & BROKEN)) ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm
@@ -313,9 +313,9 @@
/obj/machinery/computer/turbine_computer/ui_data(mob/user)
var/list/data = list()
data["compressor"] = compressor ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.stat & BROKEN)) ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.machine_stat & BROKEN)) ? TRUE : FALSE
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.stat & BROKEN)) ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm
@@ -58,7 +58,7 @@
/obj/machinery/chem_heater/process()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(on)
if(beaker && beaker.reagents.total_volume)
@@ -74,7 +74,7 @@
/obj/machinery/chem_master/update_overlays()
. = ..()
if (stat & BROKEN)
if (machine_stat & BROKEN)
. += "waitlight"
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
@@ -128,7 +128,7 @@
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
/obj/machinery/computer/pandemic/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = (beaker ? "mixer1_b" : "mixer0_b")
else
icon_state = "mixer[(beaker) ? "1" : "0"][powered() ? "" : "_nopower"]"
@@ -239,7 +239,7 @@
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
. = TRUE //no afterattack
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
var/obj/item/reagent_containers/B
if(beaker)
@@ -151,7 +151,7 @@
options["eject"] = radial_eject
if(isAI(user))
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
options["examine"] = radial_examine
@@ -173,7 +173,7 @@
choice = show_radial_menu(user, src, options, require_near = !hasSiliconAccessInArea(user))
// post choice verification
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
if(operating || (isAI(user) && machine_stat & NOPOWER) || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
switch(choice)
@@ -206,7 +206,7 @@
var/obj/item/O = i
. += "<span class='notice'>- \A [O.name].</span>"
if(!(stat & (NOPOWER|BROKEN)))
if(!(machine_stat & (NOPOWER|BROKEN)))
. += "<span class='notice'>The status display reads:</span>"
. += "<span class='notice'>- Grinding reagents at <b>[speed*100]%</b>.<span>"
if(beaker)
@@ -255,7 +255,7 @@
/obj/machinery/reagentgrinder/proc/juice()
power_change()
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
if(!beaker || machine_stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
return
operate_for(50, juicing = TRUE)
for(var/obj/item/i in holdingitems)
@@ -274,7 +274,7 @@
/obj/machinery/reagentgrinder/proc/grind()
power_change()
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
if(!beaker || machine_stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
return
operate_for(60)
for(var/i in holdingitems)
@@ -296,7 +296,7 @@
/obj/machinery/reagentgrinder/proc/mix(mob/user)
//For butter and other things that would change upon shaking or mixing
power_change()
if(!beaker || stat & (NOPOWER|BROKEN))
if(!beaker || machine_stat & (NOPOWER|BROKEN))
return
operate_for(50, juicing = TRUE)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/reagentgrinder, mix_complete)), 50)
+9 -9
View File
@@ -41,13 +41,13 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
update_move_direction()
/obj/machinery/conveyor/auto/update()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "conveyor-broken"
operating = FALSE
return
else if(!operable)
operating = FALSE
else if(stat & NOPOWER)
else if(machine_stat & NOPOWER)
operating = FALSE
else
operating = TRUE
@@ -113,20 +113,20 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
update()
/obj/machinery/conveyor/proc/update()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "conveyor-broken"
operating = FALSE
return
if(!operable)
operating = FALSE
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
operating = FALSE
icon_state = "conveyor[operating * verted]"
// machine process
// move items to the target location
/obj/machinery/conveyor/process()
if(stat & (BROKEN | NOPOWER))
if(machine_stat & (BROKEN | NOPOWER))
return
if(!operating)
return
@@ -149,21 +149,21 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
if(I.use_tool(src, user, 40, volume=40))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
var/obj/item/stack/conveyor/C = new /obj/item/stack/conveyor(loc, 1, TRUE, id)
transfer_fingerprints_to(C)
to_chat(user, "<span class='notice'>You remove the conveyor belt.</span>")
qdel(src)
else if(I.tool_behaviour == TOOL_WRENCH)
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
I.play_tool_sound(src)
setDir(turn(dir,-45))
update_move_direction()
to_chat(user, "<span class='notice'>You rotate [src].</span>")
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
verted = verted * -1
update_move_direction()
to_chat(user, "<span class='notice'>You reverse [src]'s direction.</span>")
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
// make the conveyor broken
// also propagate inoperability to any connected conveyor with the same ID
/obj/machinery/conveyor/proc/broken()
stat |= BROKEN
machine_stat |= BROKEN
update()
var/obj/machinery/conveyor/C = locate() in get_step(src, dir)
+6 -6
View File
@@ -177,7 +177,7 @@
// monkeys and xenos can only pull the flush lever
/obj/machinery/disposal/attack_paw(mob/user)
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
flush = !flush
update_icon()
@@ -303,7 +303,7 @@
return GLOB.notcontained_state
/obj/machinery/disposal/bin/ui_interact(mob/user, datum/tgui/ui)
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
@@ -385,7 +385,7 @@
/obj/machinery/disposal/bin/update_overlays()
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
pressure_charging = FALSE
flush = FALSE
return
@@ -395,7 +395,7 @@
. += "dispover-handle"
//only handle is shown if no power
if(stat & NOPOWER || panel_open)
if(machine_stat & NOPOWER || panel_open)
return
//check for items in disposal - occupied light
@@ -418,7 +418,7 @@
//timed process
//charge the gas reservoir and perform flush if ready
/obj/machinery/disposal/bin/process()
if(stat & BROKEN) //nothing can happen if broken
if(machine_stat & BROKEN) //nothing can happen if broken
return
flush_count++
@@ -431,7 +431,7 @@
if(flush && air_contents.return_pressure() >= SEND_PRESSURE) // flush can happen even without power
do_flush()
if(stat & NOPOWER) // won't charge if no power
if(machine_stat & NOPOWER) // won't charge if no power
return
use_power(100) // base power usage
@@ -51,9 +51,9 @@
SEND_SIGNAL(occupant, COMSIG_NANITE_SET_CLOUD, cloud_id)
/obj/machinery/nanite_chamber/proc/inject_nanites()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
return
if(!occupant || busy)
return
@@ -78,9 +78,9 @@
occupant.AddComponent(/datum/component/nanites, 100)
/obj/machinery/nanite_chamber/proc/remove_nanites(datum/nanite_program/NP)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
return
if(!occupant || busy || SEND_SIGNAL(occupant, COMSIG_NANITE_CHECK_CONSOLE_LOCK))
return
@@ -118,10 +118,10 @@
/obj/machinery/nanite_chamber/update_overlays()
. = ..()
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
. += "maint"
else if(!(stat & (NOPOWER|BROKEN)))
else if(!(machine_stat & (NOPOWER|BROKEN)))
if(busy || locked)
. += "red"
if(locked)
@@ -28,7 +28,7 @@
/obj/machinery/nanite_program_hub/update_overlays()
. = ..()
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
if((machine_stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
. += mutable_appearance(icon, "nanite_program_hub_on")
. += emissive_appearance(icon, "nanite_program_hub_on")
@@ -13,7 +13,7 @@
/obj/machinery/nanite_programmer/update_overlays()
. = ..()
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
if((machine_stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
. += mutable_appearance(icon, "nanite_programmer_on")
. += emissive_appearance(icon, "nanite_programmer_on")
@@ -33,9 +33,9 @@
update_icon()
/obj/machinery/public_nanite_chamber/proc/inject_nanites(mob/living/attacker)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
return
if(!occupant || busy)
return
@@ -61,9 +61,9 @@
occupant.AddComponent(/datum/component/nanites, 75, cloud_id)
/obj/machinery/public_nanite_chamber/proc/change_cloud(mob/living/attacker)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
return
if(!occupant || busy)
return
@@ -98,10 +98,10 @@
/obj/machinery/public_nanite_chamber/update_overlays()
. = ..()
if((stat & MAINT) || panel_open)
if((machine_stat & MAINT) || panel_open)
. += "maint"
else if(!(stat & (NOPOWER|BROKEN)))
else if(!(machine_stat & (NOPOWER|BROKEN)))
if(busy || locked)
. += "red"
if(locked)
+3 -3
View File
@@ -27,7 +27,7 @@
return ..()
/obj/machinery/rnd/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
if(machine_stat & (BROKEN|NOPOWER)) // unpowered, no shock
return FALSE
if(!prob(prb))
return FALSE
@@ -76,10 +76,10 @@
if(busy)
to_chat(user, "<span class='warning'>[src] is busy right now.</span>")
return FALSE
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src] is broken.</span>")
return FALSE
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
to_chat(user, "<span class='warning'>[src] has no power.</span>")
return FALSE
if(loaded_item)
+4 -4
View File
@@ -34,7 +34,7 @@
heat_gen = initial(src.heat_gen) / max(1, tot_rating)
/obj/machinery/rnd/server/proc/refresh_working()
if(stat & EMPED)
if(machine_stat & EMPED)
working = FALSE
else
working = TRUE
@@ -43,12 +43,12 @@
. = ..()
if(. & EMP_PROTECT_SELF)
return
stat |= EMPED
machine_stat |= EMPED
addtimer(CALLBACK(src, PROC_REF(unemp)), severity*9)
refresh_working()
/obj/machinery/rnd/server/proc/unemp()
stat &= ~EMPED
machine_stat &= ~EMPED
refresh_working()
/obj/machinery/rnd/server/proc/mine()
@@ -62,7 +62,7 @@
return environment.return_temperature()
/obj/machinery/rnd/server/proc/produce_heat(perc)
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
if(!(machine_stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
var/turf/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
@@ -10,8 +10,8 @@
allowed_area = A.name
. = ..()
/mob/camera/aiEye/remote/xenobio/setLoc(var/t)
var/area/new_area = get_area(t)
/mob/camera/aiEye/remote/xenobio/setLoc(turf/destination)
var/area/new_area = get_area(destination)
if(new_area && new_area.name == allowed_area || new_area && new_area.xenobiology_compatible)
return ..()
else
@@ -62,6 +62,16 @@
S.forceMove(drop_location())
return ..()
/obj/machinery/computer/camera_advanced/xenobio/examine(mob/user)
. = ..()
if(monkeys)
. += span_notice("There [monkeys == 1 ? "is" : "are"] [monkeys] monkey\s stored.")
var/slime_amount = length(stored_slimes)
if(slime_amount)
. += span_notice("There [slime_amount == 1 ? "is" : "are"] [slime_amount] slime\s stored.")
if(current_potion)
. += span_notice("[current_potion] is currently loaded, press <b>Alt-click</b> to eject.")
/obj/machinery/computer/camera_advanced/xenobio/CreateEye()
eyeobj = new /mob/camera/aiEye/remote/xenobio(get_turf(src))
eyeobj.origin = src
@@ -114,17 +124,17 @@
actions += new feed_slime_action(src)
actions += new monkey_recycle_action(src)
if(successfulupgrade)
to_chat(user, "<span class='notice'>You have successfully upgraded [src] with [O].</span>")
to_chat(user, span_notice("You have successfully upgraded [src] with [O]."))
for(var/datum/action/actions_removed as anything in actions)
actions_removed.Remove(current_user)
GrantActions(current_user)
else
to_chat(user, "<span class='warning'>[src] already has the contents of [O] installed!</span>")
to_chat(user, span_warning("[src] already has the contents of [O] installed!"))
return
if(istype(O, /obj/item/reagent_containers/food/snacks/cube/monkey) && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
monkeys++
to_chat(user, "<span class='notice'>You feed [O] to [src]. It now has [monkeys] monkey cubes stored.</span>")
to_chat(user, span_notice("You feed [O] to [src]. It now has [monkeys] monkey cubes stored."))
qdel(O)
return
else if(istype(O, /obj/item/storage/bag) && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
@@ -136,7 +146,7 @@
monkeys++
qdel(G)
if(loaded)
to_chat(user, "<span class='notice'>You fill [src] with the monkey cubes stored in [O]. [src] now has [monkeys] monkey cubes stored.</span>")
to_chat(user, span_notice("You fill [src] with the monkey cubes stored in [O]. [src] now has [monkeys] monkey cubes stored."))
return
else if(istype(O, /obj/item/slimepotion/slime) && (upgradetier & XENOBIO_UPGRADE_SLIMEADV)) // CIT CHANGE - makes giving slimes potions via console require XENOBIO_UPGRADE_SLIMEADV
var/replaced = FALSE
@@ -146,7 +156,7 @@
current_potion.forceMove(drop_location())
replaced = TRUE
current_potion = O
to_chat(user, "<span class='notice'>You load [O] in the console's potion slot[replaced ? ", replacing the one that was there before" : ""].</span>")
to_chat(user, span_notice("You load [O] in the console's potion slot[replaced ? ", replacing the one that was there before" : ""]."))
return
..()
@@ -156,10 +166,9 @@
button_icon_state = "slime_down"
/datum/action/innate/slime_place/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
@@ -168,7 +177,7 @@
S.visible_message("[S] warps in!")
X.stored_slimes -= S
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
/datum/action/innate/slime_pick_up
name = "Pick up Slime"
@@ -176,10 +185,9 @@
button_icon_state = "slime_up"
/datum/action/innate/slime_pick_up/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
@@ -193,7 +201,7 @@
S.forceMove(X)
X.stored_slimes += S
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
/datum/action/innate/feed_slime
@@ -202,23 +210,22 @@
button_icon_state = "monkey_down"
/datum/action/innate/feed_slime/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
if(X.monkeys >= 1)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(remote_eye.loc, TRUE, owner)
if (!QDELETED(food))
food.LAssailant = WEAKREF(C)
X.monkeys --
to_chat(owner, "<span class='notice'>[X] now has [X.monkeys] monkey(s) left.</span>")
food.LAssailant = WEAKREF(owner)
X.monkeys--
to_chat(owner, span_notice("[X] now has [X.monkeys] monkey(s) left."))
else
to_chat(owner, "<span class='warning'>[X] needs to have at least 1 monkey stored. Currently has [X.monkeys] monkeys stored.</span>")
to_chat(owner, span_warning("[X] needs to have at least 1 monkey stored. Currently has [X.monkeys] monkeys stored."))
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
/datum/action/innate/monkey_recycle
@@ -227,10 +234,9 @@
button_icon_state = "monkey_up"
/datum/action/innate/monkey_recycle/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
@@ -240,7 +246,7 @@
X.monkeys = round(X.monkeys + 0.2,0.1)
qdel(M)
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
/datum/action/innate/slime_scan
name = "Scan Slime"
@@ -248,16 +254,15 @@
button_icon_state = "slime_scan"
/datum/action/innate/slime_scan/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
for(var/mob/living/simple_animal/slime/S in remote_eye.loc)
slime_scan(S, C)
slime_scan(S, owner)
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
/datum/action/innate/feed_potion
name = "Apply Potion"
@@ -265,23 +270,22 @@
button_icon_state = "slime_potion"
/datum/action/innate/feed_potion/Activate()
if(!target || !isliving(owner))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/xenobio/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(QDELETED(X.current_potion))
to_chat(owner, "<span class='notice'>No potion loaded.</span>")
to_chat(owner, span_notice("No potion loaded."))
return
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
for(var/mob/living/simple_animal/slime/S in remote_eye.loc)
X.current_potion.attack(S, C)
X.current_potion.attack(S, owner)
break
else
to_chat(owner, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(owner, span_warning("Target is not near a camera. Cannot proceed."))
//Demodularized Code
@@ -323,11 +327,14 @@
/datum/action/innate/hotkey_help/Activate()
if(!target || !isliving(owner))
return
to_chat(owner, "<b>Click shortcuts:</b>")
to_chat(owner, "Shift-click a slime to pick it up, or the floor to drop all held slimes. (Requires Basic Slime Console upgrade)")
to_chat(owner, "Ctrl-click a slime to scan it.")
to_chat(owner, "Alt-click a slime to feed it a potion. (Requires Advanced Slime Console upgrade)")
to_chat(owner, "Ctrl-click on a dead monkey to recycle it, or the floor to place a new monkey. (Requires Monkey Console upgrade)")
var/static/list/help = list(
"<b>Click shortcuts:</b>",
"Shift-click a slime to pick it up, or the floor to drop all held slimes. (Requires Basic Slime Console upgrade)",
"Ctrl-click a slime to scan it.",
"Alt-click a slime to feed it a potion. (Requires Advanced Slime Console upgrade)",
"Ctrl-click on a dead monkey to recycle it, or the floor to place a new monkey. (Requires Monkey Console upgrade)",
)
to_chat(owner, "<blockquote class='info'>[help.Join("\n")]</blockquote>")
//
// Alternate clicks for slime, monkey and open turf if using a xenobio console
@@ -365,67 +372,67 @@
// Scans slime
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickCtrl(mob/living/user, mob/living/simple_animal/slime/S)
if(!GLOB.cameranet.checkTurfVis(S.loc))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/area/mobarea = get_area(S.loc)
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
slime_scan(S, C)
slime_scan(S, user)
//Feeds a potion to slime
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickAlt(mob/living/user, mob/living/simple_animal/slime/S)
if(!(upgradetier & XENOBIO_UPGRADE_SLIMEADV)) //CIT CHANGE - makes slime-related actions require XENOBIO_UPGRADE_SLIMEADV
to_chat(user, "<span class='warning'>This console does not have the advanced slime upgrade.</span>")
to_chat(user, span_warning("This console does not have the advanced slime upgrade."))
return
if(!GLOB.cameranet.checkTurfVis(S.loc))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/turf/slime_location = S.loc
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
var/area/mobarea = get_area(S.loc)
var/area/mobarea = get_area(slime_location)
if(QDELETED(X.current_potion))
to_chat(C, "<span class='warning'>No potion loaded.</span>")
to_chat(user, span_warning("No potion loaded."))
return
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
X.current_potion.attack(S, C)
slime_location.balloon_alert(user, "applying [current_potion]")
X.current_potion.attack(S, user)
//Picks up slime
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickShift(mob/living/user, mob/living/simple_animal/slime/S)
if(!(upgradetier & XENOBIO_UPGRADE_SLIMEBASIC)) //CIT CHANGE - makes slime-related actions require XENOBIO_UPGRADE_SLIMEBASIC
to_chat(user, "<span class='warning'>This console does not have the basic slime upgrade.</span>")
to_chat(user, span_warning("This console does not have the basic slime upgrade."))
return
if(!GLOB.cameranet.checkTurfVis(S.loc))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/turf/slime_location = S.loc
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
var/area/mobarea = get_area(S.loc)
var/area/mobarea = get_area(slime_location)
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
if(X.stored_slimes.len >= X.max_slimes)
to_chat(C, "<span class='warning'>Slime storage is full.</span>")
to_chat(user, span_warning("Slime storage is full."))
return
if(S.ckey)
to_chat(C, "<span class='warning'>The slime wiggled free!</span>")
to_chat(user, span_warning("The slime wiggled free!"))
return
if(S.buckled)
S.Feedstop(silent = TRUE)
S.visible_message("[S] vanishes in a flash of light!")
S.forceMove(X)
X.stored_slimes += S
slime_location.balloon_alert(user, "[length(X.stored_slimes)]/[max_slimes] in storage")
//Place slimes
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoTurfClickShift(mob/living/user, turf/open/T)
if(!(upgradetier & XENOBIO_UPGRADE_SLIMEBASIC)) //CIT CHANGE - makes slime-related actions require XENOBIO_UPGRADE_SLIMEBASIC
to_chat(user, "<span class='warning'>This console does not have the basic slime upgrade.</span>")
to_chat(user, span_warning("This console does not have the basic slime upgrade."))
return
if(!GLOB.cameranet.checkTurfVis(T))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
var/area/turfarea = get_area(T)
if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible)
@@ -437,38 +444,39 @@
//Place monkey
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoTurfClickCtrl(mob/living/user, turf/open/T)
if(!(upgradetier & XENOBIO_UPGRADE_MONKEYS)) // CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
to_chat(user, "<span class='warning'>This console does not have the monkey upgrade.</span>")
to_chat(user, span_warning("This console does not have the monkey upgrade."))
return
if(!GLOB.cameranet.checkTurfVis(T))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
var/area/turfarea = get_area(T)
if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible)
if(X.monkeys >= 1)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, C)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, user)
if (!QDELETED(food))
food.LAssailant = WEAKREF(C)
food.LAssailant = WEAKREF(user)
X.monkeys--
X.monkeys = round(X.monkeys, 0.1) //Prevents rounding errors
to_chat(C, "<span class='notice'>[X] now has [X.monkeys] monkey(s) stored.</span>")
to_chat(user, span_notice("[X] now has [X.monkeys] monkey(s) stored."))
T.balloon_alert(user, "[X.monkeys] left")
else
to_chat(C, "<span class='warning'>[X] needs to have at least 1 monkey stored. Currently has [X.monkeys] monkeys stored.</span>")
to_chat(user, span_warning("[X] needs to have at least 1 monkey stored. Currently has [X.monkeys] monkeys stored."))
T.balloon_alert(user, "no monkeys available")
//Pick up monkey
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoMonkeyClickCtrl(mob/living/user, mob/living/carbon/monkey/M)
if(!(upgradetier & XENOBIO_UPGRADE_MONKEYS)) // CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
to_chat(user, "<span class='warning'>This console does not have the monkey upgrade.</span>")
to_chat(user, span_warning("This console does not have the monkey upgrade."))
return
if(!isturf(M.loc) || !GLOB.cameranet.checkTurfVis(M.loc))
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
to_chat(user, span_warning("Target is not near a camera. Cannot proceed."))
return
var/mob/living/C = user
var/mob/camera/aiEye/remote/xenobio/E = C.remote_control
var/turf/monkey_location = M.loc
var/mob/camera/aiEye/remote/xenobio/E = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
var/area/mobarea = get_area(M.loc)
var/area/mobarea = get_area(monkey_location)
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
if(!M.stat)
return
@@ -476,4 +484,13 @@
X.monkeys = round(X.monkeys + 0.2,0.1)
qdel(M)
if (X.monkeys == (round(X.monkeys,1)))
to_chat(C, "<span class='notice'>[X] now has [X.monkeys] monkey(s) available.</span>")
to_chat(user, span_notice("[X] now has [X.monkeys] monkey(s) available."))
monkey_location.balloon_alert(user, "[X.monkeys] available")
/obj/machinery/computer/camera_advanced/xenobio/AltClick(mob/user)
. = ..()
if(!QDELETED(current_potion) && user.canUseTopic(src, BE_CLOSE, no_tk = NO_TK))
to_chat(user, span_notice("You eject [current_potion] from [src]."))
if(!user.put_in_hands(current_potion))
current_potion.forceMove(drop_location())
current_potion = null
@@ -67,7 +67,7 @@
shuttleId = "caravantrade1"
lock_override = NONE
shuttlePortId = "caravantrade1_custom"
jumpto_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1, "caravantrade1_ambush" = 1)
jump_to_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1, "caravantrade1_ambush" = 1)
view_range = 6.5
x_offset = -5
y_offset = -5
@@ -91,7 +91,7 @@
shuttleId = "caravanpirate"
lock_override = NONE
shuttlePortId = "caravanpirate_custom"
jumpto_ports = list("caravanpirate_ambush" = 1)
jump_to_ports = list("caravanpirate_ambush" = 1)
view_range = 6.5
x_offset = 3
y_offset = -6
@@ -115,7 +115,7 @@
shuttleId = "caravansyndicate1"
lock_override = NONE
shuttlePortId = "caravansyndicate1_custom"
jumpto_ports = list("caravansyndicate1_ambush" = 1, "caravansyndicate1_listeningpost" = 1)
jump_to_ports = list("caravansyndicate1_ambush" = 1, "caravansyndicate1_listeningpost" = 1)
view_range = 0
x_offset = 2
y_offset = 0
@@ -139,7 +139,7 @@
shuttleId = "caravansyndicate2"
lock_override = NONE
shuttlePortId = "caravansyndicate2_custom"
jumpto_ports = list("caravansyndicate2_ambush" = 1, "caravansyndicate1_listeningpost" = 1)
jump_to_ports = list("caravansyndicate2_ambush" = 1, "caravansyndicate1_listeningpost" = 1)
view_range = 0
x_offset = 0
y_offset = 2
@@ -163,7 +163,7 @@
shuttleId = "caravansyndicate3"
lock_override = NONE
shuttlePortId = "caravansyndicate3_custom"
jumpto_ports = list("caravansyndicate3_ambush" = 1, "caravansyndicate3_listeningpost" = 1)
jump_to_ports = list("caravansyndicate3_ambush" = 1, "caravansyndicate3_listeningpost" = 1)
view_range = 2.5
x_offset = -1
y_offset = -3
+1 -1
View File
@@ -1,6 +1,6 @@
/obj/docking_port/mobile/arrivals
name = "arrivals shuttle"
id = "arrivals"
shuttle_id = "arrivals"
dwidth = 3
width = 7
+3 -3
View File
@@ -1,6 +1,6 @@
/obj/docking_port/mobile/assault_pod
name = "assault pod"
id = "steel_rain"
shuttle_id = "steel_rain"
dwidth = 3
width = 7
height = 7
@@ -46,7 +46,7 @@
if(!T)
return
var/obj/docking_port/stationary/landing_zone = new /obj/docking_port/stationary(T)
landing_zone.id = "assault_pod([REF(src)])"
landing_zone.shuttle_id = "assault_pod([REF(src)])"
landing_zone.name = "Landing Zone"
landing_zone.dwidth = dwidth
landing_zone.dheight = dheight
@@ -56,7 +56,7 @@
for(var/obj/machinery/computer/shuttle/S in GLOB.machines)
if(S.shuttleId == shuttle_id)
S.possible_destinations = "[landing_zone.id]"
S.possible_destinations = "[landing_zone.shuttle_id]"
to_chat(user, "Landing zone set.")
+3 -3
View File
@@ -42,12 +42,12 @@
else
data["status"] = M.mode == SHUTTLE_IGNITING ? "Igniting" : M.mode != SHUTTLE_IDLE ? "In Transit" : "Idle"
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
if(!options.Find(S.id))
if(!options.Find(S.shuttle_id))
continue
if(!M.check_dock(S, silent = TRUE))
continue
var/list/location_data = list(
id = S.id,
id = S.shuttle_id,
name = S.name
)
data["locations"] += list(location_data)
@@ -120,4 +120,4 @@
/obj/machinery/computer/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
if(port && (shuttleId == initial(shuttleId) || override))
shuttleId = port.id
shuttleId = port.shuttle_id
+4 -4
View File
@@ -58,12 +58,12 @@
data["calculated_cooldown"] = calculated_cooldown
data["locations"] = list()
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
if(!options.Find(S.id))
if(!options.Find(S.shuttle_id))
continue
if(!M.check_dock(S, silent = TRUE))
continue
var/list/location_data = list(
id = S.id,
id = S.shuttle_id,
name = S.name,
dist = round(calculateDistance(S))
)
@@ -217,7 +217,7 @@
/obj/machinery/computer/custom_shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
if(port && (shuttleId == initial(shuttleId) || override))
linkShuttle(port.id)
linkShuttle(port.shuttle_id)
//Custom shuttle docker locations
/obj/machinery/computer/camera_advanced/shuttle_docker/custom
@@ -230,7 +230,7 @@
/turf/open/floor/plating/ashplanet,
/turf/open/floor/plating/asteroid,
/turf/open/floor/plating/lavaland_baseturf)
jumpto_ports = list("whiteship_home" = 1)
jump_to_ports = list("whiteship_home" = 1)
view_range = 12
designate_time = 100
circuit = /obj/item/circuitboard/computer/shuttle/docker
+1 -1
View File
@@ -1,6 +1,6 @@
/obj/docking_port/mobile/elevator
name = "elevator"
id = "elevator"
shuttle_id = "elevator"
dwidth = 3
width = 7
height = 7
+5 -5
View File
@@ -284,7 +284,7 @@
/obj/docking_port/mobile/emergency
name = "emergency shuttle"
id = "emergency"
shuttle_id = "emergency"
dwidth = 9
width = 22
@@ -507,7 +507,7 @@
/obj/docking_port/mobile/pod
name = "escape pod"
id = "pod"
shuttle_id = "pod"
dwidth = 1
width = 3
height = 4
@@ -576,7 +576,7 @@
/obj/docking_port/stationary/random
name = "escape pod"
id = "pod"
shuttle_id = "pod"
dwidth = 1
width = 3
height = 4
@@ -601,7 +601,7 @@
return
// Fallback: couldn't find anything
WARNING("docking port '[id]' could not be randomly placed in [target_area]: of [original_len] turfs, none were suitable")
WARNING("docking port '[shuttle_id]' could not be randomly placed in [target_area]: of [original_len] turfs, none were suitable")
return INITIALIZE_HINT_QDEL
/obj/docking_port/stationary/random/icemoon
@@ -650,7 +650,7 @@
/obj/docking_port/mobile/emergency/backup
name = "backup shuttle"
id = "backup"
shuttle_id = "backup"
dwidth = 2
width = 8
height = 8
+102 -81
View File
@@ -3,19 +3,22 @@
desc = "Used to designate a precise transit location for a spacecraft."
jump_action = null
should_supress_view_changes = FALSE
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
var/datum/action/innate/shuttledocker_place/place_action = new
var/shuttleId = ""
var/shuttlePortId = ""
var/shuttlePortName = "custom location"
var/list/jumpto_ports = list() //hashset of ports to jump to and ignore for collision purposes
var/obj/docking_port/stationary/my_port //the custom docking port placed by this console
var/obj/docking_port/mobile/shuttle_port //the mobile docking port of the connected shuttle
/// Hashset of ports to jump to and ignore for collision purposes
var/list/jump_to_ports = list()
/// The custom docking port placed by this console
var/obj/docking_port/stationary/my_port
/// The mobile docking port of the connected shuttle
var/obj/docking_port/mobile/shuttle_port
// Traits forbided for custom docking
var/list/locked_traits = list(ZTRAIT_RESERVED, ZTRAIT_CENTCOM, ZTRAIT_AWAY, ZTRAIT_REEBE) //traits forbided for custom docking
var/view_range = 0
var/x_offset = 0
var/y_offset = 0
var/list/whitelist_turfs = list(/turf/open/space, /turf/open/floor/plating, /turf/open/lava)
var/list/whitelist_turfs = list(/turf/open/space, /turf/open/floor/plating, /turf/open/lava, /turf/open/openspace)
var/space_turfs_only = TRUE
var/see_hidden = FALSE
var/designate_time = 0
@@ -24,37 +27,52 @@
/obj/machinery/computer/camera_advanced/shuttle_docker/Initialize(mapload)
. = ..()
actions += new /datum/action/innate/shuttledocker_rotate(src)
actions += new /datum/action/innate/shuttledocker_place(src)
GLOB.navigation_computers += src
whitelist_turfs = typecacheof(whitelist_turfs)
/obj/machinery/computer/camera_advanced/shuttle_docker/Destroy()
. = ..()
if(my_port?.get_docked())
my_port.delete_after = TRUE
my_port.shuttle_id = null
my_port.name = "Old [my_port.name]"
my_port = null
else
QDEL_NULL(my_port)
GLOB.navigation_computers -= src
/// "Initializes" any default port ids we have, done so add_jumpable_port can be a proper setter
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/set_init_ports()
var/list/init_ports = jump_to_ports.Copy()
jump_to_ports = list() //Reset it so we don't get dupes
for(var/port_id in init_ports)
add_jumpable_port(port_id)
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/add_jumpable_port(port_id)
if(!length(jump_to_ports))
actions += new /datum/action/innate/camera_jump/shuttle_docker(src)
jump_to_ports[port_id] = TRUE
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/remove_jumpable_port(port_id)
jump_to_ports -= port_id
if(!length(jump_to_ports))
var/datum/action/to_remove = locate(/datum/action/innate/camera_jump/shuttle_docker) in actions
actions -= to_remove
qdel(to_remove)
/obj/machinery/computer/camera_advanced/shuttle_docker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(jammed)
to_chat(user, "<span class='warning'>The Syndicate is jamming the console!</span>")
to_chat(user, span_warning("The Syndicate is jamming the console!"))
return
if(!shuttle_port && !SSshuttle.getShuttle(shuttleId))
to_chat(user,"<span class='warning'>Warning: Shuttle connection severed!</span>")
to_chat(user, span_warning("Warning: Shuttle connection severed!"))
return
return ..()
/obj/machinery/computer/camera_advanced/shuttle_docker/GrantActions(mob/living/user)
if(jumpto_ports.len)
jump_action = new /datum/action/innate/camera_jump/shuttle_docker
..()
if(rotate_action)
rotate_action.target = user
rotate_action.Grant(user)
actions += rotate_action
if(place_action)
place_action.target = user
place_action.Grant(user)
actions += place_action
/obj/machinery/computer/camera_advanced/shuttle_docker/CreateEye()
shuttle_port = SSshuttle.getShuttle(shuttleId)
if(QDELETED(shuttle_port))
@@ -65,14 +83,13 @@
var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj
the_eye.setDir(shuttle_port.dir)
var/turf/origin = locate(shuttle_port.x + x_offset, shuttle_port.y + y_offset, shuttle_port.z)
for(var/V in shuttle_port.shuttle_areas)
var/area/A = V
for(var/turf/T in A)
if(T.z != origin.z)
for(var/area/shuttle_area as anything in shuttle_port.shuttle_areas)
for(var/turf/shuttle_turf as anything in shuttle_area)
if(shuttle_turf.z != origin.z)
continue
var/image/I = image('icons/effects/alphacolors.dmi', origin, "red")
var/x_off = T.x - origin.x
var/y_off = T.y - origin.y
var/x_off = shuttle_turf.x - origin.x
var/y_off = shuttle_turf.y - origin.y
I.loc = locate(origin.x + x_off, origin.y + y_off, origin.z) //we have to set this after creating the image because it might be null, and images created in nullspace are immutable.
I.layer = ABOVE_NORMAL_TURF_LAYER
I.plane = 0
@@ -112,45 +129,55 @@
var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj
var/landing_clear = checkLandingSpot()
if(designate_time && (landing_clear != SHUTTLE_DOCKER_BLOCKED))
to_chat(current_user, "<span class='warning'>Targeting transit location, please wait [DisplayTimeText(designate_time)]...</span>")
to_chat(current_user, span_warning("Targeting transit location, please wait [DisplayTimeText(designate_time)]..."))
designating_target_loc = the_eye.loc
var/wait_completed = do_after(current_user, designate_time, designating_target_loc, timed_action_flags = IGNORE_HELD_ITEM, extra_checks = CALLBACK(src, TYPE_PROC_REF(/obj/machinery/computer/camera_advanced/shuttle_docker, canDesignateTarget)))
designating_target_loc = null
if(!current_user)
return
if(!wait_completed)
to_chat(current_user, "<span class='warning'>Operation aborted.</span>")
to_chat(current_user, span_warning("Operation aborted."))
return
landing_clear = checkLandingSpot()
if(landing_clear != SHUTTLE_DOCKER_LANDING_CLEAR)
switch(landing_clear)
if(SHUTTLE_DOCKER_BLOCKED)
to_chat(current_user, "<span class='warning'>Invalid transit location</span>")
to_chat(current_user, span_warning("Invalid transit location."))
if(SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT)
to_chat(current_user, "<span class='warning'>Unknown object detected in landing zone. Please designate another location.</span>")
to_chat(current_user, span_warning("Unknown object detected in landing zone. Please designate another location."))
return
///Make one use port that deleted after fly off, to don't lose info that need on to properly fly off.
if(my_port?.get_docked())
my_port.unregister()
my_port.delete_after = TRUE
my_port.shuttle_id = null
my_port.name = "Old [my_port.name]"
my_port = null
if(!my_port)
my_port = new()
my_port.unregister()
my_port.name = shuttlePortName
my_port.id = shuttlePortId
my_port.shuttle_id = shuttlePortId
my_port.height = shuttle_port.height
my_port.width = shuttle_port.width
my_port.dheight = shuttle_port.dheight
my_port.dwidth = shuttle_port.dwidth
my_port.hidden = shuttle_port.hidden
my_port.register(TRUE)
my_port.setDir(the_eye.dir)
my_port.forceMove(locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z))
if(current_user.client)
current_user.client.images -= the_eye.placed_images
QDEL_LIST(the_eye.placed_images)
LAZYCLEARLIST(the_eye.placed_images)
for(var/V in the_eye.placement_images)
var/image/I = V
for(var/image/place_spots as anything in the_eye.placement_images)
var/image/newI = image('icons/effects/alphacolors.dmi', the_eye.loc, "blue")
newI.loc = I.loc //It is highly unlikely that any landing spot including a null tile will get this far, but better safe than sorry.
newI.loc = place_spots.loc //It is highly unlikely that any landing spot including a null tile will get this far, but better safe than sorry.
newI.layer = ABOVE_OPEN_TURF_LAYER
newI.plane = 0
newI.mouse_opacity = 0
@@ -158,11 +185,11 @@
if(current_user.client)
current_user.client.images += the_eye.placed_images
to_chat(current_user, "<span class='notice'>Transit location designated</span>")
return
to_chat(current_user, span_notice("Transit location designated."))
return TRUE
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/canDesignateTarget()
if(!designating_target_loc || !current_user || (eyeobj.loc != designating_target_loc) || (stat & (NOPOWER|BROKEN)) )
if(!designating_target_loc || !current_user || (eyeobj.loc != designating_target_loc) || (machine_stat & (NOPOWER|BROKEN)) )
return FALSE
return TRUE
@@ -230,11 +257,6 @@
if(!is_type_in_typecache(turf_type, whitelist_turfs))
return SHUTTLE_DOCKER_BLOCKED
if(length(whitelist_turfs))
var/turf_type = hidden_turf_info ? hidden_turf_info[2] : T.type
if(!is_type_in_typecache(turf_type, whitelist_turfs))
return SHUTTLE_DOCKER_BLOCKED
// Checking for overlapping dock boundaries
for(var/i in 1 to overlappers.len)
var/obj/docking_port/port = overlappers[i]
@@ -251,29 +273,30 @@
return SHUTTLE_DOCKER_BLOCKED
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/update_hidden_docking_ports(list/remove_images, list/add_images)
if(!see_hidden && current_user && current_user.client)
if(!see_hidden && current_user?.client)
current_user.client.images -= remove_images
current_user.client.images += add_images
/obj/machinery/computer/camera_advanced/shuttle_docker/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
if(port && (shuttleId == initial(shuttleId) || override))
shuttleId = port.id
shuttlePortId = "[port.id]_custom"
shuttleId = port.shuttle_id
shuttlePortId = "[port.shuttle_id]_custom"
if(dock)
jumpto_ports += dock.id
add_jumpable_port(dock.shuttle_id)
return TRUE
/mob/camera/aiEye/remote/shuttle_docker
visible_icon = FALSE
use_static = USE_STATIC_NONE
var/list/placement_images = list()
var/list/placed_images = list()
use_static = FALSE
var/list/image/placement_images = list()
var/list/image/placed_images = list()
/mob/camera/aiEye/remote/shuttle_docker/Initialize(mapload, obj/machinery/computer/camera_advanced/origin)
src.origin = origin
return ..()
/mob/camera/aiEye/remote/shuttle_docker/setLoc(T)
..()
/mob/camera/aiEye/remote/shuttle_docker/setLoc(turf/destination, force_update = FALSE)
. = ..()
var/obj/machinery/computer/camera_advanced/shuttle_docker/console = origin
console.checkLandingSpot()
@@ -289,10 +312,9 @@
button_icon_state = "mech_cycle_equip_off"
/datum/action/innate/shuttledocker_rotate/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
origin.rotateLandingSpot()
@@ -302,25 +324,23 @@
button_icon_state = "mech_zoom_off"
/datum/action/innate/shuttledocker_place/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
origin.placeLandingSpot(target)
origin.placeLandingSpot(owner)
/datum/action/innate/camera_jump/shuttle_docker
name = "Jump to Location"
button_icon_state = "camera_jump"
/datum/action/innate/camera_jump/shuttle_docker/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/console = remote_eye.origin
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
var/list/L = list()
for(var/V in SSshuttle.stationary)
@@ -330,7 +350,7 @@
var/obj/docking_port/stationary/S = V
if(console.z_lock.len && !(S.z in console.z_lock))
continue
if(console.jumpto_ports[S.id])
if(console.jump_to_ports[S.shuttle_id])
L["([L.len])[S.name]"] = S
for(var/V in SSshuttle.beacons)
@@ -345,18 +365,19 @@
else
L["([L.len]) [nav_beacon.name] locked"] = null
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, 0)
var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L
if(QDELETED(src) || QDELETED(target) || !isliving(target))
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
var/selected = tgui_input_list(usr, "Choose location to jump to", "Locations", sort_list(L))
if(isnull(selected))
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
return
playsound(src, "terminal_type", 25, 0)
if(selected)
var/turf/T = get_turf(L[selected])
if(T)
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
remote_eye.setLoc(T)
to_chat(target, "<span class='notice'>Jumped to [selected]</span>")
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
C.clear_fullscreen("flash", 3)
else
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
if(QDELETED(src) || QDELETED(owner) || !isliving(owner))
return
playsound(src, "terminal_type", 25, FALSE)
var/turf/T = get_turf(L[selected])
if(isnull(T))
return
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE)
remote_eye.setLoc(T)
to_chat(owner, span_notice("Jumped to [selected]."))
owner.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
owner.clear_fullscreen("flash", 3)
+1 -1
View File
@@ -388,7 +388,7 @@ All ShuttleMove procs go here
. = ..()
/obj/docking_port/stationary/public_mining_dock/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
id = "mining_public" //It will not move with the base, but will become enabled as a docking point.
shuttle_id = "mining_public" //It will not move with the base, but will become enabled as a docking point.
/obj/effect/abstract/proximity_checker/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
//timer so it only happens once
+30 -30
View File
@@ -15,7 +15,7 @@
/// This will be used in numerous other places like the console,
/// stationary ports and whatnot to tell them your ship's mobile
/// port can be used in these places, or the docking port is compatible, etc.
var/id
var/shuttle_id
/// Possible destinations
var/port_destinations
///Common standard is for this to point -away- from the dockingport door, ie towards the ship
@@ -171,7 +171,7 @@
/obj/docking_port/proc/getDockedId()
var/obj/docking_port/P = get_docked()
if(P)
return P.id
return P.shuttle_id
// Say that A in the absolute (rectangular) bounds of this shuttle or no.
/obj/docking_port/proc/is_in_shuttle_bounds(atom/A)
@@ -199,28 +199,28 @@
/obj/docking_port/stationary/register(replace = FALSE)
. = ..()
if(!id)
id = "dock"
if(!shuttle_id)
shuttle_id = "dock"
else
port_destinations = id
port_destinations = shuttle_id
if(!name)
name = "dock"
// how?
// It registers the initial shuttle (no changes)
// and if another one comes in with the same name (id) it adds the count on it
var/counter = SSshuttle.assoc_stationary[id]
var/counter = SSshuttle.assoc_stationary[shuttle_id]
if(!replace || !counter)
if(counter)
counter++
SSshuttle.assoc_stationary[id] = counter
id = "[id]_[counter]"
SSshuttle.assoc_stationary[shuttle_id] = counter
shuttle_id = "[shuttle_id]_[counter]"
name = "[name] [counter]"
else
SSshuttle.assoc_stationary[id] = 1
SSshuttle.assoc_stationary[shuttle_id] = 1
if(!port_destinations)
port_destinations = id
port_destinations = shuttle_id
SSshuttle.stationary += src
@@ -301,7 +301,7 @@
/obj/docking_port/stationary/picked/whiteship
name = "Deep Space"
id = "whiteship_away"
shuttle_id = "whiteship_away"
dheight = 0
dir = 2
dwidth = 11
@@ -316,14 +316,14 @@
/obj/docking_port/stationary/picked/Initialize(mapload)
. = ..()
if(!LAZYLEN(shuttlekeys))
WARNING("Random docking port [id] loaded with no shuttle keys")
WARNING("Random docking port [shuttle_id] loaded with no shuttle keys")
return
var/selectedid = pick(shuttlekeys)
roundstart_template = SSmapping.shuttle_templates[selectedid]
/obj/docking_port/stationary/picked/whiteship
name = "Deep Space"
id = "whiteship_away"
shuttle_id = "whiteship_away"
dheight = 0
dir = 2
dwidth = 11
@@ -382,23 +382,23 @@
/obj/docking_port/mobile/register(replace = FALSE)
. = ..()
if(!id)
id = "shuttle"
if(!shuttle_id)
shuttle_id = "shuttle"
if(!name)
name = "shuttle"
var/counter = SSshuttle.assoc_mobile[id]
var/counter = SSshuttle.assoc_mobile[shuttle_id]
if(!replace || !counter)
if(counter)
counter++
SSshuttle.assoc_mobile[id] = counter
id = "[id]_[counter]"
SSshuttle.assoc_mobile[shuttle_id] = counter
shuttle_id = "[shuttle_id]_[counter]"
name = "[name] [counter]"
//Re link machinery to new shuttle id
linkup()
else
SSshuttle.assoc_mobile[id] = 1
SSshuttle.assoc_mobile[shuttle_id] = 1
SSshuttle.mobile += src
@@ -419,16 +419,16 @@
/obj/docking_port/mobile/Initialize(mapload)
. = ..()
if(!id)
id = "shuttle"
if(!shuttle_id)
shuttle_id = "shuttle"
if(!name)
name = "shuttle"
var/counter = 1
var/tmp_id = id
var/tmp_id = shuttle_id
var/tmp_name = name
while(Check_id(id))
while(Check_id(shuttle_id))
counter++
id = "[tmp_id]_[counter]"
shuttle_id = "[tmp_id]_[counter]"
name = "[tmp_name] [counter]"
shuttle_areas = list()
@@ -559,14 +559,14 @@
var/obj/docking_port/stationary/S1 = assigned_transit
if(S1)
if(initiate_docking(S1) != DOCKING_SUCCESS)
WARNING("shuttle \"[id]\" could not enter transit space. Docked at [S0 ? S0.id : "null"]. Transit dock [S1 ? S1.id : "null"].")
WARNING("shuttle \"[shuttle_id]\" could not enter transit space. Docked at [S0 ? S0.shuttle_id : "null"]. Transit dock [S1 ? S1.shuttle_id : "null"].")
else if(S0)
if(S0.delete_after)
qdel(S0, TRUE)
else
previous = S0
else
WARNING("shuttle \"[id]\" could not enter transit space. S0=[S0 ? S0.id : "null"] S1=[S1 ? S1.id : "null"]")
WARNING("shuttle \"[shuttle_id]\" could not enter transit space. S0=[S0 ? S0.shuttle_id : "null"] S1=[S1 ? S1.shuttle_id : "null"]")
/obj/docking_port/mobile/proc/jumpToNullSpace()
@@ -866,11 +866,11 @@
else
dst = destination
if(dst)
. = "(transit to) [dst.name || dst.id]"
. = "(transit to) [dst.name || dst.shuttle_id]"
else
. = "(transit to) nowhere"
else if(dockedAt)
. = dockedAt.name || dockedAt.id
. = dockedAt.name || dockedAt.shuttle_id
else
. = "unknown"
@@ -880,7 +880,7 @@
for(var/place in shuttle_areas)
var/area/shuttle/shuttle_area = place
for(var/obj/machinery/computer/shuttle/S in shuttle_area)
if(S.shuttleId == id)
if(S.shuttleId == shuttle_id)
return S
return null
@@ -1011,7 +1011,7 @@
/obj/docking_port/mobile/pod/on_emergency_dock()
if(launch_status == ENDGAME_LAUNCHED)
initiate_docking(SSshuttle.getDock("[id]_away")) //Escape pods dock at centcom
initiate_docking(SSshuttle.getDock("[shuttle_id]_away")) //Escape pods dock at centcom
mode = SHUTTLE_ENDGAME
/obj/docking_port/mobile/emergency/on_emergency_dock()
@@ -184,8 +184,8 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He
var/obj/docking_port/stationary/stationary_port = new /obj/docking_port/stationary(get_turf(target))
port.callTime = 50
port.dir = NORTH //Point away from space.
port.id = "custom_[GLOB.custom_shuttle_count]"
linkedShuttleId = port.id
port.shuttle_id = "custom_[GLOB.custom_shuttle_count]"
linkedShuttleId = port.shuttle_id
port.ignitionTime = 25
port.name = "Custom Shuttle"
port.port_direction = 2
@@ -1,15 +1,13 @@
//============ Actions ============
/datum/action/innate/shuttle_creator
icon_icon = 'icons/mob/actions/actions_shuttle.dmi'
var/mob/living/C
var/mob/camera/aiEye/remote/shuttle_creation/remote_eye
var/obj/item/shuttle_creator/shuttle_creator
/datum/action/innate/shuttle_creator/Activate()
if(!target)
return TRUE
C = owner
remote_eye = C.remote_control
if(QDELETED(owner) || !isliving(owner))
return
remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_creator/internal_console = target
shuttle_creator = internal_console.owner_rsd
@@ -77,23 +75,23 @@
var/turf/T = get_turf(remote_eye)
for(var/obj/machinery/door/airlock/A in T)
if(get_area(A) != shuttle_creator.loggedOldArea)
to_chat(C, "<span class='warning'>Caution, airlock must be on the shuttle to function as a dock.</span>")
to_chat(owner, "<span class='warning'>Caution, airlock must be on the shuttle to function as a dock.</span>")
return
if(shuttle_creator.linkedShuttleId)
return
if(GLOB.custom_shuttle_count > CUSTOM_SHUTTLE_LIMIT)
to_chat(C, "<span class='warning'>Shuttle limit reached, sorry.</span>")
to_chat(owner, "<span class='warning'>Shuttle limit reached, sorry.</span>")
return
if(shuttle_creator.loggedTurfs.len > SHUTTLE_CREATOR_MAX_SIZE)
to_chat(C, "<span class='warning'>This shuttle is too large!</span>")
to_chat(owner, "<span class='warning'>This shuttle is too large!</span>")
return
if(!shuttle_creator.getNonShuttleDirection(T))
to_chat(C, "<span class='warning'>Docking port must be on an external wall, with only 1 side exposed to space.</span>")
to_chat(owner, "<span class='warning'>Docking port must be on an external wall, with only 1 side exposed to space.</span>")
return
if(!shuttle_creator.create_shuttle_area(C))
if(!shuttle_creator.create_shuttle_area(owner))
return
if(shuttle_creator.shuttle_create_docking_port(A, C))
to_chat(C, "<span class='notice'>Shuttle created!</span>")
if(shuttle_creator.shuttle_create_docking_port(A, owner))
to_chat(owner, "<span class='notice'>Shuttle created!</span>")
//Remove eye control
var/obj/machinery/computer/camera_advanced/shuttle_creator/internal_console = target
internal_console.remove_eye_control()
+1 -1
View File
@@ -48,7 +48,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
/obj/docking_port/mobile/supply
name = "supply shuttle"
id = "supply"
shuttle_id = "supply"
callTime = 600
dir = WEST
+1 -1
View File
@@ -60,7 +60,7 @@
shuttleId = "syndicate"
lock_override = CAMERA_LOCK_STATION
shuttlePortId = "syndicate_custom"
jumpto_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1)
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1)
view_range = 5.5
x_offset = -7
y_offset = -1
+2 -2
View File
@@ -24,7 +24,7 @@
shuttleId = "whiteship"
lock_override = NONE
shuttlePortId = "whiteship_custom"
jumpto_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1)
jump_to_ports = list("whiteship_away" = 1, "whiteship_home" = 1, "whiteship_z4" = 1)
view_range = 10
x_offset = -6
y_offset = -10
@@ -35,7 +35,7 @@
desc = "Used to designate a precise transit location for the Salvage Pod."
shuttleId = "whiteship_pod"
shuttlePortId = "whiteship_pod_custom"
jumpto_ports = list("whiteship_pod_home" = 1)
jump_to_ports = list("whiteship_pod_home" = 1)
view_range = 0
x_offset = -2
y_offset = 0
+2 -2
View File
@@ -21,7 +21,7 @@
if(..())
return TRUE
var/obj/machinery/bsa/full/B = locate()
if(B && !B.stat)
if(B && !B.machine_stat)
return TRUE
return FALSE
@@ -306,7 +306,7 @@
return get_turf(G.parent)
/obj/machinery/computer/bsa_control/proc/fire(mob/user)
if(cannon.stat)
if(cannon.machine_stat)
notice = "Cannon unpowered!"
return
notice = null
+1 -1
View File
@@ -80,7 +80,7 @@
var/turf/T = get_turf(patient)
var/obj/structure/table/optable/table = locate(/obj/structure/table/optable, T)
if(table?.computer && !(table.computer.stat & (NOPOWER|BROKEN)))
if(table?.computer && !(table.computer.machine_stat & (NOPOWER|BROKEN)))
advanced_surgeries |= table.computer.advanced_surgeries
if(istype(tool, /obj/item/surgical_drapes/advanced))
+2 -2
View File
@@ -50,7 +50,7 @@
. += "<span class='notice'>The status display reads: Base recharge rate at <b>[max_charge]J</b> per cycle.</span>"
/obj/machinery/mech_bay_recharge_port/process()
if(stat & NOPOWER || !recharge_console)
if(machine_stat & NOPOWER || !recharge_console)
return
if(!recharging_mech)
recharging_mech = locate(/obj/vehicle/sealed/mecha) in recharging_turf
@@ -137,7 +137,7 @@
/obj/machinery/computer/mech_bay_power_console/update_overlays()
. = ..()
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || machine_stat & (NOPOWER|BROKEN))
return
. += "recharge_comp_on"
+8 -8
View File
@@ -246,14 +246,14 @@
/obj/machinery/vending/update_appearance(updates=ALL)
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
set_light(0)
return
set_light(powered() ? MINIMUM_USEFUL_LIGHT_RANGE : 0)
/obj/machinery/vending/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
return ..()
icon_state = "[initial(icon_state)][powered() ? null : "-off"]"
@@ -264,7 +264,7 @@
. = ..()
if(!light_mask)
return
if(!(stat & BROKEN) && powered())
if(!(machine_stat & BROKEN) && powered())
. += emissive_appearance(icon, light_mask)
/obj/machinery/vending/obj_break(damage_flag)
@@ -421,7 +421,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(refill_canister && istype(I, refill_canister))
if (!panel_open)
to_chat(user, span_warning("You should probably unscrew the service panel first!"))
else if (stat & (BROKEN|NOPOWER))
else if (machine_stat & (BROKEN|NOPOWER))
to_chat(user, span_notice("[src] does not respond."))
else
//if the panel is open we attempt to refill the machine
@@ -689,7 +689,7 @@ GLOBAL_LIST_EMPTY(vending_products)
to_chat(user, span_notice("You short out the product lock on [src]."))
/obj/machinery/vending/_try_interact(mob/user)
if(seconds_electrified && !(stat & NOPOWER))
if(seconds_electrified && !(machine_stat & NOPOWER))
if(shock(user, 100))
return
@@ -918,7 +918,7 @@ GLOBAL_LIST_EMPTY(vending_products)
vend_ready = TRUE
/obj/machinery/vending/process(delta_time)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return PROCESS_KILL
if(!active)
return
@@ -943,7 +943,7 @@ GLOBAL_LIST_EMPTY(vending_products)
* * message - the message to speak
*/
/obj/machinery/vending/proc/speak(message)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
if(!message)
return
@@ -1007,7 +1007,7 @@ GLOBAL_LIST_EMPTY(vending_products)
* * prb - probability the shock happens
*/
/obj/machinery/vending/proc/shock(mob/living/user, prb)
if(!istype(user) || stat & (BROKEN|NOPOWER)) // unpowered, no shock
if(!istype(user) || machine_stat & (BROKEN|NOPOWER)) // unpowered, no shock
return FALSE
if(!prob(prb))
return FALSE