Merge remote-tracking branch 'upstream/master' into just-defibrillator-things

This commit is contained in:
E-MonaRhg
2021-07-09 00:03:38 +02:00
632 changed files with 15669 additions and 22631 deletions
+8 -4
View File
@@ -105,6 +105,8 @@
var/global/list/status_overlays_environ
var/indestructible = 0 // If set, prevents aliens from destroying it
var/keep_preset_name = 0
/// Was this APC built instead of already existing? Used for malfhack to keep borgs from building apcs in space
var/constructed = FALSE
var/report_power_alarm = TRUE
@@ -171,14 +173,13 @@
operating = 0
name = "[area.name] APC"
stat |= MAINT
constructed = TRUE
update_icon()
addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/Destroy()
SStgui.close_uis(wires)
GLOB.apcs -= src
if(malfai && operating)
malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000)
area.power_light = 0
area.power_equip = 0
area.power_environ = 0
@@ -731,11 +732,11 @@
if(usr == user && opened && !issilicon(user))
if(cell)
user.visible_message("<span class='warning'>[user.name] removes [cell] from [src]!", "<span class='notice'>You remove [cell].</span>")
user.put_in_hands(cell)
cell.add_fingerprint(user)
cell.update_icon()
cell = null
user.visible_message("<span class='warning'>[user.name] removes [cell] from [src]!", "You remove the [cell].</span>")
charging = FALSE
update_icon()
return
@@ -973,6 +974,9 @@
if(malf.malfhacking)
to_chat(malf, "You are already hacking an APC.")
return
if(constructed)
to_chat(malf, "<span class='warning'>This APC was only recently constructed, and is not fully linked to station systems. Hacking it would be pointless.</span>")
return
to_chat(malf, "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process.")
malf.malfhack = src
malf.malfhacking = addtimer(CALLBACK(malf, /mob/living/silicon/ai/.proc/malfhacked, src), 600, TIMER_STOPPABLE)
@@ -1050,7 +1054,7 @@
smoke.start()
do_sparks(3, 1, src)
for(var/mob/M in viewers(src))
M.show_message("<span class='danger'>The [name] suddenly lets out a blast of smoke and some sparks!", 3, "<span class='danger'>You hear sizzling electronics.</span>", 2)
M.show_message("<span class='danger'>[src] suddenly lets out a blast of smoke and some sparks!", 3, "<span class='danger'>You hear sizzling electronics.</span>", 2)
/obj/machinery/power/apc/surplus()
+10 -6
View File
@@ -498,9 +498,9 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/suicide_act(mob/user)
if(locate(/obj/structure/chair/stool) in user.loc)
user.visible_message("<span class='suicide'>[user] is making a noose with the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.visible_message("<span class='suicide'>[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
else
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return OXYLOSS
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, paramcolor = null)
@@ -596,7 +596,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/examine(mob/user)
. = ..()
if(in_range(user, src))
if(in_range(user, src) && !is_cyborg)
if(get_amount() == 1)
. += "A short piece of power cable."
else if(get_amount() == 2)
@@ -612,10 +612,10 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
// Cable merging is handled by parent proc
if(C.amount >= MAXCOIL)
if(C.get_amount() >= MAXCOIL)
to_chat(user, "The coil is as long as it will get.")
return
if( (C.amount + src.amount <= MAXCOIL) )
if((C.get_amount() + get_amount() <= MAXCOIL))
to_chat(user, "You join the cable coils together.")
return
else
@@ -861,7 +861,11 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
return color
/obj/item/stack/cable_coil/cyborg
name = "cyborg cable coil"
energy_type = /datum/robot_energy_storage/cable
is_cyborg = TRUE
/obj/item/stack/cable_coil/cyborg/update_icon()
return // icon_state should always be a full cable
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
var/cablecolor = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white")
+1 -1
View File
@@ -92,7 +92,7 @@
. += "The charge meter reads [round(percent() )]%."
/obj/item/stock_parts/cell/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is licking the electrodes of the [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
to_chat(viewers(user), "<span class='suicide'>[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return FIRELOSS
/obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params)
+1 -1
View File
@@ -578,7 +578,7 @@
if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
to_chat(user, "<span class='notice'>You remove the light [fitting]</span>")
else if(user.dna?.GetSEState(GLOB.teleblock))
else if(HAS_TRAIT(user, TRAIT_TELEKINESIS))
to_chat(user, "<span class='notice'>You telekinetically remove the light [fitting].</span>")
else
if(user.a_intent == INTENT_DISARM || user.a_intent == INTENT_GRAB)
+4 -2
View File
@@ -249,6 +249,8 @@
/obj/machinery/power/port_gen/pacman/proc/overheat()
overheating++
if(overheating > 60)
message_admins("Pacman overheated at [ADMIN_JMP(loc)]. Last touched by: [fingerprintslast ? "[fingerprintslast]" : "*null*"].")
log_game("Pacman overheated at [COORD(loc)]. Last touched by: [fingerprintslast ? "[fingerprintslast]" : "*null*"].")
explode()
/obj/machinery/power/port_gen/pacman/explode()
@@ -277,9 +279,9 @@
var/obj/item/stack/addstack = O
var/amount = min((max_sheets - sheets), addstack.amount)
if(amount < 1)
to_chat(user, "<span class='notice'>The [src.name] is full!</span>")
to_chat(user, "<span class='notice'>[src] is full!</span>")
return
to_chat(user, "<span class='notice'>You add [amount] sheet\s to the [src.name].</span>")
to_chat(user, "<span class='notice'>You add [amount] sheet\s to [src].</span>")
sheets += amount
addstack.use(amount)
SStgui.update_uis(src)
@@ -7,6 +7,7 @@
density = 0
move_resist = INFINITY
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
flags_2 = RAD_NO_CONTAMINATE_2
use_power = NO_POWER_USE
light_range = 4
layer = OBJ_LAYER + 0.1
@@ -108,7 +109,7 @@
if(prob(20))
user.Stun(2)
user.take_overall_damage(0, shock_damage)
user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</span>", \
user.visible_message("<span class='danger'>[user.name] was shocked by [src]!</span>", \
"<span class='userdanger'>Energy pulse detected, system damaged!</span>", \
"<span class='italics'>You hear an electrical crack.</span>")
+1 -1
View File
@@ -197,7 +197,7 @@
else
state = EMITTER_NEEDS_WRENCH
anchored = FALSE
user.visible_message("<span class='notice'>[user] unsecures [src] reinforcing bolts from the floor.</span>",
user.visible_message("<span class='notice'>[user] unsecures [src]'s reinforcing bolts from the floor.</span>",
"<span class='notice'>You undo the external reinforcing bolts.</span>",
"<span class='notice'>You hear a ratchet.</span>")
playsound(src, I.usesound, I.tool_volume, TRUE)
@@ -64,11 +64,11 @@ field_generator power level display
if(state == FG_WELDED)
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
if(active >= FG_CHARGING)
to_chat(user, "<span class='warning'>You are unable to turn off the [name] once it is online!</span>")
to_chat(user, "<span class='warning'>You are unable to turn off [src] once it is online!</span>")
return 1
else
user.visible_message("[user.name] turns on the [name].", \
"<span class='notice'>You turn on the [name].</span>", \
user.visible_message("[user] turns on [src].", \
"<span class='notice'>You turn on [src].</span>", \
"<span class='italics'>You hear heavy droning.</span>")
turn_on()
investigate_log("<font color='green'>activated</font> by [user.key].","singulo")
@@ -100,7 +100,7 @@ field_generator power level display
"<span class='italics'>You hear ratchet.</span>")
anchored = 0
if(FG_WELDED)
to_chat(user, "<span class='warning'>The [name] needs to be unwelded from the floor!</span>")
to_chat(user, "<span class='warning'>[src] needs to be unwelded from the floor!</span>")
else
return ..()
@@ -188,7 +188,7 @@ field_generator power level display
check_power_level()
return 1
else
visible_message("<span class='danger'>The [name] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
visible_message("<span class='danger'>[src] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
turn_off()
investigate_log("ran out of power and <font color='red'>deactivated</font>","singulo")
power = 0
+4 -4
View File
@@ -26,13 +26,13 @@
anchored = !anchored
playsound(src.loc, W.usesound, 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
user.visible_message("[user.name] secures [src] to the floor.", \
"You secure [src] to the floor.", \
"You hear a ratchet")
src.add_hiddenprint(user)
else
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
"You unsecure the [src.name] from the floor.", \
user.visible_message("[user.name] unsecures [src] from the floor.", \
"You unsecure [src.name] from the floor.", \
"You hear a ratchet")
return
return ..()
@@ -201,7 +201,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/obj/item/stack/cable_coil/C = W
if(C.use(1))
playsound(loc, C.usesound, 50, 1)
user.visible_message("[user.name] adds wires to the [name].", \
user.visible_message("[user] adds wires to [src].", \
"You add some wires.")
construction_state = ACCELERATOR_WIRED
update_icon()
@@ -302,7 +302,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/obj/item/stack/cable_coil/C = W
if(C.use(1))
playsound(loc, C.usesound, 50, 1)
user.visible_message("[user.name] adds wires to the [name].", \
user.visible_message("[user] adds wires to [src].", \
"You add some wires.")
construction_state = ACCELERATOR_WIRED
update_icon()
@@ -412,12 +412,12 @@
if(istype(H.glasses, /obj/item/clothing/glasses/meson))
var/obj/item/clothing/glasses/meson/MS = H.glasses
if(MS.vision_flags == SEE_TURFS)
to_chat(H, "<span class='notice'>You look directly into the [src.name], good thing you had your protective eyewear on!</span>")
to_chat(H, "<span class='notice'>You look directly into [src], good thing you had your protective eyewear on!</span>")
return
M.apply_effect(3, STUN)
M.visible_message("<span class='danger'>[M] stares blankly at the [src.name]!</span>", \
"<span class='userdanger'>You look directly into the [src.name] and feel weak.</span>")
M.visible_message("<span class='danger'>[M] stares blankly at [src]!</span>", \
"<span class='userdanger'>You look directly into [src] and feel weak.</span>")
return
+4 -4
View File
@@ -149,12 +149,12 @@
return
var/obj/item/stack/cable_coil/C = I
if(C.amount < 10)
if(C.get_amount() < 10)
to_chat(user, "<span class='alert'>You need more wires.</span>")
return
if(user.loc == loc)
to_chat(user, "<span class='warning'>You must not be on the same tile as the [src].</span>")
to_chat(user, "<span class='warning'>You must not be on the same tile as [src].</span>")
return
//Direction the terminal will face to
@@ -173,7 +173,7 @@
to_chat(user, "<span class='warning'>You must remove the floor plating first.</span>")
return
to_chat(user, "<span class='notice'>You start adding cable to the [src].</span>")
to_chat(user, "<span class='notice'>You start adding cable to [src].</span>")
playsound(loc, C.usesound, 50, 1)
if(do_after(user, 50, target = src))
@@ -429,7 +429,7 @@
if(is_station_level(src.z))
if(prob(1)) //explosion
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>The [src.name] is making strange noises!</span>", 3, "<span class='warning'>You hear sizzling electronics.</span>", 2)
M.show_message("<span class='warning'>[src] is making strange noises!</span>", 3, "<span class='warning'>You hear sizzling electronics.</span>", 2)
sleep(10*pick(4,5,6,7,10,14))
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(3, 0, src.loc)
+6 -6
View File
@@ -101,7 +101,7 @@
overlays += image('icons/obj/power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
else
overlays += image('icons/obj/power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)
src.dir = angle2dir(adir)
set_angle(adir)
return
//calculates the fraction of the sunlight that the panel recieves
@@ -220,7 +220,7 @@
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/S = W
if(S.use(2))
glass_type = W.type
glass_type = S.merge_type
playsound(loc, S.usesound, 50, 1)
user.visible_message("[user] places the glass on the solar assembly.", "<span class='notice'>You place the glass on the solar assembly.</span>")
if(tracker)
@@ -298,7 +298,7 @@
if(autostart)
search_for_connected()
if(connected_tracker && track == TRACKER_AUTO)
connected_tracker.set_angle(SSsun.angle)
connected_tracker.modify_angle(SSsun.angle)
set_panels(cdir)
/obj/machinery/power/solar_control/Destroy()
@@ -338,7 +338,7 @@
return
if(track == TRACKER_AUTO && connected_tracker) // auto-tracking
connected_tracker.set_angle(SSsun.angle)
connected_tracker.modify_angle(SSsun.angle)
set_panels(cdir)
updateDialog()
@@ -410,7 +410,7 @@
track = text2num(params["track"])
if(track == TRACKER_AUTO)
if(connected_tracker)
connected_tracker.set_angle(SSsun.angle)
connected_tracker.modify_angle(SSsun.angle)
set_panels(cdir)
else if(track == TRACKER_TIMED)
targetdir = cdir
@@ -420,7 +420,7 @@
if("refresh")
search_for_connected()
if(connected_tracker && track == TRACKER_AUTO)
connected_tracker.set_angle(SSsun.angle)
connected_tracker.modify_angle(SSsun.angle)
set_panels(cdir)
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
+1
View File
@@ -216,6 +216,7 @@
/obj/machinery/gateway,
/obj/structure/lattice,
/obj/structure/grille,
/obj/structure/cable,
/obj/machinery/the_singularitygen/tesla,
/obj/machinery/constructable_frame/machine_frame))
+1 -1
View File
@@ -50,7 +50,7 @@
update_icon()
//updates the tracker icon and the facing angle for the control computer
/obj/machinery/power/tracker/proc/set_angle(angle)
/obj/machinery/power/tracker/proc/modify_angle(angle)
sun_angle = angle
//set icon dir to show sun illumination