| Special | "//Station Administrator in special because he is head of heads ~Intercross21
+ jobs_all += "Station Administrator | "
jobs_all += "Custom | "
counter = 0
@@ -311,11 +311,15 @@
writer.assignment = t1
writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])")
+ data_core.manifest_modify(writer.registered_name, writer.assignment)
+ callHook("reassign_employee", list(writer))
if("reg" in href_list)
if(auth)
writer.registered_name = href_list["reg"]
writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])")
+ data_core.manifest_modify(writer.registered_name, writer.assignment)
+ callHook("reassign_employee", list(writer))
computer.updateUsrDialog()
return
diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm
index e6f19b8588..a335cf1c73 100644
--- a/code/game/machinery/computer3/computers/security.dm
+++ b/code/game/machinery/computer3/computers/security.dm
@@ -513,7 +513,7 @@ What a mess.*/
temp += "Released"
temp += ""
if("rank")
- var/list/L = list( "Head of Personnel", "Captain", "AI" )
+ var/list/L = list( "Head of Personnel", "Station Administrator", "AI" )
//This was so silly before the change. Now it actually works without beating your head against the keyboard. /N
if ((istype(active1, /datum/data/record) && L.Find(rank)))
temp = "Rank:
"
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 665f74d926..1236ae0e5b 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -1,5 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
//Circuit boards are in /code/game/objects/items/weapons/circuitboards/machinery/
/obj/machinery/constructable_frame //Made into a seperate type to make future revisions easier.
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 6c4c6160cd..7a1b12509c 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -27,10 +27,10 @@
initialize_directions = dir
/obj/machinery/atmospherics/unary/cryo_cell/Destroy()
- var/turf/T = loc
+ var/turf/T = src.loc
T.contents += contents
if(beaker)
- beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
+ beaker.loc = get_step(src.loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
..()
/obj/machinery/atmospherics/unary/cryo_cell/initialize()
@@ -64,7 +64,7 @@
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob)
// note that relaymove will also be called for mobs outside the cell with UI open
- if(src.occupant == user && !user.stat)
+ if(occupant == user && !user.stat)
go_out()
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user)
@@ -92,7 +92,7 @@
data["hasOccupant"] = occupant ? 1 : 0
var/occupantData[0]
- if (occupant)
+ if(occupant)
occupantData["name"] = occupant.name
occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health
@@ -124,13 +124,13 @@
data["beakerVolume"] = 0
if(beaker)
data["beakerLabel"] = beaker.label_text ? beaker.label_text : null
- if (beaker.reagents && beaker.reagents.reagent_list.len)
+ if(beaker.reagents && beaker.reagents.reagent_list.len)
for(var/datum/reagent/R in beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
@@ -158,7 +158,7 @@
if(href_list["ejectBeaker"])
if(beaker)
- beaker.loc = get_step(loc, SOUTH)
+ beaker.loc = get_step(src.loc, SOUTH)
beaker = null
if(href_list["ejectOccupant"])
@@ -235,7 +235,7 @@
occupant.adjustOxyLoss(-1)
//severe damage should heal waaay slower without proper chemicals
if(occupant.bodytemperature < 225)
- if (occupant.getToxLoss())
+ if(occupant.getToxLoss())
occupant.adjustToxLoss(max(-1, -20/occupant.getToxLoss()))
var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0
var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0
@@ -267,15 +267,15 @@
//loc.assume_air(expel_gas)
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
- if(!( occupant ))
+ if(!(occupant))
return
//for(var/obj/O in src)
- // O.loc = loc
- if (occupant.client)
+ // O.loc = src.loc
+ if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
- occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
- if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
+ occupant.loc = get_step(src.loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
+ if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug.
// occupant.metabslow = 0
occupant = null
@@ -284,22 +284,22 @@
update_icon()
return
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
- if (stat & (NOPOWER|BROKEN))
+ if(stat & (NOPOWER|BROKEN))
usr << "The cryo cell is not functioning."
return
- if (!istype(M))
+ if(!istype(M))
usr << "The cryo cell cannot handle such a lifeform!"
return
- if (occupant)
+ if(occupant)
usr << "The cryo cell is already occupied!"
return
- if (M.abiotic())
+ if(M.abiotic())
usr << "Subject may not have abiotic items on."
return
if(!node)
usr << "The cell is not correctly connected to its pipe network!"
return
- if (M.client)
+ if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
@@ -320,7 +320,7 @@
set category = "Object"
set src in oview(1)
if(usr == occupant)//If the user is inside the tube...
- if (usr.stat == 2)//and he's not dead....
+ if(usr.stat == 2)//and he's not dead....
return
usr << "Release sequence activated. This will take two minutes."
sleep(1200)
@@ -328,7 +328,7 @@
return
go_out()//and release him from the eternal prison.
else
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
go_out()
add_fingerprint(usr)
@@ -342,7 +342,7 @@
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
put_mob(usr)
return
@@ -353,7 +353,7 @@
/obj/machinery/atmospherics/unary/cryo_cell/return_air_for_internal_lifeform()
//assume that the cryo cell has some kind of breath mask or something that
//draws from the cryo tube's environment, instead of the cold internal air.
- if(loc)
+ if(src.loc)
return loc.return_air()
else
return null
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 6a4353702e..8342fb757c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -6,7 +6,6 @@
* ~ Zuhayr
*/
-
//Main cryopod console.
/obj/machinery/computer/cryopod
@@ -73,18 +72,18 @@
allow_items = 1
/obj/machinery/computer/cryopod/attack_ai()
- src.attack_hand()
+ attack_hand()
/obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
if(stat & (NOPOWER|BROKEN))
return
user.set_machine(src)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
var/dat
- if (!( ticker ))
+ if(!(ticker))
return
dat += "
[storage_name]
"
@@ -105,7 +104,7 @@
var/mob/user = usr
- src.add_fingerprint(user)
+ add_fingerprint(user)
if(href_list["log"])
@@ -159,7 +158,7 @@
I.forceMove(get_turf(src))
frozen_items -= I
- src.updateUsrDialog()
+ updateUsrDialog()
return
/obj/item/weapon/circuitboard/cryopodcontrol
@@ -395,25 +394,18 @@
O.forceMove(src)
//Delete all items not on the preservation list.
- var/list/items = src.contents.Copy()
+ var/list/items = contents.Copy()
items -= occupant // Don't delete the occupant
items -= announce // or the autosay radio.
for(var/obj/item/W in items)
var/preserve = null
- // Snowflaaaake.
- if(istype(W, /obj/item/device/mmi))
- var/obj/item/device/mmi/brain = W
- if(brain.brainmob && brain.brainmob.client && brain.brainmob.key)
+
+ for(var/T in preserve_items)
+ if(istype(W,T))
preserve = 1
- else
- continue
- else
- for(var/T in preserve_items)
- if(istype(W,T))
- preserve = 1
- break
+ break
if(!preserve)
qdel(W)
@@ -451,13 +443,13 @@
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
- if ((R.fields["name"] == occupant.real_name))
+ if((R.fields["name"] == occupant.real_name))
qdel(R)
for(var/datum/data/record/T in data_core.security)
- if ((T.fields["name"] == occupant.real_name))
+ if((T.fields["name"] == occupant.real_name))
qdel(T)
for(var/datum/data/record/G in data_core.general)
- if ((G.fields["name"] == occupant.real_name))
+ if((G.fields["name"] == occupant.real_name))
qdel(G)
icon_state = base_icon_state
@@ -536,7 +528,7 @@
message_admins("[key_name_admin(M)] has entered a stasis pod.")
//Despawning occurs when process() is called with an occupant without a client.
- src.add_fingerprint(M)
+ add_fingerprint(M)
/obj/machinery/cryopod/verb/eject()
set name = "Eject Pod"
@@ -548,14 +540,14 @@
icon_state = base_icon_state
//Eject any items that aren't meant to be in the pod.
- var/list/items = src.contents
+ var/list/items = contents
if(occupant) items -= occupant
if(announce) items -= announce
for(var/obj/item/W in items)
W.forceMove(get_turf(src))
- src.go_out()
+ go_out()
add_fingerprint(usr)
name = initial(name)
@@ -569,7 +561,7 @@
if(usr.stat != 0 || !check_occupant_allowed(usr))
return
- if(src.occupant)
+ if(occupant)
usr << "\The [src] is in use."
return
@@ -585,7 +577,7 @@
if(!usr || !usr.client)
return
- if(src.occupant)
+ if(occupant)
usr << "\The [src] is in use."
return
@@ -605,7 +597,7 @@
time_entered = world.time
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
return
@@ -626,7 +618,7 @@
return
if(occupant.client)
- occupant.client.eye = src.occupant.client.mob
+ occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_turf(src))
@@ -639,8 +631,8 @@
return
-/obj/machinery/cryopod/proc/set_occupant(var/occupant)
- src.occupant = occupant
+/obj/machinery/cryopod/proc/set_occupant(var/new_occupant)
+ occupant = new_occupant
name = initial(name)
if(occupant)
name = "[name] ([occupant])"
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 0140a33fe3..fa4b601e91 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -1,11 +1,9 @@
/*
CONTAINS:
-
Deployable items
Barricades
for reference:
-
access_security = 1
access_brig = 2
access_armory = 3
@@ -50,7 +48,6 @@ for reference:
access_court = 42
access_clown = 43
access_mime = 44
-
*/
//Barricades!
@@ -83,17 +80,17 @@ for reference:
return material
/obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob)
- if (istype(W, /obj/item/stack))
+ if(istype(W, /obj/item/stack))
var/obj/item/stack/D = W
if(D.get_material_name() != material.name)
return //hitting things with the wrong type of stack usually doesn't produce messages, and probably doesn't need to.
- if (health < maxhealth)
- if (D.get_amount() < 1)
+ if(health < maxhealth)
+ if(D.get_amount() < 1)
user << "You need one sheet of [material.display_name] to repair \the [src]."
return
visible_message("[user] begins to repair \the [src].")
if(do_after(user,20) && health < maxhealth)
- if (D.use(1))
+ if(D.use(1))
health = maxhealth
visible_message("[user] repairs \the [src].")
return
@@ -102,11 +99,11 @@ for reference:
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
switch(W.damtype)
if("fire")
- src.health -= W.force * 1
+ health -= W.force * 1
if("brute")
- src.health -= W.force * 0.75
+ health -= W.force * 0.75
else
- if (src.health <= 0)
+ if(health <= 0)
visible_message("The barricade is smashed apart!")
dismantle()
qdel(src)
@@ -125,8 +122,8 @@ for reference:
qdel(src)
return
if(2.0)
- src.health -= 25
- if (src.health <= 0)
+ health -= 25
+ if(health <= 0)
visible_message("\The [src] is blown apart!")
dismantle()
return
@@ -158,114 +155,114 @@ for reference:
var/locked = 0.0
// req_access = list(access_maint_tunnels)
- New()
+/obj/machinery/deployable/barrier/New()
+ ..()
+
+ icon_state = "barrier[locked]"
+
+/obj/machinery/deployable/barrier/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/card/id/))
+ if(allowed(user))
+ if (emagged < 2.0)
+ locked = !locked
+ anchored = !anchored
+ icon_state = "barrier[locked]"
+ if((locked == 1.0) && (emagged < 2.0))
+ user << "Barrier lock toggled on."
+ return
+ else if((locked == 0.0) && (emagged < 2.0))
+ user << "Barrier lock toggled off."
+ return
+ else
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(2, 1, src)
+ s.start()
+ visible_message("BZZzZZzZZzZT")
+ return
+ return
+ else if(istype(W, /obj/item/weapon/wrench))
+ if(health < maxhealth)
+ health = maxhealth
+ emagged = 0
+ req_access = list(access_security)
+ visible_message("[user] repairs \the [src]!")
+ return
+ else if(emagged > 0)
+ emagged = 0
+ req_access = list(access_security)
+ visible_message("[user] repairs \the [src]!")
+ return
+ return
+ else
+ switch(W.damtype)
+ if("fire")
+ health -= W.force * 0.75
+ if("brute")
+ health -= W.force * 0.5
+ else
+ if(health <= 0)
+ explode()
..()
- src.icon_state = "barrier[src.locked]"
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/card/id/))
- if (src.allowed(user))
- if (src.emagged < 2.0)
- src.locked = !src.locked
- src.anchored = !src.anchored
- src.icon_state = "barrier[src.locked]"
- if ((src.locked == 1.0) && (src.emagged < 2.0))
- user << "Barrier lock toggled on."
- return
- else if ((src.locked == 0.0) && (src.emagged < 2.0))
- user << "Barrier lock toggled off."
- return
- else
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(2, 1, src)
- s.start()
- visible_message("BZZzZZzZZzZT")
- return
+/obj/machinery/deployable/barrier/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ explode()
return
- else if (istype(W, /obj/item/weapon/wrench))
- if (src.health < src.maxhealth)
- src.health = src.maxhealth
- src.emagged = 0
- src.req_access = list(access_security)
- visible_message("[user] repairs \the [src]!")
- return
- else if (src.emagged > 0)
- src.emagged = 0
- src.req_access = list(access_security)
- visible_message("[user] repairs \the [src]!")
- return
+ if(2.0)
+ health -= 25
+ if(health <= 0)
+ explode()
return
- else
- switch(W.damtype)
- if("fire")
- src.health -= W.force * 0.75
- if("brute")
- src.health -= W.force * 0.5
- else
- if (src.health <= 0)
- src.explode()
- ..()
+
+/obj/machinery/deployable/barrier/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ if(prob(50/severity))
+ locked = !locked
+ anchored = !anchored
+ icon_state = "barrier[locked]"
- ex_act(severity)
- switch(severity)
- if(1.0)
- src.explode()
- return
- if(2.0)
- src.health -= 25
- if (src.health <= 0)
- src.explode()
- return
- emp_act(severity)
- if(stat & (BROKEN|NOPOWER))
- return
- if(prob(50/severity))
- locked = !locked
- anchored = !anchored
- icon_state = "barrier[src.locked]"
+/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
+ if(air_group || (height==0))
+ return 1
+ if(istype(mover) && mover.checkpass(PASSTABLE))
+ return 1
+ else
+ return 0
- CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
- if(air_group || (height==0))
- return 1
- if(istype(mover) && mover.checkpass(PASSTABLE))
- return 1
- else
- return 0
+/obj/machinery/deployable/barrier/proc/explode()
- proc/explode()
+ visible_message("[src] blows apart!")
+ var/turf/Tsec = get_turf(src)
- visible_message("[src] blows apart!")
- var/turf/Tsec = get_turf(src)
+/* var/obj/item/stack/rods/ =*/
+ PoolOrNew(/obj/item/stack/rods, Tsec)
- /* var/obj/item/stack/rods/ =*/
- PoolOrNew(/obj/item/stack/rods, Tsec)
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(3, 1, src)
+ s.start()
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ explosion(src.loc,-1,-1,0)
+ if(src)
+ qdel(src)
- explosion(src.loc,-1,-1,0)
- if(src)
- qdel(src)
-
-
/obj/machinery/deployable/barrier/emag_act(var/remaining_charges, var/mob/user)
- if (src.emagged == 0)
- src.emagged = 1
- src.req_access.Cut()
- src.req_one_access.Cut()
+ if(emagged == 0)
+ emagged = 1
+ req_access.Cut()
+ req_one_access.Cut()
user << "You break the ID authentication lock on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("BZZzZZzZZzZT")
return 1
- else if (src.emagged == 1)
- src.emagged = 2
+ else if(emagged == 1)
+ emagged = 2
user << "You short out the anchoring mechanism on \the [src]."
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
visible_message("BZZzZZzZZzZT")
- return 1
+ return 1
\ No newline at end of file
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index b51d72ccd8..7f7ce32e03 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -19,12 +19,12 @@
/obj/machinery/button/remote/attack_ai(mob/user as mob)
if(wires & 2)
- return src.attack_hand(user)
+ return attack_hand(user)
else
user << "Error, no route to host."
/obj/machinery/button/remote/attackby(obj/item/weapon/W, mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/button/remote/emag_act(var/remaining_charges, var/mob/user)
if(req_access.len || req_one_access.len)
@@ -37,7 +37,7 @@
if(..())
return
- src.add_fingerprint(user)
+ add_fingerprint(user)
if(stat & (NOPOWER|BROKEN))
return
@@ -92,9 +92,9 @@
/obj/machinery/button/remote/airlock/trigger()
for(var/obj/machinery/door/airlock/D in world)
- if(D.id_tag == src.id)
+ if(D.id_tag == id)
if(specialfunctions & OPEN)
- if (D.density)
+ if(D.density)
spawn(0)
D.open()
return
@@ -136,7 +136,7 @@
/obj/machinery/button/remote/blast_door/trigger()
for(var/obj/machinery/door/blast/M in world)
- if(M.id == src.id)
+ if(M.id == id)
if(M.density)
spawn(0)
M.open()
@@ -155,7 +155,7 @@
/obj/machinery/button/remote/emitter/trigger(mob/user as mob)
for(var/obj/machinery/power/emitter/E in world)
- if(E.id == src.id)
+ if(E.id == id)
spawn(0)
E.activate(user)
return
@@ -174,21 +174,21 @@
update_icon()
for(var/obj/machinery/door/blast/M in machines)
- if (M.id == src.id)
- spawn( 0 )
+ if(M.id == id)
+ spawn(0)
M.open()
return
sleep(20)
for(var/obj/machinery/mass_driver/M in machines)
- if(M.id == src.id)
+ if(M.id == id)
M.drive()
sleep(50)
for(var/obj/machinery/door/blast/M in machines)
- if (M.id == src.id)
+ if(M.id == id)
spawn(0)
M.close()
return
@@ -202,4 +202,4 @@
if(!active || (stat & NOPOWER))
icon_state = "launcherbtt"
else
- icon_state = "launcheract"
+ icon_state = "launcheract"
\ No newline at end of file
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 744e412240..645ccc1fd0 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -88,6 +88,7 @@
icon = 'icons/obj/doors/Doorext.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_ext
opacity = 0
+ glass = 1
/obj/machinery/door/airlock/glass
name = "Glass Airlock"
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 72b878a49a..209e3bb228 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -90,34 +90,37 @@
// This only works on broken doors or doors without power. Also allows repair with Plasteel.
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
src.add_fingerprint(user)
- if(C.pry == 1)
- if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
- var/obj/item/weapon/material/twohanded/fireaxe/F = C
- if(!F.wielded)
- user << "You need to be wielding \the [F] to do that."
- return
+ if(istype(C, /obj/item/weapon)) // For reasons unknown, sometimes C is actually not what it is advertised as, like a mob.
+ if(C.pry == 1) // Can we pry it open with something, like a crowbar/fireaxe/lingblade?
+ if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry.
+ var/obj/item/weapon/material/twohanded/fireaxe/F = C
+ if(!F.wielded)
+ user << "You need to be wielding \the [F] to do that."
+ return
- if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
- force_toggle()
- else
- usr << "[src]'s motors resist your effort."
- return
- if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel")
- var/amt = Ceiling((maxhealth - health)/150)
- if(!amt)
- usr << "\The [src] is already fully repaired."
- return
- var/obj/item/stack/P = C
- if(P.amount < amt)
- usr << "You don't have enough sheets to repair this! You need at least [amt] sheets."
- return
- usr << "You begin repairing [src]..."
- if(do_after(usr, 30))
- if(P.use(amt))
- usr << "You have repaired \The [src]"
- src.repair()
+ // If we're at this point, it's a fireaxe in both hands or something else that doesn't care for twohanding.
+ if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
+ force_toggle()
else
+ usr << "[src]'s motors resist your effort."
+ return
+
+ if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel") // Repairing.
+ var/amt = Ceiling((maxhealth - health)/150)
+ if(!amt)
+ usr << "\The [src] is already fully repaired."
+ return
+ var/obj/item/stack/P = C
+ if(P.amount < amt)
usr << "You don't have enough sheets to repair this! You need at least [amt] sheets."
+ return
+ usr << "You begin repairing [src]..."
+ if(do_after(usr, 30))
+ if(P.use(amt))
+ usr << "You have repaired \The [src]"
+ src.repair()
+ else
+ usr << "You don't have enough sheets to repair this! You need at least [amt] sheets."
diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm
index 6661468f59..7a4087e2c4 100644
--- a/code/game/machinery/doppler_array.dm
+++ b/code/game/machinery/doppler_array.dm
@@ -4,7 +4,6 @@ var/list/doppler_arrays = list()
name = "tachyon-doppler array"
desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array."
-
/obj/machinery/doppler_array/New()
..()
doppler_arrays += src
@@ -39,13 +38,12 @@ var/list/doppler_arrays = list()
for(var/mob/O in hearers(src, null))
O.show_message("[src] states coldly, \"[message]\"",2)
-
/obj/machinery/doppler_array/power_change()
..()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
else
- if( !(stat & NOPOWER) )
+ if(!(stat & NOPOWER))
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-off"
\ No newline at end of file
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 7532cb1407..18844dcd73 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -1,5 +1,4 @@
// It is a gizmo that flashes a small area
-
/obj/machinery/flasher
name = "Mounted flash"
desc = "A wall-mounted flashbulb device."
@@ -27,48 +26,48 @@
/obj/machinery/flasher/power_change()
..()
- if ( !(stat & NOPOWER) )
+ if(!(stat & NOPOWER))
icon_state = "[base_state]1"
-// src.sd_SetLuminosity(2)
+// sd_SetLuminosity(2)
else
icon_state = "[base_state]1-p"
-// src.sd_SetLuminosity(0)
+// sd_SetLuminosity(0)
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/wirecutters))
+ if(istype(W, /obj/item/weapon/wirecutters))
add_fingerprint(user)
- src.disable = !src.disable
- if (src.disable)
+ disable = !disable
+ if(disable)
user.visible_message("[user] has disconnected the [src]'s flashbulb!", "You disconnect the [src]'s flashbulb!")
- if (!src.disable)
+ if(!disable)
user.visible_message("[user] has connected the [src]'s flashbulb!", "You connect the [src]'s flashbulb!")
//Let the AI trigger them directly.
/obj/machinery/flasher/attack_ai()
- if (src.anchored)
- return src.flash()
+ if(anchored)
+ return flash()
else
return
/obj/machinery/flasher/proc/flash()
- if (!(powered()))
+ if(!(powered()))
return
- if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
+ if((disable) || (last_flash && world.time < last_flash + 150))
return
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("[base_state]_flash", src)
- src.last_flash = world.time
+ last_flash = world.time
use_power(1500)
for (var/mob/O in viewers(src, null))
- if (get_dist(src, O) > src.range)
+ if(get_dist(src, O) > range)
continue
var/flash_time = strength
- if (istype(O, /mob/living/carbon/human))
+ if(istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
if(!H.eyecheck() <= 0)
continue
@@ -94,26 +93,26 @@
..(severity)
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
- if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
+ if((disable) || (last_flash && world.time < last_flash + 150))
return
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
- if ((M.m_intent != "walk") && (src.anchored))
- src.flash()
+ if((M.m_intent != "walk") && (anchored))
+ flash()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/wrench))
+ if(istype(W, /obj/item/weapon/wrench))
add_fingerprint(user)
- src.anchored = !src.anchored
+ anchored = !anchored
- if (!src.anchored)
+ if(!anchored)
user.show_message(text("[src] can now be moved."))
- src.overlays.Cut()
+ overlays.Cut()
- else if (src.anchored)
+ else if(anchored)
user.show_message(text("[src] is now secured."))
- src.overlays += "[base_state]-s"
+ overlays += "[base_state]-s"
/obj/machinery/button/flasher
name = "flasher button"
@@ -130,7 +129,7 @@
icon_state = "launcheract"
for(var/obj/machinery/flasher/M in machines)
- if(M.id == src.id)
+ if(M.id == id)
spawn()
M.flash()
@@ -139,4 +138,4 @@
icon_state = "launcherbtt"
active = 0
- return
+ return
\ No newline at end of file
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index e31a19b265..9f594e4178 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -1,5 +1,3 @@
-//these are probably broken
-
/obj/machinery/floodlight
name = "Emergency Floodlight"
icon = 'icons/obj/machines/floodlight.dmi'
@@ -13,7 +11,7 @@
var/brightness_on = 8 //can't remember what the maxed out value is
/obj/machinery/floodlight/New()
- src.cell = new(src)
+ cell = new(src)
cell.maxcharge = 1000
cell.charge = 1000 // 41minutes @ 200W
..()
@@ -71,7 +69,6 @@
if(!turn_on(1))
user << "You try to turn on \the [src] but it does not work."
-
/obj/machinery/floodlight/attack_hand(mob/user as mob)
if(open && cell)
if(ishuman(user))
@@ -79,12 +76,12 @@
user.put_in_hands(cell)
cell.loc = user.loc
else
- cell.loc = loc
+ cell.loc = src.loc
cell.add_fingerprint(user)
cell.update_icon()
- src.cell = null
+ cell = null
on = 0
set_light(0)
user << "You remove the power cell"
@@ -99,10 +96,9 @@
update_icon()
-
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/screwdriver))
- if (!open)
+ if(istype(W, /obj/item/weapon/screwdriver))
+ if(!open)
if(unlocked)
unlocked = 0
user << "You screw the battery panel in place."
@@ -110,7 +106,7 @@
unlocked = 1
user << "You unscrew the battery panel."
- if (istype(W, /obj/item/weapon/crowbar))
+ if(istype(W, /obj/item/weapon/crowbar))
if(unlocked)
if(open)
open = 0
@@ -121,7 +117,7 @@
open = 1
user << "You remove the battery panel."
- if (istype(W, /obj/item/weapon/cell))
+ if(istype(W, /obj/item/weapon/cell))
if(open)
if(cell)
user << "There is a power cell already installed."
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index 7298b62abf..a134e68e3f 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -132,7 +132,7 @@ var/list/floor_light_cache = list()
if(1)
qdel(src)
if(2)
- if (prob(50))
+ if(prob(50))
qdel(src)
else if(prob(20))
stat |= BROKEN
@@ -140,7 +140,7 @@ var/list/floor_light_cache = list()
if(isnull(damaged))
damaged = 0
if(3)
- if (prob(5))
+ if(prob(5))
qdel(src)
else if(isnull(damaged))
damaged = 0
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
index c682a2b228..1cbccc195c 100644
--- a/code/game/machinery/floorlayer.dm
+++ b/code/game/machinery/floorlayer.dm
@@ -1,5 +1,4 @@
/obj/machinery/floorlayer
-
name = "automatic floor layer"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "pipe_d"
@@ -35,8 +34,7 @@
return
/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
-
- if (istype(W, /obj/item/weapon/wrench))
+ if(istype(W, /obj/item/weapon/wrench))
var/m = input("Choose work mode", "Mode") as null|anything in mode
mode[m] = !mode[m]
var/O = mode[m]
@@ -109,4 +107,4 @@
/obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf)
for(var/obj/item/stack/tile/tile in w_turf)
- TakeTile(tile)
+ TakeTile(tile)
\ No newline at end of file
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index 1dddcedea0..3005996f0b 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -1,3 +1,177 @@
+/var/global/list/construction_frame_wall
+/var/global/list/construction_frame_floor
+
+/proc/populate_frame_types()
+ //Create global frame type list if it hasn't been made already.
+ construction_frame_wall = list()
+ construction_frame_floor = list()
+ for(var/R in typesof(/datum/frame/frame_types) - /datum/frame/frame_types)
+ var/datum/frame/frame_types/type = new R
+ if(type.frame_style == "wall")
+ construction_frame_wall += type
+ else
+ construction_frame_floor += type
+
+ var/datum/frame/frame_types/cancel/cancel = new /datum/frame/frame_types/cancel
+ construction_frame_wall += cancel
+ construction_frame_floor += cancel
+
+/datum/frame/frame_types
+ var/name
+ var/frame_size = 5
+ var/frame_class
+ var/circuit
+ var/frame_style = "floor"
+ var/x_offset
+ var/y_offset
+
+/datum/frame/frame_types/computer
+ name = "Computer"
+ frame_class = "computer"
+
+/datum/frame/frame_types/machine
+ name = "Machine"
+ frame_class = "machine"
+
+/datum/frame/frame_types/conveyor
+ name = "Conveyor"
+ frame_class = "machine"
+ circuit = /obj/item/weapon/circuitboard/conveyor
+
+/datum/frame/frame_types/photocopier
+ name = "Photocopier"
+ frame_class = "machine"
+
+/datum/frame/frame_types/washing_machine
+ name = "Washing Machine"
+ frame_class = "machine"
+
+/datum/frame/frame_types/medical_console
+ name = "Medical Console"
+ frame_class = "computer"
+
+/datum/frame/frame_types/medical_pod
+ name = "Medical Pod"
+ frame_class = "machine"
+
+/datum/frame/frame_types/dna_analyzer
+ name = "DNA Analyzer"
+ frame_class = "machine"
+
+/datum/frame/frame_types/mass_driver
+ name = "Mass Driver"
+ frame_class = "machine"
+ circuit = /obj/item/weapon/circuitboard/mass_driver
+
+/datum/frame/frame_types/holopad
+ name = "Holopad"
+ frame_class = "computer"
+ frame_size = 4
+
+/datum/frame/frame_types/microwave
+ name = "Microwave"
+ frame_class = "machine"
+ frame_size = 4
+
+/datum/frame/frame_types/fax
+ name = "Fax"
+ frame_class = "machine"
+ frame_size = 3
+
+/datum/frame/frame_types/recharger
+ name = "Recharger"
+ frame_class = "machine"
+ circuit = /obj/item/weapon/circuitboard/recharger
+ frame_size = 3
+
+/datum/frame/frame_types/grinder
+ name = "Grinder"
+ frame_class = "machine"
+ circuit = /obj/item/weapon/circuitboard/grinder
+ frame_size = 3
+
+/datum/frame/frame_types/display
+ name = "Display"
+ frame_class = "display"
+ frame_style = "wall"
+ x_offset = 32
+ y_offset = 32
+
+/datum/frame/frame_types/supply_request_console
+ name = "Supply Request Console"
+ frame_class = "display"
+ frame_style = "wall"
+ x_offset = 32
+ y_offset = 32
+
+/datum/frame/frame_types/atm
+ name = "ATM"
+ frame_class = "display"
+ frame_size = 3
+ frame_style = "wall"
+ x_offset = 32
+ y_offset = 32
+
+/datum/frame/frame_types/newscaster
+ name = "Newscaster"
+ frame_class = "display"
+ frame_size = 3
+ frame_style = "wall"
+ x_offset = 28
+ y_offset = 30
+
+/datum/frame/frame_types/wall_charger
+ name = "Wall Charger"
+ frame_class = "machine"
+ circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
+ frame_size = 3
+ frame_style = "wall"
+ x_offset = 32
+ y_offset = 32
+
+/datum/frame/frame_types/fire_alarm
+ name = "Fire Alarm"
+ frame_class = "alarm"
+ frame_size = 2
+ frame_style = "wall"
+ x_offset = 24
+ y_offset = 24
+
+/datum/frame/frame_types/air_alarm
+ name = "Air Alarm"
+ frame_class = "alarm"
+ frame_size = 2
+ frame_style = "wall"
+ x_offset = 24
+ y_offset = 24
+
+/datum/frame/frame_types/guest_pass_console
+ name = "Guest Pass Console"
+ frame_class = "display"
+ frame_size = 2
+ frame_style = "wall"
+ x_offset = 30
+ y_offset = 30
+
+/datum/frame/frame_types/intercom
+ name = "Intercom"
+ frame_class = "alarm"
+ frame_size = 2
+ frame_style = "wall"
+ x_offset = 28
+ y_offset = 28
+
+/datum/frame/frame_types/keycard_authenticator
+ name = "Keycard Authenticator"
+ frame_class = "alarm"
+ frame_size = 1
+ frame_style = "wall"
+ x_offset = 24
+ y_offset = 24
+
+/datum/frame/frame_types/cancel //used to get out of input dialogue
+ name = "Cancel"
+
/obj/structure/frame
anchored = 0
name = "frame"
@@ -6,20 +180,16 @@
var/state = 0
var/obj/item/weapon/circuitboard/circuit = null
var/need_circuit = 1
- var/frame_type = "machine"
+ var/datum/frame/frame_types/frame_type = new /datum/frame/frame_types/machine
var/list/components = null
var/list/req_components = null
var/list/req_component_names = null
- var/list/alarms = list("firealarm", "airalarm", "intercom", "keycard")
- var/list/machines = list(
- "machine", "photocopier", "fax", "microwave", "conveyor", "recharger", "wrecharger",
- "washing", "grinder", "teleporter_hub", "teleporter_station", "medpod", "dna_analyzer",
- "massdriver")
- var/list/computers = list("computer", "holopad", "console")
- var/list/displays = list("display", "guestpass", "newscaster", "atm", "request")
- var/list/no_circuit = list("wrecharger", "recharger", "grinder", "conveyor", "massdriver")
+/obj/structure/frame/computer //used for maps
+ frame_type = new /datum/frame/frame_types/computer
+ anchored = 1
+ density = 1
/obj/structure/frame/proc/update_desc()
var/D
@@ -31,6 +201,12 @@
D = "Requires [english_list(component_list)]."
desc = D
+/obj/structure/frame/update_icon()
+ ..()
+ var/type = lowertext(frame_type.name)
+ type = replacetext(type, " ", "_")
+ icon_state = "[type]_[state]"
+
/obj/structure/frame/proc/check_components(mob/user as mob)
components = list()
req_components = circuit.req_components.Copy()
@@ -41,175 +217,110 @@
var/obj/ct = A
req_component_names[A] = initial(ct.name)
-/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/obj/item/frame/frame_type, mob/user as mob)
+/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
..()
if(building)
- src.frame_type = frame_type
- icon_state = "[frame_type]_0"
+ frame_type = type
+ state = 0
+
if(dir)
- src.set_dir(dir)
+ set_dir(dir)
- if(frame_type in alarms)
- if(loc)
- src.loc = loc
+ if(loc)
+ src.loc = loc
- state = 0
- if(frame_type == "airalarm" || frame_type == "firealarm" || frame_type == "keycard")
- if(dir)
- src.set_dir(dir)
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
- pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0
+ if(frame_type.x_offset)
+ pixel_x = (dir & 3)? 0 : (dir == 4 ? -frame_type.x_offset : frame_type.x_offset)
- if(frame_type == "intercom")
- if(dir)
- src.set_dir(dir)
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
- pixel_y = (dir & 3)? (dir == 1 ? -28 : 28) : 0
+ if(frame_type.y_offset)
+ pixel_y = (dir & 3)? (dir == 1 ? -frame_type.y_offset : frame_type.y_offset) : 0
- update_icon()
- return
-
- if(frame_type in displays)
- if(loc)
- src.loc = loc
-
- if(frame_type == "display" || frame_type == "atm" || frame_type == "request")
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
- pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0
-
- if(frame_type == "newscaster")
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
- pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
-
- if(frame_type == "guestpass")
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
- pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
-
- update_icon()
- return
-
- if(frame_type in no_circuit)
+ if(frame_type.circuit)
need_circuit = 0
- if(frame_type == "wrecharger")
- circuit = new /obj/item/weapon/circuitboard/recharger/wrecharger(src)
- if(loc)
- src.loc = loc
+ circuit = new frame_type.circuit(src)
- state = 0
-
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -26 : 32)
- pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0
-
- update_icon()
- return
- if(frame_type == "recharger")
- circuit = new /obj/item/weapon/circuitboard/recharger(src)
- if(frame_type == "grinder")
- circuit = new /obj/item/weapon/circuitboard/grinder(src)
- if(frame_type == "conveyor")
- circuit = new /obj/item/weapon/circuitboard/conveyor(src)
- if(frame_type == "massdriver")
- circuit = new /obj/item/weapon/circuitboard/mass_driver(src)
-
- if(frame_type == "computer")
+ if(frame_type.name == "Computer")
density = 1
- if(frame_type in machines)
+
+ if(frame_type.frame_class == "machine")
density = 1
- return
+
+ update_icon()
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/wrench))
- if(state == 0)
+ if(state == 0 && !anchored)
user << "You start to wrench the frame into place."
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
- src.anchored = 1
+ anchored = 1
if(!need_circuit && circuit)
- src.state = 2
+ state = 2
check_components()
update_desc()
- src.icon_state = "[frame_type]_2"
user << "You wrench the frame into place and set the outer cover."
else
- src.state = 1
user << "You wrench the frame into place."
- return
- if(state == 1)
+ else if(state == 0 && anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "You unfasten the frame."
- src.anchored = 0
- src.state = 0
- return
+ anchored = 0
- if(istype(P, /obj/item/weapon/weldingtool))
+ else if(istype(P, /obj/item/weapon/weldingtool))
if(state == 0)
var/obj/item/weapon/weldingtool/WT = P
- if(!WT.remove_fuel(0, user))
+ if(WT.remove_fuel(0, user))
+ playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
+ if(do_after(user, 20))
+ if(src && WT.isOn())
+ user << "You deconstruct the frame."
+ new /obj/item/stack/material/steel(src.loc, frame_type.frame_size)
+ qdel(src)
+ return
+ else if(!WT.remove_fuel(0, user))
user << "The welding tool must be on to complete this task."
return
- playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
- if(!src || !WT.isOn()) return
- user << "You deconstruct the frame."
- if(frame_type == "holopad" || frame_type == "microwave")
- new /obj/item/stack/material/steel( src.loc, 4 )
- else if(frame_type == "fax" || frame_type == "newscaster" || frame_type == "recharger" || frame_type == "wrecharger" || frame_type == "grinder")
- new /obj/item/stack/material/steel( src.loc, 3 )
- else if(frame_type == "firealarm" || frame_type == "airalarm" || frame_type == "intercom" || frame_type == "guestpass")
- new /obj/item/stack/material/steel( src.loc, 2 )
- else if(frame_type == "keycard")
- new /obj/item/stack/material/steel( src.loc, 1 )
- else
- new /obj/item/stack/material/steel( src.loc, 5 )
- qdel(src)
- return
- if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit)
- if(state == 1)
+ else if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit)
+ if(state == 0 && anchored)
var/obj/item/weapon/circuitboard/B = P
- if(B.board_type == frame_type)
+ var/datum/frame/frame_types/board_type = B.board_type
+ if(board_type.name == frame_type.name)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "You place the circuit board inside the frame."
- src.icon_state = "[frame_type]_1"
- src.circuit = P
+ circuit = P
user.drop_item()
P.loc = src
- if(frame_type in machines) //because machines are assholes
+ state = 1
+ if(frame_type.frame_class == "machine")
check_components()
update_desc()
- return
else
user << "This frame does not accept circuit boards of this type!"
- return
+ return
- if(istype(P, /obj/item/weapon/screwdriver))
+ else if(istype(P, /obj/item/weapon/screwdriver))
if(state == 1)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You screw the circuit board into place."
- src.state = 2
- src.icon_state = "[frame_type]_2"
- return
+ state = 2
- if(state == 2)
+ else if(state == 2)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You unfasten the circuit board."
- src.state = 1
- src.icon_state = "[frame_type]_1"
- return
+ state = 1
- if(!need_circuit && circuit)
+ else if(!need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You unfasten the outer cover."
- src.state = 1
- src.icon_state = "[frame_type]_0"
- return
+ state = 0
- if(state == 3)
- if(frame_type in machines)
+ else if(state == 3)
+ if(frame_type.frame_class == "machine")
var/component_check = 1
for(var/R in req_components)
if(req_components[R] > 0)
@@ -217,7 +328,7 @@
break
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
+ var/obj/machinery/new_machine = new circuit.build_path(src.loc, dir)
// Handle machines that have allocated default parts in thier constructor.
if(new_machine.component_parts)
for(var/CP in new_machine.component_parts)
@@ -226,9 +337,9 @@
else
new_machine.component_parts = list()
- src.circuit.construct(new_machine)
+ circuit.construct(new_machine)
- for(var/obj/O in src.components)
+ for(var/obj/O in components)
if(circuit.contain_parts)
O.loc = new_machine
else
@@ -240,173 +351,158 @@
new_machine.RefreshParts()
- new_machine.pixel_x = src.pixel_x
- new_machine.pixel_y = src.pixel_y
+ new_machine.pixel_x = pixel_x
+ new_machine.pixel_y = pixel_y
qdel(src)
- return
+ return
- if(frame_type in alarms)
+ else if(frame_type.frame_class == "alarm")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You fasten the cover."
- var/obj/machinery/B = new src.circuit.build_path ( src.loc )
- B.pixel_x = src.pixel_x
- B.pixel_y = src.pixel_y
+ var/obj/machinery/B = new circuit.build_path(src.loc)
+ B.pixel_x = pixel_x
+ B.pixel_y = pixel_y
B.set_dir(dir)
- src.circuit.construct(B)
+ circuit.construct(B)
+ circuit.loc = null
+ B.circuit = circuit
qdel(src)
return
- if(state == 4)
- if(frame_type in computers)
+ else if(state == 4)
+ if(frame_type.frame_class == "computer")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You connect the monitor."
- var/obj/machinery/B = new src.circuit.build_path ( src.loc )
- B.pixel_x = src.pixel_x
- B.pixel_y = src.pixel_y
+ var/obj/machinery/B = new circuit.build_path(src.loc)
+ B.pixel_x = pixel_x
+ B.pixel_y = pixel_y
B.set_dir(dir)
- src.circuit.construct(B)
+ circuit.construct(B)
+ circuit.loc = null
+ B.circuit = circuit
qdel(src)
return
- if(frame_type in displays)
+ else if(frame_type.frame_class == "display")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You connect the monitor."
- var/obj/machinery/B = new src.circuit.build_path ( src.loc )
- B.pixel_x = src.pixel_x
- B.pixel_y = src.pixel_y
+ var/obj/machinery/B = new circuit.build_path(src.loc)
+ B.pixel_x = pixel_x
+ B.pixel_y = pixel_y
B.set_dir(dir)
- src.circuit.construct(B)
+ circuit.construct(B)
+ circuit.loc = null
+ B.circuit = circuit
qdel(src)
return
- if(istype(P, /obj/item/weapon/crowbar))
+ else if(istype(P, /obj/item/weapon/crowbar))
if(state == 1)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You remove the circuit board."
- src.state = 1
- src.icon_state = "[frame_type]_0"
- circuit.loc = src.loc
- src.circuit = null
- if(frame_type in machines) //becuase machines are assholes
+ state = 0
+ circuit.forceMove(src.loc)
+ circuit = null
+ if(frame_type.frame_class == "machine")
req_components = null
- return
- if(state == 3)
- if(frame_type in machines)
+ else if(state == 3)
+ if(frame_type.frame_class == "machine")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(components.len == 0)
user << "There are no components to remove."
else
user << "You remove the components."
for(var/obj/item/weapon/W in components)
- W.forceMove(loc)
+ W.forceMove(src.loc)
check_components()
update_desc()
user << desc
- return
- if(state == 4)
- if(frame_type in computers)
+ else if(state == 4)
+ if(frame_type.frame_class == "computer")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You remove the glass panel."
- src.state = 3
- src.icon_state = "[frame_type]_3"
- new /obj/item/stack/material/glass( src.loc, 2 )
- return
+ state = 3
+ new /obj/item/stack/material/glass(src.loc, 2)
- if(frame_type in displays)
+ else if(frame_type.frame_class == "display")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You remove the glass panel."
- src.state = 3
- src.icon_state = "[frame_type]_3"
- new /obj/item/stack/material/glass( src.loc, 2 )
- return
+ state = 3
+ new /obj/item/stack/material/glass(src.loc, 2)
- if(istype(P, /obj/item/stack/cable_coil))
+ else if(istype(P, /obj/item/stack/cable_coil))
if(state == 2)
var/obj/item/stack/cable_coil/C = P
- if (C.get_amount() < 5)
+ if(C.get_amount() < 5)
user << "You need five coils of wire to add them to the frame."
return
user << "You start to add cables to the frame."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == 2)
- if (C.use(5))
+ if(C.use(5))
user << "You add cables to the frame."
state = 3
- icon_state = "[frame_type]_3"
- if(frame_type in machines)
+ if(frame_type.frame_class == "machine")
user << desc
- return
- if(istype(P, /obj/item/weapon/wirecutters))
+ else if(istype(P, /obj/item/weapon/wirecutters))
if(state == 3)
- if(frame_type in computers)
+ if(frame_type.frame_class == "computer")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
- src.state = 2
- src.icon_state = "[frame_type]_2"
- new /obj/item/stack/cable_coil( src.loc, 5 )
- return
+ state = 2
+ new /obj/item/stack/cable_coil(src.loc, 5)
- if(frame_type in displays)
+ else if(frame_type.frame_class == "display")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
- src.state = 2
- src.icon_state = "[frame_type]_2"
- new /obj/item/stack/cable_coil( src.loc, 5 )
- return
+ state = 2
+ new /obj/item/stack/cable_coil(src.loc, 5)
- if(frame_type in alarms)
+ else if(frame_type.frame_class == "alarm")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
- src.state = 2
- src.icon_state = "[frame_type]_2"
- new /obj/item/stack/cable_coil( src.loc, 5 )
- return
+ state = 2
+ new /obj/item/stack/cable_coil(src.loc, 5)
- if(frame_type in machines)
+ else if(frame_type.frame_class == "machine")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
- src.state = 2
- src.icon_state = "[frame_type]_2"
- new /obj/item/stack/cable_coil( src.loc, 5 )
- return
+ state = 2
+ new /obj/item/stack/cable_coil(src.loc, 5)
- if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
+ else if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
if(state == 3)
- if(frame_type in computers)
+ if(frame_type.frame_class == "computer")
var/obj/item/stack/G = P
- if (G.get_amount() < 2)
+ if(G.get_amount() < 2)
user << "You need two sheets of glass to put in the glass panel."
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "You start to put in the glass panel."
if(do_after(user, 20) && state == 3)
- if (G.use(2))
+ if(G.use(2))
user << "You put in the glass panel."
- src.state = 4
- src.icon_state = "[frame_type]_4"
- return
+ state = 4
- if(frame_type in displays)
+ else if(frame_type.frame_class == "display")
var/obj/item/stack/G = P
- if (G.get_amount() < 2)
+ if(G.get_amount() < 2)
user << "You need two sheets of glass to put in the glass panel."
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "You start to put in the glass panel."
if(do_after(user, 20) && state == 3)
- if (G.use(2))
+ if(G.use(2))
user << "You put in the glass panel."
- src.state = 4
- src.icon_state = "[frame_type]_4"
- return
+ state = 4
- if(istype(P, /obj/item))
+ else if(istype(P, /obj/item))
if(state == 3)
- if(frame_type in machines)
+ if(frame_type.frame_class == "machine")
for(var/I in req_components)
if(istype(P, I) && (req_components[I] > 0))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
@@ -423,10 +519,10 @@
update_desc()
break
- if(istype(P, /obj/item/stack/material/glass/reinforced))
+ else if(istype(P, /obj/item/stack/material/glass/reinforced))
var/obj/item/stack/material/glass/reinforced/CP = P
if(CP.get_amount() > 1)
- var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
+ var/camt = min(CP.amount, req_components[I]) // amount of glass to take, idealy amount required, but limited by amount provided
var/obj/item/stack/material/glass/reinforced/CC = new /obj/item/stack/material/glass/reinforced(src)
CC.amount = camt
CC.update_icon()
@@ -445,4 +541,6 @@
user << desc
if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil) && !istype(P, /obj/item/stack/material))
user << "You cannot add that component to the machine!"
- return
\ No newline at end of file
+ return
+
+ update_icon()
\ No newline at end of file
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 58c8423a23..158b718e83 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -19,11 +19,9 @@ Possible to do for anyone motivated enough:
Itegrate EMP effect to disable the unit.
*/
-
/*
* Holopad
*/
-
#define HOLOPAD_PASSIVE_POWER_USAGE 1
#define HOLOGRAM_POWER_USAGE 2
#define RANGE_BASED 4
@@ -37,39 +35,19 @@ var/const/HOLOPAD_MODE = RANGE_BASED
icon_state = "holopad0"
show_messages = 1
circuit = /obj/item/weapon/circuitboard/holopad
-
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
-
var/power_per_hologram = 500 //per usage per hologram
idle_power_usage = 5
use_power = 1
-
var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
/obj/machinery/hologram/holopad/attackby(obj/item/I as obj, user as mob)
- if(istype(I, /obj/item/weapon/screwdriver) && circuit)
- user << "You start removing the glass."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
- var/obj/item/weapon/circuitboard/M = new circuit( A )
- A.circuit = M
- A.anchored = 1
- A.density = 1
- A.frame_type = "holopad"
- for (var/obj/C in src)
- C.forceMove(loc)
- user << "You remove the glass."
- A.state = 4
- A.icon_state = "holopad_4"
- M.deconstruct(src)
- for (var/mob/living/silicon/ai/master in masters)
- clear_holo(master)
- qdel(src)
+ if(computer_deconstruction_screwdriver(user, I))
+ return
else
- src.attack_hand(user)
+ attack_hand(user)
return
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
@@ -87,7 +65,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
user << "A request for AI presence was already sent recently."
/obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user)
- if (!istype(user))
+ if(!istype(user))
return
/*There are pretty much only three ways to interact here.
I don't need to check for client since they're clicking on an object.
@@ -102,11 +80,11 @@ var/const/HOLOPAD_MODE = RANGE_BASED
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it
- if (user.holo)
+ if(user.holo)
user << "ERROR: Image feed in progress."
return
create_holo(user)//Create one.
- src.visible_message("A holographic image of [user] flicks to life right before your eyes!")
+ visible_message("A holographic image of [user] flicks to life right before your eyes!")
else
user << "ERROR: Unable to project hologram."
return
@@ -165,7 +143,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
user.holo = null
qdel(masters[user])//Get rid of user's hologram
masters -= user //Discard AI from the list of those who use holopad
- if (!masters.len)//If no users left
+ if(!masters.len)//If no users left
set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
return 1
@@ -214,10 +192,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(1.0)
qdel(src)
if(2.0)
- if (prob(50))
+ if(prob(50))
qdel(src)
if(3.0)
- if (prob(5))
+ if(prob(5))
qdel(src)
return
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index 6319871022..7e465db189 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -14,20 +14,20 @@
var/on_icon = "sign_on"
/obj/machinery/holosign/proc/toggle()
- if (stat & (BROKEN|NOPOWER))
+ if(stat & (BROKEN|NOPOWER))
return
lit = !lit
use_power = lit ? 2 : 1
update_icon()
/obj/machinery/holosign/update_icon()
- if (!lit)
+ if(!lit)
icon_state = "sign_off"
else
icon_state = on_icon
/obj/machinery/holosign/power_change()
- if (stat & NOPOWER)
+ if(stat & NOPOWER)
lit = 0
use_power = 0
update_icon()
@@ -55,8 +55,8 @@
icon_state = "light[active]"
for(var/obj/machinery/holosign/M in machines)
- if (M.id == src.id)
- spawn( 0 )
+ if(M.id == id)
+ spawn(0)
M.toggle()
return
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 5fd791843d..97c430f9d0 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -11,7 +11,7 @@
active_power_usage = 4
/obj/machinery/igniter/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/igniter/attack_hand(mob/user as mob)
if(..())
@@ -19,14 +19,14 @@
add_fingerprint(user)
use_power(50)
- src.on = !( src.on )
- src.icon_state = text("igniter[]", src.on)
+ on = !(on)
+ icon_state = text("igniter[]", on)
return
/obj/machinery/igniter/process() //ugh why is this even in process()?
- if (src.on && !(stat & NOPOWER) )
+ if(on && !(stat & NOPOWER))
var/turf/location = src.loc
- if (isturf(location))
+ if(isturf(location))
location.hotspot_expose(1000,500,1)
return 1
@@ -36,8 +36,8 @@
/obj/machinery/igniter/power_change()
..()
- if(!( stat & NOPOWER) )
- icon_state = "igniter[src.on]"
+ if(!(stat & NOPOWER))
+ icon_state = "igniter[on]"
else
icon_state = "igniter0"
@@ -57,56 +57,54 @@
idle_power_usage = 2
active_power_usage = 4
-
/obj/machinery/sparker/New()
..()
/obj/machinery/sparker/power_change()
..()
- if ( !(stat & NOPOWER) && disable == 0 )
+ if(!(stat & NOPOWER) && disable == 0)
icon_state = "[base_state]"
-// src.sd_SetLuminosity(2)
+// sd_SetLuminosity(2)
else
icon_state = "[base_state]-p"
-// src.sd_SetLuminosity(0)
+// sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/screwdriver))
+ if(istype(W, /obj/item/weapon/screwdriver))
add_fingerprint(user)
- src.disable = !src.disable
- if (src.disable)
+ disable = !disable
+ if(disable)
user.visible_message("[user] has disabled the [src]!", "You disable the connection to the [src].")
icon_state = "[base_state]-d"
- if (!src.disable)
+ if(!disable)
user.visible_message("[user] has reconnected the [src]!", "You fix the connection to the [src].")
- if(src.powered())
+ if(powered())
icon_state = "[base_state]"
else
icon_state = "[base_state]-p"
/obj/machinery/sparker/attack_ai()
- if (src.anchored)
- return src.ignite()
+ if(anchored)
+ return ignite()
else
return
/obj/machinery/sparker/proc/ignite()
- if (!(powered()))
+ if(!(powered()))
return
- if ((src.disable) || (src.last_spark && world.time < src.last_spark + 50))
+ if((disable) || (last_spark && world.time < last_spark + 50))
return
-
flick("[base_state]-spark", src)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
- src.last_spark = world.time
+ last_spark = world.time
use_power(1000)
var/turf/location = src.loc
- if (isturf(location))
+ if(isturf(location))
location.hotspot_expose(1000,500,1)
return 1
@@ -132,14 +130,14 @@
icon_state = "launcheract"
for(var/obj/machinery/sparker/M in machines)
- if (M.id == src.id)
- spawn( 0 )
+ if(M.id == id)
+ spawn(0)
M.ignite()
for(var/obj/machinery/igniter/M in machines)
- if(M.id == src.id)
+ if(M.id == id)
use_power(50)
- M.on = !( M.on )
+ M.on = !(M.on)
M.icon_state = text("igniter[]", M.on)
sleep(50)
@@ -147,4 +145,4 @@
icon_state = "launcherbtt"
active = 0
- return
+ return
\ No newline at end of file
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 4ae639c039..c0f2a284f4 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -10,7 +10,7 @@
/obj/machinery/iv_drip/var/obj/item/weapon/reagent_containers/beaker = null
/obj/machinery/iv_drip/update_icon()
- if(src.attached)
+ if(attached)
icon_state = "hooked"
else
icon_state = ""
@@ -41,28 +41,28 @@
return
if(attached)
- visible_message("[src.attached] is detached from \the [src]")
- src.attached = null
- src.update_icon()
+ visible_message("[attached] is detached from \the [src]")
+ attached = null
+ update_icon()
return
if(in_range(src, usr) && ishuman(over_object) && get_dist(over_object, src) <= 1)
visible_message("[usr] attaches \the [src] to \the [over_object].")
- src.attached = over_object
- src.update_icon()
+ attached = over_object
+ update_icon()
/obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/reagent_containers))
- if(!isnull(src.beaker))
+ if(istype(W, /obj/item/weapon/reagent_containers))
+ if(!isnull(beaker))
user << "There is already a reagent container loaded!"
return
user.drop_item()
W.loc = src
- src.beaker = W
+ beaker = W
user << "You attach \the [W] to \the [src]."
- src.update_icon()
+ update_icon()
return
if(istype(W, /obj/item/weapon/screwdriver))
@@ -70,11 +70,11 @@
user << "You start to dismantle the IV drip."
if(do_after(user, 15))
user << "You dismantle the IV drip."
- var/obj/item/stack/rods/A = new /obj/item/stack/rods( src.loc )
+ var/obj/item/stack/rods/A = new /obj/item/stack/rods(src.loc)
A.amount = 6
- if(src.beaker)
- src.beaker.loc = get_turf(src)
- src.beaker = null
+ if(beaker)
+ beaker.loc = get_turf(src)
+ beaker = null
qdel(src)
return
else
@@ -84,24 +84,24 @@
/obj/machinery/iv_drip/process()
set background = 1
- if(src.attached)
+ if(attached)
- if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc)))
- visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
- src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
- src.attached = null
- src.update_icon()
+ if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
+ visible_message("The needle is ripped out of [attached], doesn't that hurt?")
+ attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
+ attached = null
+ update_icon()
return
- if(src.attached && src.beaker)
+ if(attached && beaker)
// Give blood
if(mode)
- if(src.beaker.volume > 0)
+ if(beaker.volume > 0)
var/transfer_amount = REM
- if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood))
+ if(istype(beaker, /obj/item/weapon/reagent_containers/blood))
// speed up transfer on blood packs
transfer_amount = 4
- src.beaker.reagents.trans_to_mob(src.attached, transfer_amount, CHEM_BLOOD)
+ beaker.reagents.trans_to_mob(attached, transfer_amount, CHEM_BLOOD)
update_icon()
// Take blood
@@ -130,7 +130,7 @@
var/datum/reagent/B = T.take_blood(beaker,amount)
- if (B)
+ if(B)
beaker.reagents.reagent_list |= B
beaker.reagents.update_total()
beaker.on_reagent_change()
@@ -138,9 +138,9 @@
update_icon()
/obj/machinery/iv_drip/attack_hand(mob/user as mob)
- if(src.beaker)
- src.beaker.loc = get_turf(src)
- src.beaker = null
+ if(beaker)
+ beaker.loc = get_turf(src)
+ beaker = null
update_icon()
else
return ..()
@@ -163,7 +163,7 @@
/obj/machinery/iv_drip/examine(mob/user)
..(user)
- if (!(user in view(2)) && user!=src.loc) return
+ if(!(user in view(2)) && user != src.loc) return
user << "The IV drip is [mode ? "injecting" : "taking blood"]."
@@ -177,7 +177,7 @@
usr << "[attached ? attached : "No one"] is attached."
-/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through.
return 1
return ..()
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 3cc537be49..57e0e1b55a 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -38,7 +38,6 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/New()
..()
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm
index 1be387f35f..a3b0f9fdd4 100644
--- a/code/game/machinery/kitchen/microwave.dm
+++ b/code/game/machinery/kitchen/microwave.dm
@@ -30,7 +30,6 @@
reagents = new/datum/reagents(100)
reagents.my_atom = src
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 7d8e75764c..180471f070 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -18,19 +18,17 @@
/obj/machinery/light_switch/New()
..()
spawn(5)
- src.area = get_area(src)
+ area = get_area(src)
if(otherarea)
- src.area = locate(text2path("/area/[otherarea]"))
+ area = locate(text2path("/area/[otherarea]"))
if(!name)
name = "light switch ([area.name])"
- src.on = src.area.lightswitch
+ on = area.lightswitch
updateicon()
-
-
/obj/machinery/light_switch/proc/updateicon()
if(!overlay)
overlay = image(icon, "light1-overlay", LIGHTING_LAYER+0.1)
@@ -77,4 +75,4 @@
..(severity)
return
power_change()
- ..(severity)
+ ..(severity)
\ No newline at end of file
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 30a9b8548b..9b7760a12e 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -113,7 +113,6 @@ Class Procs:
var/global/gl_uid = 1
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/circuit = null
- var/frame_type = "machine"
/obj/machinery/New(l, d=0)
..(l)
@@ -124,6 +123,8 @@ Class Procs:
else
machines += src
machinery_sort_required = 1
+ if(circuit)
+ circuit = new circuit(src)
/obj/machinery/Destroy()
machines -= src
@@ -165,11 +166,11 @@ Class Procs:
qdel(src)
return
if(2.0)
- if (prob(50))
+ if(prob(50))
qdel(src)
return
if(3.0)
- if (prob(25))
+ if(prob(25))
qdel(src)
return
else
@@ -182,20 +183,20 @@ Class Procs:
/obj/machinery/proc/auto_use_power()
if(!powered(power_channel))
return 0
- if(src.use_power == 1)
- use_power(idle_power_usage,power_channel, 1)
- else if(src.use_power >= 2)
- use_power(active_power_usage,power_channel, 1)
+ if(use_power == 1)
+ use_power(idle_power_usage, power_channel, 1)
+ else if(use_power >= 2)
+ use_power(active_power_usage, power_channel, 1)
return 1
/obj/machinery/proc/operable(var/additional_flags = 0)
return !inoperable(additional_flags)
/obj/machinery/proc/inoperable(var/additional_flags = 0)
- return (stat & (NOPOWER|BROKEN|additional_flags))
+ return (stat & (NOPOWER | BROKEN | additional_flags))
/obj/machinery/CanUseTopic(var/mob/user)
- if(!interact_offline && (stat & (NOPOWER|BROKEN)))
+ if(!interact_offline && (stat & (NOPOWER | BROKEN)))
return STATUS_CLOSE
return ..()
@@ -214,20 +215,19 @@ Class Procs:
// For some reason attack_robot doesn't work
// This is to stop robots from using cameras to remotely control machines.
if(user.client && user.client.eye == user)
- return src.attack_hand(user)
+ return attack_hand(user)
else
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/attack_hand(mob/user as mob)
if(inoperable(MAINT))
return 1
if(user.lying || user.stat)
return 1
- if ( ! (istype(usr, /mob/living/carbon/human) || \
- istype(usr, /mob/living/silicon)))
+ if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/living/silicon)))
usr << "You don't have the dexterity to do this!"
return 1
- if (ishuman(user))
+ if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 55)
visible_message("[H] stares cluelessly at [src].")
@@ -236,7 +236,7 @@ Class Procs:
user << "You momentarily forget how to use [src]."
return 1
- src.add_fingerprint(user)
+ add_fingerprint(user)
return ..()
@@ -252,7 +252,7 @@ Class Procs:
O.show_message("\icon[src] [msg]", 2)
/obj/machinery/proc/ping(text=null)
- if (!text)
+ if(!text)
text = "\The [src] pings."
state(text, "blue")
@@ -266,7 +266,7 @@ Class Procs:
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
+ if(electrocute_mob(user, get_area(src), src, 0.7))
var/area/temp_area = get_area(src)
if(temp_area)
var/obj/machinery/power/apc/temp_apc = temp_area.get_apc()
@@ -304,7 +304,7 @@ Class Procs:
RefreshParts()
else
user << "Following parts detected in the machine:"
- for(var/var/obj/item/C in component_parts)
+ for(var/var/obj/item/C in component_parts) //var/var/obj/item/C?
user << " [C.name]"
return 1
@@ -324,31 +324,77 @@ Class Procs:
update_icon()
return 1
+/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
+ if(!istype(S))
+ return 0
+ if(!circuit)
+ return 0
+ user << "You start disconnecting the monitor."
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ if(do_after(user, 20))
+ if(stat & BROKEN)
+ user << "The broken glass falls out."
+ new /obj/item/weapon/material/shard(src.loc)
+ else
+ user << "You disconnect the monitor."
+ . = dismantle()
+
+/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
+ if(!istype(S))
+ return 0
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ panel_open = !panel_open
+ user << "The wires have been [panel_open ? "exposed" : "unexposed"]"
+ update_icon()
+ return 1
+
+/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/weapon/wirecutters/W)
+ if(!istype(W))
+ return 0
+ if(!panel_open)
+ return 0
+ user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ new/obj/item/stack/cable_coil(get_turf(src), 5)
+ . = dismantle()
+
/obj/machinery/proc/dismantle()
- playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
+ playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
var/obj/item/weapon/circuitboard/M = circuit
A.circuit = M
A.anchored = 1
A.density = 1
A.frame_type = M.board_type
- if(A.frame_type in A.no_circuit)
+ if(A.frame_type.circuit)
A.need_circuit = 0
- for (var/obj/D in src.component_parts)
- D.forceMove(loc)
- if(A.components)
- A.components.Cut()
+
+ if(A.frame_type.frame_class == "machine")
+ for(var/obj/D in component_parts)
+ D.forceMove(src.loc)
+ if(A.components)
+ A.components.Cut()
+ else
+ A.components = list()
+ component_parts = list()
+ A.check_components()
+
+ if(A.frame_type.frame_class == "alarm")
+ A.state = 2
+ else if(A.frame_type.frame_class == "computer" || A.frame_type.frame_class == "display")
+ if(stat & BROKEN)
+ A.state = 3
+ else
+ A.state = 4
else
- A.components = list()
- component_parts = list()
- A.icon_state = "[A.frame_type]_3"
- A.state = 3
- A.dir = dir
+ A.state = 3
+
+ A.set_dir(dir)
A.pixel_x = pixel_x
A.pixel_y = pixel_y
- A.check_components()
A.update_desc()
+ A.update_icon()
M.loc = null
M.deconstruct(src)
qdel(src)
- return 1
+ return 1
\ No newline at end of file
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index ca044a5a48..af61e93424 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -5,7 +5,6 @@
// This was created for firing ranges, but I suppose this could have other applications - Doohl
/obj/machinery/magnetic_module
-
icon = 'icons/obj/objects.dmi'
icon_state = "floor_magnet-f"
name = "Electromagnetic Generator"
@@ -29,166 +28,157 @@
var/center_y = 0
var/max_dist = 20 // absolute value of center_x,y cannot exceed this integer
- New()
- ..()
- var/turf/T = loc
- hide(!T.is_plating())
- center = T
+/obj/machinery/magnetic_module/New()
+ ..()
+ var/turf/T = loc
+ hide(!T.is_plating())
+ center = T
- spawn(10) // must wait for map loading to finish
- if(radio_controller)
- radio_controller.add_object(src, freq, RADIO_MAGNETS)
+ spawn(10) // must wait for map loading to finish
+ if(radio_controller)
+ radio_controller.add_object(src, freq, RADIO_MAGNETS)
- spawn()
- magnetic_process()
+ spawn()
+ magnetic_process()
- // update the invisibility and icon
- hide(var/intact)
- invisibility = intact ? 101 : 0
- updateicon()
+// update the invisibility and icon
+/obj/machinery/magnetic_module/hide(var/intact)
+ invisibility = intact ? 101 : 0
+ updateicon()
- // update the icon_state
- proc/updateicon()
- var/state="floor_magnet"
- var/onstate=""
- if(!on)
- onstate="0"
+// update the icon_state
+/obj/machinery/magnetic_module/proc/updateicon()
+ var/state="floor_magnet"
+ var/onstate=""
+ if(!on)
+ onstate="0"
- if(invisibility)
- icon_state = "[state][onstate]-f" // if invisible, set icon to faded version
- // in case of being revealed by T-scanner
- else
- icon_state = "[state][onstate]"
+ if(invisibility)
+ icon_state = "[state][onstate]-f" // if invisible, set icon to faded version
+ // in case of being revealed by T-scanner
+ else
+ icon_state = "[state][onstate]"
- receive_signal(datum/signal/signal)
+/obj/machinery/magnetic_module/receive_signal(datum/signal/signal)
+ var/command = signal.data["command"]
+ var/modifier = signal.data["modifier"]
+ var/signal_code = signal.data["code"]
+ if(command && (signal_code == code))
- var/command = signal.data["command"]
- var/modifier = signal.data["modifier"]
- var/signal_code = signal.data["code"]
- if(command && (signal_code == code))
+ Cmd(command, modifier)
- Cmd(command, modifier)
+/obj/machinery/magnetic_module/proc/Cmd(var/command, var/modifier)
+ if(command)
+ switch(command)
+ if("set-electriclevel")
+ if(modifier) electricity_level = modifier
+ if("set-magneticfield")
+ if(modifier) magnetic_field = modifier
+ if("add-elec")
+ electricity_level++
+ if(electricity_level > 12)
+ electricity_level = 12
+ if("sub-elec")
+ electricity_level--
+ if(electricity_level <= 0)
+ electricity_level = 1
+ if("add-mag")
+ magnetic_field++
+ if(magnetic_field > 4)
+ magnetic_field = 4
+ if("sub-mag")
+ magnetic_field--
+ if(magnetic_field <= 0)
+ magnetic_field = 1
+ if("set-x")
+ if(modifier) center_x = modifier
+ if("set-y")
+ if(modifier) center_y = modifier
- proc/Cmd(var/command, var/modifier)
+ if("N") // NORTH
+ center_y++
+ if("S") // SOUTH
+ center_y--
+ if("E") // EAST
+ center_x++
+ if("W") // WEST
+ center_x--
+ if("C") // CENTER
+ center_x = 0
+ center_y = 0
+ if("R") // RANDOM
+ center_x = rand(-max_dist, max_dist)
+ center_y = rand(-max_dist, max_dist)
- if(command)
- switch(command)
- if("set-electriclevel")
- if(modifier) electricity_level = modifier
- if("set-magneticfield")
- if(modifier) magnetic_field = modifier
+ if("set-code")
+ if(modifier) code = modifier
+ if("toggle-power")
+ on = !on
- if("add-elec")
- electricity_level++
- if(electricity_level > 12)
- electricity_level = 12
- if("sub-elec")
- electricity_level--
- if(electricity_level <= 0)
- electricity_level = 1
- if("add-mag")
- magnetic_field++
- if(magnetic_field > 4)
- magnetic_field = 4
- if("sub-mag")
- magnetic_field--
- if(magnetic_field <= 0)
- magnetic_field = 1
+ if(on)
+ spawn()
+ magnetic_process()
- if("set-x")
- if(modifier) center_x = modifier
- if("set-y")
- if(modifier) center_y = modifier
+/obj/machinery/magnetic_module/process()
+ if(stat & NOPOWER)
+ on = 0
- if("N") // NORTH
- center_y++
- if("S") // SOUTH
- center_y--
- if("E") // EAST
- center_x++
- if("W") // WEST
- center_x--
- if("C") // CENTER
- center_x = 0
- center_y = 0
- if("R") // RANDOM
- center_x = rand(-max_dist, max_dist)
- center_y = rand(-max_dist, max_dist)
+ // Sanity checks:
+ if(electricity_level <= 0)
+ electricity_level = 1
+ if(magnetic_field <= 0)
+ magnetic_field = 1
- if("set-code")
- if(modifier) code = modifier
- if("toggle-power")
- on = !on
+ // Limitations:
+ if(abs(center_x) > max_dist)
+ center_x = max_dist
+ if(abs(center_y) > max_dist)
+ center_y = max_dist
+ if(magnetic_field > 4)
+ magnetic_field = 4
+ if(electricity_level > 12)
+ electricity_level = 12
- if(on)
- spawn()
- magnetic_process()
+ // Update power usage:
+ if(on)
+ use_power = 2
+ active_power_usage = electricity_level*15
+ else
+ use_power = 0
+ // Overload conditions:
+ /* // Eeeehhh kinda stupid
+ if(on)
+ if(electricity_level > 11)
+ if(prob(electricity_level))
+ explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son
+ spawn(2)
+ qdel(src)
+ */
+ updateicon()
- process()
- if(stat & NOPOWER)
- on = 0
+/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
+ if(pulling) return
+ while(on)
- // Sanity checks:
- if(electricity_level <= 0)
- electricity_level = 1
- if(magnetic_field <= 0)
- magnetic_field = 1
+ pulling = 1
+ center = locate(x+center_x, y+center_y, z)
+ if(center)
+ for(var/obj/M in orange(magnetic_field, center))
+ if(!M.anchored && (M.flags & CONDUCT))
+ step_towards(M, center)
+ for(var/mob/living/silicon/S in orange(magnetic_field, center))
+ if(istype(S, /mob/living/silicon/ai)) continue
+ step_towards(S, center)
- // Limitations:
- if(abs(center_x) > max_dist)
- center_x = max_dist
- if(abs(center_y) > max_dist)
- center_y = max_dist
- if(magnetic_field > 4)
- magnetic_field = 4
- if(electricity_level > 12)
- electricity_level = 12
+ use_power(electricity_level * 5)
+ sleep(13 - electricity_level)
- // Update power usage:
- if(on)
- use_power = 2
- active_power_usage = electricity_level*15
- else
- use_power = 0
-
-
- // Overload conditions:
- /* // Eeeehhh kinda stupid
- if(on)
- if(electricity_level > 11)
- if(prob(electricity_level))
- explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son
- spawn(2)
- qdel(src)
- */
-
- updateicon()
-
-
- proc/magnetic_process() // proc that actually does the pulling
- if(pulling) return
- while(on)
-
- pulling = 1
- center = locate(x+center_x, y+center_y, z)
- if(center)
- for(var/obj/M in orange(magnetic_field, center))
- if(!M.anchored && (M.flags & CONDUCT))
- step_towards(M, center)
-
- for(var/mob/living/silicon/S in orange(magnetic_field, center))
- if(istype(S, /mob/living/silicon/ai)) continue
- step_towards(S, center)
-
- use_power(electricity_level * 5)
- sleep(13 - electricity_level)
-
- pulling = 0
+ pulling = 0
/obj/machinery/magnetic_module/Destroy()
if(radio_controller)
@@ -220,186 +210,186 @@
var/datum/radio_frequency/radio_connection
- New()
- ..()
+/obj/machinery/magnetic_controller/New()
+ ..()
- if(autolink)
- for(var/obj/machinery/magnetic_module/M in world)
- if(M.freq == frequency && M.code == code)
- magnets.Add(M)
+ if(autolink)
+ for(var/obj/machinery/magnetic_module/M in world)
+ if(M.freq == frequency && M.code == code)
+ magnets.Add(M)
- spawn(45) // must wait for map loading to finish
- if(radio_controller)
- radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
+ spawn(45) // must wait for map loading to finish
+ if(radio_controller)
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
- if(path) // check for default path
- filter_path() // renders rpath
+ if(path) // check for default path
+ filter_path() // renders rpath
- process()
- if(magnets.len == 0 && autolink)
- for(var/obj/machinery/magnetic_module/M in world)
- if(M.freq == frequency && M.code == code)
- magnets.Add(M)
+/obj/machinery/magnetic_controller/process()
+ if(magnets.len == 0 && autolink)
+ for(var/obj/machinery/magnetic_module/M in world)
+ if(M.freq == frequency && M.code == code)
+ magnets.Add(M)
- attack_ai(mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/magnetic_controller/attack_ai(mob/user as mob)
+ return attack_hand(user)
+
+/obj/machinery/magnetic_controller/attack_hand(mob/user as mob)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ user.set_machine(src)
+ var/dat = "Magnetic Control Console
"
+ if(!autolink)
+ dat += {"
+ Frequency: [frequency]
+ Code: [code]
+ Probe Generators
+ "}
+
+ if(magnets.len >= 1)
+
+ dat += "Magnets confirmed:
"
+ var/i = 0
+ for(var/obj/machinery/magnetic_module/M in magnets)
+ i++
+ dat += " < \[[i]\] ([M.on ? "On":"Off"]) | Electricity level: - [M.electricity_level] +; Magnetic field: - [M.magnetic_field] +
"
+
+ dat += "
Speed: - [speed] +
"
+ dat += "Path: {[path]}
"
+ dat += "Moving: [moving ? "Enabled":"Disabled"]"
+
+
+ user << browse(dat, "window=magnet;size=400x500")
+ onclose(user, "magnet")
+
+/obj/machinery/magnetic_controller/Topic(href, href_list)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ usr.set_machine(src)
+ add_fingerprint(usr)
+
+ if(href_list["radio-op"])
+
+ // Prepare signal beforehand, because this is a radio operation
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 // radio transmission
+ signal.source = src
+ signal.frequency = frequency
+ signal.data["code"] = code
+
+ // Apply any necessary commands
+ switch(href_list["radio-op"])
+ if("togglepower")
+ signal.data["command"] = "toggle-power"
+
+ if("minuselec")
+ signal.data["command"] = "sub-elec"
+ if("pluselec")
+ signal.data["command"] = "add-elec"
+
+ if("minusmag")
+ signal.data["command"] = "sub-mag"
+ if("plusmag")
+ signal.data["command"] = "add-mag"
+
+
+ // Broadcast the signal
+
+ radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
+
+ spawn(1)
+ updateUsrDialog() // pretty sure this increases responsiveness
+
+ if(href_list["operation"])
+ switch(href_list["operation"])
+ if("plusspeed")
+ speed ++
+ if(speed > 10)
+ speed = 10
+ if("minusspeed")
+ speed --
+ if(speed <= 0)
+ speed = 1
+ if("setpath")
+ var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
+ if(newpath && newpath != "")
+ moving = 0 // stop moving
+ path = newpath
+ pathpos = 1 // reset position
+ filter_path() // renders rpath
+
+ if("togglemoving")
+ moving = !moving
+ if(moving)
+ spawn() MagnetMove()
+
+
+ updateUsrDialog()
+
+/obj/machinery/magnetic_controller/proc/MagnetMove()
+ if(looping) return
+
+ while(moving && rpath.len >= 1)
- attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
- return
- user.set_machine(src)
- var/dat = "Magnetic Control Console
"
- if(!autolink)
- dat += {"
- Frequency: [frequency]
- Code: [code]
- Probe Generators
- "}
+ break
- if(magnets.len >= 1)
+ looping = 1
- dat += "Magnets confirmed:
"
- var/i = 0
- for(var/obj/machinery/magnetic_module/M in magnets)
- i++
- dat += " < \[[i]\] ([M.on ? "On":"Off"]) | Electricity level: - [M.electricity_level] +; Magnetic field: - [M.magnetic_field] +
"
+ // Prepare the radio signal
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 // radio transmission
+ signal.source = src
+ signal.frequency = frequency
+ signal.data["code"] = code
- dat += "
Speed: - [speed] +
"
- dat += "Path: {[path]}
"
- dat += "Moving: [moving ? "Enabled":"Disabled"]"
+ if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
+ pathpos = 1
+
+ var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
+
+ if(!(nextmove in list("N","S","E","W","C","R")))
+ // N, S, E, W are directional
+ // C is center
+ // R is random (in magnetic field's bounds)
+ qdel(signal)
+ break // break the loop if the character located is invalid
+
+ signal.data["command"] = nextmove
- user << browse(dat, "window=magnet;size=400x500")
- onclose(user, "magnet")
-
- Topic(href, href_list)
- if(stat & (BROKEN|NOPOWER))
- return
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- if(href_list["radio-op"])
-
- // Prepare signal beforehand, because this is a radio operation
- var/datum/signal/signal = new
- signal.transmission_method = 1 // radio transmission
- signal.source = src
- signal.frequency = frequency
- signal.data["code"] = code
-
- // Apply any necessary commands
- switch(href_list["radio-op"])
- if("togglepower")
- signal.data["command"] = "toggle-power"
-
- if("minuselec")
- signal.data["command"] = "sub-elec"
- if("pluselec")
- signal.data["command"] = "add-elec"
-
- if("minusmag")
- signal.data["command"] = "sub-mag"
- if("plusmag")
- signal.data["command"] = "add-mag"
-
-
- // Broadcast the signal
+ pathpos++ // increase iterator
+ // Broadcast the signal
+ spawn()
radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
- spawn(1)
- updateUsrDialog() // pretty sure this increases responsiveness
+ if(speed == 10)
+ sleep(1)
+ else
+ sleep(12-speed)
- if(href_list["operation"])
- switch(href_list["operation"])
- if("plusspeed")
- speed ++
- if(speed > 10)
- speed = 10
- if("minusspeed")
- speed --
- if(speed <= 0)
- speed = 1
- if("setpath")
- var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
- if(newpath && newpath != "")
- moving = 0 // stop moving
- path = newpath
- pathpos = 1 // reset position
- filter_path() // renders rpath
-
- if("togglemoving")
- moving = !moving
- if(moving)
- spawn() MagnetMove()
+ looping = 0
- updateUsrDialog()
+/obj/machinery/magnetic_controller/proc/filter_path()
+ // Generates the rpath variable using the path string, think of this as "string2list"
+ // Doesn't use params2list() because of the akward way it stacks entities
+ rpath = list() // clear rpath
+ var/maximum_character = min(50, length(path)) // chooses the maximum length of the iterator. 50 max length
- proc/MagnetMove()
- if(looping) return
+ for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
- while(moving && rpath.len >= 1)
+ var/nextchar = copytext(path, i, i+1) // find next character
- if(stat & (BROKEN|NOPOWER))
- break
+ if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
+ rpath += copytext(path, i, i+1) // else, add to list
- looping = 1
-
- // Prepare the radio signal
- var/datum/signal/signal = new
- signal.transmission_method = 1 // radio transmission
- signal.source = src
- signal.frequency = frequency
- signal.data["code"] = code
-
- if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
- pathpos = 1
-
- var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
-
- if(!(nextmove in list("N","S","E","W","C","R")))
- // N, S, E, W are directional
- // C is center
- // R is random (in magnetic field's bounds)
- qdel(signal)
- break // break the loop if the character located is invalid
-
- signal.data["command"] = nextmove
-
-
- pathpos++ // increase iterator
-
- // Broadcast the signal
- spawn()
- radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
-
- if(speed == 10)
- sleep(1)
- else
- sleep(12-speed)
-
- looping = 0
-
-
- proc/filter_path()
- // Generates the rpath variable using the path string, think of this as "string2list"
- // Doesn't use params2list() because of the akward way it stacks entities
- rpath = list() // clear rpath
- var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
-
- for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
-
- var/nextchar = copytext(path, i, i+1) // find next character
-
- if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
- rpath += copytext(path, i, i+1) // else, add to list
-
- // there doesn't HAVE to be separators but it makes paths syntatically visible
+ // there doesn't HAVE to be separators but it makes paths syntatically visible
/obj/machinery/magnetic_controller/Destroy()
if(radio_controller)
diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm
index f563d9ef39..4d1affb3a0 100644
--- a/code/game/machinery/mass_driver.dm
+++ b/code/game/machinery/mass_driver.dm
@@ -18,7 +18,6 @@
/obj/machinery/mass_driver/New()
..()
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
@@ -59,7 +58,7 @@
M << "The mass driver lets out a screech, it mustn't be able to handle any more items."
break
use_power(500)
- spawn( 0 )
+ spawn(0)
O.throw_at(target, drive_range * power, power)
flick("mass_driver1", src)
return
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 0c14c66990..fe5cac9c44 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -1,11 +1,9 @@
// Navigation beacon for AI robots
// Functions as a transponder: looks for incoming signal matching
-
var/global/list/navbeacons // no I don't like putting this in, but it will do for now
/obj/machinery/navbeacon
-
icon = 'icons/obj/objects.dmi'
icon_state = "navbeacon0-f"
name = "navigation beacon"
@@ -13,162 +11,160 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
level = 1 // underfloor
layer = 2.5
anchored = 1
-
var/open = 0 // true if cover is open
var/locked = 1 // true if controls are locked
var/freq = 1445 // radio frequency
var/location = "" // location response text
var/list/codes // assoc. list of transponder codes
var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value"
-
req_access = list(access_engine)
- New()
- ..()
+/obj/machinery/navbeacon/New()
+ ..()
- set_codes()
+ set_codes()
- var/turf/T = loc
- hide(!T.is_plating())
+ var/turf/T = loc
+ hide(!T.is_plating())
- // add beacon to MULE bot beacon list
- if(freq == 1400)
- if(!navbeacons)
- navbeacons = new()
- navbeacons += src
+ // add beacon to MULE bot beacon list
+ if(freq == 1400)
+ if(!navbeacons)
+ navbeacons = new()
+ navbeacons += src
- spawn(5) // must wait for map loading to finish
- if(radio_controller)
- radio_controller.add_object(src, freq, RADIO_NAVBEACONS)
+ spawn(5) // must wait for map loading to finish
+ if(radio_controller)
+ radio_controller.add_object(src, freq, RADIO_NAVBEACONS)
- // set the transponder codes assoc list from codes_txt
- proc/set_codes()
- if(!codes_txt)
- return
-
- codes = new()
-
- var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
-
- for(var/e in entries)
- var/index = findtext(e, "=") // format is "key=value"
- if(index)
- var/key = copytext(e, 1, index)
- var/val = copytext(e, index+1)
- codes[key] = val
- else
- codes[e] = "1"
-
-
- // called when turf state changes
- // hide the object if turf is intact
- hide(var/intact)
- invisibility = intact ? 101 : 0
- updateicon()
-
- // update the icon_state
- proc/updateicon()
- var/state="navbeacon[open]"
-
- if(invisibility)
- icon_state = "[state]-f" // if invisible, set icon to faded version
- // in case revealed by T-scanner
- else
- icon_state = "[state]"
-
-
- // look for a signal of the form "findbeacon=X"
- // where X is any
- // or the location
- // or one of the set transponder keys
- // if found, return a signal
- receive_signal(datum/signal/signal)
-
- var/request = signal.data["findbeacon"]
- if(request && ((request in codes) || request == "any" || request == location))
- spawn(1)
- post_signal()
-
- // return a signal giving location and transponder codes
-
- proc/post_signal()
-
- var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
-
- if(!frequency) return
-
- var/datum/signal/signal = new()
- signal.source = src
- signal.transmission_method = 1
- signal.data["beacon"] = location
-
- for(var/key in codes)
- signal.data[key] = codes[key]
-
- frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
-
-
- attackby(var/obj/item/I, var/mob/user)
- var/turf/T = loc
- if(!T.is_plating())
- return // prevent intraction when T-scanner revealed
-
- if(istype(I, /obj/item/weapon/screwdriver))
- open = !open
-
- user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.")
-
- updateicon()
-
- else if (istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
- if(open)
- if (src.allowed(user))
- src.locked = !src.locked
- user << "Controls are now [src.locked ? "locked." : "unlocked."]"
- else
- user << "Access denied."
- updateDialog()
- else
- user << "You must open the cover first!"
+// set the transponder codes assoc list from codes_txt
+/obj/machinery/navbeacon/proc/set_codes()
+ if(!codes_txt)
return
- attack_ai(var/mob/user)
- interact(user, 1)
+ codes = new()
- attack_hand(var/mob/user)
+ var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
- if(!user.IsAdvancedToolUser())
- return 0
-
- interact(user, 0)
-
- interact(var/mob/user, var/ai = 0)
- var/turf/T = loc
- if(!T.is_plating())
- return // prevent intraction when T-scanner revealed
-
- if(!open && !ai) // can't alter controls if not open, unless you're an AI
- user << "The beacon's control cover is closed."
- return
+ for(var/e in entries)
+ var/index = findtext(e, "=") // format is "key=value"
+ if(index)
+ var/key = copytext(e, 1, index)
+ var/val = copytext(e, index+1)
+ codes[key] = val
+ else
+ codes[e] = "1"
- var/t
+// called when turf state changes
+// hide the object if turf is intact
+/obj/machinery/navbeacon/hide(var/intact)
+ invisibility = intact ? 101 : 0
+ updateicon()
- if(locked && !ai)
- t = {"Navigation Beacon
+// update the icon_state
+/obj/machinery/navbeacon/proc/updateicon()
+ var/state="navbeacon[open]"
+
+ if(invisibility)
+ icon_state = "[state]-f" // if invisible, set icon to faded version
+ // in case revealed by T-scanner
+ else
+ icon_state = "[state]"
+
+
+// look for a signal of the form "findbeacon=X"
+// where X is any
+// or the location
+// or one of the set transponder keys
+// if found, return a signal
+/obj/machinery/navbeacon/receive_signal(datum/signal/signal)
+
+ var/request = signal.data["findbeacon"]
+ if(request && ((request in codes) || request == "any" || request == location))
+ spawn(1)
+ post_signal()
+
+// return a signal giving location and transponder codes
+
+/obj/machinery/navbeacon/proc/post_signal()
+
+ var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
+
+ if(!frequency) return
+
+ var/datum/signal/signal = new()
+ signal.source = src
+ signal.transmission_method = 1
+ signal.data["beacon"] = location
+
+ for(var/key in codes)
+ signal.data[key] = codes[key]
+
+ frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
+
+
+/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user)
+ var/turf/T = loc
+ if(!T.is_plating())
+ return // prevent intraction when T-scanner revealed
+
+ if(istype(I, /obj/item/weapon/screwdriver))
+ open = !open
+
+ user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.")
+
+ updateicon()
+
+ else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
+ if(open)
+ if(allowed(user))
+ locked = !locked
+ user << "Controls are now [locked ? "locked." : "unlocked."]"
+ else
+ user << "Access denied."
+ updateDialog()
+ else
+ user << "You must open the cover first!"
+ return
+
+/obj/machinery/navbeacon/attack_ai(var/mob/user)
+ interact(user, 1)
+
+/obj/machinery/navbeacon/attack_hand(var/mob/user)
+
+ if(!user.IsAdvancedToolUser())
+ return 0
+
+ interact(user, 0)
+
+/obj/machinery/navbeacon/interact(var/mob/user, var/ai = 0)
+ var/turf/T = loc
+ if(!T.is_plating())
+ return // prevent intraction when T-scanner revealed
+
+ if(!open && !ai) // can't alter controls if not open, unless you're an AI
+ user << "The beacon's control cover is closed."
+ return
+
+
+ var/t
+
+ if(locked && !ai)
+ t = {"Navigation Beacon
(swipe card to unlock controls)
Frequency: [format_frequency(freq)]
Location: [location ? location : "(none)"]
Transponder Codes:"}
- for(var/key in codes)
- t += "- [key] ... [codes[key]]"
- t+= "
"
+ for(var/key in codes)
+ t += "[key] ... [codes[key]]"
+ t+= ""
- else
+ else
- t = {"Navigation Beacon
+ t = {"Navigation Beacon
(swipe card to lock controls)
Frequency:
-
@@ -180,75 +176,75 @@ Frequency:
Location: [location ? location : "(none)"]
Transponder Codes:"}
- for(var/key in codes)
- t += "- [key] ... [codes[key]]"
- t += " (edit)"
- t += " (delete)
"
- t += "(add new)
"
- t+= "
"
+ for(var/key in codes)
+ t += "[key] ... [codes[key]]"
+ t += " (edit)"
+ t += " (delete)
"
+ t += "(add new)
"
+ t+= ""
- user << browse(t, "window=navbeacon")
- onclose(user, "navbeacon")
+ user << browse(t, "window=navbeacon")
+ onclose(user, "navbeacon")
+ return
+
+/obj/machinery/navbeacon/Topic(href, href_list)
+ ..()
+ if(usr.stat)
return
+ if((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
+ if(open && !locked)
+ usr.set_machine(src)
- Topic(href, href_list)
- ..()
- if (usr.stat)
- return
- if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
- if(open && !locked)
- usr.set_machine(src)
+ if(href_list["freq"])
+ freq = sanitize_frequency(freq + text2num(href_list["freq"]))
+ updateDialog()
- if (href_list["freq"])
- freq = sanitize_frequency(freq + text2num(href_list["freq"]))
+ else if(href_list["locedit"])
+ var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
+ if(newloc)
+ location = newloc
updateDialog()
- else if(href_list["locedit"])
- var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
- if(newloc)
- location = newloc
- updateDialog()
+ else if(href_list["edit"])
+ var/codekey = href_list["code"]
- else if(href_list["edit"])
- var/codekey = href_list["code"]
+ var/newkey = input("Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
+ if(!newkey)
+ return
- var/newkey = input("Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
- if(!newkey)
- return
+ var/codeval = codes[codekey]
+ var/newval = input("Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
+ if(!newval)
+ newval = codekey
+ return
- var/codeval = codes[codekey]
- var/newval = input("Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
- if(!newval)
- newval = codekey
- return
+ codes.Remove(codekey)
+ codes[newkey] = newval
- codes.Remove(codekey)
- codes[newkey] = newval
+ updateDialog()
- updateDialog()
+ else if(href_list["delete"])
+ var/codekey = href_list["code"]
+ codes.Remove(codekey)
+ updateDialog()
- else if(href_list["delete"])
- var/codekey = href_list["code"]
- codes.Remove(codekey)
- updateDialog()
+ else if(href_list["add"])
- else if(href_list["add"])
+ var/newkey = input("Enter New Transponder Code Key", "Navigation Beacon") as text|null
+ if(!newkey)
+ return
- var/newkey = input("Enter New Transponder Code Key", "Navigation Beacon") as text|null
- if(!newkey)
- return
+ var/newval = input("Enter New Transponder Code Value", "Navigation Beacon") as text|null
+ if(!newval)
+ newval = "1"
+ return
- var/newval = input("Enter New Transponder Code Value", "Navigation Beacon") as text|null
- if(!newval)
- newval = "1"
- return
+ if(!codes)
+ codes = new()
- if(!codes)
- codes = new()
+ codes[newkey] = newval
- codes[newkey] = newval
-
- updateDialog()
+ updateDialog()
/obj/machinery/navbeacon/Destroy()
navbeacons.Remove(src)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 4c1198838a..1de7cc367b 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -101,9 +101,9 @@
var/list/receiving_pdas = new
for (var/obj/item/device/pda/P in PDAs)
- if (!P.owner)
+ if(!P.owner)
continue
- if (P.toff)
+ if(P.toff)
continue
receiving_pdas += P
@@ -120,7 +120,6 @@ var/datum/feed_network/news_network = new /datum/feed_network //The global n
var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence.
-
/obj/machinery/newscaster
name = "newscaster"
desc = "A standard newsfeed handler for use on commercial space stations. All the news you absolutely have no use for, in one place!"
@@ -167,7 +166,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
light_range = 0
anchored = 1
var/obj/machinery/exonet_node/node = null
- circuit = /obj/item/weapon/circuitboard/newscaster
+ circuit = /obj/item/weapon/circuitboard/newscaster
/obj/machinery/newscaster/security_unit //Security unit
name = "Security Newscaster"
@@ -175,10 +174,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/New() //Constructor, ho~
allCasters += src
- src.paper_remaining = 15 // Will probably change this to something better
+ paper_remaining = 15 // Will probably change this to something better
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) // Let's give it an appropriate unit number
- src.unit_no++
- src.update_icon() //for any custom ones on the map...
+ unit_no++
+ update_icon() //for any custom ones on the map...
spawn(10) //Should be enough time for the node to spawn at tcomms.
node = get_exonet_node()
..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that
@@ -191,21 +190,21 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(!ispowered || isbroken)
icon_state = "newscaster_off"
if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite.
- src.overlays.Cut()
- src.overlays += image(src.icon, "crack3")
+ overlays.Cut()
+ overlays += image(icon, "crack3")
return
- src.overlays.Cut() //reset overlays
+ overlays.Cut() //reset overlays
if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message
icon_state = "newscaster_wanted"
return
if(alert) //new message alert overlay
- src.overlays += "newscaster_alert"
+ overlays += "newscaster_alert"
if(hitstaken > 0) //Cosmetic damage overlay
- src.overlays += image(src.icon, "crack[hitstaken]")
+ overlays += image(icon, "crack[hitstaken]")
icon_state = "newscaster_normal"
return
@@ -214,14 +213,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(isbroken) //Broken shit can't be powered.
return
..()
- if( !(stat & NOPOWER) )
- src.ispowered = 1
- src.update_icon()
+ if(!(stat & NOPOWER))
+ ispowered = 1
+ update_icon()
else
spawn(rand(0, 15))
- src.ispowered = 0
- src.update_icon()
-
+ ispowered = 0
+ update_icon()
/obj/machinery/newscaster/ex_act(severity)
switch(severity)
@@ -229,25 +227,24 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
qdel(src)
return
if(2.0)
- src.isbroken=1
+ isbroken=1
if(prob(50))
qdel(src)
else
- src.update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in.
+ update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in.
return
else
if(prob(50))
- src.isbroken=1
- src.update_icon()
+ isbroken=1
+ update_icon()
return
return
/obj/machinery/newscaster/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############
-
- if(!src.ispowered || src.isbroken)
+ if(!ispowered || isbroken)
return
if(!node)
@@ -261,16 +258,16 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(!user.IsAdvancedToolUser())
return 0
- if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) )
+ if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon))
var/mob/living/human_or_robot_user = user
var/dat
- dat = text("NewscasterNewscaster Unit #[src.unit_no]
")
+ dat = text("NewscasterNewscaster Unit #[unit_no]
")
- src.scan_user(human_or_robot_user) //Newscaster scans you
+ scan_user(human_or_robot_user) //Newscaster scans you
switch(screen)
if(0)
- dat += "Welcome to Newscasting Unit #[src.unit_no].
Interface & News networks Operational."
+ dat += "Welcome to Newscasting Unit #[unit_no].
Interface & News networks Operational."
dat += "
Property of Nanotransen Inc"
if(news_network.wanted_issue)
dat+= "
Read Wanted Issue"
@@ -280,7 +277,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+= "
Print newspaper"
dat+= "
Re-scan User"
dat+= "
Exit"
- if(src.securityCaster)
+ if(securityCaster)
var/wanted_already = 0
if(news_network.wanted_issue)
wanted_already = 1
@@ -289,10 +286,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue"
dat+="
Censor Feed Stories"
dat+="
Mark Feed Channel with [company_name] D-Notice"
- dat+="
The newscaster recognises you as: [src.scanned_user]"
+ dat+="
The newscaster recognises you as: [scanned_user]"
if(1)
dat+= "Station Feed Channels
"
- if( isemptylist(news_network.network_channels) )
+ if(isemptylist(news_network.network_channels))
dat+="No active channels found..."
else
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
@@ -304,30 +301,30 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="
Back"
if(2)
dat+="Creating new Feed Channel..."
- dat+="
Channel Name: [src.channel_name]
"
- dat+="Channel Author: [src.scanned_user]
"
- dat+="Will Accept Public Feeds: [(src.c_locked) ? ("NO") : ("YES")]
"
+ dat+="
Channel Name: [channel_name]
"
+ dat+="Channel Author: [scanned_user]
"
+ dat+="Will Accept Public Feeds: [(c_locked) ? ("NO") : ("YES")]
"
dat+="
Submit
Cancel
"
if(3)
dat+="Creating new Feed Message..."
- dat+="
Receiving Channel: [src.channel_name]
" //MARK
- dat+="Message Author: [src.scanned_user]
"
- dat+="Message Body: [src.msg]
"
- dat+="Attach Photo: [(src.photo_data ? "Photo Attached" : "No Photo")]"
+ dat+="
Receiving Channel: [channel_name]
" //MARK
+ dat+="Message Author: [scanned_user]
"
+ dat+="Message Body: [msg]
"
+ dat+="Attach Photo: [(photo_data ? "Photo Attached" : "No Photo")]"
dat+="
Submit
Cancel
"
if(4)
- dat+="Feed story successfully submitted to [src.channel_name].
"
+ dat+="Feed story successfully submitted to [channel_name].
"
dat+="
Return
"
if(5)
- dat+="Feed Channel [src.channel_name] created successfully.
"
+ dat+="Feed Channel [channel_name] created successfully.
"
dat+="
Return
"
if(6)
dat+="ERROR: Could not submit Feed story to Network.
"
- if(src.channel_name=="")
+ if(channel_name=="")
dat+="•Invalid receiving channel name.
"
- if(src.scanned_user=="Unknown")
+ if(scanned_user=="Unknown")
dat+="•Channel author unverified.
"
- if(src.msg == "" || src.msg == "\[REDACTED\]")
+ if(msg == "" || msg == "\[REDACTED\]")
dat+="•Invalid message body.
"
dat+="
Return
"
@@ -339,18 +336,18 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
existing_authors += FC.backup_author
else
existing_authors += FC.author
- if(src.scanned_user in existing_authors)
+ if(scanned_user in existing_authors)
dat+="•There already exists a Feed channel under your name.
"
- if(src.channel_name=="" || src.channel_name == "\[REDACTED\]")
+ if(channel_name=="" || channel_name == "\[REDACTED\]")
dat+="•Invalid channel name.
"
var/check = 0
for(var/datum/feed_channel/FC in news_network.network_channels)
- if(FC.channel_name == src.channel_name)
+ if(FC.channel_name == channel_name)
check = 1
break
if(check)
dat+="•Channel name already in use.
"
- if(src.scanned_user=="Unknown")
+ if(scanned_user=="Unknown")
dat+="•Channel author unverified.
"
dat+="
Return
"
if(8)
@@ -363,20 +360,20 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else
active_num--
dat+="Network currently serves a total of [total_num] Feed channels, [active_num] of which are active, and a total of [message_num] Feed Stories." //TODO: CONTINUE
- dat+="
Liquid Paper remaining: [(src.paper_remaining) *100 ] cm^3"
+ dat+="
Liquid Paper remaining: [(paper_remaining) *100 ] cm^3"
dat+="
Print Paper"
dat+="
Cancel"
if(9)
- dat+="[src.viewing_channel.channel_name]: \[created by: [src.viewing_channel.author]\]
"
- if(src.viewing_channel.censored)
+ dat+="[viewing_channel.channel_name]: \[created by: [viewing_channel.author]\]
"
+ if(viewing_channel.censored)
dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.
"
dat+="No further feed story additions are allowed while the D-Notice is in effect.
"
else
- if( isemptylist(src.viewing_channel.messages) )
+ if(isemptylist(viewing_channel.messages))
dat+="No feed messages found in channel...
"
else
var/i = 0
- for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
+ for(var/datum/feed_message/MESSAGE in viewing_channel.messages)
i++
dat+="-[MESSAGE.body]
"
if(MESSAGE.img)
@@ -412,28 +409,28 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="
Back"
if(12)
- dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
"
- dat+="[(src.viewing_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
"
+ dat+="[viewing_channel.channel_name]: \[ created by: [viewing_channel.author] \]
"
+ dat+="[(viewing_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
"
- if( isemptylist(src.viewing_channel.messages) )
+ if(isemptylist(viewing_channel.messages))
dat+="No feed messages found in channel...
"
else
- for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
+ for(var/datum/feed_message/MESSAGE in viewing_channel.messages)
dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
"
dat+="[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
"
dat+="
Back"
if(13)
- dat+="[src.viewing_channel.channel_name]: \[ created by: [src.viewing_channel.author] \]
"
- dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
"
- if(src.viewing_channel.censored)
+ dat+="[viewing_channel.channel_name]: \[ created by: [viewing_channel.author] \]
"
+ dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
"
+ if(viewing_channel.censored)
dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.
"
dat+="No further feed story additions are allowed while the D-Notice is in effect.
"
else
- if( isemptylist(src.viewing_channel.messages) )
+ if(isemptylist(viewing_channel.messages))
dat+="No feed messages found in channel...
"
else
- for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
+ for(var/datum/feed_message/MESSAGE in viewing_channel.messages)
dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
"
dat+="
Back"
@@ -448,27 +445,27 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(wanted_already)
dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below."
dat+="
"
- dat+="Criminal Name: [src.channel_name]
"
- dat+="Description: [src.msg]
"
- dat+="Attach Photo: [(src.photo_data ? "Photo Attached" : "No Photo")]"
+ dat+="Criminal Name: [channel_name]
"
+ dat+="Description: [msg]
"
+ dat+="Attach Photo: [(photo_data ? "Photo Attached" : "No Photo")]"
if(wanted_already)
dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author]
"
else
- dat+="Wanted Issue will be created under prosecutor: [src.scanned_user]
"
+ dat+="Wanted Issue will be created under prosecutor: [scanned_user]
"
dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]"
if(wanted_already)
dat+="
Take down Issue"
dat+="
Cancel"
if(15)
- dat+="Wanted issue for [src.channel_name] is now in Network Circulation.
"
+ dat+="Wanted issue for [channel_name] is now in Network Circulation.
"
dat+="
Return
"
if(16)
dat+="ERROR: Wanted Issue rejected by Network.
"
- if(src.channel_name=="" || src.channel_name == "\[REDACTED\]")
+ if(channel_name=="" || channel_name == "\[REDACTED\]")
dat+="•Invalid name for person wanted.
"
- if(src.scanned_user=="Unknown")
+ if(scanned_user=="Unknown")
dat+="•Issue author unverified.
"
- if(src.msg == "" || src.msg == "\[REDACTED\]")
+ if(msg == "" || msg == "\[REDACTED\]")
dat+="•Invalid description.
"
dat+="
Return
"
if(17)
@@ -486,7 +483,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="None"
dat+="
Back
"
if(19)
- dat+="Wanted issue for [src.channel_name] successfully edited.
"
+ dat+="Wanted issue for [channel_name] successfully edited.
"
dat+="
Return
"
if(20)
dat+="Printing successful. Please receive your newspaper from the bottom of the machine.
"
@@ -504,17 +501,17 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/Topic(href, href_list)
if(..())
return
- if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
+ if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["set_channel_name"])
- src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""), MAX_LNAME_LEN)
- src.updateUsrDialog()
- //src.update_icon()
+ channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""), MAX_LNAME_LEN)
+ updateUsrDialog()
+ //update_icon()
else if(href_list["set_channel_lock"])
- src.c_locked = !src.c_locked
- src.updateUsrDialog()
- //src.update_icon()
+ c_locked = !c_locked
+ updateUsrDialog()
+ //update_icon()
else if(href_list["submit_new_channel"])
//var/list/existing_channels = list() //OBSOLETE
@@ -527,73 +524,73 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
existing_authors +=FC.author
var/check = 0
for(var/datum/feed_channel/FC in news_network.network_channels)
- if(FC.channel_name == src.channel_name)
+ if(FC.channel_name == channel_name)
check = 1
break
- if(src.channel_name == "" || src.channel_name == "\[REDACTED\]" || src.scanned_user == "Unknown" || check || (src.scanned_user in existing_authors) )
- src.screen=7
+ if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors))
+ screen=7
else
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
if(choice=="Confirm")
- news_network.CreateFeedChannel(src.channel_name, src.scanned_user, c_locked)
- src.screen=5
- src.updateUsrDialog()
- //src.update_icon()
+ news_network.CreateFeedChannel(channel_name, scanned_user, c_locked)
+ screen=5
+ updateUsrDialog()
+ //update_icon()
else if(href_list["set_channel_receiving"])
//var/list/datum/feed_channel/available_channels = list()
var/list/available_channels = list()
for(var/datum/feed_channel/F in news_network.network_channels)
- if( (!F.locked || F.author == scanned_user) && !F.censored)
+ if((!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
- src.channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels
- src.updateUsrDialog()
+ channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels
+ updateUsrDialog()
else if(href_list["set_new_message"])
- src.msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
- src.updateUsrDialog()
+ msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
+ updateUsrDialog()
else if(href_list["set_attachment"])
AttachPhoto(usr)
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["submit_new_message"])
- if(src.msg =="" || src.msg=="\[REDACTED\]" || src.scanned_user == "Unknown" || src.channel_name == "" )
- src.screen=6
+ if(msg =="" || msg=="\[REDACTED\]" || scanned_user == "Unknown" || channel_name == "")
+ screen=6
else
var/image = photo_data ? photo_data.photo : null
feedback_inc("newscaster_stories",1)
- news_network.SubmitArticle(src.msg, src.scanned_user, src.channel_name, image, 0)
- src.screen=4
+ news_network.SubmitArticle(msg, scanned_user, channel_name, image, 0)
+ screen=4
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["create_channel"])
- src.screen=2
- src.updateUsrDialog()
+ screen=2
+ updateUsrDialog()
else if(href_list["create_feed_story"])
- src.screen=3
- src.updateUsrDialog()
+ screen=3
+ updateUsrDialog()
else if(href_list["menu_paper"])
- src.screen=8
- src.updateUsrDialog()
+ screen=8
+ updateUsrDialog()
else if(href_list["print_paper"])
- if(!src.paper_remaining)
- src.screen=21
+ if(!paper_remaining)
+ screen=21
else
- src.print_paper()
- src.screen = 20
- src.updateUsrDialog()
+ print_paper()
+ screen = 20
+ updateUsrDialog()
else if(href_list["menu_censor_story"])
- src.screen=10
- src.updateUsrDialog()
+ screen=10
+ updateUsrDialog()
else if(href_list["menu_censor_channel"])
- src.screen=11
- src.updateUsrDialog()
+ screen=11
+ updateUsrDialog()
else if(href_list["menu_wanted"])
var/already_wanted = 0
@@ -601,48 +598,48 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
already_wanted = 1
if(already_wanted)
- src.channel_name = news_network.wanted_issue.author
- src.msg = news_network.wanted_issue.body
- src.screen = 14
- src.updateUsrDialog()
+ channel_name = news_network.wanted_issue.author
+ msg = news_network.wanted_issue.body
+ screen = 14
+ updateUsrDialog()
else if(href_list["set_wanted_name"])
- src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""), MAX_LNAME_LEN)
- src.updateUsrDialog()
+ channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""), MAX_LNAME_LEN)
+ updateUsrDialog()
else if(href_list["set_wanted_desc"])
- src.msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
- src.updateUsrDialog()
+ msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
+ updateUsrDialog()
else if(href_list["submit_wanted"])
var/input_param = text2num(href_list["submit_wanted"])
- if(src.msg == "" || src.channel_name == "" || src.scanned_user == "Unknown")
- src.screen = 16
+ if(msg == "" || channel_name == "" || scanned_user == "Unknown")
+ screen = 16
else
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
var/datum/feed_message/WANTED = new /datum/feed_message
- WANTED.author = src.channel_name
- WANTED.body = src.msg
- WANTED.backup_author = src.scanned_user //I know, a bit wacky
+ WANTED.author = channel_name
+ WANTED.body = msg
+ WANTED.backup_author = scanned_user //I know, a bit wacky
if(photo_data)
WANTED.img = photo_data.photo.img
news_network.wanted_issue = WANTED
news_network.alert_readers()
- src.screen = 15
+ screen = 15
else
if(news_network.wanted_issue.is_admin_message)
alert("The wanted issue has been distributed by a [company_name] higherup. You cannot edit it.","Ok")
return
- news_network.wanted_issue.author = src.channel_name
- news_network.wanted_issue.body = src.msg
- news_network.wanted_issue.backup_author = src.scanned_user
+ news_network.wanted_issue.author = channel_name
+ news_network.wanted_issue.body = msg
+ news_network.wanted_issue.backup_author = scanned_user
if(photo_data)
news_network.wanted_issue.img = photo_data.photo.img
- src.screen = 19
+ screen = 19
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["cancel_wanted"])
if(news_network.wanted_issue.is_admin_message)
@@ -653,12 +650,12 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
news_network.wanted_issue = null
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.update_icon()
- src.screen=17
- src.updateUsrDialog()
+ screen=17
+ updateUsrDialog()
else if(href_list["view_wanted"])
- src.screen=18
- src.updateUsrDialog()
+ screen=18
+ updateUsrDialog()
else if(href_list["censor_channel_author"])
var/datum/feed_channel/FC = locate(href_list["censor_channel_author"])
if(FC.is_admin_channel)
@@ -670,7 +667,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else
FC.author = FC.backup_author
FC.update()
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["censor_channel_story_author"])
var/datum/feed_message/MSG = locate(href_list["censor_channel_story_author"])
@@ -683,7 +680,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else
MSG.author = MSG.backup_author
MSG.parent_channel.update()
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["censor_channel_story_body"])
var/datum/feed_message/MSG = locate(href_list["censor_channel_story_body"])
@@ -703,13 +700,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
MSG.img = MSG.backup_img
MSG.parent_channel.update()
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["pick_d_notice"])
var/datum/feed_channel/FC = locate(href_list["pick_d_notice"])
- src.viewing_channel = FC
- src.screen=13
- src.updateUsrDialog()
+ viewing_channel = FC
+ screen=13
+ updateUsrDialog()
else if(href_list["toggle_d_notice"])
var/datum/feed_channel/FC = locate(href_list["toggle_d_notice"])
@@ -718,70 +715,46 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
return
FC.censored = !FC.censored
FC.update()
- src.updateUsrDialog()
+ updateUsrDialog()
else if(href_list["view"])
- src.screen=1
- src.updateUsrDialog()
+ screen=1
+ updateUsrDialog()
else if(href_list["setScreen"]) //Brings us to the main menu and resets all fields~
- src.screen = text2num(href_list["setScreen"])
- if (src.screen == 0)
- src.scanned_user = "Unknown";
+ screen = text2num(href_list["setScreen"])
+ if(screen == 0)
+ scanned_user = "Unknown";
msg = "";
- src.c_locked=0;
+ c_locked=0;
channel_name="";
- src.viewing_channel = null
- src.updateUsrDialog()
+ viewing_channel = null
+ updateUsrDialog()
else if(href_list["show_channel"])
var/datum/feed_channel/FC = locate(href_list["show_channel"])
- src.viewing_channel = FC
- src.screen = 9
- src.updateUsrDialog()
+ viewing_channel = FC
+ screen = 9
+ updateUsrDialog()
else if(href_list["pick_censor_channel"])
var/datum/feed_channel/FC = locate(href_list["pick_censor_channel"])
- src.viewing_channel = FC
- src.screen = 12
- src.updateUsrDialog()
+ viewing_channel = FC
+ screen = 12
+ updateUsrDialog()
else if(href_list["refresh"])
- src.updateUsrDialog()
-
-
+ updateUsrDialog()
/obj/machinery/newscaster/attackby(I as obj, user as mob)
- if(istype(I, /obj/item/weapon/screwdriver) && circuit)
- user << "You start disconnecting the monitor."
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
- var/obj/item/weapon/circuitboard/M = new circuit( A )
- A.frame_type = "newscaster"
- A.pixel_x = pixel_x
- A.pixel_y = pixel_y
- A.circuit = M
- A.anchored = 1
- for (var/obj/C in src)
- C.forceMove(loc)
- if (src.stat & isbroken == 1)
- user << "The broken glass falls out."
- new /obj/item/weapon/material/shard( src.loc )
- A.state = 3
- A.icon_state = "newscaster_3"
- else
- user << "You disconnect the monitor."
- A.state = 4
- A.icon_state = "newscaster_4"
- M.deconstruct(src)
- qdel(src)
+ if(computer_deconstruction_screwdriver(user, I))
+ return
else
- src.attack_hand(user)
+ attack_hand(user)
return
/obj/machinery/newscaster/attack_ai(mob/user as mob)
- return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
+ return attack_hand(user) //or maybe it'll have some special functions? No idea.
/datum/news_photo
var/is_synth = 0
@@ -807,12 +780,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else if(istype(user,/mob/living/silicon))
var/mob/living/silicon/tempAI = user
var/obj/item/weapon/photo/selection = tempAI.GetPicture()
- if (!selection)
+ if(!selection)
return
photo_data = new(selection, 1)
-
//########################################################################################################################
//###################################### NEWSPAPER! ######################################################################
//########################################################################################################################
@@ -836,34 +808,34 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
var/dat
- src.pages = 0
+ pages = 0
switch(screen)
if(0) //Cover
dat+="The Griffon
"
dat+="[company_name]-standard newspaper, for use on [company_name]© Space Facilities
"
- if(isemptylist(src.news_content))
- if(src.important_message)
- dat+="Contents:
**Important Security Announcement** \[page [src.pages+2]\]
"
+ if(isemptylist(news_content))
+ if(important_message)
+ dat+="Contents:
**Important Security Announcement** \[page [pages+2]\]
"
else
dat+="Other than the title, the rest of the newspaper is unprinted..."
else
dat+="Contents:
"
- for(var/datum/feed_channel/NP in src.news_content)
- src.pages++
- if(src.important_message)
- dat+="**Important Security Announcement** \[page [src.pages+2]\]
"
+ for(var/datum/feed_channel/NP in news_content)
+ pages++
+ if(important_message)
+ dat+="**Important Security Announcement** \[page [pages+2]\]
"
var/temp_page=0
- for(var/datum/feed_channel/NP in src.news_content)
+ for(var/datum/feed_channel/NP in news_content)
temp_page++
dat+="[NP.channel_name] \[page [temp_page+1]\]
"
dat+="
"
if(scribble_page==curr_page)
- dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\""
+ dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\""
dat+= "
"
if(1) // X channel pages inbetween.
- for(var/datum/feed_channel/NP in src.news_content)
- src.pages++ //Let's get it right again.
- var/datum/feed_channel/C = src.news_content[src.curr_page]
+ for(var/datum/feed_channel/NP in news_content)
+ pages++ //Let's get it right again.
+ var/datum/feed_channel/C = news_content[curr_page]
dat+="[C.channel_name] \[created by: [C.author]\]
"
if(C.censored)
dat+="This channel was deemed dangerous to the general welfare of the station and therefore marked with a D-Notice. Its contents were not transferred to the newspaper at the time of printing."
@@ -882,12 +854,12 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
dat+="\[[MESSAGE.message_type] by [MESSAGE.author]\]
"
dat+=""
if(scribble_page==curr_page)
- dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\""
+ dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\""
dat+= "
"
if(2) //Last page
- for(var/datum/feed_channel/NP in src.news_content)
- src.pages++
- if(src.important_message!=null)
+ for(var/datum/feed_channel/NP in news_content)
+ pages++
+ if(important_message!=null)
dat+="Wanted Issue:
"
dat+="Criminal name: [important_message.author]
"
dat+="Description: [important_message.body]
"
@@ -900,91 +872,86 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
else
dat+="Apart from some uninteresting Classified ads, there's nothing on this page..."
if(scribble_page==curr_page)
- dat+="
There is a small scribble near the end of this page... It reads: \"[src.scribble]\""
+ dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\""
dat+= "
"
else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
- dat+="
[src.curr_page+1]
"
+ dat+="
[curr_page+1]
"
human_user << browse(dat, "window=newspaper_main;size=300x400")
onclose(human_user, "newspaper_main")
else
user << "The paper is full of intelligible symbols!"
-
obj/item/weapon/newspaper/Topic(href, href_list)
var/mob/living/U = usr
..()
- if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ))
+ if((src in U.contents) || (istype(loc, /turf) && in_range(src, U)))
U.set_machine(src)
if(href_list["next_page"])
- if(curr_page==src.pages+1)
+ if(curr_page == pages+1)
return //Don't need that at all, but anyway.
- if(src.curr_page == src.pages) //We're at the middle, get to the end
- src.screen = 2
+ if(curr_page == pages) //We're at the middle, get to the end
+ screen = 2
else
if(curr_page == 0) //We're at the start, get to the middle
- src.screen=1
- src.curr_page++
- playsound(src.loc, "pageturn", 50, 1)
+ screen = 1
+ curr_page++
+ playsound(loc, "pageturn", 50, 1)
else if(href_list["prev_page"])
if(curr_page == 0)
return
if(curr_page == 1)
- src.screen = 0
+ screen = 0
else
- if(curr_page == src.pages+1) //we're at the end, let's go back to the middle.
- src.screen = 1
- src.curr_page--
+ if(curr_page == pages+1) //we're at the end, let's go back to the middle.
+ screen = 1
+ curr_page--
playsound(src.loc, "pageturn", 50, 1)
- if (istype(src.loc, /mob))
- src.attack_self(src.loc)
-
+ if(istype(src.loc, /mob))
+ attack_self(src.loc)
obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
- if(src.scribble_page == src.curr_page)
+ if(scribble_page == curr_page)
user << "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?"
else
var/s = sanitize(input(user, "Write something", "Newspaper", ""))
s = sanitize(s)
- if (!s)
+ if(!s)
return
- if (!in_range(src, usr) && src.loc != usr)
+ if(!in_range(src, usr) && src.loc != usr)
return
- src.scribble_page = src.curr_page
- src.scribble = s
- src.attack_self(user)
+ scribble_page = curr_page
+ scribble = s
+ attack_self(user)
return
-
////////////////////////////////////helper procs
-
/obj/machinery/newscaster/proc/scan_user(mob/living/user as mob)
if(istype(user,/mob/living/carbon/human)) //User is a human
var/mob/living/carbon/human/human_user = user
if(human_user.wear_id) //Newscaster scans you
- if(istype(human_user.wear_id, /obj/item/device/pda) ) //autorecognition, woo!
+ if(istype(human_user.wear_id, /obj/item/device/pda)) //autorecognition, woo!
var/obj/item/device/pda/P = human_user.wear_id
if(P.id)
- src.scanned_user = GetNameAndAssignmentFromId(P.id)
+ scanned_user = GetNameAndAssignmentFromId(P.id)
else
- src.scanned_user = "Unknown"
- else if(istype(human_user.wear_id, /obj/item/weapon/card/id) )
+ scanned_user = "Unknown"
+ else if(istype(human_user.wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/ID = human_user.wear_id
- src.scanned_user = GetNameAndAssignmentFromId(ID)
+ scanned_user = GetNameAndAssignmentFromId(ID)
else
- src.scanned_user ="Unknown"
+ scanned_user ="Unknown"
else
- src.scanned_user ="Unknown"
+ scanned_user ="Unknown"
else
var/mob/living/silicon/ai_user = user
- src.scanned_user = "[ai_user.name] ([ai_user.job])"
-
+ scanned_user = "[ai_user.name] ([ai_user.job])"
/obj/machinery/newscaster/proc/print_paper()
feedback_inc("newscaster_newspapers_printed",1)
@@ -994,7 +961,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(news_network.wanted_issue)
NEWSPAPER.important_message = news_network.wanted_issue
NEWSPAPER.loc = get_turf(src)
- src.paper_remaining--
+ paper_remaining--
return
/obj/machinery/newscaster/proc/newsAlert(var/news_call)
@@ -1003,15 +970,15 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/turf/T = get_turf(src)
if(news_call)
for(var/mob/O in hearers(world.view-1, T))
- O.show_message("[src.name] beeps, \"[news_call]\"",2)
- src.alert = 1
- src.update_icon()
+ O.show_message("[name] beeps, \"[news_call]\"",2)
+ alert = 1
+ update_icon()
spawn(300)
- src.alert = 0
- src.update_icon()
+ alert = 0
+ update_icon()
playsound(src.loc, 'sound/machines/twobeep.ogg', 75, 1)
else
for(var/mob/O in hearers(world.view-1, T))
- O.show_message("[src.name] beeps, \"Attention! Wanted issue distributed!\"",2)
+ O.show_message("[name] beeps, \"Attention! Wanted issue distributed!\"",2)
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1)
return
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index d02d3522a4..74b39840d0 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -25,83 +25,79 @@ var/bomb_set
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
use_power = 0
-
-
/obj/machinery/nuclearbomb/New()
..()
r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn.
-
- src.wires["Red"] = 0
- src.wires["Blue"] = 0
- src.wires["Green"] = 0
- src.wires["Marigold"] = 0
- src.wires["Fuschia"] = 0
- src.wires["Black"] = 0
- src.wires["Pearl"] = 0
+ wires["Red"] = 0
+ wires["Blue"] = 0
+ wires["Green"] = 0
+ wires["Marigold"] = 0
+ wires["Fuschia"] = 0
+ wires["Black"] = 0
+ wires["Pearl"] = 0
var/list/w = list("Red","Blue","Green","Marigold","Black","Fuschia","Pearl")
- src.light_wire = pick(w)
- w -= src.light_wire
- src.timing_wire = pick(w)
- w -= src.timing_wire
- src.safety_wire = pick(w)
- w -= src.safety_wire
+ light_wire = pick(w)
+ w -= light_wire
+ timing_wire = pick(w)
+ w -= timing_wire
+ safety_wire = pick(w)
+ w -= safety_wire
/obj/machinery/nuclearbomb/process()
- if (src.timing)
+ if(timing)
bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed.
- src.timeleft--
- if (src.timeleft <= 0)
+ timeleft--
+ if(timeleft <= 0)
explode()
for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
+ if((M.client && M.machine == src))
+ attack_hand(M)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
-
- if (istype(O, /obj/item/weapon/screwdriver))
- src.add_fingerprint(user)
- if (src.auth)
- if (src.opened == 0)
- src.opened = 1
+ if(istype(O, /obj/item/weapon/screwdriver))
+ add_fingerprint(user)
+ if(auth)
+ if(opened == 0)
+ opened = 1
overlays += image(icon, "npanel_open")
user << "You unscrew the control panel of [src]."
else
- src.opened = 0
+ opened = 0
overlays -= image(icon, "npanel_open")
user << "You screw the control panel of [src] back on."
else
- if (src.opened == 0)
+ if(opened == 0)
user << "The [src] emits a buzzing noise, the panel staying locked in."
- if (src.opened == 1)
- src.opened = 0
+ if(opened == 1)
+ opened = 0
overlays -= image(icon, "npanel_open")
user << "You screw the control panel of [src] back on."
flick("nuclearbombc", src)
return
- if (istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/device/multitool))
- if (src.opened == 1)
+ if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/device/multitool))
+ if(opened == 1)
nukehack_win(user)
return
- if (src.extended)
- if (istype(O, /obj/item/weapon/disk/nuclear))
+ if(extended)
+ if(istype(O, /obj/item/weapon/disk/nuclear))
usr.drop_item()
O.loc = src
- src.auth = O
- src.add_fingerprint(user)
+ auth = O
+ add_fingerprint(user)
return
- if (src.anchored)
+ if(anchored)
switch(removal_stage)
if(0)
if(istype(O,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = O
if(!WT.isOn()) return
- if (WT.get_fuel() < 5) // uses up 5 fuel.
+ if(WT.get_fuel() < 5) // uses up 5 fuel.
user << "You need more fuel to complete this task."
return
@@ -128,7 +124,7 @@ var/bomb_set
var/obj/item/weapon/weldingtool/WT = O
if(!WT.isOn()) return
- if (WT.get_fuel() < 5) // uses up 5 fuel.
+ if(WT.get_fuel() < 5) // uses up 5 fuel.
user << "You need more fuel to complete this task."
return
@@ -165,51 +161,51 @@ var/bomb_set
..()
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
- if (src.extended)
- if (!ishuman(user))
+ if(extended)
+ if(!ishuman(user))
usr << "You don't have the dexterity to do this!"
return 1
user.set_machine(src)
- var/dat = text("Nuclear Fission Explosive
\nAuth. Disk: []
", src, (src.auth ? "++++++++++" : "----------"))
- if (src.auth)
- if (src.yes_code)
- dat += text("\nStatus: []-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src)
+ var/dat = text("Nuclear Fission Explosive
\nAuth. Disk: []
", src, (auth ? "++++++++++" : "----------"))
+ if(auth)
+ if(yes_code)
+ dat += text("\nStatus: []-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (timing ? "Func/Set" : "Functional"), (safety ? "Safe" : "Engaged"), timeleft, (timing ? "On" : "Off"), src, src, src, timeleft, src, src, (safety ? "On" : "Off"), src, (anchored ? "Engaged" : "Off"), src)
else
- dat += text("\nStatus: Auth. S2-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\n[] Safety: Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
+ dat += text("\nStatus: Auth. S2-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\n[] Safety: Toggle
\nAnchor: [] Toggle
\n", (safety ? "Safe" : "Engaged"), timeleft, (timing ? "On" : "Off"), timeleft, (safety ? "On" : "Off"), (anchored ? "Engaged" : "Off"))
else
- if (src.timing)
- dat += text("\nStatus: Set-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
+ if(timing)
+ dat += text("\nStatus: Set-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (safety ? "Safe" : "Engaged"), timeleft, (timing ? "On" : "Off"), timeleft, (safety ? "On" : "Off"), (anchored ? "Engaged" : "Off"))
else
- dat += text("\nStatus: Auth. S1-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
+ dat += text("\nStatus: Auth. S1-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (safety ? "Safe" : "Engaged"), timeleft, (timing ? "On" : "Off"), timeleft, (safety ? "On" : "Off"), (anchored ? "Engaged" : "Off"))
var/message = "AUTH"
- if (src.auth)
- message = text("[]", src.code)
- if (src.yes_code)
+ if(auth)
+ message = text("[]", code)
+ if(yes_code)
message = "*****"
dat += text("
\n>[]
\n1-2-3
\n4-5-6
\n7-8-9
\nR-0-E
\n", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=nuclearbomb;size=300x400")
onclose(user, "nuclearbomb")
- else if (src.deployable)
+ else if(deployable)
if(removal_stage < 5)
- src.anchored = 1
+ anchored = 1
visible_message("With a steely snap, bolts slide out of [src] and anchor it to the flooring!")
else
visible_message("\The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
- if(!src.lighthack)
+ if(!lighthack)
flick("nuclearbombc", src)
- src.icon_state = "nuclearbomb1"
- src.extended = 1
+ icon_state = "nuclearbomb1"
+ extended = 1
return
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
var/dat as text
dat += "Nuclear Fission Explosive
\nNuclear Device Wires:
"
- for(var/wire in src.wires)
- dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse
")
- dat += text("
The device is [src.timing ? "shaking!" : "still"]
")
- dat += text("The device is [src.safety ? "quiet" : "whirring"].
")
- dat += text("The lights are [src.lighthack ? "static" : "functional"].
")
+ for(var/wire in wires)
+ dat += text("[wire] Wire: [wires[wire] ? "Mend" : "Cut"] Pulse
")
+ dat += text("
The device is [timing ? "shaking!" : "still"]
")
+ dat += text("The device is [safety ? "quiet" : "whirring"].
")
+ dat += text("The lights are [lighthack ? "static" : "functional"].
")
user << browse("Bomb Defusion[dat]","window=nukebomb_hack")
onclose(user, "nukebomb_hack")
@@ -218,141 +214,140 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
set name = "Make Deployable"
set src in oview(1)
- if (!usr.canmove || usr.stat || usr.restrained())
+ if(!usr.canmove || usr.stat || usr.restrained())
return
- if (!ishuman(usr))
+ if(!ishuman(usr))
usr << "You don't have the dexterity to do this!"
return 1
- if (src.deployable)
+ if(deployable)
usr << "You close several panels to make [src] undeployable."
- src.deployable = 0
+ deployable = 0
else
usr << "You adjust some panels to make [src] deployable."
- src.deployable = 1
+ deployable = 1
return
-
/obj/machinery/nuclearbomb/Topic(href, href_list)
..()
- if (!usr.canmove || usr.stat || usr.restrained())
+ if(!usr.canmove || usr.stat || usr.restrained())
return
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
+ if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
- if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
+ if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
- if(src.wires[temp_wire])
+ if(wires[temp_wire])
usr << "You can't pulse a cut wire."
else
- if(src.light_wire == temp_wire)
- src.lighthack = !src.lighthack
- spawn(100) src.lighthack = !src.lighthack
- if(src.timing_wire == temp_wire)
- if(src.timing)
+ if(light_wire == temp_wire)
+ lighthack = !lighthack
+ spawn(100) lighthack = !lighthack
+ if(timing_wire == temp_wire)
+ if(timing)
explode()
- if(src.safety_wire == temp_wire)
- src.safety = !src.safety
- spawn(100) src.safety = !src.safety
- if(src.safety == 1)
+ if(safety_wire == temp_wire)
+ safety = !safety
+ spawn(100) safety = !safety
+ if(safety == 1)
visible_message("The [src] quiets down.")
- if(!src.lighthack)
- if (src.icon_state == "nuclearbomb2")
- src.icon_state = "nuclearbomb1"
+ if(!lighthack)
+ if(icon_state == "nuclearbomb2")
+ icon_state = "nuclearbomb1"
else
visible_message("The [src] emits a quiet whirling noise!")
if(href_list["act"] == "wire")
- if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
+ if(!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
- if(src.safety_wire == temp_wire)
- if(src.timing)
+ if(safety_wire == temp_wire)
+ if(timing)
explode()
- if(src.timing_wire == temp_wire)
- if(!src.lighthack)
- if (src.icon_state == "nuclearbomb2")
- src.icon_state = "nuclearbomb1"
- src.timing = 0
+ if(timing_wire == temp_wire)
+ if(!lighthack)
+ if(icon_state == "nuclearbomb2")
+ icon_state = "nuclearbomb1"
+ timing = 0
bomb_set = 0
- if(src.light_wire == temp_wire)
- src.lighthack = !src.lighthack
+ if(light_wire == temp_wire)
+ lighthack = !lighthack
- if (href_list["auth"])
- if (src.auth)
- src.auth.loc = src.loc
- src.yes_code = 0
- src.auth = null
+ if(href_list["auth"])
+ if(auth)
+ auth.loc = src.loc
+ yes_code = 0
+ auth = null
else
var/obj/item/I = usr.get_active_hand()
- if (istype(I, /obj/item/weapon/disk/nuclear))
+ if(istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
- src.auth = I
- if (src.auth)
- if (href_list["type"])
- if (href_list["type"] == "E")
- if (src.code == src.r_code)
- src.yes_code = 1
- src.code = null
+ auth = I
+ if(auth)
+ if(href_list["type"])
+ if(href_list["type"] == "E")
+ if(code == r_code)
+ yes_code = 1
+ code = null
else
- src.code = "ERROR"
+ code = "ERROR"
else
- if (href_list["type"] == "R")
- src.yes_code = 0
- src.code = null
+ if(href_list["type"] == "R")
+ yes_code = 0
+ code = null
else
- src.code += text("[]", href_list["type"])
- if (length(src.code) > 5)
- src.code = "ERROR"
- if (src.yes_code)
- if (href_list["time"])
+ code += text("[]", href_list["type"])
+ if(length(code) > 5)
+ code = "ERROR"
+ if(yes_code)
+ if(href_list["time"])
var/time = text2num(href_list["time"])
- src.timeleft += time
- src.timeleft = min(max(round(src.timeleft), 60), 600)
- if (href_list["timer"])
- if (src.timing == -1.0)
+ timeleft += time
+ timeleft = min(max(round(timeleft), 60), 600)
+ if(href_list["timer"])
+ if(timing == -1.0)
return
- if (src.safety)
+ if(safety)
usr << "The safety is still on."
return
- src.timing = !( src.timing )
- if (src.timing)
- if(!src.lighthack)
- src.icon_state = "nuclearbomb2"
- if(!src.safety)
+ timing = !(timing)
+ if(timing)
+ if(!lighthack)
+ icon_state = "nuclearbomb2"
+ if(!safety)
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
else
bomb_set = 0
else
bomb_set = 0
- if(!src.lighthack)
- src.icon_state = "nuclearbomb1"
- if (href_list["safety"])
- src.safety = !( src.safety )
+ if(!lighthack)
+ icon_state = "nuclearbomb1"
+ if(href_list["safety"])
+ safety = !(safety)
if(safety)
- src.timing = 0
+ timing = 0
bomb_set = 0
- if (href_list["anchor"])
+ if(href_list["anchor"])
if(removal_stage == 5)
- src.anchored = 0
+ anchored = 0
visible_message("\The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
return
- src.anchored = !( src.anchored )
- if(src.anchored)
+ anchored = !(anchored)
+ if(anchored)
visible_message("With a steely snap, bolts slide out of [src] and anchor it to the flooring.")
else
visible_message("The anchoring bolts slide back into the depths of [src].")
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
+ if((M.client && M.machine == src))
+ attack_hand(M)
else
usr << browse(null, "window=nuclearbomb")
return
@@ -365,23 +360,23 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
#define NUKERANGE 80
/obj/machinery/nuclearbomb/proc/explode()
- if (src.safety)
- src.timing = 0
+ if(safety)
+ timing = 0
return
- src.timing = -1.0
- src.yes_code = 0
- src.safety = 1
- if(!src.lighthack)
- src.icon_state = "nuclearbomb3"
+ timing = -1.0
+ yes_code = 0
+ safety = 1
+ if(!lighthack)
+ icon_state = "nuclearbomb3"
playsound(src,'sound/machines/Alarm.ogg',100,0,5)
- if (ticker && ticker.mode)
+ if(ticker && ticker.mode)
ticker.mode.explosion_in_progress = 1
sleep(100)
var/off_station = 0
var/turf/bomb_location = get_turf(src)
if(bomb_location && (bomb_location.z in config.station_levels))
- if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
+ if((bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)))
off_station = 1
else
off_station = 2
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index 2b3679dda5..48bd028c09 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -1,27 +1,23 @@
//#define AMAP
-
/obj/machinery/computer/security/verb/station_map()
set name = ".map"
set category = "Object"
set src in view(1)
usr.set_machine(src)
if(!mapping) return
-
log_game("[usr]([usr.key]) used station map L[z] in [src.loc.loc]")
-
- src.drawmap(usr)
+ drawmap(usr)
/obj/machinery/computer/security/proc/drawmap(var/mob/user as mob)
var/icx = round(world.maxx/16) + 1
var/icy = round(world.maxy/16) + 1
- var/xoff = round( (icx*16-world.maxx)-2)
- var/yoff = round( (icy*16-world.maxy)-2)
+ var/xoff = round((icx*16-world.maxx)-2)
+ var/yoff = round((icy*16-world.maxy)-2)
var/icount = icx * icy
-
var/list/imap = list()
#ifdef AMAP
@@ -32,7 +28,6 @@
//world << "[icount] images in list"
-
for(var/wx = 1 ; wx <= world.maxx; wx++)
for(var/wy = 1; wy <= world.maxy; wy++)
@@ -42,8 +37,6 @@
var/colour
var/colour2
-
-
if(!T)
colour = rgb(0,0,0)
@@ -79,9 +72,6 @@
else
colour = rgb(0,40,0)
-
-
-
if(sense)
for(var/atom/AM in T.contents)
@@ -127,10 +117,8 @@
var/turf_total = environment.total_moles()
//var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
-
var/t1 = turf_total / MOLES_CELLSTANDARD * 150
-
if(t1<=100)
colour2 = rgb(t1*2.55,0,0)
else
@@ -150,19 +138,16 @@
var/icon/I = imap[1+(ix + icx*iy)*2]
var/icon/I2 = imap[2+(ix + icx*iy)*2]
-
//world << "icon: \icon[I]"
I.DrawBox(colour, rx, ry, rx+1, ry+1)
I2.DrawBox(colour2, rx, ry, rx+1, ry+1)
-
user.clearmap()
user.mapobjs = list()
-
for(var/i=0; iCannot secure turrets in space!"
return
- user.visible_message( \
+ user.visible_message(\
"[user] begins [anchored ? "un" : ""]securing the turret.", \
"You begin [anchored ? "un" : ""]securing the turret." \
)
@@ -386,7 +385,7 @@ var/list/turret_icons
return
health -= force
- if (force > 5 && prob(45))
+ if(force > 5 && prob(45))
spark_system.start()
if(health <= 0)
die() //the death process :(
@@ -434,14 +433,14 @@ var/list/turret_icons
/obj/machinery/porta_turret/ex_act(severity)
switch (severity)
- if (1)
+ if(1)
qdel(src)
- if (2)
- if (prob(25))
+ if(2)
+ if(prob(25))
qdel(src)
else
take_damage(initial(health) * 8) //should instakill most turrets
- if (3)
+ if(3)
take_damage(initial(health) * 8 / 3)
/obj/machinery/porta_turret/proc/die() //called when the turret dies, ie, health <= 0
@@ -599,9 +598,9 @@ var/list/turret_icons
update_icon()
timeout = 10
-/obj/machinery/porta_turret/proc/set_raised_raising(var/raised, var/raising)
- src.raised = raised
- src.raising = raising
+/obj/machinery/porta_turret/proc/set_raised_raising(var/incoming_raised, var/incoming_raising)
+ raised = incoming_raised
+ raising = incoming_raising
density = raised || raising
/obj/machinery/porta_turret/proc/target(var/mob/living/target)
@@ -677,9 +676,9 @@ var/list/turret_icons
/obj/machinery/porta_turret/proc/setState(var/datum/turret_checks/TC)
if(controllock)
return
- src.enabled = TC.enabled
- src.lethal = TC.lethal
- src.iconholder = TC.lethal
+ enabled = TC.enabled
+ lethal = TC.lethal
+ iconholder = TC.lethal
check_synth = TC.check_synth
check_access = TC.check_access
@@ -689,7 +688,7 @@ var/list/turret_icons
check_anomalies = TC.check_anomalies
ailock = TC.ailock
- src.power_change()
+ power_change()
/*
Portable turret constructions
@@ -707,7 +706,6 @@ var/list/turret_icons
var/installation = null //the gun type installed
var/gun_charge = 0 //the gun charge of the gun type installed
-
/obj/machinery/porta_turret_construct/attackby(obj/item/I, mob/user)
//this is a bit unwieldy but self-explanatory
switch(build_step)
@@ -722,7 +720,7 @@ var/list/turret_icons
else if(istype(I, /obj/item/weapon/crowbar) && !anchored)
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << "You dismantle the turret construction."
- new /obj/item/stack/material/steel( loc, 5)
+ new /obj/item/stack/material/steel(loc, 5)
qdel(src)
return
@@ -744,7 +742,6 @@ var/list/turret_icons
build_step = 0
return
-
if(2)
if(istype(I, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -765,10 +762,9 @@ var/list/turret_icons
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
user << "You remove the turret's interior metal armor."
- new /obj/item/stack/material/steel( loc, 2)
+ new /obj/item/stack/material/steel(loc, 2)
return
-
if(3)
if(istype(I, /obj/item/weapon/gun/energy)) //the gun installation part
@@ -873,7 +869,6 @@ var/list/turret_icons
..()
-
/obj/machinery/porta_turret_construct/attack_hand(mob/user)
switch(build_step)
if(4)
@@ -899,7 +894,6 @@ var/list/turret_icons
/atom/movable/porta_turret_cover
icon = 'icons/obj/turrets.dmi'
-
#undef TURRET_PRIORITY_TARGET
#undef TURRET_SECONDARY_TARGET
-#undef TURRET_NOT_TARGET
+#undef TURRET_NOT_TARGET
\ No newline at end of file
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 55c2e10eaa..5d3270231f 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -1,5 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
obj/machinery/recharger
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
@@ -16,8 +15,7 @@ obj/machinery/recharger
var/portable = 1
circuit = /obj/item/weapon/circuitboard/recharger
-obj/machinery/recharger/New()
- circuit = new circuit(src)
+/obj/machinery/recharger/New()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
@@ -25,13 +23,13 @@ obj/machinery/recharger/New()
..()
return
-obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
+/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
return
var/allowed = 0
for (var/allowed_type in allowed_devices)
- if (istype(G, allowed_type)) allowed = 1
+ if(istype(G, allowed_type)) allowed = 1
if(allowed)
if(charging)
@@ -41,10 +39,10 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(!powered())
user << "The [name] blinks red as you try to insert the item!"
return
- if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
+ if(istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
return
- if (istype(G, /obj/item/weapon/gun/energy/staff))
+ if(istype(G, /obj/item/weapon/gun/energy/staff))
return
if(istype(G, /obj/item/device/laptop))
var/obj/item/device/laptop/L = G
@@ -67,7 +65,7 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
else if(default_deconstruction_crowbar(user, G))
return
-obj/machinery/recharger/attack_hand(mob/user as mob)
+/obj/machinery/recharger/attack_hand(mob/user as mob)
if(istype(user,/mob/living/silicon))
return
@@ -79,7 +77,7 @@ obj/machinery/recharger/attack_hand(mob/user as mob)
charging = null
update_icon()
-obj/machinery/recharger/process()
+/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
update_use_power(0)
icon_state = icon_state_idle
@@ -137,7 +135,7 @@ obj/machinery/recharger/process()
update_use_power(1)
return
-obj/machinery/recharger/emp_act(severity)
+/obj/machinery/recharger/emp_act(severity)
if(stat & (NOPOWER|BROKEN) || !anchored)
..(severity)
return
@@ -153,14 +151,14 @@ obj/machinery/recharger/emp_act(severity)
B.bcell.charge = 0
..(severity)
-obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
+/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
icon_state = icon_state_charging
else
icon_state = icon_state_idle
-obj/machinery/recharger/wallcharger
+/obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
@@ -170,5 +168,4 @@ obj/machinery/recharger/wallcharger
icon_state_charging = "wrecharger1"
icon_state_idle = "wrecharger0"
portable = 0
- circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
- frame_type = "wrecharger"
+ circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
\ No newline at end of file
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index b5f7e029a5..96ab5eab20 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -24,7 +24,6 @@
/obj/machinery/recharge_station/New()
..()
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
@@ -32,7 +31,6 @@
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/cell/high(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
-
RefreshParts()
update_icon()
@@ -80,9 +78,9 @@
if(!has_cell_power())
return 0
- if(src.use_power == 1)
+ if(use_power == 1)
cell.use(idle_power_usage * CELLRATE)
- else if(src.use_power >= 2)
+ else if(use_power >= 2)
cell.use(active_power_usage * CELLRATE)
return 1
@@ -266,7 +264,7 @@
if(!occupant)
return
- occupant.forceMove(loc)
+ occupant.forceMove(src.loc)
occupant.reset_view()
occupant = null
update_icon()
diff --git a/code/game/machinery/records_scanner.dm b/code/game/machinery/records_scanner.dm
index 54faef41f8..f9ed05c7e9 100644
--- a/code/game/machinery/records_scanner.dm
+++ b/code/game/machinery/records_scanner.dm
@@ -78,7 +78,7 @@ obj/machinery/scanner/attack_hand(mob/living/carbon/human/user)
print.stamped = 1
for(var/datum/data/record/test in data_core.general)
- if (test.fields["name"] == mname)
+ if(test.fields["name"] == mname)
return
var/datum/data/record/G = new()
@@ -136,6 +136,4 @@ obj/machinery/scanner/attack_hand(mob/living/carbon/human/user)
data_core.general += G
data_core.medical += M
data_core.security += S
- data_core.locked += L
-
-
+ data_core.locked += L
\ No newline at end of file
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index c33eb766fe..306fbcad9c 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -74,11 +74,11 @@ var/list/obj/machinery/requests_console/allConsoles = list()
name = "[department] Requests Console"
allConsoles += src
- if (departmentType & RC_ASSIST)
+ if(departmentType & RC_ASSIST)
req_console_assistance |= department
- if (departmentType & RC_SUPPLY)
+ if(departmentType & RC_SUPPLY)
req_console_supplies |= department
- if (departmentType & RC_INFO)
+ if(departmentType & RC_INFO)
req_console_information |= department
set_light(1)
@@ -87,15 +87,15 @@ var/list/obj/machinery/requests_console/allConsoles = list()
allConsoles -= src
var/lastDeptRC = 1
for (var/obj/machinery/requests_console/Console in allConsoles)
- if (Console.department == department)
+ if(Console.department == department)
lastDeptRC = 0
break
if(lastDeptRC)
- if (departmentType & RC_ASSIST)
+ if(departmentType & RC_ASSIST)
req_console_assistance -= department
- if (departmentType & RC_SUPPLY)
+ if(departmentType & RC_SUPPLY)
req_console_supplies -= department
- if (departmentType & RC_INFO)
+ if(departmentType & RC_INFO)
req_console_information -= department
..()
@@ -126,7 +126,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
data["announceAuth"] = announceAuth
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
ui.set_initial_data(data)
ui.open()
@@ -162,7 +162,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
announcement.Announce(message, msg_sanitized = 1)
reset_message(1)
- if( href_list["department"] && message )
+ if(href_list["department"] && message)
var/log_msg = message
var/pass = 0
screen = RCS_SENTFAIL
@@ -193,7 +193,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
return
if(tempScreen == RCS_VIEWMSGS)
for (var/obj/machinery/requests_console/Console in allConsoles)
- if (Console.department == department)
+ if(Console.department == department)
Console.newmessagepriority = 0
Console.icon_state = "req_comp0"
Console.set_light(1)
@@ -210,9 +210,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
//err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed.
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
- if(default_deconstruction_screwdriver(user, O))
- return
- if(default_deconstruction_crowbar(user, O))
+ if(computer_deconstruction_screwdriver(user, O))
return
if(istype(O, /obj/item/device/multitool))
if(panel_open)
@@ -226,15 +224,15 @@ var/list/obj/machinery/requests_console/allConsoles = list()
name = "[department] Requests Console"
allConsoles += src
- if (departmentType & RC_ASSIST)
+ if(departmentType & RC_ASSIST)
req_console_assistance |= department
- if (departmentType & RC_SUPPLY)
+ if(departmentType & RC_SUPPLY)
req_console_supplies |= department
- if (departmentType & RC_INFO)
+ if(departmentType & RC_INFO)
req_console_information |= department
return
- if (istype(O, /obj/item/weapon/card/id))
+ if(istype(O, /obj/item/weapon/card/id))
if(inoperable(MAINT)) return
if(screen == RCS_MESSAUTH)
var/obj/item/weapon/card/id/T = O
@@ -242,14 +240,14 @@ var/list/obj/machinery/requests_console/allConsoles = list()
updateUsrDialog()
if(screen == RCS_ANNOUNCE)
var/obj/item/weapon/card/id/ID = O
- if (access_RC_announce in ID.GetAccess())
+ if(access_RC_announce in ID.GetAccess())
announceAuth = 1
announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
else
reset_message()
user << "You are not authorized to send announcements."
updateUsrDialog()
- if (istype(O, /obj/item/weapon/stamp))
+ if(istype(O, /obj/item/weapon/stamp))
if(inoperable(MAINT)) return
if(screen == RCS_MESSAUTH)
var/obj/item/weapon/stamp/T = O
diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm
index 4c44bcd4ee..59f364d948 100644
--- a/code/game/machinery/robot_fabricator.dm
+++ b/code/game/machinery/robot_fabricator.dm
@@ -12,40 +12,40 @@
active_power_usage = 10000
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if (istype(O, /obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
+ if(istype(O, /obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = O
- if (src.metal_amount < 150000.0)
+ if(metal_amount < 150000.0)
var/count = 0
- src.overlays += "fab-load-metal"
+ overlays += "fab-load-metal"
spawn(15)
if(M)
if(!M.get_amount())
return
while(metal_amount < 150000 && M.amount)
- src.metal_amount += O.matter[DEFAULT_WALL_MATERIAL] /*O:height * O:width * O:length * 100000.0*/
+ metal_amount += O.matter[DEFAULT_WALL_MATERIAL] /*O:height * O:width * O:length * 100000.0*/
M.use(1)
count++
user << "You insert [count] metal sheet\s into the fabricator."
- src.overlays -= "fab-load-metal"
+ overlays -= "fab-load-metal"
updateDialog()
else
user << "The robot part maker is full. Please remove metal from the robot part maker in order to insert more."
/obj/machinery/robotic_fabricator/attack_hand(user as mob)
var/dat
- if (..())
+ if(..())
return
- if (src.operating)
+ if(operating)
dat = {"
-Building [src.being_built.name].
+Building [being_built.name].
Please wait until completion...
"}
else
dat = {"
-Metal Amount: [min(150000, src.metal_amount)] cm3 (MAX: 150,000)
+Metal Amount: [min(150000, metal_amount)] cm3 (MAX: 150,000)
Left Arm (25,000 cc metal.)
Right Arm (25,000 cc metal.)
@@ -61,14 +61,14 @@ Please wait until completion...
return
/obj/machinery/robotic_fabricator/Topic(href, href_list)
- if (..())
+ if(..())
return
usr.set_machine(src)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
- if (href_list["make"])
- if (!src.operating)
+ if(href_list["make"])
+ if(!operating)
var/part_type = text2num(href_list["make"])
var/build_type = ""
@@ -76,63 +76,63 @@ Please wait until completion...
var/build_cost = 25000
switch (part_type)
- if (1)
+ if(1)
build_type = "/obj/item/robot_parts/l_arm"
build_time = 200
build_cost = 25000
- if (2)
+ if(2)
build_type = "/obj/item/robot_parts/r_arm"
build_time = 200
build_cost = 25000
- if (3)
+ if(3)
build_type = "/obj/item/robot_parts/l_leg"
build_time = 200
build_cost = 25000
- if (4)
+ if(4)
build_type = "/obj/item/robot_parts/r_leg"
build_time = 200
build_cost = 25000
- if (5)
+ if(5)
build_type = "/obj/item/robot_parts/chest"
build_time = 350
build_cost = 50000
- if (6)
+ if(6)
build_type = "/obj/item/robot_parts/head"
build_time = 350
build_cost = 50000
- if (7)
+ if(7)
build_type = "/obj/item/robot_parts/robot_suit"
build_time = 600
build_cost = 75000
var/building = text2path(build_type)
- if (!isnull(building))
- if (src.metal_amount >= build_cost)
- src.operating = 1
- src.update_use_power(2)
+ if(!isnull(building))
+ if(metal_amount >= build_cost)
+ operating = 1
+ update_use_power(2)
- src.metal_amount = max(0, src.metal_amount - build_cost)
+ metal_amount = max(0, metal_amount - build_cost)
- src.being_built = new building(src)
+ being_built = new building(src)
- src.overlays += "fab-active"
- src.updateUsrDialog()
+ overlays += "fab-active"
+ updateUsrDialog()
spawn (build_time)
- if (!isnull(src.being_built))
- src.being_built.loc = get_turf(src)
- src.being_built = null
- src.update_use_power(1)
- src.operating = 0
- src.overlays -= "fab-active"
+ if(!isnull(being_built))
+ being_built.loc = get_turf(src)
+ being_built = null
+ update_use_power(1)
+ operating = 0
+ overlays -= "fab-active"
return
for (var/mob/M in viewers(1, src))
- if (M.client && M.machine == src)
- src.attack_hand(M)
+ if(M.client && M.machine == src)
+ attack_hand(M)
\ No newline at end of file
diff --git a/code/game/machinery/seed_extractor.dm b/code/game/machinery/seed_extractor.dm
index e9a2081fb2..c7d6b7c514 100644
--- a/code/game/machinery/seed_extractor.dm
+++ b/code/game/machinery/seed_extractor.dm
@@ -36,7 +36,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
//Grass.
else if(istype(O, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/S = O
- if (S.use(1))
+ if(S.use(1))
user << "You extract some seeds from the grass tile."
new /obj/item/seeds/grassseed(loc)
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 36c8c62814..d60d49b47e 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -11,11 +11,10 @@
var/set_temperature = T0C + 20 //K
var/heating_power = 40000
-
/obj/machinery/space_heater/New()
..()
- if (cell_type)
- src.cell = new cell_type(src)
+ if(cell_type)
+ cell = new cell_type(src)
update_icon()
/obj/machinery/space_heater/update_icon()
@@ -79,7 +78,7 @@
return
/obj/machinery/space_heater/attack_hand(mob/user as mob)
- src.add_fingerprint(user)
+ add_fingerprint(user)
interact(user)
/obj/machinery/space_heater/interact(mob/user as mob)
@@ -113,9 +112,9 @@
/obj/machinery/space_heater/Topic(href, href_list)
- if (usr.stat)
+ if(usr.stat)
return
- if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
+ if((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
switch(href_list["op"])
@@ -153,8 +152,6 @@
usr.unset_machine()
return
-
-
/obj/machinery/space_heater/process()
if(on)
if(cell && cell.charge)
@@ -166,7 +163,7 @@
if(removed)
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
if(heat_transfer > 0) //heating air
- heat_transfer = min( heat_transfer , heating_power ) //limit by the power rating of the heater
+ heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater
removed.add_thermal_energy(heat_transfer)
cell.use(heat_transfer*CELLRATE)
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 2c4a2cefbb..98582f3ccc 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -53,28 +53,12 @@
return ..()
/obj/machinery/status_display/attackby(I as obj, user as mob)
- if(istype(I, /obj/item/weapon/screwdriver) && circuit)
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
- var/obj/item/weapon/circuitboard/M = new circuit( A )
- A.frame_type = "display"
- A.pixel_x = pixel_x
- A.pixel_y = pixel_y
- A.circuit = M
- A.anchored = 1
- for (var/obj/C in src)
- C.forceMove(loc)
- user << "You disconnect the monitor."
- A.state = 4
- A.icon_state = "display_4"
- M.deconstruct(src)
- qdel(src)
+ if(computer_deconstruction_screwdriver(user, I))
+ return
else
- src.attack_hand(user)
+ attack_hand(user)
return
-
// register for radio system
/obj/machinery/status_display/initialize()
..()
@@ -108,7 +92,7 @@
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer
if(emergency_shuttle.waiting_to_leave())
message1 = "-ETD-"
- if (emergency_shuttle.shuttle.is_launching())
+ if(emergency_shuttle.shuttle.is_launching())
message2 = "Launch"
else
message2 = get_shuttle_timer_departure()
@@ -201,7 +185,7 @@
/obj/machinery/status_display/proc/get_supply_shuttle_timer()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
- if (!shuttle)
+ if(!shuttle)
return "Error"
if(shuttle.has_arrive_time())
diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm
index 51fcfb4f51..6984017c3d 100644
--- a/code/game/machinery/status_display_ai.dm
+++ b/code/game/machinery/status_display_ai.dm
@@ -70,31 +70,16 @@ var/list/ai_status_emotions = list(
var/emotion = "Neutral"
/obj/machinery/ai_status_display/attackby(I as obj, user as mob)
- if(istype(I, /obj/item/weapon/screwdriver) && circuit)
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
- var/obj/item/weapon/circuitboard/M = new circuit( A )
- A.frame_type = "display"
- A.pixel_x = pixel_x
- A.pixel_y = pixel_y
- A.circuit = M
- A.anchored = 1
- for (var/obj/C in src)
- C.forceMove(loc)
- user << "You disconnect the monitor."
- A.state = 4
- A.icon_state = "display_4"
- M.deconstruct(src)
- qdel(src)
+ if(computer_deconstruction_screwdriver(user, I))
+ return
else
- src.attack_hand(user)
+ attack_hand(user)
return
/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
var/list/ai_emotions = get_ai_emotions(user.ckey)
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
- src.emotion = emote
+ emotion = emote
/obj/machinery/ai_status_display/process()
return
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 227ba52e0c..9700dfd69a 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -2,7 +2,6 @@
// SUIT STORAGE UNIT /////////////////
//////////////////////////////////////
-
/obj/machinery/suit_storage_unit
name = "Suit Storage Unit"
desc = "An industrial U-Stor-It Storage unit designed to accomodate all kinds of space suits. Its on-board equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. There's a warning label dangling from the control pad, reading \"STRICTLY NO BIOLOGICALS IN THE CONFINES OF THE UNIT\"."
@@ -34,9 +33,8 @@
HELMET_TYPE = /obj/item/clothing/head/helmet/space
MASK_TYPE = /obj/item/clothing/mask/breath
-
/obj/machinery/suit_storage_unit/New()
- src.update_icon()
+ update_icon()
if(SUIT_TYPE)
SUIT = new SUIT_TYPE(src)
if(HELMET_TYPE)
@@ -54,40 +52,37 @@
hassuit = 1
if(OCCUPANT)
hashuman = 1
- icon_state = text("suitstorage[][][][][][][][][]",hashelmet,hassuit,hashuman,src.isopen,src.islocked,src.isUV,src.ispowered,src.isbroken,src.issuperUV)
-
+ icon_state = text("suitstorage[][][][][][][][][]", hashelmet, hassuit, hashuman, isopen, islocked, isUV, ispowered, isbroken, issuperUV)
/obj/machinery/suit_storage_unit/power_change()
..()
- if( !(stat & NOPOWER) )
- src.ispowered = 1
- src.update_icon()
+ if(!(stat & NOPOWER))
+ ispowered = 1
+ update_icon()
else
spawn(rand(0, 15))
- src.ispowered = 0
- src.islocked = 0
- src.isopen = 1
- src.dump_everything()
- src.update_icon()
-
+ ispowered = 0
+ islocked = 0
+ isopen = 1
+ dump_everything()
+ update_icon()
/obj/machinery/suit_storage_unit/ex_act(severity)
switch(severity)
if(1.0)
if(prob(50))
- src.dump_everything() //So suits dont survive all the time
+ dump_everything() //So suits dont survive all the time
qdel(src)
return
if(2.0)
if(prob(50))
- src.dump_everything()
+ dump_everything()
qdel(src)
return
else
return
return
-
/obj/machinery/suit_storage_unit/attack_hand(mob/user as mob)
var/dat
if(..())
@@ -96,45 +91,45 @@
return
if(!user.IsAdvancedToolUser())
return 0
- if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
+ if(panelopen) //The maintenance panel is open. Time for some shady stuff
dat+= "Suit storage unit: Maintenance panel"
dat+= "Maintenance panel controls
"
dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
you cannot understand. Probably the manufactoring world's language.
Among other things, a few controls catch your eye.
"
- dat+= text("A small dial with a small lambda symbol on it. It's pointing towards a gauge that reads [].
Turn towards []
",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") )
- dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(src.safetieson? "GREEN" : "RED"),src)
+ dat+= text("A small dial with a small lambda symbol on it. It's pointing towards a gauge that reads [].
Turn towards []
",(issuperUV ? "15nm" : "185nm"),src,(issuperUV ? "185nm" : "15nm"))
+ dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(safetieson? "GREEN" : "RED"),src)
dat+= text("
Close panel", user)
//user << browse(dat, "window=ssu_m_panel;size=400x500")
//onclose(user, "ssu_m_panel")
- else if(src.isUV) //The thing is running its cauterisation cycle. You have to wait.
+ else if(isUV) //The thing is running its cauterisation cycle. You have to wait.
dat += "Suit storage unit"
dat+= "Unit is cauterising contents with selected UV ray intensity. Please wait.
"
- //dat+= "Cycle end in: [src.cycletimeleft()] seconds. "
+ //dat+= "Cycle end in: [cycletimeleft()] seconds. "
//user << browse(dat, "window=ssu_cycling_panel;size=400x500")
//onclose(user, "ssu_cycling_panel")
else
- if(!src.isbroken)
+ if(!isbroken)
dat+= "Suit storage unit"
dat+= "U-Stor-It Suit Storage Unit, model DS1900
"
dat+= "Welcome to the Unit control panel.
"
- dat+= text("Helmet storage compartment: []
",(src.HELMET ? HELMET.name : "No helmet detected.") )
- if(HELMET && src.isopen)
+ dat+= text("Helmet storage compartment: []
",(HELMET ? HELMET.name : "No helmet detected."))
+ if(HELMET && isopen)
dat+=text("Dispense helmet
",src)
- dat+= text("Suit storage compartment: []
",(src.SUIT ? SUIT.name : "No exosuit detected.") )
- if(SUIT && src.isopen)
+ dat+= text("Suit storage compartment: []
",(SUIT ? SUIT.name : "No exosuit detected."))
+ if(SUIT && isopen)
dat+=text("Dispense suit
",src)
- dat+= text("Breathmask storage compartment: []
",(src.MASK ? MASK.name : "No breathmask detected.") )
- if(MASK && src.isopen)
+ dat+= text("Breathmask storage compartment: []
",(MASK ? MASK.name : "No breathmask detected."))
+ if(MASK && isopen)
dat+=text("Dispense mask
",src)
- if(src.OCCUPANT)
+ if(OCCUPANT)
dat+= "
WARNING: Biological entity detected inside the Unit's storage. Please remove.
"
dat+= "Eject extra load"
- dat+= text("
Unit is: [] - [] Unit ",(src.isopen ? "Open" : "Closed"),src,(src.isopen ? "Close" : "Open"))
- if(src.isopen)
+ dat+= text("
Unit is: [] - [] Unit ",(isopen ? "Open" : "Closed"),src,(isopen ? "Close" : "Open"))
+ if(isopen)
dat+="
"
else
- dat+= text(" - *[] Unit*
",src,(src.islocked ? "Unlock" : "Lock") )
- dat+= text("Unit status: []",(src.islocked? "**LOCKED**
" : "**UNLOCKED**
") )
+ dat+= text(" - *[] Unit*
",src,(islocked ? "Unlock" : "Lock"))
+ dat+= text("Unit status: []",(islocked? "**LOCKED**
" : "**UNLOCKED**
"))
dat+= text("Start Disinfection cycle
",src)
dat += text("
Close control panel", user)
//user << browse(dat, "window=Suit Storage Unit;size=400x500")
@@ -154,54 +149,54 @@
/obj/machinery/suit_storage_unit/Topic(href, href_list) //I fucking HATE this proc
if(..())
return
- if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
+ if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
- if (href_list["toggleUV"])
- src.toggleUV(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["togglesafeties"])
- src.togglesafeties(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["dispense_helmet"])
- src.dispense_helmet(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["dispense_suit"])
- src.dispense_suit(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["dispense_mask"])
- src.dispense_mask(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["toggle_open"])
- src.toggle_open(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["toggle_lock"])
- src.toggle_lock(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["start_UV"])
- src.start_UV(usr)
- src.updateUsrDialog()
- src.update_icon()
- if (href_list["eject_guy"])
- src.eject_occupant(usr)
- src.updateUsrDialog()
- src.update_icon()
- /*if (href_list["refresh"])
- src.updateUsrDialog()*/
- src.add_fingerprint(usr)
+ if(href_list["toggleUV"])
+ toggleUV(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["togglesafeties"])
+ togglesafeties(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["dispense_helmet"])
+ dispense_helmet(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["dispense_suit"])
+ dispense_suit(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["dispense_mask"])
+ dispense_mask(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["toggle_open"])
+ toggle_open(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["toggle_lock"])
+ toggle_lock(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["start_UV"])
+ start_UV(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["eject_guy"])
+ eject_occupant(usr)
+ updateUsrDialog()
+ update_icon()
+ /*if(href_list["refresh"])
+ updateUsrDialog()*/
+ add_fingerprint(usr)
return
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
// var/protected = 0
// var/mob/living/carbon/human/H = user
- if(!src.panelopen)
+ if(!panelopen)
return
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
@@ -215,25 +210,25 @@
user << "You try to touch the controls but you get zapped. There must be a short circuit somewhere."
return*/
else //welp, the guy is protected, we can continue
- if(src.issuperUV)
+ if(issuperUV)
user << "You slide the dial back towards \"185nm\"."
- src.issuperUV = 0
+ issuperUV = 0
else
user << "You crank the dial all the way up to \"15nm\"."
- src.issuperUV = 1
+ issuperUV = 1
return
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
// var/protected = 0
// var/mob/living/carbon/human/H = user
- if(!src.panelopen) //Needed check due to bugs
+ if(!panelopen) //Needed check due to bugs
return
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G,/obj/item/clothing/gloves/yellow) )
+ if(istype(G,/obj/item/clothing/gloves/yellow))
protected = 1
if(!protected)
@@ -242,146 +237,146 @@
return*/
else
user << "You push the button. The coloured LED next to it changes."
- src.safetieson = !src.safetieson
+ safetieson = !safetieson
/obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob)
- if(!src.HELMET)
+ if(!HELMET)
return //Do I even need this sanity check? Nyoro~n
else
- src.HELMET.loc = src.loc
- src.HELMET = null
+ HELMET.loc = src.loc
+ HELMET = null
return
/obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob)
- if(!src.SUIT)
+ if(!SUIT)
return
else
- src.SUIT.loc = src.loc
- src.SUIT = null
+ SUIT.loc = src.loc
+ SUIT = null
return
/obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob)
- if(!src.MASK)
+ if(!MASK)
return
else
- src.MASK.loc = src.loc
- src.MASK = null
+ MASK.loc = src.loc
+ MASK = null
return
/obj/machinery/suit_storage_unit/proc/dump_everything()
- src.islocked = 0 //locks go free
- if(src.SUIT)
- src.SUIT.loc = src.loc
- src.SUIT = null
- if(src.HELMET)
- src.HELMET.loc = src.loc
- src.HELMET = null
- if(src.MASK)
- src.MASK.loc = src.loc
- src.MASK = null
- if(src.OCCUPANT)
- src.eject_occupant(OCCUPANT)
+ islocked = 0 //locks go free
+ if(SUIT)
+ SUIT.loc = src.loc
+ SUIT = null
+ if(HELMET)
+ HELMET.loc = src.loc
+ HELMET = null
+ if(MASK)
+ MASK.loc = src.loc
+ MASK = null
+ if(OCCUPANT)
+ eject_occupant(OCCUPANT)
return
/obj/machinery/suit_storage_unit/proc/toggle_open(mob/user as mob)
- if(src.islocked || src.isUV)
+ if(islocked || isUV)
user << "Unable to open unit."
return
- if(src.OCCUPANT)
- src.eject_occupant(user)
+ if(OCCUPANT)
+ eject_occupant(user)
return // eject_occupant opens the door, so we need to return
- src.isopen = !src.isopen
+ isopen = !isopen
return
/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob)
- if(src.OCCUPANT && src.safetieson)
+ if(OCCUPANT && safetieson)
user << "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments."
return
- if(src.isopen)
+ if(isopen)
return
- src.islocked = !src.islocked
+ islocked = !islocked
return
/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob)
- if(src.isUV || src.isopen) //I'm bored of all these sanity checks
+ if(isUV || isopen) //I'm bored of all these sanity checks
return
- if(src.OCCUPANT && src.safetieson)
+ if(OCCUPANT && safetieson)
user << "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle."
return
- if(!src.HELMET && !src.MASK && !src.SUIT && !src.OCCUPANT ) //shit's empty yo
+ if(!HELMET && !MASK && !SUIT && !OCCUPANT) //shit's empty yo
user << "Unit storage bays empty. Nothing to disinfect -- Aborting."
return
user << "You start the Unit's cauterisation cycle."
- src.cycletime_left = 20
- src.isUV = 1
- if(src.OCCUPANT && !src.islocked)
- src.islocked = 1 //Let's lock it for good measure
- src.update_icon()
- src.updateUsrDialog()
+ cycletime_left = 20
+ isUV = 1
+ if(OCCUPANT && !islocked)
+ islocked = 1 //Let's lock it for good measure
+ update_icon()
+ updateUsrDialog()
var/i //our counter
for(i=0,i<4,i++)
sleep(50)
- if(src.OCCUPANT)
+ if(OCCUPANT)
OCCUPANT.apply_effect(50, IRRADIATE)
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
- if (!rad_organ)
- if (OCCUPANT.can_feel_pain())
+ if(!rad_organ)
+ if(OCCUPANT.can_feel_pain())
OCCUPANT.emote("scream")
- if(src.issuperUV)
+ if(issuperUV)
var/burndamage = rand(28,35)
OCCUPANT.take_organ_damage(0,burndamage)
else
var/burndamage = rand(6,10)
OCCUPANT.take_organ_damage(0,burndamage)
if(i==3) //End of the cycle
- if(!src.issuperUV)
- if(src.HELMET)
+ if(!issuperUV)
+ if(HELMET)
HELMET.clean_blood()
- if(src.SUIT)
+ if(SUIT)
SUIT.clean_blood()
- if(src.MASK)
+ if(MASK)
MASK.clean_blood()
else //It was supercycling, destroy everything
- if(src.HELMET)
- src.HELMET = null
- if(src.SUIT)
- src.SUIT = null
- if(src.MASK)
- src.MASK = null
+ if(HELMET)
+ HELMET = null
+ if(SUIT)
+ SUIT = null
+ if(MASK)
+ MASK = null
visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.", 3)
- src.isbroken = 1
- src.isopen = 1
- src.islocked = 0
- src.eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT.
- src.isUV = 0 //Cycle ends
- src.update_icon()
- src.updateUsrDialog()
+ isbroken = 1
+ isopen = 1
+ islocked = 0
+ eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT.
+ isUV = 0 //Cycle ends
+ update_icon()
+ updateUsrDialog()
return
/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
- if(src.HELMET)
+ if(HELMET)
HELMET.clean_blood()
- if(src.SUIT)
+ if(SUIT)
SUIT.clean_blood()
- if(src.MASK)
+ if(MASK)
MASK.clean_blood()
- src.isUV = 0 //Cycle ends
- src.update_icon()
- src.updateUsrDialog()
+ isUV = 0 //Cycle ends
+ update_icon()
+ updateUsrDialog()
var/i
for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
spawn(50)
- if(src.OCCUPANT)
- if(src.issuperUV)
+ if(OCCUPANT)
+ if(issuperUV)
OCCUPANT.take_organ_damage(0,40)
user << "Test. You gave him 40 damage"
else
@@ -391,33 +386,33 @@
/obj/machinery/suit_storage_unit/proc/cycletimeleft()
- if(src.cycletime_left >= 1)
- src.cycletime_left--
- return src.cycletime_left
+ if(cycletime_left >= 1)
+ cycletime_left--
+ return cycletime_left
/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob)
- if (src.islocked)
+ if(islocked)
return
- if (!src.OCCUPANT)
+ if(!OCCUPANT)
return
// for(var/obj/O in src)
// O.loc = src.loc
- if (src.OCCUPANT.client)
+ if(OCCUPANT.client)
if(user != OCCUPANT)
OCCUPANT << "The machine kicks you out!"
if(user.loc != src.loc)
OCCUPANT << "You leave the not-so-cozy confines of the SSU."
- src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
- src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
- src.OCCUPANT.loc = src.loc
- src.OCCUPANT = null
- if(!src.isopen)
- src.isopen = 1
- src.update_icon()
+ OCCUPANT.client.eye = OCCUPANT.client.mob
+ OCCUPANT.client.perspective = MOB_PERSPECTIVE
+ OCCUPANT.loc = src.loc
+ OCCUPANT = null
+ if(!isopen)
+ isopen = 1
+ update_icon()
return
@@ -426,12 +421,12 @@
set category = "Object"
set src in oview(1)
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
- src.eject_occupant(usr)
+ eject_occupant(usr)
add_fingerprint(usr)
- src.updateUsrDialog()
- src.update_icon()
+ updateUsrDialog()
+ update_icon()
return
@@ -440,15 +435,15 @@
set category = "Object"
set src in oview(1)
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
- if (!src.isopen)
+ if(!isopen)
usr << "The unit's doors are shut."
return
- if (!src.ispowered || src.isbroken)
+ if(!ispowered || isbroken)
usr << "The unit is not operational."
return
- if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) )
+ if((OCCUPANT) || (HELMET) || (SUIT))
usr << "It's too cluttered inside for you to fit in!"
return
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
@@ -458,111 +453,111 @@
usr.client.eye = src
usr.loc = src
// usr.metabslow = 1
- src.OCCUPANT = usr
- src.isopen = 0 //Close the thing after the guy gets inside
- src.update_icon()
+ OCCUPANT = usr
+ isopen = 0 //Close the thing after the guy gets inside
+ update_icon()
// for(var/obj/O in src)
// qdel(O)
- src.add_fingerprint(usr)
- src.updateUsrDialog()
+ add_fingerprint(usr)
+ updateUsrDialog()
return
else
- src.OCCUPANT = null //Testing this as a backup sanity test
+ OCCUPANT = null //Testing this as a backup sanity test
return
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
- if(!src.ispowered)
+ if(!ispowered)
return
if(istype(I, /obj/item/weapon/screwdriver))
- src.panelopen = !src.panelopen
+ panelopen = !panelopen
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
- user << text("You [] the unit's maintenance panel.",(src.panelopen ? "open up" : "close") )
- src.updateUsrDialog()
+ user << text("You [] the unit's maintenance panel.",(panelopen ? "open up" : "close"))
+ updateUsrDialog()
return
- if ( istype(I, /obj/item/weapon/grab) )
+ if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
- if( !(ismob(G.affecting)) )
+ if(!(ismob(G.affecting)))
return
- if (!src.isopen)
+ if(!isopen)
usr << "The unit's doors are shut."
return
- if (!src.ispowered || src.isbroken)
+ if(!ispowered || isbroken)
usr << "The unit is not operational."
return
- if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty
+ if((OCCUPANT) || (HELMET) || (SUIT)) //Unit needs to be absolutely empty
user << "The unit's storage area is too cluttered."
return
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
if(do_after(user, 20))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
- if (M.client)
+ if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
- src.OCCUPANT = M
- src.isopen = 0 //close ittt
+ OCCUPANT = M
+ isopen = 0 //close ittt
//for(var/obj/O in src)
// O.loc = src.loc
- src.add_fingerprint(user)
+ add_fingerprint(user)
qdel(G)
- src.updateUsrDialog()
- src.update_icon()
+ updateUsrDialog()
+ update_icon()
return
return
- if( istype(I,/obj/item/clothing/suit/space) )
- if(!src.isopen)
+ if(istype(I,/obj/item/clothing/suit/space))
+ if(!isopen)
return
var/obj/item/clothing/suit/space/S = I
- if(src.SUIT)
+ if(SUIT)
user << "The unit already contains a suit."
return
user << "You load the [S.name] into the storage compartment."
user.drop_item()
S.loc = src
- src.SUIT = S
- src.update_icon()
- src.updateUsrDialog()
+ SUIT = S
+ update_icon()
+ updateUsrDialog()
return
- if( istype(I,/obj/item/clothing/head/helmet) )
- if(!src.isopen)
+ if(istype(I,/obj/item/clothing/head/helmet))
+ if(!isopen)
return
var/obj/item/clothing/head/helmet/H = I
- if(src.HELMET)
+ if(HELMET)
user << "The unit already contains a helmet."
return
user << "You load the [H.name] into the storage compartment."
user.drop_item()
H.loc = src
- src.HELMET = H
- src.update_icon()
- src.updateUsrDialog()
+ HELMET = H
+ update_icon()
+ updateUsrDialog()
return
- if( istype(I,/obj/item/clothing/mask) )
- if(!src.isopen)
+ if(istype(I,/obj/item/clothing/mask))
+ if(!isopen)
return
var/obj/item/clothing/mask/M = I
- if(src.MASK)
+ if(MASK)
user << "The unit already contains a mask."
return
user << "You load the [M.name] into the storage compartment."
user.drop_item()
M.loc = src
- src.MASK = M
- src.update_icon()
- src.updateUsrDialog()
+ MASK = M
+ update_icon()
+ updateUsrDialog()
return
- src.update_icon()
- src.updateUsrDialog()
+ update_icon()
+ updateUsrDialog()
return
/obj/machinery/suit_storage_unit/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
//////////////////////////////REMINDER: Make it lock once you place some fucker inside.
@@ -591,7 +586,7 @@
var/electrified = 0
//Departments that the cycler can paint suits to look like.
- var/list/departments = list("Engineering","Mining","Medical","Security","Atmos")
+ var/list/departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction")
//Species that the suits can be configured to fit.
var/list/species = list("Human","Skrell","Unathi","Tajara", "Teshari")
@@ -621,7 +616,7 @@
name = "Engineering suit cycler"
model_text = "Engineering"
req_access = list(access_construction)
- departments = list("Engineering","Atmos")
+ departments = list("Engineering","Atmos","HAZMAT","Construction")
/obj/machinery/suit_cycler/mining
name = "Mining suit cycler"
@@ -649,12 +644,12 @@
can_repair = 1
/obj/machinery/suit_cycler/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/suit_cycler/attackby(obj/item/I as obj, mob/user as mob)
if(electrified != 0)
- if(src.shock(user, 100))
+ if(shock(user, 100))
return
//Hacking init.
@@ -673,7 +668,7 @@
user << "The suit cycler is locked."
return
- if(src.contents.len > 0)
+ if(contents.len > 0)
user << "There is no room inside the cycler for [G.affecting.name]."
return
@@ -682,23 +677,23 @@
if(do_after(user, 20))
if(!G || !G.affecting) return
var/mob/M = G.affecting
- if (M.client)
+ if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
- src.occupant = M
+ occupant = M
- src.add_fingerprint(user)
+ add_fingerprint(user)
qdel(G)
- src.updateUsrDialog()
+ updateUsrDialog()
return
else if(istype(I,/obj/item/weapon/screwdriver))
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance panel."
- src.updateUsrDialog()
+ updateUsrDialog()
return
else if(istype(I,/obj/item/clothing/head/helmet/space) && !istype(I, /obj/item/clothing/head/helmet/space/rig))
@@ -720,8 +715,8 @@
I.loc = src
helmet = I
- src.update_icon()
- src.updateUsrDialog()
+ update_icon()
+ updateUsrDialog()
return
else if(istype(I,/obj/item/clothing/suit/space/void))
@@ -743,8 +738,8 @@
I.loc = src
suit = I
- src.update_icon()
- src.updateUsrDialog()
+ update_icon()
+ updateUsrDialog()
return
..()
@@ -756,13 +751,13 @@
//Clear the access reqs, disable the safeties, and open up all paintjobs.
user << "You run the sequencer across the interface, corrupting the operating protocols."
- departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
+ departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","^%###^%$")
species = list("Human","Tajara","Skrell","Unathi", "Teshari")
emagged = 1
safeties = 0
req_access = list()
- src.updateUsrDialog()
+ updateUsrDialog()
return 1
/obj/machinery/suit_cycler/attack_hand(mob/user as mob)
@@ -776,19 +771,19 @@
return 0
if(electrified != 0)
- if(src.shock(user, 100))
+ if(shock(user, 100))
return
usr.set_machine(src)
var/dat = "Suit Cycler Interface"
- if(src.active)
+ if(active)
dat+= "
The [model_text ? "[model_text] " : ""]suit cycler is currently in use. Please wait..."
else if(locked)
dat += "
The [model_text ? "[model_text] " : ""]suit cycler is currently locked. Please contact your system administrator."
- if(src.allowed(usr))
+ if(allowed(usr))
dat += "
\[unlock unit\]"
else
dat += "Suit cycler
"
@@ -857,7 +852,7 @@
else if(href_list["toggle_lock"])
- if(src.allowed(usr))
+ if(allowed(usr))
locked = !locked
usr << "You [locked ? "" : "un"]lock \the [src]."
else
@@ -871,7 +866,7 @@
active = 1
irradiating = 10
- src.updateUsrDialog()
+ updateUsrDialog()
sleep(10)
@@ -887,7 +882,7 @@
if(radiation_level > 1)
suit.clean_blood()
- src.updateUsrDialog()
+ updateUsrDialog()
return
/obj/machinery/suit_cycler/process()
@@ -924,7 +919,7 @@
T.visible_message("\icon[src]The [src] pings loudly.")
icon_state = initial(icon_state)
active = 0
- src.updateUsrDialog()
+ updateUsrDialog()
/obj/machinery/suit_cycler/proc/repair_suit()
if(!suit || !suit.damage || !suit.can_breach)
@@ -940,7 +935,7 @@
set category = "Object"
set src in oview(1)
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
eject_occupant(usr)
@@ -951,10 +946,10 @@
user << "The cycler is locked."
return
- if (!occupant)
+ if(!occupant)
return
- if (occupant.client)
+ if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
@@ -962,8 +957,8 @@
occupant = null
add_fingerprint(usr)
- src.updateUsrDialog()
- src.update_icon()
+ updateUsrDialog()
+ update_icon()
return
@@ -1023,6 +1018,24 @@
suit.name = "atmospherics voidsuit"
suit.icon_state = "rig-atmos"
suit.item_state = "atmos_voidsuit"
+ if("HAZMAT")
+ if(helmet)
+ helmet.name = "HAZMAT voidsuit helmet"
+ helmet.icon_state = "rig0-engineering_rad"
+ helmet.item_state = "rig0-engineering_rad"
+ if(suit)
+ suit.name = "HAZMAT voidsuit"
+ suit.icon_state = "rig-engineering_rad"
+ suit.item_state = "eng_voidsuit_rad"
+ if("Construction")
+ if(helmet)
+ helmet.name = "Construction voidsuit helmet"
+ helmet.icon_state = "rig0-engineering_con"
+ helmet.item_state = "rig0-engineering_con"
+ if(suit)
+ suit.name = "Construction voidsuit"
+ suit.icon_state = "rig-engineering_con"
+ suit.item_state = "eng_voidsuit_con"
if("^%###^%$" || "Mercenary")
if(helmet)
helmet.name = "blood-red voidsuit helmet"
diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm
index 97e747c0db..d1be70e754 100644
--- a/code/game/machinery/supply_display.dm
+++ b/code/game/machinery/supply_display.dm
@@ -7,14 +7,14 @@
message2 = ""
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
- if (!shuttle)
+ if(!shuttle)
message2 = "Error"
else if(shuttle.has_arrive_time())
message2 = get_supply_shuttle_timer()
if(lentext(message2) > CHARS_PER_LINE)
message2 = "Error"
- else if (shuttle.is_launching())
- if (shuttle.at_station())
+ else if(shuttle.is_launching())
+ if(shuttle.at_station())
message2 = "Launch"
else
message2 = "ETA"
diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm
index 77e5887099..fae062ffed 100644
--- a/code/game/machinery/supplybeacon.dm
+++ b/code/game/machinery/supplybeacon.dm
@@ -111,9 +111,9 @@
target_drop_time = world.time + drop_delay
else if(world.time >= target_drop_time)
deactivate(permanent = 1)
- var/drop_x = src.x-2
- var/drop_y = src.y-2
+ var/drop_x = src.x - 2
+ var/drop_y = src.y - 2
var/drop_z = src.z
command_announcement.Announce(starsys_name+" Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] recieved. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage")
- spawn(rand(100,300))
+ spawn(rand(100, 300))
new /datum/random_map/droppod/supply(null, drop_x, drop_y, drop_z, supplied_drop = drop_type) // Splat.
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 99d713cccb..2f53931312 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -5,16 +5,13 @@
// If he accepts there is a random chance he will be accepted, rejected, or rejected and killed
// Bringing certain items can help improve the chance to become a traitor
-
/obj/machinery/syndicate_beacon
name = "ominous beacon"
desc = "This looks suspicious..."
icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon"
-
anchored = 1
density = 1
-
var/temptext = ""
var/selfdestructing = 0
var/charges = 1
@@ -43,18 +40,18 @@
return
if(href_list["betraitor"])
if(charges < 1)
- src.updateUsrDialog()
+ updateUsrDialog()
return
var/mob/M = locate(href_list["traitormob"])
if(M.mind.special_role || jobban_isbanned(M, "Syndicate"))
temptext = "We have no need for you at this time. Have a pleasant day.
"
- src.updateUsrDialog()
+ updateUsrDialog()
return
charges -= 1
switch(rand(1,2))
if(1)
temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind."
- src.updateUsrDialog()
+ updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
if(istype(M, /mob/living/carbon/human))
@@ -64,11 +61,9 @@
traitors.equip(N)
message_admins("[N]/([N.ckey]) has accepted a traitor objective from a syndicate beacon.")
-
- src.updateUsrDialog()
+ updateUsrDialog()
return
-
/obj/machinery/syndicate_beacon/proc/selfdestruct()
selfdestructing = 1
spawn() explosion(src.loc, 1, rand(1,3), rand(3,8), 10)
@@ -90,7 +85,6 @@
var/active = 0
var/icontype = "beacon"
-
/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null)
if(surplus() < 1500)
if(user) user << "The connected wire doesn't have enough current."
@@ -104,7 +98,6 @@
if(user)
user << "You activate the beacon."
-
/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null)
for(var/obj/singularity/singulo in world)
if(singulo.target == src)
@@ -114,11 +107,9 @@
if(user)
user << "You deactivate the beacon."
-
/obj/machinery/power/singularity_beacon/attack_ai(mob/user as mob)
return
-
/obj/machinery/power/singularity_beacon/attack_hand(var/mob/user as mob)
if(anchored)
return active ? Deactivate(user) : Activate(user)
@@ -126,7 +117,6 @@
user << "You need to screw the beacon to the floor first!"
return
-
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(active)
@@ -148,7 +138,6 @@
..()
return
-
/obj/machinery/power/singularity_beacon/Destroy()
if(active)
Deactivate()
@@ -162,7 +151,6 @@
if(draw_power(1500) < 1500)
Deactivate()
-
/obj/machinery/power/singularity_beacon/syndicate
icontype = "beaconsynd"
icon_state = "beaconsynd0"
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 6d12dae5dd..90a29f95b4 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -8,10 +8,10 @@
var/obj/item/locked = null
var/id = null
var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.)
- //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
+ //Setting this to 1 will set locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
/obj/machinery/computer/teleporter/New()
- src.id = "[rand(1000, 9999)]"
+ id = "[rand(1000, 9999)]"
..()
underlays.Cut()
underlays += image('icons/obj/stationobjs.dmi', icon_state = "telecomp-wires")
@@ -36,7 +36,7 @@
if(istype(I, /obj/item/weapon/card/data/))
var/obj/item/weapon/card/data/C = I
if(stat & (NOPOWER|BROKEN) & (C.function != "teleporter"))
- src.attack_hand()
+ attack_hand()
var/obj/L = null
@@ -49,7 +49,6 @@
if(!L)
L = locate("landmark*[C.data]") // use old stype
-
if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf))
usr << "You insert the coordinates into the machine."
usr << "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times."
@@ -69,17 +68,17 @@
else
for(var/mob/O in hearers(src, null))
O.show_message("Locked In", 2)
- src.locked = L
+ locked = L
one_time_use = 1
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
else
..()
return
/obj/machinery/teleport/station/attack_ai()
- src.attack_hand()
+ attack_hand()
/obj/machinery/computer/teleporter/attack_hand(user as mob)
if(..()) return
@@ -92,7 +91,7 @@
for(var/obj/item/device/radio/beacon/R in world)
var/turf/T = get_turf(R)
- if (!T)
+ if(!T)
continue
if(!(T.z in config.player_levels))
continue
@@ -104,12 +103,12 @@
L[tmpname] = R
for (var/obj/item/weapon/implant/tracking/I in world)
- if (!I.implanted || !ismob(I.loc))
+ if(!I.implanted || !ismob(I.loc))
continue
else
var/mob/M = I.loc
- if (M.stat == 2)
- if (M.timeofdeath + 6000 < world.time)
+ if(M.stat == 2)
+ if(M.timeofdeath + 6000 < world.time)
continue
var/turf/T = get_turf(M)
if(T) continue
@@ -127,10 +126,10 @@
if(get_dist(src, usr) > 1 && !issilicon(usr))
return
- src.locked = L[desc]
+ locked = L[desc]
for(var/mob/O in hearers(src, null))
O.show_message("Locked In", 2)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
return
/obj/machinery/computer/teleporter/verb/set_id(t as text)
@@ -141,12 +140,12 @@
if(stat & (NOPOWER|BROKEN) || !istype(usr,/mob/living))
return
- if (t)
- src.id = t
+ if(t)
+ id = t
return
/proc/find_loc(obj/R as obj)
- if (!R) return null
+ if(!R) return null
var/turf/T = R.loc
while(!istype(T, /turf))
T = T.loc
@@ -160,7 +159,6 @@
anchored = 1.0
var/lockeddown = 0
-
/obj/machinery/teleport/hub
name = "teleporter hub"
desc = "It's the hub of a teleporting machine."
@@ -173,13 +171,11 @@
circuit = /obj/item/weapon/circuitboard/teleporter_hub
var/obj/machinery/computer/teleporter/com
-
/obj/machinery/teleport/hub/New()
..()
underlays.Cut()
underlays += image('icons/obj/stationobjs.dmi', icon_state = "tele-wires")
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
@@ -194,19 +190,19 @@
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
spawn()
- if (src.icon_state == "tele1")
+ if(icon_state == "tele1")
teleport(M)
use_power(5000)
return
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj)
- if (!com)
+ if(!com)
return
- if (!com.locked)
+ if(!com.locked)
for(var/mob/O in hearers(src, null))
O.show_message("Failure: Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.")
return
- if (istype(M, /atom/movable))
+ if(istype(M, /atom/movable))
if(prob(5) && !accurate) //oh dear a problem, put em in deep space
do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2)
else
@@ -229,61 +225,60 @@
if(istype(M, /obj/effect))
qdel(M)
return
- if (istype(M, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
+ if(istype(M, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
for(var/mob/O in viewers(M, null))
O.show_message(text("The [] bounces off of the portal!", M.name), 1)
return
- if (istype(M, /mob/living))
+ if(istype(M, /mob/living))
var/mob/living/MM = M
if(MM.check_contents_for(/obj/item/weapon/disk/nuclear))
MM << "Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."
return
var/disky = 0
for (var/atom/O in M.contents) //I'm pretty sure this accounts for the maximum amount of container in container stacking. --NeoFite
- if (istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
+ if(istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
for (var/obj/OO in O.contents)
- if (istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
+ if(istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
for (var/obj/OOO in OO.contents)
- if (istype(OOO, /obj/item/weapon/disk/nuclear))
+ if(istype(OOO, /obj/item/weapon/disk/nuclear))
disky = 1
- if (istype(OO, /obj/item/weapon/disk/nuclear))
+ if(istype(OO, /obj/item/weapon/disk/nuclear))
disky = 1
- if (istype(O, /obj/item/weapon/disk/nuclear))
+ if(istype(O, /obj/item/weapon/disk/nuclear))
disky = 1
- if (istype(O, /mob/living))
+ if(istype(O, /mob/living))
var/mob/living/MM = O
if(MM.check_contents_for(/obj/item/weapon/disk/nuclear))
disky = 1
- if (disky)
+ if(disky)
for(var/mob/P in viewers(M, null))
P.show_message(text("The [] bounces off of the portal!", M.name), 1)
return
//Bags of Holding cause bluespace teleportation to go funky. --NeoFite
- if (istype(M, /mob/living))
+ if(istype(M, /mob/living))
var/mob/living/MM = M
if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding))
MM << "The Bluespace interface on your Bag of Holding interferes with the teleport!"
precision = rand(1,100)
- if (istype(M, /obj/item/weapon/storage/backpack/holding))
+ if(istype(M, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
for (var/atom/O in M.contents) //I'm pretty sure this accounts for the maximum amount of container in container stacking. --NeoFite
- if (istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
+ if(istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift))
for (var/obj/OO in O.contents)
- if (istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
+ if(istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift))
for (var/obj/OOO in OO.contents)
- if (istype(OOO, /obj/item/weapon/storage/backpack/holding))
+ if(istype(OOO, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
- if (istype(OO, /obj/item/weapon/storage/backpack/holding))
+ if(istype(OO, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
- if (istype(O, /obj/item/weapon/storage/backpack/holding))
+ if(istype(O, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
- if (istype(O, /mob/living))
+ if(istype(O, /mob/living))
var/mob/living/MM = O
if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
-
var/turf/destturf = get_turf(destination)
var/tx = destturf.x + rand(precision * -1, precision)
@@ -291,7 +286,7 @@
var/tmploc
- if (ismob(destination.loc)) //If this is an implant.
+ if(ismob(destination.loc)) //If this is an implant.
tmploc = locate(tx, ty, destturf.z)
else
tmploc = locate(tx, ty, destination.z)
@@ -329,7 +324,6 @@
overlays.Cut()
overlays += image('icons/obj/stationobjs.dmi', icon_state = "controller-wires")
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
@@ -338,45 +332,45 @@
RefreshParts()
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W)
- src.attack_hand()
+ attack_hand()
/obj/machinery/teleport/station/attack_ai()
- src.attack_hand()
+ attack_hand()
/obj/machinery/teleport/station/attack_hand()
if(engaged)
- src.disengage()
+ disengage()
else
- src.engage()
+ engage()
/obj/machinery/teleport/station/proc/engage()
if(stat & (BROKEN|NOPOWER))
return
- if (com)
+ if(com)
com.icon_state = "tele1"
use_power(5000)
update_use_power(2)
com.update_use_power(2)
for(var/mob/O in hearers(src, null))
O.show_message("Teleporter engaged!", 2)
- src.add_fingerprint(usr)
- src.engaged = 1
+ add_fingerprint(usr)
+ engaged = 1
return
/obj/machinery/teleport/station/proc/disengage()
if(stat & (BROKEN|NOPOWER))
return
- if (com)
+ if(com)
com.icon_state = "tele0"
com.accurate = 0
com.update_use_power(1)
update_use_power(1)
for(var/mob/O in hearers(src, null))
O.show_message("Teleporter disengaged!", 2)
- src.add_fingerprint(usr)
- src.engaged = 0
+ add_fingerprint(usr)
+ engaged = 0
return
/obj/machinery/teleport/station/verb/testfire()
@@ -387,7 +381,7 @@
if(stat & (BROKEN|NOPOWER) || !istype(usr,/mob/living))
return
- if (com && !active)
+ if(com && !active)
active = 1
for(var/mob/O in hearers(src, null))
O.show_message("Test firing!", 2)
@@ -397,7 +391,7 @@
spawn(30)
active=0
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
return
/obj/machinery/teleport/station/power_change()
@@ -412,11 +406,11 @@
/obj/effect/laser/Bump()
- src.range--
+ range--
return
/obj/effect/laser/Move()
- src.range--
+ range--
return
/atom/proc/laserhit(L as obj)
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 967b7799ed..17797e2a68 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -85,7 +85,7 @@
return
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
- if(src.allowed(usr))
+ if(allowed(usr))
if(emagged)
user << "The turret control is unresponsive."
else
@@ -133,7 +133,7 @@
data["settings"] = settings
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
@@ -193,8 +193,8 @@
if(stat & NOPOWER)
icon_state = "control_off"
set_light(0)
- else if (enabled)
- if (lethal)
+ else if(enabled)
+ if(lethal)
icon_state = "control_kill"
set_light(1.5, 1,"#990000")
else
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 2cf5347edb..79e262664c 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -68,18 +68,18 @@
..()
wires = new(src)
spawn(4)
- if(src.product_slogans)
- src.slogan_list += splittext(src.product_slogans, ";")
+ if(product_slogans)
+ slogan_list += splittext(product_slogans, ";")
// So not all machines speak at the exact same time.
// The first time this machine says something will be at slogantime + this random value,
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
- src.last_slogan = world.time + rand(0, slogan_delay)
+ last_slogan = world.time + rand(0, slogan_delay)
- if(src.product_ads)
- src.ads_list += splittext(src.product_ads, ";")
+ if(product_ads)
+ ads_list += splittext(product_ads, ";")
- src.build_inventory()
+ build_inventory()
power_change()
return
@@ -87,17 +87,17 @@
return
/**
- * Build src.produdct_records from the products lists
+ * Build produdct_records from the products lists
*
- * src.products, src.contraband, src.premium, and src.prices allow specifying
+ * products, contraband, premium, and prices allow specifying
* products that the vending machine is to carry without manually populating
- * src.product_records.
+ * product_records.
*/
/obj/machinery/vending/proc/build_inventory()
var/list/all_products = list(
- list(src.products, CAT_NORMAL),
- list(src.contraband, CAT_HIDDEN),
- list(src.premium, CAT_COIN))
+ list(products, CAT_NORMAL),
+ list(contraband, CAT_HIDDEN),
+ list(premium, CAT_COIN))
for(var/current_list in all_products)
var/category = current_list[2]
@@ -105,11 +105,11 @@
for(var/entry in current_list[1])
var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, entry)
- product.price = (entry in src.prices) ? src.prices[entry] : 0
+ product.price = (entry in prices) ? prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
- src.product_records.Add(product)
+ product_records.Add(product)
/obj/machinery/vending/Destroy()
qdel(wires)
@@ -127,21 +127,21 @@
qdel(src)
return
if(2.0)
- if (prob(50))
+ if(prob(50))
qdel(src)
return
if(3.0)
- if (prob(25))
+ if(prob(25))
spawn(0)
- src.malfunction()
+ malfunction()
return
return
else
return
/obj/machinery/vending/emag_act(var/remaining_charges, var/mob/user)
- if (!emagged)
- src.emagged = 1
+ if(!emagged)
+ emagged = 1
user << "You short out the product lock on \the [src]"
return 1
@@ -149,43 +149,43 @@
var/obj/item/weapon/card/id/I = W.GetID()
- if (currently_vending && vendor_account && !vendor_account.suspended)
+ if(currently_vending && vendor_account && !vendor_account.suspended)
var/paid = 0
var/handled = 0
- if (I) //for IDs and PDAs and wallets with IDs
+ if(I) //for IDs and PDAs and wallets with IDs
paid = pay_with_card(I,W)
handled = 1
- else if (istype(W, /obj/item/weapon/spacecash/ewallet))
+ else if(istype(W, /obj/item/weapon/spacecash/ewallet))
var/obj/item/weapon/spacecash/ewallet/C = W
paid = pay_with_ewallet(C)
handled = 1
- else if (istype(W, /obj/item/weapon/spacecash))
+ else if(istype(W, /obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/C = W
paid = pay_with_cash(C, user)
handled = 1
if(paid)
- src.vend(currently_vending, usr)
+ vend(currently_vending, usr)
return
else if(handled)
nanomanager.update_uis(src)
return // don't smack that machine with your 2 thalers
- if (I || istype(W, /obj/item/weapon/spacecash))
+ if(I || istype(W, /obj/item/weapon/spacecash))
attack_hand(user)
return
else if(istype(W, /obj/item/weapon/screwdriver))
- src.panel_open = !src.panel_open
- user << "You [src.panel_open ? "open" : "close"] the maintenance panel."
- src.overlays.Cut()
- if(src.panel_open)
- src.overlays += image(src.icon, "[initial(icon_state)]-panel")
+ panel_open = !panel_open
+ user << "You [panel_open ? "open" : "close"] the maintenance panel."
+ overlays.Cut()
+ if(panel_open)
+ overlays += image(icon, "[initial(icon_state)]-panel")
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
return
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
- if(src.panel_open)
+ if(panel_open)
attack_hand(user)
return
else if(istype(W, /obj/item/weapon/coin) && premium.len > 0)
@@ -197,7 +197,7 @@
nanomanager.update_uis(src)
return
else if(istype(W, /obj/item/weapon/wrench))
- playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
+ playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
if(anchored)
user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
@@ -253,8 +253,8 @@
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
visible_message("\The [usr] swipes \the [wallet] through \the [src].")
if(currently_vending.price > wallet.worth)
- src.status_message = "Insufficient funds on chargecard."
- src.status_error = 1
+ status_message = "Insufficient funds on chargecard."
+ status_error = 1
return 0
else
wallet.worth -= currently_vending.price
@@ -273,14 +273,14 @@
else
visible_message("\The [usr] swipes \the [ID_container] through \the [src].")
var/datum/money_account/customer_account = get_account(I.associated_account_number)
- if (!customer_account)
- src.status_message = "Error: Unable to access account. Please contact technical support if problem persists."
- src.status_error = 1
+ if(!customer_account)
+ status_message = "Error: Unable to access account. Please contact technical support if problem persists."
+ status_error = 1
return 0
if(customer_account.suspended)
- src.status_message = "Unable to access account: account suspended."
- src.status_error = 1
+ status_message = "Unable to access account: account suspended."
+ status_error = 1
return 0
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
@@ -290,13 +290,13 @@
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
- src.status_message = "Unable to access account: incorrect credentials."
- src.status_error = 1
+ status_message = "Unable to access account: incorrect credentials."
+ status_error = 1
return 0
if(currently_vending.price > customer_account.money)
- src.status_message = "Insufficient funds in account."
- src.status_error = 1
+ status_message = "Insufficient funds in account."
+ status_error = 1
return 0
else
// Okay to move the money at this point
@@ -306,13 +306,13 @@
// create entry in the purchaser's account log
var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [src.name])"
+ T.target_name = "[vendor_account.owner_name] (via [name])"
T.purpose = "Purchase of [currently_vending.item_name]"
if(currently_vending.price > 0)
T.amount = "([currently_vending.price])"
else
T.amount = "[currently_vending.price]"
- T.source_terminal = src.name
+ T.source_terminal = name
T.date = current_date_string
T.time = stationtime2text()
customer_account.transaction_log.Add(T)
@@ -335,7 +335,7 @@
T.target_name = target
T.purpose = "Purchase of [currently_vending.item_name]"
T.amount = "[currently_vending.price]"
- T.source_terminal = src.name
+ T.source_terminal = name
T.date = current_date_string
T.time = stationtime2text()
vendor_account.transaction_log.Add(T)
@@ -347,8 +347,8 @@
if(stat & (BROKEN|NOPOWER))
return
- if(src.seconds_electrified != 0)
- if(src.shock(user, 100))
+ if(seconds_electrified != 0)
+ if(shock(user, 100))
return
wires.Interact(user)
@@ -368,16 +368,16 @@
data["product"] = currently_vending.item_name
data["price"] = currently_vending.price
data["message_err"] = 0
- data["message"] = src.status_message
- data["message_err"] = src.status_error
+ data["message"] = status_message
+ data["message_err"] = status_error
else
data["mode"] = 0
var/list/listed_products = list()
- for(var/key = 1 to src.product_records.len)
- var/datum/stored_item/vending_product/I = src.product_records[key]
+ for(var/key = 1 to product_records.len)
+ var/datum/stored_item/vending_product/I = product_records[key]
- if(!(I.category & src.categories))
+ if(!(I.category & categories))
continue
listed_products.Add(list(list(
@@ -389,18 +389,18 @@
data["products"] = listed_products
- if(src.coin)
- data["coin"] = src.coin.name
+ if(coin)
+ data["coin"] = coin.name
- if(src.panel_open)
+ if(panel_open)
data["panel"] = 1
- data["speaker"] = src.shut_up ? 0 : 1
+ data["speaker"] = shut_up ? 0 : 1
else
data["panel"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
- ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
+ if(!ui)
+ ui = new(user, src, ui_key, "vending_machine.tmpl", name, 440, 600)
ui.set_initial_data(data)
ui.open()
@@ -422,8 +422,8 @@
coin = null
categories &= ~CAT_COIN
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
- if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending))
+ if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
+ if((href_list["vend"]) && (vend_ready) && (!currently_vending))
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
usr << "Access denied." //Unless emagged of course
flick(icon_deny,src)
@@ -433,43 +433,43 @@
var/datum/stored_item/vending_product/R = product_records[key]
// This should not happen unless the request from NanoUI was bad
- if(!(R.category & src.categories))
+ if(!(R.category & categories))
return
if(R.price <= 0)
- src.vend(R, usr)
+ vend(R, usr)
else if(istype(usr,/mob/living/silicon)) //If the item is not free, provide feedback if a synth is trying to buy something.
usr << "Artificial unit recognized. Artificial units cannot complete this transaction. Purchase canceled."
return
else
- src.currently_vending = R
+ currently_vending = R
if(!vendor_account || vendor_account.suspended)
- src.status_message = "This machine is currently unable to process payments due to problems with the associated account."
- src.status_error = 1
+ status_message = "This machine is currently unable to process payments due to problems with the associated account."
+ status_error = 1
else
- src.status_message = "Please swipe a card or insert cash to pay for the item."
- src.status_error = 0
+ status_message = "Please swipe a card or insert cash to pay for the item."
+ status_error = 0
- else if (href_list["cancelpurchase"])
- src.currently_vending = null
+ else if(href_list["cancelpurchase"])
+ currently_vending = null
- else if ((href_list["togglevoice"]) && (src.panel_open))
- src.shut_up = !src.shut_up
+ else if((href_list["togglevoice"]) && (panel_open))
+ shut_up = !shut_up
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
nanomanager.update_uis(src)
/obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user)
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
usr << "Access denied." //Unless emagged of course
- flick(src.icon_deny,src)
+ flick(icon_deny,src)
return
- src.vend_ready = 0 //One thing at a time!!
- src.status_message = "Vending..."
- src.status_error = 0
+ vend_ready = 0 //One thing at a time!!
+ status_message = "Vending..."
+ status_error = 0
nanomanager.update_uis(src)
- if (R.category & CAT_COIN)
+ if(R.category & CAT_COIN)
if(!coin)
user << "You need to insert a coin to get this item."
return
@@ -486,24 +486,24 @@
coin = null
categories &= ~CAT_COIN
- if(((src.last_reply + (src.vend_delay + 200)) <= world.time) && src.vend_reply)
+ if(((last_reply + (vend_delay + 200)) <= world.time) && vend_reply)
spawn(0)
- src.speak(src.vend_reply)
- src.last_reply = world.time
+ speak(vend_reply)
+ last_reply = world.time
use_power(vend_power_usage) //actuators and stuff
- if (src.icon_vend) //Show the vending animation if needed
- flick(src.icon_vend,src)
- spawn(src.vend_delay)
+ if(icon_vend) //Show the vending animation if needed
+ flick(icon_vend,src)
+ spawn(vend_delay)
R.get_product(get_turf(src))
if(prob(1))
sleep(3)
if(R.get_product(get_turf(src)))
- src.visible_message("\The [src] clunks as it vends an additional item.")
+ visible_message("\The [src] clunks as it vends an additional item.")
- src.status_message = ""
- src.status_error = 0
- src.vend_ready = 1
+ status_message = ""
+ status_error = 0
+ vend_ready = 1
currently_vending = null
nanomanager.update_uis(src)
@@ -527,20 +527,20 @@
if(stat & (BROKEN|NOPOWER))
return
- if(!src.active)
+ if(!active)
return
- if(src.seconds_electrified > 0)
- src.seconds_electrified--
+ if(seconds_electrified > 0)
+ seconds_electrified--
//Pitch to the people! Really sell it!
- if(((src.last_slogan + src.slogan_delay) <= world.time) && (src.slogan_list.len > 0) && (!src.shut_up) && prob(5))
- var/slogan = pick(src.slogan_list)
- src.speak(slogan)
- src.last_slogan = world.time
+ if(((last_slogan + slogan_delay) <= world.time) && (slogan_list.len > 0) && (!shut_up) && prob(5))
+ var/slogan = pick(slogan_list)
+ speak(slogan)
+ last_slogan = world.time
- if(src.shoot_inventory && prob(2))
- src.throw_item()
+ if(shoot_inventory && prob(2))
+ throw_item()
return
@@ -548,7 +548,7 @@
if(stat & NOPOWER)
return
- if (!message)
+ if(!message)
return
for(var/mob/O in hearers(src, null))
@@ -560,21 +560,21 @@
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
else
- if( !(stat & NOPOWER) )
+ if(!(stat & NOPOWER))
icon_state = initial(icon_state)
else
spawn(rand(0, 15))
- src.icon_state = "[initial(icon_state)]-off"
+ icon_state = "[initial(icon_state)]-off"
//Oh no we're malfunctioning! Dump out some product and break.
/obj/machinery/vending/proc/malfunction()
- for(var/datum/stored_item/vending_product/R in src.product_records)
+ for(var/datum/stored_item/vending_product/R in product_records)
while(R.get_amount()>0)
R.get_product(loc)
break
stat |= BROKEN
- src.icon_state = "[initial(icon_state)]-broken"
+ icon_state = "[initial(icon_state)]-broken"
return
//Somebody cut an important wire and now we're following a new definition of "pitch."
@@ -584,16 +584,16 @@
if(!target)
return 0
- for(var/datum/stored_item/vending_product/R in src.product_records)
+ for(var/datum/stored_item/vending_product/R in product_records)
throw_item = R.get_product(loc)
- if (!throw_item)
+ if(!throw_item)
continue
break
- if (!throw_item)
+ if(!throw_item)
return 0
spawn(0)
throw_item.throw_at(target, 16, 3, src)
- src.visible_message("\The [src] launches \a [throw_item] at \the [target]!")
+ visible_message("\The [src] launches \a [throw_item] at \the [target]!")
return 1
/*
@@ -776,6 +776,8 @@
vend_delay = 34
icon_state = "cigs"
products = list(/obj/item/weapon/storage/fancy/cigarettes = 5,
+ /obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 5,
+ /obj/item/weapon/storage/fancy/cigarettes/killthroat = 5,
/obj/item/weapon/storage/fancy/cigarettes/luckystars = 5,
/obj/item/weapon/storage/fancy/cigarettes/jerichos = 5,
/obj/item/weapon/storage/fancy/cigarettes/menthols = 5,
@@ -785,7 +787,9 @@
premium = list(/obj/item/weapon/storage/fancy/cigar = 5,
/obj/item/weapon/storage/fancy/cigarettes/carcinomas = 5,
/obj/item/weapon/storage/fancy/cigarettes/professionals = 5)
- prices = list(/obj/item/weapon/storage/fancy/cigarettes = 15,
+ prices = list(/obj/item/weapon/storage/fancy/cigarettes = 12,
+ /obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 15,
+ /obj/item/weapon/storage/fancy/cigarettes/killthroat = 17,
/obj/item/weapon/storage/fancy/cigarettes/luckystars = 17,
/obj/item/weapon/storage/fancy/cigarettes/jerichos = 22,
/obj/item/weapon/storage/fancy/cigarettes/menthols = 18,
@@ -885,9 +889,9 @@
*/
/obj/machinery/vending/hydroseeds/build_inventory()
var/list/all_products = list(
- list(src.products, CAT_NORMAL),
- list(src.contraband, CAT_HIDDEN),
- list(src.premium, CAT_COIN))
+ list(products, CAT_NORMAL),
+ list(contraband, CAT_HIDDEN),
+ list(premium, CAT_COIN))
for(var/current_list in all_products)
var/category = current_list[2]
@@ -897,11 +901,11 @@
var/name = S.name
var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, entry, name)
- product.price = (entry in src.prices) ? src.prices[entry] : 0
+ product.price = (entry in prices) ? prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
- src.product_records.Add(product)
+ product_records.Add(product)
/obj/machinery/vending/magivend
name = "MagiVend"
@@ -961,7 +965,7 @@
/obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5,
/obj/item/device/flashlight/glowstick = 3, /obj/item/device/flashlight/glowstick/red = 3, /obj/item/device/flashlight/glowstick/blue = 3,
/obj/item/device/flashlight/glowstick/orange =3, /obj/item/device/flashlight/glowstick/yellow = 3)
- contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2, )
+ contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2,)
premium = list(/obj/item/clothing/gloves/yellow = 1)
/obj/machinery/vending/engivend
diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm
index 701d4ebab2..3a036eec8e 100644
--- a/code/game/machinery/wall_frames.dm
+++ b/code/game/machinery/wall_frames.dm
@@ -4,136 +4,96 @@
icon = 'icons/obj/stock_parts.dmi'
icon_state = "frame_bitem"
flags = CONDUCT
- var/build_machine_type = /obj/structure/frame
+ var/build_machine_type
var/refund_amt = 5
var/refund_type = /obj/item/stack/material/steel
var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures)
- var/frame_type = null
+ var/list/frame_types_floor
+ var/list/frame_types_wall
+
+/obj/item/frame/proc/update_type_list()
+ if(!frame_types_floor)
+ frame_types_floor = construction_frame_floor
+ if(!frame_types_wall)
+ frame_types_wall = construction_frame_wall
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/wrench))
- new refund_type( get_turf(src.loc), refund_amt)
+ if(istype(W, /obj/item/weapon/wrench))
+ new refund_type(get_turf(src.loc), refund_amt)
qdel(src)
return
..()
/obj/item/frame/attack_self(mob/user as mob)
..()
+ update_type_list()
+ var/datum/frame/frame_types/frame_type
if(!build_machine_type)
- return
-
- if(!frame_type)
- var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Computer", "Machine", "Holopad", "Conveyor",
- "Photocopier", "Fax", "Microwave",
- "Recharger", "Washing Machine", "Grinder",
- "Medical Console", "Medical Pod", "DNA Analyzer",
- "Mass Driver",
- "Cancel")
-
- if(response == "Cancel")
+ var/datum/frame/frame_types/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in frame_types_floor
+ if(!response || response.name == "Cancel")
return
+ frame_type = response
- frame_type = lowertext(response)
+ build_machine_type = /obj/structure/frame
- switch(response)
- if("Holopad")
- new /obj/item/stack/material/steel( usr.loc, 1 ) //holopads are smaller, they only need 4 sheets
- if("Fax")
- new /obj/item/stack/material/steel( usr.loc, 2 ) //faxes are smaller, they only need 3 sheets
- if("Microwave")
- new /obj/item/stack/material/steel( usr.loc, 1 ) //microwaves are smaller, they only need 4 sheets
- if("Recharger")
- new /obj/item/stack/material/steel( usr.loc, 2 ) //rechargers are smaller, they only need 3 sheets
- if("Washing Machine")
- frame_type = "washing"
- if("Grinder")
- new /obj/item/stack/material/steel( usr.loc, 2 ) //grinders are smaller, they only need 3 sheets
- if("Medical Console")
- frame_type = "console"
- if("Medical Pod")
- frame_type = "medpod"
- if("DNA Analyzer")
- frame_type = "dna_analyzer"
- if("Mass Driver")
- frame_type = "massdriver"
+ if(frame_type.frame_size != 5)
+ new /obj/item/stack/material/steel(usr.loc, (5 - frame_type.frame_size))
var/ndir
ndir = usr.dir
- if (!(ndir in cardinal))
+ if(!(ndir in cardinal))
return
var/obj/machinery/M = new build_machine_type(get_turf(src.loc), ndir, 1, frame_type)
- M.fingerprints = src.fingerprints
- M.fingerprintshidden = src.fingerprintshidden
- M.fingerprintslast = src.fingerprintslast
+ M.fingerprints = fingerprints
+ M.fingerprintshidden = fingerprintshidden
+ M.fingerprintslast = fingerprintslast
qdel(src)
/obj/item/frame/proc/try_build(turf/on_wall, mob/user as mob)
- if(!frame_type)
- var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Fire Alarm", "Air Alarm", "Display", "Newscaster",
- "ATM", "Guest Pass Console", "Intercom", "Keycard Authenticator",
- "Wall Charger", "Supply Request Console",
- "Cancel")
-
- if(response == "Cancel")
- return
-
- frame_type = lowertext(response)
-
- switch(response)
- if("Fire Alarm")
- frame_type = "firealarm"
- new /obj/item/stack/material/steel( usr.loc, 3 ) //fire alarms are smaller, they only need 2 sheets
- if("Air Alarm")
- frame_type = "airalarm"
- new /obj/item/stack/material/steel( usr.loc, 3 ) //air alarms are smaller, they only need 2 sheets
- if("Intercom")
- new /obj/item/stack/material/steel( usr.loc, 3 ) //intercoms are smaller, they only need 2 sheets
- if("Newscaster")
- new /obj/item/stack/material/steel( usr.loc, 2 ) //newscasters are smaller, they only need 3 sheets
- if("Guest Pass Console")
- frame_type = "guestpass"
- new /obj/item/stack/material/steel( usr.loc, 3 ) //guestpass consoles are smaller, they only need 2 sheets
- if("Keycard Authenticator")
- frame_type = "keycard"
- new /obj/item/stack/material/steel( usr.loc, 4 ) //keycard authenticators are smaller, they only need 1 sheets
- if("Wall Charger")
- frame_type = "wrecharger"
- new /obj/item/stack/material/steel( usr.loc, 2 ) //wall rechargers are smaller, they only need 3 sheets
- if("Supply Request Console")
- frame_type = "request"
-
+ update_type_list()
+ var/datum/frame/frame_types/frame_type
if(!build_machine_type)
- return
+ var/datum/frame/frame_types/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in frame_types_wall
+ if(!response || response.name == "Cancel")
+ return
+ frame_type = response
- if (get_dist(on_wall,usr)>1)
+ build_machine_type = /obj/structure/frame
+
+ if(frame_type.frame_size != 5)
+ new /obj/item/stack/material/steel(usr.loc, (5 - frame_type.frame_size))
+
+ if(get_dist(on_wall, usr)>1)
return
var/ndir
if(reverse)
- ndir = get_dir(usr,on_wall)
+ ndir = get_dir(usr, on_wall)
else
- ndir = get_dir(on_wall,usr)
+ ndir = get_dir(on_wall, usr)
- if (!(ndir in cardinal))
+ if(!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
- if (!istype(loc, /turf/simulated/floor))
+ if(!istype(loc, /turf/simulated/floor))
usr << "\The frame cannot be placed on this spot."
return
- if (A.requires_power == 0 || A.name == "Space")
+
+ if(A.requires_power == 0 || A.name == "Space")
usr << "\The [src] Alarm cannot be placed in this area."
return
if(gotwallitem(loc, ndir))
usr << "There's already an item on this wall!"
return
+
var/obj/machinery/M = new build_machine_type(loc, ndir, 1, frame_type)
- M.fingerprints = src.fingerprints
- M.fingerprintshidden = src.fingerprintshidden
- M.fingerprintslast = src.fingerprintslast
+ M.fingerprints = fingerprints
+ M.fingerprintshidden = fingerprintshidden
+ M.fingerprintslast = fingerprintslast
qdel(src)
/obj/item/frame/light
@@ -143,14 +103,12 @@
icon_state = "tube-construct-item"
build_machine_type = /obj/machinery/light_construct
reverse = 1
- frame_type = 1
/obj/item/frame/light/small
name = "small light fixture frame"
icon_state = "bulb-construct-item"
refund_amt = 1
build_machine_type = /obj/machinery/light_construct/small
- frame_type = 1
/obj/item/frame/extinguisher_cabinet
name = "extinguisher cabinet frame"
@@ -159,7 +117,6 @@
icon_state = "extinguisher_empty"
refund_amt = 4
build_machine_type = /obj/structure/extinguisher_cabinet
- frame_type = 1
/obj/item/frame/noticeboard
name = "noticeboard frame"
@@ -169,7 +126,6 @@
refund_amt = 4
refund_type = /obj/item/stack/material/wood
build_machine_type = /obj/structure/noticeboard
- frame_type = 1
/obj/item/frame/mirror
name = "mirror frame"
@@ -178,7 +134,6 @@
icon_state = "mirror_frame"
refund_amt = 1
build_machine_type = /obj/structure/mirror
- frame_type = 1
/obj/item/frame/fireaxe_cabinet
name = "fire axe cabinet frame"
@@ -186,5 +141,4 @@
icon = 'icons/obj/closet.dmi'
icon_state = "fireaxe0101"
refund_amt = 4
- build_machine_type = /obj/structure/closet/fireaxecabinet
- frame_type = 1
\ No newline at end of file
+ build_machine_type = /obj/structure/closet/fireaxecabinet
\ No newline at end of file
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 93d161f2ea..cf96260358 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -26,7 +26,7 @@
)
/obj/machinery/washing_machine/New()
- circuit = new circuit(src)
+ ..()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/gear(src)
@@ -41,11 +41,11 @@
if(!istype(usr, /mob/living)) //ew ew ew usr, but it's the only way to check.
return
- if( state != 4 )
+ if(state != 4)
usr << "The washing machine cannot run in this state."
return
- if( locate(/mob,washing) )
+ if(locate(/mob,washing))
state = 8
else
state = 5
@@ -63,7 +63,7 @@
WL.amount = HH.amount
qdel(HH)
- if( locate(/mob,washing) )
+ if(locate(/mob,washing))
state = 7
gibs_ready = 1
else
@@ -76,10 +76,9 @@
set src in usr.loc
sleep(20)
- if(state in list(1,3,6) )
+ if(state in list(1,3,6))
usr.loc = src.loc
-
/obj/machinery/washing_machine/update_icon()
icon_state = "wm_[state][panel_open]"
@@ -93,7 +92,7 @@
panel = !panel
user << "You [panel ? "open" : "close"] the [src]'s maintenance panel"*/
if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
- if( state in list( 1, 3, 6 ) )
+ if(state in list( 1, 3, 6))
if(!crayon)
user.drop_item()
crayon = W
@@ -103,7 +102,7 @@
else
..()
else if(istype(W,/obj/item/weapon/grab))
- if( (state == 1) && hacked)
+ if((state == 1) && hacked)
var/obj/item/weapon/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting))
G.affecting.loc = src
@@ -118,7 +117,7 @@
else if(istype(W, /obj/item/clothing))
if(washing.len < 5)
- if ( state in list(1, 3) )
+ if(state in list(1, 3))
user.drop_item()
W.loc = src
washing += W
diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm
index 71b7de64c0..e36b577e9e 100644
--- a/code/game/machinery/wishgranter.dm
+++ b/code/game/machinery/wishgranter.dm
@@ -3,11 +3,9 @@
desc = "You're not so sure about this, anymore..."
icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon"
-
use_power = 0
anchored = 1
density = 1
-
var/charges = 1
var/insisting = 0
@@ -25,7 +23,7 @@
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
- else if (!insisting)
+ else if(!insisting)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insisting++
@@ -36,22 +34,22 @@
charges--
insisting = 0
- if (!(HULK in user.mutations))
+ if(!(HULK in user.mutations))
user.mutations.Add(HULK)
- if (!(LASER in user.mutations))
+ if(!(LASER in user.mutations))
user.mutations.Add(LASER)
- if (!(XRAY in user.mutations))
+ if(!(XRAY in user.mutations))
user.mutations.Add(XRAY)
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
- if (!(COLD_RESISTANCE in user.mutations))
+ if(!(COLD_RESISTANCE in user.mutations))
user.mutations.Add(COLD_RESISTANCE)
- if (!(TK in user.mutations))
+ if(!(TK in user.mutations))
user.mutations.Add(TK)
if(!(HEAL in user.mutations))
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index 23c30d3a3d..55255d2097 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -4,6 +4,7 @@
icon = 'icons/mecha/mech_bay.dmi'
icon_state = "recharge_floor"
density = 0
+ anchored = 1
layer = TURF_LAYER + 0.1
circuit = /obj/item/weapon/circuitboard/mech_recharger
@@ -14,13 +15,11 @@
/obj/machinery/mech_recharger/New()
..()
component_parts = list()
-
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
-
RefreshParts()
/obj/machinery/mech_recharger/Crossed(var/obj/mecha/M)
@@ -50,7 +49,7 @@
..()
if(!charging)
return
- if(charging.loc != loc) // Could be qdel or teleport or something
+ if(charging.loc != src.loc) // Could be qdel or teleport or something
stop_charging()
return
var/done = 1
@@ -95,4 +94,4 @@
if(!charging)
return
- charging = null
+ charging = null
\ No newline at end of file
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index ee000d60be..da744422cf 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -27,7 +27,6 @@
/obj/machinery/mecha_part_fabricator/New()
..()
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm
index 588fd402f3..634a239d82 100644
--- a/code/game/mecha/mech_prosthetics.dm
+++ b/code/game/mecha/mech_prosthetics.dm
@@ -28,7 +28,6 @@
/obj/machinery/pros_fabricator/New()
..()
- circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index b7bb820f54..2cc8b7a64f 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -59,6 +59,15 @@
icon_state = "snow"
anchored = 1
+// Todo: Add a version that gradually reaccumulates over time by means of alpha transparency. -Spades
+/obj/effect/overlay/snow/attackby(obj/item/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/shovel))
+ user.visible_message("[user] begins to shovel away \the [src].")
+ if(do_after(user, 40))
+ user << "You have finished shoveling!"
+ qdel(src)
+ return
+
/obj/effect/overlay/snow/floor
icon_state = "snowfloor"
layer = 2.01 //Just above floor
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index e2430bb5d9..2901e4c2c9 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -80,7 +80,7 @@
flash_strength *= H.species.flash_mod
if(flash_strength > 0)
- H.confused = max(H.confused, flash_strength)
+ H.confused = max(H.confused, flash_strength + 5)
H.eye_blind = max(H.eye_blind, flash_strength)
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
H.flash_eyes()
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index cbc60670e7..4e6154189a 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -21,8 +21,8 @@
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/clonepod/connecting //same for cryopod linkage
- var/obj/machinery/connectable //Used to connect machinery, currently only used by Xenobio2.
-
+ var/obj/machinery/connectable //Used to connect machinery.
+
/obj/item/device/multitool/attack_self(mob/user)
var/clear = alert("Do you want to clear the buffers on the [src]?",, "Yes", "No",)
if(clear == "Yes")
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index fe288b470b..961286da09 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -60,7 +60,7 @@
channels = list("Command" = 1)
/obj/item/device/encryptionkey/heads/captain
- name = "captain's encryption key"
+ name = "station administrator's encryption key"
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index ce7eba21d8..9147b4f840 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -158,14 +158,14 @@
/obj/item/device/radio/headset/heads/captain
- name = "captain's headset"
+ name = "station administrator's headset"
desc = "The headset of the boss."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/captain/alt
- name = "captain's bowman headset"
+ name = "station administrator's bowman headset"
desc = "The headset of the boss."
icon_state = "com_headset_alt"
item_state = "headset"
@@ -244,14 +244,14 @@
/obj/item/device/radio/headset/heads/hop
name = "head of personnel's headset"
- desc = "The headset of the guy who will one day be captain."
+ desc = "The headset of the guy who will one day be Station Administrator."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hop
/obj/item/device/radio/headset/heads/hop/alt
name = "head of personnel's bowman headset"
- desc = "The headset of the guy who will one day be captain."
+ desc = "The headset of the guy who will one day be Station Administrator."
icon_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hop
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 7aaf609eca..4ea8837d80 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -46,6 +46,7 @@
/obj/item/device/radio/intercom/New()
..()
processing_objects += src
+ circuit = new circuit(src)
/obj/item/device/radio/intercom/department/medbay/New()
..()
@@ -84,7 +85,7 @@
attack_self(user)
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
- src.add_fingerprint(user)
+ add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
@@ -96,22 +97,20 @@
else
icon_state = "intercom"
return
- if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
+ if(wiresexposed && istype(W, /obj/item/weapon/wirecutters))
user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
- var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
- var/obj/item/weapon/circuitboard/M = new circuit( A )
- A.frame_type = "intercom"
+ var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
+ var/obj/item/weapon/circuitboard/M = circuit
+ A.frame_type = M.board_type
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.set_dir(dir)
A.anchored = 1
- for (var/obj/C in src)
- C.forceMove(loc)
A.state = 2
- A.icon_state = "intercom_2"
+ A.update_icon()
M.deconstruct(src)
qdel(src)
else
@@ -175,4 +174,4 @@
/obj/item/device/radio/intercom/locked/confessional
name = "confessional intercom"
- frequency = 1480
+ frequency = 1480
\ No newline at end of file
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 1298206b3e..3e9c9a7524 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -246,10 +246,13 @@
/obj/item/stack/medical/splint
name = "medical splints"
singular_name = "medical splint"
+ desc = "Modular splints capable of supporting and immobilizing bones in both limbs and appendages."
icon_state = "splint"
amount = 5
max_amount = 5
+ var/list/splintable_organs = list(BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT) //List of organs you can splint, natch.
+
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/living/user as mob)
if(..())
return 1
@@ -258,8 +261,8 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
- if(!(affecting.organ_tag in list("l_arm","r_arm","l_leg","r_leg")))
- user << "You can't apply a splint there!"
+ if(!(affecting.organ_tag in splintable_organs))
+ user << "You can't use \the [src] to apply a splint there!"
return
if(affecting.status & ORGAN_SPLINTED)
user << "[M]'s [limb] is already splinted!"
@@ -267,7 +270,8 @@
if (M != user)
user.visible_message("[user] starts to apply \the [src] to [M]'s [limb].", "You start to apply \the [src] to [M]'s [limb].", "You hear something being wrapped.")
else
- if((!user.hand && affecting.organ_tag == "r_arm") || (user.hand && affecting.organ_tag == "l_arm"))
+ if(( !user.hand && (affecting.organ_tag in list(BP_R_ARM, BP_R_HAND)) || \
+ user.hand && (affecting.organ_tag in list(BP_L_ARM, BP_L_HAND)) ))
user << "You can't apply a splint to the arm you're using!"
return
user.visible_message("[user] starts to apply \the [src] to their [limb].", "You start to apply \the [src] to your [limb].", "You hear something being wrapped.")
@@ -283,3 +287,12 @@
affecting.status |= ORGAN_SPLINTED
use(1)
return
+
+
+/obj/item/stack/medical/splint/ghetto
+ name = "makeshift splints"
+ singular_name = "makeshift splint"
+ desc = "For holding your limbs in place with duct tape and scrap metal."
+ icon_state = "tape-splint"
+ amount = 1
+ splintable_organs = list(BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 87ada4fa4e..73d4d3cbcd 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -26,7 +26,6 @@
stacktype = /obj/item/stack/rods
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
- ..()
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
@@ -46,6 +45,17 @@
if (!R && replace)
user.put_in_hands(new_item)
return
+
+ if (istype(W, /obj/item/weapon/tape_roll))
+ var/obj/item/stack/medical/splint/ghetto/new_splint = new(user.loc)
+ new_splint.loc = src.loc
+ new_splint.add_fingerprint(user)
+
+ user.visible_message("\The [user] constructs \a [new_splint] out of a [singular_name].", \
+ "You use make \a [new_splint] out of a [singular_name].")
+ src.use(1)
+ return
+
..()
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 7710cec5f6..7b8042c8c1 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -538,8 +538,8 @@
icon_state = "botanist"
/obj/item/toy/figure/captain
- name = "Captain action figure"
- desc = "A \"Space Life\" brand Captain action figure."
+ name = "Station Administrator action figure"
+ desc = "A \"Space Life\" brand Station Administrator action figure."
icon_state = "captain"
/obj/item/toy/figure/cargotech
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 7df8fc6574..c6918d33db 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -233,12 +233,12 @@
access = list(access_syndicate, access_external_airlocks)
/obj/item/weapon/card/id/captains_spare
- name = "captain's spare ID"
+ name = "station administrator's spare ID"
desc = "The spare ID of the High Lord himself."
icon_state = "gold"
item_state = "gold_id"
- registered_name = "Captain"
- assignment = "Captain"
+ registered_name = "Station Administrator"
+ assignment = "Station Administrator"
/obj/item/weapon/card/id/captains_spare/New()
access = get_all_station_access()
..()
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 80c5228bb4..f201fbb3c6 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -116,6 +116,23 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else // else just remove some of the reagents
reagents.remove_any(REM)
+/obj/item/clothing/mask/smokable/examine(mob/user)
+ ..()
+ if(lit == 1)
+ var/smoke_percent = round((smoketime / initial(smoketime)) * 100)
+ switch(smoke_percent)
+ if(90 to INFINITY)
+ user << "[src] has just begun to burn."
+ if(60 to 90)
+ user << "[src] has a good amount of burn time remaining."
+ if(30 to 60)
+ user << "[src] is about half finished."
+ if(10 to 30)
+ user << "[src] is starting to burn low."
+ else
+ user << "[src] is nearly burnt out!"
+
+
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
@@ -321,7 +338,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/////////////////
/obj/item/clothing/mask/smokable/pipe
name = "smoking pipe"
- desc = "A pipe, for smoking. Probably made of meershaum or something."
+ desc = "A pipe, for smoking. Made of fine, stained cherry wood."
icon_state = "pipeoff"
item_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm
index fd30153c37..3711cf0690 100644
--- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm
+++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm
@@ -19,19 +19,19 @@
throw_speed = 3
throw_range = 15
var/build_path = null
- var/board_type = "computer"
+ var/board_type = new /datum/frame/frame_types/computer
var/list/req_components = null
var/contain_parts = 1
//Called when the circuitboard is used to contruct a new machine.
/obj/item/weapon/circuitboard/proc/construct(var/obj/machinery/M)
- if (istype(M, build_path))
+ if(istype(M, build_path))
return 1
return 0
//Called when a computer is deconstructed to produce a circuitboard.
//Only used by computers, as other machines store their circuitboard instance.
/obj/item/weapon/circuitboard/proc/deconstruct(var/obj/machinery/M)
- if (istype(M, build_path))
+ if(istype(M, build_path))
return 1
return 0
diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
index 0016fc730a..c46c519e9e 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
@@ -32,7 +32,7 @@
/obj/item/weapon/circuitboard/security/telescreen/entertainment
name = T_BOARD("entertainment camera monitor")
build_path = /obj/machinery/computer/security/telescreen/entertainment
- board_type = "display"
+ board_type = new /datum/frame/frame_types/display
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/security/telescreen/entertainment/New()
diff --git a/code/game/objects/items/weapons/circuitboards/computer/research.dm b/code/game/objects/items/weapons/circuitboards/computer/research.dm
index 7695913eed..f49b80e6df 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/research.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/research.dm
@@ -1,5 +1,5 @@
#ifndef T_BOARD
-#error T_BOARD macro is not defined but we need it!
+#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/rdconsole
@@ -9,12 +9,12 @@
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.")
- if(src.build_path == /obj/machinery/computer/rdconsole/core)
- src.name = T_BOARD("RD Console - Robotics")
- src.build_path = /obj/machinery/computer/rdconsole/robotics
+ if(build_path == /obj/machinery/computer/rdconsole/core)
+ name = T_BOARD("RD Console - Robotics")
+ build_path = /obj/machinery/computer/rdconsole/robotics
user << "Access protocols set to robotics."
else
- src.name = T_BOARD("RD Console")
- src.build_path = /obj/machinery/computer/rdconsole/core
+ name = T_BOARD("RD Console")
+ build_path = /obj/machinery/computer/rdconsole/core
user << "Access protocols set to default."
- return
+ return
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm
index 3acb2de755..fa48be65bb 100644
--- a/code/game/objects/items/weapons/circuitboards/frame.dm
+++ b/code/game/objects/items/weapons/circuitboards/frame.dm
@@ -9,37 +9,37 @@
/obj/item/weapon/circuitboard/guestpass
name = T_BOARD("guestpass console")
build_path = /obj/machinery/computer/guestpass
- board_type = "guestpass"
+ board_type = new /datum/frame/frame_types/guest_pass_console
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/status_display
name = T_BOARD("status display")
build_path = /obj/machinery/status_display
- board_type = "display"
+ board_type = new /datum/frame/frame_types/display
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/ai_status_display
name = T_BOARD("ai status display")
build_path = /obj/machinery/ai_status_display
- board_type = "display"
+ board_type = new /datum/frame/frame_types/display
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/newscaster
name = T_BOARD("newscaster")
build_path = /obj/machinery/newscaster
- board_type = "newscaster"
+ board_type = new /datum/frame/frame_types/newscaster
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/atm
name = T_BOARD("atm")
build_path = /obj/machinery/atm
- board_type = "atm"
+ board_type = new /datum/frame/frame_types/atm
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/request
name = T_BOARD("reques console")
build_path = /obj/machinery/requests_console
- board_type = "request"
+ board_type = new /datum/frame/frame_types/supply_request_console
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Alarm
@@ -47,25 +47,25 @@
/obj/item/weapon/circuitboard/firealarm
name = T_BOARD("fire alarm")
build_path = /obj/machinery/firealarm
- board_type = "firealarm"
+ board_type = new /datum/frame/frame_types/fire_alarm
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/airalarm
name = T_BOARD("air alarm")
build_path = /obj/machinery/alarm
- board_type = "airalarm"
+ board_type = new /datum/frame/frame_types/air_alarm
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/intercom
name = T_BOARD("intercom")
build_path = /obj/item/device/radio/intercom
- board_type = "intercom"
+ board_type = new /datum/frame/frame_types/intercom
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/keycard_auth
name = T_BOARD("keycard authenticator")
build_path = /obj/machinery/keycard_auth
- board_type = "keycard"
+ board_type = new /datum/frame/frame_types/keycard_authenticator
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Computer
@@ -73,19 +73,19 @@
/obj/item/weapon/circuitboard/holopad
name = T_BOARD("holopad")
build_path = /obj/machinery/hologram/holopad
- board_type = "holopad"
+ board_type = new /datum/frame/frame_types/holopad
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/scanner_console
name = T_BOARD("body scanner console")
build_path = /obj/machinery/body_scanconsole
- board_type = "console"
+ board_type = new /datum/frame/frame_types/medical_console
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
/obj/item/weapon/circuitboard/sleeper_console
name = T_BOARD("sleeper console")
build_path = /obj/machinery/sleep_console
- board_type = "console"
+ board_type = new /datum/frame/frame_types/medical_console
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
//Machine
@@ -93,7 +93,7 @@
/obj/item/weapon/circuitboard/photocopier
name = T_BOARD("photocopier")
build_path = /obj/machinery/photocopier
- board_type = "photocopier"
+ board_type = new /datum/frame/frame_types/photocopier
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 1,
@@ -104,7 +104,7 @@
/obj/item/weapon/circuitboard/fax
name = T_BOARD("fax")
build_path = /obj/machinery/photocopier/faxmachine
- board_type = "fax"
+ board_type = new /datum/frame/frame_types/fax
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 1,
@@ -115,7 +115,7 @@
/obj/item/weapon/circuitboard/conveyor
name = T_BOARD("conveyor")
build_path = /obj/machinery/conveyor
- board_type = "conveyor"
+ board_type = new /datum/frame/frame_types/conveyor
req_components = list(
/obj/item/weapon/stock_parts/gear = 2,
/obj/item/weapon/stock_parts/motor = 2,
@@ -124,7 +124,7 @@
/obj/item/weapon/circuitboard/microwave
name = T_BOARD("microwave")
build_path = /obj/machinery/microwave
- board_type = "microwave"
+ board_type = new /datum/frame/frame_types/microwave
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
/obj/item/weapon/stock_parts/console_screen = 1,
@@ -134,7 +134,7 @@
/obj/item/weapon/circuitboard/recharger
name = T_BOARD("recharger")
build_path = /obj/machinery/recharger
- board_type = "recharger"
+ board_type = new /datum/frame/frame_types/recharger
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/stack/cable_coil = 5)
@@ -142,12 +142,12 @@
/obj/item/weapon/circuitboard/recharger/wrecharger
name = T_BOARD("wall recharger")
build_path = /obj/machinery/recharger/wallcharger
- board_type = "wrecharger"
+ board_type = new /datum/frame/frame_types/wall_charger
/obj/item/weapon/circuitboard/washing
name = T_BOARD("washing machine")
build_path = /obj/machinery/washing_machine
- board_type = "washing"
+ board_type = new /datum/frame/frame_types/washing_machine
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
/obj/item/weapon/stock_parts/motor = 1,
@@ -156,7 +156,7 @@
/obj/item/weapon/circuitboard/grinder
name = T_BOARD("reagent grinder")
build_path = /obj/machinery/reagentgrinder
- board_type = "grinder"
+ board_type = new /datum/frame/frame_types/grinder
req_components = list(
/obj/item/weapon/stock_parts/motor = 1,
/obj/item/weapon/stock_parts/gear = 1,
@@ -185,7 +185,7 @@
/obj/item/weapon/circuitboard/body_scanner
name = T_BOARD("body scanner")
build_path = /obj/machinery/bodyscanner
- board_type = "medpod"
+ board_type = new /datum/frame/frame_types/medical_pod
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 3,
@@ -194,7 +194,7 @@
/obj/item/weapon/circuitboard/sleeper
name = T_BOARD("sleeper")
build_path = /obj/machinery/sleeper
- board_type = "medpod"
+ board_type = new /datum/frame/frame_types/medical_pod
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 1,
@@ -205,7 +205,7 @@
/obj/item/weapon/circuitboard/dna_analyzer
name = T_BOARD("dna analyzer")
build_path = /obj/machinery/dnaforensics
- board_type = "dna_analyzer"
+ board_type = new /datum/frame/frame_types/dna_analyzer
origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2, TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 2,
@@ -215,104 +215,10 @@
/obj/item/weapon/circuitboard/mass_driver
name = T_BOARD("mass driver")
build_path = /obj/machinery/mass_driver
- board_type = "massdriver"
+ board_type = new /datum/frame/frame_types/mass_driver
req_components = list(
/obj/item/weapon/stock_parts/gear = 2,
/obj/item/weapon/stock_parts/motor = 2,
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/weapon/stock_parts/spring = 1,
- /obj/item/stack/cable_coil = 5)
-
-//for testing - If this is still in when I commit, someone shoot me. --leaving in for now, shouldn't be able to get these on station anyways.
-/obj/item/weapon/storage/box/frame_parts
- display_contents_with_number = 1
- New()
- ..()
- new /obj/item/weapon/circuitboard/guestpass( src )
- new /obj/item/weapon/circuitboard/status_display( src )
- new /obj/item/weapon/circuitboard/ai_status_display( src )
- new /obj/item/weapon/circuitboard/newscaster( src )
- new /obj/item/weapon/circuitboard/atm( src )
- new /obj/item/weapon/circuitboard/firealarm( src )
- new /obj/item/weapon/circuitboard/airalarm( src )
- new /obj/item/weapon/circuitboard/intercom( src )
- new /obj/item/weapon/circuitboard/keycard_auth( src )
- new /obj/item/weapon/circuitboard/holopad( src )
- new /obj/item/weapon/circuitboard/photocopier( src )
- new /obj/item/weapon/circuitboard/fax( src )
- new /obj/item/weapon/circuitboard/microwave( src )
- new /obj/item/weapon/circuitboard/washing( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/weapon/stock_parts/scanning_module( src )
- new /obj/item/weapon/stock_parts/motor( src )
- new /obj/item/weapon/stock_parts/micro_laser( src )
- new /obj/item/weapon/stock_parts/matter_bin( src )
- new /obj/item/weapon/stock_parts/gear( src )
- new /obj/item/weapon/stock_parts/console_screen( src )
- new /obj/item/weapon/stock_parts/capacitor( src )
- new /obj/item/weapon/stock_parts/spring( src )
- new /obj/item/stack/cable_coil( src , 5 )
- new /obj/item/stack/material/glass/reinforced( src , 2 )
\ No newline at end of file
+ /obj/item/stack/cable_coil = 5)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm
index 716e763515..c32b93484e 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/biogenerator
name = T_BOARD("biogenerator")
- build_path = "/obj/machinery/biogenerator"
- board_type = "machine"
+ build_path = /obj/machinery/biogenerator
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm
index a1edb3f464..ffca070fe9 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/clonepod
name = T_BOARD("clone pod")
- build_path = "/obj/machinery/clonepod"
- board_type = "machine"
+ build_path = /obj/machinery/clonepod
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3, TECH_BIO = 3)
req_components = list(
/obj/item/stack/cable_coil = 2,
@@ -15,8 +15,8 @@
/obj/item/weapon/circuitboard/clonescanner
name = T_BOARD("cloning scanner")
- build_path = "/obj/machinery/dna_scannernew"
- board_type = "machine"
+ build_path = /obj/machinery/dna_scannernew
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 1,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm
index 4b6296c886..ab3ae6f384 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/jukebox
name = T_BOARD("jukebox")
- build_path = "/obj/machinery/media/jukebox"
- board_type = "machine"
+ build_path = /obj/machinery/media/jukebox
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_MAGNET = 2, TECH_DATA = 1)
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 1,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm b/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm
index 4515bfd74b..01d5f0933c 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/mech_recharger
name = T_BOARD("mech recharger")
- build_path = "/obj/machinery/mech_recharger"
- board_type = "machine"
+ build_path = /obj/machinery/mech_recharger
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 2, TECH_POWER = 2, TECH_ENGINEERING = 2)
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 2,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm
index 653d20d666..82217a1b8f 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/miningdrill
name = T_BOARD("mining drill head")
- build_path = "/obj/machinery/mining/drill"
- board_type = "machine"
+ build_path = /obj/machinery/mining/drill
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 1,
@@ -15,7 +15,7 @@
/obj/item/weapon/circuitboard/miningdrillbrace
name = T_BOARD("mining drill brace")
- build_path = "/obj/machinery/mining/brace"
- board_type = "machine"
+ build_path = /obj/machinery/mining/brace
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
req_components = list()
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm
index a5cd69b0f4..218ffd924a 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/pacman
name = T_BOARD("PACMAN-type generator")
- build_path = "/obj/machinery/power/port_gen/pacman"
- board_type = "machine"
+ build_path = /obj/machinery/power/port_gen/pacman
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3, TECH_POWER = 3, TECH_PHORON = 3, TECH_ENGINEERING = 3)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
@@ -15,10 +15,10 @@
/obj/item/weapon/circuitboard/pacman/super
name = T_BOARD("SUPERPACMAN-type generator")
- build_path = "/obj/machinery/power/port_gen/pacman/super"
+ build_path = /obj/machinery/power/port_gen/pacman/super
origin_tech = list(TECH_DATA = 3, TECH_POWER = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/circuitboard/pacman/mrs
name = T_BOARD("MRSPACMAN-type generator")
- build_path = "/obj/machinery/power/port_gen/pacman/mrs"
+ build_path = /obj/machinery/power/port_gen/pacman/mrs
origin_tech = list(TECH_DATA = 3, TECH_POWER = 5, TECH_ENGINEERING = 5)
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/power.dm b/code/game/objects/items/weapons/circuitboards/machinery/power.dm
index 5c8975a207..6e5667ebe5 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/power.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/power.dm
@@ -4,21 +4,21 @@
/obj/item/weapon/circuitboard/smes
name = T_BOARD("superconductive magnetic energy storage")
- build_path = "/obj/machinery/power/smes/buildable"
- board_type = "machine"
+ build_path = /obj/machinery/power/smes/buildable
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_POWER = 6, TECH_ENGINEERING = 4)
req_components = list(/obj/item/weapon/smes_coil = 1, /obj/item/stack/cable_coil = 30)
/obj/item/weapon/circuitboard/batteryrack
name = T_BOARD("battery rack PSU")
- build_path = "/obj/machinery/power/smes/batteryrack"
- board_type = "machine"
+ build_path = /obj/machinery/power/smes/batteryrack
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 2)
req_components = list(/obj/item/weapon/cell = 3)
/obj/item/weapon/circuitboard/ghettosmes
name = T_BOARD("makeshift PSU")
desc = "An APC circuit repurposed into some power storage device controller"
- build_path = "/obj/machinery/power/smes/batteryrack/makeshift"
- board_type = "machine"
+ build_path = /obj/machinery/power/smes/batteryrack/makeshift
+ board_type = new /datum/frame/frame_types/machine
req_components = list(/obj/item/weapon/cell = 3)
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm
index a3684cd894..f45549bab6 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/recharge_station
name = T_BOARD("cyborg recharging station")
- build_path = "/obj/machinery/recharge_station"
- board_type = "machine"
+ build_path = /obj/machinery/recharge_station
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
req_components = list(
/obj/item/stack/cable_coil = 5,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm
index c871bd3dc5..1e4fe2afd9 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm
@@ -4,17 +4,30 @@
obj/item/weapon/circuitboard/rdserver
name = T_BOARD("R&D server")
- build_path = "/obj/machinery/r_n_d/server"
- board_type = "machine"
+ build_path = /obj/machinery/r_n_d/server/core
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3)
req_components = list(
/obj/item/stack/cable_coil = 2,
/obj/item/weapon/stock_parts/scanning_module = 1)
+obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
+ if(istype(I,/obj/item/weapon/screwdriver))
+ user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.")
+ if(build_path == /obj/machinery/r_n_d/server/core)
+ name = T_BOARD("RD Console - Robotics")
+ build_path = /obj/machinery/r_n_d/server/robotics
+ user << "Access protocols set to robotics."
+ else
+ name = T_BOARD("RD Console")
+ build_path = /obj/machinery/r_n_d/server/core
+ user << "Access protocols set to default."
+ return
+
/obj/item/weapon/circuitboard/destructive_analyzer
name = T_BOARD("destructive analyzer")
- build_path = "/obj/machinery/r_n_d/destructive_analyzer"
- board_type = "machine"
+ build_path = /obj/machinery/r_n_d/destructive_analyzer
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 1,
@@ -23,8 +36,8 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/autolathe
name = T_BOARD("autolathe")
- build_path = "/obj/machinery/autolathe"
- board_type = "machine"
+ build_path = /obj/machinery/autolathe
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 3,
@@ -33,8 +46,8 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/protolathe
name = T_BOARD("protolathe")
- build_path = "/obj/machinery/r_n_d/protolathe"
- board_type = "machine"
+ build_path = /obj/machinery/r_n_d/protolathe
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 2,
@@ -43,8 +56,8 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/circuit_imprinter
name = T_BOARD("circuit imprinter")
- build_path = "/obj/machinery/r_n_d/circuit_imprinter"
- board_type = "machine"
+ build_path = /obj/machinery/r_n_d/circuit_imprinter
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
@@ -53,8 +66,8 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/mechfab
name = "Circuit board (Exosuit Fabricator)"
- build_path = "/obj/machinery/mecha_part_fabricator"
- board_type = "machine"
+ build_path = /obj/machinery/mecha_part_fabricator
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 2,
@@ -64,8 +77,8 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/prosthetics
name = "Circuit board (Prosthetics Fabricator)"
- build_path = "/obj/machinery/pros_fabricator"
- board_type = "machine"
+ build_path = /obj/machinery/pros_fabricator
+ board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 2,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm
index 7218b7f094..1d806a2710 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm
@@ -4,8 +4,8 @@
/obj/item/weapon/circuitboard/shield_gen_ex
name = T_BOARD("hull shield generator")
- board_type = "machine"
- build_path = "/obj/machinery/shield_gen/external"
+ board_type = new /datum/frame/frame_types/machine
+ build_path = /obj/machinery/shield_gen/external
origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/pico = 2,
@@ -17,8 +17,8 @@
/obj/item/weapon/circuitboard/shield_gen
name = T_BOARD("bubble shield generator")
- board_type = "machine"
- build_path = "/obj/machinery/shield_gen"
+ board_type = new /datum/frame/frame_types/machine
+ build_path = /obj/machinery/shield_gen
origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/pico = 2,
@@ -30,8 +30,8 @@
/obj/item/weapon/circuitboard/shield_cap
name = T_BOARD("shield capacitor")
- board_type = "machine"
- build_path = "/obj/machinery/shield_capacitor"
+ board_type = new /datum/frame/frame_types/machine
+ build_path = /obj/machinery/shield_capacitor
origin_tech = list(TECH_MAGNET = 3, TECH_POWER = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/pico = 2,
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm
index 8a7516f476..835971b012 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm
@@ -3,11 +3,11 @@
#endif
/obj/item/weapon/circuitboard/telecomms
- board_type = "machine"
+ board_type = new /datum/frame/frame_types/machine
/obj/item/weapon/circuitboard/telecomms/receiver
name = T_BOARD("subspace receiver")
- build_path = "/obj/machinery/telecomms/receiver"
+ build_path = /obj/machinery/telecomms/receiver
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2)
req_components = list(
/obj/item/weapon/stock_parts/subspace/ansible = 1,
@@ -17,7 +17,7 @@
/obj/item/weapon/circuitboard/telecomms/hub
name = T_BOARD("hub mainframe")
- build_path = "/obj/machinery/telecomms/hub"
+ build_path = /obj/machinery/telecomms/hub
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 2,
@@ -26,7 +26,7 @@
/obj/item/weapon/circuitboard/telecomms/relay
name = T_BOARD("relay mainframe")
- build_path = "/obj/machinery/telecomms/relay"
+ build_path = /obj/machinery/telecomms/relay
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 4, TECH_BLUESPACE = 3)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 2,
@@ -35,7 +35,7 @@
/obj/item/weapon/circuitboard/telecomms/bus
name = T_BOARD("bus mainframe")
- build_path = "/obj/machinery/telecomms/bus"
+ build_path = /obj/machinery/telecomms/bus
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 2,
@@ -44,7 +44,7 @@
/obj/item/weapon/circuitboard/telecomms/processor
name = T_BOARD("processor unit")
- build_path = "/obj/machinery/telecomms/processor"
+ build_path = /obj/machinery/telecomms/processor
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 3,
@@ -56,7 +56,7 @@
/obj/item/weapon/circuitboard/telecomms/server
name = T_BOARD("telecommunication server")
- build_path = "/obj/machinery/telecomms/server"
+ build_path = /obj/machinery/telecomms/server
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 2,
@@ -65,7 +65,7 @@
/obj/item/weapon/circuitboard/telecomms/broadcaster
name = T_BOARD("subspace broadcaster")
- build_path = "/obj/machinery/telecomms/broadcaster"
+ build_path = /obj/machinery/telecomms/broadcaster
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_BLUESPACE = 2)
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 2,
@@ -77,7 +77,7 @@
//This isn't a real telecomms board but I don't want to make a whole file to hold only one circuitboard.
/obj/item/weapon/circuitboard/telecomms/exonet_node
name = T_BOARD("exonet node")
- build_path = "/obj/machinery/exonet_node"
+ build_path = /obj/machinery/exonet_node
origin_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5, TECH_BLUESPACE = 4)
req_components = list(
/obj/item/weapon/stock_parts/subspace/ansible = 1,
@@ -90,11 +90,11 @@
/obj/item/weapon/circuitboard/telecomms/pda_multicaster
name = T_BOARD("pda multicaster")
- build_path = "/obj/machinery/pda_multicaster"
+ build_path = /obj/machinery/pda_multicaster
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2, TECH_BLUESPACE = 2)
req_components = list(
/obj/item/weapon/stock_parts/subspace/ansible = 1,
/obj/item/weapon/stock_parts/subspace/filter = 1,
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/weapon/stock_parts/subspace/treatment = 1,
- /obj/item/stack/cable_coil = 2)
+ /obj/item/stack/cable_coil = 2)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm
index 38438d6327..07e9ae53dd 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm
@@ -3,7 +3,7 @@
#endif
/obj/item/weapon/circuitboard/unary_atmos
- board_type = "machine"
+ board_type = new /datum/frame/frame_types/machine
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
@@ -15,7 +15,7 @@
/obj/item/weapon/circuitboard/unary_atmos/heater
name = T_BOARD("gas heating system")
- build_path = "/obj/machinery/atmospherics/unary/heater"
+ build_path = /obj/machinery/atmospherics/unary/heater
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 1)
req_components = list(
/obj/item/stack/cable_coil = 5,
@@ -24,7 +24,7 @@
/obj/item/weapon/circuitboard/unary_atmos/cooler
name = T_BOARD("gas cooling system")
- build_path = "/obj/machinery/atmospherics/unary/freezer"
+ build_path = /obj/machinery/atmospherics/unary/freezer
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
req_components = list(
/obj/item/stack/cable_coil = 2,
diff --git a/code/game/objects/items/weapons/circuitboards/mecha.dm b/code/game/objects/items/weapons/circuitboards/mecha.dm
index 0ce851e3a3..ac4d83d98c 100644
--- a/code/game/objects/items/weapons/circuitboards/mecha.dm
+++ b/code/game/objects/items/weapons/circuitboards/mecha.dm
@@ -10,7 +10,6 @@
item_state = "electronic"
board_type = "other"
-
/obj/item/weapon/circuitboard/mecha/ripley
origin_tech = list(TECH_DATA = 3)
@@ -22,7 +21,6 @@
name = T_BOARD_MECHA("Ripley central control")
icon_state = "mainboard"
-
/obj/item/weapon/circuitboard/mecha/gygax
origin_tech = list(TECH_DATA = 4)
@@ -39,7 +37,6 @@
name = T_BOARD_MECHA("Gygax central control")
icon_state = "mainboard"
-
/obj/item/weapon/circuitboard/mecha/durand
origin_tech = list(TECH_DATA = 4)
@@ -56,7 +53,6 @@
name = T_BOARD_MECHA("Durand central control")
icon_state = "mainboard"
-
/obj/item/weapon/circuitboard/mecha/honker
origin_tech = list(TECH_DATA = 4)
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 24f6ad53b3..ba60bfc361 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -160,7 +160,7 @@
/obj/item/weapon/dnainjector/xraymut
name = "\improper DNA injector (Xray)"
- desc = "Finally you can see what the Captain does."
+ desc = "Finally you can see what the Station Administrator does."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 8
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index a38c66333c..0236297d22 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -92,7 +92,7 @@
M.update_icons()
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
- desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
+ desc = "Use of this weapon may constiute a war crime in your area, consult your local Station Administrator."
name = "clusterbang"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang"
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 60e02feab6..25ee157950 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -115,6 +115,11 @@ var/last_chew = 0
last_chew = world.time
+/obj/item/weapon/handcuffs/fuzzy
+ name = "fuzzy cuffs"
+ icon_state = "fuzzycuff"
+ desc = "Use this to keep... 'prisoners' in line."
+
/obj/item/weapon/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 4bddb29a06..3f4164a4c4 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -164,12 +164,10 @@ Implant Specifics:
"}
if (malfunction == MALFUNCTION_PERMANENT)
return
- var/need_gib = null
if(istype(imp_in, /mob/))
var/mob/T = imp_in
message_admins("Explosive implant triggered in [T] ([T.key]). (JMP) ")
log_game("Explosive implant triggered in [T] ([T.key]).")
- need_gib = 1
if(ishuman(imp_in))
if (elevel == "Localized Limb")
@@ -180,11 +178,11 @@ Implant Specifics:
"}
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
- part.createwound(BRUISE, 60) //mangle them instead
- explosion(get_turf(imp_in), -1, -1, 2, 3)
+ part.createwound(BRUISE, 80) //mangle them instead
+ explosion(get_turf(imp_in), -1, -1, 1, 3)
qdel(src)
else
- explosion(get_turf(imp_in), -1, -1, 2, 3)
+ explosion(get_turf(imp_in), -1, -1, 1, 3)
part.droplimb(0,DROPLIMB_BLUNT)
qdel(src)
if (elevel == "Destroy Body")
@@ -197,9 +195,6 @@ Implant Specifics:
"}
else
explosion(get_turf(imp_in), 0, 1, 3, 6)
- if(need_gib)
- imp_in.gib()
-
var/turf/t = get_turf(imp_in)
if(t)
@@ -249,10 +244,10 @@ Implant Specifics:
"}
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
- part.createwound(BRUISE, 60) //mangle them instead
+ part.createwound(BRUISE, 80) //mangle them instead
else
part.droplimb(0,DROPLIMB_BLUNT)
- explosion(get_turf(imp_in), -1, -1, 2, 3)
+ explosion(get_turf(imp_in), -1, -1, 1, 3)
qdel(src)
/obj/item/weapon/implant/chem
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 8668794082..8c1e3f5df1 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -997,7 +997,7 @@
Remember the order:
Disk, Code, Safety, Timer, Disk, RUN!
- Intelligence Analysts believe that normal corporate procedure is for the Captain to secure the nuclear authentication disk.
+ Intelligence Analysts believe that normal corporate procedure is for the Station Administrator to secure the nuclear authentication disk.
Good luck!