mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 17:11:22 +00:00
Small map, and sprite fixes. Welder fixes (#3887)
Fixed fire alarm in virology #3875 Fixed random pixel on glasses #3872 Fixed welder issue #3888. Plus explored further issue with welder, fixing it. Small logic optimization. Fixed firelocker icon not being updated with welded overlay, even so they have been welded Welding interaction with closets was reworked, almost all secure closets except for detective's, barternder's now work with welding same way as closets/crates. Coffins, and wooden closets of any kind can no longer be welded shut. Clean up of some code using src as reference, and :
This commit is contained in:
committed by
Erki
parent
e721c801ce
commit
88267a1a6a
@@ -23,9 +23,9 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/open()
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
return 0
|
||||
if(!src.can_open())
|
||||
if(!can_open())
|
||||
return 0
|
||||
|
||||
if(rigged && locate(/obj/item/device/radio/electropack) in src)
|
||||
@@ -36,7 +36,7 @@
|
||||
if(usr.stunned)
|
||||
return 2
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.forceMove(get_turf(src))
|
||||
|
||||
@@ -51,17 +51,17 @@
|
||||
M.visible_message(span("danger","\The [M.name] tumbles out of the [src]!"))
|
||||
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
opened = 1
|
||||
pass_flags = 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/close()
|
||||
if(!src.opened)
|
||||
if(!opened)
|
||||
return 0
|
||||
if(!src.can_close())
|
||||
if(!can_close())
|
||||
return 0
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
var/itemcount = 0
|
||||
for(var/obj/O in get_turf(src))
|
||||
if(itemcount >= storage_capacity)
|
||||
@@ -76,7 +76,7 @@
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
src.opened = 0
|
||||
opened = 0
|
||||
pass_flags = PASSTABLE//Crates can only slide under tables when closed
|
||||
return 1
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
if (health <= 0)
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
A.forceMove(loc)
|
||||
if (prob(50) && severity > 1)//Higher chance of breaking contents
|
||||
A.ex_act(severity-1)
|
||||
else
|
||||
@@ -286,13 +286,13 @@
|
||||
return !locked
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/togglelock(mob/user as mob)
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
user << "<span class='notice'>Close the crate first.</span>"
|
||||
return
|
||||
if(src.broken)
|
||||
if(broken)
|
||||
user << "<span class='warning'>The crate appears to be broken.</span>"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
if(allowed(user))
|
||||
set_locked(!locked, user)
|
||||
return 1
|
||||
else
|
||||
@@ -317,17 +317,17 @@
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
src.togglelock(usr)
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
if(locked)
|
||||
return src.togglelock(user)
|
||||
return togglelock(user)
|
||||
else
|
||||
return src.toggle(user)
|
||||
return toggle(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
|
||||
@@ -335,7 +335,7 @@
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
emag_act(INFINITY, user)
|
||||
if(!opened)
|
||||
src.togglelock(user)
|
||||
togglelock(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -345,9 +345,9 @@
|
||||
add_overlay(emag)
|
||||
add_overlay(sparks)
|
||||
CUT_OVERLAY_IN(sparks, 6)
|
||||
playsound(src.loc, "sparks", 60, 1)
|
||||
src.locked = 0
|
||||
src.broken = 1
|
||||
playsound(loc, "sparks", 60, 1)
|
||||
locked = 0
|
||||
broken = 1
|
||||
user << "<span class='notice'>You unlock \the [src].</span>"
|
||||
return 1
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
O.emp_act(severity)
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
src.locked = 1
|
||||
locked = 1
|
||||
cut_overlays()
|
||||
add_overlay(redlight)
|
||||
else
|
||||
@@ -364,14 +364,14 @@
|
||||
add_overlay(emag)
|
||||
add_overlay(sparks)
|
||||
CUT_OVERLAY_IN(sparks, 6)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
src.locked = 0
|
||||
playsound(loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
locked = 0
|
||||
if(!opened && prob(20/severity))
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_station_access())
|
||||
req_access = list()
|
||||
req_access += pick(get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/plastic
|
||||
@@ -569,7 +569,7 @@
|
||||
. = ..()
|
||||
if (.)//we can hold up to one large item
|
||||
var/found = 0
|
||||
for(var/obj/structure/S in src.loc)
|
||||
for(var/obj/structure/S in loc)
|
||||
if(S == src)
|
||||
continue
|
||||
if(!S.anchored)
|
||||
@@ -577,7 +577,7 @@
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
for(var/obj/machinery/M in loc)
|
||||
if(!M.anchored)
|
||||
M.forceMove(src)
|
||||
break
|
||||
@@ -598,7 +598,7 @@
|
||||
. = ..()
|
||||
if (.)//we can hold up to one large item
|
||||
var/found = 0
|
||||
for(var/obj/structure/S in src.loc)
|
||||
for(var/obj/structure/S in loc)
|
||||
if(S == src)
|
||||
continue
|
||||
if(!S.anchored)
|
||||
@@ -606,7 +606,7 @@
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
for(var/obj/machinery/M in loc)
|
||||
if(!M.anchored)
|
||||
M.forceMove(src)
|
||||
break
|
||||
@@ -675,8 +675,8 @@
|
||||
quantity = _quantity
|
||||
|
||||
spawntypes = list(
|
||||
"1" = STOCK_RARE_PROB * rarity,
|
||||
"2" = STOCK_UNCOMMON_PROB * rarity,
|
||||
"1" = STOCK_RARE_PROB * rarity,
|
||||
"2" = STOCK_UNCOMMON_PROB * rarity,
|
||||
"3" = (100 - ((STOCK_RARE_PROB * rarity) + (STOCK_UNCOMMON_PROB * rarity)))
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user