Revert "Revert "Garbage collection, asset delivery, icon2html revolution, and…" (#15816)

This reverts commit f6d0f62622.
This commit is contained in:
Heroman3003
2024-04-22 06:29:01 +10:00
committed by GitHub
parent a2d91ee15e
commit c7b6c3e42b
251 changed files with 2361 additions and 1626 deletions
+8 -3
View File
@@ -100,15 +100,20 @@
/obj/item/shield_projector/Initialize()
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/recursive_move)
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(moved_event))
//ChompEDIT START - shields on init
if(always_on)
create_shields()
GLOB.moved_event.register(src, src, PROC_REF(moved_event))
spawn(0)
if(!QDELETED(src))
create_shields()
//ChompEDIT END
return ..()
/obj/item/shield_projector/Destroy()
destroy_shields()
STOP_PROCESSING(SSobj, src)
GLOB.moved_event.unregister(src, src, PROC_REF(moved_event))
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
return ..()
/obj/item/shield_projector/proc/moved_event()
+4 -4
View File
@@ -259,14 +259,14 @@
return
if (src.active)
user.visible_message(span_blue("\icon[src][bicon(src)] [user] deactivated the shield generator."), \
span_blue("\icon[src][bicon(src)] You deactivate the shield generator."), \
user.visible_message(span_blue("[icon2html(src,viewers(src))] [user] deactivated the shield generator."), \
span_blue("[icon2html(src,user.client)] You deactivate the shield generator."), \
"You hear heavy droning fade out.")
src.shields_down()
else
if(anchored)
user.visible_message(span_blue("\icon[src][bicon(src)] [user] activated the shield generator."), \
span_blue("\icon[src][bicon(src)] You activate the shield generator."), \
user.visible_message(span_blue("[icon2html(src,viewers(src))] [user] activated the shield generator."), \
span_blue("[icon2html(src, user.client)] You activate the shield generator."), \
"You hear heavy droning.")
src.shields_up()
else
+1 -1
View File
@@ -49,7 +49,7 @@
else if(W.has_tool_quality(TOOL_WRENCH))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message(span_blue("\icon[src][bicon(src)] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user]."))
src.visible_message(span_blue("[icon2html(src,viewers(src))] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user]."))
if(anchored)
spawn(0)
+3 -3
View File
@@ -69,7 +69,7 @@
else if(W.has_tool_quality(TOOL_WRENCH))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message(span_blue("\icon[src][bicon(src)] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user]."))
src.visible_message(span_blue("[icon2html(src,viewers(src))] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user]."))
if(active)
toggle()
@@ -242,7 +242,7 @@
covered_turfs = null
for(var/mob/M in view(5,src))
to_chat(M, "\icon[src][bicon(src)] You hear heavy droning start up.")
to_chat(M, "[icon2html(src, M.client)] You hear heavy droning start up.")
for(var/obj/effect/energy_field/E in field) // Update the icons here to ensure all the shields have been made already.
E.update_icon()
else
@@ -252,7 +252,7 @@
qdel(D)
for(var/mob/M in view(5,src))
to_chat(M, "\icon[src][bicon(src)] You hear heavy droning fade out.")
to_chat(M, "[icon2html(src, M.client)] You hear heavy droning fade out.")
/obj/machinery/shield_gen/update_icon()
if(stat & BROKEN)