Files
Bubberstation/code/game/objects/items/courtroom.dm
T
tralezabandGitHub 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

43 lines
1.3 KiB
Plaintext

// Contains:
// Gavel Hammer
// Gavel Block
/obj/item/gavelhammer
name = "gavel hammer"
desc = "Order, order! No bombs in my courthouse."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "gavelhammer"
force = 5
throwforce = 6
w_class = WEIGHT_CLASS_SMALL
attack_verb_continuous = list("bashes", "batters", "judges", "whacks")
attack_verb_simple = list("bash", "batter", "judge", "whack")
resistance_flags = FLAMMABLE
/obj/item/gavelhammer/Initialize(mapload)
. = ..()
AddElement(/datum/element/kneejerk)
/obj/item/gavelhammer/suicide_act(mob/user)
user.visible_message(span_suicide("[user] has sentenced [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
playsound(loc, 'sound/items/gavel.ogg', 50, TRUE, -1)
return (BRUTELOSS)
/obj/item/gavelblock
name = "gavel block"
desc = "Smack it with a gavel hammer when the assistants get rowdy."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "gavelblock"
force = 2
throwforce = 2
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
/obj/item/gavelblock/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/gavelhammer))
playsound(loc, 'sound/items/gavel.ogg', 100, TRUE)
user.visible_message(span_warning("[user] strikes [src] with [I]."))
user.changeNext_move(CLICK_CD_MELEE)
else
return ..()