the-strength-of-this-world-fades

This commit is contained in:
Fox McCloud
2019-10-04 19:34:08 -04:00
parent 20c4cf0a08
commit 5170f3fbae
40 changed files with 582 additions and 850 deletions

View File

@@ -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)

View File

@@ -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
},

View File

@@ -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" = (

View File

@@ -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"

View File

@@ -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.

View File

@@ -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)

View File

@@ -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)

View File

@@ -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
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"))

View File

@@ -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

View File

@@ -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)

View File

@@ -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("<span class='danger'>[user] has attacked the [src.name] with \the [W]!</span>")
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
@@ -248,17 +246,3 @@
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")
*/

View File

@@ -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"

View File

@@ -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].", \
"<span class='notice'>You begin repairing [src]...</span>", \
"<span class='italics'>You hear welding.</span>")
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, "<span class='notice'>You repair [src].</span>")
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
stat &= ~BROKEN
obj_integrity = max_integrity
update_icon()
else
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
else
return ..()

View File

@@ -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, "<span class='notice'>You begin cutting [src] apart...</span>")
if(do_after(user, 30, target = src))
deconstruct(TRUE)
else
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
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, "<span class='notice'>You salvage whats left of \the [src]</span>")
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(.)

View File

@@ -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()

View File

@@ -16,89 +16,96 @@
QDEL_NULL(brain)
return ..()
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/wrench))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = 1
state = 1
if(istype(P, /obj/item/weldingtool))
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(iswelder(P))
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
return
var/obj/item/weldingtool/WT = P
if(!WT.isOn())
to_chat(user, "The welder must be on for this task.")
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
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, "<span class='notice'>You start to deconstruct the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
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, "<span class='notice'>You unfasten the frame.</span>")
anchored = 0
state = 0
if(istype(P, /obj/item/circuitboard/aicore) && !circuit)
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, "<span class='notice'>You place the circuit board inside the frame.</span>")
icon_state = "1"
update_icon()
state = CIRCUIT_CORE
P.forceMove(src)
circuit = P
user.drop_item()
P.loc = src
if(istype(P, /obj/item/screwdriver) && circuit)
return
if(CIRCUIT_CORE)
if(isscrewdriver(P))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = 2
icon_state = "2"
if(istype(P, /obj/item/crowbar) && circuit)
state = SCREWED_CORE
update_icon()
return
if(iscrowbar(P))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = 1
icon_state = "0"
circuit.loc = loc
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
circuit = null
if(2)
if(istype(P, /obj/item/screwdriver) && circuit)
return
if(SCREWED_CORE)
if(iswirecutter(P) && circuit)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
icon_state = "1"
state = CIRCUIT_CORE
update_icon()
return
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
P:amount -= 5
if(!P:amount) qdel(P)
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = 3
icon_state = "3"
if(3)
if(istype(P, /obj/item/wirecutters))
state = CABLED_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
return
if(CABLED_CORE)
if(iswirecutter(P))
if(brain)
to_chat(user, "Get that brain out of there first")
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
else
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 2
icon_state = "2"
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)
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
state = 4
icon_state = "4"
state = GLASS_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
return
if(istype(P, /obj/item/aiModule/purge))
laws.clear_inherent_laws()
@@ -118,52 +125,58 @@
return
laws = M.laws
if(istype(P, /obj/item/mmi))
if(!P:brainmob)
if(istype(P, /obj/item/mmi) && !brain)
var/obj/item/mmi/M = P
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [P] into the frame would sort of defeat the purpose.</span>")
return
if(P:brainmob.stat == 2)
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [P] into the frame would sort of defeat the purpose.</span>")
return
if(jobban_isbanned(P:brainmob, "AI") || jobban_isbanned(P:brainmob,"nonhumandept"))
if(!M.brainmob.client)
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
return
if(jobban_isbanned(M.brainmob, "AI") || jobban_isbanned(M.brainmob, "nonhumandept"))
to_chat(user, "<span class='warning'>This [P] does not seem to fit.</span>")
return
if(!M.brainmob.mind)
to_chat(user, "<span class='warning'>This [M.name] is mindless!</span>")
return
if(istype(P, /obj/item/mmi/syndie))
to_chat(user, "<span class='warning'>This MMI does not seem to fit!</span>")
return
if(P:brainmob.mind)
SSticker.mode.remove_cultist(P:brainmob.mind, 1)
SSticker.mode.remove_revolutionary(P:brainmob.mind, 1)
if(!user.drop_item())
return
user.drop_item()
P.loc = src
brain = P
to_chat(usr, "Added [P].")
icon_state = "3b"
M.forceMove(src)
brain = M
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
update_icon()
return
if(istype(P, /obj/item/crowbar) && brain)
if(iscrowbar(P) && brain)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.loc = loc
brain.forceMove(loc)
brain = null
icon_state = "3"
update_icon()
return
if(4)
if(GLASS_CORE)
if(istype(P, /obj/item/crowbar))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3
if(brain)
icon_state = "3b"
else
icon_state = "3"
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/screwdriver))
if(isscrewdriver(P))
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(!brain)
@@ -172,16 +185,51 @@
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, "<span class='notice'>You disconnect the monitor.</span>")
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
if(CIRCUIT_CORE)
icon_state = "1"
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
icon_state = "3b"
else
icon_state = "3"
if(GLASS_CORE)
icon_state = "4"
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == 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("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
return
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
anchored = 0
return
else
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating...</span>")
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
return
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")
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, "<span class='boldannounce'>ERROR</span>: 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)

View File

@@ -89,17 +89,6 @@
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the frame.</span>")
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, "<span class='warning'>You do not have enough glass to build a display case.</span>")
return
G.use(5)
to_chat(user, "<span class='notice'>You add the glass to the frame.</span>")
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)

