mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into aro-sync-05-27-2018
# Conflicts: # code/game/objects/structures/crates_lockers/closets/l3closet.dm # code/game/objects/structures/crates_lockers/closets/secure/engineering.dm # code/game/objects/structures/crates_lockers/closets/secure/medical.dm # code/game/objects/structures/crates_lockers/closets/secure/scientist.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/crates_lockers/closets/utility_closets.dm # maps/southern_cross/structures/closets/misc.dm # maps/submaps/surface_submaps/wilderness/DoomP.dmm # vorestation.dme
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
/decl/hierarchy/outfit/costume/horrorcop/post_equip(var/mob/living/carbon/human/H)
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(U.accessories.len)
|
||||
if(LAZYLEN(U.accessories))
|
||||
for(var/obj/item/clothing/accessory/A in U.accessories)
|
||||
if(istype(A, /obj/item/clothing/accessory/holster))
|
||||
var/obj/item/clothing/accessory/holster/O = A
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/decl/hierarchy/outfit/costume/cowboy/post_equip(var/mob/living/carbon/human/H)
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(U.accessories.len)
|
||||
if(LAZYLEN(U.accessories))
|
||||
for(var/obj/item/clothing/accessory/A in U.accessories)
|
||||
if(istype(A, /obj/item/clothing/accessory/holster))
|
||||
var/obj/item/clothing/accessory/holster/O = A
|
||||
|
||||
60
code/datums/wires/seedstorage.dm
Normal file
60
code/datums/wires/seedstorage.dm
Normal file
@@ -0,0 +1,60 @@
|
||||
#define SEED_WIRE_SMART 1
|
||||
#define SEED_WIRE_CONTRABAND 2
|
||||
#define SEED_WIRE_ELECTRIFY 4
|
||||
#define SEED_WIRE_LOCKDOWN 8
|
||||
|
||||
/datum/wires/seedstorage
|
||||
holder_type = /obj/machinery/seed_storage
|
||||
wire_count = 4
|
||||
random = 1
|
||||
|
||||
/datum/wires/seedstorage/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/seed_storage/V = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(V.seconds_electrified)
|
||||
if(V.shock(L, 100))
|
||||
return 0
|
||||
if(V.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/seedstorage/GetInteractWindow()
|
||||
var/obj/machinery/seed_storage/V = holder
|
||||
. += ..()
|
||||
. += "<BR>The orange light is [V.seconds_electrified ? "off" : "on"].<BR>"
|
||||
. += "The red light is [V.smart ? "off" : "blinking"].<BR>"
|
||||
. += "The green light is [(V.hacked || V.emagged) ? "on" : "off"].<BR>"
|
||||
. += "The keypad lock is [V.lockdown ? "deployed" : "retracted"].<BR>"
|
||||
|
||||
/datum/wires/seedstorage/UpdatePulsed(var/index)
|
||||
var/obj/machinery/seed_storage/V = holder
|
||||
switch(index)
|
||||
if(SEED_WIRE_SMART)
|
||||
V.smart = !V.smart
|
||||
if(SEED_WIRE_CONTRABAND)
|
||||
V.hacked = !V.hacked
|
||||
if(SEED_WIRE_ELECTRIFY)
|
||||
V.seconds_electrified = 30
|
||||
if(SEED_WIRE_LOCKDOWN)
|
||||
V.lockdown = !V.lockdown
|
||||
|
||||
/datum/wires/seedstorage/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/seed_storage/V = holder
|
||||
switch(index)
|
||||
if(SEED_WIRE_SMART)
|
||||
V.smart = 0
|
||||
if(SEED_WIRE_CONTRABAND)
|
||||
V.hacked = !mended
|
||||
if(SEED_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
V.seconds_electrified = 0
|
||||
else
|
||||
V.seconds_electrified = -1
|
||||
if(SEED_WIRE_LOCKDOWN)
|
||||
if(mended)
|
||||
V.lockdown = 1
|
||||
V.req_access = list()
|
||||
V.req_one_access = list()
|
||||
else
|
||||
V.req_access = initial(V.req_access)
|
||||
V.req_one_access = initial(V.req_one_access)
|
||||
Reference in New Issue
Block a user