mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Make the nuclear beer keg react to the NAD. (#24637)
* Make the nuclear beer keg react to the NAD. * Made the beer keg nuke attackable again. * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Switched to addtimer per review suggestion. * Update code/modules/reagents/reagent_dispenser.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
co-authored by
Henri215
parent
b68b48e37e
commit
e1303fe0ba
@@ -279,6 +279,32 @@
|
||||
icon = 'icons/obj/nuclearbomb.dmi'
|
||||
icon_state = "nuclearbomb0"
|
||||
anchored = TRUE
|
||||
/// If TRUE, prevents the player from inserting the disk again while it is currently exploding.
|
||||
var/exploding = FALSE
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/nuke/attackby(obj/item/O, mob/user, params)
|
||||
. = ..()
|
||||
if(exploding)
|
||||
return
|
||||
if(!istype(O, /obj/item/disk/nuclear))
|
||||
return
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] inserts [O] into [src] and it begins making a loud beeping noise! Uh-oh!</span>",
|
||||
"<span class='danger'>You prime [src] with [O] and it begins making a loud beeping noise! Better run!</span>")
|
||||
playsound(src, 'sound/machines/alarm.ogg', 100, FALSE, 0)
|
||||
exploding = TRUE
|
||||
addtimer(CALLBACK(src, PROC_REF(explode)), 13 SECONDS)
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/nuke/proc/explode()
|
||||
var/datum/reagents/R = new(100)
|
||||
R.my_atom = src
|
||||
R.add_reagent("beer", 100)
|
||||
var/datum/effect_system/smoke_spread/chem/smoke = new
|
||||
smoke.set_up(R, src, TRUE)
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, TRUE, -3)
|
||||
smoke.start(3)
|
||||
qdel(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/nuke/update_overlays()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user