mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge remote-tracking branch 'upstream/master' into morepreferences
This commit is contained in:
41
.travis.yml
41
.travis.yml
@@ -1,28 +1,39 @@
|
|||||||
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
|
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
|
||||||
language: c
|
language: c
|
||||||
|
sudo: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BYOND_MAJOR="508"
|
BYOND_MAJOR="509"
|
||||||
BYOND_MINOR="1287"
|
BYOND_MINOR="1318"
|
||||||
|
MACRO_COUNT=1004
|
||||||
|
|
||||||
before_install:
|
cache:
|
||||||
- sudo apt-get update -qq
|
directories:
|
||||||
- sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq
|
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
|
||||||
- sudo apt-get install python -qq
|
|
||||||
- sudo apt-get install python-pip -qq
|
addons:
|
||||||
- sudo pip install PyYaml -q
|
apt:
|
||||||
- sudo pip install beautifulsoup4 -q
|
packages:
|
||||||
|
- libc6-i386
|
||||||
|
- libgcc1:i386
|
||||||
|
- libstdc++6:i386
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- chmod +x ./install-byond.sh
|
||||||
|
- ./install-byond.sh
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
|
- pip install --user PyYaml -q
|
||||||
- unzip byond.zip
|
- pip install --user beautifulsoup4 -q
|
||||||
- cd byond
|
|
||||||
- sudo make install
|
|
||||||
- cd ..
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- shopt -s globstar
|
- shopt -s globstar
|
||||||
- (! grep 'step_[xy]' maps/**/*.dmm)
|
- (! grep 'step_[xy]' maps/**/*.dmm)
|
||||||
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
|
- (! 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
|
- DreamMaker polaris.dme
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
|
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/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
|
var/internal_volume = 600 // L
|
||||||
@@ -24,7 +25,6 @@
|
|||||||
..()
|
..()
|
||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
component_parts = list()
|
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/matter_bin(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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
||||||
|
circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
|
||||||
|
|
||||||
var/max_temperature = T20C + 680
|
var/max_temperature = T20C + 680
|
||||||
var/internal_volume = 600 //L
|
var/internal_volume = 600 //L
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
|||||||
//Get heat transfer coefficients for clothing.
|
//Get heat transfer coefficients for clothing.
|
||||||
|
|
||||||
for(var/obj/item/clothing/C in src)
|
for(var/obj/item/clothing/C in src)
|
||||||
if(l_hand == C || r_hand == C)
|
if(item_is_in_hands(C))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if( C.max_heat_protection_temperature >= last_temperature )
|
if( C.max_heat_protection_temperature >= last_temperature )
|
||||||
|
|||||||
@@ -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.
|
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.
|
Can probably be done through "{ }" but I don't really see the practical benefit.
|
||||||
One example of an earlier system is commented below.
|
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
|
/proc/generate_code_phrase()//Proc is used for phrase and response in master_controller.dm
|
||||||
|
|||||||
@@ -94,10 +94,7 @@
|
|||||||
|
|
||||||
if(W == A) // Handle attack_self
|
if(W == A) // Handle attack_self
|
||||||
W.attack_self(src)
|
W.attack_self(src)
|
||||||
if(hand)
|
update_inv_active_hand(0)
|
||||||
update_inv_l_hand(0)
|
|
||||||
else
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//Atoms on your person
|
//Atoms on your person
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
inv_box.name = "r_hand"
|
inv_box.name = "r_hand"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "r_hand_inactive"
|
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.icon_state = "r_hand_active"
|
||||||
inv_box.screen_loc = ui_rhand
|
inv_box.screen_loc = ui_rhand
|
||||||
inv_box.slot_id = slot_r_hand
|
inv_box.slot_id = slot_r_hand
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
inv_box.name = "l_hand"
|
inv_box.name = "l_hand"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "l_hand_inactive"
|
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.icon_state = "l_hand_active"
|
||||||
inv_box.screen_loc = ui_lhand
|
inv_box.screen_loc = ui_lhand
|
||||||
inv_box.slot_id = slot_l_hand
|
inv_box.slot_id = slot_l_hand
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
*
|
*
|
||||||
* To add some code to be called by the hook, define a proc under the type, as so:
|
* To add some code to be called by the hook, define a proc under the type, as so:
|
||||||
* @code
|
* @code
|
||||||
/hook/foo/proc/bar()
|
/hook/foo/proc/bar()
|
||||||
if(1)
|
if(1)
|
||||||
return 1 //Sucessful
|
return 1 //Sucessful
|
||||||
else
|
else
|
||||||
return 0 //Error, or runtime.
|
return 0 //Error, or runtime.
|
||||||
* @endcode
|
* @endcode
|
||||||
* All hooks must return nonzero on success, as runtimes will force return null.
|
* All hooks must return nonzero on success, as runtimes will force return null.
|
||||||
*/
|
*/
|
||||||
|
|||||||
34
code/datums/repositories/cameras.dm
Normal file
34
code/datums/repositories/cameras.dm
Normal file
@@ -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
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
var/global/datum/repository/crew/crew_repository = new()
|
var/global/datum/repository/crew/crew_repository = new()
|
||||||
|
|
||||||
/datum/cache_entry
|
|
||||||
var/timestamp
|
|
||||||
var/data
|
|
||||||
|
|
||||||
/datum/repository/crew
|
/datum/repository/crew
|
||||||
var/list/cache_data
|
var/list/cache_data
|
||||||
|
|
||||||
4
code/datums/repositories/repository.dm
Normal file
4
code/datums/repositories/repository.dm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/datum/cache_entry
|
||||||
|
var/timestamp
|
||||||
|
var/data
|
||||||
|
|
||||||
@@ -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,
|
||||||
/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/circuitboard/solar_control,
|
||||||
/obj/item/weapon/tracker_electronics,
|
/obj/item/weapon/tracker_electronics,
|
||||||
/obj/item/weapon/paper/solar)
|
/obj/item/weapon/paper/solar)
|
||||||
@@ -671,8 +671,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/datum/supply_packs/mecha_ripley
|
/datum/supply_packs/mecha_ripley
|
||||||
name = "Circuit Crate (\"Ripley\" APLU)"
|
name = "Circuit Crate (\"Ripley\" APLU)"
|
||||||
contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair,
|
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/main,
|
||||||
/obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer
|
/obj/item/weapon/circuitboard/mecha/ripley/peripherals)
|
||||||
cost = 30
|
cost = 30
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "APLU \"Ripley\" Circuit Crate"
|
containername = "APLU \"Ripley\" Circuit Crate"
|
||||||
@@ -681,8 +681,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
|
|
||||||
/datum/supply_packs/mecha_odysseus
|
/datum/supply_packs/mecha_odysseus
|
||||||
name = "Circuit Crate (\"Odysseus\")"
|
name = "Circuit Crate (\"Odysseus\")"
|
||||||
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer
|
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals,
|
||||||
/obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer
|
/obj/item/weapon/circuitboard/mecha/odysseus/main)
|
||||||
cost = 25
|
cost = 25
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "\"Odysseus\" Circuit Crate"
|
containername = "\"Odysseus\" Circuit Crate"
|
||||||
@@ -1001,7 +1001,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
containername = "Security barrier crate"
|
containername = "Security barrier crate"
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/securitybarriers
|
/datum/supply_packs/securityshieldgen
|
||||||
name = "Wall shield Generators"
|
name = "Wall shield Generators"
|
||||||
contains = list(/obj/machinery/shieldwallgen,
|
contains = list(/obj/machinery/shieldwallgen,
|
||||||
/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/device/camera_film,
|
/obj/item/device/camera_film,
|
||||||
/obj/item/weapon/storage/photo_album,
|
/obj/item/weapon/storage/photo_album,
|
||||||
/obj/item/device/reagent_scanner)
|
/obj/item/device/reagent_scanner,
|
||||||
|
/obj/item/device/flashlight/maglight)
|
||||||
cost = 35
|
cost = 35
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Forensic equipment"
|
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/accessory/storage/black_vest,
|
||||||
/obj/item/clothing/head/soft/sec/corp,
|
/obj/item/clothing/head/soft/sec/corp,
|
||||||
/obj/item/clothing/under/rank/security/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
|
cost = 30
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Officer equipment"
|
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/reagent_containers/spray/pepper,
|
||||||
/obj/item/weapon/melee/baton/loaded,
|
/obj/item/weapon/melee/baton/loaded,
|
||||||
/obj/item/weapon/storage/box/holobadge,
|
/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
|
cost = 45
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Warden equipment"
|
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/clothing/accessory/holster/waist,
|
||||||
/obj/item/weapon/melee/telebaton,
|
/obj/item/weapon/melee/telebaton,
|
||||||
/obj/item/weapon/shield/riot/tele,
|
/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
|
cost = 65
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Head of security equipment"
|
containername = "Head of security equipment"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
|||||||
|
|
||||||
/datum/wires/alarm/CanUse(var/mob/living/L)
|
/datum/wires/alarm/CanUse(var/mob/living/L)
|
||||||
var/obj/machinery/alarm/A = holder
|
var/obj/machinery/alarm/A = holder
|
||||||
if(A.wiresexposed && A.buildstage == 2)
|
if(A.wiresexposed)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,8 @@ using /datum/datacore/proc/manifest_inject( ), or manifest_insert( )
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var/global/list/PDA_Manifest = list()
|
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)
|
if(PDA_Manifest.len)
|
||||||
return
|
return
|
||||||
var/heads[0]
|
var/heads[0]
|
||||||
@@ -146,7 +145,6 @@ var/global/ManifestJSON
|
|||||||
"bot" = bot,\
|
"bot" = bot,\
|
||||||
"misc" = misc\
|
"misc" = misc\
|
||||||
)
|
)
|
||||||
ManifestJSON = json_encode(PDA_Manifest)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -269,21 +269,6 @@
|
|||||||
throw_range = 5
|
throw_range = 5
|
||||||
w_class = 2.0
|
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) << "<span class='warning'><b>[user] is strangling \himself with \the [src]! It looks like \he's trying to commit suicide.</b></span>"
|
|
||||||
return (OXYLOSS)
|
|
||||||
|
|
||||||
/obj/item/weapon/module
|
/obj/item/weapon/module
|
||||||
icon = 'icons/obj/module.dmi'
|
icon = 'icons/obj/module.dmi'
|
||||||
icon_state = "std_module"
|
icon_state = "std_module"
|
||||||
@@ -599,3 +584,29 @@
|
|||||||
icon = 'icons/obj/stock_parts.dmi'
|
icon = 'icons/obj/stock_parts.dmi'
|
||||||
icon_state = "smes_coil"
|
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)
|
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)
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
||||||
P.name = "nuclear bomb code"
|
P.name = "nuclear bomb code"
|
||||||
if(leader && leader.current)
|
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)
|
leader.current.put_in_hands(P)
|
||||||
|
|
||||||
if(!code_owner && leader)
|
if(!code_owner && leader)
|
||||||
|
|||||||
@@ -73,4 +73,14 @@
|
|||||||
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.
|
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
return 0
|
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 += "<br>Bought [english_list(ling_datum.purchased_powers_history)]."
|
||||||
|
|
||||||
|
return text
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ var/datum/antagonist/renegade/renegades
|
|||||||
|
|
||||||
var/gun_type = pick(spawn_guns)
|
var/gun_type = pick(spawn_guns)
|
||||||
var/obj/item/gun = new gun_type(get_turf(player))
|
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()
|
/proc/rightandwrong()
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ var/list/ghostteleportlocs = list()
|
|||||||
/hook/startup/proc/setupGhostTeleportLocs()
|
/hook/startup/proc/setupGhostTeleportLocs()
|
||||||
for(var/area/AR in world)
|
for(var/area/AR in world)
|
||||||
if(ghostteleportlocs.Find(AR.name)) continue
|
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
|
||||||
ghostteleportlocs[AR.name] = AR
|
ghostteleportlocs[AR.name] = AR
|
||||||
var/turf/picked = pick(get_area_turfs(AR.type))
|
var/turf/picked = pick(get_area_turfs(AR.type))
|
||||||
@@ -122,8 +122,6 @@ area/space/atmosalert()
|
|||||||
/area/space/partyalert()
|
/area/space/partyalert()
|
||||||
return
|
return
|
||||||
|
|
||||||
/area/turret_protected/
|
|
||||||
|
|
||||||
/area/arrival
|
/area/arrival
|
||||||
requires_power = 0
|
requires_power = 0
|
||||||
|
|
||||||
@@ -2422,65 +2420,65 @@ area/space/atmosalert()
|
|||||||
name = "Emergency Storage"
|
name = "Emergency Storage"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
|
|
||||||
/area/turret_protected/ai_upload
|
/area/ai_upload
|
||||||
name = "\improper AI Upload Chamber"
|
name = "\improper AI Upload Chamber"
|
||||||
icon_state = "ai_upload"
|
icon_state = "ai_upload"
|
||||||
ambience = list('sound/ambience/ambimalf.ogg')
|
ambience = list('sound/ambience/ambimalf.ogg')
|
||||||
|
|
||||||
/area/turret_protected/ai_upload_foyer
|
/area/ai_upload_foyer
|
||||||
name = "AI Upload Access"
|
name = "AI Upload Access"
|
||||||
icon_state = "ai_foyer"
|
icon_state = "ai_foyer"
|
||||||
ambience = list('sound/ambience/ambimalf.ogg')
|
ambience = list('sound/ambience/ambimalf.ogg')
|
||||||
sound_env = SMALL_ENCLOSED
|
sound_env = SMALL_ENCLOSED
|
||||||
|
|
||||||
/area/turret_protected/ai_server_room
|
/area/ai_server_room
|
||||||
name = "Messaging Server Room"
|
name = "Messaging Server Room"
|
||||||
icon_state = "ai_server"
|
icon_state = "ai_server"
|
||||||
sound_env = SMALL_ENCLOSED
|
sound_env = SMALL_ENCLOSED
|
||||||
|
|
||||||
/area/turret_protected/ai
|
/area/ai
|
||||||
name = "\improper AI Chamber"
|
name = "\improper AI Chamber"
|
||||||
icon_state = "ai_chamber"
|
icon_state = "ai_chamber"
|
||||||
ambience = list('sound/ambience/ambimalf.ogg')
|
ambience = list('sound/ambience/ambimalf.ogg')
|
||||||
|
|
||||||
/area/turret_protected/ai_cyborg_station
|
/area/ai_cyborg_station
|
||||||
name = "\improper Cyborg Station"
|
name = "\improper Cyborg Station"
|
||||||
icon_state = "ai_cyborg"
|
icon_state = "ai_cyborg"
|
||||||
sound_env = SMALL_ENCLOSED
|
sound_env = SMALL_ENCLOSED
|
||||||
|
|
||||||
/area/turret_protected/aisat
|
/area/aisat
|
||||||
name = "\improper AI Satellite"
|
name = "\improper AI Satellite"
|
||||||
icon_state = "ai"
|
icon_state = "ai"
|
||||||
|
|
||||||
/area/turret_protected/aisat_interior
|
/area/aisat_interior
|
||||||
name = "\improper AI Satellite"
|
name = "\improper AI Satellite"
|
||||||
icon_state = "ai"
|
icon_state = "ai"
|
||||||
|
|
||||||
/area/turret_protected/AIsatextFP
|
/area/AIsatextFP
|
||||||
name = "\improper AI Sat Ext"
|
name = "\improper AI Sat Ext"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/turret_protected/AIsatextFS
|
/area/AIsatextFS
|
||||||
name = "\improper AI Sat Ext"
|
name = "\improper AI Sat Ext"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/turret_protected/AIsatextAS
|
/area/AIsatextAS
|
||||||
name = "\improper AI Sat Ext"
|
name = "\improper AI Sat Ext"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/turret_protected/AIsatextAP
|
/area/AIsatextAP
|
||||||
name = "\improper AI Sat Ext"
|
name = "\improper AI Sat Ext"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/turret_protected/NewAIMain
|
/area/NewAIMain
|
||||||
name = "\improper AI Main New"
|
name = "\improper AI Main New"
|
||||||
icon_state = "storage"
|
icon_state = "storage"
|
||||||
|
|
||||||
@@ -2524,22 +2522,22 @@ area/space/atmosalert()
|
|||||||
name = "\improper Telecoms Central Compartment"
|
name = "\improper Telecoms Central Compartment"
|
||||||
icon_state = "tcomsatcham"
|
icon_state = "tcomsatcham"
|
||||||
|
|
||||||
/area/turret_protected/tcomsat
|
/area/tcomsat
|
||||||
name = "\improper Telecoms Satellite"
|
name = "\improper Telecoms Satellite"
|
||||||
icon_state = "tcomsatlob"
|
icon_state = "tcomsatlob"
|
||||||
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
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"
|
name = "\improper Telecoms Foyer"
|
||||||
icon_state = "tcomsatentrance"
|
icon_state = "tcomsatentrance"
|
||||||
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
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"
|
name = "\improper Telecommunications Satellite West Wing"
|
||||||
icon_state = "tcomsatwest"
|
icon_state = "tcomsatwest"
|
||||||
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
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"
|
name = "\improper Telecommunications Satellite East Wing"
|
||||||
icon_state = "tcomsateast"
|
icon_state = "tcomsateast"
|
||||||
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
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/rnd,
|
||||||
/area/storage,
|
/area/storage,
|
||||||
/area/construction,
|
/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/secure,
|
||||||
/area/ai_monitored/storage/emergency,
|
/area/ai_monitored/storage/emergency,
|
||||||
/area/turret_protected/ai_upload, //do not try to simplify to "/area/turret_protected" --rastaf0
|
/area/ai_upload,
|
||||||
/area/turret_protected/ai_upload_foyer,
|
/area/ai_upload_foyer,
|
||||||
/area/turret_protected/ai,
|
/area/ai
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -292,12 +292,14 @@ var/list/mob/living/forced_ambiance_list = new
|
|||||||
mob << "<span class='notice'>The sudden appearance of gravity makes you fall to the floor!</span>"
|
mob << "<span class='notice'>The sudden appearance of gravity makes you fall to the floor!</span>"
|
||||||
|
|
||||||
/area/proc/prison_break()
|
/area/proc/prison_break()
|
||||||
for(var/obj/machinery/power/apc/temp_apc in src)
|
var/obj/machinery/power/apc/theAPC = get_apc()
|
||||||
temp_apc.overload_lighting(70)
|
if(theAPC.operating)
|
||||||
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
for(var/obj/machinery/power/apc/temp_apc in src)
|
||||||
temp_airlock.prison_open()
|
temp_apc.overload_lighting(70)
|
||||||
for(var/obj/machinery/door/window/temp_windoor in src)
|
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
||||||
temp_windoor.open()
|
temp_airlock.prison_open()
|
||||||
|
for(var/obj/machinery/door/window/temp_windoor in src)
|
||||||
|
temp_windoor.open()
|
||||||
|
|
||||||
/area/proc/has_gravity()
|
/area/proc/has_gravity()
|
||||||
return has_gravity
|
return has_gravity
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
idle_power_usage = 50
|
idle_power_usage = 50
|
||||||
active_power_usage = 300
|
active_power_usage = 300
|
||||||
interact_offline = 1
|
interact_offline = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/clonescanner
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/mob/living/carbon/occupant = null
|
var/mob/living/carbon/occupant = null
|
||||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||||
@@ -55,7 +56,6 @@
|
|||||||
/obj/machinery/dna_scannernew/New()
|
/obj/machinery/dna_scannernew/New()
|
||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/scanning_module(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/micro_laser(src)
|
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
|||||||
var/isabsorbing = 0
|
var/isabsorbing = 0
|
||||||
var/geneticpoints = 5
|
var/geneticpoints = 5
|
||||||
var/max_geneticpoints = 5
|
var/max_geneticpoints = 5
|
||||||
var/purchasedpowers = list()
|
var/list/purchased_powers = list()
|
||||||
var/mimicing = ""
|
var/mimicing = ""
|
||||||
var/cloaked = 0
|
var/cloaked = 0
|
||||||
var/armor_deployed = 0 //This is only used for changeling_generic_equip_all_slots() at the moment.
|
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/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)
|
/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.
|
// Code to auto-purchase free powers.
|
||||||
for(var/datum/power/changeling/P in powerinstances)
|
for(var/datum/power/changeling/P in powerinstances)
|
||||||
if(!P.genomecost) // Is it free?
|
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.
|
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(P.isVerb)
|
||||||
if(lesser_form && !P.allowduringlesserform) continue
|
if(lesser_form && !P.allowduringlesserform) continue
|
||||||
if(!(P in src.verbs))
|
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
|
//removes our changeling verbs
|
||||||
/mob/proc/remove_changeling_powers()
|
/mob/proc/remove_changeling_powers()
|
||||||
if(!mind || !mind.changeling) return
|
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)
|
if(P.isVerb)
|
||||||
verbs -= P.verbpath
|
verbs -= P.verbpath
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,7 @@
|
|||||||
|
|
||||||
var/mob/living/carbon/human/M = src
|
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 << "<span class='warning'>Our hands are full. Drop something first.</span>"
|
src << "<span class='warning'>Our hands are full. Drop something first.</span>"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ var/list/datum/power/changeling/powerinstances = list()
|
|||||||
for(var/datum/power/changeling/P in powerinstances)
|
for(var/datum/power/changeling/P in powerinstances)
|
||||||
var/ownsthis = 0
|
var/ownsthis = 0
|
||||||
|
|
||||||
if(P in purchasedpowers)
|
if(P in purchased_powers)
|
||||||
ownsthis = 1
|
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!"
|
M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(Thepower in purchasedpowers)
|
if(Thepower in purchased_powers)
|
||||||
M.current << "We have already evolved this ability!"
|
M.current << "We have already evolved this ability!"
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -335,7 +335,10 @@ var/list/datum/power/changeling/powerinstances = list()
|
|||||||
|
|
||||||
geneticpoints -= Thepower.genomecost
|
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)
|
if(!Thepower.isVerb && Thepower.verbpath)
|
||||||
call(M.current, Thepower.verbpath)()
|
call(M.current, Thepower.verbpath)()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/datum/power/changeling/absorb_dna
|
/datum/power/changeling/absorb_dna
|
||||||
name = "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
|
genomecost = 0
|
||||||
verbpath = /mob/proc/changeling_absorb_dna
|
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.
|
//Doesn't cost anything as it's the most basic ability.
|
||||||
/mob/proc/changeling_absorb_dna()
|
/mob/proc/changeling_absorb_dna()
|
||||||
set category = "Changeling"
|
set category = "Changeling"
|
||||||
@@ -27,9 +27,10 @@
|
|||||||
src << "<span class='warning'>We do not know how to parse this creature's DNA!</span>"
|
src << "<span class='warning'>We do not know how to parse this creature's DNA!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(HUSK in T.mutations)
|
if(HUSK in T.mutations) //Lings can always absorb other lings, unless someone beat them to it first.
|
||||||
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
|
if(!T.mind.changeling || T.mind.changeling && T.mind.changeling.geneticpoints < 0)
|
||||||
return
|
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
|
||||||
|
return
|
||||||
|
|
||||||
if(G.state != GRAB_KILL)
|
if(G.state != GRAB_KILL)
|
||||||
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
|
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
name = "Arm Blade"
|
name = "Arm Blade"
|
||||||
desc = "We reform one of our arms into a deadly 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."
|
helptext = "We may retract our armblade by dropping it. It can deflect projectiles."
|
||||||
|
enhancedtext = "The blade will have armor peneratration."
|
||||||
genomecost = 2
|
genomecost = 2
|
||||||
verbpath = /mob/proc/changeling_arm_blade
|
verbpath = /mob/proc/changeling_arm_blade
|
||||||
|
|
||||||
@@ -10,9 +11,16 @@
|
|||||||
set category = "Changeling"
|
set category = "Changeling"
|
||||||
set name = "Arm Blade (20)"
|
set name = "Arm Blade (20)"
|
||||||
|
|
||||||
if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade))
|
if(src.mind.changeling.recursive_enhancement)
|
||||||
return 1
|
if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade/greater))
|
||||||
return 0
|
src << "<span class='notice'>We prepare an extra sharp blade.</span>"
|
||||||
|
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
|
/obj/item/weapon/melee/arm_blade
|
||||||
name = "arm blade"
|
name = "arm blade"
|
||||||
@@ -31,6 +39,11 @@
|
|||||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
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.
|
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)
|
/obj/item/weapon/melee/arm_blade/New(location)
|
||||||
..()
|
..()
|
||||||
processing_objects |= src
|
processing_objects |= src
|
||||||
@@ -43,7 +56,7 @@
|
|||||||
/obj/item/weapon/melee/arm_blade/dropped(mob/user)
|
/obj/item/weapon/melee/arm_blade/dropped(mob/user)
|
||||||
visible_message("<span class='warning'>With a sickening crunch, [creator] reforms their arm blade into an arm!</span>",
|
visible_message("<span class='warning'>With a sickening crunch, [creator] reforms their arm blade into an arm!</span>",
|
||||||
"<span class='notice'>We assimilate the weapon back into our body.</span>",
|
"<span class='notice'>We assimilate the weapon back into our body.</span>",
|
||||||
"<span class='italics>You hear organic matter ripping and tearing!</span>")
|
"<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(src)
|
if(src)
|
||||||
@@ -55,7 +68,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords.
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -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."
|
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. \
|
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."
|
Shocking someone costs ten chemicals per use."
|
||||||
|
enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power."
|
||||||
genomecost = 2
|
genomecost = 2
|
||||||
verbpath = /mob/proc/changeling_bioelectrogenesis
|
verbpath = /mob/proc/changeling_bioelectrogenesis
|
||||||
|
|
||||||
@@ -21,8 +22,14 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(held_item == null)
|
if(held_item == null)
|
||||||
if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc.
|
if(src.mind.changeling.recursive_enhancement)
|
||||||
return 1
|
if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent))
|
||||||
|
src << "<span class='notice'>We will shock others more efficently.</span>"
|
||||||
|
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
|
return 0
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -30,12 +37,11 @@
|
|||||||
if(istype(held_item,/obj/item/weapon/grab))
|
if(istype(held_item,/obj/item/weapon/grab))
|
||||||
var/obj/item/weapon/grab/G = held_item
|
var/obj/item/weapon/grab/G = held_item
|
||||||
if(G.affecting)
|
if(G.affecting)
|
||||||
G.affecting.electrocute_act(5,src,1.0,BP_TORSO)
|
G.affecting.electrocute_act(10,src,1.0,BP_TORSO)
|
||||||
var/agony = 60 //The same as a stunbaton.
|
var/agony = 80 //Does more than if hit with an electric hand, since grabbing is slower.
|
||||||
var/stun = 0
|
G.affecting.stun_effect_act(0, agony, BP_TORSO, src)
|
||||||
G.affecting.stun_effect_act(stun, 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("<span class='warning'>Arcs of electricity strike [G.affecting]!</span>",
|
visible_message("<span class='warning'>Arcs of electricity strike [G.affecting]!</span>",
|
||||||
"<span class='warning'>Our hand channels raw electricity into [G.affecting].</span>",
|
"<span class='warning'>Our hand channels raw electricity into [G.affecting].</span>",
|
||||||
@@ -72,7 +78,7 @@
|
|||||||
new /obj/effect/effect/sparks(T)
|
new /obj/effect/effect/sparks(T)
|
||||||
held_item.update_icon()
|
held_item.update_icon()
|
||||||
i--
|
i--
|
||||||
sleep(10)
|
sleep(1 SECOND)
|
||||||
success = 1
|
success = 1
|
||||||
if(success == 0) //If we couldn't do anything with the ability, don't deduct the chemicals.
|
if(success == 0) //If we couldn't do anything with the ability, don't deduct the chemicals.
|
||||||
src << "<span class='warning'>We are unable to affect \the [held_item].</span>"
|
src << "<span class='warning'>We are unable to affect \the [held_item].</span>"
|
||||||
@@ -85,6 +91,14 @@
|
|||||||
desc = "You could probably shock someone badly if you touched them, or recharge something."
|
desc = "You could probably shock someone badly if you touched them, or recharge something."
|
||||||
icon = 'icons/obj/weapons.dmi'
|
icon = 'icons/obj/weapons.dmi'
|
||||||
icon_state = "electric_hand"
|
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()
|
/obj/item/weapon/electric_hand/New()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
@@ -108,22 +122,20 @@
|
|||||||
if(istype(target,/mob/living/carbon))
|
if(istype(target,/mob/living/carbon))
|
||||||
var/mob/living/carbon/C = target
|
var/mob/living/carbon/C = target
|
||||||
|
|
||||||
if(user.mind.changeling.chem_charges < 10)
|
if(user.mind.changeling.chem_charges < shock_cost)
|
||||||
src << "<span class='warning'>We require more chemicals to electrocute [C]!</span>"
|
src << "<span class='warning'>We require more chemicals to electrocute [C]!</span>"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
C.electrocute_act(5,src,1.0,BP_TORSO)
|
C.electrocute_act(electrocute_amount,src,1.0,BP_TORSO)
|
||||||
var/agony = 60 //The same as a stunbaton.
|
C.stun_effect_act(0, agony_amount, BP_TORSO, src)
|
||||||
var/stun = 0
|
|
||||||
C.stun_effect_act(stun, agony, 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("<span class='warning'>Arcs of electricity strike [C]!</span>",
|
visible_message("<span class='warning'>Arcs of electricity strike [C]!</span>",
|
||||||
"<span class='warning'>Our hand channels raw electricity into [C]</span>",
|
"<span class='warning'>Our hand channels raw electricity into [C]</span>",
|
||||||
"<span class='italics'>You hear sparks!</span>")
|
"<span class='italics'>You hear sparks!</span>")
|
||||||
//qdel(src) //Since we're no longer a one hit stun, we need to stick around.
|
//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
|
return 1
|
||||||
|
|
||||||
else if(istype(target,/mob/living/silicon))
|
else if(istype(target,/mob/living/silicon))
|
||||||
@@ -163,7 +175,7 @@
|
|||||||
new /obj/effect/effect/sparks(Turf)
|
new /obj/effect/effect/sparks(Turf)
|
||||||
T.update_icon()
|
T.update_icon()
|
||||||
i--
|
i--
|
||||||
sleep(10)
|
sleep(1 SECOND)
|
||||||
success = 1
|
success = 1
|
||||||
break
|
break
|
||||||
if(success == 0)
|
if(success == 0)
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/datum/power/changeling/cryo_sting
|
/datum/power/changeling/cryo_sting
|
||||||
name = "Cryogenic Sting"
|
name = "Cryogenic Sting"
|
||||||
desc = "We silently sting a biological with a cocktail of chemicals that freeze them."
|
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."
|
enhancedtext = "Increases the amount of chemicals injected."
|
||||||
genomecost = 1
|
genomecost = 1
|
||||||
verbpath = /mob/proc/changeling_cryo_sting
|
verbpath = /mob/proc/changeling_cryo_sting
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/datum/power/changeling/delayed_toxic_sting
|
/datum/power/changeling/delayed_toxic_sting
|
||||||
name = "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."
|
desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not \
|
||||||
helptext = "The toxin takes effect in about two minutes."
|
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."
|
enhancedtext = "The toxic damage is doubled."
|
||||||
genomecost = 1
|
genomecost = 1
|
||||||
verbpath = /mob/proc/changeling_delayed_toxic_sting
|
verbpath = /mob/proc/changeling_delayed_toxic_sting
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
while(i)
|
while(i)
|
||||||
T.adjustToxLoss(1)
|
T.adjustToxLoss(1)
|
||||||
i--
|
i--
|
||||||
sleep(20)
|
sleep(2 SECONDS)
|
||||||
src.verbs -= /mob/proc/changeling_delayed_toxic_sting
|
src.verbs -= /mob/proc/changeling_delayed_toxic_sting
|
||||||
spawn(3 MINUTES)
|
spawn(3 MINUTES)
|
||||||
src << "<span class='notice'>We are ready to use our delayed toxic string once more.</span>"
|
src << "<span class='notice'>We are ready to use our delayed toxic string once more.</span>"
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
else //Probably broken or no power.
|
else //Probably broken or no power.
|
||||||
user << "<span class='warning'>The door does not respond to the pulse.</span>"
|
user << "<span class='warning'>The door does not respond to the pulse.</span>"
|
||||||
door.add_fingerprint(user)
|
door.add_fingerprint(user)
|
||||||
|
log_and_message_admins("finger-lockpicked \an [door].")
|
||||||
ling_datum.chem_charges -= 10
|
ling_datum.chem_charges -= 10
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
user << "<span class='notice'>We send an electrical pulse up our finger, and into \the [O].</span>"
|
user << "<span class='notice'>We send an electrical pulse up our finger, and into \the [O].</span>"
|
||||||
O.add_fingerprint(user)
|
O.add_fingerprint(user)
|
||||||
O.emag_act(1,user,src)
|
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
|
ling_datum.chem_charges -= 10
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/datum/power/changeling/endoarmor
|
/datum/power/changeling/endoarmor
|
||||||
name = "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."
|
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
|
genomecost = 1
|
||||||
isVerb = 0
|
isVerb = 0
|
||||||
verbpath = /mob/proc/changeling_endoarmor
|
verbpath = /mob/proc/changeling_endoarmor
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/datum/power/changeling/enfeebling_string
|
/datum/power/changeling/enfeebling_string
|
||||||
name = "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."
|
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."
|
enhancedtext = "Maximum health is lowered further."
|
||||||
genomecost = 1
|
genomecost = 1
|
||||||
verbpath = /mob/proc/changeling_enfeebling_string
|
verbpath = /mob/proc/changeling_enfeebling_string
|
||||||
@@ -17,17 +18,21 @@
|
|||||||
if(ishuman(T))
|
if(ishuman(T))
|
||||||
var/mob/living/carbon/human/H = T
|
var/mob/living/carbon/human/H = T
|
||||||
|
|
||||||
var/effect = 30
|
var/effect = 30 //percent
|
||||||
if(src.mind.changeling.recursive_enhancement)
|
if(src.mind.changeling.recursive_enhancement)
|
||||||
effect = effect + 20
|
effect = effect + 20
|
||||||
src << "<span class='notice'>We make them extremely weak.</span>"
|
src << "<span class='notice'>We make them extremely weak.</span>"
|
||||||
src.mind.changeling.recursive_enhancement = 0
|
src.mind.changeling.recursive_enhancement = 0
|
||||||
|
var/health_to_take_away = H.maxHealth * (effect / 100)
|
||||||
|
|
||||||
H.maxHealth -= effect
|
H.maxHealth -= health_to_take_away
|
||||||
H << "<span class='danger'>You feel a small prick and you feel weak.</span>"
|
H << "<span class='danger'>You feel a small prick and you feel extremly weak!</span>"
|
||||||
spawn(300) //Five minutes
|
src.verbs -= /mob/proc/changeling_enfeebling_string
|
||||||
|
spawn(5 MINUTES)
|
||||||
|
src.verbs |= /mob/proc/changeling_enfeebling_string
|
||||||
|
src << "<span class='notice'>Our enfeebling string is ready to be used once more.</span>"
|
||||||
if(H) //Just incase we stop existing in five minutes for whatever reason.
|
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.
|
if(!H.stat) //It'd be weird to no longer feel weak when you're dead.
|
||||||
H << "<span class='notice'>You no longer feel extremly weak.</span>"
|
H << "<span class='notice'>You no longer feel extremly weak.</span>"
|
||||||
feedback_add_details("changeling_powers","ES")
|
feedback_add_details("changeling_powers","ES")
|
||||||
|
|||||||
@@ -31,10 +31,10 @@
|
|||||||
C.adjustBruteLoss(-heal_amount)
|
C.adjustBruteLoss(-heal_amount)
|
||||||
C.adjustOxyLoss(-heal_amount)
|
C.adjustOxyLoss(-heal_amount)
|
||||||
C.adjustFireLoss(-heal_amount)
|
C.adjustFireLoss(-heal_amount)
|
||||||
sleep(10)
|
sleep(1 SECOND)
|
||||||
|
|
||||||
src.verbs -= /mob/proc/changeling_fleshmend
|
src.verbs -= /mob/proc/changeling_fleshmend
|
||||||
spawn(500)
|
spawn(50 SECONDS)
|
||||||
src << "<span class='notice'>Our regeneration has slowed to normal levels.</span>"
|
src << "<span class='notice'>Our regeneration has slowed to normal levels.</span>"
|
||||||
src.verbs += /mob/proc/changeling_fleshmend
|
src.verbs += /mob/proc/changeling_fleshmend
|
||||||
feedback_add_details("changeling_powers","FM")
|
feedback_add_details("changeling_powers","FM")
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
new /obj/effect/gibspawner/human(T)
|
new /obj/effect/gibspawner/human(T)
|
||||||
visible_message("<span class='warning'>With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!</span>",
|
visible_message("<span class='warning'>With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!</span>",
|
||||||
"<span class='notice'>We reform our body. We are whole once more.</span>",
|
"<span class='notice'>We reform our body. We are whole once more.</span>",
|
||||||
"<span class='italics>You hear organic matter ripping and tearing!</span>")
|
"<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||||
|
|
||||||
feedback_add_details("changeling_powers","RR")
|
feedback_add_details("changeling_powers","RR")
|
||||||
return 1
|
return 1
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
src.remove_changeling_powers() //First, remove the verbs.
|
src.remove_changeling_powers() //First, remove the verbs.
|
||||||
var/datum/changeling/ling_datum = src.mind.changeling
|
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.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_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
|
||||||
ling_datum.chem_storage = 50
|
ling_datum.chem_storage = 50
|
||||||
@@ -21,5 +21,7 @@
|
|||||||
|
|
||||||
src << "<span class='notice'>We have removed our evolutions from this form, and are now ready to readapt.</span>"
|
src << "<span class='notice'>We have removed our evolutions from this form, and are now ready to readapt.</span>"
|
||||||
|
|
||||||
|
ling_datum.purchased_powers_history.Add("Re-adapt (Reset to [ling_datum.max_geneticpoints])")
|
||||||
|
|
||||||
//Now to lose the verb, so no unlimited resets.
|
//Now to lose the verb, so no unlimited resets.
|
||||||
src.verbs -= /mob/proc/changeling_respec
|
src.verbs -= /mob/proc/changeling_respec
|
||||||
@@ -33,10 +33,13 @@
|
|||||||
if(ishuman(C))
|
if(ishuman(C))
|
||||||
var/mob/living/carbon/human/H = src
|
var/mob/living/carbon/human/H = src
|
||||||
H.restore_blood()
|
H.restore_blood()
|
||||||
|
H.mutations.Remove(HUSK)
|
||||||
|
H.status_flags -= DISFIGURED
|
||||||
|
H.update_body(1)
|
||||||
C << "<span class='notice'>We have regenerated.</span>"
|
C << "<span class='notice'>We have regenerated.</span>"
|
||||||
C.status_flags &= ~(FAKEDEATH)
|
C.status_flags &= ~(FAKEDEATH)
|
||||||
C.update_canmove()
|
C.update_canmove()
|
||||||
C.mind.changeling.purchasedpowers -= C
|
C.mind.changeling.purchased_powers -= C
|
||||||
feedback_add_details("changeling_powers","CR")
|
feedback_add_details("changeling_powers","CR")
|
||||||
C.stat = CONSCIOUS
|
C.stat = CONSCIOUS
|
||||||
src.verbs -= /mob/proc/changeling_revive
|
src.verbs -= /mob/proc/changeling_revive
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
if(ishuman(src))
|
if(ishuman(src))
|
||||||
var/mob/living/carbon/human/H = src
|
var/mob/living/carbon/human/H = src
|
||||||
H.b_type = "AB+" //For some reason we have two blood types on the mob.
|
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.real_name = chosen_dna.real_name
|
||||||
src.flavor_text = ""
|
src.flavor_text = ""
|
||||||
src.UpdateAppearance()
|
src.UpdateAppearance()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
if(announce)
|
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')
|
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)
|
for(var/obj/machinery/power/smes/S in world)
|
||||||
var/area/current_area = get_area(S)
|
var/area/current_area = get_area(S)
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
C.cell.charge = 0
|
C.cell.charge = 0
|
||||||
|
|
||||||
/proc/power_restore(var/announce = 1)
|
/proc/power_restore(var/announce = 1)
|
||||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
var/list/skipped_areas = list(/area/ai)
|
||||||
|
|
||||||
if(announce)
|
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')
|
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||||
|
|||||||
@@ -60,11 +60,6 @@
|
|||||||
|
|
||||||
/datum/malf_hardware/strong_turrets/install()
|
/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)
|
for(var/obj/machinery/porta_turret/T in machines)
|
||||||
T.maxhealth = round(initial(T.maxhealth) * 1.4)
|
T.maxhealth = round(initial(T.maxhealth) * 1.4)
|
||||||
T.shot_delay = round(initial(T.shot_delay) / 2)
|
T.shot_delay = round(initial(T.shot_delay) / 2)
|
||||||
|
|||||||
@@ -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)
|
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/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/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/device/pda/roboticist(H), slot_r_store)
|
||||||
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/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)
|
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
var/wiresexposed = 0 // If it's been screwdrivered open.
|
var/wiresexposed = 0 // If it's been screwdrivered open.
|
||||||
var/aidisabled = 0
|
var/aidisabled = 0
|
||||||
var/shorted = 0
|
var/shorted = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/airalarm
|
||||||
|
|
||||||
var/datum/wires/alarm/wires
|
var/datum/wires/alarm/wires
|
||||||
|
|
||||||
@@ -61,7 +62,6 @@
|
|||||||
var/screen = AALARM_SCREEN_MAIN
|
var/screen = AALARM_SCREEN_MAIN
|
||||||
var/area_uid
|
var/area_uid
|
||||||
var/area/alarm_area
|
var/area/alarm_area
|
||||||
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
|
|
||||||
|
|
||||||
var/target_temperature = T0C+20
|
var/target_temperature = T0C+20
|
||||||
var/regulating_temperature = 0
|
var/regulating_temperature = 0
|
||||||
@@ -105,23 +105,8 @@
|
|||||||
wires = null
|
wires = null
|
||||||
return ..()
|
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()
|
first_run()
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/first_run()
|
/obj/machinery/alarm/proc/first_run()
|
||||||
@@ -148,7 +133,7 @@
|
|||||||
elect_master()
|
elect_master()
|
||||||
|
|
||||||
/obj/machinery/alarm/process()
|
/obj/machinery/alarm/process()
|
||||||
if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
|
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/turf/simulated/location = loc
|
var/turf/simulated/location = loc
|
||||||
@@ -605,9 +590,6 @@
|
|||||||
data["thresholds"] = thresholds
|
data["thresholds"] = thresholds
|
||||||
|
|
||||||
/obj/machinery/alarm/CanUseTopic(var/mob/user, var/datum/topic_state/state, var/href_list = list())
|
/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))
|
if(aidisabled && isAI(user))
|
||||||
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
||||||
return STATUS_CLOSE
|
return STATUS_CLOSE
|
||||||
@@ -763,73 +745,43 @@
|
|||||||
|
|
||||||
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
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 (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
|
||||||
if(2)
|
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
||||||
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||||
//user << "You pop the Air Alarm's maintence panel open."
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||||
wiresexposed = !wiresexposed
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
update_icon()
|
A.frame_type = "airalarm"
|
||||||
return
|
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))
|
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
||||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
if(stat & (NOPOWER|BROKEN))
|
||||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
user << "It does nothing"
|
||||||
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 << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
|
|
||||||
else
|
|
||||||
user << "<span class='warning'>Access denied.</span>"
|
|
||||||
return
|
return
|
||||||
|
else
|
||||||
if(1)
|
if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
|
||||||
if(istype(W, /obj/item/stack/cable_coil))
|
locked = !locked
|
||||||
var/obj/item/stack/cable_coil/C = W
|
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
|
||||||
if (C.use(5))
|
else
|
||||||
user << "<span class='notice'>You wire \the [src].</span>"
|
user << "<span class='warning'>Access denied.</span>"
|
||||||
buildstage = 2
|
|
||||||
update_icon()
|
|
||||||
first_run()
|
|
||||||
return
|
|
||||||
else
|
|
||||||
user << "<span class='warning'>You need 5 pieces of cable to do wire \the [src].</span>"
|
|
||||||
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)
|
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/alarm/power_change()
|
/obj/machinery/alarm/power_change()
|
||||||
@@ -839,14 +791,10 @@
|
|||||||
|
|
||||||
/obj/machinery/alarm/examine(mob/user)
|
/obj/machinery/alarm/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if (buildstage < 2)
|
|
||||||
user << "It is not wired."
|
|
||||||
if (buildstage < 1)
|
|
||||||
user << "The circuit is missing."
|
|
||||||
/*
|
/*
|
||||||
AIR ALARM CIRCUIT
|
AIR ALARM CIRCUIT
|
||||||
Just a object used in constructing air alarms
|
Just a object used in constructing air alarms
|
||||||
*/
|
|
||||||
/obj/item/weapon/airalarm_electronics
|
/obj/item/weapon/airalarm_electronics
|
||||||
name = "air alarm electronics"
|
name = "air alarm electronics"
|
||||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
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."
|
desc = "Looks like a circuit. Probably is."
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
FIRE ALARM
|
FIRE ALARM
|
||||||
*/
|
*/
|
||||||
@@ -875,20 +823,13 @@ FIRE ALARM
|
|||||||
power_channel = ENVIRON
|
power_channel = ENVIRON
|
||||||
var/last_process = 0
|
var/last_process = 0
|
||||||
var/wiresexposed = 0
|
var/wiresexposed = 0
|
||||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
|
||||||
var/seclevel
|
var/seclevel
|
||||||
|
circuit = /obj/item/weapon/circuitboard/firealarm
|
||||||
|
|
||||||
/obj/machinery/firealarm/update_icon()
|
/obj/machinery/firealarm/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
|
|
||||||
if(wiresexposed)
|
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)
|
set_light(0)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -932,56 +873,36 @@ FIRE ALARM
|
|||||||
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
|
if (istype(W, /obj/item/weapon/screwdriver))
|
||||||
wiresexposed = !wiresexposed
|
wiresexposed = !wiresexposed
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(wiresexposed)
|
if(wiresexposed)
|
||||||
switch(buildstage)
|
if (istype(W, /obj/item/device/multitool))
|
||||||
if(2)
|
src.detecting = !( src.detecting )
|
||||||
if (istype(W, /obj/item/device/multitool))
|
if (src.detecting)
|
||||||
src.detecting = !( src.detecting )
|
user.visible_message("<span class='notice'>\The [user] has reconnected [src]'s detecting unit!</span>", "<span class='notice'>You have reconnected [src]'s detecting unit.</span>")
|
||||||
if (src.detecting)
|
else
|
||||||
user.visible_message("<span class='notice'>\The [user] has reconnected [src]'s detecting unit!</span>", "<span class='notice'>You have reconnected [src]'s detecting unit.</span>")
|
user.visible_message("<span class='notice'>\The [user] has disconnected [src]'s detecting unit!</span>", "<span class='notice'>You have disconnected [src]'s detecting unit.</span>")
|
||||||
else
|
else if (istype(W, /obj/item/weapon/wirecutters))
|
||||||
user.visible_message("<span class='notice'>\The [user] has disconnected [src]'s detecting unit!</span>", "<span class='notice'>You have disconnected [src]'s detecting unit.</span>")
|
user.visible_message("<span class='notice'>\The [user] has cut the wires inside \the [src]!</span>", "<span class='notice'>You have cut the wires inside \the [src].</span>")
|
||||||
else if (istype(W, /obj/item/weapon/wirecutters))
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||||
user.visible_message("<span class='notice'>\The [user] has cut the wires inside \the [src]!</span>", "<span class='notice'>You have cut the wires inside \the [src].</span>")
|
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 )
|
||||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
buildstage = 1
|
A.frame_type = "firealarm"
|
||||||
update_icon()
|
A.pixel_x = pixel_x
|
||||||
if(1)
|
A.pixel_y = pixel_y
|
||||||
if(istype(W, /obj/item/stack/cable_coil))
|
A.set_dir(dir)
|
||||||
var/obj/item/stack/cable_coil/C = W
|
A.circuit = M
|
||||||
if (C.use(5))
|
A.anchored = 1
|
||||||
user << "<span class='notice'>You wire \the [src].</span>"
|
for (var/obj/C in src)
|
||||||
buildstage = 2
|
C.forceMove(loc)
|
||||||
return
|
A.state = 2
|
||||||
else
|
A.icon_state = "firealarm_2"
|
||||||
user << "<span class='warning'>You need 5 pieces of cable to wire \the [src].</span>"
|
M.deconstruct(src)
|
||||||
return
|
qdel(src)
|
||||||
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)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
src.alarm()
|
src.alarm()
|
||||||
@@ -1016,9 +937,6 @@ FIRE ALARM
|
|||||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (buildstage != 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
var/area/A = src.loc
|
var/area/A = src.loc
|
||||||
var/d1
|
var/d1
|
||||||
@@ -1061,9 +979,6 @@ FIRE ALARM
|
|||||||
if (usr.stat || stat & (BROKEN|NOPOWER))
|
if (usr.stat || stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (buildstage != 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
if (href_list["reset"])
|
if (href_list["reset"])
|
||||||
@@ -1106,23 +1021,6 @@ FIRE ALARM
|
|||||||
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
||||||
return
|
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)
|
/obj/machinery/firealarm/proc/set_security_level(var/newlevel)
|
||||||
if(seclevel != newlevel)
|
if(seclevel != newlevel)
|
||||||
seclevel = newlevel
|
seclevel = newlevel
|
||||||
@@ -1135,7 +1033,7 @@ FIRE ALARM
|
|||||||
/*
|
/*
|
||||||
FIRE ALARM CIRCUIT
|
FIRE ALARM CIRCUIT
|
||||||
Just a object used in constructing fire alarms
|
Just a object used in constructing fire alarms
|
||||||
*/
|
|
||||||
/obj/item/weapon/firealarm_electronics
|
/obj/item/weapon/firealarm_electronics
|
||||||
name = "fire alarm electronics"
|
name = "fire alarm electronics"
|
||||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
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!\""
|
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||||
|
*/
|
||||||
/obj/machinery/partyalarm
|
/obj/machinery/partyalarm
|
||||||
name = "\improper PARTY BUTTON"
|
name = "\improper PARTY BUTTON"
|
||||||
desc = "Cuban Pete is in the house!"
|
desc = "Cuban Pete is in the house!"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
active_power_usage = 2000
|
active_power_usage = 2000
|
||||||
|
circuit = /obj/item/weapon/circuitboard/autolathe
|
||||||
var/list/machine_recipes
|
var/list/machine_recipes
|
||||||
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
|
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
|
||||||
var/list/storage_capacity = 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)
|
wires = new(src)
|
||||||
//Create parts for lathe.
|
//Create parts for lathe.
|
||||||
component_parts = list()
|
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/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/manipulator(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||||
RefreshParts()
|
RefreshParts()
|
||||||
|
|
||||||
/obj/machinery/autolathe/Destroy()
|
/obj/machinery/autolathe/Destroy()
|
||||||
qdel(wires)
|
qdel(wires)
|
||||||
wires = null
|
wires = null
|
||||||
|
|||||||
@@ -158,12 +158,12 @@
|
|||||||
|
|
||||||
/datum/autolathe/recipe/airalarm
|
/datum/autolathe/recipe/airalarm
|
||||||
name = "air alarm electronics"
|
name = "air alarm electronics"
|
||||||
path = /obj/item/weapon/airalarm_electronics
|
path = /obj/item/weapon/circuitboard/airalarm
|
||||||
category = "Engineering"
|
category = "Engineering"
|
||||||
|
|
||||||
/datum/autolathe/recipe/firealarm
|
/datum/autolathe/recipe/firealarm
|
||||||
name = "fire alarm electronics"
|
name = "fire alarm electronics"
|
||||||
path = /obj/item/weapon/firealarm_electronics
|
path = /obj/item/weapon/circuitboard/firealarm
|
||||||
category = "Engineering"
|
category = "Engineering"
|
||||||
|
|
||||||
/datum/autolathe/recipe/powermodule
|
/datum/autolathe/recipe/powermodule
|
||||||
@@ -171,6 +171,96 @@
|
|||||||
path = /obj/item/weapon/module/power_control
|
path = /obj/item/weapon/module/power_control
|
||||||
category = "Engineering"
|
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
|
/datum/autolathe/recipe/rcd_ammo
|
||||||
name = "matter cartridge"
|
name = "matter cartridge"
|
||||||
path = /obj/item/weapon/rcd_ammo
|
path = /obj/item/weapon/rcd_ammo
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "biogen-stand"
|
icon_state = "biogen-stand"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/biogenerator
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 40
|
idle_power_usage = 40
|
||||||
var/processing = 0
|
var/processing = 0
|
||||||
@@ -23,7 +24,6 @@
|
|||||||
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
|
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
var/on_open_network = 0
|
var/on_open_network = 0
|
||||||
|
|
||||||
|
var/affected_by_emp_until = 0
|
||||||
|
|
||||||
/obj/machinery/camera/New()
|
/obj/machinery/camera/New()
|
||||||
wires = new(src)
|
wires = new(src)
|
||||||
assembly = new(src)
|
assembly = new(src)
|
||||||
@@ -62,22 +64,29 @@
|
|||||||
wires = null
|
wires = null
|
||||||
return ..()
|
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)
|
/obj/machinery/camera/emp_act(severity)
|
||||||
if(!isEmpProof())
|
if(!isEmpProof() && prob(100/severity))
|
||||||
if(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
|
stat |= EMPED
|
||||||
set_light(0)
|
set_light(0)
|
||||||
|
triggerCameraAlarm()
|
||||||
kick_viewers()
|
kick_viewers()
|
||||||
triggerCameraAlarm(30 / severity)
|
|
||||||
update_icon()
|
update_icon()
|
||||||
update_coverage()
|
update_coverage()
|
||||||
|
processing_objects |= src
|
||||||
spawn(900)
|
|
||||||
stat &= ~EMPED
|
|
||||||
cancelCameraAlarm()
|
|
||||||
update_icon()
|
|
||||||
update_coverage()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
|
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
|
||||||
take_damage(P.get_structure_damage())
|
take_damage(P.get_structure_damage())
|
||||||
@@ -105,7 +114,6 @@
|
|||||||
cameranet.updateVisibility(src, 0)
|
cameranet.updateVisibility(src, 0)
|
||||||
|
|
||||||
/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
|
/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
|
||||||
|
|
||||||
if(!istype(user))
|
if(!istype(user))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -114,7 +122,6 @@
|
|||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||||
icon_state = "[initial(icon_state)]1"
|
|
||||||
add_hiddenprint(user)
|
add_hiddenprint(user)
|
||||||
destroy()
|
destroy()
|
||||||
|
|
||||||
@@ -176,7 +183,7 @@
|
|||||||
for(var/mob/O in player_list)
|
for(var/mob/O in player_list)
|
||||||
if (istype(O.machine, /obj/machinery/computer/security))
|
if (istype(O.machine, /obj/machinery/computer/security))
|
||||||
var/obj/machinery/computer/security/S = O.machine
|
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 << "[U] holds \a [itemname] up to one of the cameras ..."
|
||||||
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
|
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
|
||||||
|
|
||||||
@@ -214,8 +221,7 @@
|
|||||||
//legacy support, if choice is != 1 then just kick viewers without changing status
|
//legacy support, if choice is != 1 then just kick viewers without changing status
|
||||||
kick_viewers()
|
kick_viewers()
|
||||||
else
|
else
|
||||||
update_coverage()
|
set_status(!src.status)
|
||||||
set_status( !src.status )
|
|
||||||
if (!(src.status))
|
if (!(src.status))
|
||||||
if(user)
|
if(user)
|
||||||
visible_message("<span class='notice'> [user] has deactivated [src]!</span>")
|
visible_message("<span class='notice'> [user] has deactivated [src]!</span>")
|
||||||
@@ -257,7 +263,7 @@
|
|||||||
/obj/machinery/camera/proc/set_status(var/newstatus)
|
/obj/machinery/camera/proc/set_status(var/newstatus)
|
||||||
if (status != newstatus)
|
if (status != newstatus)
|
||||||
status = newstatus
|
status = newstatus
|
||||||
invalidateCameraCache()
|
update_coverage()
|
||||||
// now disconnect anyone using the camera
|
// now disconnect anyone using the camera
|
||||||
//Apparently, this will disconnect anyone even if the camera was re-activated.
|
//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?
|
//I guess that doesn't matter since they couldn't use it anyway?
|
||||||
@@ -273,7 +279,7 @@
|
|||||||
for(var/mob/O in player_list)
|
for(var/mob/O in player_list)
|
||||||
if (istype(O.machine, /obj/machinery/computer/security))
|
if (istype(O.machine, /obj/machinery/computer/security))
|
||||||
var/obj/machinery/computer/security/S = O.machine
|
var/obj/machinery/computer/security/S = O.machine
|
||||||
if (S.current == src)
|
if (S.current_camera == src)
|
||||||
O.unset_machine()
|
O.unset_machine()
|
||||||
O.reset_view(null)
|
O.reset_view(null)
|
||||||
O << "The screen bursts into static."
|
O << "The screen bursts into static."
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
|
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
|
||||||
flags = PROXMOVE
|
flags = PROXMOVE
|
||||||
|
|
||||||
/obj/machinery/camera/process()
|
/obj/machinery/camera/internal_process()
|
||||||
// motion camera event loop
|
// motion camera event loop
|
||||||
if (stat & (EMPED|NOPOWER))
|
if (stat & (EMPED|NOPOWER))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
desc = "An electronically-lockable pod for growing organic tissue."
|
desc = "An electronically-lockable pod for growing organic tissue."
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/clonepod
|
||||||
icon = 'icons/obj/cloning.dmi'
|
icon = 'icons/obj/cloning.dmi'
|
||||||
icon_state = "pod_0"
|
icon_state = "pod_0"
|
||||||
req_access = list(access_genetics) //For premature unlocking.
|
req_access = list(access_genetics) //For premature unlocking.
|
||||||
@@ -47,7 +48,6 @@
|
|||||||
/obj/machinery/clonepod/New()
|
/obj/machinery/clonepod/New()
|
||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
|||||||
@@ -393,14 +393,14 @@
|
|||||||
dat += "<br>You ran out of food and starved."
|
dat += "<br>You ran out of food and starved."
|
||||||
if(emagged)
|
if(emagged)
|
||||||
user.nutrition = 0 //yeah you pretty hongry
|
user.nutrition = 0 //yeah you pretty hongry
|
||||||
user << "<span class='danger'><font size=3>Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.</span>"
|
user << "<span class='danger'><font size=3>Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.</font></span>"
|
||||||
if(fuel <= 0)
|
if(fuel <= 0)
|
||||||
dat += "<br>You ran out of fuel, and drift, slowly, into a star."
|
dat += "<br>You ran out of fuel, and drift, slowly, into a star."
|
||||||
if(emagged)
|
if(emagged)
|
||||||
var/mob/living/M = user
|
var/mob/living/M = user
|
||||||
M.adjust_fire_stacks(5)
|
M.adjust_fire_stacks(5)
|
||||||
M.IgniteMob() //flew into a star, so you're on fire
|
M.IgniteMob() //flew into a star, so you're on fire
|
||||||
user << "<span class='danger'><font size=3>You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames.</span>"
|
user << "<span class='danger'><font size=3>You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames.</font></span>"
|
||||||
dat += "<br><P ALIGN=Right><a href='byond://?src=\ref[src];menu=1'>OK...</a></P>"
|
dat += "<br><P ALIGN=Right><a href='byond://?src=\ref[src];menu=1'>OK...</a></P>"
|
||||||
|
|
||||||
if(emagged)
|
if(emagged)
|
||||||
|
|||||||
@@ -1,28 +1,25 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
//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
|
/obj/machinery/computer/security
|
||||||
name = "security camera monitor"
|
name = "security camera monitor"
|
||||||
desc = "Used to access the various cameras on the station."
|
desc = "Used to access the various cameras on the station."
|
||||||
icon_keyboard = "security_key"
|
icon_keyboard = "security_key"
|
||||||
icon_screen = "cameras"
|
icon_screen = "cameras"
|
||||||
light_color = "#a91515"
|
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/last_pic = 1.0
|
||||||
var/list/network
|
var/list/network
|
||||||
var/mapping = 0//For the overview file, interesting bit of code.
|
var/mapping = 0//For the overview file, interesting bit of code.
|
||||||
var/cache_id = 0
|
var/cache_id = 0
|
||||||
circuit = /obj/item/weapon/circuitboard/security
|
circuit = /obj/item/weapon/circuitboard/security
|
||||||
var/camera_cache = null
|
|
||||||
|
|
||||||
New()
|
New()
|
||||||
if(!network)
|
if(!network)
|
||||||
network = station_networks
|
network = station_networks.Copy()
|
||||||
..()
|
..()
|
||||||
|
if(network.len)
|
||||||
|
current_network = network[1]
|
||||||
|
|
||||||
attack_ai(var/mob/user as mob)
|
attack_ai(var/mob/user as mob)
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
@@ -30,9 +27,9 @@
|
|||||||
check_eye(var/mob/user as mob)
|
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.
|
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
|
return -1
|
||||||
if(!current)
|
if(!current_camera)
|
||||||
return 0
|
return 0
|
||||||
var/viewflag = current.check_eye(user)
|
var/viewflag = current_camera.check_eye(user)
|
||||||
if ( viewflag < 0 ) //camera doesn't work
|
if ( viewflag < 0 ) //camera doesn't work
|
||||||
reset_current()
|
reset_current()
|
||||||
return viewflag
|
return viewflag
|
||||||
@@ -44,25 +41,11 @@
|
|||||||
|
|
||||||
var/data[0]
|
var/data[0]
|
||||||
|
|
||||||
data["current"] = null
|
data["current_camera"] = current_camera ? current_camera.nano_structure() : null
|
||||||
|
data["current_network"] = current_network
|
||||||
if(camera_cache_id != cache_id)
|
data["networks"] = network ? network : list()
|
||||||
cache_id = camera_cache_id
|
if(current_network)
|
||||||
cameranet.process_sort()
|
data["cameras"] = camera_repository.cameras_in_network(current_network)
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
if (!ui)
|
if (!ui)
|
||||||
@@ -75,22 +58,32 @@
|
|||||||
|
|
||||||
ui.set_initial_data(data)
|
ui.set_initial_data(data)
|
||||||
ui.open()
|
ui.open()
|
||||||
ui.set_auto_update(1)
|
|
||||||
|
|
||||||
Topic(href, href_list)
|
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(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(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
|
var/obj/machinery/camera/C = locate(href_list["switch_camera"]) in cameranet.cameras
|
||||||
if(!C) return
|
if(!C)
|
||||||
|
return
|
||||||
|
if(!(current_network in C.network))
|
||||||
|
return
|
||||||
|
|
||||||
switch_to_camera(usr, C)
|
switch_to_camera(usr, C)
|
||||||
return 1
|
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"])
|
else if(href_list["reset"])
|
||||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
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(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||||
reset_current()
|
reset_current()
|
||||||
usr.reset_view(current)
|
usr.reset_view(current_camera)
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -105,12 +98,6 @@
|
|||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
ui_interact(user)
|
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)
|
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.
|
//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))
|
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)))
|
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
|
return 0
|
||||||
set_current(C)
|
set_current(C)
|
||||||
user.reset_view(current)
|
user.reset_view(current_camera)
|
||||||
check_eye(user)
|
check_eye(user)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -160,26 +147,37 @@
|
|||||||
if(can_access_camera(jump_to))
|
if(can_access_camera(jump_to))
|
||||||
switch_to_camera(user,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)
|
/obj/machinery/computer/security/proc/set_current(var/obj/machinery/camera/C)
|
||||||
if(current == C)
|
if(current_camera == C)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(current)
|
if(current_camera)
|
||||||
reset_current()
|
reset_current()
|
||||||
|
|
||||||
src.current = C
|
src.current_camera = C
|
||||||
if(current)
|
if(current_camera)
|
||||||
use_power = 2
|
use_power = 2
|
||||||
var/mob/living/L = current.loc
|
var/mob/living/L = current_camera.loc
|
||||||
if(istype(L))
|
if(istype(L))
|
||||||
L.tracking_initiated()
|
L.tracking_initiated()
|
||||||
|
|
||||||
/obj/machinery/computer/security/proc/reset_current()
|
/obj/machinery/computer/security/proc/reset_current()
|
||||||
if(current)
|
if(current_camera)
|
||||||
var/mob/living/L = current.loc
|
var/mob/living/L = current_camera.loc
|
||||||
if(istype(L))
|
if(istype(L))
|
||||||
L.tracking_cancelled()
|
L.tracking_cancelled()
|
||||||
current = null
|
current_camera = null
|
||||||
use_power = 1
|
use_power = 1
|
||||||
|
|
||||||
//Camera control: mouse.
|
//Camera control: mouse.
|
||||||
@@ -192,7 +190,7 @@
|
|||||||
/mob/Move(n,direct)
|
/mob/Move(n,direct)
|
||||||
if(istype(machine,/obj/machinery/computer/security))
|
if(istype(machine,/obj/machinery/computer/security))
|
||||||
var/obj/machinery/computer/security/console = machine
|
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++)
|
for(var/i;i<10;i++)
|
||||||
T = get_step(T,direct)
|
T = get_step(T,direct)
|
||||||
console.jump_on_click(src,T)
|
console.jump_on_click(src,T)
|
||||||
@@ -206,7 +204,7 @@
|
|||||||
icon_keyboard = null
|
icon_keyboard = null
|
||||||
icon_screen = null
|
icon_screen = null
|
||||||
light_range_on = 0
|
light_range_on = 0
|
||||||
network = list("thunder")
|
network = list(NETWORK_THUNDER)
|
||||||
density = 0
|
density = 0
|
||||||
circuit = null
|
circuit = null
|
||||||
|
|
||||||
@@ -217,8 +215,8 @@
|
|||||||
icon_screen = "entertainment"
|
icon_screen = "entertainment"
|
||||||
light_color = "#FFEEDB"
|
light_color = "#FFEEDB"
|
||||||
light_range_on = 2
|
light_range_on = 2
|
||||||
circuit = null
|
network = list(NETWORK_THUNDER)
|
||||||
|
circuit = /obj/item/weapon/circuitboard/security/telescreen/entertainment
|
||||||
/obj/machinery/computer/security/wooden_tv
|
/obj/machinery/computer/security/wooden_tv
|
||||||
name = "security camera monitor"
|
name = "security camera monitor"
|
||||||
desc = "An old TV hooked into the stations camera network."
|
desc = "An old TV hooked into the stations camera network."
|
||||||
@@ -228,7 +226,6 @@
|
|||||||
circuit = null
|
circuit = null
|
||||||
light_color = "#3848B3"
|
light_color = "#3848B3"
|
||||||
light_power_on = 0.5
|
light_power_on = 0.5
|
||||||
|
|
||||||
/obj/machinery/computer/security/mining
|
/obj/machinery/computer/security/mining
|
||||||
name = "outpost camera monitor"
|
name = "outpost camera monitor"
|
||||||
desc = "Used to access the various cameras on the outpost."
|
desc = "Used to access the various cameras on the outpost."
|
||||||
@@ -237,7 +234,6 @@
|
|||||||
network = list("MINE")
|
network = list("MINE")
|
||||||
circuit = /obj/item/weapon/circuitboard/security/mining
|
circuit = /obj/item/weapon/circuitboard/security/mining
|
||||||
light_color = "#F9BBFC"
|
light_color = "#F9BBFC"
|
||||||
|
|
||||||
/obj/machinery/computer/security/engineering
|
/obj/machinery/computer/security/engineering
|
||||||
name = "engineering camera monitor"
|
name = "engineering camera monitor"
|
||||||
desc = "Used to monitor fires and breaches."
|
desc = "Used to monitor fires and breaches."
|
||||||
@@ -245,19 +241,16 @@
|
|||||||
icon_screen = "engie_cams"
|
icon_screen = "engie_cams"
|
||||||
circuit = /obj/item/weapon/circuitboard/security/engineering
|
circuit = /obj/item/weapon/circuitboard/security/engineering
|
||||||
light_color = "#FAC54B"
|
light_color = "#FAC54B"
|
||||||
|
|
||||||
/obj/machinery/computer/security/engineering/New()
|
/obj/machinery/computer/security/engineering/New()
|
||||||
if(!network)
|
if(!network)
|
||||||
network = engineering_networks
|
network = engineering_networks.Copy()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/computer/security/nuclear
|
/obj/machinery/computer/security/nuclear
|
||||||
name = "head mounted camera monitor"
|
name = "head mounted camera monitor"
|
||||||
desc = "Used to access the built-in cameras in helmets."
|
desc = "Used to access the built-in cameras in helmets."
|
||||||
icon_state = "syndicam"
|
icon_state = "syndicam"
|
||||||
network = list(NETWORK_MERCENARY)
|
network = list(NETWORK_MERCENARY)
|
||||||
circuit = null
|
circuit = null
|
||||||
|
|
||||||
/obj/machinery/computer/security/nuclear/New()
|
/obj/machinery/computer/security/nuclear/New()
|
||||||
..()
|
..()
|
||||||
req_access = list(150)
|
req_access = list(150)
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 300
|
idle_power_usage = 300
|
||||||
active_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/processing = 0
|
||||||
|
|
||||||
var/icon_keyboard = "generic_key"
|
var/icon_keyboard = "generic_key"
|
||||||
@@ -98,23 +98,28 @@
|
|||||||
|
|
||||||
/obj/machinery/computer/attackby(I as obj, user as mob)
|
/obj/machinery/computer/attackby(I as obj, user as mob)
|
||||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||||
|
user << "<span class='notice'>You start disconnecting the monitor.</span>"
|
||||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
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 )
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
A.circuit = M
|
A.circuit = M
|
||||||
A.anchored = 1
|
A.anchored = 1
|
||||||
|
A.density = 1
|
||||||
|
A.frame_type = M.board_type
|
||||||
for (var/obj/C in src)
|
for (var/obj/C in src)
|
||||||
C.loc = src.loc
|
C.forceMove(loc)
|
||||||
if (src.stat & BROKEN)
|
if (src.stat & BROKEN)
|
||||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||||
new /obj/item/weapon/material/shard( src.loc )
|
new /obj/item/weapon/material/shard( src.loc )
|
||||||
A.state = 3
|
A.state = 3
|
||||||
A.icon_state = "3"
|
A.icon_state = "[A.frame_type]_3"
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
A.state = 4
|
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)
|
M.deconstruct(src)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
icon_keyboard = null
|
icon_keyboard = null
|
||||||
icon_screen = "pass"
|
icon_screen = "pass"
|
||||||
density = 0
|
density = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/guestpass
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/giver
|
var/obj/item/weapon/card/id/giver
|
||||||
var/list/accesses = list()
|
var/list/accesses = list()
|
||||||
@@ -60,11 +61,30 @@
|
|||||||
..()
|
..()
|
||||||
uid = "[rand(100,999)]-G[rand(10,99)]"
|
uid = "[rand(100,999)]-G[rand(10,99)]"
|
||||||
|
|
||||||
/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
|
/obj/machinery/computer/guestpass/attackby(obj/I, mob/user)
|
||||||
if(istype(O, /obj/item/weapon/card/id))
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||||
if(!giver && user.unEquip(O))
|
user << "<span class='notice'>You start disconnecting the monitor.</span>"
|
||||||
O.loc = src
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
giver = O
|
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
|
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()
|
updateUsrDialog()
|
||||||
else if(giver)
|
else if(giver)
|
||||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||||
|
|||||||
@@ -26,32 +26,6 @@ var/prison_shuttle_timeleft = 0
|
|||||||
attack_ai(var/mob/user as mob)
|
attack_ai(var/mob/user as mob)
|
||||||
return src.attack_hand(user)
|
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 << "<span class='notice'>The broken glass falls out.</span>"
|
|
||||||
new /obj/item/weapon/material/shard( src.loc )
|
|
||||||
A.state = 3
|
|
||||||
A.icon_state = "3"
|
|
||||||
else
|
|
||||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
|
||||||
A.state = 4
|
|
||||||
A.icon_state = "4"
|
|
||||||
|
|
||||||
qdel(src)
|
|
||||||
else
|
|
||||||
return src.attack_hand(user)
|
|
||||||
|
|
||||||
|
|
||||||
attack_hand(var/mob/user as mob)
|
attack_hand(var/mob/user as mob)
|
||||||
if(!src.allowed(user) && (!hacked))
|
if(!src.allowed(user) && (!hacked))
|
||||||
user << "<span class='warning'>Access Denied.</span>"
|
user << "<span class='warning'>Access Denied.</span>"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
// when you had to search the list to find what you had.
|
// when you had to search the list to find what you had.
|
||||||
|
|
||||||
// Mostly decorative, holds the OS rom
|
// Mostly decorative, holds the OS rom
|
||||||
var/obj/item/part/computer/circuitboard/circuit
|
var/obj/item/part/computer/circuitboard/circuitb
|
||||||
|
|
||||||
// Storage
|
// Storage
|
||||||
var/obj/item/part/computer/storage/hdd/hdd = null
|
var/obj/item/part/computer/storage/hdd/hdd = null
|
||||||
@@ -97,11 +97,11 @@
|
|||||||
overlays += kb
|
overlays += kb
|
||||||
|
|
||||||
if(!built)
|
if(!built)
|
||||||
if(!circuit || !istype(circuit))
|
if(!circuitb || !istype(circuitb))
|
||||||
circuit = new(src)
|
circuitb = new(src)
|
||||||
if(circuit.OS)
|
if(circuitb.OS)
|
||||||
os = circuit.OS
|
os = circuitb.OS
|
||||||
circuit.OS.computer = src
|
circuitb.OS.computer = src
|
||||||
else
|
else
|
||||||
os = null
|
os = null
|
||||||
|
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
floppy.addfile(P)
|
floppy.addfile(P)
|
||||||
program = P
|
program = P
|
||||||
else
|
else
|
||||||
circuit.OS = P
|
circuitb.OS = P
|
||||||
circuit.OS.computer = src
|
circuitb.OS.computer = src
|
||||||
os = circuit.OS
|
os = circuitb.OS
|
||||||
circuit.name = "Circuitboard ([P])"
|
circuitb.name = "Circuitboard ([P])"
|
||||||
|
|
||||||
|
|
||||||
if(hdd) // Spawn files
|
if(hdd) // Spawn files
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
New()
|
New()
|
||||||
..(built=0)
|
..(built=0)
|
||||||
os = program
|
os = program
|
||||||
circuit.OS = os
|
circuitb.OS = os
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer3/security/mining
|
/obj/machinery/computer3/security/mining
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
if (stat & BROKEN)
|
if (stat & BROKEN)
|
||||||
new /obj/item/weapon/circuitboard/broken(src.loc)
|
new /obj/item/weapon/circuitboard/broken(src.loc)
|
||||||
else
|
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)
|
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
|
||||||
FA.anchored = 1
|
FA.anchored = 1
|
||||||
|
|||||||
@@ -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)
|
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||||
wired = 0
|
wired = 0
|
||||||
|
|
||||||
else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
|
else if(istype(C, /obj/item/weapon/circuitboard/airalarm) && wired)
|
||||||
if(anchored)
|
if(anchored)
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
|
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
|
||||||
|
|||||||
412
code/game/machinery/frame.dm
Normal file
412
code/game/machinery/frame.dm
Normal file
@@ -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 << "<span class='notice'>You start to wrench the frame into place.</span>"
|
||||||
|
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 << "<span class='notice'>You wrench the frame into place and set the outer cover.</span>"
|
||||||
|
else
|
||||||
|
src.state = 1
|
||||||
|
user << "<span class='notice'>You wrench the frame into place.</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
if(state == 1)
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
|
if(do_after(user, 20))
|
||||||
|
user << "<span class='notice'>You unfasten the frame.</span>"
|
||||||
|
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 << "<span class='notice'>You deconstruct the frame.</span>"
|
||||||
|
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 << "<span class='notice'>You place the circuit board inside the frame.</span>"
|
||||||
|
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 << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
|
||||||
|
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 << "<span class='notice'>You screw the circuit board into place.</span>"
|
||||||
|
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 << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||||
|
src.state = 1
|
||||||
|
src.icon_state = "[frame_type]_1"
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!need_circuit && circuit)
|
||||||
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
|
user << "<span class='notice'>You unfasten the outer cover.</span>"
|
||||||
|
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 << "<span class='notice'>You fasten the cover.</span>"
|
||||||
|
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 << "<span class='notice'>You connect the monitor.</span>"
|
||||||
|
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 << "<span class='notice'>You connect the monitor.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the circuit board.</span>"
|
||||||
|
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 << "<span class='notice'>There are no components to remove.</span>"
|
||||||
|
else
|
||||||
|
user << "<span class='notice'>You remove the components.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the glass panel.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the glass panel.</span>"
|
||||||
|
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 << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
|
||||||
|
return
|
||||||
|
user << "<span class='notice'>You start to add cables to the frame.</span>"
|
||||||
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
|
if(do_after(user, 20) && state == 2)
|
||||||
|
if (C.use(5))
|
||||||
|
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the cables.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the cables.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the cables.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the cables.</span>"
|
||||||
|
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 << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
|
||||||
|
return
|
||||||
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
|
user << "<span class='notice'>You start to put in the glass panel.</span>"
|
||||||
|
if(do_after(user, 20) && state == 3)
|
||||||
|
if (G.use(2))
|
||||||
|
user << "<span class='notice'>You put in the glass panel.</span>"
|
||||||
|
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 << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
|
||||||
|
return
|
||||||
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
|
user << "<span class='notice'>You start to put in the glass panel.</span>"
|
||||||
|
if(do_after(user, 20) && state == 3)
|
||||||
|
if (G.use(2))
|
||||||
|
user << "<span class='notice'>You put in the glass panel.</span>"
|
||||||
|
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 << "<span class='warning'>You cannot add that component to the machine!</span>"
|
||||||
|
return
|
||||||
@@ -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."
|
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
|
||||||
icon_state = "holopad0"
|
icon_state = "holopad0"
|
||||||
show_messages = 1
|
show_messages = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/holopad
|
||||||
|
|
||||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
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/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.
|
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 << "<span class='notice'>You start removing the glass.</span>"
|
||||||
|
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 << "<span class='notice'>You remove the glass.</span>"
|
||||||
|
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.
|
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||||
if(!istype(user))
|
if(!istype(user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -62,6 +62,19 @@
|
|||||||
user << "You attach \the [W] to \the [src]."
|
user << "You attach \the [W] to \the [src]."
|
||||||
src.update_icon()
|
src.update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(istype(W, /obj/item/weapon/screwdriver))
|
||||||
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
|
user << "<span class='notice'>You start to dismantle the IV drip.</span>"
|
||||||
|
if(do_after(user, 15))
|
||||||
|
user << "<span class='notice'>You dismantle the IV drip.</span>"
|
||||||
|
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
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
idle_power_usage = 5
|
idle_power_usage = 5
|
||||||
active_power_usage = 100
|
active_power_usage = 100
|
||||||
flags = OPENCONTAINER | NOREACT
|
flags = OPENCONTAINER | NOREACT
|
||||||
|
circuit = /obj/item/weapon/circuitboard/microwave
|
||||||
var/operating = 0 // Is it on?
|
var/operating = 0 // Is it on?
|
||||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||||
var/broken = 0 // ={0,1,2} How broken is it???
|
var/broken = 0 // ={0,1,2} How broken is it???
|
||||||
@@ -29,6 +30,13 @@
|
|||||||
..()
|
..()
|
||||||
reagents = new/datum/reagents(100)
|
reagents = new/datum/reagents(100)
|
||||||
reagents.my_atom = src
|
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)
|
if (!available_recipes)
|
||||||
available_recipes = new
|
available_recipes = new
|
||||||
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
|
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
|
||||||
@@ -82,6 +90,11 @@
|
|||||||
else
|
else
|
||||||
user << "<span class='warning'>It's broken!</span>"
|
user << "<span class='warning'>It's broken!</span>"
|
||||||
return 1
|
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!
|
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
|
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner)) // If they're trying to clean it then let them
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
icon = 'icons/obj/power.dmi'
|
icon = 'icons/obj/power.dmi'
|
||||||
icon_state = "light1"
|
icon_state = "light1"
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
|
use_power = 1
|
||||||
|
idle_power_usage = 10
|
||||||
|
power_channel = LIGHT
|
||||||
var/on = 1
|
var/on = 1
|
||||||
var/area/area = null
|
var/area/area = null
|
||||||
var/otherarea = null
|
var/otherarea = null
|
||||||
// luminosity = 1
|
|
||||||
|
|
||||||
/obj/machinery/light_switch/New()
|
/obj/machinery/light_switch/New()
|
||||||
..()
|
..()
|
||||||
@@ -31,8 +33,12 @@
|
|||||||
/obj/machinery/light_switch/proc/updateicon()
|
/obj/machinery/light_switch/proc/updateicon()
|
||||||
if(stat & NOPOWER)
|
if(stat & NOPOWER)
|
||||||
icon_state = "light-p"
|
icon_state = "light-p"
|
||||||
|
set_light(0)
|
||||||
|
layer = OBJ_LAYER
|
||||||
else
|
else
|
||||||
icon_state = "light[on]"
|
icon_state = "light[on]"
|
||||||
|
set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
|
||||||
|
layer = LIGHTING_LAYER+0.1
|
||||||
|
|
||||||
/obj/machinery/light_switch/examine(mob/user)
|
/obj/machinery/light_switch/examine(mob/user)
|
||||||
if(..(user, 1))
|
if(..(user, 1))
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ Class Procs:
|
|||||||
var/panel_open = 0
|
var/panel_open = 0
|
||||||
var/global/gl_uid = 1
|
var/global/gl_uid = 1
|
||||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
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)
|
/obj/machinery/New(l, d=0)
|
||||||
..(l)
|
..(l)
|
||||||
@@ -225,11 +227,6 @@ Class Procs:
|
|||||||
istype(usr, /mob/living/silicon)))
|
istype(usr, /mob/living/silicon)))
|
||||||
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||||
return 1
|
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))
|
if (ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.getBrainLoss() >= 55)
|
if(H.getBrainLoss() >= 55)
|
||||||
@@ -280,29 +277,13 @@ Class Procs:
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
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 << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
|
|
||||||
update_icon()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
|
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
|
||||||
if(!istype(R))
|
if(!istype(R))
|
||||||
return 0
|
return 0
|
||||||
if(!component_parts)
|
if(!component_parts)
|
||||||
return 0
|
return 0
|
||||||
if(panel_open)
|
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
|
var/P
|
||||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||||
for(var/D in CB.req_components)
|
for(var/D in CB.req_components)
|
||||||
@@ -328,13 +309,45 @@ Class Procs:
|
|||||||
user << "<span class='notice'> [C.name]</span>"
|
user << "<span class='notice'> [C.name]</span>"
|
||||||
return 1
|
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 << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
|
||||||
|
update_icon()
|
||||||
|
return 1
|
||||||
|
|
||||||
/obj/machinery/proc/dismantle()
|
/obj/machinery/proc/dismantle()
|
||||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
M.set_dir(src.dir)
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
M.state = 2
|
A.circuit = M
|
||||||
M.icon_state = "box_1"
|
A.anchored = 1
|
||||||
for(var/obj/I in component_parts)
|
A.density = 1
|
||||||
I.loc = loc
|
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)
|
qdel(src)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
light_range = 0
|
light_range = 0
|
||||||
anchored = 1
|
anchored = 1
|
||||||
var/obj/machinery/exonet_node/node = null
|
var/obj/machinery/exonet_node/node = null
|
||||||
|
circuit = /obj/item/weapon/circuitboard/newscaster
|
||||||
|
|
||||||
/obj/machinery/newscaster/security_unit //Security unit
|
/obj/machinery/newscaster/security_unit //Security unit
|
||||||
name = "Security Newscaster"
|
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)
|
/obj/machinery/newscaster/attackby(I as obj, user as mob)
|
||||||
if (src.isbroken)
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
|
user << "<span class='notice'>You start disconnecting the monitor.</span>"
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
O.show_message("<EM>[user.name]</EM> further abuses the shattered [src.name].")
|
if(do_after(user, 20))
|
||||||
else
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
if(istype(I, /obj/item/weapon) )
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
var/obj/item/weapon/W = I
|
A.frame_type = "newscaster"
|
||||||
if(W.force <15)
|
A.pixel_x = pixel_x
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
A.pixel_y = pixel_y
|
||||||
O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
|
A.circuit = M
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
A.anchored = 1
|
||||||
|
for (var/obj/C in src)
|
||||||
|
C.forceMove(loc)
|
||||||
|
if (src.stat & isbroken == 1)
|
||||||
|
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||||
|
new /obj/item/weapon/material/shard( src.loc )
|
||||||
|
A.state = 3
|
||||||
|
A.icon_state = "newscaster_3"
|
||||||
else
|
else
|
||||||
src.hitstaken++
|
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
if(src.hitstaken==3)
|
A.state = 4
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
A.icon_state = "newscaster_4"
|
||||||
O.show_message("[user.name] smashes the [src.name]!" )
|
M.deconstruct(src)
|
||||||
src.isbroken=1
|
qdel(src)
|
||||||
playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
|
else
|
||||||
else
|
src.attack_hand(user)
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
return
|
||||||
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 << "<FONT COLOR='blue'>This does nothing.</FONT>"
|
|
||||||
src.update_icon()
|
|
||||||
|
|
||||||
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
||||||
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ obj/machinery/recharger
|
|||||||
var/icon_state_charging = "recharger1"
|
var/icon_state_charging = "recharger1"
|
||||||
var/icon_state_idle = "recharger0" //also when unpowered
|
var/icon_state_idle = "recharger0" //also when unpowered
|
||||||
var/portable = 1
|
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)
|
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||||
if(istype(user,/mob/living/silicon))
|
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
|
anchored = !anchored
|
||||||
user << "You [anchored ? "attached" : "detached"] the recharger."
|
user << "You [anchored ? "attached" : "detached"] the recharger."
|
||||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
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)
|
obj/machinery/recharger/attack_hand(mob/user as mob)
|
||||||
if(istype(user,/mob/living/silicon))
|
if(istype(user,/mob/living/silicon))
|
||||||
@@ -156,3 +169,5 @@ obj/machinery/recharger/wallcharger
|
|||||||
icon_state_charging = "wrecharger1"
|
icon_state_charging = "wrecharger1"
|
||||||
icon_state_idle = "wrecharger0"
|
icon_state_idle = "wrecharger0"
|
||||||
portable = 0
|
portable = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
|
||||||
|
frame_type = "wrecharger"
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "borgcharger0"
|
icon_state = "borgcharger0"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/recharge_station
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 50
|
idle_power_usage = 50
|
||||||
var/mob/occupant = null
|
var/mob/occupant = null
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
component_parts = list()
|
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/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
density = 0
|
density = 0
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
|
circuit = /obj/item/weapon/circuitboard/status_display
|
||||||
var/mode = 1 // 0 = Blank
|
var/mode = 1 // 0 = Blank
|
||||||
// 1 = Shuttle timer
|
// 1 = Shuttle timer
|
||||||
// 2 = Arbitrary message(s)
|
// 2 = Arbitrary message(s)
|
||||||
@@ -51,6 +52,29 @@
|
|||||||
radio_controller.remove_object(src,frequency)
|
radio_controller.remove_object(src,frequency)
|
||||||
return ..()
|
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
|
A.state = 4
|
||||||
|
A.icon_state = "display_4"
|
||||||
|
M.deconstruct(src)
|
||||||
|
qdel(src)
|
||||||
|
else
|
||||||
|
src.attack_hand(user)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
// register for radio system
|
// register for radio system
|
||||||
/obj/machinery/status_display/initialize()
|
/obj/machinery/status_display/initialize()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ var/list/ai_status_emotions = list(
|
|||||||
name = "AI display"
|
name = "AI display"
|
||||||
anchored = 1
|
anchored = 1
|
||||||
density = 0
|
density = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/ai_status_display
|
||||||
|
|
||||||
var/mode = 0 // 0 = Blank
|
var/mode = 0 // 0 = Blank
|
||||||
// 1 = AI emoticon
|
// 1 = AI emoticon
|
||||||
@@ -68,6 +69,28 @@ var/list/ai_status_emotions = list(
|
|||||||
|
|
||||||
var/emotion = "Neutral"
|
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
|
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)
|
/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
|
||||||
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
||||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
var/screen = 0 // the screen number:
|
var/screen = 0 // the screen number:
|
||||||
var/list/servers = list() // the servers located by the computer
|
var/list/servers = list() // the servers located by the computer
|
||||||
var/obj/machinery/telecomms/server/SelectedServer
|
var/obj/machinery/telecomms/server/SelectedServer
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_server
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
var/temp = "" // temporary feedback messages
|
var/temp = "" // temporary feedback messages
|
||||||
@@ -188,36 +189,6 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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 << "<span class='notice'>The broken glass falls out.</span>"
|
|
||||||
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
|
||||||
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)
|
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
|
|||||||
@@ -98,8 +98,8 @@
|
|||||||
// Drop a circuit board too
|
// Drop a circuit board too
|
||||||
C.loc = user.loc
|
C.loc = user.loc
|
||||||
|
|
||||||
// Create a machine frame and delete the current machine
|
// Create a frame and delete the current machine
|
||||||
var/obj/machinery/constructable_frame/machine_frame/F = new
|
var/obj/structure/frame/F = new
|
||||||
F.loc = src.loc
|
F.loc = src.loc
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
var/screen = 0 // the screen number:
|
var/screen = 0 // the screen number:
|
||||||
var/list/machinelist = list() // the machines located by the computer
|
var/list/machinelist = list() // the machines located by the computer
|
||||||
var/obj/machinery/telecomms/SelectedMachine
|
var/obj/machinery/telecomms/SelectedMachine
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_monitor
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
|
|
||||||
@@ -123,36 +124,6 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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 << "<span class='notice'>The broken glass falls out.</span>"
|
|
||||||
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
|
||||||
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)
|
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
var/mob/lasteditor
|
var/mob/lasteditor
|
||||||
var/list/viewingcode = list()
|
var/list/viewingcode = list()
|
||||||
var/obj/machinery/telecomms/server/SelectedServer
|
var/obj/machinery/telecomms/server/SelectedServer
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_traffic
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
var/temp = "" // temporary feedback messages
|
var/temp = "" // temporary feedback messages
|
||||||
@@ -206,40 +207,10 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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 << "<span class='notice'>The broken glass falls out.</span>"
|
|
||||||
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
|
||||||
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)
|
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
emagged = 1
|
emagged = 1
|
||||||
user << "<span class='notice'>You you disable the security protocols</span>"
|
user << "<span class='notice'>You you disable the security protocols</span>"
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return 1
|
return 1
|
||||||
@@ -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("<span class='danger'>[user] has slashed at [src]!</span>")
|
|
||||||
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("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
|
||||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
|
||||||
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 = {"<html>
|
|
||||||
<head><title>[src] Control</title></head>
|
|
||||||
<body>
|
|
||||||
<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"on":"off"]</a><br>
|
|
||||||
<b>Scan Range: </b><a href='?src=\ref[src];scan_range=-1'>-</a> [scan_range] <a href='?src=\ref[src];scan_range=1'>+</a><br>
|
|
||||||
<b>Scan for: </b>"}
|
|
||||||
for(var/scan in scan_for)
|
|
||||||
dat += "<div style=\"margin-left: 15px;\">[scan] (<a href='?src=\ref[src];scan_for=[scan]'>[scan_for[scan]?"Yes":"No"]</a>)</div>"
|
|
||||||
|
|
||||||
dat += {"<b>Ammo: </b>[max(0, projectiles)]<br>
|
|
||||||
</body>
|
|
||||||
</html>"}
|
|
||||||
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
|
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
layer = 2.9
|
layer = 2.9
|
||||||
anchored = 1
|
anchored = 1
|
||||||
density = 1
|
density = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/vending
|
||||||
|
frame_type = "vending"
|
||||||
|
|
||||||
var/icon_vend //Icon_state when vending
|
var/icon_vend //Icon_state when vending
|
||||||
var/icon_deny //Icon_state when denying access
|
var/icon_deny //Icon_state when denying access
|
||||||
@@ -94,6 +96,14 @@
|
|||||||
/obj/machinery/vending/New()
|
/obj/machinery/vending/New()
|
||||||
..()
|
..()
|
||||||
wires = new(src)
|
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)
|
spawn(4)
|
||||||
if(src.product_slogans)
|
if(src.product_slogans)
|
||||||
src.slogan_list += splittext(src.product_slogans, ";")
|
src.slogan_list += splittext(src.product_slogans, ";")
|
||||||
@@ -232,6 +242,8 @@
|
|||||||
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
|
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
|
||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
return
|
return
|
||||||
|
else if(default_deconstruction_crowbar(user, W))
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -922,7 +934,15 @@
|
|||||||
icon_state = "engivend"
|
icon_state = "engivend"
|
||||||
icon_deny = "engivend-deny"
|
icon_deny = "engivend-deny"
|
||||||
req_access = list(access_engine_equip)
|
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)
|
contraband = list(/obj/item/weapon/cell/potato = 3)
|
||||||
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/obj/item/frame
|
/obj/item/frame
|
||||||
name = "frame"
|
name = "frame parts"
|
||||||
desc = "Used for building machines."
|
desc = "Used for building frames."
|
||||||
icon = 'icons/obj/monitors.dmi'
|
icon = 'icons/obj/stock_parts.dmi'
|
||||||
icon_state = "fire_bitem"
|
icon_state = "frame_bitem"
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
var/build_machine_type
|
var/build_machine_type = /obj/structure/frame
|
||||||
var/refund_amt = 2
|
var/refund_amt = 5
|
||||||
var/refund_type = /obj/item/stack/material/steel
|
var/refund_type = /obj/item/stack/material/steel
|
||||||
var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures)
|
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)
|
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if (istype(W, /obj/item/weapon/wrench))
|
if (istype(W, /obj/item/weapon/wrench))
|
||||||
@@ -16,7 +17,82 @@
|
|||||||
return
|
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)
|
if(!build_machine_type)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -35,7 +111,7 @@
|
|||||||
var/turf/loc = get_turf(usr)
|
var/turf/loc = get_turf(usr)
|
||||||
var/area/A = loc.loc
|
var/area/A = loc.loc
|
||||||
if (!istype(loc, /turf/simulated/floor))
|
if (!istype(loc, /turf/simulated/floor))
|
||||||
usr << "<span class='danger'>\The [src] Alarm cannot be placed on this spot.</span>"
|
usr << "<span class='danger'>\The frame cannot be placed on this spot.</span>"
|
||||||
return
|
return
|
||||||
if (A.requires_power == 0 || A.name == "Space")
|
if (A.requires_power == 0 || A.name == "Space")
|
||||||
usr << "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>"
|
usr << "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>"
|
||||||
@@ -44,23 +120,12 @@
|
|||||||
if(gotwallitem(loc, ndir))
|
if(gotwallitem(loc, ndir))
|
||||||
usr << "<span class='danger'>There's already an item on this wall!</span>"
|
usr << "<span class='danger'>There's already an item on this wall!</span>"
|
||||||
return
|
return
|
||||||
|
var/obj/machinery/M = new build_machine_type(loc, ndir, 1, frame_type)
|
||||||
var/obj/machinery/M = new build_machine_type(loc, ndir, 1)
|
|
||||||
M.fingerprints = src.fingerprints
|
M.fingerprints = src.fingerprints
|
||||||
M.fingerprintshidden = src.fingerprintshidden
|
M.fingerprintshidden = src.fingerprintshidden
|
||||||
M.fingerprintslast = src.fingerprintslast
|
M.fingerprintslast = src.fingerprintslast
|
||||||
qdel(src)
|
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
|
/obj/item/frame/light
|
||||||
name = "light fixture frame"
|
name = "light fixture frame"
|
||||||
desc = "Used for building lights."
|
desc = "Used for building lights."
|
||||||
@@ -68,9 +133,48 @@
|
|||||||
icon_state = "tube-construct-item"
|
icon_state = "tube-construct-item"
|
||||||
build_machine_type = /obj/machinery/light_construct
|
build_machine_type = /obj/machinery/light_construct
|
||||||
reverse = 1
|
reverse = 1
|
||||||
|
frame_type = 1
|
||||||
|
|
||||||
/obj/item/frame/light/small
|
/obj/item/frame/light/small
|
||||||
name = "small light fixture frame"
|
name = "small light fixture frame"
|
||||||
icon_state = "bulb-construct-item"
|
icon_state = "bulb-construct-item"
|
||||||
refund_amt = 1
|
refund_amt = 1
|
||||||
build_machine_type = /obj/machinery/light_construct/small
|
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
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
icon_state = "wm_10"
|
icon_state = "wm_10"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/washing
|
||||||
var/state = 1
|
var/state = 1
|
||||||
//1 = empty, open door
|
//1 = empty, open door
|
||||||
//2 = empty, closed door
|
//2 = empty, closed door
|
||||||
@@ -13,14 +14,19 @@
|
|||||||
//6 = blood, open door
|
//6 = blood, open door
|
||||||
//7 = blood, closed door
|
//7 = blood, closed door
|
||||||
//8 = blood, running
|
//8 = blood, running
|
||||||
var/panel = 0
|
|
||||||
//0 = closed
|
|
||||||
//1 = open
|
|
||||||
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
|
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
|
||||||
//0 = not hacked
|
//0 = not hacked
|
||||||
//1 = hacked
|
//1 = hacked
|
||||||
var/gibs_ready = 0
|
var/gibs_ready = 0
|
||||||
var/obj/crayon
|
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()
|
/obj/machinery/washing_machine/verb/start()
|
||||||
set name = "Start Washing"
|
set name = "Start Washing"
|
||||||
@@ -34,25 +40,25 @@
|
|||||||
usr << "The washing machine cannot run in this state."
|
usr << "The washing machine cannot run in this state."
|
||||||
return
|
return
|
||||||
|
|
||||||
if( locate(/mob,contents) )
|
if( locate(/mob,washing) )
|
||||||
state = 8
|
state = 8
|
||||||
else
|
else
|
||||||
state = 5
|
state = 5
|
||||||
update_icon()
|
update_icon()
|
||||||
sleep(200)
|
sleep(200)
|
||||||
for(var/atom/A in contents)
|
for(var/atom/A in washing)
|
||||||
A.clean_blood()
|
A.clean_blood()
|
||||||
|
|
||||||
for(var/obj/item/I in contents)
|
for(var/obj/item/I in washing)
|
||||||
I.decontaminate()
|
I.decontaminate()
|
||||||
|
|
||||||
//Tanning!
|
//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)
|
var/obj/item/stack/material/wetleather/WL = new(src)
|
||||||
WL.amount = HH.amount
|
WL.amount = HH.amount
|
||||||
qdel(HH)
|
qdel(HH)
|
||||||
|
|
||||||
if( locate(/mob,contents) )
|
if( locate(/mob,washing) )
|
||||||
state = 7
|
state = 7
|
||||||
gibs_ready = 1
|
gibs_ready = 1
|
||||||
else
|
else
|
||||||
@@ -70,9 +76,14 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/washing_machine/update_icon()
|
/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)
|
/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))
|
/*if(istype(W,/obj/item/weapon/screwdriver))
|
||||||
panel = !panel
|
panel = !panel
|
||||||
user << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
|
user << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
|
||||||
@@ -142,10 +153,11 @@
|
|||||||
user << "This item does not fit."
|
user << "This item does not fit."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(contents.len < 5)
|
if(washing.len < 5)
|
||||||
if ( state in list(1, 3) )
|
if ( state in list(1, 3) )
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
W.loc = src
|
W.loc = src
|
||||||
|
washing += W
|
||||||
state = 3
|
state = 3
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You can't put the item in right now.</span>"
|
user << "<span class='notice'>You can't put the item in right now.</span>"
|
||||||
@@ -161,15 +173,17 @@
|
|||||||
state = 2
|
state = 2
|
||||||
if(2)
|
if(2)
|
||||||
state = 1
|
state = 1
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
|
washing.Cut()
|
||||||
if(3)
|
if(3)
|
||||||
state = 4
|
state = 4
|
||||||
if(4)
|
if(4)
|
||||||
state = 3
|
state = 3
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
crayon = null
|
crayon = null
|
||||||
|
washing.Cut()
|
||||||
state = 1
|
state = 1
|
||||||
if(5)
|
if(5)
|
||||||
user << "<span class='warning'>The [src] is busy.</span>"
|
user << "<span class='warning'>The [src] is busy.</span>"
|
||||||
@@ -178,13 +192,13 @@
|
|||||||
if(7)
|
if(7)
|
||||||
if(gibs_ready)
|
if(gibs_ready)
|
||||||
gibs_ready = 0
|
gibs_ready = 0
|
||||||
if(locate(/mob,contents))
|
if(locate(/mob,washing))
|
||||||
var/mob/M = locate(/mob,contents)
|
var/mob/M = locate(/mob,washing)
|
||||||
M.gib()
|
M.gib()
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
crayon = null
|
crayon = null
|
||||||
state = 1
|
state = 1
|
||||||
|
washing.Cut()
|
||||||
|
|
||||||
|
update_icon()
|
||||||
update_icon()
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "recharge_floor"
|
icon_state = "recharge_floor"
|
||||||
density = 0
|
density = 0
|
||||||
layer = TURF_LAYER + 0.1
|
layer = TURF_LAYER + 0.1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/mech_recharger
|
||||||
|
|
||||||
var/obj/mecha/charging = null
|
var/obj/mecha/charging = null
|
||||||
var/charge = 45
|
var/charge = 45
|
||||||
@@ -14,7 +15,6 @@
|
|||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
idle_power_usage = 20
|
idle_power_usage = 20
|
||||||
active_power_usage = 5000
|
active_power_usage = 5000
|
||||||
req_access = list(access_robotics)
|
req_access = list(access_robotics)
|
||||||
|
circuit = /obj/item/weapon/circuitboard/mechfab
|
||||||
|
|
||||||
var/speed = 1
|
var/speed = 1
|
||||||
var/mat_efficiency = 1
|
var/mat_efficiency = 1
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
component_parts = list()
|
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/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/manipulator(src)
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
return
|
return
|
||||||
ui_interact(user)
|
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/data[0]
|
||||||
|
|
||||||
var/datum/design/current = queue.len ? queue[1] : null
|
var/datum/design/current = queue.len ? queue[1] : null
|
||||||
|
|||||||
@@ -76,13 +76,10 @@
|
|||||||
|
|
||||||
/obj/item/equipped()
|
/obj/item/equipped()
|
||||||
..()
|
..()
|
||||||
var/mob/M = loc
|
var/mob/living/M = loc
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return
|
return
|
||||||
if(M.l_hand)
|
M.update_held_icons()
|
||||||
M.l_hand.update_held_icon()
|
|
||||||
if(M.r_hand)
|
|
||||||
M.r_hand.update_held_icon()
|
|
||||||
|
|
||||||
/obj/item/Destroy()
|
/obj/item/Destroy()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
@@ -98,8 +95,8 @@
|
|||||||
|
|
||||||
//Checks if the item is being held by a mob, and if so, updates the held icons
|
//Checks if the item is being held by a mob, and if so, updates the held icons
|
||||||
/obj/item/proc/update_held_icon()
|
/obj/item/proc/update_held_icon()
|
||||||
if(ismob(src.loc))
|
if(isliving(src.loc))
|
||||||
var/mob/M = src.loc
|
var/mob/living/M = src.loc
|
||||||
if(M.l_hand == src)
|
if(M.l_hand == src)
|
||||||
M.update_inv_l_hand()
|
M.update_inv_l_hand()
|
||||||
else if(M.r_hand == src)
|
else if(M.r_hand == src)
|
||||||
@@ -160,7 +157,7 @@
|
|||||||
size = "huge"
|
size = "huge"
|
||||||
return ..(user, distance, "", "It is a [size] item.")
|
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 (!user) return
|
||||||
if (hasorgans(user))
|
if (hasorgans(user))
|
||||||
var/mob/living/carbon/human/H = 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
|
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
|
||||||
usr << "<span class='warning'>You can't pick things up!</span>"
|
usr << "<span class='warning'>You can't pick things up!</span>"
|
||||||
return
|
return
|
||||||
|
var/mob/living/carbon/C = usr
|
||||||
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
||||||
usr << "<span class='warning'>You can't pick things up!</span>"
|
usr << "<span class='warning'>You can't pick things up!</span>"
|
||||||
return
|
return
|
||||||
if(src.anchored) //Object isn't anchored
|
if(src.anchored) //Object isn't anchored
|
||||||
usr << "<span class='warning'>You can't pick that up!</span>"
|
usr << "<span class='warning'>You can't pick that up!</span>"
|
||||||
return
|
return
|
||||||
if(!usr.hand && usr.r_hand) //Right hand is not full
|
if(C.get_active_hand()) //Hand is not full
|
||||||
usr << "<span class='warning'>Your right hand is full.</span>"
|
usr << "<span class='warning'>Your hand is full.</span>"
|
||||||
return
|
|
||||||
if(usr.hand && usr.l_hand) //Left hand is not full
|
|
||||||
usr << "<span class='warning'>Your left hand is full.</span>"
|
|
||||||
return
|
return
|
||||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||||
usr << "<span class='warning'>You can't pick that up!</span>"
|
usr << "<span class='warning'>You can't pick that up!</span>"
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
data["convo_job"] = sanitize(c["job"])
|
data["convo_job"] = sanitize(c["job"])
|
||||||
break
|
break
|
||||||
if(mode==41)
|
if(mode==41)
|
||||||
data_core.get_manifest_json()
|
data_core.get_manifest_list()
|
||||||
|
|
||||||
|
|
||||||
if(mode==3)
|
if(mode==3)
|
||||||
@@ -531,7 +531,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
|
|
||||||
data["feed"] = feed
|
data["feed"] = feed
|
||||||
|
|
||||||
data["manifest"] = list("__json_cache" = ManifestJSON)
|
data["manifest"] = PDA_Manifest
|
||||||
|
|
||||||
nanoUI = data
|
nanoUI = data
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// update the ui if it exists, returns null if no ui is passed/found
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
var/code = 2
|
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)
|
if(src == user.back)
|
||||||
user << "<span class='notice'>You need help taking this off!</span>"
|
user << "<span class='notice'>You need help taking this off!</span>"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
canhear_range = 2
|
canhear_range = 2
|
||||||
flags = CONDUCT | NOBLOODY
|
flags = CONDUCT | NOBLOODY
|
||||||
|
var/circuit = /obj/item/weapon/circuitboard/intercom
|
||||||
var/number = 0
|
var/number = 0
|
||||||
var/last_tick //used to delay the powercheck
|
var/last_tick //used to delay the powercheck
|
||||||
|
var/wiresexposed = 0
|
||||||
|
|
||||||
/obj/item/device/radio/intercom/custom
|
/obj/item/device/radio/intercom/custom
|
||||||
name = "station intercom (Custom)"
|
name = "station intercom (Custom)"
|
||||||
@@ -81,6 +83,41 @@
|
|||||||
spawn (0)
|
spawn (0)
|
||||||
attack_self(user)
|
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("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "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)
|
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||||
if (!on)
|
if (!on)
|
||||||
return -1
|
return -1
|
||||||
@@ -110,9 +147,15 @@
|
|||||||
on = A.powered(EQUIP) // set "on" to the power status
|
on = A.powered(EQUIP) // set "on" to the power status
|
||||||
|
|
||||||
if(!on)
|
if(!on)
|
||||||
icon_state = "intercom-p"
|
if(wiresexposed)
|
||||||
|
icon_state = "intercom-p_open"
|
||||||
|
else
|
||||||
|
icon_state = "intercom-p"
|
||||||
else
|
else
|
||||||
icon_state = initial(icon_state)
|
if(wiresexposed)
|
||||||
|
icon_state = "intercom_open"
|
||||||
|
else
|
||||||
|
icon_state = initial(icon_state)
|
||||||
|
|
||||||
/obj/item/device/radio/intercom/locked
|
/obj/item/device/radio/intercom/locked
|
||||||
var/locked_frequency
|
var/locked_frequency
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
amount = 5
|
amount = 5
|
||||||
max_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(..())
|
if(..())
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
throwforce = 15.0
|
throwforce = 15.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 1875)
|
matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 2)
|
||||||
max_amount = 60
|
max_amount = 60
|
||||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
desc = "Those could work as a pretty decent throwing weapon" //why?
|
desc = "Those could work as a pretty decent throwing weapon" //why?
|
||||||
icon_state = "tile"
|
icon_state = "tile"
|
||||||
force = 6.0
|
force = 6.0
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
|
matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 4)
|
||||||
throwforce = 15.0
|
throwforce = 15.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
@@ -92,13 +92,13 @@
|
|||||||
name = "steel floor tile"
|
name = "steel floor tile"
|
||||||
singular_name = "steel floor tile"
|
singular_name = "steel floor tile"
|
||||||
icon_state = "tile_steel"
|
icon_state = "tile_steel"
|
||||||
matter = list("plasteel" = 937.5)
|
matter = list("plasteel" = SHEET_MATERIAL_AMOUNT / 4)
|
||||||
|
|
||||||
/obj/item/stack/tile/floor_white
|
/obj/item/stack/tile/floor_white
|
||||||
name = "white floor tile"
|
name = "white floor tile"
|
||||||
singular_name = "white floor tile"
|
singular_name = "white floor tile"
|
||||||
icon_state = "tile_white"
|
icon_state = "tile_white"
|
||||||
matter = list("plastic" = 937.5)
|
matter = list("plastic" = SHEET_MATERIAL_AMOUNT / 4)
|
||||||
|
|
||||||
/obj/item/stack/tile/floor_yellow
|
/obj/item/stack/tile/floor_yellow
|
||||||
name = "yellow floor tile"
|
name = "yellow floor tile"
|
||||||
@@ -110,13 +110,13 @@
|
|||||||
name = "dark floor tile"
|
name = "dark floor tile"
|
||||||
singular_name = "dark floor tile"
|
singular_name = "dark floor tile"
|
||||||
icon_state = "fr_tile"
|
icon_state = "fr_tile"
|
||||||
matter = list("plasteel" = 937.5)
|
matter = list("plasteel" = SHEET_MATERIAL_AMOUNT / 4)
|
||||||
|
|
||||||
/obj/item/stack/tile/floor_freezer
|
/obj/item/stack/tile/floor_freezer
|
||||||
name = "freezer floor tile"
|
name = "freezer floor tile"
|
||||||
singular_name = "freezer floor tile"
|
singular_name = "freezer floor tile"
|
||||||
icon_state = "tile_freezer"
|
icon_state = "tile_freezer"
|
||||||
matter = list("plastic" = 937.5)
|
matter = list("plastic" = SHEET_MATERIAL_AMOUNT / 4)
|
||||||
|
|
||||||
/obj/item/stack/tile/floor/cyborg
|
/obj/item/stack/tile/floor/cyborg
|
||||||
name = "floor tile synthesizer"
|
name = "floor tile synthesizer"
|
||||||
|
|||||||
@@ -407,12 +407,12 @@
|
|||||||
* Bosun's whistle
|
* Bosun's whistle
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/item/toy/bosunwhistle
|
/obj/item/toy/bosunwhistle
|
||||||
name = "bosun's whistle"
|
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."
|
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 = 'icons/obj/toy.dmi'
|
||||||
icon_state = "bosunwhistle"
|
icon_state = "bosunwhistle"
|
||||||
var/cooldown = 0
|
var/cooldown = 0
|
||||||
w_class = 1
|
w_class = 1
|
||||||
slot_flags = SLOT_EARS
|
slot_flags = SLOT_EARS
|
||||||
|
|
||||||
|
|||||||
@@ -160,20 +160,7 @@
|
|||||||
P.icon_state = "paper_words"
|
P.icon_state = "paper_words"
|
||||||
|
|
||||||
if(istype(usr,/mob/living/carbon))
|
if(istype(usr,/mob/living/carbon))
|
||||||
// place the item in the usr's hand if possible
|
usr.put_in_hands(src)
|
||||||
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()
|
|
||||||
|
|
||||||
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
|
|||||||
@@ -445,39 +445,36 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
|
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
|
||||||
if(!base_state)
|
if(!base_state)
|
||||||
base_state = icon_state
|
base_state = icon_state
|
||||||
if(user.r_hand == src || user.l_hand == src)
|
if(!lit)
|
||||||
if(!lit)
|
lit = 1
|
||||||
lit = 1
|
icon_state = "[base_state]on"
|
||||||
icon_state = "[base_state]on"
|
item_state = "[base_state]on"
|
||||||
item_state = "[base_state]on"
|
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
||||||
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
||||||
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
|
||||||
else
|
|
||||||
if(prob(95))
|
|
||||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
|
||||||
else
|
|
||||||
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
|
|
||||||
if (user.l_hand == src)
|
|
||||||
user.apply_damage(2,BURN,"l_hand")
|
|
||||||
else
|
|
||||||
user.apply_damage(2,BURN,"r_hand")
|
|
||||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
|
||||||
|
|
||||||
set_light(2)
|
|
||||||
processing_objects.Add(src)
|
|
||||||
else
|
else
|
||||||
lit = 0
|
if(prob(95))
|
||||||
icon_state = "[base_state]"
|
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
||||||
item_state = "[base_state]"
|
|
||||||
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
|
||||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
|
|
||||||
else
|
else
|
||||||
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
|
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
|
||||||
|
if (user.get_left_hand() == src)
|
||||||
|
user.apply_damage(2,BURN,"l_hand")
|
||||||
|
else
|
||||||
|
user.apply_damage(2,BURN,"r_hand")
|
||||||
|
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||||
|
|
||||||
set_light(0)
|
set_light(2)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Add(src)
|
||||||
else
|
else
|
||||||
return ..()
|
lit = 0
|
||||||
|
icon_state = "[base_state]"
|
||||||
|
item_state = "[base_state]"
|
||||||
|
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
||||||
|
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
|
||||||
|
|
||||||
|
set_light(0)
|
||||||
|
processing_objects.Remove(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,13 +29,23 @@
|
|||||||
network = list("MINE")
|
network = list("MINE")
|
||||||
req_access = list()
|
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)
|
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
|
||||||
if (..(C))
|
if (..(C))
|
||||||
C.network = network
|
C.network = network.Copy()
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
|
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
|
||||||
if (..(C))
|
if (..(C))
|
||||||
network = C.network
|
network = C.network.Copy()
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
|
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(emagged)
|
if(emagged)
|
||||||
|
|||||||
253
code/game/objects/items/weapons/circuitboards/frame.dm
Normal file
253
code/game/objects/items/weapons/circuitboards/frame.dm
Normal file
@@ -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 )
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef T_BOARD
|
#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
|
#endif
|
||||||
|
|
||||||
//Stuff that doesn't fit into any category goes here
|
//Stuff that doesn't fit into any category goes here
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
/obj/item/weapon/circuitboard/aicore
|
/obj/item/weapon/circuitboard/aicore
|
||||||
name = T_BOARD("AI core")
|
name = T_BOARD("AI core")
|
||||||
origin_tech = list(TECH_DATA = 4, TECH_BIO = 2)
|
origin_tech = list(TECH_DATA = 4, TECH_BIO = 2)
|
||||||
board_type = "other"
|
board_type = "other"
|
||||||
@@ -77,7 +77,5 @@
|
|||||||
icon_state = "purplecomb"
|
icon_state = "purplecomb"
|
||||||
item_state = "purplecomb"
|
item_state = "purplecomb"
|
||||||
|
|
||||||
/obj/item/weapon/haircomb/attack_self(mob/user)
|
/obj/item/weapon/haircomb/attack_self(mob/living/user)
|
||||||
if(user.r_hand == src || user.l_hand == src)
|
user.visible_message(text("<span class='notice'>[] uses [] to comb their hair with incredible style and sophistication. What a [].</span>", user, src, user.gender == FEMALE ? "lady" : "guy"))
|
||||||
user.visible_message(text("<span class='notice'>[] uses [] to comb their hair with incredible style and sophistication. What a [].</span>", user, src, user.gender == FEMALE ? "lady" : "guy"))
|
|
||||||
return
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
return null
|
return null
|
||||||
var/turf/location = loc
|
var/turf/location = loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/M = location
|
var/mob/living/M = location
|
||||||
if(M.l_hand == src || M.r_hand == src)
|
if(M.item_is_in_hands(src))
|
||||||
location = M.loc
|
location = M.loc
|
||||||
if(isturf(location)) //start a fire if possible
|
if(isturf(location)) //start a fire if possible
|
||||||
location.hotspot_expose(700, 2)
|
location.hotspot_expose(700, 2)
|
||||||
|
|||||||
@@ -125,12 +125,12 @@
|
|||||||
icon_state = "wrap_paper"
|
icon_state = "wrap_paper"
|
||||||
var/amount = 20.0
|
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) ))
|
if (!( locate(/obj/structure/table, src.loc) ))
|
||||||
user << "<span class='warning'>You MUST put the paper on a table!</span>"
|
user << "<span class='warning'>You MUST put the paper on a table!</span>"
|
||||||
if (W.w_class < 4)
|
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)
|
var/a_used = 2 ** (src.w_class - 1)
|
||||||
if (src.amount < a_used)
|
if (src.amount < a_used)
|
||||||
user << "<span class='warning'>You need more paper!</span>"
|
user << "<span class='warning'>You need more paper!</span>"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_hand(mob/user as mob)
|
attack_hand(mob/living/user as mob)
|
||||||
if ((src.case && (user.l_hand == src || user.r_hand == src)))
|
if ((src.case && user.item_is_in_hands(src)))
|
||||||
user.put_in_active_hand(case)
|
user.put_in_active_hand(case)
|
||||||
|
|
||||||
src.case.add_fingerprint(user)
|
src.case.add_fingerprint(user)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/material/twohanded/update_held_icon()
|
/obj/item/weapon/material/twohanded/update_held_icon()
|
||||||
var/mob/living/M = loc
|
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
|
wielded = 1
|
||||||
force = force_wielded
|
force = force_wielded
|
||||||
name = "[base_name] (wielded)"
|
name = "[base_name] (wielded)"
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
spawn(1) if(src) qdel(src)
|
spawn(1) if(src) qdel(src)
|
||||||
|
|
||||||
/obj/item/weapon/melee/energy/blade/process()
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
spawn(1) if(src) del(src)
|
spawn(1) if(src) del(src)
|
||||||
|
|
||||||
/obj/item/weapon/mop_deploy/process()
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
storage_slots = 12
|
storage_slots = 12
|
||||||
|
|
||||||
/obj/item/weapon/storage/backpack/dufflebag/syndie
|
/obj/item/weapon/storage/backpack/dufflebag/syndie
|
||||||
name = "suspicious looking dufflebag"
|
name = "black dufflebag"
|
||||||
desc = "A large dufflebag for holding extra tactical supplies."
|
desc = "A large dufflebag for holding extra tactical supplies."
|
||||||
icon_state = "duffle_syndie"
|
icon_state = "duffle_syndie"
|
||||||
item_state = "duffle_syndiemed"
|
item_state = "duffle_syndiemed"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
var/linked
|
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))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
var/obj/item/organ/external/temp = H.get_organ("r_hand")
|
var/obj/item/organ/external/temp = H.get_organ("r_hand")
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
new /obj/item/stack/cable_coil(src,30,color)
|
new /obj/item/stack/cable_coil(src,30,color)
|
||||||
|
|
||||||
/obj/item/weapon/storage/toolbox/syndicate
|
/obj/item/weapon/storage/toolbox/syndicate
|
||||||
name = "suspicious looking toolbox"
|
name = "black and red toolbox"
|
||||||
icon_state = "syndicate"
|
icon_state = "syndicate"
|
||||||
item_state = "toolbox_syndi"
|
item_state = "toolbox_syndi"
|
||||||
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
|
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user