Refactors is_hot and fixes some issues from the beaker lighting PR (#22964)

* Idk what I'm doing

* The is_hot refactor

* Fixes that I forgot to push before making the PR

* Update code/game/objects/items.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Contra review

* TODO: Find out why this isn't working

* Removes the signal stuff for now, this works

* Fixes it all

* Add new signal

* Update code/_onclick/item_attack.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Contra reivew

* Ayyy it works

* Merge master

* Forgot this one

* Update code/game/machinery/doors/airlock_types.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/objects/structures/mineral_doors.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/turfs/simulated/floor/mineral_floors.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/turfs/simulated/walls_mineral.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2023-12-11 16:53:51 +00:00
committed by GitHub
co-authored by Burzah Contrabang
parent cbc45c1336
commit 004d7d10b7
29 changed files with 77 additions and 84 deletions
+9
View File
@@ -47,12 +47,19 @@ LIGHTERS ARE IN LIGHTERS.DM
reagents.set_reacting(FALSE) // so it doesn't react until you light it
if(list_reagents)
reagents.add_reagent_list(list_reagents)
RegisterSignal(src, COMSIG_ITEM_BEING_ATTACKED, PROC_REF(can_light))
/obj/item/clothing/mask/cigarette/Destroy()
QDEL_NULL(reagents)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/mask/cigarette/proc/can_light(obj/item/cigarette, obj/item/lighting_item)
SIGNAL_HANDLER
if(lighting_item.get_heat())
light()
return COMPONENT_CANCEL_ATTACK_CHAIN
/obj/item/clothing/mask/cigarette/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(isdrone(user))
C.stored_comms["wood"] += 1
@@ -250,6 +257,8 @@ LIGHTERS ARE IN LIGHTERS.DM
STOP_PROCESSING(SSobj, src)
qdel(src)
/obj/item/clothing/mask/cigarette/get_heat()
return lit * 1000
/obj/item/clothing/mask/cigarette/menthol
list_reagents = list("nicotine" = 40, "menthol" = 20)
@@ -125,6 +125,9 @@
item_state = "[initial(item_state)][lit ? "-on" : ""]"
return ..()
/obj/item/lighter/get_heat()
return lit * 1500
// Zippo lighters
/obj/item/lighter/zippo
name = "zippo lighter"
@@ -304,6 +307,9 @@
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
return mask_item
/obj/item/match/get_heat()
return lit * 1000
/obj/item/match/firebrand
name = "firebrand"
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
@@ -85,6 +85,9 @@
add_fingerprint(user)
return
/obj/item/melee/energy/get_heat()
return active * 3500
/obj/item/melee/energy/axe
name = "energy axe"
desc = "An energised battle axe."