Merge branch 'master' into upstream-merge-30079
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
diff a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm (rejected hunks)
|
||||
@@ -535,15 +535,15 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/crew_quarters/toilet/fitness
|
||||
name = "Fitness Toilets"
|
||||
icon_state = "toilet"
|
||||
-
|
||||
+
|
||||
/area/crew_quarters/toilet/female
|
||||
name = "Female Toilets"
|
||||
icon_state = "toilet"
|
||||
-
|
||||
+
|
||||
/area/crew_quarters/toilet/male
|
||||
name = "Male Toilets"
|
||||
icon_state = "toilet"
|
||||
-
|
||||
+
|
||||
/area/crew_quarters/toilet/restrooms
|
||||
name = "Restrooms"
|
||||
icon_state = "toilet"
|
||||
@@ -1009,7 +1009,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
/area/security/execution/transfer
|
||||
name = "Transfer Centre"
|
||||
-
|
||||
+
|
||||
/area/security/execution/education
|
||||
name = "Prisoner Education Chamber"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/area/areas.dm b/code/game/area/areas.dm (rejected hunks)
|
||||
@@ -432,7 +432,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
|
||||
L.client.ambience_playing = 1
|
||||
- L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ)
|
||||
+ SEND_SOUND(L, sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ))
|
||||
|
||||
if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)))
|
||||
return //General ambience check is below the ship ambience so one can play without the other
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
#ifndef PIXEL_SCALE
|
||||
#define PIXEL_SCALE 0
|
||||
#if DM_VERSION >= 512
|
||||
#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/atom/movable
|
||||
layer = OBJ_LAYER
|
||||
var/last_move = null
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
new_objective.explanation_text = "Protect [usr.real_name], the wizard."
|
||||
M.mind.objectives += new_objective
|
||||
SSticker.mode.apprentices += M.mind
|
||||
M.mind.assigned_role = "Apprentice"
|
||||
M.mind.special_role = "apprentice"
|
||||
SSticker.mode.update_wiz_icons_added(M.mind)
|
||||
SEND_SOUND(M, sound('sound/effects/magic.ogg'))
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
diff a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm (rejected hunks)
|
||||
@@ -108,6 +108,7 @@
|
||||
new_objective.explanation_text = "Protect [usr.real_name], the wizard."
|
||||
M.mind.objectives += new_objective
|
||||
SSticker.mode.apprentices += M.mind
|
||||
+ M.mind.assigned_role = "Apprentice"
|
||||
M.mind.special_role = "apprentice"
|
||||
SSticker.mode.update_wiz_icons_added(M.mind)
|
||||
M << sound('sound/effects/magic.ogg')
|
||||
@@ -7,11 +7,9 @@
|
||||
brute_resist = 0.25
|
||||
explosion_block = 3
|
||||
point_return = 4
|
||||
atmosblock = 1
|
||||
atmosblock = TRUE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90)
|
||||
|
||||
|
||||
|
||||
/obj/structure/blob/shield/scannerreport()
|
||||
if(atmosblock)
|
||||
return "Will prevent the spread of atmospheric changes."
|
||||
@@ -26,10 +24,10 @@
|
||||
icon_state = "blob_shield_damaged"
|
||||
name = "weakened strong blob"
|
||||
desc = "A wall of twitching tendrils."
|
||||
atmosblock = 0
|
||||
atmosblock = FALSE
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
atmosblock = 1
|
||||
air_update_turf(1)
|
||||
atmosblock = TRUE
|
||||
air_update_turf(1)
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm (rejected hunks)
|
||||
@@ -175,7 +175,7 @@
|
||||
SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg'))
|
||||
to_chat(blobber, "<b>You are a blobbernaut!</b>")
|
||||
to_chat(blobber, "You are powerful, hard to kill, and slowly regenerate near nodes and cores, but will slowly die if not near the blob or if the factory that made you is killed.")
|
||||
- to_chat(blobber, "You can communicate with other blobbernauts and GLOB.overminds via <b>:b</b>")
|
||||
+ to_chat(blobber, "You can communicate with other blobbernauts and overminds via <b>:b</b>")
|
||||
to_chat(blobber, "Your overmind's blob reagent is: <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font>!")
|
||||
to_chat(blobber, "The <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font> reagent [blob_reagent_datum.shortdesc ? "[blob_reagent_datum.shortdesc]" : "[blob_reagent_datum.description]"]")
|
||||
if(blobber)
|
||||
@@ -8,6 +8,7 @@
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
layer = BELOW_MOB_LAYER
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
var/point_return = 0 //How many points the blob gets back when it removes a blob of that type. If less than 0, blob cannot be removed.
|
||||
max_integrity = 30
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 70)
|
||||
@@ -16,19 +17,9 @@
|
||||
var/heal_timestamp = 0 //we got healed when?
|
||||
var/brute_resist = 0.5 //multiplies brute damage by this
|
||||
var/fire_resist = 1 //multiplies burn damage by this
|
||||
var/atmosblock = 0 //if the blob blocks atmos and heat spread
|
||||
var/atmosblock = FALSE //if the blob blocks atmos and heat spread
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
/obj/structure/blob/attack_hand(mob/M)
|
||||
. = ..()
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
var/a = pick("gently stroke", "nuzzle", "affectionatly pet", "cuddle")
|
||||
M.visible_message("<span class='notice'>[M] [a]s [src]!</span>", "<span class='notice'>You [a] [src]!</span>")
|
||||
to_chat(overmind, "<span class='notice'>[M] [a]s you!</span>")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 50, 1) //SQUISH SQUISH
|
||||
|
||||
|
||||
|
||||
/obj/structure/blob/Initialize()
|
||||
var/area/Ablob = get_area(loc)
|
||||
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
|
||||
@@ -37,17 +28,16 @@
|
||||
setDir(pick(GLOB.cardinals))
|
||||
update_icon()
|
||||
.= ..()
|
||||
ConsumeTile()
|
||||
if(atmosblock)
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
air_update_turf(1)
|
||||
ConsumeTile()
|
||||
|
||||
/obj/structure/blob/proc/creation_action() //When it's created by the overmind, do this.
|
||||
return
|
||||
|
||||
/obj/structure/blob/Destroy()
|
||||
if(atmosblock)
|
||||
atmosblock = 0
|
||||
atmosblock = FALSE
|
||||
air_update_turf(1)
|
||||
GLOB.blobs_legit -= src //if it was in the legit blobs list, it isn't now
|
||||
GLOB.blobs -= src //it's no longer in the all blobs list either
|
||||
@@ -79,6 +69,9 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/blob/CanAtmosPass(turf/T)
|
||||
return !atmosblock
|
||||
|
||||
/obj/structure/blob/CanAStarPass(ID, dir, caller)
|
||||
. = 0
|
||||
if(ismovableatom(caller))
|
||||
@@ -353,4 +346,4 @@
|
||||
icon_state = "blob"
|
||||
name = "blob"
|
||||
desc = "A thick wall of writhing tendrils."
|
||||
brute_resist = 0.25
|
||||
brute_resist = 0.25
|
||||
@@ -1,19 +0,0 @@
|
||||
diff a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm (rejected hunks)
|
||||
@@ -395,7 +395,7 @@
|
||||
/obj/item/shield/changeling
|
||||
name = "shield-like mass"
|
||||
desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield."
|
||||
- flags = ABSTRACT | NODROP | DROPDEL
|
||||
+ flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "ling_shield"
|
||||
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
|
||||
@@ -443,7 +443,7 @@
|
||||
name = "flesh mass"
|
||||
icon_state = "lingspacesuit"
|
||||
desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel."
|
||||
- flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
|
||||
+ flags_1 = STOPSPRESSUREDMAGE_1 | NODROP_1 | DROPDEL_1 //Not THICKMATERIAL_1 because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) //No armor at all.
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
playsound(targetturf, 'sound/magic/staff_healing.ogg', 50, 1)
|
||||
|
||||
if(has_holy_water)
|
||||
L.reagents.remove_reagent("holywater", 1000)
|
||||
L.reagents.del_reagent("holywater")
|
||||
|
||||
remove_ranged_ability()
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/clock_cult/clock_items/ratvarian_spear.dm b/code/game/gamemodes/clock_cult/clock_items/ratvarian_spear.dm (rejected hunks)
|
||||
@@ -6,6 +6,8 @@
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
icon_state = "ratvarian_spear"
|
||||
item_state = "ratvarian_spear"
|
||||
+ lefthand_file = 'icons/mob/inhands/antag/clockwork_lefthand.dmi'
|
||||
+ righthand_file = 'icons/mob/inhands/antag/clockwork_righthand.dmi'
|
||||
force = 15 //Extra damage is dealt to targets in attack()
|
||||
throwforce = 25
|
||||
armour_penetration = 10
|
||||
@@ -3,8 +3,10 @@
|
||||
desc = "A sword humming with unholy energy. It glows with a dim red light."
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
flags_1 = CONDUCT_1
|
||||
sharpness = IS_SHARP
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
@@ -55,6 +57,8 @@
|
||||
item_state = "knife"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
inhand_x_dimension = 32
|
||||
inhand_y_dimension = 32
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 15
|
||||
throwforce = 25
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm (rejected hunks)
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/item/melee/cultblade/ghost
|
||||
name = "eldritch sword"
|
||||
force = 19 //can't break normal airlocks
|
||||
- flags = NODROP|DROPDEL
|
||||
+ flags_1 = NODROP_1|DROPDEL_1
|
||||
|
||||
/obj/item/melee/cultblade/pickup(mob/living/user)
|
||||
..()
|
||||
@@ -913,7 +913,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/list/ghosts_on_rune = list()
|
||||
for(var/mob/dead/observer/O in get_turf(src))
|
||||
if(O.client && !jobban_isbanned(O, ROLE_CULTIST))
|
||||
ghosts_on_rune |= O
|
||||
ghosts_on_rune += O
|
||||
if(!ghosts_on_rune.len)
|
||||
to_chat(user, "<span class='cultitalic'>There are no spirits near [src]!</span>")
|
||||
fail_invoke()
|
||||
@@ -926,9 +926,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/list/ghosts_on_rune = list()
|
||||
for(var/mob/dead/observer/O in get_turf(src))
|
||||
if(O.client && !jobban_isbanned(O, ROLE_CULTIST))
|
||||
ghosts_on_rune |= O
|
||||
ghosts_on_rune += O
|
||||
var/mob/dead/observer/ghost_to_spawn = pick(ghosts_on_rune)
|
||||
var/mob/living/carbon/human/new_human = new(get_turf(src))
|
||||
var/mob/living/carbon/human/cult_ghost/new_human = new(get_turf(src))
|
||||
new_human.real_name = ghost_to_spawn.real_name
|
||||
new_human.alpha = 150 //Makes them translucent
|
||||
new_human.equipOutfit(/datum/outfit/ghost_cultist) //give them armor
|
||||
@@ -959,3 +959,12 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
for(var/obj/I in new_human)
|
||||
new_human.dropItemToGround(I, TRUE)
|
||||
new_human.dust()
|
||||
|
||||
/mob/living/carbon/human/cult_ghost/spill_organs(no_brain, no_organs, no_bodyparts) //cult ghosts never drop a brain
|
||||
no_brain = TRUE
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/cult_ghost/getorganszone(zone, subzones = 0)
|
||||
. = ..()
|
||||
for(var/obj/item/organ/brain/B in .) //they're not that smart, really
|
||||
. -= B
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm (rejected hunks)
|
||||
@@ -343,7 +343,7 @@
|
||||
desc = "Shackles that bind the wrists with sinister magic."
|
||||
trashtype = /obj/item/restraints/handcuffs/energy/used
|
||||
origin_tech = "materials=2;magnets=5"
|
||||
- flags = DROPDEL
|
||||
+ flags_1 = DROPDEL_1
|
||||
|
||||
/obj/item/restraints/handcuffs/energy/cult/used/dropped(mob/user)
|
||||
user.visible_message("<span class='danger'>[user]'s shackles shatter in a discharge of dark magic!</span>", \
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm (rejected hunks)
|
||||
@@ -499,7 +499,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
|
||||
/obj/item/restraints/handcuffs/energy/used
|
||||
desc = "energy discharge"
|
||||
- flags = DROPDEL
|
||||
+ flags_1 = DROPDEL_1
|
||||
|
||||
/obj/item/restraints/handcuffs/energy/used/dropped(mob/user)
|
||||
user.visible_message("<span class='danger'>[user]'s [src] break in a discharge of energy!</span>", \
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/gamemodes/miniantags/abduction/abduction_outfits.dm b/code/game/gamemodes/miniantags/abduction/abduction_outfits.dm (rejected hunks)
|
||||
@@ -23,7 +23,7 @@
|
||||
var/obj/item/clothing/suit/armor/abductor/vest/V = locate() in H
|
||||
if(V)
|
||||
console.AddVest(V)
|
||||
- V.flags |= NODROP
|
||||
+ V.flags_1 |= NODROP_1
|
||||
|
||||
var/obj/item/storage/backpack/B = locate() in H
|
||||
if(B)
|
||||
@@ -1,8 +1,8 @@
|
||||
/datum/round_event_control/spawn_swarmer
|
||||
name = "Spawn Swarmer Shell"
|
||||
typepath = /datum/round_event/spawn_swarmer
|
||||
weight = 7
|
||||
max_occurrences = 1 //Only once okay fam
|
||||
weight = 0
|
||||
max_occurrences = 0 //Only once okay fam
|
||||
earliest_start = 18000 //30 minutes
|
||||
min_players = 15
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
attack_sound = 'sound/effects/blobattack.ogg'
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2)
|
||||
|
||||
var/morphed = 0
|
||||
var/morphed = FALSE
|
||||
var/atom/movable/form = null
|
||||
var/morph_time = 0
|
||||
var/static/list/blacklist_typecache = typecacheof(list(
|
||||
@@ -93,7 +93,10 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/assume(atom/movable/target)
|
||||
morphed = 1
|
||||
if(morphed)
|
||||
to_chat(src, "<span class='warning'>You must restore to your original form first!</span>")
|
||||
return
|
||||
morphed = TRUE
|
||||
form = target
|
||||
|
||||
visible_message("<span class='warning'>[src] suddenly twists and changes shape, becoming a copy of [target]!</span>", \
|
||||
@@ -117,8 +120,9 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/restore()
|
||||
if(!morphed)
|
||||
to_chat(src, "<span class='warning'>You're already in your normal form!</span>")
|
||||
return
|
||||
morphed = 0
|
||||
morphed = FALSE
|
||||
form = null
|
||||
alpha = initial(alpha)
|
||||
color = initial(color)
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
/obj/machinery/button/emag_act(mob/user)
|
||||
if(emagged)
|
||||
return
|
||||
req_access = null
|
||||
req_one_access = null
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
playsound(src, "sparks", 100, 1)
|
||||
emagged = TRUE
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
human = 1
|
||||
|
||||
var/name = M.name
|
||||
if (name in track.names)
|
||||
while(name in track.names)
|
||||
track.namecounts[name]++
|
||||
name = text("[] ([])", name, track.namecounts[name])
|
||||
else
|
||||
track.names.Add(name)
|
||||
track.namecounts[name] = 1
|
||||
track.names.Add(name)
|
||||
track.namecounts[name] = 1
|
||||
|
||||
if(human)
|
||||
track.humans[name] = M
|
||||
else
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm (rejected hunks)
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
|
||||
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(state == 4)
|
||||
new /obj/item/shard(loc)
|
||||
new /obj/item/shard(loc)
|
||||
+352
-352
@@ -1,352 +1,352 @@
|
||||
/obj/machinery/door
|
||||
name = "door"
|
||||
desc = "It opens and closes."
|
||||
icon = 'icons/obj/doors/Doorint.dmi'
|
||||
icon_state = "door1"
|
||||
anchored = TRUE
|
||||
opacity = 1
|
||||
density = TRUE
|
||||
layer = OPEN_DOOR_LAYER
|
||||
power_channel = ENVIRON
|
||||
max_integrity = 350
|
||||
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
flags_1 = PREVENT_CLICK_UNDER_1
|
||||
|
||||
var/secondsElectrified = 0
|
||||
var/shockedby = list()
|
||||
var/visible = TRUE
|
||||
var/operating = FALSE
|
||||
var/glass = FALSE
|
||||
var/welded = FALSE
|
||||
var/normalspeed = 1
|
||||
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
|
||||
var/emergency = FALSE // Emergency access override
|
||||
var/sub_door = FALSE // true if it's meant to go under another door.
|
||||
var/closingLayer = CLOSED_DOOR_LAYER
|
||||
var/autoclose = FALSE //does it automatically close after some time
|
||||
var/safe = TRUE //whether the door detects things and mobs in its way and reopen or crushes them.
|
||||
var/locked = FALSE //whether the door is bolted or not.
|
||||
var/assemblytype //the type of door frame to drop during deconstruction
|
||||
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/damage_deflection = 10
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
|
||||
/obj/machinery/door/New()
|
||||
..()
|
||||
if(density)
|
||||
layer = CLOSED_DOOR_LAYER //Above most items if closed
|
||||
else
|
||||
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
update_freelook_sight()
|
||||
air_update_turf(1)
|
||||
GLOB.airlocks += src
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(2, 1, src)
|
||||
|
||||
//doors only block while dense though so we have to use the proc
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
GLOB.airlocks -= src
|
||||
if(spark_system)
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
return ..()
|
||||
|
||||
//process()
|
||||
//return
|
||||
|
||||
/obj/machinery/door/CollidedWith(atom/movable/AM)
|
||||
if(operating || emagged)
|
||||
return
|
||||
if(ismob(AM))
|
||||
var/mob/B = AM
|
||||
if((isdrone(B) || iscyborg(B)) && B.stat)
|
||||
return
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if(world.time - M.last_bumped <= 10)
|
||||
return //Can bump-open one airlock per second. This is to prevent shock spam.
|
||||
M.last_bumped = world.time
|
||||
if(M.restrained() && !check_access(null))
|
||||
return
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density)
|
||||
if(mecha.occupant)
|
||||
if(world.time - mecha.occupant.last_bumped <= 10)
|
||||
return
|
||||
mecha.occupant.last_bumped = world.time
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
open()
|
||||
else
|
||||
do_animate("deny")
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/door/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/machinery/door/proc/bumpopen(mob/user)
|
||||
if(operating)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
if(density && !emagged)
|
||||
if(allowed(user))
|
||||
open()
|
||||
else
|
||||
do_animate("deny")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door/attack_hand(mob/user)
|
||||
return try_to_activate_door(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_tk(mob/user)
|
||||
if(requiresID() && !allowed(null))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/door/proc/try_to_activate_door(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(operating || emagged)
|
||||
return
|
||||
if(!requiresID())
|
||||
user = null //so allowed(user) always succeeds
|
||||
if(allowed(user))
|
||||
if(density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
if(density)
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/allowed(mob/M)
|
||||
if(emergency)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
|
||||
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
|
||||
try_to_crowbar(I, user)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
try_to_weld(I, user)
|
||||
return 1
|
||||
else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
|
||||
try_to_activate_door(user)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee" && damage_amount < damage_deflection)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
if(damage_amount >= 10 && prob(30))
|
||||
spark_system.start()
|
||||
|
||||
/obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(glass)
|
||||
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
|
||||
else if(damage_amount)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/door/emp_act(severity)
|
||||
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
if(prob(40/severity))
|
||||
if(secondsElectrified == 0)
|
||||
secondsElectrified = -1
|
||||
shockedby += "\[[time_stamp()]\]EM Pulse"
|
||||
addtimer(CALLBACK(src, .proc/unelectrify), 300)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = 0
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
|
||||
/obj/machinery/door/proc/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
if(panel_open)
|
||||
flick("o_doorc0", src)
|
||||
else
|
||||
flick("doorc0", src)
|
||||
if("closing")
|
||||
if(panel_open)
|
||||
flick("o_doorc1", src)
|
||||
else
|
||||
flick("doorc1", src)
|
||||
if("deny")
|
||||
if(!stat)
|
||||
flick("door_deny", src)
|
||||
|
||||
|
||||
/obj/machinery/door/proc/open()
|
||||
if(!density)
|
||||
return 1
|
||||
if(operating)
|
||||
return
|
||||
operating = TRUE
|
||||
do_animate("opening")
|
||||
set_opacity(0)
|
||||
sleep(5)
|
||||
density = FALSE
|
||||
sleep(5)
|
||||
layer = OPEN_DOOR_LAYER
|
||||
update_icon()
|
||||
set_opacity(0)
|
||||
operating = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
if(autoclose)
|
||||
spawn(autoclose)
|
||||
close()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/close()
|
||||
if(density)
|
||||
return 1
|
||||
if(operating)
|
||||
return
|
||||
if(safe)
|
||||
for(var/atom/movable/M in get_turf(src))
|
||||
if(M.density && M != src) //something is blocking the door
|
||||
if(autoclose)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 60)
|
||||
return
|
||||
operating = TRUE
|
||||
|
||||
do_animate("closing")
|
||||
layer = closingLayer
|
||||
sleep(5)
|
||||
density = TRUE
|
||||
sleep(5)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
set_opacity(1)
|
||||
operating = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
if(safe)
|
||||
CheckForMobs()
|
||||
else
|
||||
crush()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/CheckForMobs()
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
sleep(1)
|
||||
open()
|
||||
|
||||
/obj/machinery/door/proc/crush()
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
|
||||
if(isalien(L)) //For xenos
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
|
||||
L.emote("roar")
|
||||
else if(ishuman(L)) //For humans
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.emote("scream")
|
||||
L.Knockdown(100)
|
||||
else if(ismonkey(L)) //For monkeys
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.Knockdown(100)
|
||||
else //for simple_animals & borgs
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
var/turf/location = get_turf(src)
|
||||
//add_blood doesn't work for borgs/xenos, but add_blood_floor does.
|
||||
L.add_splatter_floor(location)
|
||||
for(var/obj/mecha/M in get_turf(src))
|
||||
M.take_damage(DOOR_CRUSH_DAMAGE)
|
||||
|
||||
/obj/machinery/door/proc/autoclose()
|
||||
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
|
||||
close()
|
||||
|
||||
/obj/machinery/door/proc/requiresID()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/hasPower()
|
||||
return !(stat & NOPOWER)
|
||||
|
||||
/obj/machinery/door/proc/update_freelook_sight()
|
||||
if(!glass && GLOB.cameranet)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
|
||||
if(opacity || heat_proof)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
|
||||
/obj/machinery/door/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/proc/lock()
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/unlock()
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
|
||||
if(!stat) //So that only powered doors are closed.
|
||||
close() //Close ALL the doors!
|
||||
|
||||
/obj/machinery/door/proc/disable_lockdown()
|
||||
if(!stat) //Opens only powered doors.
|
||||
open() //Open everything!
|
||||
|
||||
/obj/machinery/door/ex_act(severity, target)
|
||||
//if it blows up a wall it should blow up a door
|
||||
..(severity ? max(1, severity - 1) : 0, target)
|
||||
|
||||
/obj/machinery/door/GetExplosionBlock()
|
||||
return density ? real_explosion_block : 0
|
||||
/obj/machinery/door
|
||||
name = "door"
|
||||
desc = "It opens and closes."
|
||||
icon = 'icons/obj/doors/Doorint.dmi'
|
||||
icon_state = "door1"
|
||||
anchored = TRUE
|
||||
opacity = 1
|
||||
density = TRUE
|
||||
layer = OPEN_DOOR_LAYER
|
||||
power_channel = ENVIRON
|
||||
max_integrity = 350
|
||||
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
flags_1 = PREVENT_CLICK_UNDER_1
|
||||
|
||||
var/secondsElectrified = 0
|
||||
var/shockedby = list()
|
||||
var/visible = TRUE
|
||||
var/operating = FALSE
|
||||
var/glass = FALSE
|
||||
var/welded = FALSE
|
||||
var/normalspeed = 1
|
||||
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
|
||||
var/emergency = FALSE // Emergency access override
|
||||
var/sub_door = FALSE // true if it's meant to go under another door.
|
||||
var/closingLayer = CLOSED_DOOR_LAYER
|
||||
var/autoclose = FALSE //does it automatically close after some time
|
||||
var/safe = TRUE //whether the door detects things and mobs in its way and reopen or crushes them.
|
||||
var/locked = FALSE //whether the door is bolted or not.
|
||||
var/assemblytype //the type of door frame to drop during deconstruction
|
||||
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/damage_deflection = 10
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
|
||||
/obj/machinery/door/New()
|
||||
..()
|
||||
if(density)
|
||||
layer = CLOSED_DOOR_LAYER //Above most items if closed
|
||||
else
|
||||
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
update_freelook_sight()
|
||||
air_update_turf(1)
|
||||
GLOB.airlocks += src
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(2, 1, src)
|
||||
|
||||
//doors only block while dense though so we have to use the proc
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
GLOB.airlocks -= src
|
||||
if(spark_system)
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
return ..()
|
||||
|
||||
//process()
|
||||
//return
|
||||
|
||||
/obj/machinery/door/CollidedWith(atom/movable/AM)
|
||||
if(operating || emagged)
|
||||
return
|
||||
if(ismob(AM))
|
||||
var/mob/B = AM
|
||||
if((isdrone(B) || iscyborg(B)) && B.stat)
|
||||
return
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if(world.time - M.last_bumped <= 10)
|
||||
return //Can bump-open one airlock per second. This is to prevent shock spam.
|
||||
M.last_bumped = world.time
|
||||
if(M.restrained() && !check_access(null))
|
||||
return
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density)
|
||||
if(mecha.occupant)
|
||||
if(world.time - mecha.occupant.last_bumped <= 10)
|
||||
return
|
||||
mecha.occupant.last_bumped = world.time
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
open()
|
||||
else
|
||||
do_animate("deny")
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/door/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/machinery/door/proc/bumpopen(mob/user)
|
||||
if(operating)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
if(density && !emagged)
|
||||
if(allowed(user))
|
||||
open()
|
||||
else
|
||||
do_animate("deny")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door/attack_hand(mob/user)
|
||||
return try_to_activate_door(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_tk(mob/user)
|
||||
if(requiresID() && !allowed(null))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/door/proc/try_to_activate_door(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(operating || emagged)
|
||||
return
|
||||
if(!requiresID())
|
||||
user = null //so allowed(user) always succeeds
|
||||
if(allowed(user))
|
||||
if(density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
if(density)
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/allowed(mob/M)
|
||||
if(emergency)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
|
||||
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
|
||||
try_to_crowbar(I, user)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
try_to_weld(I, user)
|
||||
return 1
|
||||
else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
|
||||
try_to_activate_door(user)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee" && damage_amount < damage_deflection)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
if(damage_amount >= 10 && prob(30))
|
||||
spark_system.start()
|
||||
|
||||
/obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(glass)
|
||||
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
|
||||
else if(damage_amount)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/door/emp_act(severity)
|
||||
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
if(prob(40/severity))
|
||||
if(secondsElectrified == 0)
|
||||
secondsElectrified = -1
|
||||
shockedby += "\[[time_stamp()]\]EM Pulse"
|
||||
addtimer(CALLBACK(src, .proc/unelectrify), 300)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = 0
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
|
||||
/obj/machinery/door/proc/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
if(panel_open)
|
||||
flick("o_doorc0", src)
|
||||
else
|
||||
flick("doorc0", src)
|
||||
if("closing")
|
||||
if(panel_open)
|
||||
flick("o_doorc1", src)
|
||||
else
|
||||
flick("doorc1", src)
|
||||
if("deny")
|
||||
if(!stat)
|
||||
flick("door_deny", src)
|
||||
|
||||
|
||||
/obj/machinery/door/proc/open()
|
||||
if(!density)
|
||||
return 1
|
||||
if(operating)
|
||||
return
|
||||
operating = TRUE
|
||||
do_animate("opening")
|
||||
set_opacity(0)
|
||||
sleep(5)
|
||||
density = FALSE
|
||||
sleep(5)
|
||||
layer = OPEN_DOOR_LAYER
|
||||
update_icon()
|
||||
set_opacity(0)
|
||||
operating = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
if(autoclose)
|
||||
spawn(autoclose)
|
||||
close()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/close()
|
||||
if(density)
|
||||
return 1
|
||||
if(operating)
|
||||
return
|
||||
if(safe)
|
||||
for(var/atom/movable/M in get_turf(src))
|
||||
if(M.density && M != src) //something is blocking the door
|
||||
if(autoclose)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 60)
|
||||
return
|
||||
operating = TRUE
|
||||
|
||||
do_animate("closing")
|
||||
layer = closingLayer
|
||||
sleep(5)
|
||||
density = TRUE
|
||||
sleep(5)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
set_opacity(1)
|
||||
operating = FALSE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
if(safe)
|
||||
CheckForMobs()
|
||||
else
|
||||
crush()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/CheckForMobs()
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
sleep(1)
|
||||
open()
|
||||
|
||||
/obj/machinery/door/proc/crush()
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
|
||||
if(isalien(L)) //For xenos
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
|
||||
L.emote("roar")
|
||||
else if(ishuman(L)) //For humans
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.emote("scream")
|
||||
L.Knockdown(100)
|
||||
else if(ismonkey(L)) //For monkeys
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.Knockdown(100)
|
||||
else //for simple_animals & borgs
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
var/turf/location = get_turf(src)
|
||||
//add_blood doesn't work for borgs/xenos, but add_blood_floor does.
|
||||
L.add_splatter_floor(location)
|
||||
for(var/obj/mecha/M in get_turf(src))
|
||||
M.take_damage(DOOR_CRUSH_DAMAGE)
|
||||
|
||||
/obj/machinery/door/proc/autoclose()
|
||||
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
|
||||
close()
|
||||
|
||||
/obj/machinery/door/proc/requiresID()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/hasPower()
|
||||
return !(stat & NOPOWER)
|
||||
|
||||
/obj/machinery/door/proc/update_freelook_sight()
|
||||
if(!glass && GLOB.cameranet)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
|
||||
if(opacity || heat_proof)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
|
||||
/obj/machinery/door/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return null
|
||||
|
||||
/obj/machinery/door/proc/lock()
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/unlock()
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
|
||||
if(!stat) //So that only powered doors are closed.
|
||||
close() //Close ALL the doors!
|
||||
|
||||
/obj/machinery/door/proc/disable_lockdown()
|
||||
if(!stat) //Opens only powered doors.
|
||||
open() //Open everything!
|
||||
|
||||
/obj/machinery/door/ex_act(severity, target)
|
||||
//if it blows up a wall it should blow up a door
|
||||
..(severity ? max(1, severity - 1) : 0, target)
|
||||
|
||||
/obj/machinery/door/GetExplosionBlock()
|
||||
return density ? real_explosion_block : 0
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm (rejected hunks)
|
||||
@@ -163,7 +163,7 @@
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
try_to_weld(I, user)
|
||||
return 1
|
||||
- else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
|
||||
+ else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
|
||||
try_to_activate_door(user)
|
||||
return 1
|
||||
return ..()
|
||||
@@ -1,19 +0,0 @@
|
||||
diff a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm (rejected hunks)
|
||||
@@ -11,7 +11,7 @@
|
||||
integrity_failure = 0
|
||||
armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 70, acid = 100)
|
||||
visible = FALSE
|
||||
- flags = ON_BORDER
|
||||
+ flags_1 = ON_BORDER_1
|
||||
opacity = 0
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
var/obj/item/electronics/airlock/electronics = null
|
||||
@@ -221,7 +221,7 @@
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
- if(!(flags&NODECONSTRUCT))
|
||||
+ if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(density || operating)
|
||||
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
|
||||
@@ -1,16 +0,0 @@
|
||||
diff a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm (rejected hunks)
|
||||
@@ -239,12 +239,12 @@
|
||||
alarm()
|
||||
|
||||
/obj/machinery/firealarm/obj_break(damage_flag)
|
||||
- if(!(stat & BROKEN) && !(flags & NODECONSTRUCT) && buildstage != 0) //can't break the electronics if there isn't any inside.
|
||||
+ if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1) && buildstage != 0) //can't break the electronics if there isn't any inside.
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/metal(loc, 1)
|
||||
if(!(stat & BROKEN))
|
||||
var/obj/item/I = new /obj/item/electronics/firealarm(loc)
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm (rejected hunks)
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/item/reagent_containers/glass)
|
||||
|
||||
/obj/machinery/iv_drip/Initialize()
|
||||
- ..()
|
||||
+ . = ..()
|
||||
update_icon()
|
||||
drip_containers = typecacheof(drip_containers)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm (rejected hunks)
|
||||
@@ -10,7 +10,7 @@
|
||||
icon = 'icons/obj/machines/limbgrower.dmi'
|
||||
icon_state = "limbgrower_idleoff"
|
||||
density = TRUE
|
||||
- container_type = OPENCONTAINER
|
||||
+ container_type = OPENCONTAINER_1
|
||||
anchored = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
@@ -1,18 +0,0 @@
|
||||
diff a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm (rejected hunks)
|
||||
@@ -758,14 +758,14 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
|
||||
|
||||
/obj/machinery/newscaster/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
new /obj/item/shard(loc)
|
||||
new /obj/item/shard(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/newscaster/obj_break()
|
||||
- if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
|
||||
+ if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
|
||||
stat |= BROKEN
|
||||
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
|
||||
update_icon()
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm (rejected hunks)
|
||||
@@ -664,7 +659,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/turretid/Initialize(mapload) //map-placed turrets autolink turrets
|
||||
- ..()
|
||||
+ . = ..()
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
@@ -16,6 +16,20 @@
|
||||
var/power_efficiency = 1
|
||||
var/obj/machinery/quantumpad/linked_pad
|
||||
|
||||
//mapping
|
||||
var/static/list/mapped_quantum_pads = list()
|
||||
var/map_pad_id = "" as text //what's my name
|
||||
var/map_pad_link_id = "" as text //who's my friend
|
||||
|
||||
/obj/machinery/quantumpad/Initialize()
|
||||
. = ..()
|
||||
if(map_pad_id)
|
||||
mapped_quantum_pads[map_pad_id] = src
|
||||
|
||||
/obj/machinery/quantumpad/Destroy()
|
||||
mapped_quantum_pads -= map_pad_id
|
||||
return ..()
|
||||
|
||||
/obj/machinery/quantumpad/RefreshParts()
|
||||
var/E = 0
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
@@ -60,8 +74,9 @@
|
||||
return
|
||||
|
||||
if(!linked_pad || QDELETED(linked_pad))
|
||||
to_chat(user, "<span class='warning'>There is no linked pad!</span>")
|
||||
return
|
||||
if(!map_pad_link_id || !initMappedLink())
|
||||
to_chat(user, "<span class='warning'>There is no linked pad!</span>")
|
||||
return
|
||||
|
||||
if(world.time < last_teleport + teleport_cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] is recharging power. Please wait [round((last_teleport + teleport_cooldown - world.time) / 10)] seconds.</span>")
|
||||
@@ -80,7 +95,6 @@
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
doteleport(user)
|
||||
return
|
||||
|
||||
/obj/machinery/quantumpad/proc/sparks()
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
@@ -88,6 +102,8 @@
|
||||
s.start()
|
||||
|
||||
/obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost)
|
||||
if(!linked_pad && map_pad_link_id)
|
||||
initMappedLink()
|
||||
if(linked_pad)
|
||||
ghost.forceMove(get_turf(linked_pad))
|
||||
|
||||
@@ -136,6 +152,12 @@
|
||||
continue
|
||||
do_teleport(ROI, get_turf(linked_pad))
|
||||
|
||||
/obj/machinery/quantumpad/proc/initMappedLink()
|
||||
. = FALSE
|
||||
var/obj/machinery/quantumpad/link = mapped_quantum_pads[map_pad_link_id]
|
||||
if(link)
|
||||
linked_pad = link
|
||||
. = TRUE
|
||||
|
||||
/obj/item/paper/guides/quantumpad
|
||||
name = "Quantum Pad For Dummies"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm (rejected hunks)
|
||||
@@ -187,7 +187,7 @@
|
||||
name = "dangerous old crusher"
|
||||
emagged = TRUE
|
||||
crush_damage = 120
|
||||
- flags = NODECONSTRUCT
|
||||
+ flags_1 = NODECONSTRUCT_1
|
||||
|
||||
/obj/item/paper/guides/recycler
|
||||
name = "paper - 'garbage duty instructions'"
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm (rejected hunks)
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/structure/emergency_shield/Initialize()
|
||||
. = ..()
|
||||
- setDir(pick(1,2,3,4))
|
||||
+ setDir(pick(GLOB.cardinals))
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/emergency_shield/Destroy()
|
||||
@@ -12,7 +12,7 @@
|
||||
use_power = NO_POWER_USE
|
||||
idle_power_usage = 0
|
||||
machinetype = 6
|
||||
var/intercept = FALSE // if TRUE, broadcasts all (non-syndie) messages to syndicate channel
|
||||
var/intercept = FALSE // if TRUE, broadcasts all syndie messages to syndicate channel
|
||||
|
||||
/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
|
||||
|
||||
@@ -32,17 +32,11 @@
|
||||
if(signal.data["slow"] > 0)
|
||||
sleep(signal.data["slow"]) // simulate the network lag if necessary
|
||||
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
Broadcast_Message(signal.data["mob"],
|
||||
signal.data["vmask"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
|
||||
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
|
||||
signal.data["language"])
|
||||
|
||||
/* ###### Copy all non-syndie communications to the Syndicate Frequency ###### */
|
||||
if(intercept && signal.frequency != GLOB.SYND_FREQ)
|
||||
|
||||
|
||||
|
||||
/* ###### Copy all syndie communications to the Syndicate Frequency ###### */
|
||||
if(intercept && signal.frequency == GLOB.SYND_FREQ)
|
||||
Broadcast_Message(signal.data["mob"],
|
||||
signal.data["vmask"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
@@ -50,6 +44,15 @@
|
||||
signal.data["realname"],, signal.data["compression"], list(0, z), GLOB.SYND_FREQ, signal.data["spans"],
|
||||
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
|
||||
signal.data["language"])
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
else if(!intercept)
|
||||
Broadcast_Message(signal.data["mob"],
|
||||
signal.data["vmask"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
|
||||
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
|
||||
signal.data["language"])
|
||||
|
||||
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
|
||||
|
||||
|
||||
@@ -1067,9 +1067,9 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
icon_state = "engivend"
|
||||
icon_deny = "engivend-deny"
|
||||
req_access_txt = "11" //Engineering Equipment access
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5, /obj/item/grenade/chem_grenade/smart_metal_foam = 10)
|
||||
contraband = list(/obj/item/stock_parts/cell/potato = 3)
|
||||
premium = list(/obj/item/storage/belt/utility = 3)
|
||||
premium = list(/obj/item/storage/belt/utility = 3, /obj/item/storage/box/smart_metal_foam = 1)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(emagged)
|
||||
return
|
||||
emagged = TRUE
|
||||
req_access = null
|
||||
req_access = list()
|
||||
say("DB error \[Code 0x00F1\]")
|
||||
sleep(10)
|
||||
say("Attempting auto-repair...")
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
target = safepick(view(3,target))
|
||||
if(!target)
|
||||
return
|
||||
if(!target.Adjacent(src))
|
||||
if(!Adjacent(target))
|
||||
if(selected && selected.is_ranged())
|
||||
if(selected.action(target,params))
|
||||
selected.start_cooldown()
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm (rejected hunks)
|
||||
@@ -130,7 +130,7 @@
|
||||
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
||||
|
||||
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
- chainsaw.flags |= NODROP
|
||||
+ chainsaw.flags_1 |= NODROP_1
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw)
|
||||
chainsaw.attack_self(victim)
|
||||
@@ -35,10 +35,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
pressure_resistance = 4
|
||||
var/obj/item/master = null
|
||||
|
||||
var/heat_protection = 0 //flags_1 which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
||||
var/cold_protection = 0 //flags_1 which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags_1
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags_1
|
||||
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
var/list/actions //list of /datum/action's that this item has.
|
||||
var/list/actions_types //list of paths of action datums to give to the item on New().
|
||||
@@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
var/item_color = null //this needs deprecating, soonish
|
||||
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags_1
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||
@@ -64,6 +64,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/list/materials
|
||||
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
|
||||
var/emagged = FALSE
|
||||
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
@@ -86,7 +87,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
||||
|
||||
var/flags_cover = 0 //for flags_1 such as GLASSESCOVERSEYES
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
var/sharpness = IS_BLUNT
|
||||
var/toolspeed = 1
|
||||
@@ -128,6 +129,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(force_string)
|
||||
force_string_override = TRUE
|
||||
|
||||
if(!hitsound)
|
||||
if(damtype == "fire")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/items.dm b/code/game/objects/items.dm (rejected hunks)
|
||||
@@ -135,7 +135,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
hitsound = "swing_hit"
|
||||
|
||||
/obj/item/Destroy()
|
||||
- flags &= ~DROPDEL //prevent reqdels
|
||||
+ flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
@@ -19,11 +19,13 @@
|
||||
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
|
||||
var/current_color_index = 1
|
||||
var/ghetto = FALSE
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
|
||||
if(!loaded)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
|
||||
|
||||
@@ -123,7 +123,6 @@ RSF
|
||||
var/toxin = 0
|
||||
var/cooldown = 0
|
||||
var/cooldowndelay = 10
|
||||
var/emagged = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/cookiesynth/examine(mob/user)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,6 @@
|
||||
build_path = /obj/machinery/computer/cargo
|
||||
origin_tech = "programming=3"
|
||||
var/contraband = FALSE
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
||||
var/scanning = 0
|
||||
var/radiation_count = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/geiger_counter/New()
|
||||
..()
|
||||
|
||||
@@ -1,269 +1,268 @@
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/emagged = FALSE
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
if(istype(I, /obj/item/light))
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
if(emagged)
|
||||
return
|
||||
Emag()
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
siemens_coefficient = 1
|
||||
var/spamcheck = 0
|
||||
var/emagged = FALSE
|
||||
var/list/voicespan = list(SPAN_COMMAND)
|
||||
|
||||
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||
|
||||
@@ -75,14 +75,16 @@ effective or pretty fucking useless.
|
||||
var/intensity = 10 // how much damage the radiation does
|
||||
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
|
||||
var/used = 0 // is it cooling down?
|
||||
var/stealth = FALSE
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
if(!irradiate)
|
||||
return
|
||||
if(!used)
|
||||
add_logs(user, M, "irradiated", src)
|
||||
var/cooldown = round(max(10, (intensity*5 - wavelength/4))) * 10
|
||||
var/cooldown = GetCooldown()
|
||||
used = 1
|
||||
icon_state = "health1"
|
||||
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
|
||||
@@ -103,11 +105,15 @@ effective or pretty fucking useless.
|
||||
/obj/item/device/healthanalyzer/rad_laser/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/proc/GetCooldown()
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
var/cooldown = round(max(10, (intensity*5 - wavelength/4)))
|
||||
var/cooldown = GetCooldown()
|
||||
var/dat = "Irradiation: <A href='?src=\ref[src];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=\ref[src];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
dat += "Scan Mode: <a href='?src=\ref[src];mode=1'>"
|
||||
if(!scanmode)
|
||||
dat += "Scan Health"
|
||||
@@ -141,6 +147,9 @@ effective or pretty fucking useless.
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
else if(href_list["mode"])
|
||||
scanmode += 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,19 +47,8 @@
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = TRUE
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
preprime(user, null, FALSE)
|
||||
|
||||
/obj/item/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
|
||||
@@ -26,15 +26,9 @@
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
@@ -50,26 +44,27 @@
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
|
||||
var/area/A = get_area(T)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed \a [src] for detonation at [ADMIN_COORDJMP(T)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(user)] has primed \a [src] for detonation at [A.name] [COORD(T)].")
|
||||
|
||||
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
log_grenade(user, T)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
if(msg)
|
||||
to_chat(user, "<span class='warning'>You prime \the [src]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)
|
||||
|
||||
/obj/item/grenade/proc/prime()
|
||||
|
||||
@@ -110,4 +105,4 @@
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
return TRUE //It hit the grenade, not them
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
/obj/item/nullrod/claymore/darkblade
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
name = "dark blade"
|
||||
desc = "Spread the glory of the dark gods!"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -278,7 +278,6 @@
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm (rejected hunks)
|
||||
@@ -151,7 +151,7 @@
|
||||
/obj/item/borg/charger
|
||||
name = "power connector"
|
||||
icon_state = "charger_draw"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
var/mode = "draw"
|
||||
var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port))
|
||||
var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy))
|
||||
@@ -21,6 +21,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
@@ -421,4 +425,4 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
/obj/item/stack/sheet/paperframes/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/paperframes/fifty
|
||||
amount = 50
|
||||
amount = 50
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
diff a/code/game/objects/items/stacks/wrap.dm b/code/game/objects/items/stacks/wrap.dm (rejected hunks)
|
||||
@@ -9,7 +9,7 @@
|
||||
desc = "Wrap packages with this festive paper to make gifts."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "wrap_paper"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
@@ -30,7 +30,7 @@
|
||||
desc = "You can use this to wrap items in."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
||||
diff a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm (rejected hunks)
|
||||
@@ -732,7 +732,6 @@
|
||||
/obj/item/storage/box/ingredients //This box is for the randomely chosen version the chef spawns with, it shouldn't actually exist.
|
||||
name = "ingredients box"
|
||||
illustration = "donk_kit"
|
||||
- icon_state = null
|
||||
|
||||
/obj/item/storage/box/ingredients/Initialize()
|
||||
..()
|
||||
@@ -1,273 +1,273 @@
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/rollingpaper)
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/dump_content_at(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of Nanotrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/rollingpaper)
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
@@ -1,182 +1,182 @@
|
||||
/obj/item/storage/lockbox
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||
storage_slots = 4
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
var/locked = TRUE
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/attackby(obj/item/W, mob/user, params)
|
||||
if(W.GetID())
|
||||
if(broken)
|
||||
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
to_chat(user, "<span class='danger'>You lock the [src.name]!</span>")
|
||||
close_all()
|
||||
return
|
||||
else
|
||||
icon_state = icon_closed
|
||||
to_chat(user, "<span class='danger'>You unlock the [src.name]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access Denied.</span>")
|
||||
return
|
||||
if(!locked)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's locked!</span>")
|
||||
|
||||
/obj/item/storage/lockbox/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/lockbox/show_to(mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
//Check the destination item type for contentto.
|
||||
/obj/item/storage/lockbox/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
/obj/item/storage/lockbox/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/loyalty/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/implantcase/mindshield(src)
|
||||
new /obj/item/implanter/mindshield(src)
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang
|
||||
name = "lockbox of clusterbangs"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang/PopulateContents()
|
||||
new /obj/item/grenade/clusterbuster(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal
|
||||
name = "medal box"
|
||||
desc = "A locked box used to store medals of honor."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick()
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
/obj/item/storage/lockbox
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||
storage_slots = 4
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
var/locked = TRUE
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/attackby(obj/item/W, mob/user, params)
|
||||
if(W.GetID())
|
||||
if(broken)
|
||||
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
to_chat(user, "<span class='danger'>You lock the [src.name]!</span>")
|
||||
close_all()
|
||||
return
|
||||
else
|
||||
icon_state = icon_closed
|
||||
to_chat(user, "<span class='danger'>You unlock the [src.name]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access Denied.</span>")
|
||||
return
|
||||
if(!locked)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's locked!</span>")
|
||||
|
||||
/obj/item/storage/lockbox/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/lockbox/show_to(mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
//Check the destination item type for contentto.
|
||||
/obj/item/storage/lockbox/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return null
|
||||
open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
/obj/item/storage/lockbox/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/loyalty/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/implantcase/mindshield(src)
|
||||
new /obj/item/implanter/mindshield(src)
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang
|
||||
name = "lockbox of clusterbangs"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang/PopulateContents()
|
||||
new /obj/item/grenade/clusterbuster(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal
|
||||
name = "medal box"
|
||||
desc = "A locked box used to store medals of honor."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick()
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
@@ -1,197 +1,197 @@
|
||||
/*
|
||||
* Absorbs /obj/item/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = TRUE
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = FALSE
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = TRUE
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/storage/secure/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
cant_hold = list(/obj/item/storage/secure/briefcase)
|
||||
|
||||
/obj/item/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
/*
|
||||
* Absorbs /obj/item/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = TRUE
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = FALSE
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = TRUE
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/storage/secure/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return null
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
cant_hold = list(/obj/item/storage/secure/briefcase)
|
||||
|
||||
/obj/item/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
diff a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm (rejected hunks)
|
||||
@@ -244,8 +244,8 @@
|
||||
// Copied from /obj/item/melee/transforming/energy/sword/attackby
|
||||
/obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/toy/sword))
|
||||
- if((W.flags & NODROP) || (flags & NODROP))
|
||||
- to_chat(user, "<span class='warning'>\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!</span>")
|
||||
+ if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1))
|
||||
+ to_chat(user, "<span class='warning'>\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
|
||||
+223
-221
@@ -1,228 +1,230 @@
|
||||
/obj
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
var/throwforce = 0
|
||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
|
||||
var/damtype = BRUTE
|
||||
var/force = 0
|
||||
|
||||
var/list/armor
|
||||
/obj
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
var/throwforce = 0
|
||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
|
||||
var/damtype = BRUTE
|
||||
var/force = 0
|
||||
|
||||
var/list/armor
|
||||
var/obj_integrity //defaults to max_integrity
|
||||
var/max_integrity = 500
|
||||
var/integrity_failure = 0 //0 if we have no special broken behavior
|
||||
|
||||
var/resistance_flags = 0 // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
|
||||
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
|
||||
var/being_shocked = FALSE
|
||||
|
||||
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
|
||||
var/force_blueprints = FALSE //forces the obj to be on the blueprints, regardless of when it was created.
|
||||
|
||||
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
|
||||
var/unique_rename = FALSE // can you customize the description/name of the thing?
|
||||
var/current_skin //Has the item been reskinned?
|
||||
var/list/unique_reskin //List of options to reskin.
|
||||
var/dangerous_possession = FALSE //Admin possession yes/no
|
||||
|
||||
/obj/vv_edit_var(vname, vval)
|
||||
switch(vname)
|
||||
if("dangerous_possession")
|
||||
return FALSE
|
||||
if("control_object")
|
||||
var/obj/O = vval
|
||||
if(istype(O) && O.dangerous_possession)
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/Initialize()
|
||||
. = ..()
|
||||
if (!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
var/max_integrity = 500
|
||||
var/integrity_failure = 0 //0 if we have no special broken behavior
|
||||
|
||||
var/resistance_flags = 0 // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
|
||||
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
|
||||
var/being_shocked = FALSE
|
||||
|
||||
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
|
||||
var/force_blueprints = FALSE //forces the obj to be on the blueprints, regardless of when it was created.
|
||||
|
||||
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
|
||||
var/unique_rename = FALSE // can you customize the description/name of the thing?
|
||||
var/current_skin //Has the item been reskinned?
|
||||
var/list/unique_reskin //List of options to reskin.
|
||||
var/dangerous_possession = FALSE //Admin possession yes/no
|
||||
|
||||
/obj/vv_edit_var(vname, vval)
|
||||
switch(vname)
|
||||
if("dangerous_possession")
|
||||
return FALSE
|
||||
if("control_object")
|
||||
var/obj/O = vval
|
||||
if(istype(O) && O.dangerous_possession)
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/Initialize()
|
||||
. = ..()
|
||||
if (!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
if(obj_integrity == null)
|
||||
obj_integrity = max_integrity
|
||||
if(on_blueprints && isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(force_blueprints)
|
||||
T.add_blueprints(src)
|
||||
else
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/Destroy(force=FALSE)
|
||||
if(!istype(src, /obj/machinery))
|
||||
STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
|
||||
SStgui.close_uis(src)
|
||||
. = ..()
|
||||
|
||||
/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
..()
|
||||
if(on_blueprints && isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(force_blueprints)
|
||||
T.add_blueprints(src)
|
||||
else
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/Destroy(force=FALSE)
|
||||
if(!istype(src, /obj/machinery))
|
||||
STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
|
||||
SStgui.close_uis(src)
|
||||
. = ..()
|
||||
|
||||
/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
..()
|
||||
if(flags_2 & FROZEN_2)
|
||||
visible_message("<span class='danger'>[src] shatters into a million pieces!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/assume_air(datum/gas_mixture/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
//DEFAULT: Take air from turf to give to have mob process
|
||||
|
||||
if(breath_request>0)
|
||||
var/datum/gas_mixture/environment = return_air()
|
||||
var/breath_percentage = BREATH_VOLUME / environment.return_volume()
|
||||
return remove_air(environment.total_moles() * breath_percentage)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
if(in_use)
|
||||
var/is_in_use = 0
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
src.attack_hand(M)
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = 1
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
if(H.dna.check_mutation(TK))
|
||||
is_in_use = 1
|
||||
src.attack_hand(usr)
|
||||
in_use = is_in_use
|
||||
|
||||
/obj/proc/updateDialog()
|
||||
// Check that people are actually using the machine. If not, don't update anymore.
|
||||
if(in_use)
|
||||
var/list/nearby = viewers(1, src)
|
||||
var/is_in_use = 0
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
src.interact(M)
|
||||
var/ai_in_use = AutoUpdateAI(src)
|
||||
|
||||
if(!ai_in_use && !is_in_use)
|
||||
in_use = 0
|
||||
|
||||
|
||||
/obj/attack_ghost(mob/user)
|
||||
if(ui_interact(user) != -1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/proc/container_resist(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
/mob/proc/unset_machine()
|
||||
if(machine)
|
||||
machine.on_unset_machine(src)
|
||||
machine = null
|
||||
|
||||
//called when the user unsets the machine.
|
||||
/atom/movable/proc/on_unset_machine(mob/user)
|
||||
return
|
||||
|
||||
/mob/proc/set_machine(obj/O)
|
||||
if(src.machine)
|
||||
unset_machine()
|
||||
src.machine = O
|
||||
if(istype(O))
|
||||
O.in_use = 1
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
if(istype(M) && M.client && M.machine == src)
|
||||
src.attack_self(M)
|
||||
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
/obj/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/obj/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
return T.storage_contents_dump_act(src_object, user)
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
. = !density
|
||||
|
||||
/obj/proc/check_uplink_validity()
|
||||
return 1
|
||||
|
||||
/obj/proc/on_mob_move(dir, mob, oldLoc)
|
||||
return
|
||||
|
||||
/obj/proc/on_mob_turn(dir, mob)
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[src] shatters into a million pieces!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/assume_air(datum/gas_mixture/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
//DEFAULT: Take air from turf to give to have mob process
|
||||
|
||||
if(breath_request>0)
|
||||
var/datum/gas_mixture/environment = return_air()
|
||||
var/breath_percentage = BREATH_VOLUME / environment.return_volume()
|
||||
return remove_air(environment.total_moles() * breath_percentage)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
if(in_use)
|
||||
var/is_in_use = 0
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
src.attack_hand(M)
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = 1
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
if(H.dna.check_mutation(TK))
|
||||
is_in_use = 1
|
||||
src.attack_hand(usr)
|
||||
in_use = is_in_use
|
||||
|
||||
/obj/proc/updateDialog()
|
||||
// Check that people are actually using the machine. If not, don't update anymore.
|
||||
if(in_use)
|
||||
var/list/nearby = viewers(1, src)
|
||||
var/is_in_use = 0
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
src.interact(M)
|
||||
var/ai_in_use = AutoUpdateAI(src)
|
||||
|
||||
if(!ai_in_use && !is_in_use)
|
||||
in_use = 0
|
||||
|
||||
|
||||
/obj/attack_ghost(mob/user)
|
||||
if(ui_interact(user) != -1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/proc/container_resist(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
/mob/proc/unset_machine()
|
||||
if(machine)
|
||||
machine.on_unset_machine(src)
|
||||
machine = null
|
||||
|
||||
//called when the user unsets the machine.
|
||||
/atom/movable/proc/on_unset_machine(mob/user)
|
||||
return
|
||||
|
||||
/mob/proc/set_machine(obj/O)
|
||||
if(src.machine)
|
||||
unset_machine()
|
||||
src.machine = O
|
||||
if(istype(O))
|
||||
O.in_use = 1
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
if(istype(M) && M.client && M.machine == src)
|
||||
src.attack_self(M)
|
||||
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
/obj/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/obj/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return
|
||||
|
||||
/obj/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return get_turf(src)
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
. = !density
|
||||
|
||||
/obj/proc/check_uplink_validity()
|
||||
return 1
|
||||
|
||||
/obj/proc/on_mob_move(dir, mob, oldLoc)
|
||||
return
|
||||
|
||||
/obj/proc/on_mob_turn(dir, mob)
|
||||
return
|
||||
|
||||
/obj/proc/intercept_user_move(dir, mob, newLoc, oldLoc)
|
||||
return
|
||||
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
.["Delete all of type"] = "?_src_=vars;delall=\ref[src]"
|
||||
|
||||
/obj/examine(mob/user)
|
||||
..()
|
||||
if(unique_rename)
|
||||
to_chat(user, "<span class='notice'>Use a pen on it to rename it or change its description.</span>")
|
||||
if(unique_reskin && !current_skin)
|
||||
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && !current_skin && in_range(user,src))
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
reskin_obj(user)
|
||||
|
||||
/obj/proc/reskin_obj(mob/M)
|
||||
if(!LAZYLEN(unique_reskin))
|
||||
return
|
||||
var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin
|
||||
if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src))
|
||||
if(!unique_reskin[choice])
|
||||
return
|
||||
current_skin = choice
|
||||
icon_state = unique_reskin[choice]
|
||||
to_chat(M, "[src] is now skinned as '[choice].'")
|
||||
|
||||
/obj/proc/gang_contraband_value()
|
||||
return 0
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
.["Delete all of type"] = "?_src_=vars;delall=\ref[src]"
|
||||
|
||||
/obj/examine(mob/user)
|
||||
..()
|
||||
if(unique_rename)
|
||||
to_chat(user, "<span class='notice'>Use a pen on it to rename it or change its description.</span>")
|
||||
if(unique_reskin && !current_skin)
|
||||
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && !current_skin && in_range(user,src))
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
reskin_obj(user)
|
||||
|
||||
/obj/proc/reskin_obj(mob/M)
|
||||
if(!LAZYLEN(unique_reskin))
|
||||
return
|
||||
var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin
|
||||
if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src))
|
||||
if(!unique_reskin[choice])
|
||||
return
|
||||
current_skin = choice
|
||||
icon_state = unique_reskin[choice]
|
||||
to_chat(M, "[src] is now skinned as '[choice].'")
|
||||
|
||||
/obj/proc/gang_contraband_value()
|
||||
return 0
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm (rejected hunks)
|
||||
@@ -31,7 +31,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
- if(istype(W, /obj/item/wrench) && !(flags&NODECONSTRUCT))
|
||||
+ if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm (rejected hunks)
|
||||
@@ -41,7 +41,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
|
||||
- if(istype(W, /obj/item/wrench) && !(flags&NODECONSTRUCT))
|
||||
+ if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
@@ -0,0 +1,12 @@
|
||||
/obj/structure/chair/sofa
|
||||
name = "old ratty sofa"
|
||||
icon_state = "sofamiddle"
|
||||
icon = 'icons/obj/sofa.dmi'
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
/obj/structure/chair/sofa/right
|
||||
icon_state = "sofaend_right"
|
||||
/obj/structure/chair/sofa/corner
|
||||
icon_state = "sofacorner"
|
||||
@@ -1,453 +1,453 @@
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "generic"
|
||||
density = TRUE
|
||||
var/icon_door = null
|
||||
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
|
||||
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/large = TRUE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60)
|
||||
var/breakout_time = 2
|
||||
var/lastbang
|
||||
var/can_weld_shut = TRUE
|
||||
var/horizontal = FALSE
|
||||
var/allow_objects = FALSE
|
||||
var/allow_dense = FALSE
|
||||
var/dense_when_open = FALSE //if it's dense when open or not
|
||||
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
|
||||
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.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.
|
||||
var/anchorable = TRUE
|
||||
|
||||
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
. = ..()
|
||||
update_icon()
|
||||
PopulateContents()
|
||||
|
||||
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
|
||||
/obj/structure/closet/proc/PopulateContents()
|
||||
return
|
||||
|
||||
/obj/structure/closet/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
cut_overlays()
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
if(secure)
|
||||
if(!broken)
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
else
|
||||
add_overlay("off")
|
||||
|
||||
else
|
||||
if(icon_door_override)
|
||||
add_overlay("[icon_door]_open")
|
||||
else
|
||||
add_overlay("[icon_state]_open")
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
..()
|
||||
if(anchored)
|
||||
to_chat(user, "It is anchored to the ground.")
|
||||
else if(secure && !opened)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
if(wall_mounted)
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/proc/can_open(mob/living/user)
|
||||
if(welded || locked)
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>There's something large on top of [src], preventing it from opening.</span>" )
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/can_close(mob/living/user)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/closet/closet in T)
|
||||
if(closet != src && !closet.wall_mounted)
|
||||
return 0
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>There's something too large in [src], preventing it from closing.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
var/atom/L = drop_location()
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(L)
|
||||
if(throwing) // you keep some momentum when getting out of a thrown closet
|
||||
step(AM, dir)
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
var/atom/L = drop_location()
|
||||
for(var/atom/movable/AM in L)
|
||||
if(AM != src && insert(AM) == -1) // limit reached
|
||||
break
|
||||
|
||||
/obj/structure/closet/proc/open(mob/living/user)
|
||||
if(opened || !can_open(user))
|
||||
return
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
opened = 1
|
||||
if(!dense_when_open)
|
||||
density = FALSE
|
||||
climb_time *= 0.5 //it's faster to climb onto an open thing
|
||||
dump_contents()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/insert(atom/movable/AM)
|
||||
if(contents.len >= storage_capacity)
|
||||
return -1
|
||||
|
||||
|
||||
if(ismob(AM))
|
||||
if(!isliving(AM)) //let's not put ghosts or camera mobs inside closets...
|
||||
return
|
||||
var/mob/living/L = AM
|
||||
if(L.anchored || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
|
||||
return
|
||||
if(L.mob_size > MOB_SIZE_TINY) // Tiny mobs are treated as items.
|
||||
if(horizontal && L.density)
|
||||
return
|
||||
if(L.mob_size > max_mob_size)
|
||||
return
|
||||
var/mobs_stored = 0
|
||||
for(var/mob/living/M in contents)
|
||||
if(++mobs_stored >= mob_storage_capacity)
|
||||
return
|
||||
L.stop_pulling()
|
||||
else if(istype(AM, /obj/structure/closet))
|
||||
return
|
||||
else if(isobj(AM))
|
||||
if(!allow_objects && !istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon))
|
||||
return
|
||||
if(!allow_dense && AM.density)
|
||||
return
|
||||
if(AM.anchored || AM.has_buckled_mobs() || (AM.flags_1 & NODROP_1))
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
AM.forceMove(src)
|
||||
if(AM.pulledby)
|
||||
AM.pulledby.stop_pulling()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close(mob/living/user)
|
||||
if(!opened || !can_close(user))
|
||||
return 0
|
||||
take_contents()
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
climb_time = initial(climb_time)
|
||||
opened = 0
|
||||
density = TRUE
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/living/user)
|
||||
if(opened)
|
||||
return close(user)
|
||||
else
|
||||
return open(user)
|
||||
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags_1 & NODECONSTRUCT_1))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(user in src)
|
||||
return
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
playsound(loc, cutting_sound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, cutting_sound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
deconstruct(TRUE)
|
||||
return 0
|
||||
else // for example cardboard box is cut with wirecutters
|
||||
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
|
||||
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
|
||||
deconstruct(TRUE)
|
||||
return 0
|
||||
if(user.drop_item()) // so we put in unlit welder too
|
||||
W.forceMove(loc)
|
||||
return 1
|
||||
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
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)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench) && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
else if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1))
|
||||
if(W.GetID() || !toggle(user))
|
||||
togglelock(user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
|
||||
if(!istype(O) || O.anchored || istype(O, /obj/screen))
|
||||
return
|
||||
if(!istype(user) || user.incapacitated() || user.lying)
|
||||
return
|
||||
if(!Adjacent(user) || !user.Adjacent(O))
|
||||
return
|
||||
if(user == O) //try to climb onto it
|
||||
return ..()
|
||||
if(!opened)
|
||||
return
|
||||
if(!isturf(O.loc))
|
||||
return
|
||||
|
||||
var/actuallyismob = 0
|
||||
if(isliving(O))
|
||||
actuallyismob = 1
|
||||
else if(!isitem(O))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/targets = list(O, src)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='warning'>[user] [actuallyismob ? "tries to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='warning'>You [actuallyismob ? "try to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear clanging.</span>")
|
||||
if(actuallyismob)
|
||||
if(do_after_mob(user, targets, 40))
|
||||
user.visible_message("<span class='notice'>[user] stuffs [O] into [src].</span>", \
|
||||
"<span class='notice'>You stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear a loud metal bang.</span>")
|
||||
var/mob/living/L = O
|
||||
if(!issilicon(L))
|
||||
L.Knockdown(40)
|
||||
O.forceMove(T)
|
||||
close()
|
||||
else
|
||||
O.forceMove(T)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(!open())
|
||||
if(L.last_special <= world.time)
|
||||
container_resist(L)
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in get_hearers_in_view(src, null))
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
..()
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!toggle(user))
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/attack_robot(mob/user)
|
||||
if(user.Adjacent(src))
|
||||
return attack_hand(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
||||
attack_hand(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(ismovableatom(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
AM.relay_container_resist(user, src)
|
||||
return
|
||||
if(!welded && !locked)
|
||||
open()
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>")
|
||||
visible_message("<span class='warning'>[src] begins to shake violently!</span>")
|
||||
if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
bust_open()
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
to_chat(user, "<span class='warning'>You fail to break out of [src]!</span>")
|
||||
|
||||
/obj/structure/closet/proc/bust_open()
|
||||
welded = FALSE //applies to all lockers
|
||||
locked = FALSE //applies to critter crates and secure lockers only
|
||||
broken = 1 //applies to secure lockers only
|
||||
open()
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(opened || !secure)
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/proc/togglelock(mob/living/user)
|
||||
if(secure && !broken)
|
||||
if(allowed(user))
|
||||
if(iscarbon(user))
|
||||
add_fingerprint(user)
|
||||
locked = !locked
|
||||
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
|
||||
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
else if(secure && broken)
|
||||
to_chat(user, "<span class='warning'>\The [src] is broken!</span>")
|
||||
|
||||
/obj/structure/closet/emag_act(mob/user)
|
||||
if(secure && !broken)
|
||||
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
|
||||
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
|
||||
"<span class='italics'>You hear a faint electrical spark.</span>")
|
||||
playsound(src, "sparks", 50, 1)
|
||||
broken = 1
|
||||
locked = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(secure && !broken)
|
||||
if(prob(50 / severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20 / severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity, target)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "generic"
|
||||
density = TRUE
|
||||
var/icon_door = null
|
||||
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
|
||||
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/large = TRUE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60)
|
||||
var/breakout_time = 2
|
||||
var/lastbang
|
||||
var/can_weld_shut = TRUE
|
||||
var/horizontal = FALSE
|
||||
var/allow_objects = FALSE
|
||||
var/allow_dense = FALSE
|
||||
var/dense_when_open = FALSE //if it's dense when open or not
|
||||
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
|
||||
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.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.
|
||||
var/anchorable = TRUE
|
||||
|
||||
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
. = ..()
|
||||
update_icon()
|
||||
PopulateContents()
|
||||
|
||||
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
|
||||
/obj/structure/closet/proc/PopulateContents()
|
||||
return
|
||||
|
||||
/obj/structure/closet/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
cut_overlays()
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
if(secure)
|
||||
if(!broken)
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
else
|
||||
add_overlay("off")
|
||||
|
||||
else
|
||||
if(icon_door_override)
|
||||
add_overlay("[icon_door]_open")
|
||||
else
|
||||
add_overlay("[icon_state]_open")
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
..()
|
||||
if(anchored)
|
||||
to_chat(user, "It is anchored to the ground.")
|
||||
else if(secure && !opened)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
if(wall_mounted)
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/proc/can_open(mob/living/user)
|
||||
if(welded || locked)
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>There's something large on top of [src], preventing it from opening.</span>" )
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/can_close(mob/living/user)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/closet/closet in T)
|
||||
if(closet != src && !closet.wall_mounted)
|
||||
return 0
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>There's something too large in [src], preventing it from closing.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
var/atom/L = drop_location()
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(L)
|
||||
if(throwing) // you keep some momentum when getting out of a thrown closet
|
||||
step(AM, dir)
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
var/atom/L = drop_location()
|
||||
for(var/atom/movable/AM in L)
|
||||
if(AM != src && insert(AM) == -1) // limit reached
|
||||
break
|
||||
|
||||
/obj/structure/closet/proc/open(mob/living/user)
|
||||
if(opened || !can_open(user))
|
||||
return
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
opened = 1
|
||||
if(!dense_when_open)
|
||||
density = FALSE
|
||||
climb_time *= 0.5 //it's faster to climb onto an open thing
|
||||
dump_contents()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/insert(atom/movable/AM)
|
||||
if(contents.len >= storage_capacity)
|
||||
return -1
|
||||
|
||||
|
||||
if(ismob(AM))
|
||||
if(!isliving(AM)) //let's not put ghosts or camera mobs inside closets...
|
||||
return
|
||||
var/mob/living/L = AM
|
||||
if(L.anchored || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
|
||||
return
|
||||
if(L.mob_size > MOB_SIZE_TINY) // Tiny mobs are treated as items.
|
||||
if(horizontal && L.density)
|
||||
return
|
||||
if(L.mob_size > max_mob_size)
|
||||
return
|
||||
var/mobs_stored = 0
|
||||
for(var/mob/living/M in contents)
|
||||
if(++mobs_stored >= mob_storage_capacity)
|
||||
return
|
||||
L.stop_pulling()
|
||||
else if(istype(AM, /obj/structure/closet))
|
||||
return
|
||||
else if(isobj(AM))
|
||||
if(!allow_objects && !istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon))
|
||||
return
|
||||
if(!allow_dense && AM.density)
|
||||
return
|
||||
if(AM.anchored || AM.has_buckled_mobs() || (AM.flags_1 & NODROP_1))
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
AM.forceMove(src)
|
||||
if(AM.pulledby)
|
||||
AM.pulledby.stop_pulling()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close(mob/living/user)
|
||||
if(!opened || !can_close(user))
|
||||
return 0
|
||||
take_contents()
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
climb_time = initial(climb_time)
|
||||
opened = 0
|
||||
density = TRUE
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/living/user)
|
||||
if(opened)
|
||||
return close(user)
|
||||
else
|
||||
return open(user)
|
||||
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags_1 & NODECONSTRUCT_1))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(user in src)
|
||||
return
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
playsound(loc, cutting_sound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, cutting_sound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
deconstruct(TRUE)
|
||||
return 0
|
||||
else // for example cardboard box is cut with wirecutters
|
||||
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
|
||||
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
|
||||
deconstruct(TRUE)
|
||||
return 0
|
||||
if(user.drop_item()) // so we put in unlit welder too
|
||||
W.forceMove(loc)
|
||||
return 1
|
||||
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
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)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench) && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
else if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1))
|
||||
if(W.GetID() || !toggle(user))
|
||||
togglelock(user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
|
||||
if(!istype(O) || O.anchored || istype(O, /obj/screen))
|
||||
return
|
||||
if(!istype(user) || user.incapacitated() || user.lying)
|
||||
return
|
||||
if(!Adjacent(user) || !user.Adjacent(O))
|
||||
return
|
||||
if(user == O) //try to climb onto it
|
||||
return ..()
|
||||
if(!opened)
|
||||
return
|
||||
if(!isturf(O.loc))
|
||||
return
|
||||
|
||||
var/actuallyismob = 0
|
||||
if(isliving(O))
|
||||
actuallyismob = 1
|
||||
else if(!isitem(O))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/targets = list(O, src)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='warning'>[user] [actuallyismob ? "tries to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='warning'>You [actuallyismob ? "try to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear clanging.</span>")
|
||||
if(actuallyismob)
|
||||
if(do_after_mob(user, targets, 40))
|
||||
user.visible_message("<span class='notice'>[user] stuffs [O] into [src].</span>", \
|
||||
"<span class='notice'>You stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear a loud metal bang.</span>")
|
||||
var/mob/living/L = O
|
||||
if(!issilicon(L))
|
||||
L.Knockdown(40)
|
||||
O.forceMove(T)
|
||||
close()
|
||||
else
|
||||
O.forceMove(T)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(!open())
|
||||
if(L.last_special <= world.time)
|
||||
container_resist(L)
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in get_hearers_in_view(src, null))
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
..()
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!toggle(user))
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/attack_robot(mob/user)
|
||||
if(user.Adjacent(src))
|
||||
return attack_hand(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
||||
attack_hand(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(ismovableatom(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
AM.relay_container_resist(user, src)
|
||||
return
|
||||
if(!welded && !locked)
|
||||
open()
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>")
|
||||
visible_message("<span class='warning'>[src] begins to shake violently!</span>")
|
||||
if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
bust_open()
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
to_chat(user, "<span class='warning'>You fail to break out of [src]!</span>")
|
||||
|
||||
/obj/structure/closet/proc/bust_open()
|
||||
welded = FALSE //applies to all lockers
|
||||
locked = FALSE //applies to critter crates and secure lockers only
|
||||
broken = 1 //applies to secure lockers only
|
||||
open()
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(opened || !secure)
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/proc/togglelock(mob/living/user)
|
||||
if(secure && !broken)
|
||||
if(allowed(user))
|
||||
if(iscarbon(user))
|
||||
add_fingerprint(user)
|
||||
locked = !locked
|
||||
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
|
||||
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
else if(secure && broken)
|
||||
to_chat(user, "<span class='warning'>\The [src] is broken!</span>")
|
||||
|
||||
/obj/structure/closet/emag_act(mob/user)
|
||||
if(secure && !broken)
|
||||
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
|
||||
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
|
||||
"<span class='italics'>You hear a faint electrical spark.</span>")
|
||||
playsound(src, "sparks", 50, 1)
|
||||
broken = 1
|
||||
locked = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(secure && !broken)
|
||||
if(prob(50 / severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20 / severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity, target)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
diff a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm (rejected hunks)
|
||||
@@ -193,12 +193,12 @@
|
||||
return open(user)
|
||||
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
- if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
+ if(ispath(material_drop) && material_drop_amount && !(flags_1 & NODECONSTRUCT_1))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
- if(!broken && !(flags & NODECONSTRUCT))
|
||||
+ if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
@@ -183,6 +183,7 @@
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/storage/belt/holster/full(src)
|
||||
new /obj/item/device/mass_spectrometer(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "lethal injections"
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
diff a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm (rejected hunks)
|
||||
@@ -50,7 +50,7 @@
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
dump()
|
||||
if(!disassembled)
|
||||
new /obj/item/shard( src.loc )
|
||||
@@ -58,7 +58,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/obj_break(damage_flag)
|
||||
- if(!broken && !(flags & NODECONSTRUCT))
|
||||
+ if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
density = FALSE
|
||||
broken = 1
|
||||
new /obj/item/shard( src.loc )
|
||||
@@ -137,8 +137,8 @@
|
||||
new mineral(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return 0
|
||||
/obj/structure/falsewall/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return null
|
||||
|
||||
/obj/structure/falsewall/examine_status(mob/user) //So you can't detect falsewalls by examine.
|
||||
return null
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm (rejected hunks)
|
||||
@@ -91,7 +91,7 @@
|
||||
new /obj/item/shard(loc)
|
||||
|
||||
/obj/structure/fireaxecabinet/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(fireaxe && loc)
|
||||
fireaxe.forceMove(loc)
|
||||
fireaxe = null
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm (rejected hunks)
|
||||
@@ -13,7 +13,7 @@
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/W, mob/user, params)
|
||||
- if(!cut && log_amount && (!(NODECONSTRUCT in flags)))
|
||||
+ if(!cut && log_amount && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
if(W.sharpness && W.force > 0)
|
||||
if(W.hitsound)
|
||||
playsound(get_turf(src), W.hitsound, 100, 0, 0)
|
||||
@@ -226,8 +226,8 @@
|
||||
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 ..()
|
||||
|
||||
/obj/structure/grille/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return 0
|
||||
/obj/structure/grille/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return null
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
icon_state = "brokengrille"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm (rejected hunks)
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "cart"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
- container_type = OPENCONTAINER
|
||||
+ container_type = OPENCONTAINER_1
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm (rejected hunks)
|
||||
@@ -177,7 +177,7 @@
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
- flags = ABSTRACT | NODROP | NOBLUDGEON | DROPDEL
|
||||
+ flags_1 = ABSTRACT_1 | NODROP_1 | NOBLUDGEON_1 | DROPDEL_1
|
||||
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/obj/machinery/manned_turret/turret
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
diff a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm (rejected hunks)
|
||||
@@ -47,14 +47,14 @@
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/obj_break(damage_flag)
|
||||
- if(!broken && !(flags & NODECONSTRUCT))
|
||||
+ if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = 1
|
||||
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(!disassembled)
|
||||
new /obj/item/shard( src.loc )
|
||||
qdel(src)
|
||||
@@ -1,11 +0,0 @@
|
||||
diff a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm (rejected hunks)
|
||||
@@ -326,6 +326,6 @@
|
||||
icon_state = "direction_bridge"
|
||||
|
||||
/obj/structure/sign/logo
|
||||
- name = "station logo"
|
||||
- desc = "A sign: SPACE STATION 13."
|
||||
+ name = "nanotrasen logo"
|
||||
+ desc = "The Nanotrasen corporate logo."
|
||||
icon_state = "nanotrasen_sign1"
|
||||
\ No newline at end of file
|
||||
@@ -1,37 +0,0 @@
|
||||
diff a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm (rejected hunks)
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
- if(!(flags & NODECONSTRUCT))
|
||||
+ if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
@@ -429,7 +429,7 @@
|
||||
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
- if (istype(W, /obj/item/wrench) && !(flags&NODECONSTRUCT))
|
||||
+ if (istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -466,7 +466,7 @@
|
||||
*/
|
||||
|
||||
/obj/structure/rack/deconstruct(disassembled = TRUE)
|
||||
- if(!(flags&NODECONSTRUCT))
|
||||
+ if(!(flags_1&NODECONSTRUCT_1))
|
||||
density = FALSE
|
||||
var/obj/item/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
@@ -482,7 +482,7 @@
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "rack_parts"
|
||||
- flags = CONDUCT
|
||||
+ flags_1 = CONDUCT_1
|
||||
materials = list(MAT_METAL=2000)
|
||||
var/building = FALSE
|
||||
|
||||
@@ -535,6 +535,7 @@
|
||||
name = "puddle"
|
||||
desc = "A puddle used for washing one's hands and face."
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
@@ -546,6 +547,10 @@
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/deconstruct(disassembled = TRUE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
//Shower Curtains//
|
||||
//Defines used are pre-existing in layers.dm//
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm (rejected hunks)
|
||||
@@ -462,7 +462,7 @@
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/RG = O
|
||||
- if(RG.container_type & OPENCONTAINER)
|
||||
+ if(RG.container_type & OPENCONTAINER_1)
|
||||
if(!RG.reagents.holder_full())
|
||||
RG.reagents.add_reagent("[dispensedreagent]", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
to_chat(user, "<span class='notice'>You fill [RG] from [src].</span>")
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm (rejected hunks)
|
||||
@@ -188,7 +188,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
|
||||
- if(!(flags&NODECONSTRUCT))
|
||||
+ if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
if(reinf)
|
||||
+4
-1
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
/atom/movable/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE)
|
||||
//This proc uses text() because it is faster than appending strings. Thanks BYOND.
|
||||
//Basic span
|
||||
var/spanpart1 = "<span class='[radio_freq ? get_radio_span(radio_freq) : "game say"]'>"
|
||||
@@ -54,6 +54,9 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : ""
|
||||
//Speaker name
|
||||
var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]"
|
||||
if(face_name && ishuman(speaker))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
namepart = "[H.get_face_name()]" //So "fake" speaking like in hallucinations does not give the speaker away if disguised
|
||||
//End name span.
|
||||
var/endspanpart = "</span>"
|
||||
|
||||
|
||||
+3
-2
@@ -97,11 +97,12 @@
|
||||
/mob/proc/stop_sound_channel(chan)
|
||||
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
/client/proc/playtitlemusic(vol = 85)
|
||||
set waitfor = FALSE
|
||||
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music
|
||||
|
||||
if(prefs && (prefs.toggles & SOUND_LOBBY))
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBYMUSIC) // MAD JAMS)
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = vol, channel = CHANNEL_LOBBYMUSIC) // MAD JAMS)
|
||||
|
||||
/proc/get_rand_frequency()
|
||||
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
diff a/code/game/sound.dm b/code/game/sound.dm (rejected hunks)
|
||||
@@ -145,7 +145,3 @@
|
||||
if ("can_open")
|
||||
soundin = pick('sound/effects/can_open1.ogg', 'sound/effects/can_open2.ogg', 'sound/effects/can_open3.ogg')
|
||||
return soundin
|
||||
-
|
||||
-/proc/playsound_global(file, repeat = 0, wait, channel, volume)
|
||||
- for(var/V in GLOB.clients)
|
||||
- V << sound(file, repeat, wait, channel, volume)
|
||||
+22
-5
@@ -190,6 +190,12 @@
|
||||
new /datum/forced_movement(C, get_ranged_target_turf(C, olddir, 1), 1, FALSE) //spinning would be bad for ice, fucks up the next dir
|
||||
return 1
|
||||
|
||||
/turf/open/copyTurf(turf/T)
|
||||
. = ..()
|
||||
if(. && isopenturf(T) && wet_time)
|
||||
var/turf/open/O = T
|
||||
O.MakeSlippery(wet_setting = wet, wet_time_to_add = wet_time) //we're copied, copy how wet we are also
|
||||
|
||||
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost, 5 = Slide
|
||||
wet_time = max(wet_time+wet_time_to_add, min_wet_time)
|
||||
if(wet >= wet_setting)
|
||||
@@ -219,19 +225,30 @@
|
||||
HandleWet()
|
||||
|
||||
/turf/open/proc/UpdateSlip()
|
||||
var/intensity
|
||||
var/lube_flags
|
||||
switch(wet)
|
||||
if(TURF_WET_WATER)
|
||||
AddComponent(/datum/component/slippery, 60, NO_SLIP_WHEN_WALKING)
|
||||
intensity = 60
|
||||
lube_flags = NO_SLIP_WHEN_WALKING
|
||||
if(TURF_WET_LUBE)
|
||||
AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP)
|
||||
intensity = 80
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_ICE)
|
||||
AddComponent(/datum/component/slippery, 120, SLIDE | GALOSHES_DONT_HELP)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_PERMAFROST)
|
||||
AddComponent(/datum/component/slippery, 120, SLIDE_ICE | GALOSHES_DONT_HELP)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_SLIDE)
|
||||
AddComponent(/datum/component/slippery, 80, SLIDE | GALOSHES_DONT_HELP)
|
||||
intensity = 80
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||
else
|
||||
qdel(GetComponent(/datum/component/slippery))
|
||||
return
|
||||
var/datum/component/slippery/S = LoadComponent(/datum/component/slippery)
|
||||
S.intensity = intensity
|
||||
S.lube_flags = lube_flags
|
||||
|
||||
/turf/open/ComponentActivated(datum/component/C)
|
||||
..()
|
||||
|
||||
@@ -133,6 +133,9 @@
|
||||
drop_y = y
|
||||
if(z+1 <= world.maxz)
|
||||
drop_z = z+1
|
||||
var/turf/T = locate(drop_x, drop_y, drop_z)
|
||||
T.visible_message("<span class='boldwarning'>The ceiling gives way!</span>")
|
||||
playsound(T, 'sound/effects/break_stone.ogg', 50, 1)
|
||||
|
||||
|
||||
/turf/open/chasm/straight_down/lava_land_surface
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
..()
|
||||
//This is so damaged or burnt tiles or platings don't get remembered as the default tile
|
||||
var/static/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4",
|
||||
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2",
|
||||
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", "foam_plating",
|
||||
"platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2",
|
||||
"light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken",
|
||||
"light_on_broken","light_off","wall_thermite","grass", "sand",
|
||||
@@ -117,10 +117,10 @@
|
||||
/turf/open/floor/proc/make_plating()
|
||||
return ChangeTurf(/turf/open/floor/plating)
|
||||
|
||||
/turf/open/floor/ChangeTurf(new_path)
|
||||
/turf/open/floor/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
|
||||
if(!isfloorturf(src))
|
||||
return ..() //fucking turfs switch the fucking src of the fucking running procs
|
||||
if(!ispath(new_path, /turf/open/floor))
|
||||
if(!ispath(path, /turf/open/floor))
|
||||
return ..()
|
||||
var/old_icon = icon_regular_floor
|
||||
var/old_dir = dir
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm (rejected hunks)
|
||||
@@ -66,7 +66,7 @@
|
||||
icon_state = "grass"
|
||||
floor_tile = /obj/item/stack/tile/grass
|
||||
broken_states = list("sand")
|
||||
- flags = NONE
|
||||
+ flags_1 = NONE
|
||||
var/ore_type = /obj/item/ore/glass
|
||||
var/turfverb = "uproot"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
icon_state = "light_off"
|
||||
|
||||
|
||||
/turf/open/floor/light/ChangeTurf(turf/T)
|
||||
/turf/open/floor/light/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
|
||||
set_light(0)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
if(prob(50))
|
||||
ChangeTurf(src.baseturf)
|
||||
|
||||
/turf/open/floor/vines/ChangeTurf(turf/open/floor/T)
|
||||
/turf/open/floor/vines/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
|
||||
. = ..()
|
||||
//Do this *after* the turf has changed as qdel in spacevines will call changeturf again if it hasn't
|
||||
for(var/obj/structure/spacevine/SV in src)
|
||||
|
||||
@@ -101,7 +101,9 @@
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_act()
|
||||
return
|
||||
if(turf_z_is_planet(src))
|
||||
return ..()
|
||||
ChangeTurf(/turf/open/space)
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_pull(S, current_size)
|
||||
if(dug)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
be_removed()
|
||||
return ..()
|
||||
|
||||
/turf/open/floor/engine/cult/ChangeTurf(path, defer_change = FALSE)
|
||||
/turf/open/floor/engine/cult/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
|
||||
if(path != type)
|
||||
be_removed()
|
||||
return ..()
|
||||
|
||||
@@ -263,8 +263,8 @@
|
||||
if(.)
|
||||
ChangeTurf(/turf/closed/wall/clockwork)
|
||||
|
||||
/turf/closed/wall/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return 0
|
||||
/turf/closed/wall/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return null
|
||||
|
||||
/turf/closed/wall/acid_act(acidpwr, acid_volume)
|
||||
if(explosion_block >= 2)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
garbage
|
||||
+6
-3
@@ -51,9 +51,12 @@
|
||||
if(query_db_version.NextRow())
|
||||
var/db_major = text2num(query_db_version.item[1])
|
||||
var/db_minor = text2num(query_db_version.item[2])
|
||||
if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION)
|
||||
message_admins("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
log_sql("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
if(db_major != DB_MAJOR_VERSION || db_minor != DB_MINOR_VERSION)
|
||||
var/which = "behind"
|
||||
if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION)
|
||||
which = "ahead of"
|
||||
message_admins("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
log_sql("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
else
|
||||
message_admins("Could not get schema version from database")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user