July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+276 -276
View File
@@ -1,277 +1,277 @@
/obj/structure/AIcore
density = 1
anchored = 0
name = "\improper AI core"
icon = 'icons/mob/AI.dmi'
icon_state = "0"
obj_integrity = 500
max_integrity = 500
var/state = 0
var/datum/ai_laws/laws = new()
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/New()
..()
laws.set_laws_config()
/obj/structure/AIcore/Destroy()
if(circuit)
qdel(circuit)
circuit = null
if(brain)
qdel(brain)
brain = null
return ..()
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/wrench))
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(istype(P, /obj/item/weapon/weldingtool))
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
return
var/obj/item/weapon/weldingtool/WT = P
if(!WT.isOn())
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
return
playsound(loc, WT.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
deconstruct(TRUE)
return
else
switch(state)
if(EMPTY_CORE)
if(istype(P, /obj/item/weapon/circuitboard/aicore))
if(!user.drop_item())
return
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
update_icon()
state = CIRCUIT_CORE
circuit = P
P.forceMove(src)
return
if(CIRCUIT_CORE)
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = SCREWED_CORE
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
circuit = null
return
if(SCREWED_CORE)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = CIRCUIT_CORE
update_icon()
return
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = CABLED_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
return
if(CABLED_CORE)
if(istype(P, /obj/item/weapon/wirecutters))
if(brain)
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
else
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = SCREWED_CORE
update_icon()
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
return
if(istype(P, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
state = GLASS_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
return
if(istype(P, /obj/item/weapon/aiModule))
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
return
var/obj/item/weapon/aiModule/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/device/mmi) && !brain)
var/obj/item/device/mmi/M = P
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(!M.brainmob.client)
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
return
if((config) && (!config.allow_ai) || jobban_isbanned(M.brainmob, "AI"))
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
return
if(!M.brainmob.mind)
to_chat(user, "<span class='warning'>This [M.name] is mindless!</span>")
return
if(!user.drop_item())
return
M.forceMove(src)
brain = M
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.forceMove(loc)
brain = null
update_icon()
return
if(GLASS_CORE)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(brain)
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(brain.brainmob, TRUE)
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
/obj/structure/AIcore
density = 1
anchored = 0
name = "\improper AI core"
icon = 'icons/mob/ai.dmi'
icon_state = "0"
obj_integrity = 500
max_integrity = 500
var/state = 0
var/datum/ai_laws/laws = new()
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/New()
..()
laws.set_laws_config()
/obj/structure/AIcore/Destroy()
if(circuit)
qdel(circuit)
circuit = null
if(brain)
qdel(brain)
brain = null
return ..()
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/wrench))
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(istype(P, /obj/item/weapon/weldingtool))
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
return
var/obj/item/weapon/weldingtool/WT = P
if(!WT.isOn())
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
return
playsound(loc, WT.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
deconstruct(TRUE)
return
else
switch(state)
if(EMPTY_CORE)
if(istype(P, /obj/item/weapon/circuitboard/aicore))
if(!user.drop_item())
return
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
update_icon()
state = CIRCUIT_CORE
circuit = P
P.forceMove(src)
return
if(CIRCUIT_CORE)
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = SCREWED_CORE
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
circuit = null
return
if(SCREWED_CORE)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = CIRCUIT_CORE
update_icon()
return
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = CABLED_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
return
if(CABLED_CORE)
if(istype(P, /obj/item/weapon/wirecutters))
if(brain)
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
else
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = SCREWED_CORE
update_icon()
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
return
if(istype(P, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
state = GLASS_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
return
if(istype(P, /obj/item/weapon/aiModule))
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
return
var/obj/item/weapon/aiModule/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/device/mmi) && !brain)
var/obj/item/device/mmi/M = P
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(!M.brainmob.client)
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
return
if((config) && (!config.allow_ai) || jobban_isbanned(M.brainmob, "AI"))
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
return
if(!M.brainmob.mind)
to_chat(user, "<span class='warning'>This [M.name] is mindless!</span>")
return
if(!user.drop_item())
return
M.forceMove(src)
brain = M
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.forceMove(loc)
brain = null
update_icon()
return
if(GLASS_CORE)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(brain)
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(brain.brainmob, TRUE)
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
SSblackbox.inc("cyborg_ais_created",1)
qdel(src)
else
state = AI_READY_CORE
update_icon()
return
if(AI_READY_CORE)
if(istype(P, /obj/item/device/aicard))
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
if(CIRCUIT_CORE)
icon_state = "1"
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
icon_state = "3b"
else
icon_state = "3"
if(GLASS_CORE)
icon_state = "4"
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
if(circuit)
circuit.forceMove(loc)
circuit = null
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
/obj/structure/AIcore/deactivated
name = "inactive AI"
icon_state = "ai-empty"
anchored = 1
state = AI_READY_CORE
/obj/structure/AIcore/deactivated/New()
..()
circuit = new(src)
/*
This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
That prevents a few funky behaviors.
*/
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
/atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(istype(card))
if(card.flush)
to_chat(user, "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol.")
return 0
return 1
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.forceMove(loc) // to replace the terminal.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
/obj/item/weapon/circuitboard/aicore
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
origin_tech = "programming=3"
qdel(src)
else
state = AI_READY_CORE
update_icon()
return
if(AI_READY_CORE)
if(istype(P, /obj/item/device/aicard))
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
if(CIRCUIT_CORE)
icon_state = "1"
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
icon_state = "3b"
else
icon_state = "3"
if(GLASS_CORE)
icon_state = "4"
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
if(circuit)
circuit.forceMove(loc)
circuit = null
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
/obj/structure/AIcore/deactivated
name = "inactive AI"
icon_state = "ai-empty"
anchored = 1
state = AI_READY_CORE
/obj/structure/AIcore/deactivated/New()
..()
circuit = new(src)
/*
This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
That prevents a few funky behaviors.
*/
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
/atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(istype(card))
if(card.flush)
to_chat(user, "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol.")
return 0
return 1
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.forceMove(loc) // to replace the terminal.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
/obj/item/weapon/circuitboard/aicore
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
origin_tech = "programming=3"
+1 -1
View File
@@ -30,7 +30,7 @@
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(damage_amount)
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, 'sound/items/welder.ogg', 100, 1)
/*
* Generic alien stuff, not related to the purple lizards but still alien-like
+2 -2
View File
@@ -59,9 +59,9 @@
/obj/structure/sign/barsign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/sign/barsign/attack_ai(mob/user)
return src.attack_hand(user)
@@ -83,7 +83,7 @@
if(BRUTE)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
if(BURN)
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
if(user.a_intent != INTENT_HARM)
@@ -50,7 +50,7 @@
return
var/obj/item/assembly/shock_kit/SK = W
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
E.setDir(dir)
E.part = SK
SK.loc = E
@@ -274,7 +274,7 @@
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance))
owner.visible_message("<span class='danger'>[owner] fends off [attack_text] with [src]!</span>")
return 1
@@ -289,7 +289,7 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.health < C.maxHealth*0.5)
C.Weaken(1)
C.Knockdown(20)
smash(user)
+316 -316
View File
@@ -1,320 +1,320 @@
/*
CONTAINS:
BEDSHEETS
LINEN BINS
*/
/obj/item/weapon/bedsheet
name = "bedsheet"
desc = "A surprisingly soft linen bedsheet."
icon = 'icons/obj/bedsheets.dmi'
icon_state = "sheetwhite"
item_state = "bedsheet"
slot_flags = SLOT_NECK
layer = MOB_LAYER
throwforce = 0
throw_speed = 1
throw_range = 2
w_class = WEIGHT_CLASS_TINY
item_color = "white"
resistance_flags = FLAMMABLE
dog_fashion = /datum/dog_fashion/head/ghost
/obj/item/weapon/bedsheet/attack(mob/living/M, mob/user)
if(!attempt_initiate_surgery(src, M, user))
..()
/obj/item/weapon/bedsheet/attack_self(mob/user)
user.drop_item()
if(layer == initial(layer))
layer = ABOVE_MOB_LAYER
to_chat(user, "<span class='notice'>You cover yourself with [src].</span>")
else
layer = initial(layer)
to_chat(user, "<span class='notice'>You smooth [src] out beneath you.</span>")
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters) || I.is_sharp())
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
transfer_fingerprints_to(C)
C.add_fingerprint(user)
qdel(src)
to_chat(user, "<span class='notice'>You tear [src] up.</span>")
else
return ..()
/obj/item/weapon/bedsheet/blue
icon_state = "sheetblue"
item_color = "blue"
/obj/item/weapon/bedsheet/green
icon_state = "sheetgreen"
item_color = "green"
/*
CONTAINS:
BEDSHEETS
LINEN BINS
*/
/obj/item/weapon/bedsheet
name = "bedsheet"
desc = "A surprisingly soft linen bedsheet."
icon = 'icons/obj/bedsheets.dmi'
icon_state = "sheetwhite"
item_state = "bedsheet"
slot_flags = SLOT_NECK
layer = MOB_LAYER
throwforce = 0
throw_speed = 1
throw_range = 2
w_class = WEIGHT_CLASS_TINY
item_color = "white"
resistance_flags = FLAMMABLE
dog_fashion = /datum/dog_fashion/head/ghost
/obj/item/weapon/bedsheet/attack(mob/living/M, mob/user)
if(!attempt_initiate_surgery(src, M, user))
..()
/obj/item/weapon/bedsheet/attack_self(mob/user)
user.drop_item()
if(layer == initial(layer))
layer = ABOVE_MOB_LAYER
to_chat(user, "<span class='notice'>You cover yourself with [src].</span>")
else
layer = initial(layer)
to_chat(user, "<span class='notice'>You smooth [src] out beneath you.</span>")
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters) || I.is_sharp())
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
transfer_fingerprints_to(C)
C.add_fingerprint(user)
qdel(src)
to_chat(user, "<span class='notice'>You tear [src] up.</span>")
else
return ..()
/obj/item/weapon/bedsheet/blue
icon_state = "sheetblue"
item_color = "blue"
/obj/item/weapon/bedsheet/green
icon_state = "sheetgreen"
item_color = "green"
/obj/item/weapon/bedsheet/grey
icon_state = "sheetgrey"
item_color = "grey"
/obj/item/weapon/bedsheet/orange
icon_state = "sheetorange"
item_color = "orange"
/obj/item/weapon/bedsheet/purple
icon_state = "sheetpurple"
item_color = "purple"
/obj/item/weapon/bedsheet/patriot
name = "patriotic bedsheet"
desc = "You've never felt more free than when sleeping on this."
icon_state = "sheetUSA"
item_color = "sheetUSA"
/obj/item/weapon/bedsheet/rainbow
name = "rainbow bedsheet"
desc = "A multicolored blanket. It's actually several different sheets cut up and sewn together."
icon_state = "sheetrainbow"
item_color = "rainbow"
/obj/item/weapon/bedsheet/red
icon_state = "sheetred"
item_color = "red"
/obj/item/weapon/bedsheet/yellow
icon_state = "sheetyellow"
item_color = "yellow"
/obj/item/weapon/bedsheet/mime
name = "mime's blanket"
desc = "A very soothing striped blanket. All the noise just seems to fade out when you're under the covers in this."
icon_state = "sheetmime"
item_color = "mime"
/obj/item/weapon/bedsheet/clown
name = "clown's blanket"
desc = "A rainbow blanket with a clown mask woven in. It smells faintly of bananas."
icon_state = "sheetclown"
item_color = "clown"
/obj/item/weapon/bedsheet/captain
name = "captain's bedsheet"
desc = "It has a Nanotrasen symbol on it, and was woven with a revolutionary new kind of thread guaranteed to have 0.01% permeability for most non-chemical substances, popular among most modern captains."
icon_state = "sheetcaptain"
item_color = "captain"
/obj/item/weapon/bedsheet/rd
name = "research director's bedsheet"
desc = "It appears to have a beaker emblem, and is made out of fire-resistant material, although it probably won't protect you in the event of fires you're familiar with every day."
icon_state = "sheetrd"
item_color = "director"
// for Free Golems.
/obj/item/weapon/bedsheet/rd/royal_cape
name = "Royal Cape of the Liberator"
desc = "Majestic."
/obj/item/weapon/bedsheet/medical
name = "medical blanket"
desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station."
icon_state = "sheetmedical"
item_color = "medical"
/obj/item/weapon/bedsheet/cmo
name = "chief medical officer's bedsheet"
desc = "It's a sterilized blanket that has a cross emblem. There's some cat fur on it, likely from Runtime."
icon_state = "sheetcmo"
item_color = "cmo"
/obj/item/weapon/bedsheet/hos
name = "head of security's bedsheet"
desc = "It is decorated with a shield emblem. While crime doesn't sleep, you do, but you are still THE LAW!"
icon_state = "sheethos"
item_color = "hosred"
/obj/item/weapon/bedsheet/hop
name = "head of personnel's bedsheet"
desc = "It is decorated with a key emblem. For those rare moments when you can rest and cuddle with Ian without someone screaming for you over the radio."
icon_state = "sheethop"
item_color = "hop"
/obj/item/weapon/bedsheet/ce
name = "chief engineer's bedsheet"
desc = "It is decorated with a wrench emblem. It's highly reflective and stain resistant, so you don't need to worry about ruining it with oil."
icon_state = "sheetce"
item_color = "chief"
/obj/item/weapon/bedsheet/qm
name = "quartermaster's bedsheet"
desc = "It is decorated with a crate emblem in silver lining. It's rather tough, and just the thing to lie on after a hard day of pushing paper."
icon_state = "sheetqm"
item_color = "qm"
/obj/item/weapon/bedsheet/brown
icon_state = "sheetbrown"
item_color = "cargo"
/obj/item/weapon/bedsheet/black
icon_state = "sheetblack"
item_color = "black"
/obj/item/weapon/bedsheet/centcom
name = "\improper Centcom bedsheet"
desc = "Woven with advanced nanothread for warmth as well as being very decorated, essential for all officials."
icon_state = "sheetcentcom"
item_color = "centcom"
/obj/item/weapon/bedsheet/syndie
name = "syndicate bedsheet"
desc = "It has a syndicate emblem and it has an aura of evil."
icon_state = "sheetsyndie"
item_color = "syndie"
/obj/item/weapon/bedsheet/cult
name = "cultist's bedsheet"
desc = "You might dream of Nar'Sie if you sleep with this. It seems rather tattered and glows of an eldritch presence."
icon_state = "sheetcult"
item_color = "cult"
/obj/item/weapon/bedsheet/wiz
name = "wizard's bedsheet"
desc = "A special fabric enchanted with magic so you can have an enchanted night. It even glows!"
icon_state = "sheetwiz"
item_color = "wiz"
/obj/item/weapon/bedsheet/nanotrasen
name = "nanotrasen bedsheet"
desc = "It has the Nanotrasen logo on it and has an aura of duty."
icon_state = "sheetNT"
item_color = "nanotrasen"
/obj/item/weapon/bedsheet/ian
icon_state = "sheetian"
item_color = "ian"
/obj/item/weapon/bedsheet/random
icon_state = "sheetrainbow"
item_color = "rainbow"
name = "random bedsheet"
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
/obj/item/weapon/bedsheet/random/New()
var/obj/item/weapon/bedsheet/B = pick(subtypesof(/obj/item/weapon/bedsheet) - /obj/item/weapon/bedsheet/random)
name = initial(B.name)
desc = initial(B.desc)
icon_state = initial(B.icon_state)
item_state = initial(B.item_state)
item_color = initial(B.item_color)
/obj/structure/bedsheetbin
name = "linen bin"
desc = "It looks rather cosy."
icon = 'icons/obj/structures.dmi'
icon_state = "linenbin-full"
anchored = 1
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
var/amount = 10
var/list/sheets = list()
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine(mob/user)
..()
if(amount < 1)
to_chat(user, "There are no bed sheets in the bin.")
else if(amount == 1)
to_chat(user, "There is one bed sheet in the bin.")
else
to_chat(user, "There are [amount] bed sheets in the bin.")
/obj/structure/bedsheetbin/update_icon()
switch(amount)
if(0)
icon_state = "linenbin-empty"
if(1 to 5)
icon_state = "linenbin-half"
else
icon_state = "linenbin-full"
/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume)
if(amount)
amount = 0
update_icon()
..()
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/bedsheet))
if(!user.drop_item())
return
I.loc = src
sheets.Add(I)
amount++
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>")
return
I.loc = src
hidden = I
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
/obj/structure/bedsheetbin/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/bedsheetbin/attack_hand(mob/user)
if(user.lying)
return
if(amount >= 1)
amount--
var/obj/item/weapon/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
sheets.Remove(B)
else
B = new /obj/item/weapon/bedsheet(loc)
B.loc = user.loc
user.put_in_hands(B)
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
update_icon()
if(hidden)
hidden.loc = user.loc
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
hidden = null
add_fingerprint(user)
/obj/structure/bedsheetbin/attack_tk(mob/user)
if(amount >= 1)
amount--
var/obj/item/weapon/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
sheets.Remove(B)
else
B = new /obj/item/weapon/bedsheet(loc)
B.loc = loc
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
update_icon()
if(hidden)
hidden.loc = loc
hidden = null
add_fingerprint(user)
/obj/item/weapon/bedsheet/orange
icon_state = "sheetorange"
item_color = "orange"
/obj/item/weapon/bedsheet/purple
icon_state = "sheetpurple"
item_color = "purple"
/obj/item/weapon/bedsheet/patriot
name = "patriotic bedsheet"
desc = "You've never felt more free than when sleeping on this."
icon_state = "sheetUSA"
item_color = "sheetUSA"
/obj/item/weapon/bedsheet/rainbow
name = "rainbow bedsheet"
desc = "A multicolored blanket. It's actually several different sheets cut up and sewn together."
icon_state = "sheetrainbow"
item_color = "rainbow"
/obj/item/weapon/bedsheet/red
icon_state = "sheetred"
item_color = "red"
/obj/item/weapon/bedsheet/yellow
icon_state = "sheetyellow"
item_color = "yellow"
/obj/item/weapon/bedsheet/mime
name = "mime's blanket"
desc = "A very soothing striped blanket. All the noise just seems to fade out when you're under the covers in this."
icon_state = "sheetmime"
item_color = "mime"
/obj/item/weapon/bedsheet/clown
name = "clown's blanket"
desc = "A rainbow blanket with a clown mask woven in. It smells faintly of bananas."
icon_state = "sheetclown"
item_color = "clown"
/obj/item/weapon/bedsheet/captain
name = "captain's bedsheet"
desc = "It has a Nanotrasen symbol on it, and was woven with a revolutionary new kind of thread guaranteed to have 0.01% permeability for most non-chemical substances, popular among most modern captains."
icon_state = "sheetcaptain"
item_color = "captain"
/obj/item/weapon/bedsheet/rd
name = "research director's bedsheet"
desc = "It appears to have a beaker emblem, and is made out of fire-resistant material, although it probably won't protect you in the event of fires you're familiar with every day."
icon_state = "sheetrd"
item_color = "director"
// for Free Golems.
/obj/item/weapon/bedsheet/rd/royal_cape
name = "Royal Cape of the Liberator"
desc = "Majestic."
/obj/item/weapon/bedsheet/medical
name = "medical blanket"
desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station."
icon_state = "sheetmedical"
item_color = "medical"
/obj/item/weapon/bedsheet/cmo
name = "chief medical officer's bedsheet"
desc = "It's a sterilized blanket that has a cross emblem. There's some cat fur on it, likely from Runtime."
icon_state = "sheetcmo"
item_color = "cmo"
/obj/item/weapon/bedsheet/hos
name = "head of security's bedsheet"
desc = "It is decorated with a shield emblem. While crime doesn't sleep, you do, but you are still THE LAW!"
icon_state = "sheethos"
item_color = "hosred"
/obj/item/weapon/bedsheet/hop
name = "head of personnel's bedsheet"
desc = "It is decorated with a key emblem. For those rare moments when you can rest and cuddle with Ian without someone screaming for you over the radio."
icon_state = "sheethop"
item_color = "hop"
/obj/item/weapon/bedsheet/ce
name = "chief engineer's bedsheet"
desc = "It is decorated with a wrench emblem. It's highly reflective and stain resistant, so you don't need to worry about ruining it with oil."
icon_state = "sheetce"
item_color = "chief"
/obj/item/weapon/bedsheet/qm
name = "quartermaster's bedsheet"
desc = "It is decorated with a crate emblem in silver lining. It's rather tough, and just the thing to lie on after a hard day of pushing paper."
icon_state = "sheetqm"
item_color = "qm"
/obj/item/weapon/bedsheet/brown
icon_state = "sheetbrown"
item_color = "cargo"
/obj/item/weapon/bedsheet/black
icon_state = "sheetblack"
item_color = "black"
/obj/item/weapon/bedsheet/centcom
name = "\improper Centcom bedsheet"
desc = "Woven with advanced nanothread for warmth as well as being very decorated, essential for all officials."
icon_state = "sheetcentcom"
item_color = "centcom"
/obj/item/weapon/bedsheet/syndie
name = "syndicate bedsheet"
desc = "It has a syndicate emblem and it has an aura of evil."
icon_state = "sheetsyndie"
item_color = "syndie"
/obj/item/weapon/bedsheet/cult
name = "cultist's bedsheet"
desc = "You might dream of Nar'Sie if you sleep with this. It seems rather tattered and glows of an eldritch presence."
icon_state = "sheetcult"
item_color = "cult"
/obj/item/weapon/bedsheet/wiz
name = "wizard's bedsheet"
desc = "A special fabric enchanted with magic so you can have an enchanted night. It even glows!"
icon_state = "sheetwiz"
item_color = "wiz"
/obj/item/weapon/bedsheet/nanotrasen
name = "nanotrasen bedsheet"
desc = "It has the Nanotrasen logo on it and has an aura of duty."
icon_state = "sheetNT"
item_color = "nanotrasen"
/obj/item/weapon/bedsheet/ian
icon_state = "sheetian"
item_color = "ian"
/obj/item/weapon/bedsheet/random
icon_state = "sheetrainbow"
item_color = "rainbow"
name = "random bedsheet"
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
/obj/item/weapon/bedsheet/random/New()
var/obj/item/weapon/bedsheet/B = pick(subtypesof(/obj/item/weapon/bedsheet) - /obj/item/weapon/bedsheet/random)
name = initial(B.name)
desc = initial(B.desc)
icon_state = initial(B.icon_state)
item_state = initial(B.item_state)
item_color = initial(B.item_color)
/obj/structure/bedsheetbin
name = "linen bin"
desc = "It looks rather cosy."
icon = 'icons/obj/structures.dmi'
icon_state = "linenbin-full"
anchored = 1
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
var/amount = 10
var/list/sheets = list()
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine(mob/user)
..()
if(amount < 1)
to_chat(user, "There are no bed sheets in the bin.")
else if(amount == 1)
to_chat(user, "There is one bed sheet in the bin.")
else
to_chat(user, "There are [amount] bed sheets in the bin.")
/obj/structure/bedsheetbin/update_icon()
switch(amount)
if(0)
icon_state = "linenbin-empty"
if(1 to 5)
icon_state = "linenbin-half"
else
icon_state = "linenbin-full"
/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume)
if(amount)
amount = 0
update_icon()
..()
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/bedsheet))
if(!user.drop_item())
return
I.loc = src
sheets.Add(I)
amount++
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>")
return
I.loc = src
hidden = I
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
/obj/structure/bedsheetbin/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/bedsheetbin/attack_hand(mob/user)
if(user.lying)
return
if(amount >= 1)
amount--
var/obj/item/weapon/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
sheets.Remove(B)
else
B = new /obj/item/weapon/bedsheet(loc)
B.loc = user.loc
user.put_in_hands(B)
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
update_icon()
if(hidden)
hidden.loc = user.loc
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
hidden = null
add_fingerprint(user)
/obj/structure/bedsheetbin/attack_tk(mob/user)
if(amount >= 1)
amount--
var/obj/item/weapon/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
sheets.Remove(B)
else
B = new /obj/item/weapon/bedsheet(loc)
B.loc = loc
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
update_icon()
if(hidden)
hidden.loc = loc
hidden = null
add_fingerprint(user)
@@ -29,7 +29,7 @@
var/cutting_tool = /obj/item/weapon/weldingtool
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/cutting_sound = 'sound/items/Welder.ogg'
var/cutting_sound = 'sound/items/welder.ogg'
var/material_drop = /obj/item/stack/sheet/metal
var/material_drop_amount = 2
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
@@ -234,7 +234,7 @@
if(!WT.remove_fuel(0, user))
return
to_chat(user, "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>")
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
playsound(loc, 'sound/items/welder2.ogg', 40, 1)
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(opened || !WT.isOn())
return
@@ -276,7 +276,7 @@
var/actuallyismob = 0
if(isliving(O))
actuallyismob = 1
else if(!istype(O, /obj/item))
else if(!isitem(O))
return
var/turf/T = get_turf(src)
var/list/targets = list(O, src)
@@ -291,7 +291,7 @@
"<span class='italics'>You hear a loud metal bang.</span>")
var/mob/living/L = O
if(!issilicon(L))
L.Weaken(2)
L.Knockdown(40)
O.forceMove(T)
close()
else
@@ -355,7 +355,7 @@
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
if(istype(loc, /atom/movable))
if(ismovableatom(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
@@ -20,7 +20,7 @@
var/egged = 0
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
if(opened || move_delay || user.stat || user.stunned || user.weakened || user.paralysis || !isturf(loc) || !has_gravity(loc))
if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
return
move_delay = 1
if(step(src, direction))
@@ -67,6 +67,6 @@
move_speed_multiplier = 2
cutting_tool = /obj/item/weapon/weldingtool
open_sound = 'sound/machines/click.ogg'
cutting_sound = 'sound/items/Welder.ogg'
cutting_sound = 'sound/items/welder.ogg'
material_drop = /obj/item/stack/sheet/plasteel
#undef SNAKE_SPAM_TICKS
@@ -353,3 +353,16 @@
new /obj/item/clothing/under/rank/hydroponics(src)
for(var/i in 1 to 3)
new /obj/item/clothing/mask/bandana(src)
/obj/structure/closet/wardrobe/curator
name = "treasure hunting wardrobe"
icon_door = "black"
/obj/structure/closet/wardrobe/curator/PopulateContents()
new /obj/item/clothing/head/fedora/curator(src)
new /obj/item/clothing/suit/curator(src)
new /obj/item/clothing/under/rank/curator/treasure_hunter(src)
new /obj/item/clothing/shoes/workboots/mining(src)
new /obj/item/weapon/storage/backpack/satchel/explorer(src)
@@ -1,95 +1,95 @@
/obj/structure/closet/secure_closet/engineering_chief
name = "\proper chief engineer's locker"
req_access = list(GLOB.access_ce)
icon_state = "ce"
/obj/structure/closet/secure_closet/engineering_chief/PopulateContents()
..()
new /obj/item/clothing/neck/cloak/ce(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/weapon/tank/jetpack/suit(src)
new /obj/item/weapon/cartridge/ce(src)
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/device/megaphone/command(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/airlock_painter(src)
new /obj/item/weapon/holosign_creator/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/clothing/glasses/meson/engine(src)
new /obj/item/weapon/door_remote/chief_engineer(src)
new /obj/item/weapon/pipe_dispenser(src)
new /obj/item/weapon/inducer(src)
/obj/structure/closet/secure_closet/engineering_electrical
name = "electrical supplies locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng"
icon_door = "eng_elec"
/obj/structure/closet/secure_closet/engineering_electrical/PopulateContents()
..()
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/weapon/inducer(src)
/obj/structure/closet/secure_closet/engineering_chief
name = "\proper chief engineer's locker"
req_access = list(GLOB.access_ce)
icon_state = "ce"
/obj/structure/closet/secure_closet/engineering_chief/PopulateContents()
..()
new /obj/item/clothing/neck/cloak/ce(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/weapon/tank/jetpack/suit(src)
new /obj/item/weapon/cartridge/ce(src)
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/device/megaphone/command(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/airlock_painter(src)
new /obj/item/weapon/holosign_creator/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/clothing/glasses/meson/engine(src)
new /obj/item/weapon/door_remote/chief_engineer(src)
new /obj/item/weapon/pipe_dispenser(src)
new /obj/item/weapon/inducer(src)
for(var/i in 1 to 3)
new /obj/item/weapon/storage/toolbox/electrical(src)
for(var/i in 1 to 3)
new /obj/item/weapon/electronics/apc(src)
for(var/i in 1 to 3)
new /obj/item/device/multitool(src)
/obj/structure/closet/secure_closet/engineering_welding
name = "welding supplies locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng"
icon_door = "eng_weld"
/obj/structure/closet/secure_closet/engineering_welding/PopulateContents()
..()
for(var/i in 1 to 3)
new /obj/item/clothing/head/welding(src)
for(var/i in 1 to 3)
/obj/structure/closet/secure_closet/engineering_electrical
name = "electrical supplies locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng"
icon_door = "eng_elec"
/obj/structure/closet/secure_closet/engineering_electrical/PopulateContents()
..()
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/weapon/inducer(src)
new /obj/item/weapon/inducer(src)
for(var/i in 1 to 3)
new /obj/item/weapon/storage/toolbox/electrical(src)
for(var/i in 1 to 3)
new /obj/item/weapon/electronics/apc(src)
for(var/i in 1 to 3)
new /obj/item/device/multitool(src)
/obj/structure/closet/secure_closet/engineering_welding
name = "welding supplies locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng"
icon_door = "eng_weld"
/obj/structure/closet/secure_closet/engineering_welding/PopulateContents()
..()
for(var/i in 1 to 3)
new /obj/item/clothing/head/welding(src)
for(var/i in 1 to 3)
new /obj/item/weapon/weldingtool(src)
/obj/structure/closet/secure_closet/engineering_personal
name = "engineer's locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng_secure"
/obj/structure/closet/secure_closet/engineering_personal/PopulateContents()
..()
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/weapon/holosign_creator/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson/engine(src)
new /obj/item/weapon/storage/box/emptysandbags(src)
/obj/structure/closet/secure_closet/atmospherics
name = "\proper atmospheric technician's locker"
req_access = list(GLOB.access_atmospherics)
icon_state = "atmos"
/obj/structure/closet/secure_closet/atmospherics/PopulateContents()
..()
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/weapon/pipe_dispenser(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/device/analyzer(src)
/obj/structure/closet/secure_closet/engineering_personal
name = "engineer's locker"
req_access = list(GLOB.access_engine_equip)
icon_state = "eng_secure"
/obj/structure/closet/secure_closet/engineering_personal/PopulateContents()
..()
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/weapon/holosign_creator/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson/engine(src)
new /obj/item/weapon/storage/box/emptysandbags(src)
/obj/structure/closet/secure_closet/atmospherics
name = "\proper atmospheric technician's locker"
req_access = list(GLOB.access_atmospherics)
icon_state = "atmos"
/obj/structure/closet/secure_closet/atmospherics/PopulateContents()
..()
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/weapon/pipe_dispenser(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/device/analyzer(src)
new /obj/item/weapon/holosign_creator/atmos(src)
new /obj/item/weapon/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
new /obj/item/clothing/glasses/meson/engine/tray(src)
new /obj/item/weapon/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
new /obj/item/clothing/glasses/meson/engine/tray(src)
@@ -50,28 +50,4 @@
else
to_chat(user, "<span class='danger'>Access Denied.</span>")
else
return ..()
/obj/structure/closet/secure_closet/personal/proc/reset_lock(usr)
if (opened && !broken)
registered_name = null
desc = initial(desc)
to_chat(usr,"<span class='danger'>The lock has been reset.")
else if(!opened)
to_chat(usr,"<span class='danger'>The locker must be open!")
else if(broken)
to_chat(usr,"<span class='danger'>The lock is broken!")
/obj/structure/closet/secure_closet/personal/verb/verb_resetlock()
set src in oview(1)
set category = "Object"
set name = "Reset Lock"
if(!usr.canmove || usr.stat || usr.restrained())
return
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
reset_lock(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
return ..()
@@ -24,4 +24,4 @@
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/device/laser_pointer(src)
new /obj/item/weapon/door_remote/research_director(src)
new /obj/item/weapon/storage/box/firingpins(src)
new /obj/item/weapon/storage/box/firingpins(src)
@@ -11,7 +11,6 @@
else
new /obj/item/weapon/storage/backpack/satchel/cap(src)
new /obj/item/clothing/neck/cloak/cap(src)
new /obj/item/weapon/storage/daki(src)
new /obj/item/weapon/storage/backpack/duffelbag/captain(src)
new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/clothing/suit/captunic(src)
@@ -170,7 +169,7 @@
..()
new /obj/item/clothing/under/rank/det(src)
new /obj/item/clothing/suit/det_suit(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/head/fedora/det_hat(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/clothing/under/rank/det/grey(src)
new /obj/item/clothing/accessory/waistcoat(src)
@@ -137,6 +137,8 @@
if(prob(30))
new /obj/item/clothing/suit/hooded/wintercoat(src)
new /obj/item/clothing/shoes/winterboots(src)
if(prob(30))
new /obj/item/clothing/accessory/pocketprotector(src)
return
@@ -1,72 +1,72 @@
/obj/structure/closet/crate/secure
desc = "A secure crate."
name = "secure crate"
icon_state = "securecrate"
secure = 1
locked = 1
obj_integrity = 500
max_integrity = 500
armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
var/tamperproof = 0
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 25)
return 0
. = ..()
/obj/structure/closet/crate/secure/update_icon()
..()
if(broken)
add_overlay("securecrateemag")
else if(locked)
add_overlay("securecrater")
else
add_overlay("securecrateg")
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
if(prob(tamperproof))
boom()
..()
/obj/structure/closet/crate/secure/proc/boom(mob/user)
if(user)
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
var/message = "[ADMIN_LOOKUPFLW(user)] has detonated [src.name]."
GLOB.bombers += message
message_admins(message)
log_game("[key_name(user)] has detonated [src.name].")
for(var/atom/movable/AM in src)
qdel(AM)
/obj/structure/closet/crate/secure
desc = "A secure crate."
name = "secure crate"
icon_state = "securecrate"
secure = 1
locked = 1
obj_integrity = 500
max_integrity = 500
armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
var/tamperproof = 0
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 25)
return 0
. = ..()
/obj/structure/closet/crate/secure/update_icon()
..()
if(broken)
add_overlay("securecrateemag")
else if(locked)
add_overlay("securecrater")
else
add_overlay("securecrateg")
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
if(prob(tamperproof))
boom()
..()
/obj/structure/closet/crate/secure/proc/boom(mob/user)
if(user)
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
var/message = "[ADMIN_LOOKUPFLW(user)] has detonated [src.name]."
GLOB.bombers += message
message_admins(message)
log_game("[key_name(user)] has detonated [src.name].")
for(var/atom/movable/AM in src)
qdel(AM)
explosion(get_turf(src), 0, 1, 5, 5)
qdel(src)
/obj/structure/closet/crate/secure/weapon
desc = "A secure weapons crate."
name = "weapons crate"
icon_state = "weaponcrate"
/obj/structure/closet/crate/secure/plasma
desc = "A secure plasma crate."
name = "plasma crate"
icon_state = "plasmacrate"
/obj/structure/closet/crate/secure/gear
desc = "A secure gear crate."
name = "gear crate"
icon_state = "secgearcrate"
/obj/structure/closet/crate/secure/hydroponics
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
name = "secure hydroponics crate"
icon_state = "hydrosecurecrate"
/obj/structure/closet/crate/secure/engineering
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
name = "secure engineering crate"
icon_state = "engi_secure_crate"
/obj/structure/closet/crate/secure/science
name = "secure science crate"
desc = "A crate with a lock on it, painted in the scheme of the station's scientists."
icon_state = "scisecurecrate"
qdel(src)
/obj/structure/closet/crate/secure/weapon
desc = "A secure weapons crate."
name = "weapons crate"
icon_state = "weaponcrate"
/obj/structure/closet/crate/secure/plasma
desc = "A secure plasma crate."
name = "plasma crate"
icon_state = "plasmacrate"
/obj/structure/closet/crate/secure/gear
desc = "A secure gear crate."
name = "gear crate"
icon_state = "secgearcrate"
/obj/structure/closet/crate/secure/hydroponics
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
name = "secure hydroponics crate"
icon_state = "hydrosecurecrate"
/obj/structure/closet/crate/secure/engineering
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
name = "secure engineering crate"
icon_state = "engi_secure_crate"
/obj/structure/closet/crate/secure/science
name = "secure science crate"
desc = "A crate with a lock on it, painted in the scheme of the station's scientists."
icon_state = "scisecurecrate"
+8 -6
View File
@@ -46,9 +46,9 @@
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
@@ -82,8 +82,8 @@
try
getFlatIcon(A,defdir=4)
catch
return FALSE
return TRUE
return 0
return 1
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
//Get flatIcon even if dir is mismatched for directionless icons
@@ -127,7 +127,7 @@
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*W.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
update_icon()
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
@@ -204,7 +204,7 @@
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(get_turf(src), 5)
qdel(src)
@@ -248,6 +248,8 @@
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
req_access = list(GLOB.access_rd)
/obj/structure/displaycase/trophy
name = "trophy display case"
desc = "Store your trophies of accomplishment in here, and they will stay forever."
@@ -508,7 +508,7 @@
if(WT.remove_fuel(0,user))
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
"You start to disassemble the airlock assembly...")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
if(do_after(user, 40*W.toolspeed, target = src))
if( !WT.isOn() )
@@ -618,7 +618,7 @@
if(G)
if(G.get_amount() >= 1)
if(istype(G, /obj/item/stack/sheet/rglass) || istype(G, /obj/item/stack/sheet/glass))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, 'sound/items/crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
@@ -646,7 +646,7 @@
else if(istype(G, /obj/item/stack/sheet/mineral))
var/M = G.sheettype
if(G.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, 'sound/items/crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
+39 -39
View File
@@ -1,11 +1,11 @@
/obj/structure/dresser
name = "dresser"
desc = "A nicely-crafted wooden dresser. It's filled with lots of undies."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "dresser"
density = 1
anchored = 1
/obj/structure/dresser
name = "dresser"
desc = "A nicely-crafted wooden dresser. It's filled with lots of undies."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "dresser"
density = 1
anchored = 1
/obj/structure/dresser/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/wrench))
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
@@ -18,34 +18,34 @@
new /obj/item/stack/sheet/mineral/wood (get_turf(src), 10)
qdel(src)
/obj/structure/dresser/attack_hand(mob/user)
if(!Adjacent(user))//no tele-grooming
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna && H.dna.species && (NO_UNDERWEAR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>You are not capable of wearing underwear.</span>")
return
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
if(!Adjacent(user))
return
switch(choice)
if("Underwear")
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
if(new_undies)
H.underwear = new_undies
if("Undershirt")
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
if(new_undershirt)
H.undershirt = new_undershirt
if("Socks")
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in GLOB.socks_list
if(new_socks)
H.socks= new_socks
add_fingerprint(H)
H.update_body()
/obj/structure/dresser/attack_hand(mob/user)
if(!Adjacent(user))//no tele-grooming
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna && H.dna.species && (NO_UNDERWEAR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>You are not capable of wearing underwear.</span>")
return
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
if(!Adjacent(user))
return
switch(choice)
if("Underwear")
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
if(new_undies)
H.underwear = new_undies
if("Undershirt")
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
if(new_undershirt)
H.undershirt = new_undershirt
if("Socks")
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in GLOB.socks_list
if(new_socks)
H.socks= new_socks
add_fingerprint(H)
H.update_body()
+44 -44
View File
@@ -1,46 +1,46 @@
/obj/structure/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "echair0"
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1
item_chair = null
/obj/structure/chair/e_chair/New()
..()
/obj/structure/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "echair0"
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1
item_chair = null
/obj/structure/chair/e_chair/New()
..()
add_overlay(mutable_appearance('icons/obj/chairs.dmi', "echair_over", MOB_LAYER + 1))
/obj/structure/chair/e_chair/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/chair/C = new /obj/structure/chair(loc)
playsound(loc, W.usesound, 50, 1)
C.setDir(dir)
part.loc = loc
part.master = null
part = null
qdel(src)
/obj/structure/chair/e_chair/proc/shock()
if(last_time + 50 > world.time)
return
last_time = world.time
// special power handling
var/area/A = get_area(src)
if(!isarea(A))
return
if(!A.powered(EQUIP))
return
A.use_power(EQUIP, 5000)
flick("echair_shock", src)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(12, 1, src)
s.start()
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
buckled_mob.electrocute_act(85, src, 1)
to_chat(buckled_mob, "<span class='userdanger'>You feel a deep shock course through your body!</span>")
/obj/structure/chair/e_chair/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/chair/C = new /obj/structure/chair(loc)
playsound(loc, W.usesound, 50, 1)
C.setDir(dir)
part.loc = loc
part.master = null
part = null
qdel(src)
/obj/structure/chair/e_chair/proc/shock()
if(last_time + 50 > world.time)
return
last_time = world.time
// special power handling
var/area/A = get_area(src)
if(!isarea(A))
return
if(!A.powered(EQUIP))
return
A.use_power(EQUIP, 5000)
flick("echair_shock", src)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(12, 1, src)
s.start()
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
buckled_mob.electrocute_act(85, src, 1)
to_chat(buckled_mob, "<span class='userdanger'>You feel a deep shock course through your body!</span>")
addtimer(CALLBACK(buckled_mob, /mob/living.proc/electrocute_act, 85, src, 1), 1)
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
+147 -147
View File
@@ -1,148 +1,148 @@
/obj/structure/extinguisher_cabinet
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon = 'icons/obj/wallmounts.dmi'
icon_state = "extinguisher_closed"
anchored = 1
density = 0
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
var/obj/item/weapon/extinguisher/stored_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New(loc, ndir, building)
..()
if(building)
setDir(ndir)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
opened = 1
icon_state = "extinguisher_empty"
else
stored_extinguisher = new /obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/Destroy()
if(stored_extinguisher)
qdel(stored_extinguisher)
stored_extinguisher = null
return ..()
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
if(stored_extinguisher)
stored_extinguisher.ex_act(severity, target)
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
if(A == stored_extinguisher)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench) && !stored_extinguisher)
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 60*I.toolspeed, target = src))
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
deconstruct(TRUE)
return
if(iscyborg(user) || isalien(user))
return
if(istype(I, /obj/item/weapon/extinguisher))
if(!stored_extinguisher && opened)
if(!user.drop_item())
return
contents += I
stored_extinguisher = I
to_chat(user, "<span class='notice'>You place [I] in [src].</span>")
update_icon()
else
toggle_cabinet(user)
else if(user.a_intent != INTENT_HARM)
toggle_cabinet(user)
else
return ..()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(iscyborg(user) || isalien(user))
return
if(stored_extinguisher)
user.put_in_hands(stored_extinguisher)
to_chat(user, "<span class='notice'>You take [stored_extinguisher] from [src].</span>")
stored_extinguisher = null
if(!opened)
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
to_chat(user, "<span class='notice'>You telekinetically remove [stored_extinguisher] from [src].</span>")
stored_extinguisher = null
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
attack_hand(user)
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
if(user.incapacitated() || !Adjacent(user) || !istype(user))
return
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/proc/toggle_cabinet(mob/user)
if(opened && broken)
to_chat(user, "<span class='warning'>[src] is broken open.</span>")
else
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
return
if(stored_extinguisher)
if(istype(stored_extinguisher, /obj/item/weapon/extinguisher/mini))
icon_state = "extinguisher_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
broken = 1
opened = 1
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
new /obj/item/wallframe/extinguisher_cabinet(loc)
else
new /obj/item/stack/sheet/metal (loc, 2)
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
qdel(src)
/obj/item/wallframe/extinguisher_cabinet
name = "extinguisher cabinet frame"
desc = "Used for building wall-mounted extinguisher cabinets."
/obj/structure/extinguisher_cabinet
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon = 'icons/obj/wallmounts.dmi'
icon_state = "extinguisher_closed"
anchored = 1
density = 0
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
var/obj/item/weapon/extinguisher/stored_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New(loc, ndir, building)
..()
if(building)
setDir(ndir)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
opened = 1
icon_state = "extinguisher_empty"
else
stored_extinguisher = new /obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/Destroy()
if(stored_extinguisher)
qdel(stored_extinguisher)
stored_extinguisher = null
return ..()
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
if(stored_extinguisher)
stored_extinguisher.ex_act(severity, target)
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
if(A == stored_extinguisher)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench) && !stored_extinguisher)
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 60*I.toolspeed, target = src))
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
deconstruct(TRUE)
return
if(iscyborg(user) || isalien(user))
return
if(istype(I, /obj/item/weapon/extinguisher))
if(!stored_extinguisher && opened)
if(!user.drop_item())
return
contents += I
stored_extinguisher = I
to_chat(user, "<span class='notice'>You place [I] in [src].</span>")
update_icon()
else
toggle_cabinet(user)
else if(user.a_intent != INTENT_HARM)
toggle_cabinet(user)
else
return ..()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(iscyborg(user) || isalien(user))
return
if(stored_extinguisher)
user.put_in_hands(stored_extinguisher)
to_chat(user, "<span class='notice'>You take [stored_extinguisher] from [src].</span>")
stored_extinguisher = null
if(!opened)
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
to_chat(user, "<span class='notice'>You telekinetically remove [stored_extinguisher] from [src].</span>")
stored_extinguisher = null
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
attack_hand(user)
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
if(user.incapacitated() || !Adjacent(user) || !istype(user))
return
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/proc/toggle_cabinet(mob/user)
if(opened && broken)
to_chat(user, "<span class='warning'>[src] is broken open.</span>")
else
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
return
if(stored_extinguisher)
if(istype(stored_extinguisher, /obj/item/weapon/extinguisher/mini))
icon_state = "extinguisher_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
broken = 1
opened = 1
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
new /obj/item/wallframe/extinguisher_cabinet(loc)
else
new /obj/item/stack/sheet/metal (loc, 2)
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
qdel(src)
/obj/item/wallframe/extinguisher_cabinet
name = "extinguisher cabinet frame"
desc = "Used for building wall-mounted extinguisher cabinets."
icon_state = "extinguisher"
result_path = /obj/structure/extinguisher_cabinet
result_path = /obj/structure/extinguisher_cabinet
+2 -2
View File
@@ -126,7 +126,7 @@
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='notice'>You dismantle the false wall.</span>")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
deconstruct(disassembled)
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
@@ -242,7 +242,7 @@
return ..()
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
atmos_spawn_air("plasma=400;TEMP=1000")
new /obj/structure/girder/displaced(loc)
qdel(src)
+4 -4
View File
@@ -32,7 +32,7 @@
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
update_icon()
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
@@ -72,9 +72,9 @@
if(broken)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1)
else
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/fireaxecabinet/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
if(open)
@@ -87,7 +87,7 @@
if(!broken && !(flags & NODECONSTRUCT))
update_icon()
broken = TRUE
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
playsound(src, 'sound/effects/glassbr3.ogg', 100, 1)
new /obj/item/weapon/shard(loc)
new /obj/item/weapon/shard(loc)
+381 -381
View File
@@ -1,390 +1,390 @@
/obj/structure/flora
resistance_flags = FLAMMABLE
obj_integrity = 150
max_integrity = 150
anchored = 1
//trees
/obj/structure/flora/tree
name = "tree"
density = 1
pixel_x = -16
layer = FLY_LAYER
var/cut = FALSE
var/log_amount = 10
/obj/structure/flora/tree/attackby(obj/item/weapon/W, mob/user, params)
if(!cut && log_amount && (!(NODECONSTRUCT in flags)))
if(W.sharpness && W.force > 0)
if(W.hitsound)
playsound(get_turf(src), W.hitsound, 100, 0, 0)
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
if(cut)
return
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "tree_stump"
density = 0
pixel_x = -16
name += " stump"
cut = TRUE
for(var/i=1 to log_amount)
new /obj/item/weapon/grown/log/tree(get_turf(src))
else
return ..()
/obj/structure/flora/tree/pine
name = "pine tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_1"
/obj/structure/flora/tree/pine/Initialize()
icon_state = "pine_[rand(1, 3)]"
..()
/obj/structure/flora/tree/pine/xmas
name = "xmas tree"
icon_state = "pine_c"
/obj/structure/flora/tree/pine/xmas/Initialize()
..()
icon_state = "pine_c"
/obj/structure/flora/tree/dead
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_1"
/obj/structure/flora/tree/palm
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
/obj/structure/flora/tree/palm/Initialize()
..()
icon_state = pick("palm1","palm2")
pixel_x = 0
/obj/structure/festivus
name = "festivus pole"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "festivus_pole"
desc = "During last year's Feats of Strength the Research Director was able to suplex this passing immobile rod into a planter."
/obj/structure/flora/tree/dead/Initialize()
icon_state = "tree_[rand(1, 6)]"
..()
/obj/structure/flora/tree/jungle
name = "tree"
icon_state = "tree"
desc = "It's seriously hampering your view of the jungle."
icon = 'icons/obj/flora/jungletrees.dmi'
pixel_x = -48
pixel_y = -20
/obj/structure/flora/tree/jungle/Initialize()
/obj/structure/flora
resistance_flags = FLAMMABLE
obj_integrity = 150
max_integrity = 150
anchored = 1
//trees
/obj/structure/flora/tree
name = "tree"
density = 1
pixel_x = -16
layer = FLY_LAYER
var/cut = FALSE
var/log_amount = 10
/obj/structure/flora/tree/attackby(obj/item/weapon/W, mob/user, params)
if(!cut && log_amount && (!(NODECONSTRUCT in flags)))
if(W.sharpness && W.force > 0)
if(W.hitsound)
playsound(get_turf(src), W.hitsound, 100, 0, 0)
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
if(cut)
return
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "tree_stump"
density = 0
pixel_x = -16
name += " stump"
cut = TRUE
for(var/i=1 to log_amount)
new /obj/item/weapon/grown/log/tree(get_turf(src))
else
return ..()
/obj/structure/flora/tree/pine
name = "pine tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_1"
/obj/structure/flora/tree/pine/Initialize()
icon_state = "pine_[rand(1, 3)]"
..()
/obj/structure/flora/tree/pine/xmas
name = "xmas tree"
icon_state = "pine_c"
/obj/structure/flora/tree/pine/xmas/Initialize()
..()
icon_state = "pine_c"
/obj/structure/flora/tree/dead
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_1"
/obj/structure/flora/tree/palm
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
/obj/structure/flora/tree/palm/Initialize()
..()
icon_state = pick("palm1","palm2")
pixel_x = 0
/obj/structure/festivus
name = "festivus pole"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "festivus_pole"
desc = "During last year's Feats of Strength the Research Director was able to suplex this passing immobile rod into a planter."
/obj/structure/flora/tree/dead/Initialize()
icon_state = "tree_[rand(1, 6)]"
..()
/obj/structure/flora/tree/jungle
name = "tree"
icon_state = "tree"
desc = "It's seriously hampering your view of the jungle."
icon = 'icons/obj/flora/jungletrees.dmi'
pixel_x = -48
pixel_y = -20
/obj/structure/flora/tree/jungle/Initialize()
icon_state = "[icon_state][rand(1, 6)]"
..()
..()
/obj/structure/flora/tree/jungle/small
pixel_y = 0
pixel_x = -32
icon = 'icons/obj/flora/jungletreesmall.dmi'
//grass
/obj/structure/flora/grass
name = "grass"
icon = 'icons/obj/flora/snowflora.dmi'
gender = PLURAL //"this is grass" not "this is a grass"
/obj/structure/flora/grass/brown
icon_state = "snowgrass1bb"
/obj/structure/flora/grass/brown/Initialize()
icon_state = "snowgrass[rand(1, 3)]bb"
..()
/obj/structure/flora/grass/green
icon_state = "snowgrass1gb"
/obj/structure/flora/grass/green/Initialize()
icon_state = "snowgrass[rand(1, 3)]gb"
..()
/obj/structure/flora/grass/both
icon_state = "snowgrassall1"
/obj/structure/flora/grass/both/Initialize()
icon_state = "snowgrassall[rand(1, 3)]"
..()
//bushes
/obj/structure/flora/bush
name = "bush"
icon = 'icons/obj/flora/snowflora.dmi'
icon_state = "snowbush1"
anchored = 1
/obj/structure/flora/bush/Initialize()
icon_state = "snowbush[rand(1, 6)]"
..()
//newbushes
/obj/structure/flora/ausbushes
name = "bush"
icon = 'icons/obj/flora/ausflora.dmi'
icon_state = "firstbush_1"
/obj/structure/flora/ausbushes/Initialize()
if(icon_state == "firstbush_1")
icon_state = "firstbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/reedbush
icon_state = "reedbush_1"
/obj/structure/flora/ausbushes/reedbush/Initialize()
icon_state = "reedbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/leafybush
icon_state = "leafybush_1"
/obj/structure/flora/ausbushes/leafybush/Initialize()
icon_state = "leafybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/palebush
icon_state = "palebush_1"
/obj/structure/flora/ausbushes/palebush/Initialize()
icon_state = "palebush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/stalkybush
icon_state = "stalkybush_1"
/obj/structure/flora/ausbushes/stalkybush/Initialize()
icon_state = "stalkybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/grassybush
icon_state = "grassybush_1"
/obj/structure/flora/ausbushes/grassybush/Initialize()
icon_state = "grassybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/fernybush
icon_state = "fernybush_1"
/obj/structure/flora/ausbushes/fernybush/Initialize()
icon_state = "fernybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sunnybush
icon_state = "sunnybush_1"
/obj/structure/flora/ausbushes/sunnybush/Initialize()
icon_state = "sunnybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/genericbush
icon_state = "genericbush_1"
/obj/structure/flora/ausbushes/genericbush/Initialize()
icon_state = "genericbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/pointybush
icon_state = "pointybush_1"
/obj/structure/flora/ausbushes/pointybush/Initialize()
icon_state = "pointybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/lavendergrass
icon_state = "lavendergrass_1"
/obj/structure/flora/ausbushes/lavendergrass/Initialize()
icon_state = "lavendergrass_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/ywflowers
icon_state = "ywflowers_1"
/obj/structure/flora/ausbushes/ywflowers/Initialize()
icon_state = "ywflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/brflowers
icon_state = "brflowers_1"
/obj/structure/flora/ausbushes/brflowers/Initialize()
icon_state = "brflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/ppflowers
icon_state = "ppflowers_1"
/obj/structure/flora/ausbushes/ppflowers/Initialize()
icon_state = "ppflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sparsegrass
icon_state = "sparsegrass_1"
/obj/structure/flora/ausbushes/sparsegrass/Initialize()
icon_state = "sparsegrass_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/fullgrass
icon_state = "fullgrass_1"
/obj/structure/flora/ausbushes/fullgrass/Initialize()
icon_state = "fullgrass_[rand(1, 3)]"
..()
/obj/item/weapon/twohanded/required/kirbyplants
name = "potted plant"
icon = 'icons/obj/flora/plants.dmi'
icon_state = "plant-01"
layer = ABOVE_MOB_LAYER
w_class = WEIGHT_CLASS_HUGE
force = 10
throwforce = 13
throw_speed = 2
throw_range = 4
/obj/item/weapon/twohanded/required/kirbyplants/equipped(mob/living/user)
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
I.override = 1
//grass
/obj/structure/flora/grass
name = "grass"
icon = 'icons/obj/flora/snowflora.dmi'
gender = PLURAL //"this is grass" not "this is a grass"
/obj/structure/flora/grass/brown
icon_state = "snowgrass1bb"
/obj/structure/flora/grass/brown/Initialize()
icon_state = "snowgrass[rand(1, 3)]bb"
..()
/obj/structure/flora/grass/green
icon_state = "snowgrass1gb"
/obj/structure/flora/grass/green/Initialize()
icon_state = "snowgrass[rand(1, 3)]gb"
..()
/obj/structure/flora/grass/both
icon_state = "snowgrassall1"
/obj/structure/flora/grass/both/Initialize()
icon_state = "snowgrassall[rand(1, 3)]"
..()
//bushes
/obj/structure/flora/bush
name = "bush"
icon = 'icons/obj/flora/snowflora.dmi'
icon_state = "snowbush1"
anchored = 1
/obj/structure/flora/bush/Initialize()
icon_state = "snowbush[rand(1, 6)]"
..()
//newbushes
/obj/structure/flora/ausbushes
name = "bush"
icon = 'icons/obj/flora/ausflora.dmi'
icon_state = "firstbush_1"
/obj/structure/flora/ausbushes/Initialize()
if(icon_state == "firstbush_1")
icon_state = "firstbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/reedbush
icon_state = "reedbush_1"
/obj/structure/flora/ausbushes/reedbush/Initialize()
icon_state = "reedbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/leafybush
icon_state = "leafybush_1"
/obj/structure/flora/ausbushes/leafybush/Initialize()
icon_state = "leafybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/palebush
icon_state = "palebush_1"
/obj/structure/flora/ausbushes/palebush/Initialize()
icon_state = "palebush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/stalkybush
icon_state = "stalkybush_1"
/obj/structure/flora/ausbushes/stalkybush/Initialize()
icon_state = "stalkybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/grassybush
icon_state = "grassybush_1"
/obj/structure/flora/ausbushes/grassybush/Initialize()
icon_state = "grassybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/fernybush
icon_state = "fernybush_1"
/obj/structure/flora/ausbushes/fernybush/Initialize()
icon_state = "fernybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sunnybush
icon_state = "sunnybush_1"
/obj/structure/flora/ausbushes/sunnybush/Initialize()
icon_state = "sunnybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/genericbush
icon_state = "genericbush_1"
/obj/structure/flora/ausbushes/genericbush/Initialize()
icon_state = "genericbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/pointybush
icon_state = "pointybush_1"
/obj/structure/flora/ausbushes/pointybush/Initialize()
icon_state = "pointybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/lavendergrass
icon_state = "lavendergrass_1"
/obj/structure/flora/ausbushes/lavendergrass/Initialize()
icon_state = "lavendergrass_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/ywflowers
icon_state = "ywflowers_1"
/obj/structure/flora/ausbushes/ywflowers/Initialize()
icon_state = "ywflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/brflowers
icon_state = "brflowers_1"
/obj/structure/flora/ausbushes/brflowers/Initialize()
icon_state = "brflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/ppflowers
icon_state = "ppflowers_1"
/obj/structure/flora/ausbushes/ppflowers/Initialize()
icon_state = "ppflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sparsegrass
icon_state = "sparsegrass_1"
/obj/structure/flora/ausbushes/sparsegrass/Initialize()
icon_state = "sparsegrass_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/fullgrass
icon_state = "fullgrass_1"
/obj/structure/flora/ausbushes/fullgrass/Initialize()
icon_state = "fullgrass_[rand(1, 3)]"
..()
/obj/item/weapon/twohanded/required/kirbyplants
name = "potted plant"
icon = 'icons/obj/flora/plants.dmi'
icon_state = "plant-01"
layer = ABOVE_MOB_LAYER
w_class = WEIGHT_CLASS_HUGE
force = 10
throwforce = 13
throw_speed = 2
throw_range = 4
/obj/item/weapon/twohanded/required/kirbyplants/equipped(mob/living/user)
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
I.override = 1
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission", I)
..()
/obj/item/weapon/twohanded/required/kirbyplants/dropped(mob/living/user)
..()
user.remove_alt_appearance("sneaking_mission")
/obj/item/weapon/twohanded/required/kirbyplants/random
var/list/static/states
/obj/item/weapon/twohanded/required/kirbyplants/random/Initialize()
. = ..()
if(!states)
generate_states()
icon_state = pick(states)
/obj/item/weapon/twohanded/required/kirbyplants/random/proc/generate_states()
states = list()
for(var/i in 1 to 25)
var/number
if(i < 10)
number = "0[i]"
else
number = "[i]"
states += "plant-[number]"
states += "applebush"
/obj/item/weapon/twohanded/required/kirbyplants/dead
name = "RD's potted plant"
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
icon_state = "plant-25"
//a rock is flora according to where the icon file is
//and now these defines
/obj/structure/flora/rock
icon_state = "basalt"
desc = "A volcanic rock"
icon = 'icons/obj/flora/rocks.dmi'
resistance_flags = FIRE_PROOF
density = 1
/obj/structure/flora/rock/Initialize()
..()
icon_state = "[icon_state][rand(1,3)]"
/obj/structure/flora/rock/pile
icon_state = "lavarocks"
desc = "A pile of rocks"
/obj/structure/flora/rock/pile/Initialize()
..()
icon_state = "[icon_state][rand(1,3)]"
//Jungle grass
/obj/structure/flora/grass/jungle
name = "jungle grass"
desc = "Thick alien flora."
icon = 'icons/obj/flora/jungleflora.dmi'
icon_state = "grassa"
/obj/structure/flora/grass/jungle/Initialize()
icon_state = "[icon_state][rand(1, 5)]"
..()
/obj/structure/flora/grass/jungle/b
icon_state = "grassb"
//Jungle rocks
/obj/structure/flora/rock/jungle
icon_state = "pile of rocks"
desc = "A pile of rocks."
icon_state = "rock"
icon = 'icons/obj/flora/jungleflora.dmi'
density = FALSE
/obj/structure/flora/rock/jungle/Initialize()
..()
icon_state = "[initial(icon_state)][rand(1,5)]"
//Jungle bushes
/obj/structure/flora/junglebush
name = "bush"
icon = 'icons/obj/flora/jungleflora.dmi'
icon_state = "busha"
/obj/structure/flora/junglebush/Initialize()
icon_state = "[icon_state][rand(1, 3)]"
..()
/obj/structure/flora/junglebush/b
icon_state = "bushb"
/obj/structure/flora/junglebush/c
icon_state = "bushc"
/obj/structure/flora/junglebush/large
icon_state = "bush"
icon = 'icons/obj/flora/largejungleflora.dmi'
pixel_x = -16
pixel_y = -12
layer = ABOVE_ALL_MOB_LAYER
/obj/structure/flora/rock/pile/largejungle
name = "rocks"
icon_state = "rocks"
icon = 'icons/obj/flora/largejungleflora.dmi'
density = FALSE
pixel_x = -16
pixel_y = -16
/obj/structure/flora/rock/pile/largejungle/Initialize()
..()
/obj/item/weapon/twohanded/required/kirbyplants/dropped(mob/living/user)
..()
user.remove_alt_appearance("sneaking_mission")
/obj/item/weapon/twohanded/required/kirbyplants/random
var/list/static/states
/obj/item/weapon/twohanded/required/kirbyplants/random/Initialize()
. = ..()
if(!states)
generate_states()
icon_state = pick(states)
/obj/item/weapon/twohanded/required/kirbyplants/random/proc/generate_states()
states = list()
for(var/i in 1 to 25)
var/number
if(i < 10)
number = "0[i]"
else
number = "[i]"
states += "plant-[number]"
states += "applebush"
/obj/item/weapon/twohanded/required/kirbyplants/dead
name = "RD's potted plant"
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
icon_state = "plant-25"
//a rock is flora according to where the icon file is
//and now these defines
/obj/structure/flora/rock
icon_state = "basalt"
desc = "A volcanic rock"
icon = 'icons/obj/flora/rocks.dmi'
resistance_flags = FIRE_PROOF
density = 1
/obj/structure/flora/rock/Initialize()
..()
icon_state = "[icon_state][rand(1,3)]"
/obj/structure/flora/rock/pile
icon_state = "lavarocks"
desc = "A pile of rocks"
/obj/structure/flora/rock/pile/Initialize()
..()
icon_state = "[icon_state][rand(1,3)]"
//Jungle grass
/obj/structure/flora/grass/jungle
name = "jungle grass"
desc = "Thick alien flora."
icon = 'icons/obj/flora/jungleflora.dmi'
icon_state = "grassa"
/obj/structure/flora/grass/jungle/Initialize()
icon_state = "[icon_state][rand(1, 5)]"
..()
/obj/structure/flora/grass/jungle/b
icon_state = "grassb"
//Jungle rocks
/obj/structure/flora/rock/jungle
icon_state = "pile of rocks"
desc = "A pile of rocks."
icon_state = "rock"
icon = 'icons/obj/flora/jungleflora.dmi'
density = FALSE
/obj/structure/flora/rock/jungle/Initialize()
..()
icon_state = "[initial(icon_state)][rand(1,5)]"
//Jungle bushes
/obj/structure/flora/junglebush
name = "bush"
icon = 'icons/obj/flora/jungleflora.dmi'
icon_state = "busha"
/obj/structure/flora/junglebush/Initialize()
icon_state = "[icon_state][rand(1, 3)]"
..()
/obj/structure/flora/junglebush/b
icon_state = "bushb"
/obj/structure/flora/junglebush/c
icon_state = "bushc"
/obj/structure/flora/junglebush/large
icon_state = "bush"
icon = 'icons/obj/flora/largejungleflora.dmi'
pixel_x = -16
pixel_y = -12
layer = ABOVE_ALL_MOB_LAYER
/obj/structure/flora/rock/pile/largejungle
name = "rocks"
icon_state = "rocks"
icon = 'icons/obj/flora/largejungleflora.dmi'
density = FALSE
pixel_x = -16
pixel_y = -16
/obj/structure/flora/rock/pile/largejungle/Initialize()
. = ..()
icon_state = "[initial(icon_state)][rand(1,3)]"
+2 -1
View File
@@ -17,7 +17,7 @@
if(!do_after(user, 50, target = src))
return 0
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
playsound(user, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(user, 'sound/items/deconstruct.ogg', 50, 1)
new/obj/item/stack/sheet/metal(get_turf(src))
qdel(src)
return
@@ -65,6 +65,7 @@
pixel_x = -16
density = TRUE
deconstructible = FALSE
layer = EDGED_TURF_LAYER
/obj/structure/fluff/drake_statue/falling //A variety of statue in disrepair; parts are broken off and a gemstone is missing
desc = "A towering basalt sculpture of a drake. Cracks run down its surface and parts of it have fallen off."
@@ -455,9 +455,11 @@
uniform = /obj/item/clothing/under/rank/security
shoes = /obj/item/clothing/shoes/jackboots
id = /obj/item/weapon/card/id/away/old/sec
r_pocket = /obj/item/weapon/restraints/handcuffs
l_pocket = /obj/item/device/assembly/flash/handheld
/obj/effect/mob_spawn/human/oldsec/Destroy()
new/obj/structure/showcase/oldpod(get_turf(src))
new/obj/structure/showcase/oldpod/used(get_turf(src))
return ..()
/obj/effect/mob_spawn/human/oldeng
@@ -476,9 +478,11 @@
uniform = /obj/item/clothing/under/rank/engineer
shoes = /obj/item/clothing/shoes/workboots
id = /obj/item/weapon/card/id/away/old/eng
gloves = /obj/item/clothing/gloves/color/fyellow/old
l_pocket = /obj/item/weapon/tank/internals/emergency_oxygen
/obj/effect/mob_spawn/human/oldeng/Destroy()
new/obj/structure/showcase/oldpod(get_turf(src))
new/obj/structure/showcase/oldpod/used(get_turf(src))
return ..()
/obj/effect/mob_spawn/human/oldsci
@@ -497,7 +501,8 @@
uniform = /obj/item/clothing/under/rank/scientist
shoes = /obj/item/clothing/shoes/laceup
id = /obj/item/weapon/card/id/away/old/sci
l_pocket = /obj/item/stack/medical/bruise_pack
/obj/effect/mob_spawn/human/oldsci/Destroy()
new/obj/structure/showcase/oldpod(get_turf(src))
new/obj/structure/showcase/oldpod/used(get_turf(src))
return ..()
+2 -2
View File
@@ -80,7 +80,7 @@
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
if(do_after(user, 40*W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 2)
@@ -352,7 +352,7 @@
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
if(do_after(user, 40*W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
+1 -1
View File
@@ -229,7 +229,7 @@
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src.loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5)
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
+2 -2
View File
@@ -14,7 +14,7 @@
smoke.set_up(2, loc)
smoke.start()
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
playsound(src.loc, 'sound/effects/empulse.ogg', 25, 1)
addtimer(CALLBACK(src, .proc/warpbots), rand(10, 600))
/obj/structure/hivebot_beacon/proc/warpbots()
@@ -31,6 +31,6 @@
new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
sleep(100)
visible_message("<span class='boldannounce'>The [src] warps out!</span>")
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
playsound(src.loc, 'sound/effects/empulse.ogg', 25, 1)
qdel(src)
return
+2 -2
View File
@@ -30,9 +30,9 @@
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
if(BURN)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
/obj/structure/holosign/wetsign
name = "wet floor sign"
@@ -139,7 +139,7 @@
src.visible_message(text("<span class='danger'>[M] falls free of the [src]!</span>"))
unbuckle_mob(M,force=1)
M.emote("scream")
M.AdjustWeakened(10)
M.AdjustKnockdown(20)
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
if(disassembled)
+106 -106
View File
@@ -1,110 +1,110 @@
/obj/structure/ladder
name = "ladder"
desc = "A sturdy metal ladder."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder11"
var/id = null
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
/obj/structure/ladder/Initialize(mapload)
/obj/structure/ladder
name = "ladder"
desc = "A sturdy metal ladder."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder11"
var/id = null
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
/obj/structure/ladder/Initialize(mapload)
GLOB.ladders += src
..()
return INITIALIZE_HINT_LATELOAD
/obj/structure/ladder/Destroy()
GLOB.ladders -= src
. = ..()
/obj/structure/ladder/Destroy()
GLOB.ladders -= src
. = ..()
/obj/structure/ladder/LateInitialize()
for(var/obj/structure/ladder/L in GLOB.ladders)
if(L.id == id)
if(L.height == (height - 1))
down = L
continue
if(L.height == (height + 1))
up = L
continue
if(up && down) //if both our connections are filled
break
update_icon()
/obj/structure/ladder/update_icon()
if(up && down)
icon_state = "ladder11"
else if(up)
icon_state = "ladder10"
else if(down)
icon_state = "ladder01"
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/proc/go_up(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(1,user)
up.add_fingerprint(user)
user.loc = get_turf(up)
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(0,user)
down.add_fingerprint(user)
user.loc = get_turf(down)
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if("Up")
go_up(user,is_ghost)
if("Down")
go_down(user,is_ghost)
if("Cancel")
return
else if(up)
go_up(user,is_ghost)
else if(down)
go_down(user,is_ghost)
else
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
if(!is_ghost)
add_fingerprint(user)
/obj/structure/ladder/attack_hand(mob/user)
if(can_use(user))
use(user)
/obj/structure/ladder/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
if(up)
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
else
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
/obj/structure/ladder/proc/can_use(mob/user)
return 1
/obj/structure/ladder/unbreakable/Destroy(force)
if(force)
. = ..()
else
return QDEL_HINT_LETMELIVE
for(var/obj/structure/ladder/L in GLOB.ladders)
if(L.id == id)
if(L.height == (height - 1))
down = L
continue
if(L.height == (height + 1))
up = L
continue
if(up && down) //if both our connections are filled
break
update_icon()
/obj/structure/ladder/update_icon()
if(up && down)
icon_state = "ladder11"
else if(up)
icon_state = "ladder10"
else if(down)
icon_state = "ladder01"
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/proc/go_up(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(1,user)
up.add_fingerprint(user)
user.loc = get_turf(up)
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(0,user)
down.add_fingerprint(user)
user.loc = get_turf(down)
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if("Up")
go_up(user,is_ghost)
if("Down")
go_down(user,is_ghost)
if("Cancel")
return
else if(up)
go_up(user,is_ghost)
else if(down)
go_down(user,is_ghost)
else
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
if(!is_ghost)
add_fingerprint(user)
/obj/structure/ladder/attack_hand(mob/user)
if(can_use(user))
use(user)
/obj/structure/ladder/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
if(up)
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
else
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
/obj/structure/ladder/proc/can_use(mob/user)
return 1
/obj/structure/ladder/unbreakable/Destroy(force)
if(force)
. = ..()
else
return QDEL_HINT_LETMELIVE
+1 -1
View File
@@ -22,7 +22,7 @@
var/datum/outfit/outfit
// How long until we respawn them after their death.
var/respawn_time = 50
var/respawn_sound = 'sound/magic/Staff_animation.ogg'
var/respawn_sound = 'sound/magic/staff_animation.ogg'
/obj/structure/life_candle/attack_hand(mob/user)
if(!user.mind)
+10 -6
View File
@@ -38,7 +38,7 @@
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.reset_perspective()
buckled_mob.client.change_view(world.view)
anchored = FALSE
. = ..()
STOP_PROCESSING(SSfastprocess, src)
@@ -47,7 +47,9 @@
if(user.incapacitated() || !istype(user))
return
M.forceMove(get_turf(src))
..()
. = ..()
if(!.)
return
for(var/V in M.held_items)
var/obj/item/I = V
if(istype(I))
@@ -62,8 +64,8 @@
setDir(SOUTH)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
anchored = TRUE
if(user.client)
user.client.change_view(view_range)
if(M.client)
M.client.change_view(view_range)
START_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/process()
@@ -84,6 +86,8 @@
calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(controller, C.mouseParams)
/obj/machinery/manned_turret/proc/direction_track(mob/user, atom/targeted)
if(user.stat != CONSCIOUS)
return
setDir(get_dir(src,targeted))
user.setDir(dir)
switch(dir)
@@ -149,7 +153,7 @@
P.starting = targets_from
P.firer = user
P.original = target
playsound(src, 'sound/weapons/Gunshot_smg.ogg', 75, 1)
playsound(src, 'sound/weapons/gunshot_smg.ogg', 75, 1)
P.xo = target.x - targets_from.x
P.yo = target.y - targets_from.y
P.Angle = calculated_projectile_vars[1] + rand(-9, 9)
@@ -174,7 +178,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | NODROP | NOBLUDGEON
flags = ABSTRACT | NODROP | NOBLUDGEON | DROPDEL
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/obj/machinery/manned_turret/turret
+25 -6
View File
@@ -5,7 +5,7 @@
name = "metal door"
density = 1
anchored = 1
opacity = 1
opacity = TRUE
icon = 'icons/obj/doors/mineral_doors.dmi'
icon_state = "metal"
@@ -86,11 +86,11 @@
/obj/structure/mineral_door/proc/Open()
isSwitchingStates = 1
playsound(loc, openSound, 100, 1)
playsound(src, openSound, 100, 1)
set_opacity(FALSE)
flick("[initial_state]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
air_update_turf(1)
update_icon()
@@ -110,7 +110,7 @@
flick("[initial_state]closing",src)
sleep(10)
density = 1
opacity = 1
set_opacity(TRUE)
state = 0
air_update_turf(1)
update_icon()
@@ -175,11 +175,11 @@
max_integrity = 100
/obj/structure/mineral_door/transparent
opacity = 0
opacity = FALSE
/obj/structure/mineral_door/transparent/Close()
..()
opacity = 0
set_opacity(FALSE)
/obj/structure/mineral_door/transparent/plasma
name = "plasma door"
@@ -219,3 +219,22 @@
resistance_flags = FLAMMABLE
obj_integrity = 200
max_integrity = 200
/obj/structure/mineral_door/paperframe
name = "paper frame door"
icon_state = "paperframe"
openSound = 'sound/effects/doorcreaky.ogg'
closeSound = 'sound/effects/doorcreaky.ogg'
sheetType = /obj/item/stack/sheet/paperframes
sheetAmount = 3
resistance_flags = FLAMMABLE
obj_integrity = 20
max_integrity = 20
/obj/structure/mineral_door/paperframe/Initialize()
. = ..()
queue_smooth_neighbors(src)
/obj/structure/mineral_door/paperframe/Destroy()
queue_smooth_neighbors(src)
return ..()
+1 -1
View File
@@ -67,7 +67,7 @@
user.changeNext_move(CLICK_CD_MELEE)
if(WT.remove_fuel(0, user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
if(do_after(user, 10*I.toolspeed, target = src))
if(!user || !WT || !WT.isOn())
return
+308 -308
View File
@@ -1,229 +1,229 @@
/* Morgue stuff
* Contains:
* Morgue
* Morgue tray
* Crematorium
/* Morgue stuff
* Contains:
* Morgue
* Morgue tray
* Crematorium
* Creamatorium
* Crematorium tray
* Crematorium button
*/
/*
* Bodycontainer
* Parent class for morgue and crematorium
* For overriding only
*/
/obj/structure/bodycontainer
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
density = 1
anchored = 1
obj_integrity = 400
max_integrity = 400
var/obj/structure/tray/connected = null
var/locked = 0
var/opendir = SOUTH
/obj/structure/bodycontainer/Destroy()
open()
if(connected)
qdel(connected)
connected = null
return ..()
* Crematorium tray
* Crematorium button
*/
/*
* Bodycontainer
* Parent class for morgue and crematorium
* For overriding only
*/
/obj/structure/bodycontainer
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
density = 1
anchored = 1
obj_integrity = 400
max_integrity = 400
var/obj/structure/tray/connected = null
var/locked = 0
var/opendir = SOUTH
/obj/structure/bodycontainer/Destroy()
open()
if(connected)
qdel(connected)
connected = null
return ..()
/obj/structure/bodycontainer/on_log(login)
..()
update_icon()
/obj/structure/bodycontainer/update_icon()
return
/obj/structure/bodycontainer/relaymove(mob/user)
if(user.stat || !isturf(loc))
return
open()
/obj/structure/bodycontainer/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/bodycontainer/attack_hand(mob/user)
if(locked)
to_chat(user, "<span class='danger'>It's locked.</span>")
return
if(!connected)
to_chat(user, "That doesn't appear to have a tray.")
return
if(connected.loc == src)
open()
else
close()
add_fingerprint(user)
/obj/structure/bodycontainer/attack_robot(mob/user)
if(!user.Adjacent(src))
return
return attack_hand(user)
/obj/structure/bodycontainer/attackby(obj/P, mob/user, params)
add_fingerprint(user)
if(istype(P, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
if (user.get_active_held_item() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
if (t)
name = text("[]- '[]'", initial(name), t)
else
name = initial(name)
else
return ..()
/obj/structure/bodycontainer/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/structure/bodycontainer/container_resist(mob/living/user)
open()
/obj/structure/bodycontainer/relay_container_resist(mob/living/user, obj/O)
to_chat(user, "<span class='notice'>You slam yourself into the side of [O].</span>")
container_resist(user)
/obj/structure/bodycontainer/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, opendir)
for(var/atom/movable/AM in src)
AM.forceMove(T)
update_icon()
/obj/structure/bodycontainer/proc/close()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/atom/movable/AM in connected.loc)
if(!AM.anchored || AM == connected)
AM.forceMove(src)
update_icon()
/obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Morgue
*/
/obj/structure/bodycontainer/morgue
name = "morgue"
desc = "Used to keep bodies in until someone fetches them."
icon_state = "morgue1"
opendir = EAST
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
connected.connected = src
..()
/obj/structure/bodycontainer/morgue/update_icon()
if (!connected || connected.loc != src) // Open or tray is gone.
icon_state = "morgue0"
else
if(contents.len == 1) // Empty
icon_state = "morgue1"
else
icon_state = "morgue2" // Dead, brainded mob.
var/list/compiled = recursive_mob_check(src, 0, 0) // Search for mobs in all contents.
if(!length(compiled)) // No mobs?
icon_state = "morgue3"
return
for(var/mob/living/M in compiled)
if(M.client && !M.suiciding)
icon_state = "morgue4" // Cloneable
break
/obj/item/weapon/paper/morguereminder
name = "morgue memo"
info = "<font size='2'>Since this station's medbay never seems to fail to be staffed by the mindless monkeys meant for genetics experiments, I'm leaving a reminder here for anyone handling the pile of cadavers the quacks are sure to leave.</font><BR><BR><font size='4'><font color=red>Red lights mean there's a plain ol' dead body inside.</font><BR><BR><font color=orange>Yellow lights mean there's non-body objects inside.</font><BR><font size='2'>Probably stuff pried off a corpse someone grabbed, or if you're lucky it's stashed booze.</font><BR><BR><font color=green>Green lights mean the morgue system detects the body may be able to be cloned.</font></font><BR><font size='2'>I don't know how that works, but keep it away from the kitchen and go yell at the geneticists.</font><BR><BR>- Centcom medical inspector"
/*
* Crematorium
*/
GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium
name = "crematorium"
desc = "A human incinerator. Works well on barbeque nights."
icon_state = "crema1"
opendir = SOUTH
var/id = 1
/obj/structure/bodycontainer/crematorium/attack_robot(mob/user) //Borgs can't use crematoriums without help
to_chat(user, "<span class='warning'>[src] is locked against you.</span>")
return
/obj/structure/bodycontainer/crematorium/Destroy()
GLOB.crematoriums.Remove(src)
return ..()
/obj/structure/bodycontainer/crematorium/New()
connected = new/obj/structure/tray/c_tray(src)
connected.connected = src
GLOB.crematoriums.Add(src)
..()
/obj/structure/bodycontainer/crematorium/update_icon()
if(!connected || connected.loc != src)
icon_state = "crema0"
else
if(src.contents.len > 1)
src.icon_state = "crema2"
else
src.icon_state = "crema1"
if(locked)
src.icon_state = "crema_active"
return
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
if(locked)
return //don't let you cremate something twice or w/e
// Make sure we don't delete the actual morgue and its tray
var/list/conts = GetAllContents() - src - connected
update_icon()
/obj/structure/bodycontainer/update_icon()
return
/obj/structure/bodycontainer/relaymove(mob/user)
if(user.stat || !isturf(loc))
return
open()
/obj/structure/bodycontainer/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/bodycontainer/attack_hand(mob/user)
if(locked)
to_chat(user, "<span class='danger'>It's locked.</span>")
return
if(!connected)
to_chat(user, "That doesn't appear to have a tray.")
return
if(connected.loc == src)
open()
else
close()
add_fingerprint(user)
/obj/structure/bodycontainer/attack_robot(mob/user)
if(!user.Adjacent(src))
return
return attack_hand(user)
/obj/structure/bodycontainer/attackby(obj/P, mob/user, params)
add_fingerprint(user)
if(istype(P, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
if (user.get_active_held_item() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
if (t)
name = text("[]- '[]'", initial(name), t)
else
name = initial(name)
else
return ..()
/obj/structure/bodycontainer/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/structure/bodycontainer/container_resist(mob/living/user)
open()
/obj/structure/bodycontainer/relay_container_resist(mob/living/user, obj/O)
to_chat(user, "<span class='notice'>You slam yourself into the side of [O].</span>")
container_resist(user)
/obj/structure/bodycontainer/proc/open()
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, opendir)
for(var/atom/movable/AM in src)
AM.forceMove(T)
update_icon()
/obj/structure/bodycontainer/proc/close()
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
for(var/atom/movable/AM in connected.loc)
if(!AM.anchored || AM == connected)
AM.forceMove(src)
update_icon()
/obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Morgue
*/
/obj/structure/bodycontainer/morgue
name = "morgue"
desc = "Used to keep bodies in until someone fetches them."
icon_state = "morgue1"
opendir = EAST
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
connected.connected = src
..()
/obj/structure/bodycontainer/morgue/update_icon()
if (!connected || connected.loc != src) // Open or tray is gone.
icon_state = "morgue0"
else
if(contents.len == 1) // Empty
icon_state = "morgue1"
else
icon_state = "morgue2" // Dead, brainded mob.
var/list/compiled = recursive_mob_check(src, 0, 0) // Search for mobs in all contents.
if(!length(compiled)) // No mobs?
icon_state = "morgue3"
return
for(var/mob/living/M in compiled)
if(M.client && !M.suiciding)
icon_state = "morgue4" // Cloneable
break
/obj/item/weapon/paper/morguereminder
name = "morgue memo"
info = "<font size='2'>Since this station's medbay never seems to fail to be staffed by the mindless monkeys meant for genetics experiments, I'm leaving a reminder here for anyone handling the pile of cadavers the quacks are sure to leave.</font><BR><BR><font size='4'><font color=red>Red lights mean there's a plain ol' dead body inside.</font><BR><BR><font color=orange>Yellow lights mean there's non-body objects inside.</font><BR><font size='2'>Probably stuff pried off a corpse someone grabbed, or if you're lucky it's stashed booze.</font><BR><BR><font color=green>Green lights mean the morgue system detects the body may be able to be cloned.</font></font><BR><font size='2'>I don't know how that works, but keep it away from the kitchen and go yell at the geneticists.</font><BR><BR>- Centcom medical inspector"
/*
* Crematorium
*/
GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium
name = "crematorium"
desc = "A human incinerator. Works well on barbeque nights."
icon_state = "crema1"
opendir = SOUTH
var/id = 1
/obj/structure/bodycontainer/crematorium/attack_robot(mob/user) //Borgs can't use crematoriums without help
to_chat(user, "<span class='warning'>[src] is locked against you.</span>")
return
/obj/structure/bodycontainer/crematorium/Destroy()
GLOB.crematoriums.Remove(src)
return ..()
/obj/structure/bodycontainer/crematorium/New()
connected = new/obj/structure/tray/c_tray(src)
connected.connected = src
GLOB.crematoriums.Add(src)
..()
/obj/structure/bodycontainer/crematorium/update_icon()
if(!connected || connected.loc != src)
icon_state = "crema0"
else
if(src.contents.len > 1)
src.icon_state = "crema2"
else
src.icon_state = "crema1"
if(locked)
src.icon_state = "crema_active"
return
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
if(locked)
return //don't let you cremate something twice or w/e
// Make sure we don't delete the actual morgue and its tray
var/list/conts = GetAllContents() - src - connected
if(!conts.len)
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
return
else
audible_message("<span class='italics'>You hear a roar as the crematorium activates.</span>")
locked = 1
update_icon()
for(var/mob/living/M in conts)
if (M.stat != DEAD)
M.emote("scream")
if(user)
user.log_message("Cremated <b>[M]/[M.ckey]</b>", INDIVIDUAL_ATTACK_LOG)
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
else
log_attack("\[[time_stamp()]\] <b>UNKNOWN</b> cremated <b>[M]/[M.ckey]</b>")
M.death(1)
if(M) //some animals get automatically deleted on death.
M.ghostize()
qdel(M)
for(var/obj/O in conts) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
qdel(O)
new /obj/effect/decal/cleanable/ash(src)
sleep(30)
if(!QDELETED(src))
locked = 0
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
return
else
audible_message("<span class='italics'>You hear a roar as the crematorium activates.</span>")
locked = 1
update_icon()
for(var/mob/living/M in conts)
if (M.stat != DEAD)
M.emote("scream")
if(user)
user.log_message("Cremated <b>[M]/[M.ckey]</b>", INDIVIDUAL_ATTACK_LOG)
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
else
log_attack("\[[time_stamp()]\] <b>UNKNOWN</b> cremated <b>[M]/[M.ckey]</b>")
M.death(1)
if(M) //some animals get automatically deleted on death.
M.ghostize()
qdel(M)
for(var/obj/O in conts) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
qdel(O)
new /obj/effect/decal/cleanable/ash(src)
sleep(30)
if(!QDELETED(src))
locked = 0
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
/obj/structure/bodycontainer/crematorium/creamatorium
name = "creamatorium"
desc = "A human incinerator. Works well during ice cream socials."
@@ -238,89 +238,89 @@ GLOBAL_LIST_EMPTY(crematoriums)
. = ..()
for(var/obj/IC in icecreams)
IC.forceMove(src)
/*
* Generic Tray
* Parent class for morguetray and crematoriumtray
* For overriding only
*/
/obj/structure/tray
icon = 'icons/obj/stationobjs.dmi'
density = 1
layer = BELOW_OBJ_LAYER
var/obj/structure/bodycontainer/connected = null
anchored = 1
pass_flags = LETPASSTHROW
obj_integrity = 350
max_integrity = 350
/obj/structure/tray/Destroy()
if(connected)
connected.connected = null
connected.update_icon()
connected = null
return ..()
/obj/structure/tray/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
/obj/structure/tray/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/tray/attack_hand(mob/user)
if (src.connected)
connected.close()
add_fingerprint(user)
else
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
if(!istype(O, /atom/movable) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
if(!ismob(O))
if(!istype(O, /obj/structure/closet/body_bag))
return
else
var/mob/M = O
if(M.buckled)
return
if(!ismob(user) || user.lying || user.incapacitated())
return
O.loc = src.loc
if (user != O)
visible_message("<span class='warning'>[user] stuffs [O] into [src].</span>")
return
/*
* Crematorium tray
*/
/obj/structure/tray/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
icon_state = "cremat"
/*
* Morgue tray
*/
/obj/structure/tray/m_tray
name = "morgue tray"
desc = "Apply corpse before closing."
icon_state = "morguet"
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(locate(/obj/structure/table) in get_turf(mover))
return 1
else
return 0
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
/*
* Generic Tray
* Parent class for morguetray and crematoriumtray
* For overriding only
*/
/obj/structure/tray
icon = 'icons/obj/stationobjs.dmi'
density = 1
layer = BELOW_OBJ_LAYER
var/obj/structure/bodycontainer/connected = null
anchored = 1
pass_flags = LETPASSTHROW
obj_integrity = 350
max_integrity = 350
/obj/structure/tray/Destroy()
if(connected)
connected.connected = null
connected.update_icon()
connected = null
return ..()
/obj/structure/tray/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
/obj/structure/tray/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/tray/attack_hand(mob/user)
if (src.connected)
connected.close()
add_fingerprint(user)
else
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
if(!ismob(O))
if(!istype(O, /obj/structure/closet/body_bag))
return
else
var/mob/M = O
if(M.buckled)
return
if(!ismob(user) || user.lying || user.incapacitated())
return
O.loc = src.loc
if (user != O)
visible_message("<span class='warning'>[user] stuffs [O] into [src].</span>")
return
/*
* Crematorium tray
*/
/obj/structure/tray/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
icon_state = "cremat"
/*
* Morgue tray
*/
/obj/structure/tray/m_tray
name = "morgue tray"
desc = "Apply corpse before closing."
icon_state = "morguet"
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(locate(/obj/structure/table) in get_turf(mover))
return 1
else
return 0
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
@@ -30,7 +30,7 @@
if(!petrified_mob)
STOP_PROCESSING(SSobj, src)
timer--
petrified_mob.Stun(2) //So they can't do anything while petrified
petrified_mob.Stun(40) //So they can't do anything while petrified
if(timer <= 0)
STOP_PROCESSING(SSobj, src)
qdel(src)
@@ -50,7 +50,7 @@
if(S.mind)
if(petrified_mob)
S.mind.transfer_to(petrified_mob)
petrified_mob.Weaken(5)
petrified_mob.Knockdown(100)
to_chat(petrified_mob, "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>")
qdel(S)
+2 -2
View File
@@ -55,7 +55,7 @@
switch(anchored)
if(0)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
@@ -66,7 +66,7 @@
to_chat(user, "<span class='notice'>You weld \the [src] to the floor.</span>")
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
+6 -2
View File
@@ -40,11 +40,15 @@
icon_state = "pod_g"
/obj/structure/showcase/oldpod
name = "damage cyrogenic pod"
desc = "A damage cyrogenic pod long since lost to time, including its former occupant..."
name = "damaged cyrogenic pod"
desc = "A damaged cyrogenic pod long since lost to time, including its former occupant..."
icon = 'icons/obj/cryogenic2.dmi'
icon_state = "sleeper-open"
/obj/structure/showcase/oldpod/used
name = "opened cyrogenic pod"
desc = "Cyrogenic pod that has recently discharged its occupand. The pod appears non-functional."
//Deconstructing
//Showcases can be any sprite, so it makes sense that they can't be constructed.
+277 -277
View File
@@ -1,293 +1,293 @@
/obj/structure/sign
icon = 'icons/obj/decals.dmi'
anchored = 1
opacity = 0
density = 0
layer = SIGN_LAYER
obj_integrity = 100
max_integrity = 100
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/buildable_sign = 1 //unwrenchable and modifiable
/obj/structure/sign/basic
name = "blank sign"
desc = "How can signs be real if our eyes aren't real?"
icon_state = "backing"
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/wrench) && buildable_sign)
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
"<span class='notice'>You start unfastening [src].</span>")
playsound(src, O.usesound, 50, 1)
if(!do_after(user, 30*O.toolspeed, target = src))
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
"<span class='notice'>You unfasten [src].</span>")
var/obj/item/sign_backing/SB = new (get_turf(user))
SB.icon_state = icon_state
SB.sign_path = type
qdel(src)
else if(istype(O, /obj/item/weapon/pen) && buildable_sign)
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
if("Blank")
sign_type = /obj/structure/sign/basic
if("Secure Area")
sign_type = /obj/structure/sign/securearea
if("Biohazard")
sign_type = /obj/structure/sign/biohazard
if("High Voltage")
sign_type = /obj/structure/sign/electricshock
if("Radiation")
sign_type = /obj/structure/sign/radiation
if("Hard Vacuum Ahead")
sign_type = /obj/structure/sign/vacuum
if("Disposal: Leads To Space")
sign_type = /obj/structure/sign/deathsposal
if("Danger: Fire")
sign_type = /obj/structure/sign/fire
if("No Smoking")
sign_type = /obj/structure/sign/nosmoking_1
if("Medbay")
sign_type = /obj/structure/sign/bluecross_2
if("Science")
sign_type = /obj/structure/sign/science
if("Chemistry")
sign_type = /obj/structure/sign/chemistry
if("Hydroponics")
sign_type = /obj/structure/sign/botany
if("Xenobiology")
sign_type = /obj/structure/sign/xenobio
//Make sure user is adjacent still
if(!Adjacent(user))
return
if(!sign_type)
return
//It's import to clone the pixel layout information
//Otherwise signs revert to being on the turf and
//move jarringly
var/obj/structure/sign/newsign = new sign_type(get_turf(src))
newsign.pixel_x = pixel_x
newsign.pixel_y = pixel_y
qdel(src)
else
return ..()
/obj/item/sign_backing
name = "sign backing"
desc = "A sign with adhesive backing."
icon = 'icons/obj/decals.dmi'
icon_state = "backing"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf
/obj/item/sign_backing/afterattack(atom/target, mob/user, proximity)
if(isturf(target) && proximity)
var/turf/T = target
user.visible_message("<span class='notice'>[user] fastens [src] to [T].</span>", \
"<span class='notice'>You attach the sign to [T].</span>")
playsound(T, 'sound/items/Deconstruct.ogg', 50, 1)
new sign_path(T)
user.drop_item()
qdel(src)
else
return ..()
/obj/structure/sign/map
name = "station map"
desc = "A framed picture of the station."
obj_integrity = 500
max_integrity = 500
/obj/structure/sign/map/left
icon_state = "map-left"
/obj/structure/sign/map/left/dream
icon_state = "map-left-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/map/right
icon_state = "map-right"
/obj/structure/sign/map/right/dream
icon_state = "map-right-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/map/left/ceres
icon_state = "map-CS"
desc = "A framed picture of the station.\nClockwise from the top, you see Security (<b>red</b>), Dorms (<b>light-green</b>), Bridge (<b>dark-blue</b>), AI Core (<b>gray</b>), \
Cargo (<b>brown</b>), Medbay (<b>blue</b>), Arrivals/Departures(<b>orange/cyan</b>), Research (<b>purple</b>), Service (<b>dark-green</b>), and Engineering in the center (<b>yellow</b>)."
/obj/structure/sign/securearea
name = "\improper SECURE AREA"
desc = "A warning sign which reads 'SECURE AREA'."
icon_state = "securearea"
/obj/structure/sign/biohazard
name = "\improper BIOHAZARD"
/obj/structure/sign
icon = 'icons/obj/decals.dmi'
anchored = 1
opacity = 0
density = 0
layer = SIGN_LAYER
obj_integrity = 100
max_integrity = 100
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/buildable_sign = 1 //unwrenchable and modifiable
/obj/structure/sign/basic
name = "blank sign"
desc = "How can signs be real if our eyes aren't real?"
icon_state = "backing"
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/wrench) && buildable_sign)
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
"<span class='notice'>You start unfastening [src].</span>")
playsound(src, O.usesound, 50, 1)
if(!do_after(user, 30*O.toolspeed, target = src))
return
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
"<span class='notice'>You unfasten [src].</span>")
var/obj/item/sign_backing/SB = new (get_turf(user))
SB.icon_state = icon_state
SB.sign_path = type
qdel(src)
else if(istype(O, /obj/item/weapon/pen) && buildable_sign)
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
if("Blank")
sign_type = /obj/structure/sign/basic
if("Secure Area")
sign_type = /obj/structure/sign/securearea
if("Biohazard")
sign_type = /obj/structure/sign/biohazard
if("High Voltage")
sign_type = /obj/structure/sign/electricshock
if("Radiation")
sign_type = /obj/structure/sign/radiation
if("Hard Vacuum Ahead")
sign_type = /obj/structure/sign/vacuum
if("Disposal: Leads To Space")
sign_type = /obj/structure/sign/deathsposal
if("Danger: Fire")
sign_type = /obj/structure/sign/fire
if("No Smoking")
sign_type = /obj/structure/sign/nosmoking_1
if("Medbay")
sign_type = /obj/structure/sign/bluecross_2
if("Science")
sign_type = /obj/structure/sign/science
if("Chemistry")
sign_type = /obj/structure/sign/chemistry
if("Hydroponics")
sign_type = /obj/structure/sign/botany
if("Xenobiology")
sign_type = /obj/structure/sign/xenobio
//Make sure user is adjacent still
if(!Adjacent(user))
return
if(!sign_type)
return
//It's import to clone the pixel layout information
//Otherwise signs revert to being on the turf and
//move jarringly
var/obj/structure/sign/newsign = new sign_type(get_turf(src))
newsign.pixel_x = pixel_x
newsign.pixel_y = pixel_y
qdel(src)
else
return ..()
/obj/item/sign_backing
name = "sign backing"
desc = "A sign with adhesive backing."
icon = 'icons/obj/decals.dmi'
icon_state = "backing"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf
/obj/item/sign_backing/afterattack(atom/target, mob/user, proximity)
if(isturf(target) && proximity)
var/turf/T = target
user.visible_message("<span class='notice'>[user] fastens [src] to [T].</span>", \
"<span class='notice'>You attach the sign to [T].</span>")
playsound(T, 'sound/items/deconstruct.ogg', 50, 1)
new sign_path(T)
user.drop_item()
qdel(src)
else
return ..()
/obj/structure/sign/map
name = "station map"
desc = "A framed picture of the station."
obj_integrity = 500
max_integrity = 500
/obj/structure/sign/map/left
icon_state = "map-left"
/obj/structure/sign/map/left/dream
icon_state = "map-left-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/map/right
icon_state = "map-right"
/obj/structure/sign/map/right/dream
icon_state = "map-right-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/map/left/ceres
icon_state = "map-CS"
desc = "A framed picture of the station.\nClockwise from the top, you see Security (<b>red</b>), Dorms (<b>light-green</b>), Bridge (<b>dark-blue</b>), AI Core (<b>gray</b>), \
Cargo (<b>brown</b>), Medbay (<b>blue</b>), Arrivals/Departures(<b>orange/cyan</b>), Research (<b>purple</b>), Service (<b>dark-green</b>), and Engineering in the center (<b>yellow</b>)."
/obj/structure/sign/securearea
name = "\improper SECURE AREA"
desc = "A warning sign which reads 'SECURE AREA'."
icon_state = "securearea"
/obj/structure/sign/biohazard
name = "\improper BIOHAZARD"
desc = "A warning sign which reads 'BIOHAZARD'."
icon_state = "bio"
/obj/structure/sign/electricshock
name = "\improper HIGH VOLTAGE"
icon_state = "bio"
/obj/structure/sign/electricshock
name = "\improper HIGH VOLTAGE"
desc = "A warning sign which reads 'HIGH VOLTAGE'."
icon_state = "shock"
/obj/structure/sign/examroom
name = "\improper EXAM ROOM"
icon_state = "shock"
/obj/structure/sign/examroom
name = "\improper EXAM ROOM"
desc = "A guidance sign which reads 'EXAM ROOM'."
icon_state = "examroom"
/obj/structure/sign/vacuum
name = "\improper HARD VACUUM AHEAD"
icon_state = "examroom"
/obj/structure/sign/vacuum
name = "\improper HARD VACUUM AHEAD"
desc = "A warning sign which reads 'HARD VACUUM AHEAD'."
icon_state = "space"
/obj/structure/sign/deathsposal
name = "\improper DISPOSAL: LEADS TO SPACE"
icon_state = "space"
/obj/structure/sign/deathsposal
name = "\improper DISPOSAL: LEADS TO SPACE"
desc = "A warning sign which reads 'DISPOSAL: LEADS TO SPACE'."
icon_state = "deathsposal"
/obj/structure/sign/pods
name = "\improper ESCAPE PODS"
icon_state = "deathsposal"
/obj/structure/sign/pods
name = "\improper ESCAPE PODS"
desc = "A warning sign which reads 'ESCAPE PODS'."
icon_state = "pods"
/obj/structure/sign/fire
name = "\improper DANGER: FIRE"
icon_state = "pods"
/obj/structure/sign/fire
name = "\improper DANGER: FIRE"
desc = "A warning sign which reads 'DANGER: FIRE'."
icon_state = "fire"
/obj/structure/sign/nosmoking_1
name = "\improper NO SMOKING"
icon_state = "fire"
/obj/structure/sign/nosmoking_1
name = "\improper NO SMOKING"
desc = "A warning sign which reads 'NO SMOKING'."
icon_state = "nosmoking"
/obj/structure/sign/nosmoking_2
name = "\improper NO SMOKING"
icon_state = "nosmoking"
/obj/structure/sign/nosmoking_2
name = "\improper NO SMOKING"
desc = "A warning sign which reads 'NO SMOKING'."
icon_state = "nosmoking2"
/obj/structure/sign/radiation
name = "HAZARDOUS RADIATION"
desc = "A warning sign alerting the user of potential radiation hazards."
icon_state = "radiation"
/obj/structure/sign/bluecross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "bluecross"
/obj/structure/sign/bluecross_2
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "bluecross2"
/obj/structure/sign/goldenplaque
name = "The Most Robust Men Award for Robustness"
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
icon_state = "goldenplaque"
/obj/structure/sign/kiddieplaque
name = "AI developers plaque"
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\""
icon_state = "kiddieplaque"
/obj/structure/sign/atmosplaque
name = "\improper FEA Atmospherics Division plaque"
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
icon_state = "atmosplaque"
/obj/structure/sign/nanotrasen
name = "\improper NanoTrasen Logo "
icon_state = "nosmoking2"
/obj/structure/sign/radiation
name = "HAZARDOUS RADIATION"
desc = "A warning sign alerting the user of potential radiation hazards."
icon_state = "radiation"
/obj/structure/sign/bluecross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "bluecross"
/obj/structure/sign/bluecross_2
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "bluecross2"
/obj/structure/sign/goldenplaque
name = "The Most Robust Men Award for Robustness"
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
icon_state = "goldenplaque"
/obj/structure/sign/kiddieplaque
name = "AI developers plaque"
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\""
icon_state = "kiddieplaque"
/obj/structure/sign/atmosplaque
name = "\improper FEA Atmospherics Division plaque"
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
icon_state = "atmosplaque"
/obj/structure/sign/nanotrasen
name = "\improper NanoTrasen Logo "
desc = "A sign with the Nanotrasen Logo on it. Glory to Nanotrasen!"
icon_state = "nanotrasen"
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
name = "\improper SCIENCE"
desc = "A sign labelling an area where research and science is performed."
icon_state = "science1"
/obj/structure/sign/chemistry
name = "\improper CHEMISTRY"
desc = "A sign labelling an area containing chemical equipment."
icon_state = "chemistry1"
/obj/structure/sign/botany
name = "\improper HYDROPONICS"
desc = "A sign labelling an area as a place where plants are grown."
icon_state = "hydro1"
/obj/structure/sign/xenobio
name = "\improper XENOBIOLOGY"
desc = "A sign labelling an area as a place where xenobiological entities are researched."
icon_state = "xenobio"
icon_state = "nanotrasen"
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
name = "\improper SCIENCE"
desc = "A sign labelling an area where research and science is performed."
icon_state = "science1"
/obj/structure/sign/chemistry
name = "\improper CHEMISTRY"
desc = "A sign labelling an area containing chemical equipment."
icon_state = "chemistry1"
/obj/structure/sign/botany
name = "\improper HYDROPONICS"
desc = "A sign labelling an area as a place where plants are grown."
icon_state = "hydro1"
/obj/structure/sign/xenobio
name = "\improper XENOBIOLOGY"
desc = "A sign labelling an area as a place where xenobiological entities are researched."
icon_state = "xenobio"
/obj/structure/sign/xeno_warning_mining
name = "DANGEROUS ALIEN LIFE"
desc = "A sign that warns would-be travellers of hostile alien life in the vicinity."
icon = 'icons/obj/mining.dmi'
icon_state = "xeno_warning"
/obj/structure/sign/enginesafety
name = "\improper ENGINEERING SAFETY"
desc = "A sign detailing the various safety protocols when working on-site to ensure a safe shift."
icon_state = "safety"
/obj/structure/sign/directions/science
name = "science department"
desc = "A direction sign, pointing out which way the Science department is."
icon_state = "direction_sci"
/obj/structure/sign/directions/engineering
name = "engineering department"
desc = "A direction sign, pointing out which way the Engineering department is."
icon_state = "direction_eng"
/obj/structure/sign/directions/security
name = "security department"
desc = "A direction sign, pointing out which way the Security department is."
icon_state = "direction_sec"
/obj/structure/sign/directions/medical
name = "medical bay"
desc = "A direction sign, pointing out which way the Medical Bay is."
icon_state = "direction_med"
/obj/structure/sign/directions/evac
name = "escape arm"
desc = "A direction sign, pointing out which way the escape shuttle dock is."
icon_state = "direction_evac"
/obj/structure/sign/directions/supply
name = "cargo bay"
desc = "A direction sign, pointing out which way the Cargo Bay is."
icon_state = "direction_supply"
/obj/structure/sign/directions/command
name = "command department"
desc = "A direction sign, pointing out which way the Command department is."
icon_state = "direction_bridge"
/obj/structure/sign/enginesafety
name = "\improper ENGINEERING SAFETY"
desc = "A sign detailing the various safety protocols when working on-site to ensure a safe shift."
icon_state = "safety"
/obj/structure/sign/directions/science
name = "science department"
desc = "A direction sign, pointing out which way the Science department is."
icon_state = "direction_sci"
/obj/structure/sign/directions/engineering
name = "engineering department"
desc = "A direction sign, pointing out which way the Engineering department is."
icon_state = "direction_eng"
/obj/structure/sign/directions/security
name = "security department"
desc = "A direction sign, pointing out which way the Security department is."
icon_state = "direction_sec"
/obj/structure/sign/directions/medical
name = "medical bay"
desc = "A direction sign, pointing out which way the Medical Bay is."
icon_state = "direction_med"
/obj/structure/sign/directions/evac
name = "escape arm"
desc = "A direction sign, pointing out which way the escape shuttle dock is."
icon_state = "direction_evac"
/obj/structure/sign/directions/supply
name = "cargo bay"
desc = "A direction sign, pointing out which way the Cargo Bay is."
icon_state = "direction_supply"
/obj/structure/sign/directions/command
name = "command department"
desc = "A direction sign, pointing out which way the Command department is."
icon_state = "direction_bridge"
+2 -2
View File
@@ -43,7 +43,7 @@
anchored = 1
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/welder.ogg', 100, 1)
user.visible_message("[user] is slicing apart the [name]...", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user,40*W.toolspeed, target = src))
@@ -69,7 +69,7 @@
if(do_after(user, 40*W.toolspeed, target = src))
if(!src.loc)
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
deconstruct(TRUE)
+1 -1
View File
@@ -27,7 +27,7 @@
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
deconstruct(TRUE)
else if(istype(I, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/P = I
+7 -7
View File
@@ -90,7 +90,7 @@
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.Weaken(2)
pushed_mob.Knockdown(40)
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
add_logs(user, pushed_mob, "pushed")
@@ -109,7 +109,7 @@
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 40*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
deconstruct(TRUE, 1)
return
@@ -198,7 +198,7 @@
if(M.has_gravity() && M.mob_size > MOB_SIZE_SMALL && !(M.movement_type & FLYING))
table_shatter(M)
/obj/structure/table/glass/proc/table_shatter(mob/M)
/obj/structure/table/glass/proc/table_shatter(mob/living/L)
visible_message("<span class='warning'>[src] breaks!</span>",
"<span class='danger'>You hear breaking glass.</span>")
var/turf/T = get_turf(src)
@@ -208,8 +208,8 @@
AM.forceMove(T)
debris -= AM
if(istype(AM, /obj/item/weapon/shard))
AM.throw_impact(M)
M.Weaken(5)
AM.throw_impact(L)
L.Knockdown(100)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
@@ -451,7 +451,7 @@
attack_hand(user)
/obj/structure/rack/attack_hand(mob/living/user)
if(user.weakened || user.resting || user.lying || user.get_num_legs() < 2)
if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
@@ -467,7 +467,7 @@
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
playsound(loc, 'sound/items/welder.ogg', 40, 1)
/*
* Rack destruction
+109 -109
View File
@@ -1,113 +1,113 @@
#define TANK_DISPENSER_CAPACITY 10
/obj/structure/tank_dispenser
name = "tank dispenser"
desc = "A simple yet bulky storage device for gas tanks. Holds up to 10 oxygen tanks and 10 plasma tanks."
icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
density = 1
anchored = 1
obj_integrity = 300
max_integrity = 300
var/oxygentanks = TANK_DISPENSER_CAPACITY
var/plasmatanks = TANK_DISPENSER_CAPACITY
/obj/structure/tank_dispenser/oxygen
plasmatanks = 0
/obj/structure/tank_dispenser/plasma
oxygentanks = 0
#define TANK_DISPENSER_CAPACITY 10
/obj/structure/tank_dispenser
name = "tank dispenser"
desc = "A simple yet bulky storage device for gas tanks. Holds up to 10 oxygen tanks and 10 plasma tanks."
icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
density = 1
anchored = 1
obj_integrity = 300
max_integrity = 300
var/oxygentanks = TANK_DISPENSER_CAPACITY
var/plasmatanks = TANK_DISPENSER_CAPACITY
/obj/structure/tank_dispenser/oxygen
plasmatanks = 0
/obj/structure/tank_dispenser/plasma
oxygentanks = 0
/obj/structure/tank_dispenser/Initialize()
. = ..()
for(var/i in 1 to oxygentanks)
new /obj/item/weapon/tank/internals/oxygen(src)
for(var/i in 1 to plasmatanks)
new /obj/item/weapon/tank/internals/plasma(src)
update_icon()
for(var/i in 1 to oxygentanks)
new /obj/item/weapon/tank/internals/oxygen(src)
for(var/i in 1 to plasmatanks)
new /obj/item/weapon/tank/internals/plasma(src)
update_icon()
/obj/structure/tank_dispenser/update_icon()
cut_overlays()
switch(oxygentanks)
if(1 to 3)
add_overlay("oxygen-[oxygentanks]")
if(4 to TANK_DISPENSER_CAPACITY)
add_overlay("oxygen-4")
switch(plasmatanks)
if(1 to 4)
add_overlay("plasma-[plasmatanks]")
if(5 to TANK_DISPENSER_CAPACITY)
add_overlay("plasma-5")
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
var/full
if(istype(I, /obj/item/weapon/tank/internals/plasma))
if(plasmatanks < TANK_DISPENSER_CAPACITY)
plasmatanks++
else
full = TRUE
else if(istype(I, /obj/item/weapon/tank/internals/oxygen))
if(oxygentanks < TANK_DISPENSER_CAPACITY)
oxygentanks++
else
full = TRUE
else if(istype(I, /obj/item/weapon/wrench))
default_unfasten_wrench(user, I, time = 20)
return
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='notice'>[I] does not fit into [src].</span>")
return
else
return ..()
if(full)
to_chat(user, "<span class='notice'>[src] can't hold any more of [I].</span>")
return
if(!user.drop_item())
return
I.loc = src
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
/obj/structure/tank_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "tank_dispenser", name, 275, 100, master_ui, state)
ui.open()
/obj/structure/tank_dispenser/ui_data(mob/user)
var/list/data = list()
data["oxygen"] = oxygentanks
data["plasma"] = plasmatanks
return data
/obj/structure/tank_dispenser/ui_act(action, params)
if(..())
return
switch(action)
if("plasma")
var/obj/item/weapon/tank/internals/plasma/tank = locate() in src
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
plasmatanks--
. = TRUE
if("oxygen")
var/obj/item/weapon/tank/internals/oxygen/tank = locate() in src
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
oxygentanks--
. = TRUE
update_icon()
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
for(var/X in src)
var/obj/item/I = X
I.forceMove(loc)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
/obj/structure/tank_dispenser/update_icon()
cut_overlays()
switch(oxygentanks)
if(1 to 3)
add_overlay("oxygen-[oxygentanks]")
if(4 to TANK_DISPENSER_CAPACITY)
add_overlay("oxygen-4")
switch(plasmatanks)
if(1 to 4)
add_overlay("plasma-[plasmatanks]")
if(5 to TANK_DISPENSER_CAPACITY)
add_overlay("plasma-5")
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
var/full
if(istype(I, /obj/item/weapon/tank/internals/plasma))
if(plasmatanks < TANK_DISPENSER_CAPACITY)
plasmatanks++
else
full = TRUE
else if(istype(I, /obj/item/weapon/tank/internals/oxygen))
if(oxygentanks < TANK_DISPENSER_CAPACITY)
oxygentanks++
else
full = TRUE
else if(istype(I, /obj/item/weapon/wrench))
default_unfasten_wrench(user, I, time = 20)
return
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='notice'>[I] does not fit into [src].</span>")
return
else
return ..()
if(full)
to_chat(user, "<span class='notice'>[src] can't hold any more of [I].</span>")
return
if(!user.drop_item())
return
I.loc = src
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
/obj/structure/tank_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "tank_dispenser", name, 275, 100, master_ui, state)
ui.open()
/obj/structure/tank_dispenser/ui_data(mob/user)
var/list/data = list()
data["oxygen"] = oxygentanks
data["plasma"] = plasmatanks
return data
/obj/structure/tank_dispenser/ui_act(action, params)
if(..())
return
switch(action)
if("plasma")
var/obj/item/weapon/tank/internals/plasma/tank = locate() in src
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
plasmatanks--
. = TRUE
if("oxygen")
var/obj/item/weapon/tank/internals/oxygen/tank = locate() in src
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
oxygentanks--
. = TRUE
update_icon()
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
for(var/X in src)
var/obj/item/I = X
I.forceMove(loc)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
#undef TANK_DISPENSER_CAPACITY
@@ -70,7 +70,7 @@
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
if(do_after(user, 15, target = src))
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
GM.Weaken(5)
GM.Knockdown(100)
src.Bumped(GM)
break
else
+4 -4
View File
@@ -81,7 +81,7 @@
/obj/structure/trap/stun/trap_effect(mob/living/L)
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
L.Weaken(5)
L.Knockdown(100)
/obj/structure/trap/fire
name = "flame trap"
@@ -90,7 +90,7 @@
/obj/structure/trap/fire/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>Spontaneous combustion!</B></span>")
L.Weaken(1)
L.Knockdown(20)
/obj/structure/trap/fire/flare()
..()
@@ -104,7 +104,7 @@
/obj/structure/trap/chill/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>You're frozen solid!</B></span>")
L.Weaken(1)
L.Knockdown(20)
L.bodytemperature -= 300
L.apply_status_effect(/datum/status_effect/freon)
@@ -117,7 +117,7 @@
/obj/structure/trap/damage/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>The ground quakes beneath your feet!</B></span>")
L.Weaken(5)
L.Knockdown(100)
L.adjustBruteLoss(35)
/obj/structure/trap/damage/flare()
+4 -5
View File
@@ -281,7 +281,7 @@
var/mob/living/L = O
if(wash_mob(L)) //it's a carbon mob.
var/mob/living/carbon/C = L
C.slip(4,2,null,NO_SLIP_WHEN_WALKING)
C.slip(80,null,NO_SLIP_WHEN_WALKING)
else
wash_obj(O)
@@ -289,7 +289,7 @@
/obj/machinery/shower/proc/wash_obj(atom/movable/O)
O.clean_blood()
if(istype(O,/obj/item))
if(isitem(O))
var/obj/item/I = O
I.acid_level = 0
I.extinguish()
@@ -463,7 +463,7 @@
user.clean_blood()
/obj/structure/sink/attackby(obj/item/O, mob/user, params)
/obj/structure/sink/attackby(obj/item/O, mob/living/user, params)
if(busy)
to_chat(user, "<span class='warning'>Someone's already washing here!</span>")
return
@@ -484,8 +484,7 @@
if(B.cell.charge > 0 && B.status == 1)
flick("baton_active", src)
var/stunforce = B.stunforce
user.Stun(stunforce)
user.Weaken(stunforce)
user.Knockdown(stunforce)
user.stuttering = stunforce
B.deductcharge(B.hitcost)
user.visible_message("<span class='warning'>[user] shocks themself while attempting to wash the active [B.name]!</span>", \
@@ -94,7 +94,7 @@
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
+165 -35
View File
@@ -11,20 +11,22 @@
obj_integrity = 25
var/ini_dir = null
var/state = WINDOW_OUT_OF_FRAME
var/reinf = 0
var/reinf = FALSE
var/heat_resistance = 800
var/decon_speed = 30
var/wtype = "glass"
var/fulltile = 0
var/fulltile = FALSE
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
var/mutable_appearance/crack_overlay
var/list/debris = list()
can_be_unanchored = 1
resistance_flags = ACID_PROOF
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
CanAtmosPass = ATMOS_PASS_PROC
var/real_explosion_block //ignore this, just use explosion_block
var/breaksound = "shatter"
var/hitsound = 'sound/effects/Glasshit.ogg'
/obj/structure/window/examine(mob/user)
..()
@@ -144,7 +146,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(!can_be_reached(user))
@@ -157,7 +159,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("[user] knocks on [src].")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_paw(mob/user)
return attack_hand(user)
@@ -178,10 +180,10 @@
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(loc, WT.usesound, 40, 1)
playsound(src, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src, 'sound/items/Welder2.ogg', 50, 1)
update_nearby_icons()
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
@@ -190,7 +192,7 @@
if(!(flags&NODECONSTRUCT))
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
if(reinf)
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
@@ -214,19 +216,19 @@
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
return
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'> You begin to disassemble [src]...</span>")
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You successfully disassemble [src].</span>")
qdel(src)
return
@@ -265,18 +267,18 @@
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src, hitsound, 75, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/window/deconstruct(disassembled = TRUE)
if(QDELETED(src))
return
if(!disassembled)
playsound(src, "shatter", 70, 1)
playsound(src, breaksound, 70, 1)
var/turf/T = loc
if(!(flags & NODECONSTRUCT))
for(var/i in debris)
@@ -408,7 +410,6 @@
/obj/structure/window/GetExplosionBlock()
return reinf && fulltile ? real_explosion_block : 0
/obj/structure/window/unanchored
anchored = FALSE
@@ -416,21 +417,48 @@
name = "reinforced window"
desc = "A window that is reinforced with metal rods."
icon_state = "rwindow"
reinf = 1
reinf = TRUE
heat_resistance = 1600
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
max_integrity = 50
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/unanchored
anchored = FALSE
/obj/structure/window/plasma
name = "plasma window"
desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through."
icon_state = "plasma_window"
reinf = FALSE
heat_resistance = 25000
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 00, "acid" = 100)
max_integrity = 50
explosion_block = 1
glass_type = /obj/item/stack/sheet/glass/plasma
/obj/structure/window/plasma/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced
name = "reinforced plasma window"
desc = "A window made out of a plasma-silicate alloy and a rod matrice. It looks hopelessly tough to break and is most likely nigh fireproof."
icon_state = "rplasmawindow"
reinf = TRUE
heat_resistance = 50000
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
max_integrity = 100
explosion_block = 2
glass_type = /obj/item/stack/sheet/rglass/plasma
/obj/structure/window/plasma/reinforced/unanchored
anchored = FALSE
/obj/structure/window/reinforced/tinted
name = "tinted window"
icon_state = "twindow"
opacity = 1
/obj/structure/window/reinforced/tinted/frosted
name = "frosted window"
icon_state = "fwindow"
@@ -448,25 +476,52 @@
icon_state = "window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 50
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
glass_amount = 2
/obj/structure/window/fulltile/unanchored
anchored = FALSE
/obj/structure/window/plasma/fulltile
icon = 'icons/obj/smooth_structures/plasma_window.dmi'
icon_state = "plasma_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 60
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
glass_amount = 2
/obj/structure/window/plasma/fulltile/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced/fulltile
icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
icon_state = "rplasma_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
glass_amount = 2
/obj/structure/window/plasma/reinforced/fulltile/unanchored
anchored = FALSE
/obj/structure/window/reinforced/fulltile
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
icon_state = "r_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -475,10 +530,10 @@
icon_state = "r_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 1000
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -489,10 +544,10 @@
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
icon_state = "tinted_window"
dir = FULLTILE_WINDOW_DIR
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile/)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -500,7 +555,7 @@
icon = 'icons/obj/smooth_structures/rice_window.dmi'
icon_state = "ice_window"
max_integrity = 150
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -512,11 +567,11 @@
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
wtype = "shuttle"
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
reinf = 1
reinf = TRUE
heat_resistance = 1600
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
smooth = SMOOTH_TRUE
canSmoothWith = null
explosion_block = 1
@@ -537,7 +592,7 @@
icon_state = "clockwork_window_single"
resistance_flags = FIRE_PROOF | ACID_PROOF
max_integrity = 80
armor = list(melee = 60, bullet = 25, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
decon_speed = 40
glass_type = /obj/item/stack/tile/brass
@@ -549,9 +604,7 @@
if(fulltile)
made_glow = TRUE
..()
for(var/obj/item/I in debris)
debris -= I
qdel(I)
QDEL_LIST(debris)
var/amount_of_gears = 2
if(fulltile)
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
@@ -591,7 +644,7 @@
icon_state = "clockwork_window"
smooth = SMOOTH_TRUE
canSmoothWith = null
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
@@ -600,3 +653,80 @@
/obj/structure/window/reinforced/clockwork/fulltile/unanchored
anchored = FALSE
/obj/structure/window/paperframe
name = "paper frame"
desc = "A fragile separator made of thin wood and paper."
icon = 'icons/obj/smooth_structures/paperframes.dmi'
icon_state = "frame"
dir = FULLTILE_WINDOW_DIR
opacity = TRUE
max_integrity = 15
obj_integrity = 15
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe)
glass_amount = 2
glass_type = /obj/item/stack/sheet/paperframes
heat_resistance = 233
decon_speed = 10
CanAtmosPass = ATMOS_PASS_YES
resistance_flags = FLAMMABLE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
breaksound = 'sound/items/poster_ripped.ogg'
hitsound = 'sound/weapons/slashmiss.ogg'
var/static/mutable_appearance/torn = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "torn", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/paper = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "paper", layer = ABOVE_OBJ_LAYER - 0.1)
/obj/structure/window/paperframe/Initialize()
. = ..()
QDEL_LIST(debris)
var/papers = rand(1,4)
debris += new /obj/item/stack/sheet/mineral/wood()
for(var/i in 1 to papers)
debris += new /obj/item/weapon/paper/natural()
update_icon()
/obj/structure/window/paperframe/attack_hand(mob/user)
add_fingerprint(user)
if(user.a_intent != INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("[user] knocks on [src].")
playsound(src, "pageturn", 50, 1)
else
take_damage(4,BRUTE,"melee", 0)
playsound(src, hitsound, 50, 1)
if(!QDELETED(src))
user.visible_message("<span class='danger'>[user] tears a hole in [src].</span>")
update_icon()
/obj/structure/window/paperframe/update_icon()
if(obj_integrity < max_integrity)
cut_overlay(paper)
add_overlay(torn)
set_opacity(FALSE)
else
cut_overlay(torn)
add_overlay(paper)
set_opacity(TRUE)
queue_smooth(src)
/obj/structure/window/paperframe/attackby(obj/item/weapon/W, mob/user)
if(W.is_hot())
fire_act(W.is_hot())
return
if(user.a_intent == INTENT_HARM)
return ..()
if(istype(W, /obj/item/weapon/paper) && obj_integrity < max_integrity)
user.visible_message("[user] starts to patch the holes in \the [src].")
if(do_after(user, 20, target = src))
obj_integrity = min(obj_integrity+4,max_integrity)
qdel(W)
user.visible_message("[user] patches some of the holes in \the [src].")
if(obj_integrity == max_integrity)
update_icon()
return
..()
update_icon()