diff --git a/.travis.yml b/.travis.yml
index f26102a3b3e..da060b19feb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,28 +1,39 @@
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
language: c
+sudo: false
env:
- BYOND_MAJOR="508"
- BYOND_MINOR="1287"
+ BYOND_MAJOR="509"
+ BYOND_MINOR="1318"
+ MACRO_COUNT=1004
-before_install:
- - sudo apt-get update -qq
- - sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq
- - sudo apt-get install python -qq
- - sudo apt-get install python-pip -qq
- - sudo pip install PyYaml -q
- - sudo pip install beautifulsoup4 -q
+cache:
+ directories:
+ - $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
+
+addons:
+ apt:
+ packages:
+ - libc6-i386
+ - libgcc1:i386
+ - libstdc++6:i386
+
+before_script:
+ - chmod +x ./install-byond.sh
+ - ./install-byond.sh
install:
- - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
- - unzip byond.zip
- - cd byond
- - sudo make install
- - cd ..
+ - pip install --user PyYaml -q
+ - pip install --user beautifulsoup4 -q
script:
- shopt -s globstar
- (! grep 'step_[xy]' maps/**/*.dmm)
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- - (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; [ $num -le 1355 ])
+ - (! grep -En "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm)
+ - awk -f tools/indentation.awk **/*.dm
+ - md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml"
+ - (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -le ${MACRO_COUNT} ])
+ - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
+ - python tools/TagMatcher/tag-matcher.py ../..
- DreamMaker polaris.dme
diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm
index 9fcdad86139..faefa64883d 100644
--- a/code/ATMOSPHERICS/components/unary/cold_sink.dm
+++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm
@@ -10,6 +10,7 @@
anchored = 1
use_power = 0
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
+ circuit = /obj/item/weapon/circuitboard/unary_atmos/cooler
var/heatsink_temperature = T20C // The constant temperature reservoir into which the freezer pumps heat. Probably the hull of the station or something.
var/internal_volume = 600 // L
@@ -24,7 +25,6 @@
..()
initialize_directions = dir
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm
index e139f6faf3f..aa51d9669f0 100644
--- a/code/ATMOSPHERICS/components/unary/heat_source.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_source.dm
@@ -10,6 +10,7 @@
anchored = 1
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
+ circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
var/max_temperature = T20C + 680
var/internal_volume = 600 //L
@@ -25,7 +26,6 @@
initialize_directions = dir
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/unary_atmos/heater(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 7222470f71c..bb4ec95a844 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -406,7 +406,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
//Get heat transfer coefficients for clothing.
for(var/obj/item/clothing/C in src)
- if(l_hand == C || r_hand == C)
+ if(item_is_in_hands(C))
continue
if( C.max_heat_protection_temperature >= last_temperature )
diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm
index 437661b7fc4..54a922c30dc 100644
--- a/code/_helpers/names.dm
+++ b/code/_helpers/names.dm
@@ -161,7 +161,7 @@ var/syndicate_code_response//Code response for traitors.
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
Can probably be done through "{ }" but I don't really see the practical benefit.
One example of an earlier system is commented below.
- /N
+ -N
*/
/proc/generate_code_phrase()//Proc is used for phrase and response in master_controller.dm
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 9fa5fa36546..7d7468b91a7 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -94,10 +94,7 @@
if(W == A) // Handle attack_self
W.attack_self(src)
- if(hand)
- update_inv_l_hand(0)
- else
- update_inv_r_hand(0)
+ update_inv_active_hand(0)
return 1
//Atoms on your person
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 751021892c8..63ef549122e 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -162,7 +162,7 @@
inv_box.name = "r_hand"
inv_box.icon = ui_style
inv_box.icon_state = "r_hand_inactive"
- if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
+ if(!target.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
@@ -177,7 +177,7 @@
inv_box.name = "l_hand"
inv_box.icon = ui_style
inv_box.icon_state = "l_hand_inactive"
- if(mymob && mymob.hand) //This being 1 means the left hand is in use
+ if(target.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
diff --git a/code/controllers/hooks.dm b/code/controllers/hooks.dm
index 48f1199ef76..e7888304e58 100644
--- a/code/controllers/hooks.dm
+++ b/code/controllers/hooks.dm
@@ -9,11 +9,11 @@
*
* To add some code to be called by the hook, define a proc under the type, as so:
* @code
- /hook/foo/proc/bar()
- if(1)
- return 1 //Sucessful
- else
- return 0 //Error, or runtime.
+/hook/foo/proc/bar()
+ if(1)
+ return 1 //Sucessful
+ else
+ return 0 //Error, or runtime.
* @endcode
* All hooks must return nonzero on success, as runtimes will force return null.
*/
diff --git a/code/datums/repositories/cameras.dm b/code/datums/repositories/cameras.dm
new file mode 100644
index 00000000000..7bac2a4634d
--- /dev/null
+++ b/code/datums/repositories/cameras.dm
@@ -0,0 +1,34 @@
+var/global/datum/repository/cameras/camera_repository = new()
+
+/proc/invalidateCameraCache()
+ camera_repository.networks.Cut()
+ camera_repository.invalidated = 1
+ camera_repository.camera_cache_id = (++camera_repository.camera_cache_id % 999999)
+
+/datum/repository/cameras
+ var/list/networks
+ var/invalidated = 1
+ var/camera_cache_id = 1
+
+/datum/repository/cameras/New()
+ networks = list()
+ ..()
+
+/datum/repository/cameras/proc/cameras_in_network(var/network)
+ setup_cache()
+ var/list/network_list = networks[network]
+ return network_list
+
+/datum/repository/cameras/proc/setup_cache()
+ if(!invalidated)
+ return
+ invalidated = 0
+
+ cameranet.process_sort()
+ for(var/obj/machinery/camera/C in cameranet.cameras)
+ var/cam = C.nano_structure()
+ for(var/network in C.network)
+ if(!networks[network])
+ networks[network] = list()
+ var/list/netlist = networks[network]
+ netlist[++netlist.len] = cam
diff --git a/code/datums/crew.dm b/code/datums/repositories/crew.dm
similarity index 95%
rename from code/datums/crew.dm
rename to code/datums/repositories/crew.dm
index d46a83846f9..6fbe1863da7 100644
--- a/code/datums/crew.dm
+++ b/code/datums/repositories/crew.dm
@@ -1,9 +1,5 @@
var/global/datum/repository/crew/crew_repository = new()
-/datum/cache_entry
- var/timestamp
- var/data
-
/datum/repository/crew
var/list/cache_data
diff --git a/code/datums/repositories/repository.dm b/code/datums/repositories/repository.dm
new file mode 100644
index 00000000000..6267099c930
--- /dev/null
+++ b/code/datums/repositories/repository.dm
@@ -0,0 +1,4 @@
+/datum/cache_entry
+ var/timestamp
+ var/data
+
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 1bf774c8500..7ea4dc52eb4 100644
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -609,7 +609,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/solar_assembly,
/obj/item/solar_assembly,
/obj/item/solar_assembly,
- /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller
+ /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller,
/obj/item/weapon/circuitboard/solar_control,
/obj/item/weapon/tracker_electronics,
/obj/item/weapon/paper/solar)
@@ -671,8 +671,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)"
contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair,
- /obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer
- /obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer
+ /obj/item/weapon/circuitboard/mecha/ripley/main,
+ /obj/item/weapon/circuitboard/mecha/ripley/peripherals)
cost = 30
containertype = /obj/structure/closet/crate/secure
containername = "APLU \"Ripley\" Circuit Crate"
@@ -681,8 +681,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/mecha_odysseus
name = "Circuit Crate (\"Odysseus\")"
- contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer
- /obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer
+ contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals,
+ /obj/item/weapon/circuitboard/mecha/odysseus/main)
cost = 25
containertype = /obj/structure/closet/crate/secure
containername = "\"Odysseus\" Circuit Crate"
@@ -1001,7 +1001,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Security barrier crate"
group = "Security"
-/datum/supply_packs/securitybarriers
+/datum/supply_packs/securityshieldgen
name = "Wall shield Generators"
contains = list(/obj/machinery/shieldwallgen,
/obj/machinery/shieldwallgen,
@@ -1729,7 +1729,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/device/camera_film,
/obj/item/device/camera_film,
/obj/item/weapon/storage/photo_album,
- /obj/item/device/reagent_scanner)
+ /obj/item/device/reagent_scanner,
+ /obj/item/device/flashlight/maglight)
cost = 35
containertype = "/obj/structure/closet/crate/secure"
containername = "Forensic equipment"
@@ -1785,7 +1786,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/accessory/storage/black_vest,
/obj/item/clothing/head/soft/sec/corp,
/obj/item/clothing/under/rank/security/corp,
- /obj/item/weapon/gun/energy/taser)
+ /obj/item/weapon/gun/energy/taser,
+ /obj/item/device/flashlight/maglight)
cost = 30
containertype = "/obj/structure/closet/crate/secure"
containername = "Officer equipment"
@@ -1811,7 +1813,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/melee/baton/loaded,
/obj/item/weapon/storage/box/holobadge,
- /obj/item/clothing/head/beret/sec/corporate/warden)
+ /obj/item/clothing/head/beret/sec/corporate/warden,
+ /obj/item/device/flashlight/maglight)
cost = 45
containertype = "/obj/structure/closet/crate/secure"
containername = "Warden equipment"
@@ -1835,7 +1838,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/accessory/holster/waist,
/obj/item/weapon/melee/telebaton,
/obj/item/weapon/shield/riot/tele,
- /obj/item/clothing/head/beret/sec/corporate/hos)
+ /obj/item/clothing/head/beret/sec/corporate/hos,
+ /obj/item/device/flashlight/maglight)
cost = 65
containertype = "/obj/structure/closet/crate/secure"
containername = "Head of security equipment"
diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm
index c34b0291fbb..ace1ba9ec35 100644
--- a/code/datums/wires/alarm.dm
+++ b/code/datums/wires/alarm.dm
@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
- if(A.wiresexposed && A.buildstage == 2)
+ if(A.wiresexposed)
return 1
return 0
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 7babc9c4c1a..3300da0cebf 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -62,9 +62,8 @@ using /datum/datacore/proc/manifest_inject( ), or manifest_insert( )
*/
var/global/list/PDA_Manifest = list()
-var/global/ManifestJSON
-/datum/datacore/proc/get_manifest_json()
+/datum/datacore/proc/get_manifest_list()
if(PDA_Manifest.len)
return
var/heads[0]
@@ -146,7 +145,6 @@ var/global/ManifestJSON
"bot" = bot,\
"misc" = misc\
)
- ManifestJSON = json_encode(PDA_Manifest)
return
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 83033257e37..02b6315104c 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -269,21 +269,6 @@
throw_range = 5
w_class = 2.0
-/obj/item/weapon/wire
- desc = "This is just a simple piece of regular insulated wire."
- name = "wire"
- icon = 'icons/obj/power.dmi'
- icon_state = "item_wire"
- var/amount = 1.0
- var/laying = 0.0
- var/old_lay = null
- matter = list(DEFAULT_WALL_MATERIAL = 40)
- attack_verb = list("whipped", "lashed", "disciplined", "tickled")
-
- suicide_act(mob/user)
- viewers(user) << "[user] is strangling \himself with \the [src]! It looks like \he's trying to commit suicide."
- return (OXYLOSS)
-
/obj/item/weapon/module
icon = 'icons/obj/module.dmi'
icon_state = "std_module"
@@ -599,3 +584,29 @@
icon = 'icons/obj/stock_parts.dmi'
icon_state = "smes_coil"
origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINEERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19)
+
+// Additional construction stock parts
+
+/obj/item/weapon/stock_parts/gear
+ name = "gear"
+ desc = "A gear used for construction."
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "gear"
+ origin_tech = list(TECH_ENGINEERING = 1)
+ matter = list(DEFAULT_WALL_MATERIAL = 50)
+
+/obj/item/weapon/stock_parts/motor
+ name = "motor"
+ desc = "A motor used for construction."
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "motor"
+ origin_tech = list(TECH_ENGINEERING = 1)
+ matter = list(DEFAULT_WALL_MATERIAL = 60, "glass" = 10)
+
+/obj/item/weapon/stock_parts/spring
+ name = "spring"
+ desc = "A spring used for construction."
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "spring"
+ origin_tech = list(TECH_ENGINEERING = 1)
+ matter = list(DEFAULT_WALL_MATERIAL = 40)
\ No newline at end of file
diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm
index 072dd88bee4..65c7a080cd8 100644
--- a/code/game/antagonist/antagonist_create.dm
+++ b/code/game/antagonist/antagonist_create.dm
@@ -76,7 +76,7 @@
P.info = "The nuclear authorization code is: [code]"
P.name = "nuclear bomb code"
if(leader && leader.current)
- if(get_turf(P) == get_turf(leader.current) && !(leader.current.l_hand && leader.current.r_hand))
+ if(get_turf(P) == get_turf(leader.current))
leader.current.put_in_hands(P)
if(!code_owner && leader)
diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm
index dad7ed81a26..044e968f496 100644
--- a/code/game/antagonist/station/changeling.dm
+++ b/code/game/antagonist/station/changeling.dm
@@ -73,4 +73,14 @@
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.
return 0
return 1
- return 0
\ No newline at end of file
+ return 0
+
+/datum/antagonist/changeling/print_player_full(var/datum/mind/ply)
+ var/text = print_player_lite(ply)
+
+ if(ply.changeling)
+ var/datum/changeling/ling_datum = ply.changeling
+ text += " (had [ling_datum.max_geneticpoints] genomes)"
+ text += "
Bought [english_list(ling_datum.purchased_powers_history)]."
+
+ return text
diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm
index cd9dd9b83bb..b077977fd7a 100644
--- a/code/game/antagonist/station/renegade.dm
+++ b/code/game/antagonist/station/renegade.dm
@@ -50,8 +50,7 @@ var/datum/antagonist/renegade/renegades
var/gun_type = pick(spawn_guns)
var/obj/item/gun = new gun_type(get_turf(player))
- if(!(player.l_hand && player.r_hand))
- player.put_in_hands(gun)
+ player.put_in_hands(gun)
/proc/rightandwrong()
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 8ab1944f5e0..18704058d13 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -77,7 +77,7 @@ var/list/ghostteleportlocs = list()
/hook/startup/proc/setupGhostTeleportLocs()
for(var/area/AR in world)
if(ghostteleportlocs.Find(AR.name)) continue
- if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom))
+ if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
var/turf/picked = pick(get_area_turfs(AR.type))
@@ -122,8 +122,6 @@ area/space/atmosalert()
/area/space/partyalert()
return
-/area/turret_protected/
-
/area/arrival
requires_power = 0
@@ -2422,65 +2420,65 @@ area/space/atmosalert()
name = "Emergency Storage"
icon_state = "storage"
-/area/turret_protected/ai_upload
+/area/ai_upload
name = "\improper AI Upload Chamber"
icon_state = "ai_upload"
ambience = list('sound/ambience/ambimalf.ogg')
-/area/turret_protected/ai_upload_foyer
+/area/ai_upload_foyer
name = "AI Upload Access"
icon_state = "ai_foyer"
ambience = list('sound/ambience/ambimalf.ogg')
sound_env = SMALL_ENCLOSED
-/area/turret_protected/ai_server_room
+/area/ai_server_room
name = "Messaging Server Room"
icon_state = "ai_server"
sound_env = SMALL_ENCLOSED
-/area/turret_protected/ai
+/area/ai
name = "\improper AI Chamber"
icon_state = "ai_chamber"
ambience = list('sound/ambience/ambimalf.ogg')
-/area/turret_protected/ai_cyborg_station
+/area/ai_cyborg_station
name = "\improper Cyborg Station"
icon_state = "ai_cyborg"
sound_env = SMALL_ENCLOSED
-/area/turret_protected/aisat
+/area/aisat
name = "\improper AI Satellite"
icon_state = "ai"
-/area/turret_protected/aisat_interior
+/area/aisat_interior
name = "\improper AI Satellite"
icon_state = "ai"
-/area/turret_protected/AIsatextFP
+/area/AIsatextFP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextFS
+/area/AIsatextFS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextAS
+/area/AIsatextAS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextAP
+/area/AIsatextAP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/NewAIMain
+/area/NewAIMain
name = "\improper AI Main New"
icon_state = "storage"
@@ -2524,22 +2522,22 @@ area/space/atmosalert()
name = "\improper Telecoms Central Compartment"
icon_state = "tcomsatcham"
-/area/turret_protected/tcomsat
+/area/tcomsat
name = "\improper Telecoms Satellite"
icon_state = "tcomsatlob"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomfoyer
+/area/tcomfoyer
name = "\improper Telecoms Foyer"
icon_state = "tcomsatentrance"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomwest
+/area/tcomwest
name = "\improper Telecommunications Satellite West Wing"
icon_state = "tcomsatwest"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomeast
+/area/tcomeast
name = "\improper Telecommunications Satellite East Wing"
icon_state = "tcomsateast"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
@@ -2759,12 +2757,12 @@ var/list/the_station_areas = list (
/area/rnd,
/area/storage,
/area/construction,
- /area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0
+ /area/ai_monitored/storage/eva,
/area/ai_monitored/storage/secure,
- /area/ai_monitored/storage/emergency,
- /area/turret_protected/ai_upload, //do not try to simplify to "/area/turret_protected" --rastaf0
- /area/turret_protected/ai_upload_foyer,
- /area/turret_protected/ai,
+ /area/ai_monitored/storage/emergency,
+ /area/ai_upload,
+ /area/ai_upload_foyer,
+ /area/ai
)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 3bf5efab882..1c420728ba5 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -292,12 +292,14 @@ var/list/mob/living/forced_ambiance_list = new
mob << "The sudden appearance of gravity makes you fall to the floor!"
/area/proc/prison_break()
- for(var/obj/machinery/power/apc/temp_apc in src)
- temp_apc.overload_lighting(70)
- for(var/obj/machinery/door/airlock/temp_airlock in src)
- temp_airlock.prison_open()
- for(var/obj/machinery/door/window/temp_windoor in src)
- temp_windoor.open()
+ var/obj/machinery/power/apc/theAPC = get_apc()
+ if(theAPC.operating)
+ for(var/obj/machinery/power/apc/temp_apc in src)
+ temp_apc.overload_lighting(70)
+ for(var/obj/machinery/door/airlock/temp_airlock in src)
+ temp_airlock.prison_open()
+ for(var/obj/machinery/door/window/temp_windoor in src)
+ temp_windoor.open()
/area/proc/has_gravity()
return has_gravity
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index b37342ced52..3138c654394 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -47,6 +47,7 @@
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
+ circuit = /obj/item/weapon/circuitboard/clonescanner
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
@@ -55,7 +56,6 @@
/obj/machinery/dna_scannernew/New()
..()
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/clonescanner(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/micro_laser(src)
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 566cad6aceb..84d6bb85360 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -14,11 +14,12 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
var/isabsorbing = 0
var/geneticpoints = 5
var/max_geneticpoints = 5
- var/purchasedpowers = list()
+ var/list/purchased_powers = list()
var/mimicing = ""
var/cloaked = 0
var/armor_deployed = 0 //This is only used for changeling_generic_equip_all_slots() at the moment.
var/recursive_enhancement = 0 //Used to power up other abilities from the ling power with the same name.
+ var/list/purchased_powers_history = list() //Used for round-end report, includes respec uses too.
/datum/changeling/New(var/gender=FEMALE)
..()
@@ -60,10 +61,10 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
// Code to auto-purchase free powers.
for(var/datum/power/changeling/P in powerinstances)
if(!P.genomecost) // Is it free?
- if(!(P in mind.changeling.purchasedpowers)) // Do we not have it already?
+ if(!(P in mind.changeling.purchased_powers)) // Do we not have it already?
mind.changeling.purchasePower(mind, P.name, 0)// Purchase it. Don't remake our verbs, we're doing it after this.
- for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
+ for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
if(P.isVerb)
if(lesser_form && !P.allowduringlesserform) continue
if(!(P in src.verbs))
@@ -83,7 +84,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
//removes our changeling verbs
/mob/proc/remove_changeling_powers()
if(!mind || !mind.changeling) return
- for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
+ for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
if(P.isVerb)
verbs -= P.verbpath
diff --git a/code/game/gamemodes/changeling/generic_equip_procs.dm b/code/game/gamemodes/changeling/generic_equip_procs.dm
index 5569db85125..930e50c9c84 100644
--- a/code/game/gamemodes/changeling/generic_equip_procs.dm
+++ b/code/game/gamemodes/changeling/generic_equip_procs.dm
@@ -244,7 +244,7 @@
var/mob/living/carbon/human/M = src
- if(M.l_hand && M.r_hand) //Make sure our hands aren't full.
+ if(M.hands_are_full()) //Make sure our hands aren't full.
src << "Our hands are full. Drop something first."
return 0
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index 7c6f6746284..c0330fb0806 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -249,7 +249,7 @@ var/list/datum/power/changeling/powerinstances = list()
for(var/datum/power/changeling/P in powerinstances)
var/ownsthis = 0
- if(P in purchasedpowers)
+ if(P in purchased_powers)
ownsthis = 1
@@ -324,7 +324,7 @@ var/list/datum/power/changeling/powerinstances = list()
M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
return
- if(Thepower in purchasedpowers)
+ if(Thepower in purchased_powers)
M.current << "We have already evolved this ability!"
return
@@ -335,7 +335,10 @@ var/list/datum/power/changeling/powerinstances = list()
geneticpoints -= Thepower.genomecost
- purchasedpowers += Thepower
+ purchased_powers += Thepower
+
+ if(Thepower.genomecost > 0)
+ purchased_powers_history.Add("[Pname] ([Thepower.genomecost] points)")
if(!Thepower.isVerb && Thepower.verbpath)
call(M.current, Thepower.verbpath)()
diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm
index 6adead4b89f..d145f95946b 100644
--- a/code/game/gamemodes/changeling/powers/absorb.dm
+++ b/code/game/gamemodes/changeling/powers/absorb.dm
@@ -1,10 +1,10 @@
/datum/power/changeling/absorb_dna
name = "Absorb DNA"
- desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
+ desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger if they were of our kind."
genomecost = 0
verbpath = /mob/proc/changeling_absorb_dna
-//Absorbs the victim's DNA making them uncloneable. Requires a strong grip on the victim.
+//Absorbs the victim's DNA. Requires a strong grip on the victim.
//Doesn't cost anything as it's the most basic ability.
/mob/proc/changeling_absorb_dna()
set category = "Changeling"
@@ -27,9 +27,10 @@
src << "We do not know how to parse this creature's DNA!"
return
- if(HUSK in T.mutations)
- src << "This creature's DNA is ruined beyond useability!"
- return
+ if(HUSK in T.mutations) //Lings can always absorb other lings, unless someone beat them to it first.
+ if(!T.mind.changeling || T.mind.changeling && T.mind.changeling.geneticpoints < 0)
+ src << "This creature's DNA is ruined beyond useability!"
+ return
if(G.state != GRAB_KILL)
src << "We must have a tighter grip to absorb this creature."
diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm
index e1d66098513..7ab1cdda3b7 100644
--- a/code/game/gamemodes/changeling/powers/armblade.dm
+++ b/code/game/gamemodes/changeling/powers/armblade.dm
@@ -2,6 +2,7 @@
name = "Arm Blade"
desc = "We reform one of our arms into a deadly blade."
helptext = "We may retract our armblade by dropping it. It can deflect projectiles."
+ enhancedtext = "The blade will have armor peneratration."
genomecost = 2
verbpath = /mob/proc/changeling_arm_blade
@@ -10,9 +11,16 @@
set category = "Changeling"
set name = "Arm Blade (20)"
- if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade))
- return 1
- return 0
+ if(src.mind.changeling.recursive_enhancement)
+ if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade/greater))
+ src << "We prepare an extra sharp blade."
+ src.mind.changeling.recursive_enhancement = 0
+ return 1
+
+ else
+ if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade))
+ return 1
+ return 0
/obj/item/weapon/melee/arm_blade
name = "arm blade"
@@ -31,6 +39,11 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/creator //This is just like ninja swords, needed to make sure dumb shit that removes the sword doesn't make it stay around.
+/obj/item/weapon/melee/arm_blade/greater
+ name = "arm greatblade"
+ desc = "A grotesque blade made out of bone and flesh that cleaves through people and armor as a hot knife through butter."
+ armor_penetration = 30
+
/obj/item/weapon/melee/arm_blade/New(location)
..()
processing_objects |= src
@@ -43,7 +56,7 @@
/obj/item/weapon/melee/arm_blade/dropped(mob/user)
visible_message("With a sickening crunch, [creator] reforms their arm blade into an arm!",
"We assimilate the weapon back into our body.",
- "You hear organic matter ripping and tearing!")
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
spawn(1)
if(src)
@@ -55,7 +68,7 @@
..()
/obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords.
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
index 694e22e8dd2..dd1489248fe 100644
--- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
+++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
@@ -4,6 +4,7 @@
On demand, we can attempt to recharge anything in our active hand, or we can touch someone with an electrified hand, shocking them."
helptext = "We can shock someone by grabbing them and using this ability, or using the ability with an empty hand and touching them. \
Shocking someone costs ten chemicals per use."
+ enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power."
genomecost = 2
verbpath = /mob/proc/changeling_bioelectrogenesis
@@ -21,8 +22,14 @@
return 0
if(held_item == null)
- if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc.
- return 1
+ if(src.mind.changeling.recursive_enhancement)
+ if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent))
+ src << "We will shock others more efficently."
+ src.mind.changeling.recursive_enhancement = 0
+ return 1
+ else
+ if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc.
+ return 1
return 0
else
@@ -30,12 +37,11 @@
if(istype(held_item,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = held_item
if(G.affecting)
- G.affecting.electrocute_act(5,src,1.0,BP_TORSO)
- var/agony = 60 //The same as a stunbaton.
- var/stun = 0
- G.affecting.stun_effect_act(stun, agony, BP_TORSO, src)
+ G.affecting.electrocute_act(10,src,1.0,BP_TORSO)
+ var/agony = 80 //Does more than if hit with an electric hand, since grabbing is slower.
+ G.affecting.stun_effect_act(0, agony, BP_TORSO, src)
- msg_admin_attack("[key_name(src)] stunned [key_name(G.affecting)] with the [src].")
+ msg_admin_attack("[key_name(src)] shocked [key_name(G.affecting)] with the [src].")
visible_message("Arcs of electricity strike [G.affecting]!",
"Our hand channels raw electricity into [G.affecting].",
@@ -72,7 +78,7 @@
new /obj/effect/effect/sparks(T)
held_item.update_icon()
i--
- sleep(10)
+ sleep(1 SECOND)
success = 1
if(success == 0) //If we couldn't do anything with the ability, don't deduct the chemicals.
src << "We are unable to affect \the [held_item]."
@@ -85,6 +91,14 @@
desc = "You could probably shock someone badly if you touched them, or recharge something."
icon = 'icons/obj/weapons.dmi'
icon_state = "electric_hand"
+ var/shock_cost = 10
+ var/agony_amount = 60
+ var/electrocute_amount = 10
+
+/obj/item/weapon/electric_hand/efficent
+ shock_cost = 5
+ agony_amount = 80
+ electrocute_amount = 20
/obj/item/weapon/electric_hand/New()
if(ismob(loc))
@@ -108,22 +122,20 @@
if(istype(target,/mob/living/carbon))
var/mob/living/carbon/C = target
- if(user.mind.changeling.chem_charges < 10)
+ if(user.mind.changeling.chem_charges < shock_cost)
src << "We require more chemicals to electrocute [C]!"
return 0
- C.electrocute_act(5,src,1.0,BP_TORSO)
- var/agony = 60 //The same as a stunbaton.
- var/stun = 0
- C.stun_effect_act(stun, agony, BP_TORSO, src)
+ C.electrocute_act(electrocute_amount,src,1.0,BP_TORSO)
+ C.stun_effect_act(0, agony_amount, BP_TORSO, src)
- msg_admin_attack("[key_name(user)] stunned [key_name(C)] with the [src].")
+ msg_admin_attack("[key_name(user)] shocked [key_name(C)] with the [src].")
visible_message("Arcs of electricity strike [C]!",
"Our hand channels raw electricity into [C]",
"You hear sparks!")
//qdel(src) //Since we're no longer a one hit stun, we need to stick around.
- user.mind.changeling.chem_charges -= 10
+ user.mind.changeling.chem_charges -= shock_cost
return 1
else if(istype(target,/mob/living/silicon))
@@ -163,7 +175,7 @@
new /obj/effect/effect/sparks(Turf)
T.update_icon()
i--
- sleep(10)
+ sleep(1 SECOND)
success = 1
break
if(success == 0)
diff --git a/code/game/gamemodes/changeling/powers/cryo_sting.dm b/code/game/gamemodes/changeling/powers/cryo_sting.dm
index d6a4f6302bd..7fae4c16013 100644
--- a/code/game/gamemodes/changeling/powers/cryo_sting.dm
+++ b/code/game/gamemodes/changeling/powers/cryo_sting.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/cryo_sting
name = "Cryogenic Sting"
desc = "We silently sting a biological with a cocktail of chemicals that freeze them."
- helptext = "Does not provide a warning to the victim, though they will likely realize they are suddenly freezing."
+ helptext = "Does not provide a warning to the victim, though they will likely realize they are suddenly freezing. Has \
+ a three minute cooldown between uses."
enhancedtext = "Increases the amount of chemicals injected."
genomecost = 1
verbpath = /mob/proc/changeling_cryo_sting
diff --git a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
index 0b0b95589ca..8f7998f67a6 100644
--- a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
+++ b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/delayed_toxic_sting
name = "Delayed Toxic Sting"
- desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not implicate ourselves."
- helptext = "The toxin takes effect in about two minutes."
+ desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not \
+ implicate ourselves."
+ helptext = "The toxin takes effect in about two minutes. The sting has a three minute cooldown between uses."
enhancedtext = "The toxic damage is doubled."
genomecost = 1
verbpath = /mob/proc/changeling_delayed_toxic_sting
@@ -25,7 +26,7 @@
while(i)
T.adjustToxLoss(1)
i--
- sleep(20)
+ sleep(2 SECONDS)
src.verbs -= /mob/proc/changeling_delayed_toxic_sting
spawn(3 MINUTES)
src << "We are ready to use our delayed toxic string once more."
diff --git a/code/game/gamemodes/changeling/powers/electric_lockpick.dm b/code/game/gamemodes/changeling/powers/electric_lockpick.dm
index c8c87e6a9d3..40c4b372a04 100644
--- a/code/game/gamemodes/changeling/powers/electric_lockpick.dm
+++ b/code/game/gamemodes/changeling/powers/electric_lockpick.dm
@@ -78,6 +78,7 @@
else //Probably broken or no power.
user << "The door does not respond to the pulse."
door.add_fingerprint(user)
+ log_and_message_admins("finger-lockpicked \an [door].")
ling_datum.chem_charges -= 10
return 1
@@ -86,7 +87,7 @@
user << "We send an electrical pulse up our finger, and into \the [O]."
O.add_fingerprint(user)
O.emag_act(1,user,src)
- log_and_message_admins("emagged \an [O].")
+ log_and_message_admins("finger-lockpicked \an [O].")
ling_datum.chem_charges -= 10
return 1
diff --git a/code/game/gamemodes/changeling/powers/endoarmor.dm b/code/game/gamemodes/changeling/powers/endoarmor.dm
index c548e549f1b..4052568a50e 100644
--- a/code/game/gamemodes/changeling/powers/endoarmor.dm
+++ b/code/game/gamemodes/changeling/powers/endoarmor.dm
@@ -1,7 +1,7 @@
/datum/power/changeling/endoarmor
name = "Endoarmor"
desc = "We grow hard plating underneath our skin, making us more resilient to harm by increasing our maximum health potential by 50 points."
- helptext = "Our maximum health is increased to 150 health."
+ helptext = "Our maximum health is increased by 50 points."
genomecost = 1
isVerb = 0
verbpath = /mob/proc/changeling_endoarmor
diff --git a/code/game/gamemodes/changeling/powers/enfeebling_string.dm b/code/game/gamemodes/changeling/powers/enfeebling_string.dm
index 35d4ef7570c..94699995ff3 100644
--- a/code/game/gamemodes/changeling/powers/enfeebling_string.dm
+++ b/code/game/gamemodes/changeling/powers/enfeebling_string.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/enfeebling_string
name = "Enfeebling String"
desc = "We sting a biological with a potent toxin that will greatly weaken them for a short period of time."
- helptext = "Lowers the maximum health of the victim for a few minutes. This sting will also warn them of this."
+ helptext = "Lowers the maximum health of the victim for a few minutes. This sting will also warn them of this. Has a \
+ five minute coodown between uses."
enhancedtext = "Maximum health is lowered further."
genomecost = 1
verbpath = /mob/proc/changeling_enfeebling_string
@@ -17,17 +18,21 @@
if(ishuman(T))
var/mob/living/carbon/human/H = T
- var/effect = 30
+ var/effect = 30 //percent
if(src.mind.changeling.recursive_enhancement)
effect = effect + 20
src << "We make them extremely weak."
src.mind.changeling.recursive_enhancement = 0
+ var/health_to_take_away = H.maxHealth * (effect / 100)
- H.maxHealth -= effect
- H << "You feel a small prick and you feel weak."
- spawn(300) //Five minutes
+ H.maxHealth -= health_to_take_away
+ H << "You feel a small prick and you feel extremly weak!"
+ src.verbs -= /mob/proc/changeling_enfeebling_string
+ spawn(5 MINUTES)
+ src.verbs |= /mob/proc/changeling_enfeebling_string
+ src << "Our enfeebling string is ready to be used once more."
if(H) //Just incase we stop existing in five minutes for whatever reason.
- H.maxHealth += 30
+ H.maxHealth += health_to_take_away
if(!H.stat) //It'd be weird to no longer feel weak when you're dead.
H << "You no longer feel extremly weak."
feedback_add_details("changeling_powers","ES")
diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm
index 0046e1517c4..5a157cdbb72 100644
--- a/code/game/gamemodes/changeling/powers/fleshmend.dm
+++ b/code/game/gamemodes/changeling/powers/fleshmend.dm
@@ -31,10 +31,10 @@
C.adjustBruteLoss(-heal_amount)
C.adjustOxyLoss(-heal_amount)
C.adjustFireLoss(-heal_amount)
- sleep(10)
+ sleep(1 SECOND)
src.verbs -= /mob/proc/changeling_fleshmend
- spawn(500)
+ spawn(50 SECONDS)
src << "Our regeneration has slowed to normal levels."
src.verbs += /mob/proc/changeling_fleshmend
feedback_add_details("changeling_powers","FM")
diff --git a/code/game/gamemodes/changeling/powers/rapid_regen.dm b/code/game/gamemodes/changeling/powers/rapid_regen.dm
index a320c33b96a..6f2d43e5daa 100644
--- a/code/game/gamemodes/changeling/powers/rapid_regen.dm
+++ b/code/game/gamemodes/changeling/powers/rapid_regen.dm
@@ -48,7 +48,7 @@
new /obj/effect/gibspawner/human(T)
visible_message("With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!",
"We reform our body. We are whole once more.",
- "You hear organic matter ripping and tearing!")
feedback_add_details("changeling_powers","RR")
return 1
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/respec.dm b/code/game/gamemodes/changeling/powers/respec.dm
index f2bfe8f19cd..661a761d8c1 100644
--- a/code/game/gamemodes/changeling/powers/respec.dm
+++ b/code/game/gamemodes/changeling/powers/respec.dm
@@ -9,7 +9,7 @@
src.remove_changeling_powers() //First, remove the verbs.
var/datum/changeling/ling_datum = src.mind.changeling
- ling_datum.purchasedpowers = list() //Then wipe all the powers we bought.
+ ling_datum.purchased_powers = list() //Then wipe all the powers we bought.
ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum.
ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
ling_datum.chem_storage = 50
@@ -21,5 +21,7 @@
src << "We have removed our evolutions from this form, and are now ready to readapt."
+ ling_datum.purchased_powers_history.Add("Re-adapt (Reset to [ling_datum.max_geneticpoints])")
+
//Now to lose the verb, so no unlimited resets.
src.verbs -= /mob/proc/changeling_respec
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 7dc2310f789..647f5bd91f0 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -33,10 +33,13 @@
if(ishuman(C))
var/mob/living/carbon/human/H = src
H.restore_blood()
+ H.mutations.Remove(HUSK)
+ H.status_flags -= DISFIGURED
+ H.update_body(1)
C << "We have regenerated."
C.status_flags &= ~(FAKEDEATH)
C.update_canmove()
- C.mind.changeling.purchasedpowers -= C
+ C.mind.changeling.purchased_powers -= C
feedback_add_details("changeling_powers","CR")
C.stat = CONSCIOUS
src.verbs -= /mob/proc/changeling_revive
diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm
index 33d75c03a36..99f1a4d1303 100644
--- a/code/game/gamemodes/changeling/powers/transform.dm
+++ b/code/game/gamemodes/changeling/powers/transform.dm
@@ -37,6 +37,8 @@
if(ishuman(src))
var/mob/living/carbon/human/H = src
H.b_type = "AB+" //For some reason we have two blood types on the mob.
+ for(var/flavor in H.flavor_texts) //Nulls out flavor text, so we don't keep our previous mob's flavor.
+ flavor = null
src.real_name = chosen_dna.real_name
src.flavor_text = ""
src.UpdateAppearance()
diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm
index 0f7d6149d30..04404573e87 100644
--- a/code/game/gamemodes/events/power_failure.dm
+++ b/code/game/gamemodes/events/power_failure.dm
@@ -3,7 +3,7 @@
if(announce)
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
- var/list/skipped_areas = list(/area/turret_protected/ai)
+ var/list/skipped_areas = list(/area/ai)
for(var/obj/machinery/power/smes/S in world)
var/area/current_area = get_area(S)
@@ -24,7 +24,7 @@
C.cell.charge = 0
/proc/power_restore(var/announce = 1)
- var/list/skipped_areas = list(/area/turret_protected/ai)
+ var/list/skipped_areas = list(/area/ai)
if(announce)
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm
index b33a5e49d8d..864ba0722de 100644
--- a/code/game/gamemodes/malfunction/malf_hardware.dm
+++ b/code/game/gamemodes/malfunction/malf_hardware.dm
@@ -60,11 +60,6 @@
/datum/malf_hardware/strong_turrets/install()
..()
- for(var/obj/machinery/turret/T in machines)
- T.maxhealth = round(initial(T.maxhealth) * 1.4)
- T.shot_delay = round(initial(T.shot_delay) / 2)
- T.auto_repair = 1
- T.active_power_usage = round(initial(T.active_power_usage) * 5)
for(var/obj/machinery/porta_turret/T in machines)
T.maxhealth = round(initial(T.maxhealth) * 1.4)
T.shot_delay = round(initial(T.shot_delay) / 2)
diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm
index f5b1f4ed290..aa391489fc0 100644
--- a/code/game/jobs/job/science.dm
+++ b/code/game/jobs/job/science.dm
@@ -124,7 +124,7 @@
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_r_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index d3603fe96e1..699898fde07 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -54,6 +54,7 @@
var/wiresexposed = 0 // If it's been screwdrivered open.
var/aidisabled = 0
var/shorted = 0
+ circuit = /obj/item/weapon/circuitboard/airalarm
var/datum/wires/alarm/wires
@@ -61,7 +62,6 @@
var/screen = AALARM_SCREEN_MAIN
var/area_uid
var/area/alarm_area
- var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
var/target_temperature = T0C+20
var/regulating_temperature = 0
@@ -105,23 +105,8 @@
wires = null
return ..()
-/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
+/obj/machinery/alarm/New()
..()
-
- if(building)
- if(loc)
- src.loc = loc
-
- if(dir)
- src.set_dir(dir)
-
- buildstage = 0
- wiresexposed = 1
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
- pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
- update_icon()
- return
-
first_run()
/obj/machinery/alarm/proc/first_run()
@@ -148,7 +133,7 @@
elect_master()
/obj/machinery/alarm/process()
- if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
+ if((stat & (NOPOWER|BROKEN)) || shorted)
return
var/turf/simulated/location = loc
@@ -605,9 +590,6 @@
data["thresholds"] = thresholds
/obj/machinery/alarm/CanUseTopic(var/mob/user, var/datum/topic_state/state, var/href_list = list())
- if(buildstage != 2)
- return STATUS_CLOSE
-
if(aidisabled && isAI(user))
user << "AI control for \the [src] interface has been disabled."
return STATUS_CLOSE
@@ -763,73 +745,43 @@
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
+ if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
+ //user << "You pop the Air Alarm's maintence panel open."
+ wiresexposed = !wiresexposed
+ user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
+ update_icon()
+ return
- switch(buildstage)
- if(2)
- if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
- //user << "You pop the Air Alarm's maintence panel open."
- wiresexposed = !wiresexposed
- user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
- update_icon()
- return
+ 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 = "airalarm"
+ A.pixel_x = pixel_x
+ A.pixel_y = pixel_y
+ A.set_dir(dir)
+ A.circuit = M
+ A.anchored = 1
+ for (var/obj/C in src)
+ C.forceMove(loc)
+ A.state = 2
+ A.icon_state = "airalarm_2"
+ M.deconstruct(src)
+ qdel(src)
+ return
- 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)
- buildstage = 1
- update_icon()
- return
-
- if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
- if(stat & (NOPOWER|BROKEN))
- user << "It does nothing"
- return
- else
- if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
- locked = !locked
- user << "You [ locked ? "lock" : "unlock"] the Air Alarm interface."
- else
- user << "Access denied."
+ if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
+ if(stat & (NOPOWER|BROKEN))
+ user << "It does nothing"
return
-
- if(1)
- if(istype(W, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/C = W
- if (C.use(5))
- user << "You wire \the [src]."
- buildstage = 2
- update_icon()
- first_run()
- return
- else
- user << "You need 5 pieces of cable to do wire \the [src]."
- return
-
- else if(istype(W, /obj/item/weapon/crowbar))
- user << "You start prying out the circuit."
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user,20))
- user << "You pry out the circuit!"
- var/obj/item/weapon/airalarm_electronics/circuit = new /obj/item/weapon/airalarm_electronics()
- circuit.loc = user.loc
- buildstage = 0
- update_icon()
- return
- if(0)
- if(istype(W, /obj/item/weapon/airalarm_electronics))
- user << "You insert the circuit!"
- qdel(W)
- buildstage = 1
- update_icon()
- return
-
- else if(istype(W, /obj/item/weapon/wrench))
- user << "You remove the fire alarm assembly from the wall!"
- new /obj/item/frame/air_alarm(get_turf(user))
- playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- qdel(src)
-
+ else
+ if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
+ locked = !locked
+ user << "You [ locked ? "lock" : "unlock"] the Air Alarm interface."
+ else
+ user << "Access denied."
return ..()
/obj/machinery/alarm/power_change()
@@ -839,14 +791,10 @@
/obj/machinery/alarm/examine(mob/user)
..(user)
- if (buildstage < 2)
- user << "It is not wired."
- if (buildstage < 1)
- user << "The circuit is missing."
/*
AIR ALARM CIRCUIT
Just a object used in constructing air alarms
-*/
+
/obj/item/weapon/airalarm_electronics
name = "air alarm electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
@@ -854,7 +802,7 @@ Just a object used in constructing air alarms
desc = "Looks like a circuit. Probably is."
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
-
+*/
/*
FIRE ALARM
*/
@@ -875,20 +823,13 @@ FIRE ALARM
power_channel = ENVIRON
var/last_process = 0
var/wiresexposed = 0
- var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
var/seclevel
+ circuit = /obj/item/weapon/circuitboard/firealarm
/obj/machinery/firealarm/update_icon()
overlays.Cut()
if(wiresexposed)
- switch(buildstage)
- if(2)
- icon_state="fire_b2"
- if(1)
- icon_state="fire_b1"
- if(0)
- icon_state="fire_b0"
set_light(0)
return
@@ -932,56 +873,36 @@ FIRE ALARM
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
- if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
+ if (istype(W, /obj/item/weapon/screwdriver))
wiresexposed = !wiresexposed
update_icon()
return
if(wiresexposed)
- switch(buildstage)
- if(2)
- if (istype(W, /obj/item/device/multitool))
- src.detecting = !( src.detecting )
- if (src.detecting)
- user.visible_message("\The [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
- else
- user.visible_message("\The [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
- else if (istype(W, /obj/item/weapon/wirecutters))
- user.visible_message("\The [user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
- new/obj/item/stack/cable_coil(get_turf(src), 5)
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- buildstage = 1
- update_icon()
- if(1)
- if(istype(W, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/C = W
- if (C.use(5))
- user << "You wire \the [src]."
- buildstage = 2
- return
- else
- user << "You need 5 pieces of cable to wire \the [src]."
- return
- else if(istype(W, /obj/item/weapon/crowbar))
- user << "You pry out the circuit!"
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- spawn(20)
- var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics()
- circuit.loc = user.loc
- buildstage = 0
- update_icon()
- if(0)
- if(istype(W, /obj/item/weapon/firealarm_electronics))
- user << "You insert the circuit!"
- qdel(W)
- buildstage = 1
- update_icon()
-
- else if(istype(W, /obj/item/weapon/wrench))
- user << "You remove the fire alarm assembly from the wall!"
- new /obj/item/frame/fire_alarm(get_turf(user))
- playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- qdel(src)
+ if (istype(W, /obj/item/device/multitool))
+ src.detecting = !( src.detecting )
+ if (src.detecting)
+ user.visible_message("\The [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
+ else
+ user.visible_message("\The [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
+ else if (istype(W, /obj/item/weapon/wirecutters))
+ user.visible_message("\The [user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
+ new/obj/item/stack/cable_coil(get_turf(src), 5)
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
+ var/obj/item/weapon/circuitboard/M = new circuit( A )
+ A.frame_type = "firealarm"
+ A.pixel_x = pixel_x
+ A.pixel_y = pixel_y
+ A.set_dir(dir)
+ A.circuit = M
+ A.anchored = 1
+ for (var/obj/C in src)
+ C.forceMove(loc)
+ A.state = 2
+ A.icon_state = "firealarm_2"
+ M.deconstruct(src)
+ qdel(src)
return
src.alarm()
@@ -1016,9 +937,6 @@ FIRE ALARM
if(user.stat || stat & (NOPOWER|BROKEN))
return
- if (buildstage != 2)
- return
-
user.set_machine(src)
var/area/A = src.loc
var/d1
@@ -1061,9 +979,6 @@ FIRE ALARM
if (usr.stat || stat & (BROKEN|NOPOWER))
return
- if (buildstage != 2)
- return
-
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["reset"])
@@ -1106,23 +1021,6 @@ FIRE ALARM
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return
-
-
-/obj/machinery/firealarm/New(loc, dir, building)
- ..()
-
- if(loc)
- src.loc = loc
-
- if(dir)
- src.set_dir(dir)
-
- if(building)
- buildstage = 0
- wiresexposed = 1
- pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
- pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
-
/obj/machinery/firealarm/proc/set_security_level(var/newlevel)
if(seclevel != newlevel)
seclevel = newlevel
@@ -1135,7 +1033,7 @@ FIRE ALARM
/*
FIRE ALARM CIRCUIT
Just a object used in constructing fire alarms
-*/
+
/obj/item/weapon/firealarm_electronics
name = "fire alarm electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
@@ -1143,7 +1041,7 @@ Just a object used in constructing fire alarms
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
-
+*/
/obj/machinery/partyalarm
name = "\improper PARTY BUTTON"
desc = "Cuban Pete is in the house!"
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 972d9a717bf..14512fb8391 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 2000
-
+ circuit = /obj/item/weapon/circuitboard/autolathe
var/list/machine_recipes
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
var/list/storage_capacity = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
@@ -30,14 +30,13 @@
wires = new(src)
//Create parts for lathe.
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
-
+
/obj/machinery/autolathe/Destroy()
qdel(wires)
wires = null
diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm
index 8c4c2447998..244b74f17fc 100644
--- a/code/game/machinery/autolathe_datums.dm
+++ b/code/game/machinery/autolathe_datums.dm
@@ -158,12 +158,12 @@
/datum/autolathe/recipe/airalarm
name = "air alarm electronics"
- path = /obj/item/weapon/airalarm_electronics
+ path = /obj/item/weapon/circuitboard/airalarm
category = "Engineering"
/datum/autolathe/recipe/firealarm
name = "fire alarm electronics"
- path = /obj/item/weapon/firealarm_electronics
+ path = /obj/item/weapon/circuitboard/firealarm
category = "Engineering"
/datum/autolathe/recipe/powermodule
@@ -171,6 +171,96 @@
path = /obj/item/weapon/module/power_control
category = "Engineering"
+/datum/autolathe/recipe/statusdisplay
+ name = "status display electronics"
+ path = /obj/item/weapon/circuitboard/status_display
+ category = "Engineering"
+
+/datum/autolathe/recipe/aistatusdisplay
+ name = "ai status display electronics"
+ path = /obj/item/weapon/circuitboard/ai_status_display
+ category = "Engineering"
+
+/datum/autolathe/recipe/newscaster
+ name = "newscaster electronics"
+ path = /obj/item/weapon/circuitboard/newscaster
+ category = "Engineering"
+
+/datum/autolathe/recipe/atm
+ name = "atm electronics"
+ path = /obj/item/weapon/circuitboard/atm
+ category = "Engineering"
+
+/datum/autolathe/recipe/intercom
+ name = "intercom electronics"
+ path = /obj/item/weapon/circuitboard/intercom
+ category = "Engineering"
+
+/datum/autolathe/recipe/holopad
+ name = "holopad electronics"
+ path = /obj/item/weapon/circuitboard/holopad
+ category = "Engineering"
+
+/datum/autolathe/recipe/guestpass
+ name = "guestpass console electronics"
+ path = /obj/item/weapon/circuitboard/guestpass
+ category = "Engineering"
+
+/datum/autolathe/recipe/entertainment
+ name = "entertainment camera electronics"
+ path = /obj/item/weapon/circuitboard/security/telescreen/entertainment
+ category = "Engineering"
+
+/datum/autolathe/recipe/keycard
+ name = "keycard authenticator electronics"
+ path = /obj/item/weapon/circuitboard/keycard_auth
+ category = "Engineering"
+
+/datum/autolathe/recipe/photocopier
+ name = "photocopier electronics"
+ path = /obj/item/weapon/circuitboard/photocopier
+ category = "Engineering"
+
+/datum/autolathe/recipe/fax
+ name = "fax machine electronics"
+ path = /obj/item/weapon/circuitboard/fax
+ category = "Engineering"
+
+/datum/autolathe/recipe/conveyor
+ name = "conveyor electronics"
+ path = /obj/item/weapon/circuitboard/conveyor
+ category = "Engineering"
+
+/datum/autolathe/recipe/microwave
+ name = "microwave electronics"
+ path = /obj/item/weapon/circuitboard/microwave
+ category = "Engineering"
+
+/datum/autolathe/recipe/vending
+ name = "vending machine electronics"
+ path = /obj/item/weapon/circuitboard/vending
+ category = "Engineering"
+
+/datum/autolathe/recipe/washing
+ name = "washing machine electronics"
+ path = /obj/item/weapon/circuitboard/washing
+ category = "Engineering"
+
+/datum/autolathe/recipe/motor
+ name = "motor"
+ path = /obj/item/weapon/stock_parts/motor
+ category = "Engineering"
+
+/datum/autolathe/recipe/gear
+ name = "gear"
+ path = /obj/item/weapon/stock_parts/gear
+ category = "Engineering"
+
+/datum/autolathe/recipe/spring
+ name = "spring"
+ path = /obj/item/weapon/stock_parts/spring
+ category = "Engineering"
+
/datum/autolathe/recipe/rcd_ammo
name = "matter cartridge"
path = /obj/item/weapon/rcd_ammo
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index 61ed92d58e5..f2500f0afaa 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -5,6 +5,7 @@
icon_state = "biogen-stand"
density = 1
anchored = 1
+ circuit = /obj/item/weapon/circuitboard/biogenerator
use_power = 1
idle_power_usage = 40
var/processing = 0
@@ -23,7 +24,6 @@
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/biogenerator(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index cb0d95c1df2..291b9852949 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -33,6 +33,8 @@
var/on_open_network = 0
+ var/affected_by_emp_until = 0
+
/obj/machinery/camera/New()
wires = new(src)
assembly = new(src)
@@ -62,22 +64,29 @@
wires = null
return ..()
+/obj/machinery/camera/process()
+ if((stat & EMPED) && world.time >= affected_by_emp_until)
+ stat &= ~EMPED
+ cancelCameraAlarm()
+ update_icon()
+ update_coverage()
+ return internal_process()
+
+/obj/machinery/camera/proc/internal_process()
+ return
+
/obj/machinery/camera/emp_act(severity)
- if(!isEmpProof())
- if(prob(100/severity))
+ if(!isEmpProof() && prob(100/severity))
+ if(!affected_by_emp_until || (world.time < affected_by_emp_until))
+ affected_by_emp_until = max(affected_by_emp_until, world.time + (90 SECONDS / severity))
+ else
stat |= EMPED
set_light(0)
+ triggerCameraAlarm()
kick_viewers()
- triggerCameraAlarm(30 / severity)
update_icon()
update_coverage()
-
- spawn(900)
- stat &= ~EMPED
- cancelCameraAlarm()
- update_icon()
- update_coverage()
- ..()
+ processing_objects |= src
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
take_damage(P.get_structure_damage())
@@ -105,7 +114,6 @@
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
-
if(!istype(user))
return
@@ -114,7 +122,6 @@
user.do_attack_animation(src)
visible_message("\The [user] slashes at [src]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
- icon_state = "[initial(icon_state)]1"
add_hiddenprint(user)
destroy()
@@ -176,7 +183,7 @@
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
- if (S.current == src)
+ if (S.current_camera == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("
[][]", itemname, info), text("window=[]", itemname))
@@ -214,8 +221,7 @@
//legacy support, if choice is != 1 then just kick viewers without changing status
kick_viewers()
else
- update_coverage()
- set_status( !src.status )
+ set_status(!src.status)
if (!(src.status))
if(user)
visible_message(" [user] has deactivated [src]!")
@@ -257,7 +263,7 @@
/obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus)
status = newstatus
- invalidateCameraCache()
+ update_coverage()
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they couldn't use it anyway?
@@ -273,7 +279,7 @@
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
- if (S.current == src)
+ if (S.current_camera == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index 7821b27f263..eac1f89386f 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -5,7 +5,7 @@
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
flags = PROXMOVE
-/obj/machinery/camera/process()
+/obj/machinery/camera/internal_process()
// motion camera event loop
if (stat & (EMPED|NOPOWER))
return
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index a06b22927db..3f7a8d600ce 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -30,6 +30,7 @@
desc = "An electronically-lockable pod for growing organic tissue."
density = 1
anchored = 1
+ circuit = /obj/item/weapon/circuitboard/clonepod
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_0"
req_access = list(access_genetics) //For premature unlocking.
@@ -47,7 +48,6 @@
/obj/machinery/clonepod/New()
..()
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 87cfeea09b3..189fe5b40a8 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -393,14 +393,14 @@
dat += "
You ran out of food and starved."
if(emagged)
user.nutrition = 0 //yeah you pretty hongry
- user << "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor."
+ user << "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor."
if(fuel <= 0)
dat += "
You ran out of fuel, and drift, slowly, into a star."
if(emagged)
var/mob/living/M = user
M.adjust_fire_stacks(5)
M.IgniteMob() //flew into a star, so you're on fire
- user << "You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames."
+ user << "You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames."
dat += "
OK...
"
if(emagged)
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index e1c6658ab44..4b64cbadce9 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -1,28 +1,25 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-/var/camera_cache_id = 1
-
-/proc/invalidateCameraCache()
- camera_cache_id = (++camera_cache_id % 999999)
-
/obj/machinery/computer/security
name = "security camera monitor"
desc = "Used to access the various cameras on the station."
icon_keyboard = "security_key"
icon_screen = "cameras"
light_color = "#a91515"
- var/obj/machinery/camera/current = null
+ var/current_network = null
+ var/obj/machinery/camera/current_camera = null
var/last_pic = 1.0
var/list/network
var/mapping = 0//For the overview file, interesting bit of code.
var/cache_id = 0
circuit = /obj/item/weapon/circuitboard/security
- var/camera_cache = null
New()
if(!network)
- network = station_networks
+ network = station_networks.Copy()
..()
+ if(network.len)
+ current_network = network[1]
attack_ai(var/mob/user as mob)
return attack_hand(user)
@@ -30,9 +27,9 @@
check_eye(var/mob/user as mob)
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
return -1
- if(!current)
+ if(!current_camera)
return 0
- var/viewflag = current.check_eye(user)
+ var/viewflag = current_camera.check_eye(user)
if ( viewflag < 0 ) //camera doesn't work
reset_current()
return viewflag
@@ -44,25 +41,11 @@
var/data[0]
- data["current"] = null
-
- if(camera_cache_id != cache_id)
- cache_id = camera_cache_id
- cameranet.process_sort()
-
- var/cameras[0]
- for(var/obj/machinery/camera/C in cameranet.cameras)
- if(!can_access_camera(C))
- continue
-
- var/cam = C.nano_structure()
- cameras[++cameras.len] = cam
-
- camera_cache=json_encode(cameras)
-
- if(current)
- data["current"] = current.nano_structure()
- data["cameras"] = list("__json_cache" = camera_cache)
+ data["current_camera"] = current_camera ? current_camera.nano_structure() : null
+ data["current_network"] = current_network
+ data["networks"] = network ? network : list()
+ if(current_network)
+ data["cameras"] = camera_repository.cameras_in_network(current_network)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -75,22 +58,32 @@
ui.set_initial_data(data)
ui.open()
- ui.set_auto_update(1)
Topic(href, href_list)
- if(href_list["switchTo"])
+ if(..())
+ return 1
+ if(href_list["switch_camera"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
- var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras
- if(!C) return
+ var/obj/machinery/camera/C = locate(href_list["switch_camera"]) in cameranet.cameras
+ if(!C)
+ return
+ if(!(current_network in C.network))
+ return
switch_to_camera(usr, C)
return 1
+ else if(href_list["switch_network"])
+ if(src.z>6 || stat&(NOPOWER|BROKEN)) return
+ if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
+ if(href_list["switch_network"] in network)
+ current_network = href_list["switch_network"]
+ return 1
else if(href_list["reset"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
reset_current()
- usr.reset_view(current)
+ usr.reset_view(current_camera)
return 1
else
. = ..()
@@ -105,12 +98,6 @@
user.set_machine(src)
ui_interact(user)
- proc/can_access_camera(var/obj/machinery/camera/C)
- var/list/shared_networks = src.network & C.network
- if(shared_networks.len)
- return 1
- return 0
-
proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
if(isAI(user))
@@ -126,7 +113,7 @@
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
return 0
set_current(C)
- user.reset_view(current)
+ user.reset_view(current_camera)
check_eye(user)
return 1
@@ -160,26 +147,37 @@
if(can_access_camera(jump_to))
switch_to_camera(user,jump_to)
+/obj/machinery/computer/security/process()
+ if(cache_id != camera_repository.camera_cache_id)
+ cache_id = camera_repository.camera_cache_id
+ nanomanager.update_uis(src)
+
+/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
+ var/list/shared_networks = src.network & C.network
+ if(shared_networks.len)
+ return 1
+ return 0
+
/obj/machinery/computer/security/proc/set_current(var/obj/machinery/camera/C)
- if(current == C)
+ if(current_camera == C)
return
- if(current)
+ if(current_camera)
reset_current()
- src.current = C
- if(current)
+ src.current_camera = C
+ if(current_camera)
use_power = 2
- var/mob/living/L = current.loc
+ var/mob/living/L = current_camera.loc
if(istype(L))
L.tracking_initiated()
/obj/machinery/computer/security/proc/reset_current()
- if(current)
- var/mob/living/L = current.loc
+ if(current_camera)
+ var/mob/living/L = current_camera.loc
if(istype(L))
L.tracking_cancelled()
- current = null
+ current_camera = null
use_power = 1
//Camera control: mouse.
@@ -192,7 +190,7 @@
/mob/Move(n,direct)
if(istype(machine,/obj/machinery/computer/security))
var/obj/machinery/computer/security/console = machine
- var/turf/T = get_turf(console.current)
+ var/turf/T = get_turf(console.current_camera)
for(var/i;i<10;i++)
T = get_step(T,direct)
console.jump_on_click(src,T)
@@ -206,7 +204,7 @@
icon_keyboard = null
icon_screen = null
light_range_on = 0
- network = list("thunder")
+ network = list(NETWORK_THUNDER)
density = 0
circuit = null
@@ -217,8 +215,8 @@
icon_screen = "entertainment"
light_color = "#FFEEDB"
light_range_on = 2
- circuit = null
-
+ network = list(NETWORK_THUNDER)
+ circuit = /obj/item/weapon/circuitboard/security/telescreen/entertainment
/obj/machinery/computer/security/wooden_tv
name = "security camera monitor"
desc = "An old TV hooked into the stations camera network."
@@ -228,7 +226,6 @@
circuit = null
light_color = "#3848B3"
light_power_on = 0.5
-
/obj/machinery/computer/security/mining
name = "outpost camera monitor"
desc = "Used to access the various cameras on the outpost."
@@ -237,7 +234,6 @@
network = list("MINE")
circuit = /obj/item/weapon/circuitboard/security/mining
light_color = "#F9BBFC"
-
/obj/machinery/computer/security/engineering
name = "engineering camera monitor"
desc = "Used to monitor fires and breaches."
@@ -245,19 +241,16 @@
icon_screen = "engie_cams"
circuit = /obj/item/weapon/circuitboard/security/engineering
light_color = "#FAC54B"
-
/obj/machinery/computer/security/engineering/New()
if(!network)
- network = engineering_networks
+ network = engineering_networks.Copy()
..()
-
/obj/machinery/computer/security/nuclear
name = "head mounted camera monitor"
desc = "Used to access the built-in cameras in helmets."
icon_state = "syndicam"
network = list(NETWORK_MERCENARY)
circuit = null
-
/obj/machinery/computer/security/nuclear/New()
..()
- req_access = list(150)
+ req_access = list(150)
\ No newline at end of file
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index d9d5f4707be..6f380739cc4 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 300
active_power_usage = 300
- var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
+ frame_type = "computer"
var/processing = 0
var/icon_keyboard = "generic_key"
@@ -98,23 +98,28 @@
/obj/machinery/computer/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/computerframe/A = new /obj/structure/computerframe( src.loc )
+ 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 = M.board_type
for (var/obj/C in src)
- C.loc = src.loc
+ C.forceMove(loc)
if (src.stat & BROKEN)
user << "The broken glass falls out."
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
- A.icon_state = "3"
+ A.icon_state = "[A.frame_type]_3"
else
user << "You disconnect the monitor."
A.state = 4
- A.icon_state = "4"
+ A.icon_state = "[A.frame_type]_4"
+ A.pixel_x = pixel_x
+ A.pixel_y = pixel_y
M.deconstruct(src)
qdel(src)
else
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index ccbce91b619..648df34dc0c 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -46,6 +46,7 @@
icon_keyboard = null
icon_screen = "pass"
density = 0
+ circuit = /obj/item/weapon/circuitboard/guestpass
var/obj/item/weapon/card/id/giver
var/list/accesses = list()
@@ -60,11 +61,30 @@
..()
uid = "[rand(100,999)]-G[rand(10,99)]"
-/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
- if(istype(O, /obj/item/weapon/card/id))
- if(!giver && user.unEquip(O))
- O.loc = src
- giver = O
+/obj/machinery/computer/guestpass/attackby(obj/I, mob/user)
+ 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 = "guestpass"
+ 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 = "guestpass_4"
+ M.deconstruct(src)
+ qdel(src)
+ return
+ if(istype(I, /obj/item/weapon/card/id))
+ if(!giver && user.unEquip(I))
+ I.loc = src
+ giver = I
updateUsrDialog()
else if(giver)
user << "There is already ID card inside."
diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm
index c2c45987063..1c54fb0f4ce 100644
--- a/code/game/machinery/computer/prisonshuttle.dm
+++ b/code/game/machinery/computer/prisonshuttle.dm
@@ -26,32 +26,6 @@ var/prison_shuttle_timeleft = 0
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
- attackby(I as obj, user as mob)
- if(istype(I, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.anchored = 1
-
- if (src.stat & BROKEN)
- user << "The broken glass falls out."
- new /obj/item/weapon/material/shard( src.loc )
- A.state = 3
- A.icon_state = "3"
- else
- user << "You disconnect the monitor."
- A.state = 4
- A.icon_state = "4"
-
- qdel(src)
- else
- return src.attack_hand(user)
-
-
attack_hand(var/mob/user as mob)
if(!src.allowed(user) && (!hacked))
user << "Access Denied."
diff --git a/code/game/machinery/computer3/computer.dm b/code/game/machinery/computer3/computer.dm
index 37d9a67d924..e0040a6d838 100644
--- a/code/game/machinery/computer3/computer.dm
+++ b/code/game/machinery/computer3/computer.dm
@@ -29,7 +29,7 @@
// when you had to search the list to find what you had.
// Mostly decorative, holds the OS rom
- var/obj/item/part/computer/circuitboard/circuit
+ var/obj/item/part/computer/circuitboard/circuitb
// Storage
var/obj/item/part/computer/storage/hdd/hdd = null
@@ -97,11 +97,11 @@
overlays += kb
if(!built)
- if(!circuit || !istype(circuit))
- circuit = new(src)
- if(circuit.OS)
- os = circuit.OS
- circuit.OS.computer = src
+ if(!circuitb || !istype(circuitb))
+ circuitb = new(src)
+ if(circuitb.OS)
+ os = circuitb.OS
+ circuitb.OS.computer = src
else
os = null
@@ -121,10 +121,10 @@
floppy.addfile(P)
program = P
else
- circuit.OS = P
- circuit.OS.computer = src
- os = circuit.OS
- circuit.name = "Circuitboard ([P])"
+ circuitb.OS = P
+ circuitb.OS.computer = src
+ os = circuitb.OS
+ circuitb.name = "Circuitboard ([P])"
if(hdd) // Spawn files
diff --git a/code/game/machinery/computer3/computers/camera.dm b/code/game/machinery/computer3/computers/camera.dm
index 5a1b3acc0e2..0f92519c361 100644
--- a/code/game/machinery/computer3/computers/camera.dm
+++ b/code/game/machinery/computer3/computers/camera.dm
@@ -26,7 +26,7 @@
New()
..(built=0)
os = program
- circuit.OS = os
+ circuitb.OS = os
/obj/machinery/computer3/security/mining
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 08d47db1582..266aeb2f234 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -221,7 +221,7 @@
if (stat & BROKEN)
new /obj/item/weapon/circuitboard/broken(src.loc)
else
- new/obj/item/weapon/airalarm_electronics(src.loc)
+ new/obj/item/weapon/circuitboard/airalarm(src.loc)
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
FA.anchored = 1
diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm
index c01fff5bed3..a96065d2c6d 100644
--- a/code/game/machinery/doors/firedoor_assembly.dm
+++ b/code/game/machinery/doors/firedoor_assembly.dm
@@ -36,7 +36,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
new/obj/item/stack/cable_coil(src.loc, 1)
wired = 0
- else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
+ else if(istype(C, /obj/item/weapon/circuitboard/airalarm) && wired)
if(anchored)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("[user] has inserted a circuit into \the [src]!",
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
new file mode 100644
index 00000000000..35f0cf6af0c
--- /dev/null
+++ b/code/game/machinery/frame.dm
@@ -0,0 +1,412 @@
+/obj/structure/frame
+ anchored = 0
+ name = "frame"
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "machine_0"
+ var/state = 0
+ var/obj/item/weapon/circuitboard/circuit = null
+ var/need_circuit = 1
+ var/frame_type = "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", "vending", "recharger", "wrecharger", "washing", "grinder")
+ var/list/computers = list("computer", "holopad")
+ var/list/displays = list("display", "guestpass", "newscaster", "atm")
+ var/list/no_circuit = list("wrecharger", "recharger", "grinder","conveyor")
+
+/obj/structure/frame/proc/update_desc()
+ var/D
+ if(req_components)
+ var/list/component_list = new
+ for(var/I in req_components)
+ if(req_components[I] > 0)
+ component_list += "[num2text(req_components[I])] [req_component_names[I]]"
+ D = "Requires [english_list(component_list)]."
+ desc = D
+
+/obj/structure/frame/proc/check_components(mob/user as mob)
+ components = list()
+ req_components = circuit.req_components.Copy()
+ for(var/A in circuit.req_components)
+ req_components[A] = circuit.req_components[A]
+ req_component_names = circuit.req_components.Copy()
+ for(var/A in req_components)
+ var/cp = text2path(A)
+ var/obj/ct = new cp() // have to quickly instantiate it get name
+ req_component_names[A] = ct.name
+
+/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/obj/item/frame/frame_type, mob/user as mob)
+ ..()
+ if(building)
+ src.frame_type = frame_type
+ icon_state = "[frame_type]_0"
+
+ if(frame_type in alarms)
+ 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 == "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
+
+ update_icon()
+ return
+
+ if(frame_type in displays)
+ if(loc)
+ src.loc = loc
+
+ if(frame_type == "display" || frame_type == "atm")
+ 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)
+ need_circuit = 0
+ if(frame_type == "wrecharger")
+ circuit = new /obj/item/weapon/circuitboard/recharger/wrecharger(src)
+ if(loc)
+ src.loc = loc
+
+ 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(dir)
+ src.set_dir(dir)
+
+ if(frame_type == "computer")
+ density = 1
+ if(frame_type in machines)
+ density = 1
+ return
+
+/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
+ if(istype(P, /obj/item/weapon/wrench))
+ if(state == 0)
+ 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
+ if(!need_circuit && circuit)
+ src.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)
+ 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
+
+ if(istype(P, /obj/item/weapon/weldingtool))
+ if(state == 0)
+ var/obj/item/weapon/weldingtool/WT = P
+ 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)
+ var/obj/item/weapon/circuitboard/B = P
+ if(B.board_type == frame_type)
+ 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
+ user.drop_item()
+ P.loc = src
+ if(frame_type in machines) //because machines are assholes
+ check_components()
+ update_desc()
+ return
+ else
+ user << "This frame does not accept circuit boards of this type!"
+ return
+
+ 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
+
+ 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
+
+ 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
+
+ if(state == 3)
+ if(frame_type in machines)
+ var/component_check = 1
+ for(var/R in req_components)
+ if(req_components[R] > 0)
+ component_check = 0
+ 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)
+ if(!new_machine.component_parts)
+ for(var/obj/O in src.components)
+ O.forceMove(null)
+ new_machine.RefreshParts()
+
+ src.circuit.construct(new_machine)
+ new_machine.pixel_x = src.pixel_x
+ new_machine.pixel_y = src.pixel_y
+ qdel(src)
+ return
+
+ if(frame_type in alarms)
+ 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
+ B.set_dir(dir)
+ src.circuit.construct(B)
+ qdel(src)
+ return
+
+ if(state == 4)
+ if(frame_type in computers)
+ 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
+ src.circuit.construct(B)
+ qdel(src)
+ return
+
+ if(frame_type in displays)
+ 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
+ src.circuit.construct(B)
+ qdel(src)
+ return
+
+ 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
+ req_components = null
+ return
+
+ if(state == 3)
+ if(frame_type in machines)
+ 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)
+ check_components()
+ update_desc()
+ user << desc
+ return
+
+ if(state == 4)
+ if(frame_type in computers)
+ 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
+
+ if(frame_type in displays)
+ 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
+
+ if(istype(P, /obj/item/stack/cable_coil))
+ if(state == 2)
+ var/obj/item/stack/cable_coil/C = P
+ 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))
+ user << "You add cables to the frame."
+ state = 3
+ icon_state = "[frame_type]_3"
+ if(frame_type in machines)
+ user << desc
+ return
+
+ if(istype(P, /obj/item/weapon/wirecutters))
+ if(state == 3)
+ if(frame_type in computers)
+ 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
+
+ if(frame_type in displays)
+ 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
+
+ if(frame_type in alarms)
+ 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
+
+ if(frame_type in machines)
+ 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
+
+ if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
+ if(state == 3)
+ if(frame_type in computers)
+ var/obj/item/stack/G = P
+ 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))
+ user << "You put in the glass panel."
+ src.state = 4
+ src.icon_state = "[frame_type]_4"
+ return
+
+ if(frame_type in displays)
+ var/obj/item/stack/G = P
+ 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))
+ user << "You put in the glass panel."
+ src.state = 4
+ src.icon_state = "[frame_type]_4"
+ return
+
+ if(istype(P, /obj/item))
+ if(state == 3)
+ if(frame_type in machines)
+ for(var/I in req_components)
+ if(istype(P, text2path(I)) && (req_components[I] > 0))
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ if(istype(P, /obj/item/stack))
+ var/obj/item/stack/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/obj/item/stack/CC = new /obj/item/stack(src)
+ CC.amount = camt
+ CC.update_icon()
+ CP.use(camt)
+ components += CC
+ req_components[I] -= camt
+ update_desc()
+ break
+ user.drop_item()
+ P.forceMove(src)
+ components += P
+ req_components[I]--
+ update_desc()
+ break
+ 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
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index d34acd5d2d4..58c8423a23e 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -36,6 +36,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
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.
@@ -47,6 +48,30 @@ var/const/HOLOPAD_MODE = RANGE_BASED
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)
+ else
+ src.attack_hand(user)
+ return
+
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index d2fa5478cbb..1df586b809e 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -62,6 +62,19 @@
user << "You attach \the [W] to \the [src]."
src.update_icon()
return
+
+ if(istype(W, /obj/item/weapon/screwdriver))
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ 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 )
+ A.amount = 6
+ if(src.beaker)
+ src.beaker.loc = get_turf(src)
+ src.beaker = null
+ qdel(src)
+ return
else
return ..()
diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm
index e78f2b52271..ace68645d8a 100644
--- a/code/game/machinery/kitchen/microwave.dm
+++ b/code/game/machinery/kitchen/microwave.dm
@@ -10,6 +10,7 @@
idle_power_usage = 5
active_power_usage = 100
flags = OPENCONTAINER | NOREACT
+ circuit = /obj/item/weapon/circuitboard/microwave
var/operating = 0 // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
@@ -29,6 +30,13 @@
..()
reagents = new/datum/reagents(100)
reagents.my_atom = 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)
+ component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
+ RefreshParts()
+
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
@@ -82,6 +90,11 @@
else
user << "It's broken!"
return 1
+ else if(default_deconstruction_screwdriver(user, O))
+ return
+ else if(default_deconstruction_crowbar(user, O))
+ return
+
else if(src.dirty==100) // The microwave is all dirty so can't be used!
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner)) // If they're trying to clean it then let them
user.visible_message( \
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index ded7ebc9b98..74f60a3a729 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -7,10 +7,12 @@
icon = 'icons/obj/power.dmi'
icon_state = "light1"
anchored = 1.0
+ use_power = 1
+ idle_power_usage = 10
+ power_channel = LIGHT
var/on = 1
var/area/area = null
var/otherarea = null
- // luminosity = 1
/obj/machinery/light_switch/New()
..()
@@ -31,8 +33,12 @@
/obj/machinery/light_switch/proc/updateicon()
if(stat & NOPOWER)
icon_state = "light-p"
+ set_light(0)
+ layer = OBJ_LAYER
else
icon_state = "light[on]"
+ set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
+ layer = LIGHTING_LAYER+0.1
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 6c391b75b5e..9ad2fd73eb1 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -112,6 +112,8 @@ Class Procs:
var/panel_open = 0
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)
@@ -225,11 +227,6 @@ Class Procs:
istype(usr, /mob/living/silicon)))
usr << "You don't have the dexterity to do this!"
return 1
-/*
- //distance checks are made by atom/proc/DblClick
- if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon))
- return 1
-*/
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 55)
@@ -280,29 +277,13 @@ Class Procs:
return 1
return 0
-/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
- if(!istype(C))
- return 0
- if(!panel_open)
- return 0
- . = dismantle()
-
-/obj/machinery/proc/default_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 << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
- update_icon()
- return 1
-
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
if(!istype(R))
return 0
if(!component_parts)
return 0
if(panel_open)
- var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
+ var/obj/item/weapon/circuitboard/CB = circuit
var/P
for(var/obj/item/weapon/stock_parts/A in component_parts)
for(var/D in CB.req_components)
@@ -328,13 +309,45 @@ Class Procs:
user << " [C.name]"
return 1
+/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
+ if(!istype(C))
+ return 0
+ if(!panel_open)
+ return 0
+ . = dismantle()
+
+/obj/machinery/proc/default_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 << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
+ update_icon()
+ return 1
+
/obj/machinery/proc/dismantle()
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
- var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
- M.set_dir(src.dir)
- M.state = 2
- M.icon_state = "box_1"
- for(var/obj/I in component_parts)
- I.loc = loc
+ 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 = M.board_type
+ if(A.frame_type in A.no_circuit)
+ A.need_circuit = 0
+ for (var/obj/D in src)
+ D.forceMove(loc)
+ if(A.components)
+ A.components.Cut()
+ else
+ A.components = list()
+ component_parts = list()
+ A.icon_state = "[A.frame_type]_3"
+ A.state = 3
+ A.pixel_x = pixel_x
+ A.pixel_y = pixel_y
+ A.check_components()
+ A.update_desc()
+ M.deconstruct(src)
qdel(src)
return 1
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 5a2663a7d1b..7bfe32d7191 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -167,7 +167,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
/obj/machinery/newscaster/security_unit //Security unit
name = "Security Newscaster"
@@ -751,32 +751,34 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
-/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
- if (src.isbroken)
- playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
- for (var/mob/O in hearers(5, src.loc))
- O.show_message("[user.name] further abuses the shattered [src.name].")
- else
- if(istype(I, /obj/item/weapon) )
- var/obj/item/weapon/W = I
- if(W.force <15)
- for (var/mob/O in hearers(5, src.loc))
- O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
+/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
- src.hitstaken++
- if(src.hitstaken==3)
- for (var/mob/O in hearers(5, src.loc))
- O.show_message("[user.name] smashes the [src.name]!" )
- src.isbroken=1
- playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
- else
- for (var/mob/O in hearers(5, src.loc))
- O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" )
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
- else
- user << "This does nothing."
- src.update_icon()
+ user << "You disconnect the monitor."
+ A.state = 4
+ A.icon_state = "newscaster_4"
+ M.deconstruct(src)
+ qdel(src)
+ else
+ src.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.
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 992a93c40a9..72c125e8b26 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -14,6 +14,15 @@ obj/machinery/recharger
var/icon_state_charging = "recharger1"
var/icon_state_idle = "recharger0" //also when unpowered
var/portable = 1
+ circuit = /obj/item/weapon/circuitboard/recharger
+ frame_type = "recharger"
+
+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)
+ RefreshParts()
+ return
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -52,6 +61,10 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
anchored = !anchored
user << "You [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
+ else if(default_deconstruction_screwdriver(user, G))
+ return
+ else if(default_deconstruction_crowbar(user, G))
+ return
obj/machinery/recharger/attack_hand(mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -156,3 +169,5 @@ obj/machinery/recharger/wallcharger
icon_state_charging = "wrecharger1"
icon_state_idle = "wrecharger0"
portable = 0
+ circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
+ frame_type = "wrecharger"
\ No newline at end of file
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index efcc8314c12..c3759100fb3 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -5,6 +5,7 @@
icon_state = "borgcharger0"
density = 1
anchored = 1
+ circuit = /obj/item/weapon/circuitboard/recharge_station
use_power = 1
idle_power_usage = 50
var/mob/occupant = null
@@ -25,7 +26,6 @@
..()
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/recharge_station(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index dd862a77543..8b0d78cb968 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -17,6 +17,7 @@
density = 0
use_power = 1
idle_power_usage = 10
+ circuit = /obj/item/weapon/circuitboard/status_display
var/mode = 1 // 0 = Blank
// 1 = Shuttle timer
// 2 = Arbitrary message(s)
@@ -51,6 +52,29 @@
radio_controller.remove_object(src,frequency)
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)
+ else
+ src.attack_hand(user)
+ return
+
+
// register for radio system
/obj/machinery/status_display/initialize()
..()
diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm
index 0b7371c1b08..51fcfb4f51c 100644
--- a/code/game/machinery/status_display_ai.dm
+++ b/code/game/machinery/status_display_ai.dm
@@ -59,6 +59,7 @@ var/list/ai_status_emotions = list(
name = "AI display"
anchored = 1
density = 0
+ circuit = /obj/item/weapon/circuitboard/ai_status_display
var/mode = 0 // 0 = Blank
// 1 = AI emoticon
@@ -68,6 +69,28 @@ 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)
+ else
+ src.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
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 072c99322fe..b9cc3428f93 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -10,6 +10,7 @@
var/screen = 0 // the screen number:
var/list/servers = list() // the servers located by the computer
var/obj/machinery/telecomms/server/SelectedServer
+ circuit = /obj/item/weapon/circuitboard/comm_server
var/network = "NULL" // the network to probe
var/temp = "" // temporary feedback messages
@@ -188,36 +189,6 @@
updateUsrDialog()
return
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- if (src.stat & BROKEN)
- user << "The broken glass falls out."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- new /obj/item/weapon/material/shard( src.loc )
- var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 3
- A.icon_state = "3"
- A.anchored = 1
- qdel(src)
- else
- user << "You disconnect the monitor."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- qdel(src)
- src.updateUsrDialog()
- return
-
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 2859083c9d6..2b3561395f5 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -98,8 +98,8 @@
// Drop a circuit board too
C.loc = user.loc
- // Create a machine frame and delete the current machine
- var/obj/machinery/constructable_frame/machine_frame/F = new
+ // Create a frame and delete the current machine
+ var/obj/structure/frame/F = new
F.loc = src.loc
qdel(src)
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index 24549bd8b71..6567012a800 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -14,6 +14,7 @@
var/screen = 0 // the screen number:
var/list/machinelist = list() // the machines located by the computer
var/obj/machinery/telecomms/SelectedMachine
+ circuit = /obj/item/weapon/circuitboard/comm_monitor
var/network = "NULL" // the network to probe
@@ -123,36 +124,6 @@
updateUsrDialog()
return
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- if (src.stat & BROKEN)
- user << "The broken glass falls out."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- new /obj/item/weapon/material/shard( src.loc )
- var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 3
- A.icon_state = "3"
- A.anchored = 1
- qdel(src)
- else
- user << "You disconnect the monitor."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- qdel(src)
- src.updateUsrDialog()
- return
-
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index e941a268ef9..0d372b2aaae 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -14,6 +14,7 @@
var/mob/lasteditor
var/list/viewingcode = list()
var/obj/machinery/telecomms/server/SelectedServer
+ circuit = /obj/item/weapon/circuitboard/comm_traffic
var/network = "NULL" // the network to probe
var/temp = "" // temporary feedback messages
@@ -206,40 +207,10 @@
updateUsrDialog()
return
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- if (src.stat & BROKEN)
- user << "The broken glass falls out."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- new /obj/item/weapon/material/shard( src.loc )
- var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 3
- A.icon_state = "3"
- A.anchored = 1
- qdel(src)
- else
- user << "You disconnect the monitor."
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- qdel(src)
- src.updateUsrDialog()
- return
-
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "You you disable the security protocols"
src.updateUsrDialog()
- return 1
+ return 1
\ No newline at end of file
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
deleted file mode 100644
index d324f3dd9c6..00000000000
--- a/code/game/machinery/turrets.dm
+++ /dev/null
@@ -1,523 +0,0 @@
-/area/turret_protected
- name = "Turret Protected Area"
- var/list/turretTargets = list()
-
-/area/turret_protected/proc/subjectDied(target)
- if( isliving(target) )
- if( !issilicon(target) )
- var/mob/living/L = target
- if( L.stat )
- if( L in turretTargets )
- src.Exited(L)
-
-
-/area/turret_protected/Entered(O)
- ..()
- if( iscarbon(O) )
- turretTargets |= O
- else if( istype(O, /obj/mecha) )
- var/obj/mecha/Mech = O
- if( Mech.occupant )
- turretTargets |= Mech
- else if(istype(O,/mob/living/simple_animal))
- turretTargets |= O
- return 1
-
-/area/turret_protected/Exited(O)
- if( ismob(O) && !issilicon(O) )
- turretTargets -= O
- else if( istype(O, /obj/mecha) )
- turretTargets -= O
- ..()
- return 1
-
-
-/obj/machinery/turret
- name = "turret"
- icon = 'icons/obj/turrets.dmi'
- icon_state = "grey_target_prism"
- var/raised = 0
- var/enabled = 1
- anchored = 1
- layer = 3
- invisibility = INVISIBILITY_LEVEL_TWO
- density = 1
- var/lasers = 0
- var/lasertype = 1
- // 1 = lasers
- // 2 = cannons
- // 3 = pulse
- // 4 = change (HONK)
- // 5 = bluetag
- // 6 = redtag
- var/health = 80
- var/maxhealth = 80
- var/auto_repair = 0
- var/obj/machinery/turretcover/cover = null
- var/popping = 0
- var/wasvalid = 0
- var/lastfired = 0
- var/shot_delay = 30 //3 seconds between shots
- var/datum/effect/effect/system/spark_spread/spark_system
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 300
-// var/list/targets
- var/atom/movable/cur_target
- var/targeting_active = 0
- var/area/turret_protected/protected_area
-
-/obj/machinery/turret/proc/take_damage(damage)
- src.health -= damage
- if(src.health<=0)
- qdel(src)
- return
-
-/obj/machinery/turret/attack_hand(var/mob/living/carbon/human/user)
-
- if(!istype(user))
- return ..()
-
- if(user.species.can_shred(user) && !(stat & BROKEN))
- playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- visible_message("[user] has slashed at [src]!")
- src.take_damage(15)
- return
-
-/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
- return
- take_damage(Proj.damage)
- ..()
- return
-
-/obj/machinery/turret/New()
- maxhealth = health
- spark_system = new /datum/effect/effect/system/spark_spread
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
-// targets = new
- ..()
- return
-
-/obj/machinery/turret/proc/update_health()
- if(src.health<=0)
- qdel(src)
- return
-
-/obj/machinery/turretcover
- name = "pop-up turret cover"
- icon = 'icons/obj/turrets.dmi'
- icon_state = "turretCover"
- anchored = 1
- layer = 3.5
- density = 0
- var/obj/machinery/turret/host = null
-
-/obj/machinery/turret/proc/isPopping()
- return (popping!=0)
-
-/obj/machinery/turret/power_change()
- ..()
- if(stat & BROKEN)
- icon_state = "grey_target_prism"
- else
- if( !(stat & NOPOWER) )
- if (src.enabled)
- if (src.lasers)
- icon_state = "orange_target_prism"
- else
- icon_state = "target_prism"
- else
- icon_state = "grey_target_prism"
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "grey_target_prism"
- stat |= NOPOWER
-
-/obj/machinery/turret/proc/setState(var/enabled, var/lethal)
- src.enabled = enabled
- src.lasers = lethal
- src.power_change()
-
-
-/obj/machinery/turret/proc/get_protected_area()
- var/area/turret_protected/TP = get_area(src)
- if(istype(TP))
- return TP
- return
-
-/obj/machinery/turret/proc/check_target(var/atom/movable/T as mob|obj)
- if( T && T in protected_area.turretTargets )
- var/area/area_T = get_area(T)
- if( !area_T || (area_T.type != protected_area.type) )
- protected_area.Exited(T)
- return 0 //If the guy is somehow not in the turret's area (teleportation), get them out the damn list. --NEO
- if( iscarbon(T) )
- var/mob/living/carbon/MC = T
- if( !MC.stat )
- if( !MC.lying || lasers )
- return 1
- else if( istype(T, /obj/mecha) )
- var/obj/mecha/ME = T
- if( ME.occupant )
- return 1
- else if(istype(T,/mob/living/simple_animal))
- var/mob/living/simple_animal/A = T
- if( !A.stat )
- if(lasers)
- return 1
- return 0
-
-/obj/machinery/turret/proc/get_new_target()
- var/list/new_targets = new
- var/new_target
- for(var/mob/living/carbon/M in protected_area.turretTargets)
- if(!M.stat)
- if(!M.lying || lasers)
- new_targets += M
- for(var/obj/mecha/M in protected_area.turretTargets)
- if(M.occupant)
- new_targets += M
- for(var/mob/living/simple_animal/M in protected_area.turretTargets)
- if(!M.stat)
- new_targets += M
- if(new_targets.len)
- new_target = pick(new_targets)
- return new_target
-
-
-/obj/machinery/turret/process()
- if(stat & (NOPOWER|BROKEN))
- return
- if(src.cover==null)
- src.cover = new /obj/machinery/turretcover(src.loc)
- src.cover.host = src
- protected_area = get_protected_area()
- if(!enabled || !protected_area || protected_area.turretTargets.len<=0)
- if(!isDown() && !isPopping())
- popDown()
- return
- if(!check_target(cur_target)) //if current target fails target check
- cur_target = get_new_target() //get new target
-
- if(cur_target) //if it's found, proceed
-// world << "[cur_target]"
- if(!isPopping())
- if(isDown())
- popUp()
- use_power = 2
- else
- spawn()
- if(!targeting_active)
- targeting_active = 1
- target()
- targeting_active = 0
-
- if(prob(15))
- if(prob(50))
- playsound(src.loc, 'sound/effects/turret/move1.wav', 60, 1)
- else
- playsound(src.loc, 'sound/effects/turret/move2.wav', 60, 1)
- else if(!isPopping())//else, pop down
- if(!isDown())
- popDown()
- use_power = 1
-
- // Auto repair requires massive amount of power, but slowly regenerates the turret's health.
- // Currently only used by malfunction hardware, but may be used as admin-settable option too.
- if(auto_repair)
- if(health < maxhealth)
- use_power(20000)
- health = min(health + 1, maxhealth)
- return
-
-
-/obj/machinery/turret/proc/target()
- while(src && enabled && !stat && check_target(cur_target))
- src.set_dir(get_dir(src, cur_target))
- shootAt(cur_target)
- sleep(shot_delay)
- return
-
-/obj/machinery/turret/proc/shootAt(var/atom/movable/target)
- var/turf/T = get_turf(src)
- var/turf/U = get_turf(target)
- if (!T || !U)
- return
- var/obj/item/projectile/A
- if (src.lasers)
- switch(lasertype)
- if(1)
- A = new /obj/item/projectile/beam( loc )
- if(2)
- A = new /obj/item/projectile/beam/heavylaser( loc )
- if(3)
- A = new /obj/item/projectile/beam/pulse( loc )
- if(4)
- A = new /obj/item/projectile/change( loc )
- if(5)
- A = new /obj/item/projectile/beam/lastertag/blue( loc )
- if(6)
- A = new /obj/item/projectile/beam/lastertag/red( loc )
- A.original = target
- use_power(500)
- else
- A = new /obj/item/projectile/energy/electrode( loc )
- use_power(200)
-
- //Turrets aim for the center of mass by default.
- //If the target is grabbing someone then the turret smartly aims for extremities
- var/obj/item/weapon/grab/G = locate() in target
- if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
- A.def_zone = pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
- else
- A.def_zone = pick(BP_TORSO, BP_GROIN)
-
- A.current = T
- A.starting = T
- A.yo = U.y - T.y
- A.xo = U.x - T.x
- spawn( 0 )
- A.process()
- return
-
-
-/obj/machinery/turret/proc/isDown()
- return (invisibility!=0)
-
-/obj/machinery/turret/proc/popUp()
- if ((!isPopping()) || src.popping==-1)
- invisibility = 0
- popping = 1
- playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
- if (src.cover!=null)
- flick("popup", src.cover)
- src.cover.icon_state = "openTurretCover"
- spawn(10)
- if (popping==1) popping = 0
-
-/obj/machinery/turret/proc/popDown()
- if ((!isPopping()) || src.popping==1)
- popping = -1
- playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
- if (src.cover!=null)
- flick("popdown", src.cover)
- src.cover.icon_state = "turretCover"
- spawn(10)
- if (popping==-1)
- invisibility = INVISIBILITY_LEVEL_TWO
- popping = 0
-
-/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
- return
- src.health -= Proj.damage
- ..()
- if(prob(45) && Proj.damage > 0) src.spark_system.start()
- qdel (Proj)
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
- ..()
- playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
- src.spark_system.start()
- src.health -= W.force * 0.5
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/turret/emp_act(severity)
- switch(severity)
- if(1)
- enabled = 0
- lasers = 0
- power_change()
- ..()
-
-/obj/machinery/turret/ex_act(severity)
- if(severity < 3)
- src.die()
-
-/obj/machinery/turret/proc/die()
- src.health = 0
- src.density = 0
- src.stat |= BROKEN
- src.icon_state = "destroyed_target_prism"
- if (cover!=null)
- qdel(cover)
- sleep(3)
- flick("explosion", src)
- spawn(13)
- qdel(src)
-
-/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message)
- if(!damage)
- return 0
- if(stat & BROKEN)
- user << "That object is useless to you."
- return 0
- user.do_attack_animation(src)
- visible_message("[user] [attack_message] the [src]!")
- user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
- src.health -= damage
- if (src.health <= 0)
- src.die()
- return 1
-
-/obj/structure/turret/gun_turret
- name = "Gun Turret"
- density = 1
- anchored = 1
- var/cooldown = 20
- var/projectiles = 100
- var/projectiles_per_shot = 2
- var/deviation = 0.3
- var/list/exclude = list()
- var/atom/cur_target
- var/scan_range = 7
- var/health = 40
- var/list/scan_for = list("human"=0,"cyborg"=0,"mecha"=0,"alien"=1)
- var/on = 0
- icon = 'icons/obj/turrets.dmi'
- icon_state = "gun_turret"
-
- proc/take_damage(damage)
- src.health -= damage
- if(src.health<=0)
- qdel(src)
- return
-
-
- bullet_act(var/obj/item/projectile/Proj)
- if(Proj.damage_type == HALLOSS)
- return
- take_damage(Proj.damage)
- ..()
- return
-
-
- ex_act()
- qdel(src)
- return
-
- emp_act()
- qdel(src)
- return
-
- attack_hand(mob/user as mob)
- user.set_machine(src)
- var/dat = {"
- [src] Control
-
- Power: [on?"on":"off"]
- Scan Range: - [scan_range] +
- Scan for: "}
- for(var/scan in scan_for)
- dat += ""
-
- dat += {"Ammo: [max(0, projectiles)]
-
- "}
- user << browse(dat, "window=turret")
- onclose(user, "turret")
- return
-
- attack_ai(mob/user as mob)
- return attack_hand(user)
-
- Topic(href, href_list)
- if(href_list["power"])
- src.on = !src.on
- if(src.on)
- spawn(50)
- if(src)
- src.process()
- if(href_list["scan_range"])
- src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
- if(href_list["scan_for"])
- if(href_list["scan_for"] in scan_for)
- scan_for[href_list["scan_for"]] = !scan_for[href_list["scan_for"]]
- src.updateUsrDialog()
- return
-
-
- proc/validate_target(atom/target)
- if(get_dist(target, src)>scan_range)
- return 0
- if(istype(target, /mob))
- var/mob/M = target
- if(!M.stat && !M.lying)//ninjas can't catch you if you're lying
- return 1
- else if(istype(target, /obj/mecha))
- return 1
- return 0
-
-
- process()
- spawn while(on)
- if(projectiles<=0)
- on = 0
- return
- if(cur_target && !validate_target(cur_target))
- cur_target = null
- if(!cur_target)
- cur_target = get_target()
- fire(cur_target)
- sleep(cooldown)
- return
-
- proc/get_target()
- var/list/pos_targets = list()
- var/target = null
- if(scan_for["human"])
- for(var/mob/living/carbon/human/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(scan_for["cyborg"])
- for(var/mob/living/silicon/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(scan_for["mecha"])
- for(var/obj/mecha/M in oview(scan_range, src))
- if(M in exclude)
- continue
- pos_targets += M
- if(scan_for["alien"])
- for(var/mob/living/carbon/alien/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(pos_targets.len)
- target = pick(pos_targets)
- return target
-
-
- proc/fire(atom/target)
- if(!target)
- cur_target = null
- return
- src.set_dir(get_dir(src,target))
- var/turf/targloc = get_turf(target)
- var/target_x = targloc.x
- var/target_y = targloc.y
- var/target_z = targloc.z
- targloc = null
- spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
- if(!src) break
- var/turf/curloc = get_turf(src)
- targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
- if (!targloc || !curloc)
- continue
- if (targloc == curloc)
- continue
- playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
- var/obj/item/projectile/A = new /obj/item/projectile(curloc)
- src.projectiles--
- A.launch(target)
- return
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index b1b8d497b33..8099103d8af 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -36,6 +36,8 @@
layer = 2.9
anchored = 1
density = 1
+ circuit = /obj/item/weapon/circuitboard/vending
+ frame_type = "vending"
var/icon_vend //Icon_state when vending
var/icon_deny //Icon_state when denying access
@@ -94,6 +96,14 @@
/obj/machinery/vending/New()
..()
wires = new(src)
+ component_parts = list()
+ component_parts += new /obj/item/weapon/stock_parts/spring(src)
+ component_parts += new /obj/item/weapon/stock_parts/spring(src)
+ component_parts += new /obj/item/weapon/stock_parts/motor(src)
+ component_parts += new /obj/item/weapon/stock_parts/motor(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
+ component_parts += new /obj/item/stack/material/glass/reinforced(src, 2)
+ RefreshParts()
spawn(4)
if(src.product_slogans)
src.slogan_list += splittext(src.product_slogans, ";")
@@ -232,6 +242,8 @@
user << "You [anchored? "un" : ""]secured \the [src]!"
anchored = !anchored
return
+ else if(default_deconstruction_crowbar(user, W))
+ return
else
@@ -922,7 +934,15 @@
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access = list(access_engine_equip)
- products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/cell/high = 10)
+ products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/cell/high = 10,
+ /obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,
+ /obj/item/weapon/circuitboard/airalarm = 10,/obj/item/weapon/circuitboard/firealarm = 10,/obj/item/weapon/circuitboard/status_display = 2,
+ /obj/item/weapon/circuitboard/ai_status_display = 2,/obj/item/weapon/circuitboard/newscaster = 2,/obj/item/weapon/circuitboard/holopad = 2,
+ /obj/item/weapon/circuitboard/intercom = 4,/obj/item/weapon/circuitboard/security/telescreen/entertainment = 4,
+ /obj/item/weapon/circuitboard/atm = 0,/obj/item/weapon/circuitboard/guestpass = 0,/obj/item/weapon/circuitboard/keycard_auth = 0,
+ /obj/item/weapon/circuitboard/photocopier = 0,/obj/item/weapon/circuitboard/fax = 0,/obj/item/weapon/circuitboard/conveyor = 0,
+ /obj/item/weapon/circuitboard/microwave = 0,/obj/item/weapon/circuitboard/vending = 0,/obj/item/weapon/circuitboard/washing = 0,
+ /obj/item/weapon/stock_parts/motor = 0,/obj/item/weapon/stock_parts/spring = 0,/obj/item/weapon/stock_parts/gear = 0)
contraband = list(/obj/item/weapon/cell/potato = 3)
premium = list(/obj/item/weapon/storage/belt/utility = 3)
diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm
index c9182586c8c..fd0fd3ce7c2 100644
--- a/code/game/machinery/wall_frames.dm
+++ b/code/game/machinery/wall_frames.dm
@@ -1,13 +1,14 @@
/obj/item/frame
- name = "frame"
- desc = "Used for building machines."
- icon = 'icons/obj/monitors.dmi'
- icon_state = "fire_bitem"
+ name = "frame parts"
+ desc = "Used for building frames."
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "frame_bitem"
flags = CONDUCT
- var/build_machine_type
- var/refund_amt = 2
+ var/build_machine_type = /obj/structure/frame
+ 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
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -16,7 +17,82 @@
return
..()
-/obj/item/frame/proc/try_build(turf/on_wall)
+/obj/item/frame/attack_self(mob/user as mob)
+ ..()
+ if(!build_machine_type)
+ return
+
+ var/ndir
+ 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", "Vending Machine",
+ "Recharger", "Washing Machine", "Grinder",
+ "Cancel")
+
+ if(response == "Cancel")
+ return
+
+ frame_type = lowertext(response)
+
+ switch(response)
+ if("Holopad")
+ new /obj/item/stack/material/steel( usr.loc, 1 ) //holopads are smaller, they only need 4 sheets
+ if("Conveyor")
+ ndir = get_dir(src,usr)
+ if (!(ndir in cardinal))
+ return
+ 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("Vending Machine")
+ frame_type = "vending"
+ 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
+
+ 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
+ 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",
+ "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(!build_machine_type)
return
@@ -35,7 +111,7 @@
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
- usr << "\The [src] Alarm cannot be placed on this spot."
+ usr << "\The frame cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\The [src] Alarm cannot be placed in this area."
@@ -44,23 +120,12 @@
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)
+ 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
qdel(src)
-/obj/item/frame/fire_alarm
- name = "fire alarm frame"
- desc = "Used for building fire alarms."
- build_machine_type = /obj/machinery/firealarm
-
-/obj/item/frame/air_alarm
- name = "air alarm frame"
- desc = "Used for building air alarms."
- build_machine_type = /obj/machinery/alarm
-
/obj/item/frame/light
name = "light fixture frame"
desc = "Used for building lights."
@@ -68,9 +133,48 @@
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"
+ desc = "Used for building fire extinguisher cabinets."
+ icon = 'icons/obj/closet.dmi'
+ icon_state = "extinguisher_empty"
+ refund_amt = 4
+ build_machine_type = /obj/structure/extinguisher_cabinet
+ frame_type = 1
+
+/obj/item/frame/noticeboard
+ name = "noticeboard frame"
+ desc = "Used for building noticeboards."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "nboard00"
+ 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"
+ desc = "Used for building mirrors."
+ icon = 'icons/obj/watercloset.dmi'
+ 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"
+ desc = "Used for building fire axe cabinets."
+ 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
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index a22482a4168..830a848bfe7 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -4,6 +4,7 @@
icon_state = "wm_10"
density = 1
anchored = 1.0
+ circuit = /obj/item/weapon/circuitboard/washing
var/state = 1
//1 = empty, open door
//2 = empty, closed door
@@ -13,14 +14,19 @@
//6 = blood, open door
//7 = blood, closed door
//8 = blood, running
- var/panel = 0
- //0 = closed
- //1 = open
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
//0 = not hacked
//1 = hacked
var/gibs_ready = 0
var/obj/crayon
+ var/list/washing = list()
+
+/obj/machinery/washing_machine/New()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/stock_parts/motor(src)
+ component_parts += new /obj/item/weapon/stock_parts/gear(src)
+ component_parts += new /obj/item/weapon/stock_parts/gear(src)
+ RefreshParts()
/obj/machinery/washing_machine/verb/start()
set name = "Start Washing"
@@ -34,25 +40,25 @@
usr << "The washing machine cannot run in this state."
return
- if( locate(/mob,contents) )
+ if( locate(/mob,washing) )
state = 8
else
state = 5
update_icon()
sleep(200)
- for(var/atom/A in contents)
+ for(var/atom/A in washing)
A.clean_blood()
- for(var/obj/item/I in contents)
+ for(var/obj/item/I in washing)
I.decontaminate()
//Tanning!
- for(var/obj/item/stack/material/hairlesshide/HH in contents)
+ for(var/obj/item/stack/material/hairlesshide/HH in washing)
var/obj/item/stack/material/wetleather/WL = new(src)
WL.amount = HH.amount
qdel(HH)
- if( locate(/mob,contents) )
+ if( locate(/mob,washing) )
state = 7
gibs_ready = 1
else
@@ -70,9 +76,14 @@
/obj/machinery/washing_machine/update_icon()
- icon_state = "wm_[state][panel]"
+ icon_state = "wm_[state][panel_open]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(state == 2 && washing.len < 1)
+ if(default_deconstruction_screwdriver(user, W))
+ return
+ if(default_deconstruction_crowbar(user, W))
+ return
/*if(istype(W,/obj/item/weapon/screwdriver))
panel = !panel
user << "You [panel ? "open" : "close"] the [src]'s maintenance panel"*/
@@ -142,10 +153,11 @@
user << "This item does not fit."
return
- if(contents.len < 5)
+ if(washing.len < 5)
if ( state in list(1, 3) )
user.drop_item()
W.loc = src
+ washing += W
state = 3
else
user << "You can't put the item in right now."
@@ -161,15 +173,17 @@
state = 2
if(2)
state = 1
- for(var/atom/movable/O in contents)
+ for(var/atom/movable/O in washing)
O.loc = src.loc
+ washing.Cut()
if(3)
state = 4
if(4)
state = 3
- for(var/atom/movable/O in contents)
+ for(var/atom/movable/O in washing)
O.loc = src.loc
crayon = null
+ washing.Cut()
state = 1
if(5)
user << "The [src] is busy."
@@ -178,13 +192,13 @@
if(7)
if(gibs_ready)
gibs_ready = 0
- if(locate(/mob,contents))
- var/mob/M = locate(/mob,contents)
+ if(locate(/mob,washing))
+ var/mob/M = locate(/mob,washing)
M.gib()
- for(var/atom/movable/O in contents)
+ for(var/atom/movable/O in washing)
O.loc = src.loc
crayon = null
state = 1
+ washing.Cut()
-
- update_icon()
+ update_icon()
\ No newline at end of file
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index cf50e695259..23c30d3a3d9 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -5,6 +5,7 @@
icon_state = "recharge_floor"
density = 0
layer = TURF_LAYER + 0.1
+ circuit = /obj/item/weapon/circuitboard/mech_recharger
var/obj/mecha/charging = null
var/charge = 45
@@ -14,7 +15,6 @@
..()
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/mech_recharger(src)
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)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index 0685e6efd20..425b959d31d 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -9,6 +9,7 @@
idle_power_usage = 20
active_power_usage = 5000
req_access = list(access_robotics)
+ circuit = /obj/item/weapon/circuitboard/mechfab
var/speed = 1
var/mat_efficiency = 1
@@ -29,7 +30,6 @@
..()
component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/mechfab(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
@@ -89,7 +89,7 @@
return
ui_interact(user)
-/obj/machinery/mecha_part_fabricator/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+/obj/machinery/mecha_part_fabricator/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
var/datum/design/current = queue.len ? queue[1] : null
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 6961e957ffe..f66b6686641 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -76,13 +76,10 @@
/obj/item/equipped()
..()
- var/mob/M = loc
+ var/mob/living/M = loc
if(!istype(M))
return
- if(M.l_hand)
- M.l_hand.update_held_icon()
- if(M.r_hand)
- M.r_hand.update_held_icon()
+ M.update_held_icons()
/obj/item/Destroy()
if(ismob(loc))
@@ -98,8 +95,8 @@
//Checks if the item is being held by a mob, and if so, updates the held icons
/obj/item/proc/update_held_icon()
- if(ismob(src.loc))
- var/mob/M = src.loc
+ if(isliving(src.loc))
+ var/mob/living/M = src.loc
if(M.l_hand == src)
M.update_inv_l_hand()
else if(M.r_hand == src)
@@ -160,7 +157,7 @@
size = "huge"
return ..(user, distance, "", "It is a [size] item.")
-/obj/item/attack_hand(mob/user as mob)
+/obj/item/attack_hand(mob/living/user as mob)
if (!user) return
if (hasorgans(user))
var/mob/living/carbon/human/H = user
@@ -399,17 +396,15 @@ var/list/global/slot_flags_enumeration = list(
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "You can't pick things up!"
return
+ var/mob/living/carbon/C = usr
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "You can't pick things up!"
return
if(src.anchored) //Object isn't anchored
usr << "You can't pick that up!"
return
- if(!usr.hand && usr.r_hand) //Right hand is not full
- usr << "Your right hand is full."
- return
- if(usr.hand && usr.l_hand) //Left hand is not full
- usr << "Your left hand is full."
+ if(C.get_active_hand()) //Hand is not full
+ usr << "Your hand is full."
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "You can't pick that up!"
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index b3915ffceef..a3db6b15a16 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -462,7 +462,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
- data_core.get_manifest_json()
+ data_core.get_manifest_list()
if(mode==3)
@@ -531,7 +531,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["feed"] = feed
- data["manifest"] = list("__json_cache" = ManifestJSON)
+ data["manifest"] = PDA_Manifest
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index e5e94fc93d3..5b769ed8034 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -12,7 +12,7 @@
var/code = 2
-/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
+/obj/item/device/radio/electropack/attack_hand(mob/living/user as mob)
if(src == user.back)
user << "You need help taking this off!"
return
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index ed8cf4ce0bc..7aaf609eca6 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -6,8 +6,10 @@
w_class = 4.0
canhear_range = 2
flags = CONDUCT | NOBLOODY
+ var/circuit = /obj/item/weapon/circuitboard/intercom
var/number = 0
var/last_tick //used to delay the powercheck
+ var/wiresexposed = 0
/obj/item/device/radio/intercom/custom
name = "station intercom (Custom)"
@@ -81,6 +83,41 @@
spawn (0)
attack_self(user)
+/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
+ src.add_fingerprint(user)
+ if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
+ wiresexposed = !wiresexposed
+ user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
+ if(wiresexposed)
+ if(!on)
+ icon_state = "intercom-p_open"
+ else
+ icon_state = "intercom_open"
+ else
+ icon_state = "intercom"
+ return
+ 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"
+ 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"
+ M.deconstruct(src)
+ qdel(src)
+ else
+ src.attack_hand(user)
+ return
+
/obj/item/device/radio/intercom/receive_range(freq, level)
if (!on)
return -1
@@ -110,9 +147,15 @@
on = A.powered(EQUIP) // set "on" to the power status
if(!on)
- icon_state = "intercom-p"
+ if(wiresexposed)
+ icon_state = "intercom-p_open"
+ else
+ icon_state = "intercom-p"
else
- icon_state = initial(icon_state)
+ if(wiresexposed)
+ icon_state = "intercom_open"
+ else
+ icon_state = initial(icon_state)
/obj/item/device/radio/intercom/locked
var/locked_frequency
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index b8b79a5ca16..451b2c41af1 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -209,7 +209,7 @@
amount = 5
max_amount = 5
-/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
+/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/living/user as mob)
if(..())
return 1
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 3d6a5c96261..a0496b367db 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -9,7 +9,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
- matter = list(DEFAULT_WALL_MATERIAL = 1875)
+ matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 2)
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index 96a6656795c..9926a14330e 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -76,7 +76,7 @@
desc = "Those could work as a pretty decent throwing weapon" //why?
icon_state = "tile"
force = 6.0
- matter = list(DEFAULT_WALL_MATERIAL = 937.5)
+ matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 4)
throwforce = 15.0
throw_speed = 5
throw_range = 20
@@ -92,13 +92,13 @@
name = "steel floor tile"
singular_name = "steel floor tile"
icon_state = "tile_steel"
- matter = list("plasteel" = 937.5)
+ matter = list("plasteel" = SHEET_MATERIAL_AMOUNT / 4)
/obj/item/stack/tile/floor_white
name = "white floor tile"
singular_name = "white floor tile"
icon_state = "tile_white"
- matter = list("plastic" = 937.5)
+ matter = list("plastic" = SHEET_MATERIAL_AMOUNT / 4)
/obj/item/stack/tile/floor_yellow
name = "yellow floor tile"
@@ -110,13 +110,13 @@
name = "dark floor tile"
singular_name = "dark floor tile"
icon_state = "fr_tile"
- matter = list("plasteel" = 937.5)
+ matter = list("plasteel" = SHEET_MATERIAL_AMOUNT / 4)
/obj/item/stack/tile/floor_freezer
name = "freezer floor tile"
singular_name = "freezer floor tile"
icon_state = "tile_freezer"
- matter = list("plastic" = 937.5)
+ matter = list("plastic" = SHEET_MATERIAL_AMOUNT / 4)
/obj/item/stack/tile/floor/cyborg
name = "floor tile synthesizer"
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 0068473fb73..63a88dadbb8 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -407,12 +407,12 @@
* Bosun's whistle
*/
- /obj/item/toy/bosunwhistle
- name = "bosun's whistle"
- desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
- icon = 'icons/obj/toy.dmi'
- icon_state = "bosunwhistle"
- var/cooldown = 0
+/obj/item/toy/bosunwhistle
+ name = "bosun's whistle"
+ desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
+ icon = 'icons/obj/toy.dmi'
+ icon_state = "bosunwhistle"
+ var/cooldown = 0
w_class = 1
slot_flags = SLOT_EARS
diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm
index c17d8ba6505..d196bc4ea7a 100644
--- a/code/game/objects/items/weapons/autopsy.dm
+++ b/code/game/objects/items/weapons/autopsy.dm
@@ -160,20 +160,7 @@
P.icon_state = "paper_words"
if(istype(usr,/mob/living/carbon))
- // place the item in the usr's hand if possible
- if(!usr.r_hand)
- P.loc = usr
- usr.r_hand = P
- P.layer = 20
- else if(!usr.l_hand)
- P.loc = usr
- usr.l_hand = P
- P.layer = 20
-
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_l_hand()
- M.update_inv_r_hand()
+ usr.put_in_hands(src)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index b156d569ad6..4772063b4c7 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -445,39 +445,36 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
base_state = icon_state
- if(user.r_hand == src || user.l_hand == src)
- if(!lit)
- lit = 1
- icon_state = "[base_state]on"
- item_state = "[base_state]on"
- if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
- user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
- else
- if(prob(95))
- user.visible_message("After a few attempts, [user] manages to light the [src].")
- else
- user << "You burn yourself while lighting the lighter."
- if (user.l_hand == src)
- user.apply_damage(2,BURN,"l_hand")
- else
- user.apply_damage(2,BURN,"r_hand")
- user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
-
- set_light(2)
- processing_objects.Add(src)
+ if(!lit)
+ lit = 1
+ icon_state = "[base_state]on"
+ item_state = "[base_state]on"
+ if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
+ user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
else
- lit = 0
- icon_state = "[base_state]"
- item_state = "[base_state]"
- if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
- user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
+ if(prob(95))
+ user.visible_message("After a few attempts, [user] manages to light the [src].")
else
- user.visible_message("[user] quietly shuts off the [src].")
+ user << "You burn yourself while lighting the lighter."
+ if (user.get_left_hand() == src)
+ user.apply_damage(2,BURN,"l_hand")
+ else
+ user.apply_damage(2,BURN,"r_hand")
+ user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
- set_light(0)
- processing_objects.Remove(src)
+ set_light(2)
+ processing_objects.Add(src)
else
- return ..()
+ lit = 0
+ icon_state = "[base_state]"
+ item_state = "[base_state]"
+ if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
+ user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
+ else
+ user.visible_message("[user] quietly shuts off the [src].")
+
+ set_light(0)
+ processing_objects.Remove(src)
return
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 61de25f44c7..0016fc730ab 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
@@ -29,13 +29,23 @@
network = list("MINE")
req_access = list()
+/obj/item/weapon/circuitboard/security/telescreen/entertainment
+ name = T_BOARD("entertainment camera monitor")
+ build_path = /obj/machinery/computer/security/telescreen/entertainment
+ board_type = "display"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+
+/obj/item/weapon/circuitboard/security/telescreen/entertainment/New()
+ ..()
+ network = NETWORK_THUNDER
+
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
if (..(C))
- C.network = network
+ C.network = network.Copy()
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
if (..(C))
- network = C.network
+ network = C.network.Copy()
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
if(emagged)
diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm
new file mode 100644
index 00000000000..30be1d52f7b
--- /dev/null
+++ b/code/game/objects/items/weapons/circuitboards/frame.dm
@@ -0,0 +1,253 @@
+#ifndef T_BOARD
+#error T_BOARD macro is not defined but we need it!
+#endif
+
+//Circuitboards for frames (mostly wall based frames). Most of these don't fit into other categories.
+
+//Display
+
+/obj/item/weapon/circuitboard/guestpass
+ name = T_BOARD("guestpass console")
+ build_path = /obj/machinery/computer/guestpass
+ board_type = "guestpass"
+ 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"
+ 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"
+ 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"
+ 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"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+
+//Alarm
+
+/obj/item/weapon/circuitboard/firealarm
+ name = T_BOARD("fire alarm")
+ build_path = /obj/machinery/firealarm
+ board_type = "firealarm"
+ 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"
+ 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"
+ 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"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+
+//Computer
+
+/obj/item/weapon/circuitboard/holopad
+ name = T_BOARD("holopad")
+ build_path = /obj/machinery/hologram/holopad
+ board_type = "holopad"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+
+//Machine
+
+/obj/item/weapon/circuitboard/photocopier
+ name = T_BOARD("photocopier")
+ build_path = /obj/machinery/photocopier
+ board_type = "photocopier"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/scanning_module" = 1,
+ "/obj/item/weapon/stock_parts/motor" = 1,
+ "/obj/item/weapon/stock_parts/micro_laser" = 1,
+ "/obj/item/weapon/stock_parts/matter_bin" = 1)
+
+/obj/item/weapon/circuitboard/fax
+ name = T_BOARD("fax")
+ build_path = /obj/machinery/photocopier/faxmachine
+ board_type = "fax"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/scanning_module" = 1,
+ "/obj/item/weapon/stock_parts/motor" = 1,
+ "/obj/item/weapon/stock_parts/micro_laser" = 1,
+ "/obj/item/weapon/stock_parts/matter_bin" = 1)
+
+/obj/item/weapon/circuitboard/conveyor
+ name = T_BOARD("conveyor")
+ build_path = /obj/machinery/conveyor
+ board_type = "conveyor"
+ req_components = list(
+ "/obj/item/weapon/stock_parts/gear" = 2,
+ "/obj/item/weapon/stock_parts/motor" = 2,
+ "/obj/item/stack/cable_coil" = 5)
+
+/obj/item/weapon/circuitboard/microwave
+ name = T_BOARD("microwave")
+ build_path = /obj/machinery/microwave
+ board_type = "microwave"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/console_screen" = 1,
+ "/obj/item/weapon/stock_parts/motor" = 1,
+ "/obj/item/weapon/stock_parts/capacitor" = 1)
+
+/obj/item/weapon/circuitboard/vending
+ name = T_BOARD("vending")
+ build_path = /obj/machinery/vending
+ board_type = "vending"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/console_screen" = 1,
+ "/obj/item/weapon/stock_parts/motor" = 2,
+ "/obj/item/weapon/stock_parts/spring" = 2,
+ "/obj/item/stack/material/glass/reinforced" = 2)
+
+/obj/item/weapon/circuitboard/recharger
+ name = T_BOARD("recharger")
+ build_path = /obj/machinery/recharger
+ board_type = "recharger"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/capacitor" = 1,
+ "/obj/item/stack/cable_coil" = 5)
+
+/obj/item/weapon/circuitboard/recharger/wrecharger
+ name = T_BOARD("wall recharger")
+ build_path = /obj/machinery/recharger/wallcharger
+ board_type = "wrecharger"
+
+/obj/item/weapon/circuitboard/washing
+ name = T_BOARD("washing machine")
+ build_path = /obj/machinery/washing_machine
+ board_type = "washing"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/motor" = 1,
+ "/obj/item/weapon/stock_parts/gear" = 2)
+
+/obj/item/weapon/circuitboard/grinder
+ name = T_BOARD("reagent grinder")
+ build_path = /obj/machinery/reagentgrinder
+ board_type = "grinder"
+ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+ req_components = list(
+ "/obj/item/weapon/stock_parts/motor" = 1,
+ "/obj/item/weapon/stock_parts/gear" = 1,
+ "/obj/item/weapon/reagent_containers/glass/beaker/large" = 1)
+
+//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/vending( 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
diff --git a/code/game/objects/items/weapons/circuitboards/other.dm b/code/game/objects/items/weapons/circuitboards/other.dm
index 6d016a96fa1..da70371e4ac 100644
--- a/code/game/objects/items/weapons/circuitboards/other.dm
+++ b/code/game/objects/items/weapons/circuitboards/other.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
//Stuff that doesn't fit into any category goes here
@@ -7,4 +7,4 @@
/obj/item/weapon/circuitboard/aicore
name = T_BOARD("AI core")
origin_tech = list(TECH_DATA = 4, TECH_BIO = 2)
- board_type = "other"
+ board_type = "other"
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 218d2fb21cf..d92ad00babb 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -77,7 +77,5 @@
icon_state = "purplecomb"
item_state = "purplecomb"
-/obj/item/weapon/haircomb/attack_self(mob/user)
- if(user.r_hand == src || user.l_hand == src)
- user.visible_message(text("[] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"))
- return
+/obj/item/weapon/haircomb/attack_self(mob/living/user)
+ user.visible_message(text("[] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"))
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index bbdd46cdb39..8cd4c373e90 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -39,8 +39,8 @@
return null
var/turf/location = loc
if(istype(location, /mob/))
- var/mob/M = location
- if(M.l_hand == src || M.r_hand == src)
+ var/mob/living/M = location
+ if(M.item_is_in_hands(src))
location = M.loc
if(isturf(location)) //start a fire if possible
location.hotspot_expose(700, 2)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 43b58a17264..73c198c8ab6 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -125,12 +125,12 @@
icon_state = "wrap_paper"
var/amount = 20.0
-/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
+/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "You MUST put the paper on a table!"
if (W.w_class < 4)
- if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
+ if (user.get_type_in_hands(/obj/item/weapon/wirecutters))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "You need more paper!"
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index 476ed726cd9..a6feac29981 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -24,8 +24,8 @@
return
- attack_hand(mob/user as mob)
- if ((src.case && (user.l_hand == src || user.r_hand == src)))
+ attack_hand(mob/living/user as mob)
+ if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm
index 2c11456b708..b404b69f0b9 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm
+++ b/code/game/objects/items/weapons/material/twohanded.dm
@@ -29,7 +29,7 @@
/obj/item/weapon/material/twohanded/update_held_icon()
var/mob/living/M = loc
- if(istype(M) && !issmall(M) && ((M.r_hand == src && !M.l_hand) || (M.l_hand == src && !M.r_hand)))
+ if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
force = force_wielded
name = "[base_name] (wielded)"
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 6a236e1b8f7..ac8da3d835c 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -214,7 +214,7 @@
spawn(1) if(src) qdel(src)
/obj/item/weapon/melee/energy/blade/process()
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm
index 66ae01797e7..e50f82966bf 100644
--- a/code/game/objects/items/weapons/mop_deploy.dm
+++ b/code/game/objects/items/weapons/mop_deploy.dm
@@ -59,7 +59,7 @@
spawn(1) if(src) del(src)
/obj/item/weapon/mop_deploy/process()
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index db9db8a360e..11d4c4b9744 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -152,7 +152,7 @@
storage_slots = 12
/obj/item/weapon/storage/backpack/dufflebag/syndie
- name = "suspicious looking dufflebag"
+ name = "black dufflebag"
desc = "A large dufflebag for holding extra tactical supplies."
icon_state = "duffle_syndie"
item_state = "duffle_syndiemed"
diff --git a/code/game/objects/items/weapons/storage/laundry_basket.dm b/code/game/objects/items/weapons/storage/laundry_basket.dm
index 92dd28c61a5..ffb4867ca68 100644
--- a/code/game/objects/items/weapons/storage/laundry_basket.dm
+++ b/code/game/objects/items/weapons/storage/laundry_basket.dm
@@ -21,7 +21,7 @@
var/linked
-/obj/item/weapon/storage/laundry_basket/attack_hand(mob/user as mob)
+/obj/item/weapon/storage/laundry_basket/attack_hand(mob/living/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.get_organ("r_hand")
diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm
index 11c2d6a8539..d47f278e840 100644
--- a/code/game/objects/items/weapons/storage/toolbox.dm
+++ b/code/game/objects/items/weapons/storage/toolbox.dm
@@ -64,7 +64,7 @@
new /obj/item/stack/cable_coil(src,30,color)
/obj/item/weapon/storage/toolbox/syndicate
- name = "suspicious looking toolbox"
+ name = "black and red toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 0a5b1ec6868..a79d6575e5e 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -173,7 +173,7 @@
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
-/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
+/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "Stop welding first!"
@@ -222,9 +222,9 @@
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
- if(istype(location, /mob/))
- var/mob/M = location
- if(M.l_hand == src || M.r_hand == src)
+ if(istype(location, /mob/living))
+ var/mob/living/M = location
+ if(M.item_is_in_hands(src))
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
diff --git a/code/game/objects/items/weapons/wires.dm b/code/game/objects/items/weapons/wires.dm
deleted file mode 100644
index 0a70fdbe1c2..00000000000
--- a/code/game/objects/items/weapons/wires.dm
+++ /dev/null
@@ -1,18 +0,0 @@
-// WIRES
-
-/obj/item/weapon/wire/proc/update()
- if (src.amount > 1)
- src.icon_state = "spool_wire"
- src.desc = text("This is just spool of regular insulated wire. It consists of about [] unit\s of wire.", src.amount)
- else
- src.icon_state = "item_wire"
- src.desc = "This is just a simple piece of regular insulated wire."
- return
-
-/obj/item/weapon/wire/attack_self(mob/user as mob)
- if (src.laying)
- src.laying = 0
- user << "You're done laying wire!"
- else
- user << "You are not using this to lay wire..."
- return
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index fa4fa27f758..bc10bc43596 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -90,11 +90,12 @@
// check for TK users
if (istype(usr, /mob/living/carbon/human))
- if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
- if(!(usr in nearby))
- if(usr.client && usr.machine==src)
+ var/mob/living/carbon/human/H = usr
+ if(H.get_type_in_hands(/obj/item/tk_grab))
+ if(!(H in nearby))
+ if(H.client && H.machine==src)
is_in_use = 1
- src.attack_hand(usr)
+ src.attack_hand(H)
in_use = is_in_use
/obj/proc/updateDialog()
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 23d819afa0a..1a2ef15eae8 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -19,7 +19,7 @@ LINEN BINS
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
if(layer == initial(layer))
- layer = 5
+ layer = MOB_LAYER + 0.1
else
layer = initial(layer)
add_fingerprint(user)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index fcbe9e90605..0a3ca351227 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -297,6 +297,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/colt/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
+ new /obj/item/device/flashlight/maglight(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index cc67d80ac3b..bd241bb63ab 100644
--- a/code/game/objects/structures/curtains.dm
+++ b/code/game/objects/structures/curtains.dm
@@ -1,5 +1,5 @@
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
-#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
+#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.2
/obj/structure/curtain
name = "curtain"
@@ -35,6 +35,21 @@
icon_state = "open"
layer = SHOWER_OPEN_LAYER
+/obj/structure/curtain/attackby(obj/item/P, mob/user)
+ if(istype(P, /obj/item/weapon/wirecutters))
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ user << "You start to cut the shower curtains."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 10))
+ user << "You cut the shower curtains."
+ var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
+ A.amount = 3
+ qdel(src)
+ return
+ else
+ src.attack_hand(user)
+ return
+
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index c8ccd4b32bd..dcc0270abc4 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -8,9 +8,19 @@
var/obj/item/weapon/extinguisher/has_extinguisher
var/opened = 0
-/obj/structure/extinguisher_cabinet/New()
+/obj/structure/extinguisher_cabinet/New(var/loc, var/dir, var/building = 0)
..()
- has_extinguisher = new/obj/item/weapon/extinguisher(src)
+
+ if(building)
+ if(loc)
+ src.loc = loc
+
+ pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
+ pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
+ update_icon()
+ return
+ else
+ has_extinguisher = new/obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user))
@@ -23,12 +33,21 @@
user << "You place [O] in [src]."
else
opened = !opened
+ if(istype(O, /obj/item/weapon/wrench))
+ if(!has_extinguisher)
+ user << "You start to unwrench the extinguisher cabinet."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 15))
+ user << "You unwrench the extinguisher cabinet."
+ new /obj/item/frame/extinguisher_cabinet( src.loc )
+ qdel(src)
+ return
else
opened = !opened
update_icon()
-/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
+/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 17957cc5894..b3ad998895a 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -107,7 +107,7 @@
if(!isliving(usr))
return
var/mob/living/user = usr
-
+
if(href_list["take"])
switch(href_list["take"])
if("garbage")
@@ -213,10 +213,10 @@
..()
-/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
+/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
- if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
+ if(user.get_type_in_hands(/obj/item/key))
step(src, direction)
update_mob()
else
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 88e771f8edd..a8747e07ec1 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -8,9 +8,18 @@
anchored = 1
var/shattered = 0
var/list/ui_users = list()
+ var/glass = 1
+
+/obj/structure/mirror/New(var/loc, var/dir, var/building = 0, mob/user as mob)
+ if(building)
+ glass = 0
+ icon_state = "mirror_frame"
+ pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
+ pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
+ return
/obj/structure/mirror/attack_hand(mob/user as mob)
-
+ if(!glass) return
if(shattered) return
if(ishuman(user))
@@ -22,6 +31,7 @@
AC.ui_interact(user)
/obj/structure/mirror/proc/shatter()
+ if(!glass) return
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
@@ -34,18 +44,57 @@
if(prob(Proj.get_structure_damage() * 2))
if(!shattered)
shatter()
- else
+ else if(glass)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
- if(shattered)
+ if(istype(I, /obj/item/weapon/wrench))
+ if(!glass)
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 20))
+ user << "You unfasten the frame."
+ new /obj/item/frame/mirror( src.loc )
+ qdel(src)
+ return
+ if(istype(I, /obj/item/weapon/crowbar))
+ if(shattered && glass)
+ user << "The broken glass falls out."
+ icon_state = "mirror_frame"
+ glass = !glass
+ new /obj/item/weapon/material/shard( src.loc )
+ return
+ if(!shattered && glass)
+ playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ user << "You remove the glass."
+ glass = !glass
+ icon_state = "mirror_frame"
+ new /obj/item/stack/material/glass( src.loc, 2 )
+ return
+
+ if(istype(I, /obj/item/stack/material/glass))
+ if(!glass)
+ var/obj/item/stack/material/glass/G = I
+ if (G.get_amount() < 2)
+ user << "You need two sheets of glass to add them to the frame."
+ return
+ user << "You start to add the glass to the frame."
+ if(do_after(user, 20))
+ if (G.use(2))
+ shattered = 0
+ glass = 1
+ icon_state = "mirror"
+ user << "You add the glass to the frame."
+ return
+
+ if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("[user] smashes [src] with [I]!")
- shatter()
+ if(glass)
+ shatter()
else
visible_message("[user] hits [src] with [I]!")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
@@ -53,13 +102,14 @@
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
- if(shattered)
+ if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
user.visible_message("[user] smashes [src]!")
- shatter()
+ if(glass)
+ shatter()
else
user.visible_message("[user] hits [src] and bounces off!")
return 1
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index 3647d565f7e..174634e3cb9 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -7,6 +7,18 @@
anchored = 1
var/notices = 0
+/obj/structure/noticeboard/New(var/loc, var/dir, var/building = 0)
+ ..()
+
+ if(building)
+ if(loc)
+ src.loc = loc
+
+ pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
+ pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
+ update_icon()
+ return
+
/obj/structure/noticeboard/initialize()
for(var/obj/item/I in loc)
if(notices > 4) break
@@ -28,6 +40,14 @@
user << "You pin the paper to the noticeboard."
else
user << "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached."
+ if(istype(O, /obj/item/weapon/wrench))
+ user << "You start to unwrench the noticeboard."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 15))
+ user << "You unwrench the noticeboard."
+ new /obj/item/frame/noticeboard( src.loc )
+ qdel(src)
+ return
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)
@@ -64,15 +84,14 @@
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
- if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
- add_fingerprint(usr)
- P.attackby(usr.r_hand, usr) //then do ittttt
- else
- if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
- add_fingerprint(usr)
- P.attackby(usr.l_hand, usr)
+ var/mob/living/M = usr
+ if(istype(M))
+ var/obj/item/weapon/pen/E = M.get_type_in_hands(/obj/item/weapon/pen)
+ if(E)
+ add_fingerprint(M)
+ P.attackby(E, usr)
else
- usr << "You'll need something to write with!"
+ M << "You'll need something to write with!"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index a3904f65a1b..7003f4d3a22 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
- if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
+ if(user.get_type_in_hands(/obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 8df5be2629f..4ac596267dc 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -358,7 +358,7 @@
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
- if (user.hand)
+ if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "You try to move your [temp.name], but cannot!"
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index cc91ee49a20..47a3c5a63e9 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -55,6 +55,20 @@ var/list/mechtoys = list(
/mob/living/silicon/robot/drone
)
+/obj/structure/plasticflaps/attackby(obj/item/P, mob/user)
+ if(istype(P, /obj/item/weapon/wirecutters))
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ user << "You start to cut the plastic flaps."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ if(do_after(user, 10))
+ user << "You cut the plastic flaps."
+ var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
+ A.amount = 4
+ qdel(src)
+ return
+ else
+ return
+
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
if(istype(A) && A.checkpass(PASSGLASS))
return prob(60)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 0ea71698745..6dbdd74363f 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1,75 +1,75 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
var/list/admin_verbs_default = list(
- /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
+ /datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags,
/client/proc/player_panel,
- /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
- /client/proc/hide_verbs, /*hides all our adminverbs*/
- /client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
- /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
-// /client/proc/check_antagonists, /*shows all antags*/
+ /client/proc/deadmin_self, //destroys our own admin datum so we can play as a regular player,
+ /client/proc/hide_verbs, //hides all our adminverbs,
+ /client/proc/hide_most_verbs, //hides all our hideable adminverbs,
+ /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify,
+// /client/proc/check_antagonists, //shows all antags,
// /client/proc/cmd_mod_say,
/client/proc/cmd_mentor_check_new_players
-// /client/proc/deadchat /*toggles deadchat on/off*/
+// /client/proc/deadchat //toggles deadchat on/off,
)
var/list/admin_verbs_admin = list(
- /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
+ /client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
/datum/admins/proc/set_tcrystals,
/datum/admins/proc/add_tcrystals,
- /client/proc/invisimin, /*allows our mob to go invisible/visible*/
-// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
- /datum/admins/proc/show_game_mode, /*Configuration window for the current game mode.*/
- /datum/admins/proc/force_mode_latespawn, /*Force the mode to try a latespawn proc*/
- /datum/admins/proc/force_antag_latespawn, /*Force a specific template to try a latespawn proc*/
- /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
- /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
- /datum/admins/proc/announce, /*priority announce something to all clients.*/
- /client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/
- /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
- /client/proc/toggle_view_range, /*changes how far we can see*/
- /datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
- /datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
- /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
- /client/proc/cmd_admin_pm_panel, /*admin-pm list*/
- /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
- /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
- /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
- /datum/admins/proc/access_news_network, /*allows access of newscasters*/
- /client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
- /client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
- /client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
- /client/proc/Getmob, /*teleports a mob to our location*/
- /client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
-// /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage
+ /client/proc/invisimin, //allows our mob to go invisible/visible,
+// /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind -Removed due to rare practical use. Moved to debug verbs ~Errorage,
+ /datum/admins/proc/show_game_mode, //Configuration window for the current game mode.,
+ /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc,
+ /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc,
+ /datum/admins/proc/toggleenter, //toggles whether people can join the current game,
+ /datum/admins/proc/toggleguests, //toggles whether guests can join the current game,
+ /datum/admins/proc/announce, //priority announce something to all clients.,
+ /client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc,
+ /client/proc/admin_ghost, //allows us to ghost/reenter body at will,
+ /client/proc/toggle_view_range, //changes how far we can see,
+ /datum/admins/proc/view_txt_log, //shows the server log (diary) for today,
+ /datum/admins/proc/view_atk_log, //shows the server combat-log, doesn't do anything presently,
+ /client/proc/cmd_admin_pm_context, //right-click adminPM interface,
+ /client/proc/cmd_admin_pm_panel, //admin-pm list,
+ /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
+ /client/proc/cmd_admin_delete, //delete an instance/object/mob/etc,
+ /client/proc/cmd_admin_check_contents, //displays the contents of an instance,
+ /datum/admins/proc/access_news_network, //allows access of newscasters,
+ /client/proc/giveruntimelog, //allows us to give access to runtime logs to somebody,
+ /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days,
+ /client/proc/jumptocoord, //we ghost and jump to a coordinate,
+ /client/proc/Getmob, //teleports a mob to our location,
+ /client/proc/Getkey, //teleports a mob with a certain ckey to our location,
+// /client/proc/sendmob, //sends a mob somewhere, -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage,
/client/proc/Jump,
- /client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
- /client/proc/jumptomob, /*allows us to jump to a specific mob*/
- /client/proc/jumptoturf, /*allows us to jump to a specific turf*/
- /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
- /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/
- /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
- /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
+ /client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
+ /client/proc/jumptomob, //allows us to jump to a specific mob,
+ /client/proc/jumptoturf, //allows us to jump to a specific turf,
+ /client/proc/admin_call_shuttle, //allows us to call the emergency shuttle,
+ /client/proc/admin_cancel_shuttle, //allows us to cancel the emergency shuttle, sending it back to centcomm,
+ /client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
+ /client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
/client/proc/cmd_admin_create_centcom_report,
- /client/proc/check_words, /*displays cult-words*/
- /client/proc/check_ai_laws, /*shows AI and borg laws*/
- /client/proc/rename_silicon, /*properly renames silicons*/
- /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */
+ /client/proc/check_words, //displays cult-words,
+ /client/proc/check_ai_laws, //shows AI and borg laws,
+ /client/proc/rename_silicon, //properly renames silicons,
+ /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
/client/proc/check_antagonists,
- /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
- /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
-// /client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/
- /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
+ /client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
+ /client/proc/dsay, //talk in deadchat using our ckey/fakekey,
+// /client/proc/toggle_hear_deadcast, //toggles whether we hear deadchat,
+ /client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log,
/client/proc/secrets,
- /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
- /datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
- /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
- /datum/admins/proc/togglehubvisibility, /*toggles visibility on the BYOND Hub.*/
- /datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
- /client/proc/game_panel, /*game panel, allows to change game-mode etc*/
- /client/proc/cmd_admin_say, /*admin-only ooc chat*/
+ /datum/admins/proc/toggleooc, //toggles ooc on/off for everyone,
+ /datum/admins/proc/togglelooc, //toggles looc on/off for everyone,
+ /datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead,
+ /datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub.,
+ /datum/admins/proc/toggledsay, //toggles dsay on/off for everyone,
+ /client/proc/game_panel, //game panel, allows to change game-mode etc,
+ /client/proc/cmd_admin_say, //admin-only ooc chat,
/datum/admins/proc/PlayerNotes,
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
- /client/proc/free_slot, /*frees slot for chosen job*/
+ /client/proc/free_slot, //frees slot for chosen job,
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_rejuvenate,
/client/proc/toggleghostwriters,
@@ -78,16 +78,16 @@ var/list/admin_verbs_admin = list(
/client/proc/check_customitem_activity,
/client/proc/man_up,
/client/proc/global_man_up,
- /client/proc/response_team, // Response Teams admin verb
+ /client/proc/response_team, // Response Teams admin verb,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
- /client/proc/allow_character_respawn, /* Allows a ghost to respawn */
+ /client/proc/allow_character_respawn, // Allows a ghost to respawn ,
/client/proc/event_manager_panel,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
- /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
- /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
+ /client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
+ /client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
/client/proc/change_security_level,
/client/proc/view_chemical_reaction_logs,
/client/proc/makePAI,
@@ -126,7 +126,7 @@ var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_custom_item,
/datum/admins/proc/check_custom_items,
/datum/admins/proc/spawn_plant,
- /datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
+ /datum/admins/proc/spawn_atom, //allows us to spawn instances,
/client/proc/respawn_character,
/client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge
@@ -144,7 +144,7 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/immreboot,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
- /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
+ /client/proc/cmd_admin_delete, //delete an instance/object/mob/etc,
/client/proc/cmd_debug_del_all,
/datum/admins/proc/adrev,
/datum/admins/proc/adspawn,
@@ -156,7 +156,7 @@ var/list/admin_verbs_server = list(
/client/proc/nanomapgen_DumpImage
)
var/list/admin_verbs_debug = list(
- /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
+ /client/proc/getruntimelog, //allows us to access runtime logs to somebody,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
@@ -188,7 +188,7 @@ var/list/admin_verbs_debug = list(
/client/proc/jumptomob,
/client/proc/jumptocoord,
/client/proc/dsay,
- /client/proc/admin_ghost /*allows us to ghost/reenter body at will*/
+ /client/proc/admin_ghost //allows us to ghost/reenter body at will,
)
var/list/admin_verbs_paranoid_debug = list(
@@ -280,11 +280,11 @@ var/list/admin_verbs_hideable = list(
/datum/admins/proc/set_tcrystals
)
var/list/admin_verbs_mod = list(
- /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
- /client/proc/cmd_admin_pm_panel, /*admin-pm list*/
- /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
+ /client/proc/cmd_admin_pm_context, //right-click adminPM interface,
+ /client/proc/cmd_admin_pm_panel, //admin-pm list,
+ /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game.,
/datum/admins/proc/PlayerNotes,
- /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
+ /client/proc/admin_ghost, //allows us to ghost/reenter body at will,
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
/client/proc/player_panel_new,
@@ -294,10 +294,10 @@ var/list/admin_verbs_mod = list(
/client/proc/check_antagonists,
/client/proc/aooc,
/client/proc/jobbans,
- /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
+ /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
/datum/admins/proc/paralyze_mob,
/client/proc/cmd_admin_direct_narrate,
- /client/proc/allow_character_respawn /* Allows a ghost to respawn */
+ /client/proc/allow_character_respawn // Allows a ghost to respawn ,
)
var/list/admin_verbs_mentor = list(
diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm
index 50ddc81f41b..51f1fbceb31 100644
--- a/code/modules/admin/verbs/modifyvariables.dm
+++ b/code/modules/admin/verbs/modifyvariables.dm
@@ -1,7 +1,7 @@
var/list/forbidden_varedit_object_types = list(
- /datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea.
- /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering
- /datum/feedback_variable //Prevents people messing with feedback gathering
+ /datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea,
+ /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering,
+ /datum/feedback_variable //Prevents people messing with feedback gathering,
)
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 0c6a0f16078..5d8db9c0729 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -234,9 +234,9 @@ Ccomp's first proc.
var/list/mobs = list()
var/list/ghosts = list()
- var/list/sortmob = sortAtom(mob_list) // get the mob list.
- /var/any=0
- for(var/mob/observer/dead/M in sortmob)
+ var/list/sortmob = sortAtom(mob_list) // get the mob list.
+ var/any=0
+ for(var/mob/observer/dead/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
if(!any)
diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm
index aa88e170bf2..d0a6a8be4c2 100644
--- a/code/modules/alarm/alarm.dm
+++ b/code/modules/alarm/alarm.dm
@@ -76,9 +76,9 @@
/datum/alarm/proc/cameras()
// reset camera cache
- if(camera_cache_id != cache_id)
+ if(camera_repository.camera_cache_id != cache_id)
cameras = null
- cache_id = camera_cache_id
+ cache_id = camera_repository.camera_cache_id
// If the alarm origin has changed area, for example a borg containing an alarming camera, reset the list of cameras
else if(cameras && (last_camera_area != alarm_area()))
cameras = null
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index c3c395f15a8..b731905e5fb 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -94,7 +94,7 @@
..()
- on_found(mob/finder as mob)
+ on_found(mob/living/finder as mob)
if(armed)
finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \
"You accidentally trigger [src]!")
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 1155882b82e..0961115d6a8 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -30,7 +30,6 @@
////////////
//SECURITY//
////////////
- var/next_allowed_topic_time = 10
// comment out the line below when debugging locally to enable the options & messages menu
//control_freak = 1
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index aa1cf3b1ad3..c7a6dd7ccb2 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -1,7 +1,6 @@
////////////
//SECURITY//
////////////
-#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
@@ -24,11 +23,6 @@
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
return
- //Reduces spamming of links by dropping calls that happen during the delay period
- if(next_allowed_topic_time > world.time)
- return
- next_allowed_topic_time = world.time + TOPIC_SPAM_DELAY
-
//search the href for script injection
if( findtext(href,"