Files
Bubberstation/code/modules/assembly/shock_kit.dm
tralezab 6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## About The Pull Request

stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it

for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## Regex used:

procs without args, not even regex

`/Initialize()`

procs with args
`\/Initialize\((?!mapload)((.)*\w)?`

cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
2021-09-24 17:56:50 -04:00

44 lines
1.2 KiB
Plaintext

/obj/item/assembly/shock_kit
name = "electrohelmet assembly"
desc = "This appears to be made from both an electropack and a helmet."
icon = 'icons/obj/assemblies.dmi'
icon_state = "shock_kit"
var/obj/item/clothing/head/helmet/helmet_part = null
var/obj/item/electropack/electropack_part = null
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
/obj/item/assembly/shock_kit/Destroy()
QDEL_NULL(helmet_part)
QDEL_NULL(electropack_part)
return ..()
/obj/item/assembly/shock_kit/Initialize(mapload)
. = ..()
if(!helmet_part)
helmet_part = new(src)
helmet_part.master = src
if(!electropack_part)
electropack_part = new(src)
electropack_part.master = src
/obj/item/assembly/shock_kit/wrench_act(mob/living/user, obj/item/I)
..()
to_chat(user, span_notice("You disassemble [src]."))
if(helmet_part)
helmet_part.forceMove(drop_location())
helmet_part.master = null
helmet_part = null
if(electropack_part)
electropack_part.forceMove(drop_location())
electropack_part.master = null
electropack_part = null
qdel(src)
return TRUE
/obj/item/assembly/shock_kit/attack_self(mob/user)
helmet_part.attack_self(user)
electropack_part.attack_self(user)
add_fingerprint(user)
return