mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Merge branch 'fake-master' into development
# Conflicts: # code/ATMOSPHERICS/atmospherics.dm # code/defines/procs/announce.dm # maps/aurora/aurora-3_sublevel.dmm
This commit is contained in:
@@ -45,6 +45,10 @@ Pipelines + Other Objects -> Pipe network
|
||||
if (mapload)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/atmospherics/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL // fuck it
|
||||
|
||||
/obj/machinery/atmospherics/proc/atmos_init()
|
||||
|
||||
// atmos_init() and Initialize() must be separate, as atmos_init() can be called multiple times after the machine has been initialized.
|
||||
|
||||
@@ -255,3 +255,7 @@ var/datum/controller/subsystem/garbage_collector/SSgarbage
|
||||
/client/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/image/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return list("title" = title, "message" = message)
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
|
||||
command_announcement.Announce(args["message"], args["title"])
|
||||
command_announcement.Announce(args["message"], args["title"], do_newscast=1, do_print=1)
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/abstract/announcements/fake_crew_arrival
|
||||
|
||||
@@ -7,30 +7,32 @@
|
||||
var/log = 0
|
||||
var/sound
|
||||
var/newscast = 0
|
||||
var/print = 0
|
||||
var/channel_name = "Station Announcements"
|
||||
var/announcement_type = "Announcement"
|
||||
|
||||
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
|
||||
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0, var/do_print = 0)
|
||||
sound = new_sound
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
print = do_print
|
||||
|
||||
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0, var/do_print = 0)
|
||||
..(do_log, new_sound, do_newscast, do_print)
|
||||
title = "Priority Announcement"
|
||||
announcement_type = "Priority Announcement"
|
||||
|
||||
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0, var/do_print = 0)
|
||||
..(do_log, new_sound, do_newscast, do_print)
|
||||
title = "[current_map.boss_name] Update"
|
||||
announcement_type = "[current_map.boss_name] Update"
|
||||
|
||||
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0, var/do_print = 0)
|
||||
..(do_log, new_sound, do_newscast, do_print)
|
||||
title = "Security Announcement"
|
||||
announcement_type = "Security Announcement"
|
||||
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0)
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/do_print = 0)
|
||||
if(!message)
|
||||
return
|
||||
var/message_title = new_title ? new_title : title
|
||||
@@ -43,6 +45,8 @@
|
||||
Message(message, message_title)
|
||||
if(do_newscast)
|
||||
NewsCast(message, message_title)
|
||||
if(do_print)
|
||||
post_comm_message(message_title, message)
|
||||
Sound(message_sound)
|
||||
Log(message, message_title)
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
|
||||
return
|
||||
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1)
|
||||
|
||||
if("No")
|
||||
if(!reporttitle || !reportbody || !ability_pay(user, price))
|
||||
|
||||
@@ -384,5 +384,5 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if(!message)
|
||||
return
|
||||
|
||||
command_announcement.Announce("[message]", title, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
command_announcement.Announce("[message]", title, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1);
|
||||
qdel(src)
|
||||
@@ -29,7 +29,7 @@
|
||||
if (opened) // if closed, any item at the crate's loc is put in the contents
|
||||
return
|
||||
var/obj/I
|
||||
for(I in src.loc)
|
||||
for(I in loc)
|
||||
if (!istype(I, /obj/item) && !istype(I, /obj/random))
|
||||
continue
|
||||
if (I.density || I.anchored || I == src)
|
||||
@@ -37,7 +37,7 @@
|
||||
I.forceMove(src)
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
var/content_size = 0
|
||||
for(I in src.contents)
|
||||
for(I in contents)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
if(content_size > storage_capacity-5)
|
||||
storage_capacity = content_size + 5
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
if(..(user, 1) && !opened)
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
for(var/obj/item/I in contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
if(!content_size)
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/obj/structure/closet/proc/stored_weight()
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
for(var/obj/item/I in contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
return content_size
|
||||
@@ -79,7 +79,7 @@
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(src.welded)
|
||||
if(welded)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -92,36 +92,36 @@
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
AD.forceMove(src.loc)
|
||||
AD.forceMove(loc)
|
||||
|
||||
for(var/obj/I in src)
|
||||
I.forceMove(src.loc)
|
||||
I.forceMove(loc)
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.forceMove(src.loc)
|
||||
M.forceMove(loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
return 0
|
||||
|
||||
if(!src.can_open())
|
||||
if(!can_open())
|
||||
return 0
|
||||
|
||||
src.dump_contents()
|
||||
dump_contents()
|
||||
|
||||
src.icon_state = src.icon_opened
|
||||
src.opened = 1
|
||||
playsound(src.loc, open_sound, 15, 1, -3)
|
||||
icon_state = icon_opened
|
||||
opened = 1
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
density = 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!src.opened)
|
||||
if(!opened)
|
||||
return 0
|
||||
if(!src.can_close())
|
||||
if(!can_close())
|
||||
return 0
|
||||
|
||||
var/stored_units = 0
|
||||
@@ -133,17 +133,17 @@
|
||||
if(store_mobs)
|
||||
stored_units += store_mobs(stored_units)
|
||||
|
||||
src.icon_state = src.icon_closed
|
||||
src.opened = 0
|
||||
icon_state = icon_closed
|
||||
opened = 0
|
||||
|
||||
playsound(src.loc, close_sound, 25, 0, -3)
|
||||
playsound(loc, close_sound, 25, 0, -3)
|
||||
density = 1
|
||||
return 1
|
||||
|
||||
//Cham Projector Exception
|
||||
/obj/structure/closet/proc/store_misc(var/stored_units)
|
||||
var/added_units = 0
|
||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||
for(var/obj/effect/dummy/chameleon/AD in loc)
|
||||
if((stored_units + added_units) > storage_capacity)
|
||||
break
|
||||
AD.forceMove(src)
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
/obj/structure/closet/proc/store_items(var/stored_units)
|
||||
var/added_units = 0
|
||||
for(var/obj/item/I in src.loc)
|
||||
for(var/obj/item/I in loc)
|
||||
var/item_size = Ceiling(I.w_class / 2)
|
||||
if(stored_units + added_units + item_size > storage_capacity)
|
||||
continue
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/obj/structure/closet/proc/store_mobs(var/stored_units)
|
||||
var/added_units = 0
|
||||
for(var/mob/living/M in src.loc)
|
||||
for(var/mob/living/M in loc)
|
||||
if(M.buckled || M.pinned.len)
|
||||
continue
|
||||
if(stored_units + added_units + M.mob_size > storage_capacity)
|
||||
@@ -176,7 +176,7 @@
|
||||
return added_units
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
if(!(src.opened ? src.close() : src.open()))
|
||||
if(!(opened ? close() : open()))
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
return
|
||||
update_icon()
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
if (health <= 0)
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
A.forceMove(loc)
|
||||
A.ex_act(severity + 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A in src)
|
||||
A.forceMove(src.loc)
|
||||
A.forceMove(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
@@ -214,35 +214,35 @@
|
||||
damage(proj_damage)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
return 0
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins cutting [src] apart.</span>",
|
||||
"<span class='notice'>You begin cutting [src] apart.</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_open)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
if(WT.isOn())
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins cutting [src] apart.</span>",
|
||||
"<span class='notice'>You begin cutting [src] apart.</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_open)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
else
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[src] has been cut apart by [user] with [WT].</span>",
|
||||
"<span class='notice'>You cut apart [src] with [WT].</span>"
|
||||
)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
new /obj/item/stack/material/steel(loc)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[src] has been cut apart by [user] with [WT].</span>",
|
||||
"<span class='notice'>You cut apart [src] with [WT].</span>"
|
||||
)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
|
||||
var/obj/item/weapon/storage/laundry_basket/LB = W
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -258,33 +258,33 @@
|
||||
return
|
||||
usr.drop_item()
|
||||
if(W)
|
||||
W.forceMove(src.loc)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"<span class='notice'>You begin welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_closed)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
if(!WT.isOn())
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"<span class='notice'>You begin welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_closed)))
|
||||
return
|
||||
else
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
src.welded = !src.welded
|
||||
src.update_icon()
|
||||
user.visible_message(
|
||||
"<span class='warning'>[src] has been [welded ? "welded shut" : "unwelded"] by [user].</span>",
|
||||
"<span class='notice'>You weld [src] [!welded ? "open" : "shut"].</span>"
|
||||
)
|
||||
welded = !welded
|
||||
update_icon()
|
||||
user.visible_message(
|
||||
"<span class='warning'>[src] has been [welded ? "welded shut" : "unwelded"] by [user].</span>",
|
||||
"<span class='notice'>You weld [src] [!welded ? "open" : "shut"].</span>"
|
||||
)
|
||||
else
|
||||
attack_hand(user)
|
||||
else
|
||||
src.attack_hand(user)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -306,14 +306,14 @@
|
||||
return
|
||||
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(!src.opened)
|
||||
if(!opened)
|
||||
return
|
||||
if(istype(O, /obj/structure/closet))
|
||||
return
|
||||
step_towards(O, src.loc)
|
||||
step_towards(O, loc)
|
||||
if(user != O)
|
||||
user.show_viewers("<span class='danger'>[user] stuffs [O] into [src]!</span>")
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_ai(mob/user)
|
||||
@@ -321,20 +321,20 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user as mob)
|
||||
if(user.stat || !isturf(src.loc))
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
|
||||
if(!src.open())
|
||||
if(!open())
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
return src.toggle(user)
|
||||
add_fingerprint(user)
|
||||
return toggle(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(!src.toggle())
|
||||
add_fingerprint(user)
|
||||
if(!toggle())
|
||||
usr << "<span class='notice'>It won't budge!</span>"
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
@@ -346,8 +346,8 @@
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
src.toggle(usr)
|
||||
add_fingerprint(usr)
|
||||
toggle(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
breakout = 1
|
||||
for(var/i in 1 to time) //minutes * 6 * 5seconds * 2
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
animate_shake()
|
||||
|
||||
if (bar)
|
||||
@@ -436,7 +436,7 @@
|
||||
breakout = 0
|
||||
escapee << "<span class='warning'>You successfully break out!</span>"
|
||||
visible_message("<span class='danger'>\the [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
qdel(bar)
|
||||
|
||||
@@ -5,6 +5,25 @@
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
|
||||
/obj/structure/closet/coffin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
return 0
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
if(!dropsafety(W))
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
|
||||
@@ -12,6 +12,25 @@
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/cabinet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
return 0
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
if(!dropsafety(W))
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
|
||||
@@ -22,6 +22,30 @@
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(large)
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
|
||||
else if(isrobot(user))
|
||||
return
|
||||
else if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(!opened)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
spark(src, 5)
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
else
|
||||
togglelock(user)//Attempt to lock locker if closed
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_opened = "base"
|
||||
anchored = 1
|
||||
canbemoved = 1
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/Initialize()
|
||||
..()
|
||||
@@ -44,8 +44,10 @@
|
||||
else if (shottas > 0)
|
||||
shottas--
|
||||
add_overlay("projectile[i]")
|
||||
|
||||
|
||||
add_overlay("door")
|
||||
if(welded)
|
||||
add_overlay(welded_overlay_state)
|
||||
|
||||
if(broken)
|
||||
add_overlay("broken")
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
welded_overlay_state = "welded_wallcloset"
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
fill()
|
||||
@@ -185,15 +186,3 @@
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
@@ -45,46 +45,46 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (src.opened)
|
||||
if (opened)
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if (W) W.forceMove(src.loc)
|
||||
if (W) W.forceMove(loc)
|
||||
else if(W.GetID())
|
||||
var/obj/item/weapon/card/id/I = W.GetID()
|
||||
|
||||
if(src.broken)
|
||||
if(broken)
|
||||
user << "<span class='warning'>It appears to be broken.</span>"
|
||||
return
|
||||
if(!I || !I.registered_name) return
|
||||
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked) src.icon_state = src.icon_locked
|
||||
else src.icon_state = src.icon_closed
|
||||
locked = !( locked )
|
||||
if(locked) icon_state = icon_locked
|
||||
else icon_state = icon_closed
|
||||
|
||||
if(!src.registered_name)
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
if(!registered_name)
|
||||
registered_name = I.registered_name
|
||||
desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
|
||||
W:spark_system.queue()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
else
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
|
||||
if(!broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
icon_state = icon_broken
|
||||
if(visual_feedback)
|
||||
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
|
||||
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/verb/reset()
|
||||
@@ -94,17 +94,17 @@
|
||||
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
if (src.locked || !src.registered_name)
|
||||
add_fingerprint(usr)
|
||||
if (locked || !registered_name)
|
||||
usr << "<span class='warning'>You need to unlock it first.</span>"
|
||||
else if (src.broken)
|
||||
else if (broken)
|
||||
usr << "<span class='warning'>It appears to be broken.</span>"
|
||||
else
|
||||
if (src.opened)
|
||||
if(!src.close())
|
||||
if (opened)
|
||||
if(!close())
|
||||
return
|
||||
src.locked = 1
|
||||
src.icon_state = src.icon_locked
|
||||
src.registered_name = null
|
||||
src.desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
locked = 1
|
||||
icon_state = icon_locked
|
||||
registered_name = null
|
||||
desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
return
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
if(src.locked)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/close()
|
||||
if(..())
|
||||
if(broken)
|
||||
icon_state = src.icon_off
|
||||
icon_state = icon_off
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -38,28 +38,28 @@
|
||||
O.emp_act(severity)
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
src.locked = !src.locked
|
||||
src.update_icon()
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20/severity) && !opened)
|
||||
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/secure_closet/proc/togglelock(mob/user as mob)
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
user << "<span class='notice'>Close the locker first.</span>"
|
||||
return
|
||||
if(src.broken)
|
||||
if(broken)
|
||||
user << "<span class='warning'>The locker appears to be broken.</span>"
|
||||
return
|
||||
if(user.loc == src)
|
||||
user << "<span class='notice'>You can't reach the lock from inside.</span>"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.blinded )))
|
||||
O << "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>"
|
||||
@@ -68,25 +68,42 @@
|
||||
user << "<span class='notice'>Access Denied</span>"
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(src.large)
|
||||
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
if(large)
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
|
||||
if(isrobot(user))
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins cutting [src] apart.</span>",
|
||||
"<span class='notice'>You begin cutting [src] apart.</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_open)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
else
|
||||
new /obj/item/stack/material/steel(loc)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[src] has been cut apart by [user] with [WT].</span>",
|
||||
"<span class='notice'>You cut apart [src] with [WT].</span>"
|
||||
)
|
||||
qdel(src)
|
||||
return
|
||||
else if(isrobot(user))
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
else if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
W:spark_system.queue()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
W.forceMove(loc)
|
||||
else if(isscrewdriver(W) && canbemoved)
|
||||
if(screwed)
|
||||
user << "<span class='notice'>You start to unscrew the locker from the floor...</span>"
|
||||
@@ -105,22 +122,50 @@
|
||||
else if(iswrench(W) && canbemoved)
|
||||
if(wrenched && !screwed)
|
||||
user << "<span class='notice'>You start to unfasten the bolts holding the locker in place...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 15 SECONDS, act_target = src))
|
||||
user << "<span class='notice'>You unfasten the locker's bolts!</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
wrenched = 0
|
||||
anchored = 0
|
||||
else if(!wrenched)
|
||||
user << "<span class='notice'>You start to fasten the bolts holding the locker in place...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 15, act_target = src))
|
||||
user << "<span class='notice'>You fasten the locker's bolts!</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
wrenched = 1
|
||||
anchored = 1
|
||||
else if(!src.opened)
|
||||
togglelock(user)//Attempt to lock locker if closed
|
||||
else if(!opened)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
spark(src, 5)
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user] begins welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"<span class='notice'>You begin welding [src] [welded ? "open" : "shut"].</span>",
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_closed)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
welded = !welded
|
||||
update_icon()
|
||||
user.visible_message(
|
||||
"<span class='warning'>[src] has been [welded ? "welded shut" : "unwelded"] by [user].</span>",
|
||||
"<span class='notice'>You weld [src] [!welded ? "open" : "shut"].</span>"
|
||||
)
|
||||
else
|
||||
togglelock(user)
|
||||
else
|
||||
togglelock(user)//Attempt to lock locker if closed
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
|
||||
if(!broken)
|
||||
@@ -139,11 +184,11 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.locked)
|
||||
src.togglelock(user)
|
||||
add_fingerprint(user)
|
||||
if(locked)
|
||||
togglelock(user)
|
||||
else
|
||||
src.toggle(user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
@@ -154,10 +199,10 @@
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
src.togglelock(usr)
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
else if(istype(usr, /mob/living/silicon/robot) && Adjacent(usr))
|
||||
src.togglelock(usr)
|
||||
togglelock(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
@@ -169,7 +214,7 @@
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
add_overlay(welded_overlay_state)
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
@@ -326,17 +326,30 @@
|
||||
new /obj/item/weapon/gun/projectile/revolver/detective(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
/obj/structure/closet/secure_closet/detective/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(large)
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
icon_state = icon_closed
|
||||
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
|
||||
else if(isrobot(user))
|
||||
return
|
||||
else if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(!opened)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
spark(src, 5)
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
else
|
||||
icon_state = icon_opened
|
||||
togglelock(user)//Attempt to lock locker if closed
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/csi
|
||||
name = "forensic technician's locker"
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
|
||||
L.drop_r_hand()
|
||||
L.drop_l_hand()
|
||||
|
||||
L.forceMove(src)
|
||||
L.sdisabilities |= MUTE
|
||||
health = L.health + 300 //stoning damaged mobs will result in easier to shatter statues
|
||||
@@ -83,14 +86,14 @@
|
||||
/obj/structure/closet/statue/dump_contents()
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.forceMove(src.loc)
|
||||
O.forceMove(loc)
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
if(imprisoned)
|
||||
if(imprisoned.key)
|
||||
M.key = imprisoned.key
|
||||
|
||||
M.forceMove(src.loc)
|
||||
M.forceMove(loc)
|
||||
M.sdisabilities &= ~MUTE
|
||||
M.frozen = FALSE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
|
||||
@@ -80,11 +80,7 @@
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -214,9 +210,3 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
icon_state = "emerg"
|
||||
|
||||
/obj/structure/closet/walllocker/emerglocker/toggle(mob/user as mob)
|
||||
src.attack_hand(user)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/walllocker/emerglocker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -36,7 +36,7 @@
|
||||
if(amount)
|
||||
usr << "<spawn class='notice'>You take out some items from \the [src]."
|
||||
for(var/path in spawnitems)
|
||||
new path(src.loc)
|
||||
new path(loc)
|
||||
amount--
|
||||
return
|
||||
|
||||
|
||||
@@ -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)))
|
||||
)
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
display_name = "toe-less jackboots"
|
||||
path = /obj/item/clothing/shoes/jackboots/unathi
|
||||
sort_category = "Xenowear"
|
||||
whitelisted = list("Vaurca Worker", "Unathi", "Tajara", "Zhan-Khazan Tajara", "M'sai Tajara")
|
||||
whitelisted = list("Vaurca Worker", "Vaurca Warrior", "Unathi", "Tajara", "Zhan-Khazan Tajara", "M'sai Tajara")
|
||||
|
||||
/datum/gear/shoes/workboots_toeless
|
||||
display_name = "toeless workboots"
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
|
||||
/datum/event/ccia_general_notice/announce()
|
||||
if(announce)
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1);
|
||||
|
||||
@@ -22,45 +22,51 @@
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat
|
||||
|
||||
dat += text("<h1>Stacking unit console</h1><hr><table>")
|
||||
|
||||
for(var/stacktype in machine.stack_storage)
|
||||
if(machine.stack_storage[stacktype] > 0)
|
||||
dat += "<tr><td width = 150><b>[capitalize(stacktype)]:</b></td><td width = 30>[machine.stack_storage[stacktype]]</td><td width = 50><A href='?src=\ref[src];release_stack=[stacktype]'>\[release\]</a></td></tr>"
|
||||
dat += "</table><hr>"
|
||||
dat += text("<br>Stacking: [machine.stack_amt] <A href='?src=\ref[src];change_stack=1'>\[change\]</a><br><br>")
|
||||
|
||||
user << browse("[dat]", "window=console_stacking_machine")
|
||||
onclose(user, "console_stacking_machine")
|
||||
/obj/machinery/mineral/stacking_unit_console/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = default_state)
|
||||
var/list/data = list(
|
||||
"stack_amt" = machine.stack_amt,
|
||||
"contents" = list()
|
||||
)
|
||||
for (var/stacktype in machine.stack_storage)
|
||||
if (machine.stack_storage[stacktype] > 0)
|
||||
data["contents"] += list(list(
|
||||
"path" = stacktype,
|
||||
"name" = machine.stack_paths[stacktype],
|
||||
"amount" = machine.stack_storage[stacktype]
|
||||
))
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "stacking_machine.tmpl", "Stacking Machine", 500, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
return
|
||||
|
||||
if(href_list["change_stack"])
|
||||
var/choice = input("What would you like to set the stack amount to?") as null|anything in list(1,5,10,20,50)
|
||||
if(!choice) return
|
||||
if(!choice)
|
||||
return TRUE
|
||||
machine.stack_amt = choice
|
||||
return TRUE
|
||||
|
||||
if(href_list["release_stack"])
|
||||
if(machine.stack_storage[href_list["release_stack"]] > 0)
|
||||
var/stacktype = machine.stack_paths[href_list["release_stack"]]
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(machine.output))
|
||||
S.amount = machine.stack_storage[href_list["release_stack"]]
|
||||
machine.stack_storage[href_list["release_stack"]] = 0
|
||||
var/stacktype = text2path(href_list["release_stack"])
|
||||
if (!stacktype || !machine.stack_paths[stacktype])
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
if(machine.stack_storage[stacktype] > 0)
|
||||
var/obj/item/stack/material/S = new stacktype(get_turf(machine.output))
|
||||
S.amount = machine.stack_storage[stacktype]
|
||||
machine.stack_storage[stacktype] = 0
|
||||
return TRUE
|
||||
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
|
||||
/**********************Mineral stacking unit**************************/
|
||||
|
||||
@@ -74,8 +80,8 @@
|
||||
var/obj/machinery/mineral/stacking_unit_console/console
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/list/stack_storage[0]
|
||||
var/list/stack_paths[0]
|
||||
var/list/stack_storage = list()
|
||||
var/list/stack_paths = list()
|
||||
var/stack_amt = 50; // Amount to stack before releassing
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
@@ -84,25 +90,20 @@
|
||||
/obj/machinery/mineral/stacking_machine/Initialize()
|
||||
. = ..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
qdel(S)
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/material/glass
|
||||
stack_storage[DEFAULT_WALL_MATERIAL] = 0
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/material/steel
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/material/plasteel
|
||||
for(var/stacktype in subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg))
|
||||
var/obj/item/stack/S = stacktype
|
||||
stack_storage[stacktype] = 0
|
||||
stack_paths[stacktype] = capitalize(initial(S.name))
|
||||
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(input)
|
||||
break
|
||||
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(output)
|
||||
break
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/machinery_process()
|
||||
..()
|
||||
@@ -110,27 +111,19 @@
|
||||
log_debug("Stacking machine tried to process, but no console has linked itself to it.")
|
||||
qdel(src)
|
||||
return
|
||||
if (src.output && src.input)
|
||||
|
||||
if (output && input)
|
||||
var/turf/T = get_turf(input)
|
||||
for(var/obj/item/O in T.contents)
|
||||
for(var/obj/item/O in T)
|
||||
if(!O) return
|
||||
if(istype(O,/obj/item/stack))
|
||||
if(!isnull(stack_storage[O.name]))
|
||||
stack_storage[O.name]++
|
||||
O.loc = null
|
||||
else
|
||||
O.loc = output.loc
|
||||
if(istype(O, /obj/item/stack) && stack_storage[O.type] != null)
|
||||
stack_storage[O.type]++
|
||||
qdel(O)
|
||||
else
|
||||
O.loc = output.loc
|
||||
O.forceMove(output.loc)
|
||||
|
||||
//Output amounts that are past stack_amt.
|
||||
for(var/sheet in stack_storage)
|
||||
if(stack_storage[sheet] >= stack_amt)
|
||||
var/stacktype = stack_paths[sheet]
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(output))
|
||||
S.amount = stack_amt
|
||||
new sheet(get_turf(output), stack_amt)
|
||||
stack_storage[sheet] -= stack_amt
|
||||
|
||||
console.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
autohiss_exempt = list(
|
||||
LANGUAGE_SIIK_MAAS,
|
||||
LANGUAGE_SIIK_TAJR,
|
||||
LANGUAGE_SIGN_TAJARA
|
||||
LANGUAGE_SIGN_TAJARA,
|
||||
LANGUAGE_YA_SSA
|
||||
)
|
||||
|
||||
/datum/species/bug
|
||||
|
||||
@@ -254,6 +254,8 @@ There are several things that need to be remembered:
|
||||
base_icon = chest.get_icon()
|
||||
|
||||
for(var/obj/item/organ/external/part in organs)
|
||||
if(isnull(part) || part.is_stump())
|
||||
continue
|
||||
var/icon/temp = part.get_icon(skeleton)//The color comes from this function
|
||||
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
|
||||
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
plastic.add_charge(1000)
|
||||
|
||||
|
||||
else if(istype(M,/mob/living/simple_animal/lizard) || istype(M,/mob/living/simple_animal/mouse))
|
||||
else if(istype(M,/mob/living/simple_animal/lizard) || (istype(M,/mob/living/simple_animal/mouse) && M.mob_size <= 2))
|
||||
src.loc.visible_message("<span class='danger'>[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.</span>","<span class='danger'>It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.</span>")
|
||||
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
qdel(M)
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
/obj/machinery/power/tesla_coil/attackby(obj/item/W, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
@@ -37,8 +38,6 @@
|
||||
connect_to_network()
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(user, W)
|
||||
|
||||
/obj/machinery/power/tesla_coil/tesla_act(var/power)
|
||||
if(anchored)
|
||||
being_shocked = 1
|
||||
@@ -62,14 +61,16 @@
|
||||
density = 1
|
||||
|
||||
component_types = list(
|
||||
///obj/item/weapon/circuitboard/grounding_rod,
|
||||
/obj/item/weapon/circuitboard/grounding_rod,
|
||||
/obj/item/weapon/stock_parts/capacitor
|
||||
)
|
||||
|
||||
|
||||
/obj/machinery/power/grounding_rod/attackby(obj/item/W, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
@@ -79,7 +80,6 @@
|
||||
anchored = !anchored
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(user, W)
|
||||
|
||||
/obj/machinery/power/grounding_rod/tesla_act(var/power)
|
||||
flick("coil_shock_1", src)
|
||||
@@ -87,5 +87,15 @@
|
||||
/obj/item/weapon/circuitboard/tesla_coil
|
||||
name = "tesla coil circuitry"
|
||||
desc = "The circuitboard for a tesla coil."
|
||||
build_path = "/obj/machinery/power/tesla_coil"
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
|
||||
req_components = list("/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
board_type = "machine"
|
||||
|
||||
/obj/item/weapon/circuitboard/grounding_rod
|
||||
name = "grounding rod circuitry"
|
||||
desc = "The circuitboard for a grounding rod."
|
||||
build_path = "/obj/machinery/power/grounding_rod"
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
|
||||
req_components = list("/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
board_type = "machine"
|
||||
@@ -56,6 +56,40 @@
|
||||
-->
|
||||
<div class="commit sansserif">
|
||||
|
||||
<h2 class="date">08 December 2017</h2>
|
||||
<h3 class="author">Lohikar updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="experiment">Made some changes to how the server deletes pipes; explosions will probably be laggier, but there should no longer be crushing lag 5 minutes later.</li>
|
||||
</ul>
|
||||
<h3 class="author">Santa updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Merry Christmas NSS Aurora!</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="date">30 November 2017</h2>
|
||||
<h3 class="author">Alberyk updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Fix warrior vaurca being unable to spawn with toeless jackboots.</li>
|
||||
<li class="bugfix">Lowered the Nar'sie's summoning sound.</li>
|
||||
<li class="bugfix">Fixed autohiss applying while speaking Ya'ssa.</li>
|
||||
</ul>
|
||||
<h3 class="author">Lohikar updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Stacking units no longer illegally produce unlicenced cyborg glass synthesizers.</li>
|
||||
<li class="rscadd">The stacking machine's UI has been made prettier for no particular reason.</li>
|
||||
</ul>
|
||||
<h3 class="author">MoondancerPony updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Removed diona nymph mind control. (Players will no longer aggressively grab themselves when trying to grab a diona nymph.)</li>
|
||||
</ul>
|
||||
<h3 class="author">PoZe updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Fixed crates, and lockers interaction with shut welder</li>
|
||||
<li class="tweak">Added ability to weld and cut apart any secure or wall lockers or secure wall lockers.</li>
|
||||
<li class="bugfix">Tesla's Engine APC is no longer affected by power down even</li>
|
||||
<li class="tweak">Tesla coils and grounding rods can now be fully constructed from machine assembly</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="date">20 November 2017</h2>
|
||||
<h3 class="author">Alberyk updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
|
||||
@@ -4824,3 +4824,27 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
|
||||
Lohikar:
|
||||
- bugfix: Fixed an issue where walking through doors with lights could screw up
|
||||
directional lighting.
|
||||
2017-11-30:
|
||||
Alberyk:
|
||||
- bugfix: Fix warrior vaurca being unable to spawn with toeless jackboots.
|
||||
- bugfix: Lowered the Nar'sie's summoning sound.
|
||||
- bugfix: Fixed autohiss applying while speaking Ya'ssa.
|
||||
Lohikar:
|
||||
- bugfix: Stacking units no longer illegally produce unlicenced cyborg glass synthesizers.
|
||||
- rscadd: The stacking machine's UI has been made prettier for no particular reason.
|
||||
MoondancerPony:
|
||||
- bugfix: Removed diona nymph mind control. (Players will no longer aggressively
|
||||
grab themselves when trying to grab a diona nymph.)
|
||||
PoZe:
|
||||
- bugfix: Fixed crates, and lockers interaction with shut welder
|
||||
- tweak: Added ability to weld and cut apart any secure or wall lockers or secure
|
||||
wall lockers.
|
||||
- bugfix: Tesla's Engine APC is no longer affected by power down even
|
||||
- tweak: Tesla coils and grounding rods can now be fully constructed from machine
|
||||
assembly
|
||||
2017-12-08:
|
||||
Lohikar:
|
||||
- experiment: Made some changes to how the server deletes pipes; explosions will
|
||||
probably be laggier, but there should no longer be crushing lag 5 minutes later.
|
||||
Santa:
|
||||
- rscadd: Merry Christmas NSS Aurora!
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
author: MoondancerPony
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "Removed diona nymph mind control. (Players will no longer aggressively grab themselves when trying to grab a diona nymph.)"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.4 KiB |
+9029
-9017
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
<div class='itemGroup'>
|
||||
{{for data.contents}}
|
||||
<div class='item'>
|
||||
<div class='itemLabelNarrow'>{{:value.name}}</div>
|
||||
<div class='itemContentSmall'>{{:value.amount}}</div>
|
||||
<div class='floatRight'>{{:helper.link('Eject', 'eject', {'release_stack' : value.path})}}</div>
|
||||
</div>
|
||||
{{empty}}
|
||||
No materials loaded.
|
||||
{{/for}}
|
||||
</div>
|
||||
<div class='statusDisplay'>
|
||||
<div class='line'>
|
||||
<div class='statusLabel'>Stacking:</div>
|
||||
<div class='statusValue'>{{:data.stack_amt}}</div>
|
||||
<div class='floatRight'>{{:helper.link('Change', 'wrench', {'change_stack' : 1})}}</div>
|
||||
</div>
|
||||
</div>
|
||||
Binary file not shown.
Reference in New Issue
Block a user