diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm
index a89ac854596..72894abf662 100644
--- a/_maps/map_files/Delta/delta.dmm
+++ b/_maps/map_files/Delta/delta.dmm
@@ -55331,7 +55331,7 @@
},
/area/crew_quarters/captain)
"bUZ" = (
-/obj/structure/displaycase/captains_laser,
+/obj/structure/displaycase/captain,
/turf/simulated/floor/plasteel{
icon_state = "grimy"
},
@@ -91580,7 +91580,7 @@
dir = 1;
on = 1
},
-/obj/structure/lamarr,
+/obj/structure/displaycase/labcage,
/obj/effect/decal/warning_stripes/yellow,
/turf/simulated/floor/plasteel,
/area/crew_quarters/hor)
diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
index 4396c52587d..3065afcb9c9 100644
--- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
@@ -43111,7 +43111,7 @@
layer = 4;
pixel_y = 32
},
-/obj/structure/displaycase/captains_laser,
+/obj/structure/displaycase/captain,
/turf/simulated/floor/wood,
/area/crew_quarters/captain{
name = "\improper Captain's Quarters"
@@ -75994,7 +75994,7 @@
name = "Aft Maintenance"
})
"cze" = (
-/obj/structure/lamarr,
+/obj/structure/displaycase/labcage,
/obj/machinery/light/small{
dir = 1
},
diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm
index 01797b0ea59..930b5cca2ac 100644
--- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm
+++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm
@@ -167,7 +167,7 @@
/turf/simulated/floor/wood,
/area/ruin/powered/snow_cabin)
"aL" = (
-/obj/structure/displaycase/lavaland_winter,
+/obj/structure/displaycase/captain,
/turf/simulated/floor/wood,
/area/ruin/powered/snow_cabin)
"aM" = (
diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index b83e173d404..e120366dd54 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -42190,7 +42190,7 @@
/turf/simulated/floor/plasteel,
/area/crew_quarters/locker)
"bAc" = (
-/obj/structure/displaycase/captains_laser,
+/obj/structure/displaycase/captain,
/turf/simulated/floor/wood,
/area/crew_quarters/captain)
"bAd" = (
@@ -56043,7 +56043,7 @@
},
/area/crew_quarters/hor)
"bYB" = (
-/obj/structure/lamarr,
+/obj/structure/displaycase/labcage,
/obj/effect/decal/warning_stripes/east,
/turf/simulated/floor/plasteel{
icon_state = "white"
diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm
index fa62fd7af4f..fc5b6eb74b9 100644
--- a/code/__DEFINES/construction.dm
+++ b/code/__DEFINES/construction.dm
@@ -32,6 +32,15 @@
#define PLASTIC_FLAPS_NORMAL 0
#define PLASTIC_FLAPS_DETACHED 1
+
+//ai core defines
+#define EMPTY_CORE 0
+#define CIRCUIT_CORE 1
+#define SCREWED_CORE 2
+#define CABLED_CORE 3
+#define GLASS_CORE 4
+#define AI_READY_CORE 5
+
//other construction-related things
//windows affected by nar-sie turn this color.
diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm
index a41b13e11ef..61c4eaf0dff 100644
--- a/code/game/gamemodes/blob/blobs/core.dm
+++ b/code/game/gamemodes/blob/blobs/core.dm
@@ -60,13 +60,13 @@
return
/obj/structure/blob/core/update_icon()
- if(health <= 0)
- qdel(src)
- return
- // update_icon is called when health changes so... call update_health in the overmind
+ cut_overlays()
+ color = null
+ var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
if(overmind)
- overmind.update_health_hud()
- return
+ blob_overlay.color = overmind.blob_reagent_datum.color
+ add_overlay(blob_overlay)
+ add_overlay(mutable_appearance('icons/mob/blob.dmi', "blob_core_overlay"))
/obj/structure/blob/core/RegenHealth()
return // Don't regen, we handle it in Life()
@@ -78,7 +78,7 @@
if(resource_delay <= world.time)
resource_delay = world.time + 10 // 1 second
overmind.add_points(point_rate)
- health = min(initial(health), health + 1)
+ obj_integrity = min(max_integrity, obj_integrity + 1)
if(overmind)
overmind.update_health_hud()
if(overmind)
diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm
index 63d4023b41b..a8fdc03ec96 100644
--- a/code/game/gamemodes/blob/blobs/factory.dm
+++ b/code/game/gamemodes/blob/blobs/factory.dm
@@ -8,10 +8,6 @@
var/max_spores = 3
var/spore_delay = 0
-/obj/structure/blob/factory/update_icon()
- if(health <= 0)
- qdel(src)
-
/obj/structure/blob/factory/Destroy()
for(var/mob/living/simple_animal/hostile/blob/blobspore/spore in spores)
if(spore.factory == src)
diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm
index 574e1c3a3ba..d4164997184 100644
--- a/code/game/gamemodes/blob/blobs/node.dm
+++ b/code/game/gamemodes/blob/blobs/node.dm
@@ -35,11 +35,14 @@
else
for(var/i = 1; i < 8; i += i)
Pulse(5, i, color)
- health = min(initial(health), health + 1)
+ obj_integrity = min(max_integrity, obj_integrity + 1)
color = null
/obj/structure/blob/node/update_icon()
- if(health <= 0)
- qdel(src)
- return
- return
\ No newline at end of file
+ cut_overlays()
+ color = null
+ var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
+ if(overmind)
+ blob_overlay.color = overmind.blob_reagent_datum.color
+ add_overlay(blob_overlay)
+ add_overlay(mutable_appearance('icons/mob/blob.dmi', "blob_node_overlay"))
\ No newline at end of file
diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm
index bafed3d4f83..4ef14ed4963 100644
--- a/code/game/gamemodes/blob/blobs/resource.dm
+++ b/code/game/gamemodes/blob/blobs/resource.dm
@@ -6,10 +6,6 @@
point_return = 12
var/resource_delay = 0
-/obj/structure/blob/resource/update_icon()
- if(health <= 0)
- qdel(src)
-
/obj/structure/blob/resource/run_action()
if(resource_delay > world.time)
return
diff --git a/code/game/gamemodes/blob/blobs/storage.dm b/code/game/gamemodes/blob/blobs/storage.dm
index 2e706e52f2c..0f3225e8362 100644
--- a/code/game/gamemodes/blob/blobs/storage.dm
+++ b/code/game/gamemodes/blob/blobs/storage.dm
@@ -2,14 +2,14 @@
name = "storage blob"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_resource"
- health = 30
+ max_integrity = 30
fire_resist = 2
point_return = 12
-/obj/structure/blob/storage/update_icon()
- if(health <= 0 && !QDELETED(src))
+/obj/structure/blob/storage/obj_destruction(damage_flag)
+ if(overmind)
overmind.max_blob_points -= 50
- qdel(src)
+ ..()
/obj/structure/blob/storage/proc/update_max_blob_points(var/new_point_increase)
if(overmind)
diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm
index 1a4f6f995c8..34db0a40478 100644
--- a/code/game/gamemodes/blob/theblob.dm
+++ b/code/game/gamemodes/blob/theblob.dm
@@ -10,25 +10,20 @@
max_integrity = 30
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
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.
- var/health = 30
var/health_timestamp = 0
- var/brute_resist = 4
- var/fire_resist = 1
+ var/brute_resist = 0.5 //multiplies brute damage by this
+ var/fire_resist = 1 //multiplies burn damage by this
var/atmosblock = FALSE //if the blob blocks atmos and heat spread
var/mob/camera/blob/overmind
-
/obj/structure/blob/New(loc)
+ ..()
blobs += src
- src.dir = pick(1, 2, 4, 8)
- src.update_icon()
- ..(loc)
- for(var/atom/A in loc)
- A.blob_act(src)
+ setDir(pick(cardinal))
+ update_icon()
if(atmosblock)
air_update_turf(1)
- return
-
+ ConsumeTile()
/obj/structure/blob/Destroy()
if(atmosblock)
@@ -58,6 +53,12 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSBLOB)
+/obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind.
+ if(overmind)
+ add_atom_colour(overmind.blob_reagent_datum.color, FIXED_COLOUR_PRIORITY)
+ else
+ remove_atom_colour(FIXED_COLOUR_PRIORITY)
+
/obj/structure/blob/process()
Life()
return
@@ -72,8 +73,8 @@
// All blobs heal over time when pulsed, but it has a cool down
if(health_timestamp > world.time)
return 0
- if(health < initial(health))
- health++
+ if(obj_integrity < max_integrity)
+ obj_integrity = min(max_integrity, obj_integrity + 1)
update_icon()
health_timestamp = world.time + 10 // 1 seconds
@@ -112,9 +113,15 @@
/obj/structure/blob/proc/run_action()
return 0
+/obj/structure/blob/proc/ConsumeTile()
+ for(var/atom/A in loc)
+ A.blob_act(src)
+ if(iswallturf(loc))
+ loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it
/obj/structure/blob/proc/expand(var/turf/T = null, var/prob = 1, var/a_color)
- if(prob && !prob(health)) return
+ if(prob && !prob(obj_integrity))
+ return
if(istype(T, /turf/space) && prob(75)) return
if(!T)
var/list/dirs = list(1,2,4,8)
@@ -126,7 +133,7 @@
else T = null
if(!T) return 0
- var/obj/structure/blob/normal/B = new /obj/structure/blob/normal(src.loc, min(src.health, 30))
+ var/obj/structure/blob/normal/B = new /obj/structure/blob/normal(src.loc, min(obj_integrity, 30))
B.color = a_color
B.density = 1
if(T.Enter(B,src))//Attempt to move into the tile
@@ -152,15 +159,6 @@
/obj/structure/blob/hulk_damage()
return 15
-/obj/structure/blob/attackby(var/obj/item/W, var/mob/living/user, params)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
- visible_message("[user] has attacked the [src.name] with \the [W]!")
- if(W.damtype == BURN)
- playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
- take_damage(W.force, W.damtype)
-
/obj/structure/blob/attack_animal(mob/living/simple_animal/M)
if(ROLE_BLOB in M.faction) //sorry, but you can't kill the blob as a blobbernaut
return
@@ -247,18 +245,4 @@
icon_state = "blob"
name = "dead blob"
desc = "A thick wall of lifeless tendrils."
- brute_resist = 0.25
-
-/* // Used to create the glow sprites. Remember to set the animate loop to 1, instead of infinite!
-
-var/datum/blob_colour/B = new()
-
-/datum/blob_colour/New()
- ..()
- var/icon/I = 'icons/mob/blob.dmi'
- I += rgb(35, 35, 0)
- if(isfile("icons/mob/blob_result.dmi"))
- fdel("icons/mob/blob_result.dmi")
- fcopy(I, "icons/mob/blob_result.dmi")
-
-*/
+ brute_resist = 0.25
\ No newline at end of file
diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm
index 849f54169f5..feaf1c7972d 100644
--- a/code/game/jobs/job/supervisor.dm
+++ b/code/game/jobs/job/supervisor.dm
@@ -24,7 +24,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
/datum/job/captain/announce(mob/living/carbon/human/H)
. = ..()
captain_announcement.Announce("All hands, Captain [H.real_name] on deck!")
- updateDisplaycase(H)
/datum/outfit/job/captain
name = "Captain"
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index b1daa0f7b67..817d56cb47a 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -11,14 +11,14 @@
/obj/machinery/pdapainter/update_icon()
- overlays.Cut()
+ cut_overlays()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
return
if(storedpda)
- overlays += "[initial(icon_state)]-closed"
+ add_overlay("[initial(icon_state)]-closed")
if(powered())
icon_state = initial(icon_state)
@@ -75,6 +75,24 @@
P.forceMove(src)
P.add_fingerprint(user)
update_icon()
+ else if(iswelder(I) && user.a_intent != INTENT_HARM)
+ var/obj/item/weldingtool/WT = I
+ if(stat & BROKEN)
+ if(WT.remove_fuel(0,user))
+ user.visible_message("[user] is repairing [src].", \
+ "You begin repairing [src]...", \
+ "You hear welding.")
+ playsound(loc, WT.usesound, 40, 1)
+ if(do_after(user,40*WT.toolspeed, 1, target = src))
+ if(!WT.isOn() || !(stat & BROKEN))
+ return
+ to_chat(user, "You repair [src].")
+ playsound(loc, 'sound/items/welder2.ogg', 50, 1)
+ stat &= ~BROKEN
+ obj_integrity = max_integrity
+ update_icon()
+ else
+ to_chat(user, "[src] does not need repairs.")
else
return ..()
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 7f6cca54efa..3210e899876 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -48,7 +48,6 @@ var/datum/canister_icons/canister_icon_container = new()
icon = 'icons/obj/atmos.dmi'
icon_state = "yellow"
density = 1
- var/health = 100.0
flags = CONDUCT
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 50)
max_integrity = 250
@@ -265,6 +264,22 @@ update_flag
return
canister_break()
+/obj/machinery/portable_atmospherics/canister/attackby(obj/item/I, mob/user, params)
+ if(user.a_intent != INTENT_HARM && iswelder(I))
+ var/obj/item/weldingtool/WT = I
+ if(stat & BROKEN)
+ if(!WT.remove_fuel(0, user))
+ return
+ playsound(loc, WT.usesound, 40, 1)
+ to_chat(user, "You begin cutting [src] apart...")
+ if(do_after(user, 30, target = src))
+ deconstruct(TRUE)
+ else
+ to_chat(user, "You cannot slice [src] apart when it isn't broken.")
+ return TRUE
+ else
+ return ..()
+
/obj/machinery/portable_atmospherics/canister/proc/canister_break()
disconnect()
var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles())
@@ -336,19 +351,6 @@ update_flag
return GM.return_pressure()
return 0
-/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
- user.changeNext_move(CLICK_CD_MELEE)
- if(iswelder(W) && src.destroyed)
- if(weld(W, user))
- to_chat(user, "You salvage whats left of \the [src]")
- var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src.loc)
- M.amount = 3
- qdel(src)
- return
-
- if(istype(W, /obj/item/wrench) && !istype(W, /obj/item/tank) && !istype(W, /obj/item/analyzer) && !istype(W, /obj/item/pda))
- return ..()
-
/obj/machinery/portable_atmospherics/canister/replace_tank(mob/living/user, close_valve)
. = ..()
if(.)
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index c74ad40e6c3..34915f2d01b 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -12,8 +12,6 @@
w_class = WEIGHT_CLASS_SMALL
anchored = FALSE
materials = list(MAT_METAL=400, MAT_GLASS=250)
- max_integrity = 150
- can_be_hit = TRUE
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/analyzer)
var/list/upgrades = list()
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 15468dae4bf..dfac3250d44 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -16,172 +16,220 @@
QDEL_NULL(brain)
return ..()
-/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
- switch(state)
- if(0)
- if(istype(P, /obj/item/wrench))
- playsound(loc, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed, target = src))
- to_chat(user, "You wrench the frame into place.")
- anchored = 1
- state = 1
- if(istype(P, /obj/item/weldingtool))
- var/obj/item/weldingtool/WT = P
- if(!WT.isOn())
- to_chat(user, "The welder must be on for this task.")
+/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
+ if(istype(P, /obj/item/wrench))
+ return default_unfasten_wrench(user, P, 20)
+ if(!anchored)
+ if(iswelder(P))
+ if(state != EMPTY_CORE)
+ to_chat(user, "The core must be empty to deconstruct it!")
+ return
+ var/obj/item/weldingtool/WT = P
+ if(!WT.isOn())
+ to_chat(user, "The welder must be on for this task!")
+ return
+ playsound(loc, WT.usesound, 50, 1)
+ to_chat(user, "You start to deconstruct the frame...")
+ if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
+ to_chat(user, "You deconstruct the frame.")
+ deconstruct(TRUE)
+ return
+ else
+ switch(state)
+ if(EMPTY_CORE)
+ if(istype(P, /obj/item/circuitboard/aicore))
+ if(!user.drop_item())
+ return
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You place the circuit board inside the frame.")
+ update_icon()
+ state = CIRCUIT_CORE
+ P.forceMove(src)
+ circuit = P
return
- playsound(loc, WT.usesound, 50, 1)
- if(do_after(user, 20 * WT.toolspeed, target = src))
- if(!src || !WT.remove_fuel(0, user)) return
- to_chat(user, "You deconstruct the frame.")
- new /obj/item/stack/sheet/plasteel(loc, 4)
- qdel(src)
- if(1)
- if(istype(P, /obj/item/wrench))
- playsound(loc, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed, target = src))
- to_chat(user, "You unfasten the frame.")
- anchored = 0
- state = 0
- if(istype(P, /obj/item/circuitboard/aicore) && !circuit)
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You place the circuit board inside the frame.")
- icon_state = "1"
- circuit = P
- user.drop_item()
- P.loc = src
- if(istype(P, /obj/item/screwdriver) && circuit)
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You screw the circuit board into place.")
- state = 2
- icon_state = "2"
- if(istype(P, /obj/item/crowbar) && circuit)
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You remove the circuit board.")
- state = 1
- icon_state = "0"
- circuit.loc = loc
- circuit = null
- if(2)
- if(istype(P, /obj/item/screwdriver) && circuit)
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You unfasten the circuit board.")
- state = 1
- icon_state = "1"
- if(istype(P, /obj/item/stack/cable_coil))
- if(P:amount >= 5)
+ if(CIRCUIT_CORE)
+ if(isscrewdriver(P))
playsound(loc, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed, target = src))
- P:amount -= 5
- if(!P:amount) qdel(P)
- to_chat(user, "You add cables to the frame.")
- state = 3
- icon_state = "3"
- if(3)
- if(istype(P, /obj/item/wirecutters))
- if(brain)
- to_chat(user, "Get that brain out of there first")
- else
+ to_chat(user, "You screw the circuit board into place.")
+ state = SCREWED_CORE
+ update_icon()
+ return
+ if(iscrowbar(P))
playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You remove the cables.")
- state = 2
- icon_state = "2"
- var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
- A.amount = 5
+ to_chat(user, "You remove the circuit board.")
+ state = EMPTY_CORE
+ update_icon()
+ circuit.forceMove(loc)
+ circuit = null
+ return
+ if(SCREWED_CORE)
+ if(iswirecutter(P) && circuit)
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You unfasten the circuit board.")
+ state = CIRCUIT_CORE
+ update_icon()
+ return
+ if(istype(P, /obj/item/stack/cable_coil))
+ var/obj/item/stack/cable_coil/C = P
+ if(C.get_amount() >= 5)
+ playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
+ to_chat(user, "You start to add cables to the frame...")
+ if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
+ to_chat(user, "You add cables to the frame.")
+ state = CABLED_CORE
+ update_icon()
+ else
+ to_chat(user, "You need five lengths of cable to wire the AI core!")
+ return
+ if(CABLED_CORE)
+ if(iswirecutter(P))
+ if(brain)
+ to_chat(user, "Get that [brain.name] out of there first!")
+ else
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You remove the cables.")
+ state = SCREWED_CORE
+ update_icon()
+ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
+ A.amount = 5
+ return
- if(istype(P, /obj/item/stack/sheet/rglass))
- if(P:amount >= 2)
- playsound(loc, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed, target = src))
- if(P)
- P:amount -= 2
- if(!P:amount) qdel(P)
+ if(istype(P, /obj/item/stack/sheet/rglass))
+ var/obj/item/stack/sheet/rglass/G = P
+ if(G.get_amount() >= 2)
+ playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
+ to_chat(user, "You start to put in the glass panel...")
+ if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "You put in the glass panel.")
- state = 4
- icon_state = "4"
-
- if(istype(P, /obj/item/aiModule/purge))
- laws.clear_inherent_laws()
- to_chat(usr, "Law module applied.")
- return
-
- if(istype(P, /obj/item/aiModule/freeform))
- var/obj/item/aiModule/freeform/M = P
- laws.add_inherent_law(M.newFreeFormLaw)
- to_chat(usr, "Added a freeform law.")
- return
-
- if(istype(P, /obj/item/aiModule))
- var/obj/item/aiModule/M = P
- if(!M.laws)
- to_chat(usr, "This AI module can not be applied directly to AI cores.")
- return
- laws = M.laws
-
- if(istype(P, /obj/item/mmi))
- if(!P:brainmob)
- to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.")
- return
- if(P:brainmob.stat == 2)
- to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.")
+ state = GLASS_CORE
+ update_icon()
+ else
+ to_chat(user, "You need two sheets of reinforced glass to insert them into the AI core!")
return
- if(jobban_isbanned(P:brainmob, "AI") || jobban_isbanned(P:brainmob,"nonhumandept"))
- to_chat(user, "This [P] does not seem to fit.")
+ if(istype(P, /obj/item/aiModule/purge))
+ laws.clear_inherent_laws()
+ to_chat(usr, "Law module applied.")
return
- if(istype(P, /obj/item/mmi/syndie))
- to_chat(user, "This MMI does not seem to fit!")
+ if(istype(P, /obj/item/aiModule/freeform))
+ var/obj/item/aiModule/freeform/M = P
+ laws.add_inherent_law(M.newFreeFormLaw)
+ to_chat(usr, "Added a freeform law.")
return
- if(P:brainmob.mind)
- SSticker.mode.remove_cultist(P:brainmob.mind, 1)
- SSticker.mode.remove_revolutionary(P:brainmob.mind, 1)
+ if(istype(P, /obj/item/aiModule))
+ var/obj/item/aiModule/M = P
+ if(!M.laws)
+ to_chat(usr, "This AI module can not be applied directly to AI cores.")
+ return
+ laws = M.laws
- user.drop_item()
- P.loc = src
- brain = P
- to_chat(usr, "Added [P].")
+ if(istype(P, /obj/item/mmi) && !brain)
+ var/obj/item/mmi/M = P
+ if(!M.brainmob)
+ to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.")
+ return
+ if(M.brainmob.stat == DEAD)
+ to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.")
+ return
+
+ if(!M.brainmob.client)
+ to_chat(user, "Sticking an inactive [M.name] into the frame would sort of defeat the purpose.")
+ return
+
+ if(jobban_isbanned(M.brainmob, "AI") || jobban_isbanned(M.brainmob, "nonhumandept"))
+ to_chat(user, "This [P] does not seem to fit.")
+ return
+
+ if(!M.brainmob.mind)
+ to_chat(user, "This [M.name] is mindless!")
+ return
+
+ if(istype(P, /obj/item/mmi/syndie))
+ to_chat(user, "This MMI does not seem to fit!")
+ return
+
+ if(!user.drop_item())
+ return
+
+ M.forceMove(src)
+ brain = M
+ to_chat(user, "You add [M.name] to the frame.")
+ update_icon()
+ return
+
+ if(iscrowbar(P) && brain)
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You remove the brain.")
+ brain.forceMove(loc)
+ brain = null
+ update_icon()
+ return
+
+ if(GLASS_CORE)
+ if(istype(P, /obj/item/crowbar))
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You remove the glass panel.")
+ state = CABLED_CORE
+ update_icon()
+ new /obj/item/stack/sheet/rglass(loc, 2)
+ return
+
+ if(isscrewdriver(P))
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You connect the monitor.")
+ if(!brain)
+ var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
+ var/obj/structure/AIcore/deactivated/D = new(loc)
+ if(open_for_latejoin)
+ empty_playable_ai_cores += D
+ else
+ if(brain.brainmob.mind)
+ SSticker.mode.remove_cultist(brain.brainmob.mind, 1)
+ SSticker.mode.remove_revolutionary(brain.brainmob.mind, 1)
+
+ var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain)
+ if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created
+ A.rename_self("AI", 1)
+ feedback_inc("cyborg_ais_created",1)
+ qdel(src)
+
+ if(AI_READY_CORE)
+ if(istype(P, /obj/item/aicard))
+ P.transfer_ai("INACTIVE", "AICARD", src, user)
+ return
+
+ if(isscrewdriver(P))
+ playsound(loc, P.usesound, 50, 1)
+ to_chat(user, "You disconnect the monitor.")
+ state = GLASS_CORE
+ update_icon()
+ return
+ return ..()
+
+/obj/structure/AIcore/update_icon()
+ switch(state)
+ if(EMPTY_CORE)
+ icon_state = "0"
+ if(CIRCUIT_CORE)
+ icon_state = "1"
+ if(SCREWED_CORE)
+ icon_state = "2"
+ if(CABLED_CORE)
+ if(brain)
icon_state = "3b"
-
- if(istype(P, /obj/item/crowbar) && brain)
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You remove the brain.")
- brain.loc = loc
- brain = null
+ else
icon_state = "3"
-
- if(4)
- if(istype(P, /obj/item/crowbar))
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You remove the glass panel.")
- state = 3
- if(brain)
- icon_state = "3b"
- else
- icon_state = "3"
- new /obj/item/stack/sheet/rglass( loc, 2 )
- return
-
- if(istype(P, /obj/item/screwdriver))
- playsound(loc, P.usesound, 50, 1)
- to_chat(user, "You connect the monitor.")
- if(!brain)
- var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
- var/obj/structure/AIcore/deactivated/D = new(loc)
- if(open_for_latejoin)
- empty_playable_ai_cores += D
- else
- var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
- if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created
- A.rename_self("AI", 1)
- feedback_inc("cyborg_ais_created",1)
- qdel(src)
+ if(GLASS_CORE)
+ icon_state = "4"
+ if(AI_READY_CORE)
+ icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
- if(state == 4)
+ if(state == GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
- if(state >= 3)
+ if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
if(circuit)
circuit.forceMove(loc)
@@ -190,41 +238,20 @@
qdel(src)
/obj/structure/AIcore/deactivated
- name = "Inactive AI"
- icon = 'icons/mob/AI.dmi'
+ name = "inactive AI"
icon_state = "ai-empty"
- anchored = 1
- state = 20//So it doesn't interact based on the above. Not really necessary.
+ anchored = TRUE
+ state = AI_READY_CORE
+
+/obj/structure/AIcore/deactivated/New()
+ ..()
+ circuit = new(src)
/obj/structure/AIcore/deactivated/Destroy()
if(src in empty_playable_ai_cores)
empty_playable_ai_cores -= src
return ..()
-/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user, params)
- if(istype(W, /obj/item/aicard))//Is it?
- var/obj/item/aicard/card = W
- card.transfer_ai("INACTIVE","AICARD",src,user)
- else if(istype(W, /obj/item/wrench))
- if(anchored)
- user.visible_message("\The [user] starts to unbolt \the [src] from the plating...")
- if(!do_after(user, 40 * W.toolspeed, target = src))
- user.visible_message("\The [user] decides not to unbolt \the [src].")
- return
- user.visible_message("\The [user] finishes unfastening \the [src]!")
- anchored = 0
- return
- else
- user.visible_message("\The [user] starts to bolt \the [src] to the plating...")
- if(!do_after(user, 40 * W.toolspeed, target = src))
- user.visible_message("\The [user] decides not to bolt \the [src].")
- return
- user.visible_message("\The [user] finishes fastening down \the [src]!")
- anchored = 1
- return
- else
- return ..()
-
/client/proc/empty_ai_core_toggle_latejoin()
set name = "Toggle AI Core Latejoin"
set category = "Admin"
@@ -258,7 +285,7 @@ That prevents a few funky behaviors.
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
-atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/aicard/card)
+atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(istype(card))
if(card.flush)
to_chat(user, "ERROR: AI flush is in progress, cannot execute transfer protocol.")
@@ -266,8 +293,8 @@ atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/A
return 1
-/obj/structure/AIcore/deactivated/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/aicard/card)
- if(!..())
+/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
+ if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
@@ -278,4 +305,4 @@ atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/A
to_chat(user, "Transfer successful: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
- to_chat(user, "There is no AI loaded on this terminal!")
+ to_chat(user, "There is no AI loaded on this terminal!")
\ No newline at end of file
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index c911d158576..b8a2f8fa64c 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -89,17 +89,6 @@
else
to_chat(user, "You need five lengths of cable to wire the frame.")
return
- else if(istype(P, /obj/item/stack/sheet/glass))
- var/obj/item/stack/sheet/glass/G = P
- if(G.amount < 5)
- to_chat(user, "You do not have enough glass to build a display case.")
- return
- G.use(5)
- to_chat(user, "You add the glass to the frame.")
- playsound(get_turf(src), G.usesound, 50, 1)
- new /obj/structure/displaycase_frame(src.loc)
- qdel(src)
- return
if(istype(P, /obj/item/wrench))
playsound(src.loc, P.usesound, 75, 1)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 2d61a318bd8..1b566c95e42 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -97,7 +97,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
var/obj/item/photo/photo = null
var/channel_name = "" //the feed channel which will be receiving the feed, or being created
var/c_locked = 0 //Will our new channel be locked to public submissions?
- var/hitstaken = 0 //Death at 3 hits from an item with force>=15
var/datum/feed_channel/viewing_channel = null
var/silence = 0
var/temp = null
@@ -574,35 +573,36 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
to_chat(user, "Now [anchored ? "un" : ""]securing [name]")
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 60 * I.toolspeed, target = src))
- new /obj/item/mounted/frame/newscaster_frame(loc)
- playsound(loc, I.usesound, 50, 1)
- qdel(src)
- return
-
- if(stat & BROKEN)
- playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
- visible_message("[user.name] further abuses the shattered [name].", null, 5)
- else
- if(istype(I, /obj/item) )
- var/obj/item/W = I
- if(W.damtype == STAMINA)
- return
- if(W.force < 15)
- visible_message("[user.name] hits the [name] with the [W.name] with no visible effect.", null , 5)
- playsound(loc, 'sound/effects/glasshit.ogg', 100, 1)
+ playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
+ if(stat & BROKEN)
+ to_chat(user, "The broken remains of [src] fall on the ground.")
+ new /obj/item/stack/sheet/metal(loc, 5)
+ new /obj/item/shard(loc)
+ new /obj/item/shard(loc)
else
- hitstaken++
- if(hitstaken == 3)
- visible_message("[user.name] smashes the [name]!", null, 5)
- stat |= BROKEN
- playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1)
- else
- visible_message("[user.name] forcefully slams the [name] with the [I.name]!", null, 5)
- playsound(loc, 'sound/effects/glasshit.ogg', 100, 1)
+ to_chat(user, "You [anchored ? "un" : ""]secure [name].")
+ new /obj/item/mounted/frame/newscaster_frame(loc)
+ qdel(src)
+ else if(iswelder(I) && user.a_intent != INTENT_HARM)
+ var/obj/item/weldingtool/WT = I
+ if(stat & BROKEN)
+ if(WT.remove_fuel(0, user))
+ user.visible_message("[user] is repairing [src].",
+ "You begin repairing [src]...",
+ "You hear welding.")
+ playsound(loc, WT.usesound, 40, 1)
+ if(do_after(user,40 * WT.toolspeed, 1, target = src))
+ if(!WT.isOn() || !(stat & BROKEN))
+ return
+ to_chat(user, "You repair [src].")
+ playsound(loc, 'sound/items/welder2.ogg', 50, 1)
+ obj_integrity = max_integrity
+ stat &= ~BROKEN
+ update_icon()
else
- to_chat(user, "This does nothing.")
- update_icon()
- ..()
+ to_chat(user, "[src] does not need repairs.")
+ else
+ return ..()
/obj/machinery/newscaster/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index f8eb1bb1e97..4955f7f508a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -20,8 +20,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
can_be_hit = FALSE
suicidal_hands = TRUE
- var/r_speed = 1.0
- var/health = null
var/hitsound = null
var/usesound = null
var/throwhitsound
diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm
index 8e85709ef97..8ca65d7a668 100644
--- a/code/game/objects/items/ashtray.dm
+++ b/code/game/objects/items/ashtray.dm
@@ -1,133 +1,94 @@
/obj/item/ashtray
icon = 'icons/ashtray.dmi'
- var/
- max_butts = 0
- empty_desc = ""
- icon_empty = ""
- icon_half = ""
- icon_full = ""
- icon_broken = ""
+ var/max_butts = 0
+ var/icon_half = ""
+ var/icon_full = ""
-/obj/item/ashtray/New()
- ..()
- src.pixel_y = rand(-5, 5)
- src.pixel_x = rand(-6, 6)
- return
+/obj/item/ashtray/Initialize(mapload)
+ . = ..()
+ pixel_y = rand(-5, 5)
+ pixel_x = rand(-6, 6)
-/obj/item/ashtray/attackby(obj/item/W as obj, mob/user as mob, params)
- if(health < 1)
- return
- if(istype(W,/obj/item/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/match))
+/obj/item/ashtray/attackby(obj/item/I, mob/user, params)
+ if(istype(I, /obj/item/cigbutt) || istype(I, /obj/item/clothing/mask/cigarette) || istype(I, /obj/item/match))
if(contents.len >= max_butts)
to_chat(user, "This ashtray is full.")
return
- user.unEquip(W)
- W.loc = src
+ if(!user.unEquip(I))
+ return
+ I.forceMove(src)
- if(istype(W,/obj/item/clothing/mask/cigarette))
- var/obj/item/clothing/mask/cigarette/cig = W
+ if(istype(I, /obj/item/clothing/mask/cigarette))
+ var/obj/item/clothing/mask/cigarette/cig = I
if(cig.lit == 1)
- src.visible_message("[user] crushes [cig] in [src], putting it out.")
+ visible_message("[user] crushes [cig] in [src], putting it out.")
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
else if(cig.lit == 0)
to_chat(user, "You place [cig] in [src] without even smoking it. Why would you do that?")
- src.visible_message("[user] places [W] in [src].")
- user.update_inv_l_hand()
- user.update_inv_r_hand()
+ visible_message("[user] places [I] in [src].")
add_fingerprint(user)
- if(contents.len == max_butts)
- icon_state = icon_full
- desc = empty_desc + " It's stuffed full."
- else if(contents.len > max_butts/2)
- icon_state = icon_half
- desc = empty_desc + " It's half-filled."
+ update_icon()
else
- health = max(0,health - W.force)
- to_chat(user, "You hit [src] with [W].")
- if(health < 1)
- die()
- return
+ return ..()
+
+/obj/item/ashtray/update_icon()
+ if(contents.len == max_butts)
+ icon_state = icon_full
+ desc = initial(desc) + " It's stuffed full."
+ if(contents.len > max_butts * 0.5)
+ icon_state = icon_half
+ desc = initial(desc) + " It's half-filled."
+ else
+ icon_state = initial(icon_state)
+ desc = initial(desc)
+
+/obj/item/ashtray/deconstruct()
+ empty_tray()
+ qdel(src)
+
+/obj/item/ashtray/proc/empty_tray()
+ for(var/obj/item/I in contents)
+ I.forceMove(loc)
+ update_icon()
/obj/item/ashtray/throw_impact(atom/hit_atom)
- if(health > 0)
- health = max(0,health - 3)
- if(health < 1)
- die()
- return
- if(contents.len)
- src.visible_message("[src] slams into [hit_atom] spilling its contents!")
- for(var/obj/item/clothing/mask/cigarette/O in contents)
- O.loc = src.loc
- icon_state = icon_empty
+ if(contents.len)
+ visible_message("[src] slams into [hit_atom] spilling its contents!")
+ empty_tray()
return ..()
-/obj/item/ashtray/proc/die()
- src.visible_message("[src] shatters spilling its contents!")
- for(var/obj/item/clothing/mask/cigarette/O in contents)
- O.loc = src.loc
- icon_state = icon_broken
-
/obj/item/ashtray/plastic
name = "plastic ashtray"
desc = "Cheap plastic ashtray."
icon_state = "ashtray_bl"
- icon_empty = "ashtray_bl"
icon_half = "ashtray_half_bl"
icon_full = "ashtray_full_bl"
- icon_broken = "ashtray_bork_bl"
- max_butts = 14
- health = 24.0
+ max_butts = 8
+ max_integrity = 8
materials = list(MAT_METAL=30, MAT_GLASS=30)
- empty_desc = "Cheap plastic ashtray."
- throwforce = 3.0
- die()
- ..()
- name = "pieces of plastic"
- desc = "Pieces of plastic with ash on them."
- return
-
+ throwforce = 3
/obj/item/ashtray/bronze
name = "bronze ashtray"
desc = "Massive bronze ashtray."
icon_state = "ashtray_br"
- icon_empty = "ashtray_br"
icon_half = "ashtray_half_br"
icon_full = "ashtray_full_br"
- icon_broken = "ashtray_bork_br"
- max_butts = 10
- health = 72.0
+ max_butts = 16
+ max_integrity = 16
materials = list(MAT_METAL=80)
- empty_desc = "Massive bronze ashtray."
- throwforce = 10.0
-
- die()
- ..()
- name = "pieces of bronze"
- desc = "Pieces of bronze with ash on them."
- return
-
+ throwforce = 10
/obj/item/ashtray/glass
name = "glass ashtray"
desc = "Glass ashtray. Looks fragile."
icon_state = "ashtray_gl"
- icon_empty = "ashtray_gl"
icon_half = "ashtray_half_gl"
icon_full = "ashtray_full_gl"
- icon_broken = "ashtray_bork_gl"
max_butts = 12
- health = 12.0
+ max_integrity = 12
materials = list(MAT_GLASS=60)
- empty_desc = "Glass ashtray. Looks fragile."
- throwforce = 6.0
-
- die()
- ..()
- name = "shards of glass"
- desc = "Shards of glass with ash on them."
- playsound(src, "shatter", 30, 1)
- return
\ No newline at end of file
+ throwforce = 6
\ No newline at end of file
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 63b5c6b5b10..e85aa28bde8 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -178,6 +178,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40),
new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
+ new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40),
new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index b0f89c6215b..5ffcaa9291c 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -22,8 +22,7 @@
for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here
var/damage = round(30 / (get_dist(B, get_turf(src)) + 1))
- B.health -= damage
- B.update_icon()
+ B.take_damage(damage, BURN, "melee", 0)
spawn(light_time)
qdel(src)
diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm
index 6b9c4d815f4..7fd965b5c2a 100644
--- a/code/game/objects/items/weapons/grenades/smokebomb.dm
+++ b/code/game/objects/items/weapons/grenades/smokebomb.dm
@@ -31,8 +31,7 @@
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
- B.health -= damage
- B.update_icon()
+ B.take_damage(damage, BURN, "melee", 0)
sleep(80)
qdel(src)
return
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 44d430c590e..a0f578b7061 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -13,7 +13,6 @@
var/welded = FALSE
var/locked = FALSE
var/wall_mounted = 0 //never solid (You can always pass over it)
- var/health = 100
var/lastbang
var/cutting_tool = /obj/item/weldingtool
var/sound = 'sound/machines/click.ogg'
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm
index 95a523196da..6f5ab3c2dac 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm
@@ -4,7 +4,6 @@
desc = ""
locked = 0
anchored = 1
- health = 200
req_access = list()
layer = 2.9 // ensures the loot they drop always appears on top of them.
var/is_armory = FALSE
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index f10efc4858a..dd8b1a4c08a 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -17,7 +17,6 @@
var/icon_broken = "securebroken"
var/icon_off = "secureoff"
wall_mounted = 0 //never solid (You can always pass over it)
- health = 200
/obj/structure/closet/secure_closet/can_open()
if(!..())
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index 87057c29748..a6fe47e0e9d 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -5,7 +5,7 @@
icon_state = "human_male"
density = 1
anchored = 1
- health = 0 //destroying the statue kills the mob within
+ max_integrity = 0 //destroying the statue kills the mob within
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
var/intialBrute = 0
@@ -20,7 +20,7 @@
L.anchored = 0
L.forceMove(src)
L.disabilities += MUTE
- health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
+ max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
intialBrute = L.getBruteLoss()
@@ -37,7 +37,7 @@
icon_state = "corgi"
desc = "If it takes forever, I will wait for you..."
- if(health == 0) //meaning if the statue didn't find a valid target
+ if(max_integrity == 0) //meaning if the statue didn't find a valid target
qdel(src)
return
@@ -70,7 +70,7 @@
for(var/mob/living/M in src)
M.forceMove(loc)
M.disabilities -= MUTE
- M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
+ M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
..()
@@ -87,16 +87,10 @@
/obj/structure/closet/statue/toggle()
return
-/obj/structure/closet/statue/proc/check_health()
- if(health <= 0)
- for(var/mob/M in src)
- shatter(M)
-
-/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob, params)
- user.changeNext_move(CLICK_CD_MELEE)
- health -= I.force
- visible_message("[user] strikes [src] with [I].")
- check_health()
+/obj/structure/closet/statue/obj_destruction(damage_flag)
+ for(var/mob/M in src)
+ shatter(M)
+ ..()
/obj/structure/closet/statue/MouseDrop_T()
return
@@ -113,9 +107,8 @@
/obj/structure/closet/statue/update_icon()
return
-/obj/structure/closet/statue/proc/shatter(mob/user as mob)
+/obj/structure/closet/statue/proc/shatter(mob/user)
if(user)
user.dust()
dump_contents()
- visible_message("[src] shatters!. ")
- qdel(src)
+ visible_message("[src] shatters!. ")
\ No newline at end of file
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 56748357506..1490385fb9a 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -226,7 +226,6 @@
var/tamperproof = 0
broken = 0
locked = 1
- health = 1000
/obj/structure/closet/crate/secure/update_icon()
..()
diff --git a/code/game/objects/structures/depot.dm b/code/game/objects/structures/depot.dm
index acc4ea55282..5ea249b5ed2 100644
--- a/code/game/objects/structures/depot.dm
+++ b/code/game/objects/structures/depot.dm
@@ -26,7 +26,7 @@
if(!has_overloaded)
overload(TRUE, TRUE)
depotarea.reactor = null
- ..()
+ return ..()
/obj/structure/fusionreactor/ex_act(severity)
if(severity < 3)
@@ -41,13 +41,15 @@
if(iswrench(I))
playsound(loc, I.usesound, 50, 1)
to_chat(user, "The [src] is too well secured to the floor.")
- else if(isscrewdriver(I))
+ return
+ if(isscrewdriver(I))
to_chat(user, "You try to screwdriver open [src], but accidentally release some radiation!")
if(prob(50))
empulse(src, 4, 10)
else
for(var/mob/living/M in range(10, loc))
M.apply_effect(rand(5, 25), IRRADIATE)
+ return
else
return ..()
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 09a12a9171d..62ff1fb8281 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -1,169 +1,53 @@
-#define DISPLAYCASE_FRAME_CIRCUIT 0
-#define DISPLAYCASE_FRAME_SCREWDRIVER 1
-
-// List and hook used to set up the captain's print on their display case
-GLOBAL_LIST_INIT(captain_display_cases, list())
-
-/proc/updateDisplaycase(mob/living/carbon/human/captain)
- if(!GLOB.captain_display_cases.len)
- return
- var/fingerprint = captain.get_full_print()
- for(var/item in GLOB.captain_display_cases)
- var/obj/structure/displaycase/CASE = item
- CASE.ue = fingerprint
-
-/obj/structure/displaycase_frame
- name = "display case frame"
- icon = 'icons/obj/stock_parts.dmi'
- icon_state = "box_glass"
- resistance_flags = ACID_PROOF
- armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
- var/obj/item/airlock_electronics/circuit = null
- var/obj/item/assembly/prox_sensor/sensor = null
- var/state = DISPLAYCASE_FRAME_CIRCUIT
-
-/obj/structure/displaycase_frame/Destroy()
- QDEL_NULL(circuit)
- QDEL_NULL(sensor)
- return ..()
-
-/obj/structure/displaycase_frame/attackby(obj/item/W as obj, mob/user as mob, params)
- var/pstate = state
- var/turf/T = get_turf(src)
- switch(state)
- if(DISPLAYCASE_FRAME_CIRCUIT)
- if(istype(W, /obj/item/airlock_electronics) && W.icon_state != "door_electronics_smoked")
- user.drop_item()
- circuit = W
- circuit.forceMove(src)
- state++
- to_chat(user, "You add the airlock electronics to the frame.")
- playsound(get_turf(src),W.usesound, 50, 1)
- if(istype(W, /obj/item/crowbar))
- new /obj/machinery/constructable_frame/machine_frame(T)
- var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(T)
- G.amount = 5
- qdel(src)
- to_chat(user, "You pry the glass out of the frame.")
- playsound(get_turf(src), W.usesound, 50, 1)
- return
-
- if(DISPLAYCASE_FRAME_SCREWDRIVER)
- if(isscrewdriver(W))
- var/obj/structure/displaycase/C = new(T)
- if(circuit.one_access)
- C.req_access = null
- C.req_one_access = circuit.conf_access
- else
- C.req_access = circuit.conf_access
- C.req_one_access = null
- if(isprox(sensor))
- C.burglar_alarm = 1
- playsound(get_turf(src), W.usesound, 50, 1)
- qdel(src)
- return
- if(istype(W, /obj/item/crowbar))
- circuit.forceMove(T)
- circuit = null
- if(isprox(sensor))
- sensor.forceMove(T)
- sensor = null
- state--
- to_chat(user, "You pry the electronics out of the frame.")
- playsound(get_turf(src), W.usesound, 50, 1)
- if(isprox(W) && !isprox(sensor))
- user.drop_item()
- sensor = W
- sensor.forceMove(src)
- to_chat(user, "You add the proximity sensor to the frame.")
- playsound(src.loc, W.usesound, 50, 1)
-
- if(pstate != state)
- pstate = state
- update_icon()
-
-/obj/structure/displaycase_frame/update_icon()
- switch(state)
- if(1)
- icon_state = "box_glass_circuit"
- else
- icon_state = "box_glass"
-
/obj/structure/displaycase
name = "display case"
icon = 'icons/obj/stationobjs.dmi'
- icon_state = "glassbox20"
- desc = "A display case for prized possessions. It taunts you to kick it."
+ icon_state = "glassbox0"
+ desc = "A display case for prized possessions."
density = TRUE
anchored = TRUE
resistance_flags = ACID_PROOF
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
max_integrity = 200
integrity_failure = 50
- var/health = 30
- var/obj/item/occupant = null
- var/destroyed = FALSE
- var/locked = FALSE
- var/burglar_alarm = FALSE
- var/ue = null
- var/image/occupant_overlay = null
- var/obj/item/airlock_electronics/circuit
+ var/obj/item/showpiece = null
+ var/alert = TRUE
+ var/open = FALSE
+ var/openable = TRUE
+ var/obj/item/airlock_electronics/electronics
var/start_showpiece_type = null //add type for items on display
- var/alarm_needs_power = TRUE
+ var/list/start_showpieces = list() //Takes sublists in the form of list("type" = /obj/item/bikehorn, "trophy_message" = "henk")
+ var/trophy_message = ""
-/obj/structure/displaycase/New()
+/obj/structure/displaycase/Initialize(mapload)
. = ..()
+ if(start_showpieces.len && !start_showpiece_type)
+ var/list/showpiece_entry = pick(start_showpieces)
+ if (showpiece_entry && showpiece_entry["type"])
+ start_showpiece_type = showpiece_entry["type"]
+ if (showpiece_entry["trophy_message"])
+ trophy_message = showpiece_entry["trophy_message"]
if(start_showpiece_type)
- occupant = new start_showpiece_type(src)
+ showpiece = new start_showpiece_type (src)
update_icon()
/obj/structure/displaycase/Destroy()
- dump()
- QDEL_NULL(circuit)
+ QDEL_NULL(electronics)
+ QDEL_NULL(showpiece)
return ..()
-/obj/structure/displaycase/captains_laser
- name = "captain's display case"
- desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system."
- burglar_alarm = TRUE
- locked = TRUE
- req_access = list(access_captain)
- start_showpiece_type = /obj/item/gun/energy/laser/captain
-
-/obj/structure/displaycase/captains_laser/Initialize(mapload)
- . = ..()
- GLOB.captain_display_cases += src
-
-/obj/structure/displaycase/captains_laser/Destroy()
- GLOB.captain_display_cases -= src
- return ..()
-
-/obj/structure/displaycase/lavaland_winter
- burglar_alarm = TRUE
- locked = TRUE
- req_access = list(access_cent_specops)
- start_showpiece_type = /obj/item/gun/energy/laser/captain
-
-/obj/structure/displaycase/stechkin
- name = "officer's display case"
- desc = "A display case containing a humble stechkin pistol. Never forget your roots."
- locked = 1
- req_access = list(access_syndicate_command)
- start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
-
/obj/structure/displaycase/examine(mob/user)
. = ..()
- . += "Peering through the glass, you see that it contains:"
- if(occupant)
- . += "[bicon(occupant)] \A [occupant]."
- else
- . += "Nothing."
+ if(alert)
+ . += "Hooked up with an anti-theft system."
+ if(showpiece)
+ . += "There's [showpiece] inside."
+ if(trophy_message)
+ . += "The plaque reads:\n [trophy_message]"
/obj/structure/displaycase/proc/dump()
- if(occupant)
- occupant.forceMove(get_turf(src))
- occupant = null
- occupant_overlay = null
+ if(showpiece)
+ showpiece.forceMove(loc)
+ showpiece = null
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -176,8 +60,8 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
if(!(flags & NODECONSTRUCT))
dump()
if(!disassembled)
- new /obj/item/shard( src.loc )
- burglar_alarm()
+ new /obj/item/shard(loc)
+ trigger_alarm()
qdel(src)
/obj/structure/displaycase/obj_break(damage_flag)
@@ -187,30 +71,10 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
new /obj/item/shard( src.loc )
playsound(src, "shatter", 70, TRUE)
update_icon()
- burglar_alarm()
+ trigger_alarm()
-/obj/structure/displaycase/proc/healthcheck()
- if(src.health <= 0)
- health = 0
- if(!( src.destroyed ))
- src.density = 0
- src.destroyed = 1
- new /obj/item/shard(loc)
- playsound(get_turf(src), "shatter", 70, 1)
- update_icon()
- spawn(0)
- if(!alarm_needs_power)
- burglar_alarm()
- else
- var/area/a = get_area(src)
- if(isarea(a) && a.power_equip)
- burglar_alarm()
- else
- playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
- return
-
-/obj/structure/displaycase/proc/burglar_alarm()
- if(burglar_alarm && is_station_contact(z))
+/obj/structure/displaycase/proc/trigger_alarm()
+ if(alert && is_station_contact(z))
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
visible_message("The burglar alarm goes off!")
@@ -220,130 +84,153 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
sleep(74) // 7.4 seconds long
/obj/structure/displaycase/update_icon()
- if(destroyed)
- icon_state = "glassbox2b"
+ var/icon/I
+ if(open)
+ I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
else
- icon_state = "glassbox2[locked]"
- overlays = 0
- if(occupant)
- var/icon/occupant_icon=getFlatIcon(occupant)
- occupant_icon.Scale(16,16)
- occupant_overlay = image(occupant_icon)
- occupant_overlay.pixel_x = 8
- occupant_overlay.pixel_y = 8
- if(locked)
- occupant_overlay.alpha = 128
- overlays += occupant_overlay
- return
+ I = icon('icons/obj/stationobjs.dmi',"glassbox0")
+ if(broken)
+ I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
+ if(showpiece)
+ var/icon/S = getFlatIcon(showpiece)
+ S.Scale(17, 17)
+ I.Blend(S,ICON_UNDERLAY,8,8)
+ icon = I
-/obj/structure/displaycase/attackby(obj/item/W as obj, mob/user as mob, params)
- if(istype(W, /obj/item/card))
- var/obj/item/card/id/I = W
- if(!check_access(I))
- to_chat(user, "Access denied.")
- return
- locked = !locked
- if(!locked)
- to_chat(user, "[bicon(src)] \The [src] clicks as locks release, and it slowly opens for you.")
+/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
+ if(I.GetID() && !broken && openable)
+ if(allowed(user))
+ to_chat(user, "You [open ? "close":"open"] [src].")
+ toggle_lock(user)
else
- to_chat(user, "[bicon(src)] You close \the [src] and swipe your card, locking it.")
+ to_chat(user, "Access denied.")
+ else if(iswelder(I) && user.a_intent == INTENT_HELP && !broken)
+ var/obj/item/weldingtool/WT = I
+ if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
+ to_chat(user, "You begin repairing [src].")
+ playsound(loc, WT.usesound, 40, 1)
+ if(do_after(user, 40 * WT.toolspeed, target = src))
+ obj_integrity = max_integrity
+ playsound(loc, 'sound/items/welder2.ogg', 50, 1)
+ update_icon()
+ to_chat(user, "You repair [src].")
+ else
+ to_chat(user, "[src] is already in good condition!")
+ return
+ else if(!alert && iscrowbar(I) && openable) //Only applies to the lab cage and player made display cases
+ if(broken)
+ if(showpiece)
+ to_chat(user, "Remove the displayed object first.")
+ else
+ to_chat(user, "You remove the destroyed case")
+ qdel(src)
+ else
+ to_chat(user, "You start to [open ? "close":"open"] [src].")
+ if(do_after(user, 20 * I.toolspeed, target = src))
+ to_chat(user, "You [open ? "close":"open"] [src].")
+ toggle_lock(user)
+ else if(open && !showpiece)
+ if(user.drop_item())
+ I.forceMove(src)
+ showpiece = I
+ to_chat(user, "You put [I] on display")
+ update_icon()
+ else if(istype(I, /obj/item/stack/sheet/glass) && broken)
+ var/obj/item/stack/sheet/glass/G = I
+ if(G.get_amount() < 2)
+ to_chat(user, "You need two glass sheets to fix the case!")
+ return
+ to_chat(user, "You start fixing [src]...")
+ if(do_after(user, 20, target = src))
+ G.use(2)
+ broken = 0
+ obj_integrity = max_integrity
+ update_icon()
+ else
+ return ..()
+
+/obj/structure/displaycase/proc/toggle_lock(mob/user)
+ open = !open
+ update_icon()
+
+/obj/structure/displaycase/attack_hand(mob/user)
+ user.changeNext_move(CLICK_CD_MELEE)
+ if(showpiece && (broken || open))
+ to_chat(user, "You deactivate the hover field built into the case.")
+ dump()
+ add_fingerprint(user)
update_icon()
return
- if(istype(W,/obj/item/crowbar) && (!locked || destroyed))
- user.visible_message("[user.name] pries \the [src] apart.", \
- "You pry \the [src] apart.", \
- "You hear something pop.")
- var/turf/T = get_turf(src)
- playsound(T, W.usesound, 50, 1)
- dump()
- var/obj/item/airlock_electronics/C = circuit
- if(!C)
- C = new (src)
- C.one_access = !(req_access && req_access.len>0)
- if(!C.one_access)
- C.conf_access = req_access
- else
- C.conf_access = req_one_access
-
- if(!destroyed)
- var/obj/structure/displaycase_frame/F = new(T)
- F.state = DISPLAYCASE_FRAME_SCREWDRIVER
- F.circuit = C
- F.circuit.forceMove(F)
- if(burglar_alarm)
- new /obj/item/assembly/prox_sensor(T)
- F.update_icon()
- else
- C.forceMove(T)
- circuit = null
- new /obj/machinery/constructable_frame/machine_frame(T)
- qdel(src)
- return
- if(W.flags & ABSTRACT)
- to_chat(user, "You can't put this into the case.")
- return
- if(user.a_intent == INTENT_HARM)
- if(locked && !destroyed)
- src.health -= W.force
- src.healthcheck()
- ..()
- else if(!locked)
- dump()
- to_chat(user, "You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.")
- update_icon()
else
- if(locked)
- to_chat(user, "It's locked, you can't put anything into it.")
+ //prevents remote "kicks" with TK
+ if(!Adjacent(user))
return
- if(!occupant)
- if(!user.drop_item())
- to_chat(user, "[W] is stuck to you. You cannot put it in [src]!")
- return
- to_chat(user, "You insert \the [W] into \the [src], and it floats as the hoverfield activates.")
- user.drop_item()
- W.forceMove(src)
- occupant=W
- update_icon()
+ user.visible_message("[user] kicks the display case.")
+ user.do_attack_animation(src, ATTACK_EFFECT_KICK)
+ take_damage(2)
-/obj/structure/displaycase/attack_hand(mob/user as mob)
- if(destroyed || (!locked && user.a_intent == INTENT_HARM))
- if(occupant)
- dump()
- to_chat(user, "You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field.")
- src.add_fingerprint(user)
- update_icon()
- else
- if(user.a_intent == INTENT_HARM)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src, ATTACK_EFFECT_KICK)
- user.visible_message("[user.name] kicks \the [src]!", \
- "You kick \the [src]!", \
- "You hear glass crack.")
- src.health -= 2
- healthcheck()
- else if(!locked)
- if(ishuman(user))
- var/mob/living/carbon/human/H = user
- var/print = H.get_full_print()
- if(!ue)
- to_chat(user, "Your press your thumb against the fingerprint scanner, registering your identity with the case.")
- ue = print
- return
- if(ue != print)
- to_chat(user, "Access denied.")
- return
+/obj/structure/displaycase_chassis
+ anchored = TRUE
+ density = FALSE
+ name = "display case chassis"
+ desc = "The wooden base of a display case."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "glassbox_chassis"
+ var/obj/item/airlock_electronics/electronics
- if(occupant)
- to_chat(user, "Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case.")
- dump()
- update_icon()
+/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
+ if(iswrench(I)) //The player can only deconstruct the wooden frame
+ to_chat(user, "You start disassembling [src]...")
+ playsound(src.loc, I.usesound, 50, 1)
+ if(do_after(user, 30 * I.toolspeed, target = src))
+ playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
+ new /obj/item/stack/sheet/wood(get_turf(src), 5)
+ qdel(src)
+
+ else if(istype(I, /obj/item/airlock_electronics))
+ to_chat(user, "You start installing the electronics into [src]...")
+ playsound(src.loc, I.usesound, 50, 1)
+ if(do_after(user, 30, target = src))
+ if(user.drop_item())
+ I.forceMove(src)
+ electronics = I
+ to_chat(user, "You install the airlock electronics.")
+
+ else if(istype(I, /obj/item/stack/sheet/glass))
+ var/obj/item/stack/sheet/glass/G = I
+ if(G.get_amount() < 10)
+ to_chat(user, "You need ten glass sheets to do this!")
+ return
+ to_chat(user, "You start adding [G] to [src]...")
+ if(do_after(user, 20, target = src))
+ G.use(10)
+ var/obj/structure/displaycase/display = new(src.loc)
+ if(electronics)
+ electronics.forceMove(display)
+ display.electronics = electronics
+ if(electronics.one_access)
+ display.req_one_access = electronics.conf_access
else
- to_chat(src, "[bicon(src)] \The [src] is empty!")
- else
- user.changeNext_move(CLICK_CD_MELEE)
- user.visible_message("[user.name] gently runs [user.p_their()] hands over [src] in appreciation of its contents.", \
- "You gently run your hands over [src] in appreciation of its contents.", \
- "You hear someone streaking glass with their greasy hands.")
+ display.req_access = electronics.conf_access
+ qdel(src)
+ else
+ return ..()
-#undef DISPLAYCASE_FRAME_CIRCUIT
-#undef DISPLAYCASE_FRAME_SCREWDRIVER
+//The captains display case requiring specops ID access is intentional.
+//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
+/obj/structure/displaycase/captain
+ alert = TRUE
+ start_showpiece_type = /obj/item/gun/energy/laser/captain
+ req_access = list(access_cent_specops)
+
+/obj/structure/displaycase/labcage
+ name = "lab cage"
+ desc = "A glass lab container for storing interesting creatures."
+ start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
+ req_access = list(access_rd)
+
+/obj/structure/displaycase/stechkin
+ name = "officer's display case"
+ desc = "A display case containing a humble stechkin pistol. Never forget your roots."
+ start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
+ req_access = list(access_syndicate_command)
\ No newline at end of file
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index e9b3b2610e5..e9853f12162 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -19,12 +19,11 @@
density = 1
anchored = 1
opacity = 0
-
+ max_integrity = 50
icon = 'icons/obj/inflatable.dmi'
icon_state = "wall"
var/torn = /obj/item/inflatable/torn
var/intact = /obj/item/inflatable
- var/health = 50.0
/obj/structure/inflatable/Initialize(location)
..()
@@ -49,20 +48,20 @@
return
if(!Adjacent(usr))
return
- deflate()
+ deconstruct(TRUE)
-/obj/structure/inflatable/proc/deflate(var/violent=0)
+/obj/structure/inflatable/deconstruct(disassembled = TRUE)
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
- if(violent)
+ if(!disassembled)
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/torn/R = new torn(loc)
- src.transfer_fingerprints_to(R)
+ transfer_fingerprints_to(R)
qdel(src)
else
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/R = new intact(loc)
- src.transfer_fingerprints_to(R)
+ transfer_fingerprints_to(R)
qdel(src)
/obj/structure/inflatable/verb/hand_deflate()
@@ -73,7 +72,7 @@
if(usr.stat || usr.restrained())
return
- deflate()
+ deconstruct(TRUE)
/obj/item/inflatable/door
name = "inflatable door"
@@ -209,4 +208,4 @@
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
- new /obj/item/inflatable(src)
+ new /obj/item/inflatable(src)
\ No newline at end of file
diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm
deleted file mode 100644
index 3382b1e839e..00000000000
--- a/code/game/objects/structures/lamarr_cage.dm
+++ /dev/null
@@ -1,53 +0,0 @@
-/obj/structure/lamarr
- name = "Lab Cage"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "labcage1"
- desc = "A glass lab container for storing interesting creatures."
- density = 1
- anchored = 1
- resistance_flags = ACID_PROOF
- var/health = 30
- var/occupied = 1
- var/destroyed = 0
-
-/obj/structure/lamarr/proc/healthcheck()
- if(src.health <= 0)
- if(!( src.destroyed ))
- src.density = 0
- src.destroyed = 1
- new /obj/item/shard(loc)
- playsound(src, "shatter", 70, 1)
- Break()
- else
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
- return
-
-/obj/structure/lamarr/update_icon()
- if(src.destroyed)
- src.icon_state = "labcageb[src.occupied]"
- else
- src.icon_state = "labcage[src.occupied]"
- return
-
-
-/obj/structure/lamarr/attackby(obj/item/W as obj, mob/user as mob, params)
- src.health -= W.force
- src.healthcheck()
- ..()
- return
-
-/obj/structure/lamarr/attack_hand(mob/user as mob)
- if(src.destroyed)
- return
- else
- user.visible_message("[user] kicks the lab cage.", "You kick the lab cage.")
- src.health -= 2
- healthcheck()
- return
-
-/obj/structure/lamarr/proc/Break()
- if(occupied)
- new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
- occupied = 0
- update_icon()
- return
diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm
index d74fdef6ecc..f66d46f0da6 100644
--- a/code/modules/food_and_drinks/food/foods/meat.dm
+++ b/code/modules/food_and_drinks/food/foods/meat.dm
@@ -7,7 +7,6 @@
name = "meat"
desc = "A slab of meat"
icon_state = "meat"
- health = 180
filling_color = "#FF1C1C"
bitesize = 3
list_reagents = list("protein" = 3)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index e45ac15b78e..4439993326c 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -20,7 +20,6 @@
opacity = 1
resistance_flags = FLAMMABLE
max_integrity = 200
- var/health = 50
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
var/tmp/busy = 0
var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/bible, /obj/item/tome) //Things allowed in the bookcase
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 3017257069a..bfd7b3786e7 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -1,6 +1,5 @@
/obj/item/organ/internal/brain
name = "brain"
- health = 400 //They need to live awhile longer than other organs.
max_damage = 120
icon_state = "brain2"
force = 1.0
diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm
index 48daaaa7375..b916fa801f0 100644
--- a/code/modules/mob/living/simple_animal/tribbles.dm
+++ b/code/modules/mob/living/simple_animal/tribbles.dm
@@ -122,70 +122,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
gestation = 0
to_chat(user, "You fuse some recently cut tubes together, it should be able to reproduce again.")
-
-
-//|| Tribble Cage - Lovingly lifted from the lamarr-cage ||
-/obj/structure/tribble_cage
- name = "Lab Cage"
- icon = 'icons/mob/tribbles.dmi'
- icon_state = "labcage1"
- desc = "A glass lab container for storing interesting creatures."
- density = 1
- anchored = 1
- resistance_flags = ACID_PROOF
- var/health = 30
- var/occupied = 1
- var/destroyed = 0
-
-/obj/structure/tribble_cage/bullet_act(var/obj/item/projectile/Proj)
- health -= Proj.damage
- ..()
- src.healthcheck()
-
-/obj/structure/tribble_cage/proc/healthcheck()
- if(src.health <= 0)
- if(!( src.destroyed ))
- src.density = 0
- src.destroyed = 1
- new /obj/item/shard( src.loc )
- playsound(src, "shatter", 70, 1)
- Break()
- else
- playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
- return
-
-/obj/structure/tribble_cage/update_icon()
- if(src.destroyed)
- src.icon_state = "labcageb[src.occupied]"
- else
- src.icon_state = "labcage[src.occupied]"
- return
-
-
-/obj/structure/tribble_cage/attackby(obj/item/W as obj, mob/user as mob, params)
- src.health -= W.force
- src.healthcheck()
- ..()
- return
-
-
-/obj/structure/tribble_cage/attack_hand(mob/user as mob)
- if(src.destroyed)
- return
- else
- user.visible_message("[user] kicks the lab cage.", "You kick the lab cage.")
- src.health -= 2
- healthcheck()
- return
-
-/obj/structure/tribble_cage/proc/Break()
- if(occupied)
- new /mob/living/simple_animal/tribble( src.loc )
- occupied = 0
- update_icon()
- return
-
-
//||Fur and Fur Products ||
/obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 95f5e07e677..f9d290438d4 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -13,7 +13,6 @@
max_integrity = 150
integrity_failure = 50
var/id = 0
- var/health = 10
var/obscured = 0
var/sunfrac = 0
var/adir = SOUTH // actual dir
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 7527ed19f92..98ed11672fb 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -191,7 +191,7 @@
w_class = WEIGHT_CLASS_TINY
parent_organ = "head"
slot = "brain_tumor"
- health = 3
+ max_integrity = 3
/obj/item/organ/internal/shadowtumor/New()
..()
@@ -205,11 +205,11 @@
if(isturf(loc))
var/turf/T = loc
var/light_count = T.get_lumcount()*10
- if(light_count > 4 && health > 0) //Die in the light
- health--
- else if(light_count < 2 && health < 3) //Heal in the dark
- health++
- if(health <= 0)
+ if(light_count > 4 && obj_integrity > 0) //Die in the light
+ obj_integrity--
+ else if(light_count < 2 && obj_integrity < max_integrity) //Heal in the dark
+ obj_integrity++
+ if(obj_integrity <= 0)
visible_message("[src] collapses in on itself!")
qdel(src)
@@ -223,7 +223,6 @@
w_class = WEIGHT_CLASS_TINY
parent_organ = "head"
slot = "brain_tumor"
- health = 3
var/organhonked = 0
var/suffering_delay = 900
var/datum/component/waddle
@@ -297,7 +296,6 @@
w_class = WEIGHT_CLASS_TINY
parent_organ = "groin"
slot = "honk_bladder"
- health = 3
var/datum/component/squeak
/obj/item/organ/internal/honkbladder/insert(mob/living/carbon/M, special = 0)
diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi
index c33efec0f5f..a912acc2fdf 100755
Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ
diff --git a/paradise.dme b/paradise.dme
index a9ad9f7a46a..4d1a6500e33 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1053,7 +1053,6 @@
#include "code\game\objects\structures\janicart.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
-#include "code\game\objects\structures\lamarr_cage.dm"
#include "code\game\objects\structures\lattice.dm"
#include "code\game\objects\structures\loom.dm"
#include "code\game\objects\structures\mineral_doors.dm"