Merge remote-tracking branch 'upstream/master' into I-guess-I-port-stuff-now-huh

This commit is contained in:
Qwertytoforty
2021-07-23 10:35:54 -04:00
358 changed files with 25104 additions and 40448 deletions
+6 -2
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
@@ -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)
+6
View File
@@ -354,3 +354,9 @@
desc = "A standard ninja-suit power cell."
maxcharge = 10000
materials = list(MAT_GLASS = 60)
/obj/item/stock_parts/cell/bsg
name = "\improper B.S.G power cell"
desc = "A high capacity, slow charging cell for the B.S.G."
maxcharge = 40000
chargerate = 2600 // about 30 seconds to charge with a default recharger
+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)
@@ -116,7 +116,7 @@
// it might mean we are stuck in a corner somewere. So move around to try to expand.
move()
if(current_size >= STAGE_TWO)
radiation_pulse(src, min(5000, (energy * 4.5) + 1000), RAD_DISTANCE_COEFFICIENT * 0.5)
radiation_pulse(src, min(5000, (energy * 4.5) + 1000), RAD_DISTANCE_COEFFICIENT * 0.1)
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
event()
eat()
+5 -5
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
@@ -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 -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