View File

@@ -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, "<span class='notice'>Now [anchored ? "un" : ""]securing [name]</span>")
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
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(stat & BROKEN)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
visible_message("<span class='danger'>[user.name] further abuses the shattered [name].</span>", null, 5)
to_chat(user, "<span class='warning'>The broken remains of [src] fall on the ground.</span>")
new /obj/item/stack/sheet/metal(loc, 5)
new /obj/item/shard(loc)
new /obj/item/shard(loc)
else
if(istype(I, /obj/item) )
var/obj/item/W = I
if(W.damtype == STAMINA)
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
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].",
"<span class='notice'>You begin repairing [src]...</span>",
"<span class='italics'>You hear welding.</span>")
playsound(loc, WT.usesound, 40, 1)
if(do_after(user,40 * WT.toolspeed, 1, target = src))
if(!WT.isOn() || !(stat & BROKEN))
return
if(W.force < 15)
visible_message("<span class='danger'>[user.name] hits the [name] with the [W.name] with no visible effect.</span>", null , 5)
playsound(loc, 'sound/effects/glasshit.ogg', 100, 1)
else
hitstaken++
if(hitstaken == 3)
visible_message("<span class='danger'>[user.name] smashes the [name]!</span>", null, 5)
stat |= BROKEN
playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1)
else
visible_message("<span class='danger'>[user.name] forcefully slams the [name] with the [I.name]!</span>", null, 5)
playsound(loc, 'sound/effects/glasshit.ogg', 100, 1)
else
to_chat(user, "<span class='notice'>This does nothing.</span>")
to_chat(user, "<span class='notice'>You repair [src].</span>")
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
obj_integrity = max_integrity
stat &= ~BROKEN
update_icon()
..()
else
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
else
return ..()
/obj/machinery/newscaster/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)

View File

@@ -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

View File

@@ -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
/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("<span class='warning'>[src] slams into [hit_atom] spilling its contents!</span>")
for(var/obj/item/clothing/mask/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("<span class='warning'>[src] shatters spilling its contents!</span>")
for(var/obj/item/clothing/mask/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
/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(contents.len)
visible_message("<span class='warning'>[src] slams into [hit_atom] spilling its contents!</span>")
empty_tray()
return ..()
/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
throwforce = 6

View File

@@ -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),

View File

@@ -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)

View File

@@ -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

View File

@@ -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'

View File

@@ -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

View File

@@ -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(!..())

View File

@@ -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)
/obj/structure/closet/statue/obj_destruction(damage_flag)
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("<span class='warning'>[user] strikes [src] with [I].</span>")
check_health()
..()
/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("<span class='warning'>[src] shatters!. </span>")
qdel(src)

View File

@@ -226,7 +226,6 @@
var/tamperproof = 0
broken = 0
locked = 1
health = 1000
/obj/structure/closet/crate/secure/update_icon()
..()

View File

@@ -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, "<span class='notice'>The [src] is too well secured to the floor.</span>")
else if(isscrewdriver(I))
return
if(isscrewdriver(I))
to_chat(user, "<span class='notice'>You try to screwdriver open [src], but accidentally release some radiation!</span>")
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 ..()

View File

