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 17:53:51 +01:00
committed by GitHub
parent cbc45c1336
commit 004d7d10b7
29 changed files with 77 additions and 84 deletions
+3
View File
@@ -59,3 +59,6 @@
if(!istype(loc, /obj/item/assembly_holder))
activate()
add_fingerprint(user)
/obj/item/assembly/igniter/get_heat()
return 2000
@@ -372,7 +372,7 @@
new /obj/effect/hotspot(get_turf(target))
/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
if(is_hot(I) && !active)
if(I.get_heat() && !active)
active = TRUE
var/turf/bombturf = get_turf(src)
var/area/bombarea = get_area(bombturf)
@@ -98,7 +98,7 @@
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/attackby(obj/item/W)
..()
if(is_hot(W))
if(W.get_heat())
fire_act()
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/attack_hand(mob/user, pickupfireoverride = TRUE)
+1 -1
View File
@@ -137,7 +137,7 @@
to_chat(user, "<span class='italics'>You add a rod to [src].")
var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16)
underlays += U
if(is_hot(W))
if(W.get_heat())
lighter = user.ckey
user.create_log(MISC_LOG, "lit a bonfire", src)
StartBurning()
@@ -761,6 +761,6 @@
if(resistance_flags & ON_FIRE)
return
if(is_hot(P))
if(P.get_heat())
visible_message("<span class='danger'>[src] bursts into flames!</span>")
fire_act()
+1 -1
View File
@@ -460,7 +460,7 @@
to_chat(user, "<span class='notice'>You stamp the paper with your rubber stamp.</span>")
playsound(user, 'sound/items/handling/standard_stamp.ogg', 50, vary = TRUE)
if(is_hot(P))
if(P.get_heat())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_themselves()]!</span>", \
"<span class='userdanger'>You miss the paper and accidentally light yourself on fire!</span>")
+2 -2
View File
@@ -53,7 +53,7 @@
to_chat(user, "<span class='notice'>You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>")
user.unEquip(W)
W.loc = src
else if(is_hot(W))
else if(W.get_heat())
burnpaper(W, user)
else if(istype(W, /obj/item/paper_bundle))
user.unEquip(W)
@@ -85,7 +85,7 @@
user.visible_message("<span class='[class]'>[user] holds [heating_object] up to [src], it looks like [user.p_theyre()] trying to burn it!</span>", "<span class='[class]'>You hold [heating_object] up to [src], burning it slowly.</span>")
if(!do_after(user, 2 SECONDS, target = src) || !is_hot(heating_object))
if(!do_after(user, 2 SECONDS, target = src) || !heating_object.get_heat())
return
user.visible_message("<span class='[class]'>[user] burns right through [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
"<span class='[class]'>You burn right through [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
+1 -1
View File
@@ -70,7 +70,7 @@
internal_paper.attackby(P, user) //spoofed attack to update internal paper.
update_icon()
else if(is_hot(P))
else if(P.get_heat())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_themselves()]!</span>", \
"<span class='userdanger'>You miss [src] and accidentally light yourself on fire!</span>")
+1 -1
View File
@@ -214,7 +214,7 @@
/obj/item/ticket_machine_ticket/attackby(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode
..()
if(is_hot(P))
if(P.get_heat())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_themselves()]!</span>", \
"<span class='userdanger'>You miss the paper and accidentally light yourself on fire!</span>")
@@ -190,6 +190,9 @@
/obj/item/gun/energy/plasmacutter/update_overlays()
return list()
/obj/item/gun/energy/plasmacutter/get_heat()
return 3800
/obj/item/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"