This commit is contained in:
Cameron Lennox
2017-10-08 17:44:25 -04:00
301 changed files with 7133 additions and 3215 deletions
+24 -1
View File
@@ -6,9 +6,13 @@
name = "catwalk"
desc = "Cats really don't like these things."
density = 0
var/health = 100
var/maxhealth = 100
anchored = 1.0
/obj/structure/catwalk/initialize()
for(var/obj/structure/catwalk/O in range(1))
O.update_icon()
for(var/obj/structure/catwalk/C in get_turf(src))
if(C != src)
warning("Duplicate [type] in [loc] ([x], [y], [z])")
@@ -18,6 +22,7 @@
/obj/structure/catwalk/Destroy()
var/turf/location = loc
. = ..()
location.alpha = initial(location.alpha)
for(var/obj/structure/catwalk/L in orange(location, 1))
L.update_icon()
@@ -55,6 +60,8 @@
qdel(src)
if(2.0)
qdel(src)
if(3.0)
qdel(src)
return
/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob)
@@ -67,6 +74,14 @@
new /obj/item/stack/rods(src.loc)
new /obj/structure/lattice(src.loc)
qdel(src)
if(istype(C, /obj/item/weapon/screwdriver))
if(health < maxhealth)
to_chat(user, "<span class='notice'>You begin repairing \the [src.name] with \the [C.name].</span>")
if(do_after(user, 20, src))
health = maxhealth
else
take_damage(C.force)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return ..()
/obj/structure/catwalk/Crossed()
@@ -79,4 +94,12 @@
return 1
if(target && target.z < src.z)
return 0
return 1
return 1
/obj/structure/catwalk/proc/take_damage(amount)
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
Destroy()
@@ -20,6 +20,10 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src)
new /obj/item/clothing/shoes/boots/winter/science(src)
if(prob(50))
new /obj/item/weapon/storage/backpack/dufflebag/sci(src)
else
new /obj/item/weapon/storage/backpack/toxins(src)
return
@@ -369,11 +369,15 @@
new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src)
new /obj/item/clothing/shoes/boots/winter/science(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
return
if(prob(50))
new /obj/item/weapon/storage/backpack/dufflebag/sci(src)
else
new /obj/item/weapon/storage/backpack/satchel/tox(src)
if(prob(50))
new /obj/item/weapon/storage/backpack/dufflebag/sci(src)
else
new /obj/item/weapon/storage/backpack/satchel/tox(src)
/obj/structure/closet/wardrobe/robotics_black
name = "robotics wardrobe"
icon_state = "black"
@@ -390,9 +394,15 @@
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
if(prob(50))
new /obj/item/weapon/storage/backpack/dufflebag/sci(src)
else
new /obj/item/weapon/storage/backpack/satchel/tox(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
if(prob(50))
new /obj/item/weapon/storage/backpack/dufflebag/sci(src)
else
new /obj/item/weapon/storage/backpack/satchel/tox(src)
return
@@ -0,0 +1,80 @@
// These are used to spawn a specific mob when triggered, with the mob controlled by a player pulled from the ghost pool, hense its name.
/obj/structure/ghost_pod
name = "Base Ghost Pod"
desc = "If you can read me, someone don goofed."
icon = 'icons/obj/structures.dmi'
var/ghost_query_type = null
var/icon_state_opened = null // Icon to switch to when 'used'.
var/used = FALSE
var/busy = FALSE // Don't spam ghosts by spamclicking.
// Call this to get a ghost volunteer.
/obj/structure/ghost_pod/proc/trigger()
if(!ghost_query_type)
return FALSE
if(busy)
return FALSE
busy = TRUE
var/datum/ghost_query/Q = new ghost_query_type()
var/list/winner = Q.query()
busy = FALSE
if(winner.len)
var/mob/observer/dead/D = winner[1]
create_occupant(D)
return TRUE
else
return FALSE
// Override this to create whatever mob you need. Be sure to call ..() if you don't want it to make infinite mobs.
/obj/structure/ghost_pod/proc/create_occupant(var/mob/M)
used = TRUE
icon_state = icon_state_opened
return TRUE
// This type is triggered manually by a player discovering the pod and deciding to open it.
/obj/structure/ghost_pod/manual
var/confirm_before_open = FALSE // Recommended to be TRUE if the pod contains a surprise.
/obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user)
if(!used)
if(confirm_before_open)
if(alert(user, "Are you sure you want to open \the [src]?", "Confirm", "No", "Yes") == "No")
return
trigger()
/obj/structure/ghost_pod/manual/attack_ai(var/mob/living/silicon/user)
if(Adjacent(user))
attack_hand(user) // Borgs can open pods.
// This type is triggered on a timer, as opposed to needing another player to 'open' the pod. Good for away missions.
/obj/structure/ghost_pod/automatic
var/delay_to_self_open = 10 MINUTES // How long to wait for first attempt. Note that the timer by default starts when the pod is created.
var/delay_to_try_again = 20 MINUTES // How long to wait if first attempt fails. Set to 0 to never try again.
/obj/structure/ghost_pod/automatic/initialize()
..()
spawn(delay_to_self_open)
if(src)
trigger()
/obj/structure/ghost_pod/automatic/trigger()
. = ..()
if(. == FALSE) // If we failed to get a volunteer, try again later if allowed to.
if(delay_to_try_again)
spawn(delay_to_try_again)
if(src)
trigger()
// This type is triggered by a ghost clicking on it, as opposed to a living player. A ghost query type isn't needed.
/obj/structure/ghost_pod/ghost_activated
description_info = "A ghost can click on this to return to the round as whatever is contained inside this object."
/obj/structure/ghost_pod/ghost_activated/attack_ghost(var/mob/observer/dead/user)
if(used)
to_chat(user, "<span class='warning'>Another spirit appears to have gotten to \the [src] before you. Sorry.</span>")
return
create_occupant(user)
@@ -0,0 +1,61 @@
// These are found on the surface, and contain a drone (braintype, inside a borg shell), with a special module and semi-random laws.
/obj/structure/ghost_pod/manual/lost_drone
name = "drone pod"
desc = "This is a pod which appears to contain a drone. You might be able to reactivate it, if you're brave enough."
description_info = "This contains a dormant drone, which can be activated. The drone will be another player, once activated. \
The laws the drone has will most likely not be the ones you're used to."
icon_state = "borg_pod_closed"
icon_state_opened = "borg_pod_opened"
density = TRUE
ghost_query_type = /datum/ghost_query/lost_drone
confirm_before_open = TRUE
/obj/structure/ghost_pod/manual/lost_drone/trigger()
..()
visible_message("<span class='notice'>\The [src] appears to be attempting to restart the robot contained inside.</span>")
log_and_message_admins("is attempting to open \a [src].")
/obj/structure/ghost_pod/manual/lost_drone/create_occupant(var/mob/M)
density = FALSE
var/mob/living/silicon/robot/lost/randomlaws/R = new(get_turf(src))
R.adjustBruteLoss(rand(5, 30))
R.adjustFireLoss(rand(5, 10))
if(M.mind)
M.mind.transfer_to(R)
// Put this text here before ckey change so that their laws are shown below it, since borg login() shows it.
to_chat(M, "<span class='notice'>You are a <b>Lost Drone</b>, discovered inside the wreckage of your previous home. \
Something has reactivated you, with their intentions unknown to you, and yours unknown to them. They are a foreign entity, \
however they did free you from your pod...</span>")
to_chat(M, "<span class='notice'><b>Be sure to examine your currently loaded lawset closely.</b> Remember, your \
definiton of 'the station' is where your pod is, and unless your laws say otherwise, the entity that released you \
from the pod is not a crewmember.</span>")
R.ckey = M.ckey
visible_message("<span class='warning'>As \the [src] opens, the eyes of the robot flicker as it is activated.</span>")
R.Namepick()
log_and_message_admins("successfully opened \a [src] and got a Lost Drone.")
..()
/obj/structure/ghost_pod/automatic/gravekeeper_drone
name = "drone pod"
desc = "This is a pod which appears to contain a drone. You might be able to reactivate it, if you're brave enough."
description_info = "This contains a dormant drone, which may activate at any moment. The drone will be another player, once activated. \
The laws the drone has will most likely not be the ones you're used to."
icon_state = "borg_pod_closed"
icon_state_opened = "borg_pod_opened"
density = TRUE
ghost_query_type = /datum/ghost_query/gravekeeper_drone
/obj/structure/ghost_pod/automatic/gravekeeper_drone/create_occupant(var/mob/M)
density = FALSE
var/mob/living/silicon/robot/gravekeeper/R = new(get_turf(src))
if(M.mind)
M.mind.transfer_to(R)
// Put this text here before ckey change so that their laws are shown below it, since borg login() shows it.
to_chat(M, "<span class='notice'>You are a <b>Gravekeeper Drone</b>, activated once again to tend to the restful dead.</span>")
to_chat(M, "<span class='notice'><b>Be sure to examine your currently loaded lawset closely.</b> Remember, your \
definiton of 'your gravesite' is where your pod is.</span>")
R.ckey = M.ckey
visible_message("<span class='warning'>As \the [src] opens, the eyes of the robot flicker as it is activated.</span>")
R.Namepick()
..()
+6
View File
@@ -125,6 +125,12 @@
else
return ..()
/obj/structure/girder/proc/take_damage(var/damage)
health -= damage
if(health <= 0)
dismantle()
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
var/amount_to_use = reinf_material ? 1 : 2
if(S.get_amount() < amount_to_use)
+137
View File
@@ -0,0 +1,137 @@
/obj/structure/gravemarker
name = "grave marker"
desc = "An object used in marking graves."
icon_state = "gravemarker"
density = 1
anchored = 1
throwpass = 1
climbable = 1
layer = 3.1 //Above dirt piles
//Maybe make these calculate based on material?
var/health = 100
var/grave_name = "" //Name of the intended occupant
var/epitaph = "" //A quick little blurb
// var/dir_locked = 0 //Can it be spun? Not currently implemented
var/material/material
/obj/structure/gravemarker/New(var/newloc, var/material_name)
..(newloc)
if(!material_name)
material_name = "wood"
material = get_material_by_name("[material_name]")
if(!material)
qdel(src)
return
color = material.icon_colour
/obj/structure/gravemarker/examine(mob/user)
..()
if(get_dist(src, user) < 4)
if(grave_name)
to_chat(user, "Here Lies [grave_name]")
if(get_dist(src, user) < 2)
if(epitaph)
to_chat(user, epitaph)
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!mover)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(get_dir(loc, target) & dir)
return !density
else
return 1
/obj/structure/gravemarker/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSTABLE))
return 1
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
return
if(istype(W, /obj/item/weapon/wrench))
user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].")
dismantle()
..()
/obj/structure/gravemarker/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage)
return
..()
damage(proj_damage)
return
/obj/structure/gravemarker/ex_act(severity)
switch(severity)
if(1.0)
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
qdel(src)
return
if(2.0)
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
if(prob(50))
dismantle()
else
qdel(src)
return
/obj/structure/gravemarker/proc/damage(var/damage)
health -= damage
if(health <= 0)
visible_message("<span class='danger'>\The [src] falls apart!</span>")
dismantle()
/obj/structure/gravemarker/proc/dismantle()
material.place_dismantled_product(get_turf(src))
qdel(src)
return
/obj/structure/gravemarker/verb/rotate()
set name = "Rotate Grave Marker"
set category = "Object"
set src in oview(1)
if(anchored)
return
if(config.ghost_interaction)
src.set_dir(turn(src.dir, 90))
return
else
if(istype(usr,/mob/living/simple_animal/mouse))
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
src.set_dir(turn(src.dir, 90))
return
+11
View File
@@ -239,3 +239,14 @@
if(air_group)
return 0 //Make sure air doesn't drain
..()
/obj/structure/grille/broken/cult
icon_state = "grillecult-b"
/obj/structure/grille/rustic
name = "rustic grille"
desc = "A lattice of metal, arranged in an old, rustic fashion."
icon_state = "grillerustic"
/obj/structure/grille/broken/rustic
icon_state = "grillerustic-b"
+11 -1
View File
@@ -60,7 +60,7 @@
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(usr))
new /obj/item/stack/rods(get_turf(src))
qdel(src)
/obj/structure/railing/proc/NeighborsCheck(var/UpdateNeighbors = 1)
@@ -134,6 +134,9 @@
if(usr.incapacitated())
return 0
if (!can_touch(usr) || ismouse(usr))
return
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
@@ -150,6 +153,9 @@
if(usr.incapacitated())
return 0
if (!can_touch(usr) || ismouse(usr))
return
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
return 0
@@ -166,6 +172,9 @@
if(usr.incapacitated())
return 0
if (!can_touch(usr) || ismouse(usr))
return
if(anchored)
to_chat(usr, "It is fastened to the floor therefore you can't flip it!")
return 0
@@ -249,6 +258,7 @@
else
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
take_damage(W.force)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return ..()
+4 -1
View File
@@ -42,7 +42,7 @@
/obj/structure/simple_door/Destroy()
processing_objects -= src
update_nearby_tiles()
..()
return ..()
/obj/structure/simple_door/get_material()
return material
@@ -194,5 +194,8 @@
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
..(newloc, "wood")
/obj/structure/simple_door/sifwood/New(var/newloc,var/material_name)
..(newloc, "alien wood")
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
..(newloc, "resin")
+21 -21
View File
@@ -25,7 +25,7 @@
if(cistern && !open)
if(!contents.len)
user << "<span class='notice'>The cistern is empty.</span>"
to_chat(user, "<span class='notice'>The cistern is empty.</span>")
return
else
var/obj/item/I = pick(contents)
@@ -33,7 +33,7 @@
user.put_in_hands(I)
else
I.loc = get_turf(src)
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
to_chat(user, "<span class='notice'>You find \an [I] in the cistern.</span>")
w_items -= I.w_class
return
@@ -45,7 +45,7 @@
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(istype(I, /obj/item/weapon/crowbar))
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>"
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>")
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
user.visible_message("<span class='notice'>[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!</span>", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "You hear grinding porcelain.")
@@ -62,7 +62,7 @@
if(G.state>1)
if(!GM.loc == get_turf(src))
user << "<span class='notice'>[GM.name] needs to be on the toilet.</span>"
to_chat(user, "<span class='notice'>[GM.name] needs to be on the toilet.</span>")
return
if(open && !swirlie)
user.visible_message("<span class='danger'>[user] starts to give [GM.name] a swirlie!</span>", "<span class='notice'>You start to give [GM.name] a swirlie!</span>")
@@ -76,19 +76,19 @@
user.visible_message("<span class='danger'>[user] slams [GM.name] into the [src]!</span>", "<span class='notice'>You slam [GM.name] into the [src]!</span>")
GM.adjustBruteLoss(5)
else
user << "<span class='notice'>You need a tighter grip.</span>"
to_chat(user, "<span class='notice'>You need a tighter grip.</span>")
if(cistern && !istype(user,/mob/living/silicon/robot)) //STOP PUTTING YOUR MODULES IN THE TOILET.
if(I.w_class > 3)
user << "<span class='notice'>\The [I] does not fit.</span>"
to_chat(user, "<span class='notice'>\The [I] does not fit.</span>")
return
if(w_items + I.w_class > 5)
user << "<span class='notice'>The cistern is full.</span>"
to_chat(user, "<span class='notice'>The cistern is full.</span>")
return
user.drop_item()
I.loc = src
w_items += I.w_class
user << "You carefully place \the [I] into the cistern."
to_chat(user, "You carefully place \the [I] into the cistern.")
return
@@ -108,12 +108,12 @@
var/mob/living/GM = G.affecting
if(G.state>1)
if(!GM.loc == get_turf(src))
user << "<span class='notice'>[GM.name] needs to be on the urinal.</span>"
to_chat(user, "<span class='notice'>[GM.name] needs to be on the urinal.</span>")
return
user.visible_message("<span class='danger'>[user] slams [GM.name] into the [src]!</span>", "<span class='notice'>You slam [GM.name] into the [src]!</span>")
GM.adjustBruteLoss(8)
else
user << "<span class='notice'>You need a tighter grip.</span>"
to_chat(user, "<span class='notice'>You need a tighter grip.</span>")
@@ -158,10 +158,10 @@
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob)
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
if(istype(I, /obj/item/weapon/wrench))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
watertemp = newtemp
@@ -321,9 +321,9 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(temperature >= H.species.heat_level_1)
H << "<span class='danger'>The water is searing hot!</span>"
to_chat(H, "<span class='danger'>The water is searing hot!</span>")
else if(temperature <= H.species.cold_level_1)
H << "<span class='warning'>The water is freezing cold!</span>"
to_chat(H, "<span class='warning'>The water is freezing cold!</span>")
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
@@ -346,7 +346,7 @@
if(!usr.Adjacent(src))
return ..()
if(!thing.reagents || thing.reagents.total_volume == 0)
usr << "<span class='warning'>\The [thing] is empty.</span>"
to_chat(usr, "<span class='warning'>\The [thing] is empty.</span>")
return
// Clear the vessel.
visible_message("<span class='notice'>\The [usr] tips the contents of \the [thing] into \the [src].</span>")
@@ -360,7 +360,7 @@
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
to_chat(user, "<span class='notice'>You try to move your [temp.name], but cannot!</span>")
return
if(isrobot(user) || isAI(user))
@@ -370,10 +370,10 @@
return
if(busy)
user << "<span class='warning'>Someone's already washing here.</span>"
to_chat(user, "<span class='warning'>Someone's already washing here.</span>")
return
usr << "<span class='notice'>You start washing your hands.</span>"
to_chat(usr, "<span class='notice'>You start washing your hands.</span>")
busy = 1
sleep(40)
@@ -389,7 +389,7 @@
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
if(busy)
user << "<span class='warning'>Someone's already washing here.</span>"
to_chat(user, "<span class='warning'>Someone's already washing here.</span>")
return
var/obj/item/weapon/reagent_containers/RG = O
@@ -417,7 +417,7 @@
return 1
else if(istype(O, /obj/item/weapon/mop))
O.reagents.add_reagent("water", 5)
user << "<span class='notice'>You wet \the [O] in \the [src].</span>"
to_chat(user, "<span class='notice'>You wet \the [O] in \the [src].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return
@@ -427,7 +427,7 @@
var/obj/item/I = O
if(!I || !istype(I,/obj/item)) return
usr << "<span class='notice'>You start washing \the [I].</span>"
to_chat(usr, "<span class='notice'>You start washing \the [I].</span>")
busy = 1
sleep(40)