mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Allow you to construct and deconstruct fire extinguisher cabinet. Also minor refactor. (Credit to Tigercat2000)
This commit is contained in:
@@ -45,15 +45,16 @@
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, var/ndir = 0, var/building = 3)
|
||||
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
|
||||
..()
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
pixel_x = (ndir & 3)? 0 : (ndir == 4 ? 28 : -28)
|
||||
pixel_y = (ndir & 3)? (ndir ==1 ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
b_stat=1
|
||||
on = 0
|
||||
global_intercoms.Add(src)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/obj/item/mounted/frame/extinguisher
|
||||
name = "Extinguisher Cabinet Frame"
|
||||
desc = "Used for building extinguisher cabinet"
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "extinguisher_frame"
|
||||
mount_reqs = list("simfloor", "nospace")
|
||||
|
||||
/obj/item/mounted/frame/extinguisher/do_build(turf/on_wall, mob/user)
|
||||
new /obj/structure/extinguisher_cabinet(get_turf(src), get_dir(user, on_wall))
|
||||
qdel(src)
|
||||
@@ -90,6 +90,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
new /datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2),
|
||||
new /datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2),
|
||||
new /datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2),
|
||||
new /datum/stack_recipe("extinguisher cabinet frame", /obj/item/mounted/frame/extinguisher, 5),
|
||||
null
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user