@@ -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, "<span class='notice'>You add the airlock electronics to the frame.</span>")
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, "<span class='notice'>You pry the glass out of the frame.</span>")
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, "<span class='notice'>You pry the electronics out of the frame.</span>")
playsound(get_turf(src), W.usesound, 50, 1)
if(isprox(W) && !isprox(sensor))
user.drop_item()
sensor = W
sensor.forceMove(src)
to_chat(user, "<span class='notice'>You add the proximity sensor to the frame.</span>")
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)
. = ..()
. += "<span class='notice'>Peering through the glass, you see that it contains:</span>"
if(occupant)
. += "[bicon(occupant)] <span class='notice'>\A [occupant].</span>"
else
. += "Nothing."
if(alert)
. += "<span class='notice'>Hooked up with an anti-theft system.</span>"
if(showpiece)
. += "<span class='notice'>There's [showpiece] inside.</span>"
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("<span class='danger'>The burglar alarm goes off!</span>")
@@ -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))
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
if(I.GetID() && !broken && openable)
if(allowed(user))
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
toggle_lock(user)
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
locked = !locked
if(!locked)
to_chat(user, "[bicon(src)] <span class='notice'>\The [src] clicks as locks release, and it slowly opens for you.</span>")
else
to_chat(user, "[bicon(src)] <span class='notice'>You close \the [src] and swipe your card, locking it.</span>")
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, "<span class='notice'>You begin repairing [src].</span>")
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, "<span class='notice'>You repair [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
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 if(!alert && iscrowbar(I) && openable) //Only applies to the lab cage and player made display cases
if(broken)
if(showpiece)
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
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)
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
qdel(src)
else
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
if(do_after(user, 20 * I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
toggle_lock(user)
else if(open && !showpiece)
if(user.drop_item())
I.forceMove(src)
showpiece = I
to_chat(user, "<span class='notice'>You put [I] on display</span>")
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, "<span class='warning'>You need two glass sheets to fix the case!</span>")
return
if(W.flags & ABSTRACT)
to_chat(user, "<span class='danger'>You can't put this into the case.</span>")
return
if(user.a_intent == INTENT_HARM)
if(locked && !destroyed)
src.health -= W.force
src.healthcheck()
..()
else if(!locked)
dump()
to_chat(user, "<span class='danger'>You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>")
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
if(do_after(user, 20, target = src))
G.use(2)
broken = 0
obj_integrity = max_integrity
update_icon()
else
if(locked)
to_chat(user, "<span class='warning'>It's locked, you can't put anything into it.</span>")
return
if(!occupant)
if(!user.drop_item())
to_chat(user, "<span class='notice'>[W] is stuck to you. You cannot put it in [src]!</span>")
return
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src], and it floats as the hoverfield activates.</span>")
user.drop_item()
W.forceMove(src)
occupant=W
return ..()
/obj/structure/displaycase/proc/toggle_lock(mob/user)
open = !open
update_icon()
/obj/structure/displaycase/attack_hand(mob/user as mob)
if(destroyed || (!locked && user.a_intent == INTENT_HARM))
if(occupant)
dump()
to_chat(user, "<span class='danger'>You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>")
src.add_fingerprint(user)
update_icon()
else
if(user.a_intent == INTENT_HARM)
/obj/structure/displaycase/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if(showpiece && (broken || open))
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
dump()
add_fingerprint(user)
update_icon()
return
else
//prevents remote "kicks" with TK
if(!Adjacent(user))
return
user.visible_message("<span class='danger'>[user] kicks the display case.</span>")
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='danger'>[user.name] kicks \the [src]!</span>", \
"<span class='danger'>You kick \the [src]!</span>", \
"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, "<span class='notice'>Your press your thumb against the fingerprint scanner, registering your identity with the case.</span>")
ue = print
return
if(ue != print)
to_chat(user, "<span class='warning'>Access denied.</span>")
return
take_damage(2)
if(occupant)
to_chat(user, "<span class='notice'>Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case.</span>")
dump()
update_icon()
else
to_chat(src, "[bicon(src)] <span class='warning'>\The [src] is empty!</span>")
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.")
/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
#undef DISPLAYCASE_FRAME_CIRCUIT
#undef DISPLAYCASE_FRAME_SCREWDRIVER
/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, "<span class='notice'>You start disassembling [src]...</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30 * I.toolspeed, target = src))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/wood(get_turf(src), 5)
qdel(src)
else if(istype(I, /obj/item/airlock_electronics))
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
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, "<span class='notice'>You install the airlock electronics.</span>")
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, "<span class='warning'>You need ten glass sheets to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
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
display.req_access = electronics.conf_access
qdel(src)
else
return ..()
//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)

View File

@@ -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"

View File

@@ -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("<span class='warning'>[user] kicks the lab cage.</span>", "<span class='notice'>You kick the lab cage.</span>")
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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -122,70 +122,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
gestation = 0
to_chat(user, "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>")
//|| 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("<span class='warning'>[user] kicks the lab cage.</span>", "<span class='notice'>You kick the lab cage.</span>")
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)

View File

@@ -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

View File

@@ -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("<span class='warning'>[src] collapses in on itself!</span>")
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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -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"