mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Convert most of /obj/machinery to use Initialize rather than New (#17845)
* Switch a bunch of /obj/machinery from /New to /Initialize This is an easy and uncontroversial batch. No globs, no late init, and stuff. * Move more machinery to Initialize This time the ones dealing with GLOB vars, as well as some simpler ones i missed previously. * More tricky New -> Initialize migrations * The last of machinery Initialize conversion * fixups * Newscaster armor fix * styling * Comment on armor handling * Move newscaster armor definition back to datum * farie82 review * kill extra .= Co-authored-by: Farie82 <farie82@users.noreply.github.com> * farie's review part 2 Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!"
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "newscaster_normal"
|
||||
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
light_range = 0
|
||||
@@ -54,17 +55,15 @@
|
||||
name = "security newscaster"
|
||||
is_security = TRUE
|
||||
|
||||
/obj/machinery/newscaster/New()
|
||||
/obj/machinery/newscaster/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
GLOB.allNewscasters += src
|
||||
unit_number = length(GLOB.allNewscasters)
|
||||
update_icon() //for any custom ones on the map...
|
||||
if(!last_views)
|
||||
last_views = list()
|
||||
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
..()
|
||||
|
||||
/obj/machinery/newscaster/Initialize(mapload)
|
||||
. = ..()
|
||||
if(is_security)
|
||||
name = "security newscaster"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user