mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Mountable frame bugfixes and minor refactor (#13076)
* initial * bit of code cleanup / refactoring * review changes * CRLF to LF * GLOB stuff * travis did not like that Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
This commit is contained in:
co-authored by
SteelSlayer
parent
74d0e6523b
commit
9ea748b130
@@ -46,16 +46,15 @@
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
|
||||
..()
|
||||
/obj/item/radio/intercom/New(turf/loc, direction, building = 3)
|
||||
. = ..()
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
if(direction)
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(28, -28, 28, -28)
|
||||
b_stat=1
|
||||
on = 0
|
||||
GLOB.global_intercoms.Add(src)
|
||||
@@ -204,7 +203,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
if(!buildstage)
|
||||
if(buildstage != 0)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 3))
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
mount_reqs = list("simfloor", "nospace")
|
||||
|
||||
/obj/item/mounted/frame/firealarm/do_build(turf/on_wall, mob/user)
|
||||
new /obj/machinery/firealarm(get_turf(src), get_dir(on_wall, user), 1)
|
||||
new /obj/machinery/firealarm(get_turf(src), get_dir(user, on_wall), 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
var/opened = 0
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
|
||||
/obj/structure/extinguisher_cabinet/New(turf/loc, direction = null)
|
||||
..()
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
|
||||
if(direction)
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(28, -28, 30, -30)
|
||||
switch(extinguishertype)
|
||||
if(NO_EXTINGUISHER)
|
||||
return
|
||||
@@ -165,9 +165,8 @@
|
||||
else
|
||||
icon_state = "extinguisher_empty"
|
||||
|
||||
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
|
||||
/obj/structure/extinguisher_cabinet/empty
|
||||
extinguishertype = NO_EXTINGUISHER
|
||||
..()
|
||||
|
||||
#undef NO_EXTINGUISHER
|
||||
#undef NORMAL_EXTINGUISHER
|
||||
|
||||
Reference in New Issue
Block a user