Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze
@@ -6,229 +6,15 @@
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR "code"
|
||||
#define FILE_DIR "code/__HELPERS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/unary"
|
||||
#define FILE_DIR "code/controllers"
|
||||
#define FILE_DIR "code/datums"
|
||||
#define FILE_DIR "code/datums/diseases"
|
||||
#define FILE_DIR "code/datums/diseases/advance"
|
||||
#define FILE_DIR "code/datums/diseases/advance/symptoms"
|
||||
#define FILE_DIR "code/datums/helper_datums"
|
||||
#define FILE_DIR "code/datums/organs"
|
||||
#define FILE_DIR "code/datums/spells"
|
||||
#define FILE_DIR "code/defines"
|
||||
#define FILE_DIR "code/defines/obj"
|
||||
#define FILE_DIR "code/defines/procs"
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/gamemodes"
|
||||
#define FILE_DIR "code/game/gamemodes/autotraitor"
|
||||
#define FILE_DIR "code/game/gamemodes/blob"
|
||||
#define FILE_DIR "code/game/gamemodes/blob/blobs"
|
||||
#define FILE_DIR "code/game/gamemodes/changeling"
|
||||
#define FILE_DIR "code/game/gamemodes/cult"
|
||||
#define FILE_DIR "code/game/gamemodes/epidemic"
|
||||
#define FILE_DIR "code/game/gamemodes/events"
|
||||
#define FILE_DIR "code/game/gamemodes/events/holidays"
|
||||
#define FILE_DIR "code/game/gamemodes/extended"
|
||||
#define FILE_DIR "code/game/gamemodes/malfunction"
|
||||
#define FILE_DIR "code/game/gamemodes/meme"
|
||||
#define FILE_DIR "code/game/gamemodes/meteor"
|
||||
#define FILE_DIR "code/game/gamemodes/nuclear"
|
||||
#define FILE_DIR "code/game/gamemodes/revolution"
|
||||
#define FILE_DIR "code/game/gamemodes/sandbox"
|
||||
#define FILE_DIR "code/game/gamemodes/traitor"
|
||||
#define FILE_DIR "code/game/gamemodes/wizard"
|
||||
#define FILE_DIR "code/game/jobs"
|
||||
#define FILE_DIR "code/game/jobs/job"
|
||||
#define FILE_DIR "code/game/machinery"
|
||||
#define FILE_DIR "code/game/machinery/atmoalter"
|
||||
#define FILE_DIR "code/game/machinery/bots"
|
||||
#define FILE_DIR "code/game/machinery/camera"
|
||||
#define FILE_DIR "code/game/machinery/computer"
|
||||
#define FILE_DIR "code/game/machinery/doors"
|
||||
#define FILE_DIR "code/game/machinery/embedded_controller"
|
||||
#define FILE_DIR "code/game/machinery/kitchen"
|
||||
#define FILE_DIR "code/game/machinery/pipe"
|
||||
#define FILE_DIR "code/game/machinery/telecomms"
|
||||
#define FILE_DIR "code/game/magic"
|
||||
#define FILE_DIR "code/game/mecha"
|
||||
#define FILE_DIR "code/game/mecha/combat"
|
||||
#define FILE_DIR "code/game/mecha/equipment"
|
||||
#define FILE_DIR "code/game/mecha/equipment/tools"
|
||||
#define FILE_DIR "code/game/mecha/equipment/weapons"
|
||||
#define FILE_DIR "code/game/mecha/medical"
|
||||
#define FILE_DIR "code/game/mecha/working"
|
||||
#define FILE_DIR "code/game/objects"
|
||||
#define FILE_DIR "code/game/objects/closets"
|
||||
#define FILE_DIR "code/game/objects/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/effects"
|
||||
#define FILE_DIR "code/game/objects/effects/decals"
|
||||
#define FILE_DIR "code/game/objects/effects/decals/Cleanable"
|
||||
#define FILE_DIR "code/game/objects/effects/spawners"
|
||||
#define FILE_DIR "code/game/objects/items"
|
||||
#define FILE_DIR "code/game/objects/items/devices"
|
||||
#define FILE_DIR "code/game/objects/items/devices/PDA"
|
||||
#define FILE_DIR "code/game/objects/items/devices/radio"
|
||||
#define FILE_DIR "code/game/objects/items/robot"
|
||||
#define FILE_DIR "code/game/objects/items/stacks"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/sheets"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/tiles"
|
||||
#define FILE_DIR "code/game/objects/items/weapons"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/grenades"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/implants"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/melee"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/storage"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/tanks"
|
||||
#define FILE_DIR "code/game/objects/storage"
|
||||
#define FILE_DIR "code/game/objects/structures"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest"
|
||||
#define FILE_DIR "code/game/structure"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/turfs/simulated"
|
||||
#define FILE_DIR "code/game/turfs/space"
|
||||
#define FILE_DIR "code/game/turfs/unsimulated"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/verbs"
|
||||
#define FILE_DIR "code/js"
|
||||
#define FILE_DIR "code/modules"
|
||||
#define FILE_DIR "code/modules/admin"
|
||||
#define FILE_DIR "code/modules/admin/DB ban"
|
||||
#define FILE_DIR "code/modules/admin/permissionverbs"
|
||||
#define FILE_DIR "code/modules/admin/verbs"
|
||||
#define FILE_DIR "code/modules/assembly"
|
||||
#define FILE_DIR "code/modules/awaymissions"
|
||||
#define FILE_DIR "code/modules/awaymissions/maploader"
|
||||
#define FILE_DIR "code/modules/client"
|
||||
#define FILE_DIR "code/modules/clothing"
|
||||
#define FILE_DIR "code/modules/clothing/glasses"
|
||||
#define FILE_DIR "code/modules/clothing/gloves"
|
||||
#define FILE_DIR "code/modules/clothing/head"
|
||||
#define FILE_DIR "code/modules/clothing/masks"
|
||||
#define FILE_DIR "code/modules/clothing/shoes"
|
||||
#define FILE_DIR "code/modules/clothing/spacesuits"
|
||||
#define FILE_DIR "code/modules/clothing/suits"
|
||||
#define FILE_DIR "code/modules/clothing/under"
|
||||
#define FILE_DIR "code/modules/clothing/under/jobs"
|
||||
#define FILE_DIR "code/modules/customitems"
|
||||
#define FILE_DIR "code/modules/destilery"
|
||||
#define FILE_DIR "code/modules/DetectiveWork"
|
||||
#define FILE_DIR "code/modules/events"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/genetics"
|
||||
#define FILE_DIR "code/modules/icon generation"
|
||||
#define FILE_DIR "code/modules/library"
|
||||
#define FILE_DIR "code/modules/liquid"
|
||||
#define FILE_DIR "code/modules/maps"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
#define FILE_DIR "code/modules/mob"
|
||||
#define FILE_DIR "code/modules/mob/dead"
|
||||
#define FILE_DIR "code/modules/mob/dead/observer"
|
||||
#define FILE_DIR "code/modules/mob/living"
|
||||
#define FILE_DIR "code/modules/mob/living/blob"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/larva"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/special"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/brain"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/human"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/metroid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/monkey"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/pai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/robot"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
#define FILE_DIR "code/modules/power/antimatter"
|
||||
#define FILE_DIR "code/modules/power/singularity"
|
||||
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
|
||||
#define FILE_DIR "code/modules/projectiles"
|
||||
#define FILE_DIR "code/modules/projectiles/ammunition"
|
||||
#define FILE_DIR "code/modules/projectiles/guns"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/energy"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/projectile"
|
||||
#define FILE_DIR "code/modules/projectiles/projectile"
|
||||
#define FILE_DIR "code/modules/reagents"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle"
|
||||
#define FILE_DIR "code/modules/recycling"
|
||||
#define FILE_DIR "code/modules/research"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology"
|
||||
#define FILE_DIR "code/modules/scripting"
|
||||
#define FILE_DIR "code/modules/scripting/AST"
|
||||
#define FILE_DIR "code/modules/scripting/AST/Operators"
|
||||
#define FILE_DIR "code/modules/scripting/Implementations"
|
||||
#define FILE_DIR "code/modules/scripting/Interpreter"
|
||||
#define FILE_DIR "code/modules/scripting/Parser"
|
||||
#define FILE_DIR "code/modules/scripting/Scanner"
|
||||
#define FILE_DIR "code/modules/security levels"
|
||||
#define FILE_DIR "code/modules/surgery"
|
||||
#define FILE_DIR "code/TriDimension"
|
||||
#define FILE_DIR "code/unused"
|
||||
#define FILE_DIR "code/unused/beast"
|
||||
#define FILE_DIR "code/unused/computer2"
|
||||
#define FILE_DIR "code/unused/disease2"
|
||||
#define FILE_DIR "code/unused/gamemodes"
|
||||
#define FILE_DIR "code/unused/hivebot"
|
||||
#define FILE_DIR "code/unused/mining"
|
||||
#define FILE_DIR "code/unused/optics"
|
||||
#define FILE_DIR "code/unused/pda2"
|
||||
#define FILE_DIR "code/unused/powerarmor"
|
||||
#define FILE_DIR "code/unused/spacecraft"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/AI_Visibility"
|
||||
#define FILE_DIR "code/WorkInProgress/animusstation"
|
||||
#define FILE_DIR "code/WorkInProgress/Apples"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Economy"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
||||
#define FILE_DIR "code/WorkInProgress/carn"
|
||||
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib/amorph"
|
||||
#define FILE_DIR "code/WorkInProgress/Mini"
|
||||
#define FILE_DIR "code/WorkInProgress/Mloc"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Abi79"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Bureaucracy"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Spawners"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn/Department Sec"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn/Softcurity"
|
||||
#define FILE_DIR "code/WorkInProgress/SkyMarshal"
|
||||
#define FILE_DIR "code/WorkInProgress/Susan"
|
||||
#define FILE_DIR "code/WorkInProgress/Tastyfish"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2/Disease2"
|
||||
#define FILE_DIR "code/WorkInProgress/Wrongnumber"
|
||||
#define FILE_DIR "code/ZAS"
|
||||
#define FILE_DIR "code/WorkInProgress/Uristqwerty"
|
||||
#define FILE_DIR "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/48x48"
|
||||
@@ -250,13 +36,11 @@
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/effects/turret"
|
||||
#define FILE_DIR "sound/effects/wind"
|
||||
#define FILE_DIR "sound/hallucinations"
|
||||
#define FILE_DIR "sound/items"
|
||||
@@ -268,8 +52,6 @@
|
||||
#define FILE_DIR "sound/violin"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
#define FILE_DIR "tools"
|
||||
#define FILE_DIR "tools/Redirector"
|
||||
// END_FILE_DIR
|
||||
// BEGIN_PREFERENCES
|
||||
#define DEBUG
|
||||
@@ -900,6 +682,7 @@
|
||||
#include "code\modules\admin\verbs\adminsay.dm"
|
||||
#include "code\modules\admin\verbs\atmosdebug.dm"
|
||||
#include "code\modules\admin\verbs\BrokenInhands.dm"
|
||||
#include "code\modules\admin\verbs\check_customitem_activity.dm"
|
||||
#include "code\modules\admin\verbs\cinematic.dm"
|
||||
#include "code\modules\admin\verbs\custom_event.dm"
|
||||
#include "code\modules\admin\verbs\deadsay.dm"
|
||||
@@ -976,6 +759,7 @@
|
||||
#include "code\modules\clothing\spacesuits\rig.dm"
|
||||
#include "code\modules\clothing\spacesuits\syndi.dm"
|
||||
#include "code\modules\clothing\spacesuits\void.dm"
|
||||
#include "code\modules\clothing\suits\alien.dm"
|
||||
#include "code\modules\clothing\suits\armor.dm"
|
||||
#include "code\modules\clothing\suits\bio.dm"
|
||||
#include "code\modules\clothing\suits\jobs.dm"
|
||||
@@ -1015,6 +799,9 @@
|
||||
#include "code\modules\events\infestation.dm"
|
||||
#include "code\modules\events\ion_storm.dm"
|
||||
#include "code\modules\events\meteors.dm"
|
||||
#include "code\modules\events\money_hacker.dm"
|
||||
#include "code\modules\events\money_lotto.dm"
|
||||
#include "code\modules\events\money_spam.dm"
|
||||
#include "code\modules\events\prison_break.dm"
|
||||
#include "code\modules\events\radiation_storm.dm"
|
||||
#include "code\modules\events\rogue_drones.dm"
|
||||
@@ -1212,6 +999,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\friendly\mouse.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\mushroom.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\slime.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\spiderbot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\alien.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
|
||||
@@ -1308,6 +1096,7 @@
|
||||
#include "code\modules\reagents\Chemistry-Holder.dm"
|
||||
#include "code\modules\reagents\Chemistry-Machinery.dm"
|
||||
#include "code\modules\reagents\Chemistry-Readme.dm"
|
||||
#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
|
||||
#include "code\modules\reagents\Chemistry-Reagents.dm"
|
||||
#include "code\modules\reagents\Chemistry-Recipes.dm"
|
||||
#include "code\modules\reagents\grenade_launcher.dm"
|
||||
@@ -1394,6 +1183,7 @@
|
||||
#include "code\modules\surgery\eye.dm"
|
||||
#include "code\modules\surgery\face.dm"
|
||||
#include "code\modules\surgery\generic.dm"
|
||||
#include "code\modules\surgery\implant.dm"
|
||||
#include "code\modules\surgery\other.dm"
|
||||
#include "code\modules\surgery\ribcage.dm"
|
||||
#include "code\modules\surgery\robolimbs.dm"
|
||||
@@ -1401,17 +1191,15 @@
|
||||
#include "code\WorkInProgress\autopsy.dm"
|
||||
#include "code\WorkInProgress\buildmode.dm"
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\shield_gen.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events_Mundane.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_TradeDestinations.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\EFTPOS.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Job_Departments.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
|
||||
@@ -1421,18 +1209,27 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_turfs.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\misc_helpers.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\areas.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\circuits_and_design.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_control.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port_construction.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor_construction.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\ShieldGen\circuits_and_designs.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\ShieldGen\energy_field.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen_external.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
@@ -1442,6 +1239,7 @@
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\WorkInProgress\Susan\susan_desert_turfs.dm"
|
||||
#include "code\WorkInProgress\Uristqwerty\transit_tubes.dm"
|
||||
#include "code\WorkInProgress\virus2\analyser.dm"
|
||||
#include "code\WorkInProgress\virus2\antibodies.dm"
|
||||
#include "code\WorkInProgress\virus2\base.dm"
|
||||
|
||||
@@ -5,62 +5,113 @@
|
||||
name = "circulator/heat exchanger"
|
||||
desc = "A gas circulator pump and heat exchanger."
|
||||
icon = 'icons/obj/pipes.dmi'
|
||||
icon_state = "circ1-off"
|
||||
icon_state = "circ-off"
|
||||
anchored = 0
|
||||
|
||||
var/side = 1 // 1=left 2=right
|
||||
//var/side = 1 // 1=left 2=right
|
||||
var/status = 0
|
||||
|
||||
var/last_pressure_delta = 0
|
||||
|
||||
anchored = 1.0
|
||||
density = 1
|
||||
|
||||
proc/return_transfer_air()
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
/obj/machinery/atmospherics/binary/circulator/New()
|
||||
..()
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
|
||||
if(output_starting_pressure >= input_starting_pressure-10)
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
last_pressure_delta = 0
|
||||
return null
|
||||
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
||||
if(!anchored)
|
||||
return null
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air1.temperature>0)
|
||||
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
|
||||
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
if(output_starting_pressure >= input_starting_pressure-10)
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
last_pressure_delta = 0
|
||||
return null
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air1.temperature>0)
|
||||
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
|
||||
|
||||
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
|
||||
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
|
||||
last_pressure_delta = pressure_delta
|
||||
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
|
||||
|
||||
if(network2)
|
||||
network2.update = 1
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
|
||||
|
||||
return removed
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
if(network2)
|
||||
network2.update = 1
|
||||
|
||||
process()
|
||||
..()
|
||||
update_icon()
|
||||
return removed
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process()
|
||||
..()
|
||||
update_icon()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "circ[side]-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
icon_state = "circ[side]-run"
|
||||
else
|
||||
icon_state = "circ[side]-slow"
|
||||
else
|
||||
icon_state = "circ[side]-off"
|
||||
|
||||
return 1
|
||||
/obj/machinery/atmospherics/binary/circulator/update_icon()
|
||||
if(stat & (BROKEN|NOPOWER) || !anchored)
|
||||
icon_state = "circ-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
icon_state = "circ-run"
|
||||
else
|
||||
icon_state = "circ-slow"
|
||||
else
|
||||
icon_state = "circ-off"
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = !anchored
|
||||
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
|
||||
|
||||
if(anchored)
|
||||
if(dir & (NORTH|SOUTH))
|
||||
initialize_directions = NORTH|SOUTH
|
||||
else if(dir & (EAST|WEST))
|
||||
initialize_directions = EAST|WEST
|
||||
|
||||
initialize()
|
||||
build_network()
|
||||
if (node1)
|
||||
node1.initialize()
|
||||
node1.build_network()
|
||||
if (node2)
|
||||
node2.initialize()
|
||||
node2.build_network()
|
||||
else
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/verb/rotate()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
var/global/current_date_string
|
||||
var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
var/global/next_account_number = 0
|
||||
var/global/obj/machinery/account_database/centcomm_account_db
|
||||
|
||||
/proc/create_station_account()
|
||||
if(!station_account)
|
||||
@@ -11,13 +13,13 @@ var/global/next_account_number = 0
|
||||
station_account.owner_name = "[station_name()] Station Account"
|
||||
station_account.account_number = rand(111111, 999999)
|
||||
station_account.remote_access_pin = rand(1111, 111111)
|
||||
station_account.money = 10000
|
||||
station_account.money = 75000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = station_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = 10000
|
||||
T.amount = 75000
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
@@ -27,6 +29,31 @@ var/global/next_account_number = 0
|
||||
for(var/obj/machinery/account_database/A in world)
|
||||
A.accounts.Add(station_account)
|
||||
|
||||
/proc/create_department_account(department)
|
||||
next_account_number = rand(111111, 999999)
|
||||
|
||||
var/datum/money_account/department_account = new()
|
||||
department_account.owner_name = "[department] Account"
|
||||
department_account.account_number = rand(111111, 999999)
|
||||
department_account.remote_access_pin = rand(1111, 111111)
|
||||
department_account.money = 5000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = department_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = department_account.money
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
|
||||
//add the account
|
||||
department_account.transaction_log.Add(T)
|
||||
for(var/obj/machinery/account_database/A in world)
|
||||
A.accounts.Add(department_account)
|
||||
|
||||
department_accounts[department] = department_account
|
||||
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
|
||||
@@ -62,12 +89,17 @@ var/global/next_account_number = 0
|
||||
var/access_level = 0
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
..()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
if(department_accounts.len == 0)
|
||||
for(var/department in station_departments)
|
||||
create_department_account(department)
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
|
||||
|
||||
@@ -80,6 +112,7 @@ var/global/next_account_number = 0
|
||||
dat += "Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"
|
||||
|
||||
if(access_level > 0)
|
||||
dat += "<a href='?src=\ref[src];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>"
|
||||
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
|
||||
if(creating_new_account)
|
||||
dat += "<br>"
|
||||
@@ -150,6 +183,10 @@ var/global/next_account_number = 0
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/Topic(var/href, var/href_list)
|
||||
|
||||
if(href_list["toggle_activated"])
|
||||
activated = !activated
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("sync_accounts")
|
||||
@@ -160,7 +197,7 @@ var/global/next_account_number = 0
|
||||
for(var/datum/money_account/M in A.accounts)
|
||||
if(!src.accounts.Find(M))
|
||||
src.accounts.Add(M)
|
||||
usr << "\icon[src] <span class='info'>Accounts synched across all databases in range.</span>"
|
||||
usr << "\icon[src] <span class='info'>Accounts synched across all NanoTrasen financial databases.</span>"
|
||||
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
@@ -214,6 +251,15 @@ var/global/next_account_number = 0
|
||||
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/machinery/account_database/proc/add_account_across_all(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0)
|
||||
var/datum/money_account/M = add_account(new_owner_name, starting_funds, pre_existing)
|
||||
for(var/obj/machinery/account_database/D in world)
|
||||
if(D == src)
|
||||
continue
|
||||
D.accounts.Add(M)
|
||||
|
||||
return M
|
||||
|
||||
/obj/machinery/account_database/proc/add_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0)
|
||||
|
||||
//create a new account
|
||||
@@ -266,12 +312,15 @@ var/global/next_account_number = 0
|
||||
R.overlays += stampoverlay
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
|
||||
|
||||
|
||||
//add the account
|
||||
M.transaction_log.Add(T)
|
||||
accounts.Add(M)
|
||||
|
||||
return M
|
||||
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in accounts)
|
||||
if(D.account_number == attempt_account_number)
|
||||
D.money += amount
|
||||
@@ -295,6 +344,8 @@ var/global/next_account_number = 0
|
||||
|
||||
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
|
||||
/obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in accounts)
|
||||
if(D.account_number == attempt_account_number)
|
||||
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) )
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/obj/item/weapon/eftpos
|
||||
/obj/item/device/eftpos
|
||||
name = "EFTPOS scanner"
|
||||
desc = "Swipe your ID card to pay electronically."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "scanner"
|
||||
desc = "Swipe your ID card to make purchases electronically."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "eftpos"
|
||||
var/machine_id = ""
|
||||
var/eftpos_name = "Default EFTPOS scanner"
|
||||
var/transaction_locked = 0
|
||||
@@ -13,23 +13,24 @@
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/datum/money_account/linked_account
|
||||
|
||||
/obj/item/weapon/eftpos/New()
|
||||
/obj/item/device/eftpos/New()
|
||||
..()
|
||||
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
|
||||
access_code = rand(1111,111111)
|
||||
reconnect_database()
|
||||
print_reference()
|
||||
spawn(0)
|
||||
print_reference()
|
||||
|
||||
//by default, connect to the station account
|
||||
//the user of the EFTPOS device can change the target account though, and no-one will be the wiser (except whoever's being charged)
|
||||
linked_account = station_account
|
||||
|
||||
/obj/item/weapon/eftpos/proc/print_reference()
|
||||
var/obj/item/weapon/paper/R = new(get_turf(src))
|
||||
/obj/item/device/eftpos/proc/print_reference()
|
||||
var/obj/item/weapon/paper/R = new(src.loc)
|
||||
R.name = "Reference: [eftpos_name]"
|
||||
R.info = "<b>[eftpos_name] reference</b><br><br>"
|
||||
R.info += "Access code: [access_code]<br><br>"
|
||||
R.info += "<b>Do not lose this code, or the device will have to be replaced.</b><br>"
|
||||
R.info += "<b>Do not lose or misplace this code.</b><br>"
|
||||
|
||||
//stamp the paper
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
@@ -39,14 +40,18 @@
|
||||
R.stamped += /obj/item/weapon/stamp
|
||||
R.overlays += stampoverlay
|
||||
R.stamps += "<HR><i>This paper has been stamped by the EFTPOS device.</i>"
|
||||
var/obj/item/smallDelivery/D = new(R.loc)
|
||||
R.loc = D
|
||||
D.wrapped = R
|
||||
D.name = "small parcel - 'EFTPOS access code'"
|
||||
|
||||
/obj/item/weapon/eftpos/proc/reconnect_database()
|
||||
/obj/item/device/eftpos/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
if(DB.z == src.z)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
/obj/item/weapon/eftpos/attack_self(mob/user as mob)
|
||||
/obj/item/device/eftpos/attack_self(mob/user as mob)
|
||||
if(get_dist(src,user) <= 1)
|
||||
var/dat = "<b>[eftpos_name]</b><br>"
|
||||
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting NanoTrasen IT Support</i><br>"
|
||||
@@ -67,48 +72,62 @@
|
||||
dat += "Transaction purpose: <a href='?src=\ref[src];choice=trans_purpose'>[transaction_purpose]</a><br>"
|
||||
dat += "Value: <a href='?src=\ref[src];choice=trans_value'>$[transaction_amount]</a><br>"
|
||||
dat += "Linked account: <a href='?src=\ref[src];choice=link_account'>[linked_account ? linked_account.owner_name : "None"]</a><hr>"
|
||||
dat += "<a href='?src=\ref[src];choice=change_code'>Change access code</a>"
|
||||
dat += "<a href='?src=\ref[src];choice=change_code'>Change access code</a><br>"
|
||||
dat += "<a href='?src=\ref[src];choice=change_id'>Change EFTPOS ID</a><br>"
|
||||
dat += "Scan card to reset access code <a href='?src=\ref[src];choice=reset'>\[------\]</a>"
|
||||
user << browse(dat,"window=eftpos")
|
||||
else
|
||||
user << browse(null,"window=eftpos")
|
||||
|
||||
/obj/item/weapon/eftpos/attackby(O as obj, user as mob)
|
||||
/obj/item/device/eftpos/attackby(O as obj, user as mob)
|
||||
if(istype(O, /obj/item/weapon/card))
|
||||
//attempt to connect to a new db, and if that doesn't work then fail
|
||||
if(!linked_db)
|
||||
reconnect_database()
|
||||
if(linked_db && linked_account)
|
||||
var/obj/item/weapon/card/I = O
|
||||
scan_card(I)
|
||||
if(linked_db)
|
||||
if(linked_account)
|
||||
var/obj/item/weapon/card/I = O
|
||||
scan_card(I)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/eftpos/Topic(var/href, var/href_list)
|
||||
/obj/item/device/eftpos/Topic(var/href, var/href_list)
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("change_code")
|
||||
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code"))
|
||||
var/attempt_code = input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
|
||||
if(attempt_code == access_code)
|
||||
access_code = text2num(input("Enter a new access code for this device", "Enter new EFTPOS code"))
|
||||
access_code = input("Enter a new access code for this device", "Enter new EFTPOS code") as num
|
||||
print_reference()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
|
||||
if("change_id")
|
||||
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
|
||||
if(attempt_code == access_code)
|
||||
eftpos_name = input("Enter a new terminal ID for this device", "Enter new EFTPOS ID") + " EFTPOS scanner"
|
||||
print_reference()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
|
||||
if("link_account")
|
||||
if(!linked_db)
|
||||
reconnect_database()
|
||||
if(linked_db)
|
||||
var/attempt_account_num = text2num(input("Enter account number to pay EFTPOS charges into", "New account number"))
|
||||
var/attempt_pin = text2num(input("Enter pin code", "Account pin"))
|
||||
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
|
||||
var/attempt_pin = input("Enter pin code", "Account pin") as num
|
||||
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
|
||||
else
|
||||
usr << "<span class='warning'>Unable to connect to accounts database.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
|
||||
if("trans_purpose")
|
||||
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
|
||||
if("trans_value")
|
||||
transaction_amount = max(text2num(input("Enter amount for EFTPOS transaction", "Transaction amount")),0)
|
||||
transaction_amount = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
|
||||
if("toggle_lock")
|
||||
if(transaction_locked)
|
||||
var/attempt_code = text2num(input("Enter EFTPOS access code", "Reset Transaction"))
|
||||
var/attempt_code = input("Enter EFTPOS access code", "Reset Transaction") as num
|
||||
if(attempt_code == access_code)
|
||||
transaction_locked = 0
|
||||
transaction_paid = 0
|
||||
@@ -126,16 +145,27 @@
|
||||
scan_card(I)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to link accounts.</span>"
|
||||
if("reset")
|
||||
//reset the access code - requires HoP/captain access
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
if(access_cent_captain in C.access || access_hop in C.access || access_captain in C.access)
|
||||
access_code = 0
|
||||
usr << "\icon[src]<span class='info'>Access code reset to 0.</span>"
|
||||
else if (istype(I, /obj/item/weapon/card/emag))
|
||||
access_code = 0
|
||||
usr << "\icon[src]<span class='info'>Access code reset to 0.</span>"
|
||||
|
||||
src.attack_self(usr)
|
||||
|
||||
/obj/item/weapon/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
|
||||
/obj/item/device/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(transaction_locked && !transaction_paid)
|
||||
if(linked_account)
|
||||
var/attempt_pin = text2num(input("Enter pin code", "EFTPOS transaction"))
|
||||
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
var/datum/money_account/D = linked_db.attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
if(transaction_amount <= D.money)
|
||||
@@ -149,9 +179,12 @@
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[linked_account.owner_name] ([eftpos_name])"
|
||||
T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
|
||||
T.purpose = transaction_purpose
|
||||
T.amount = "([transaction_amount])"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
@@ -168,9 +201,9 @@
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!<span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.<span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.<span>"
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
#define ANIMAL_RIGHTS_RAID 13
|
||||
#define FESTIVAL 14
|
||||
|
||||
#define RESEARCH_BREAKTHROUGH 15
|
||||
#define BARGAINS 16
|
||||
#define SONG_DEBUT 17
|
||||
#define MOVIE_RELEASE 18
|
||||
#define BIG_GAME_HUNTERS 19
|
||||
#define ELECTION 20
|
||||
#define GOSSIP 21
|
||||
#define TOURISM 22
|
||||
#define CELEBRITY_DEATH 23
|
||||
#define RESIGNATION 24
|
||||
|
||||
#define DEFAULT 1
|
||||
|
||||
#define ADMINISTRATIVE 2
|
||||
@@ -54,10 +65,25 @@
|
||||
|
||||
var/setup_economy = 0
|
||||
/proc/setup_economy()
|
||||
if(setup_economy)
|
||||
return
|
||||
var/datum/feed_channel/newChannel = new /datum/feed_channel
|
||||
newChannel.channel_name = "Tau Ceti Daily"
|
||||
newChannel.author = "CentComm Minister of Information"
|
||||
newChannel.locked = 1
|
||||
newChannel.is_admin_channel = 1
|
||||
news_network.network_channels += newChannel
|
||||
setup_economy = 1
|
||||
|
||||
newChannel = new /datum/feed_channel
|
||||
newChannel.channel_name = "The Gibson Gazette"
|
||||
newChannel.author = "Editor Mike Hammers"
|
||||
newChannel.locked = 1
|
||||
newChannel.is_admin_channel = 1
|
||||
news_network.network_channels += newChannel
|
||||
|
||||
for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination)
|
||||
var/datum/trade_destination/D = new loc_type
|
||||
weighted_randomevent_locations[D] = D.viable_random_events.len
|
||||
weighted_mundaneevent_locations[D] = D.viable_mundane_events.len
|
||||
|
||||
setup_economy = 1
|
||||
@@ -11,11 +11,14 @@
|
||||
if(!setup_economy)
|
||||
setup_economy()
|
||||
|
||||
var/type = pick(tradeable_destinations)
|
||||
affected_dest = new type()
|
||||
affected_dest = pickweight(weighted_randomevent_locations)
|
||||
if(affected_dest.viable_random_events.len)
|
||||
endWhen = rand(60,300)
|
||||
event_type = pick(affected_dest.viable_random_events)
|
||||
|
||||
if(!event_type)
|
||||
return
|
||||
|
||||
switch(event_type)
|
||||
if(RIOTS)
|
||||
dearer_goods = list(SECURITY)
|
||||
@@ -54,39 +57,42 @@
|
||||
/datum/event/economic_event/announce()
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "NanoTrasen Editor"
|
||||
newMsg.author = "Tau Ceti Daily"
|
||||
newMsg.is_admin_message = 1
|
||||
|
||||
switch(event_type)
|
||||
if(RIOTS)
|
||||
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
|
||||
if(WILD_ANIMAL_ATTACK)
|
||||
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
|
||||
if(INDUSTRIAL_ACCIDENT)
|
||||
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
|
||||
if(BIOHAZARD_OUTBREAK)
|
||||
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
|
||||
if(PIRATES)
|
||||
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
|
||||
if(CORPORATE_ATTACK)
|
||||
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
|
||||
if(ALIEN_RAIDERS)
|
||||
if(prob(20))
|
||||
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
|
||||
else
|
||||
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
|
||||
if(AI_LIBERATION)
|
||||
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
|
||||
if(MOURNING)
|
||||
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
|
||||
if(CULT_CELL_REVEALED)
|
||||
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
if(SECURITY_BREACH)
|
||||
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
|
||||
if(ANIMAL_RIGHTS_RAID)
|
||||
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
|
||||
if(FESTIVAL)
|
||||
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
//see if our location has custom event info for this event
|
||||
newMsg.body = affected_dest.get_custom_eventstring()
|
||||
if(!newMsg.body)
|
||||
switch(event_type)
|
||||
if(RIOTS)
|
||||
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
|
||||
if(WILD_ANIMAL_ATTACK)
|
||||
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
|
||||
if(INDUSTRIAL_ACCIDENT)
|
||||
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
|
||||
if(BIOHAZARD_OUTBREAK)
|
||||
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
|
||||
if(PIRATES)
|
||||
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
|
||||
if(CORPORATE_ATTACK)
|
||||
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
|
||||
if(ALIEN_RAIDERS)
|
||||
if(prob(20))
|
||||
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
|
||||
else
|
||||
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
|
||||
if(AI_LIBERATION)
|
||||
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
|
||||
if(MOURNING)
|
||||
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
|
||||
if(CULT_CELL_REVEALED)
|
||||
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
if(SECURITY_BREACH)
|
||||
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
|
||||
if(ANIMAL_RIGHTS_RAID)
|
||||
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
|
||||
if(FESTIVAL)
|
||||
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Tau Ceti Daily")
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
|
||||
/datum/event/mundane_news
|
||||
endWhen = 10
|
||||
|
||||
/datum/event/mundane_news/announce()
|
||||
var/datum/trade_destination/affected_dest = pickweight(weighted_mundaneevent_locations)
|
||||
var/event_type = 0
|
||||
if(affected_dest.viable_mundane_events.len)
|
||||
event_type = pick(affected_dest.viable_mundane_events)
|
||||
|
||||
if(!event_type)
|
||||
return
|
||||
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "Tau Ceti Daily"
|
||||
newMsg.is_admin_message = 1
|
||||
|
||||
//see if our location has custom event info for this event
|
||||
newMsg.body = affected_dest.get_custom_eventstring()
|
||||
if(!newMsg.body)
|
||||
newMsg.body = ""
|
||||
switch(event_type)
|
||||
if(RESEARCH_BREAKTHROUGH)
|
||||
newMsg.body = "A major breakthough in the field of [pick("plasma research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
|
||||
was announced [pick("yesterday","a few days ago","last week","earlier this month")] by a private firm on [affected_dest.name]. \
|
||||
NanoTrasen declined to comment as to whether this could impinge on profits."
|
||||
|
||||
if(ELECTION)
|
||||
newMsg.body = "The pre-selection of an additional candidates was announced for the upcoming [pick("supervisors council","advisory board","governership","board of inquisitors")] \
|
||||
election on [affected_dest.name] was announced earlier today, \
|
||||
[pick("media mogul","web celebrity", "industry titan", "superstar", "famed chef", "popular gardener", "ex-army officer", "multi-billionaire")] \
|
||||
[random_name(pick(MALE,FEMALE))]. In a statement to the media they said '[pick("My only goal is to help the [pick("sick","poor","children")]",\
|
||||
"I will maintain NanoTrasen's record profits","I believe in our future","We must return to our moral core","Just like... chill out dudes")]'."
|
||||
|
||||
if(RESIGNATION)
|
||||
newMsg.body = "NanoTrasen regretfully announces the resignation of [pick("Sector Admiral","Division Admiral","Ship Admiral","Vice Admiral")] [random_name(pick(MALE,FEMALE))]."
|
||||
if(prob(25))
|
||||
var/locstring = pick("Segunda","Salusa","Cepheus","Andromeda","Gruis","Corona","Aquila","Asellus") + " " + pick("I","II","III","IV","V","VI","VII","VIII")
|
||||
newMsg.body += " In a ceremony on [affected_dest.name] this afternoon, they will be awarded the \
|
||||
[pick("Red Star of Sacrifice","Purple Heart of Heroism","Blue Eagle of Loyalty","Green Lion of Ingenuity")] for "
|
||||
if(prob(33))
|
||||
newMsg.body += "their actions at the Battle of [pick(locstring,"REDACTED")]."
|
||||
else if(prob(50))
|
||||
newMsg.body += "their contribution to the colony of [locstring]."
|
||||
else
|
||||
newMsg.body += "their loyal service over the years."
|
||||
else if(prob(33))
|
||||
newMsg.body += " They are expected to settle down in [affected_dest.name], where they have been granted a handsome pension."
|
||||
else if(prob(50))
|
||||
newMsg.body += " The news was broken on [affected_dest.name] earlier today, where they cited reasons of '[pick("health","family","REDACTED")]'"
|
||||
else
|
||||
newMsg.body += " Administration Aerospace wishes them the best of luck in their retirement ceremony on [affected_dest.name]."
|
||||
|
||||
if(CELEBRITY_DEATH)
|
||||
newMsg.body = "It is with regret today that we announce the sudden passing of the "
|
||||
if(prob(33))
|
||||
newMsg.body += "[pick("distinguished","decorated","veteran","highly respected")] \
|
||||
[pick("Ship's Captain","Vice Admiral","Colonel","Lieutenant Colonel")] "
|
||||
else if(prob(50))
|
||||
newMsg.body += "[pick("award-winning","popular","highly respected","trend-setting")] \
|
||||
[pick("comedian","singer/songwright","artist","playwright","TV personality","model")] "
|
||||
else
|
||||
newMsg.body += "[pick("successful","highly respected","ingenious","esteemed")] \
|
||||
[pick("academic","Professor","Doctor","Scientist")] "
|
||||
|
||||
newMsg.body += "[random_name(pick(MALE,FEMALE))] on [affected_dest.name] [pick("last week","yesterday","this morning","two days ago","three days ago")]\
|
||||
[pick(". Assassination is suspected, but the perpetrators have not yet been brought to justice",\
|
||||
" due to Syndicate infiltrators (since captured)",\
|
||||
" during an industrial accident",\
|
||||
" due to [pick("heart failure","kidney failure","liver failure","brain hemorrhage")]")]"
|
||||
|
||||
if(BARGAINS)
|
||||
newMsg.body += "BARGAINS! BARGAINS! BARGAINS! Commerce Control on [affected_dest.name] wants you to know that everything must go! Across all retail centres, \
|
||||
all goods are being slashed, and all retailors are onboard - so come on over for the \[shopping\] time of your life."
|
||||
|
||||
if(SONG_DEBUT)
|
||||
newMsg.body += "[pick("Singer","Singer/songwriter","Saxophonist","Pianist","Guitarist","TV personality","Star")] [random_name(pick(MALE,FEMALE))] \
|
||||
announced the debut of their new [pick("single","album","EP","label")] '[pick("Everyone's","Look at the","Baby don't eye those","All of those","Dirty nasty")] \
|
||||
[pick("roses","three stars","starships","nanobots","cyborgs","Skrell","Sren'darr")] \
|
||||
[pick("on Venus","on Reade","on Moghes","in my hand","slip through my fingers","die for you","sing your heart out","fly away")]' \
|
||||
with [pick("pre-puchases available","a release tour","cover signings","a launch concert")] on [affected_dest.name]."
|
||||
|
||||
if(MOVIE_RELEASE)
|
||||
newMsg.body += "From the [pick("desk","home town","homeworld","mind")] of [pick("acclaimed","award-winning","popular","stellar")] \
|
||||
[pick("playwright","author","director","actor","TV star")] [random_name(pick(MALE,FEMALE))] comes the latest sensation: '\
|
||||
[pick("Deadly","The last","Lost","Dead")] [pick("Starships","Warriors","outcasts","Tajarans","Unathi","Skrell")] \
|
||||
[pick("of","from","raid","go hunting on","visit","ravage","pillage","destroy")] \
|
||||
[pick("Moghes","Earth","Biesel","Ahdomai","S'randarr","the Void","the Edge of Space")]'.\
|
||||
. Own it on webcast today, or visit the galactic premier on [affected_dest.name]!"
|
||||
|
||||
if(BIG_GAME_HUNTERS)
|
||||
newMsg.body += "Game hunters on [affected_dest.name] "
|
||||
if(prob(33))
|
||||
newMsg.body += "were surprised when an unusual species experts have since identified as \
|
||||
[pick("a subclass of mammal","a divergent abhuman species","an intelligent species of lemur","organic/cyborg hybrids")] turned up. Believed to have been brought in by \
|
||||
[pick("alien smugglers","early colonists","syndicate raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
|
||||
else if(prob(50))
|
||||
newMsg.body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
|
||||
. Officials urge caution, and locals are advised to stock up on armaments."
|
||||
else
|
||||
newMsg.body += "brought in an unusually [pick("valuable","rare","large","vicious","intelligent")] [pick("mammal","predator","farwa","samak")] for inspection \
|
||||
[pick("today","yesterday","last week")]. Speculators suggest they may be tipped to break several records."
|
||||
|
||||
if(GOSSIP)
|
||||
newMsg.body += "[pick("TV host","Webcast personality","Superstar","Model","Actor","Singer")] [random_name(pick(MALE,FEMALE))] "
|
||||
if(prob(33))
|
||||
newMsg.body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
|
||||
Doctors say the child is well, and the parents are considering "
|
||||
if(prob(50))
|
||||
newMsg.body += capitalize(pick(first_names_female))
|
||||
else
|
||||
newMsg.body += capitalize(pick(first_names_male))
|
||||
newMsg.body += " for the name."
|
||||
else if(prob(50))
|
||||
newMsg.body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
|
||||
[random_name(pick(MALE,FEMALE))] at [pick("a society ball","a new opening","a launch","a club")] on [affected_dest.name] yesterday, pundits are shocked."
|
||||
else
|
||||
newMsg.body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
|
||||
newMsg.body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
|
||||
"the decision to be dropped by a major sponsor","a disasterous interview on Tau Ceti Tonight")]."
|
||||
if(TOURISM)
|
||||
newMsg.body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
|
||||
"a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \
|
||||
Tau Ceti Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Tau Ceti Daily")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("Tau Ceti Daily")
|
||||
|
||||
/datum/event/trivial_news
|
||||
endWhen = 10
|
||||
|
||||
/datum/event/trivial_news/announce()
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "Editor Mike Hammers"
|
||||
//newMsg.is_admin_message = 1
|
||||
var/datum/trade_destination/affected_dest = pick(weighted_mundaneevent_locations)
|
||||
newMsg.body = pick(
|
||||
"Tree stuck in tajaran; firefighters baffled.",\
|
||||
"Armadillos want aardvarks removed from dictionary claims 'here first'.",\
|
||||
"Angel found dancing on pinhead ordered to stop; cited for public nuisance.",\
|
||||
"Letters claim they are better than number; 'Always have been'.",\
|
||||
"Pens proclaim pencils obsolete, 'lead is dead'.",\
|
||||
"Rock and paper sues scissors for discrimination.",\
|
||||
"Steak tell-all book reveals he never liked sitting by potato.",\
|
||||
"Woodchuck stops counting how many times he’s chucked 'Never again'.",\
|
||||
"[affected_dest.name] clerk first person able to pronounce '@*$%!'.",\
|
||||
"[affected_dest.name] delis serving boiled paperback dictionaries, 'Adjectives chewy' customers declare.",\
|
||||
"[affected_dest.name] weather deemed 'boring'; meteors and rad storms to be imported.",\
|
||||
"Most [affected_dest.name] security officers prefer cream over sugar.",\
|
||||
"Palindrome speakers conference in [affected_dest.name]; 'Wow!' says Otto.",\
|
||||
"Question mark worshipped as deity by ancient [affected_dest.name] dwellers.",\
|
||||
"Spilled milk causes whole [affected_dest.name] populace to cry.",\
|
||||
"World largest carp patty at display on [affected_dest.name].",\
|
||||
"'Here kitty kitty' no longer preferred tajaran retrieval technique.",\
|
||||
"Man travels 7000 light years to retrieve lost hankie, 'It was my favourite'.",\
|
||||
"New bowling lane that shoots mini-meteors at bowlers very popular.",\
|
||||
"[pick("Unathi","Spacer")] gets tattoo of Tau Ceti on chest '[pick("CentComm","star","starship","asteroid")] tickles most'.",\
|
||||
"Skrell marries computer; wedding attended by 100 modems.",\
|
||||
"Chef reports successfully using harmonica as cheese grater.",\
|
||||
"NanoTrasen invents handkerchief that says 'Bless you' after sneeze.",\
|
||||
"Clone accused of posing for other clones’s school photo.",\
|
||||
"Clone accused of stealing other clones’s employee of the month award.",\
|
||||
"Woman robs station with hair dryer; crewmen love new style.",\
|
||||
"This space for rent.",\
|
||||
"[affected_dest.name] Baker Wins Pickled Crumpet Toss Three Years Running",\
|
||||
"Skrell Scientist Discovers Abacus Can Be Used To Dry Towels",\
|
||||
"Survey: 'Cheese Louise' Voted Best Pizza Restaurant In Tau Ceti",\
|
||||
"I Was Framed, jokes [affected_dest.name] artist",\
|
||||
"Mysterious Loud Rumbling Noises In [affected_dest.name] Found To Be Mysterious Loud Rumblings",\
|
||||
"Alien ambassador becomes lost on [affected_dest.name], refuses to ask for directions",\
|
||||
"Swamp Gas Verified To Be Exhalations Of Stars--Movie Stars--Long Passed",\
|
||||
"Tainted Broccoli Weapon Of Choice For Syndicate Assassins",\
|
||||
"Chefs Find Broccoli Effective Tool For Cutting Cheese",\
|
||||
"Broccoli Found To Cause Grumpiness In Monkeys",\
|
||||
"Survey: 80% Of People on [affected_dest.name] Love Clog-Dancing",\
|
||||
"Giant Hairball Has Perfect Grammar But Rolls rr's Too Much, Linguists Say",\
|
||||
"[affected_dest.name] Phonebooks Print All Wrong Numbers; Results In 15 New Marriages",\
|
||||
"Tajaran Burglar Spotted on [affected_dest.name], Mistaken For Dalmatian",\
|
||||
"Gibson Gazette Updates Frequently Absurd, Poll Indicates",\
|
||||
"Esoteric Verbosity Culminates In Communicative Ennui, [affected_dest.name] Academics Note",\
|
||||
"Taj Demand Longer Breaks, Cleaner Litter, Slower Mice",\
|
||||
"Survey: 3 Out Of 5 Skrell Loathe Modern Art",\
|
||||
"Skrell Scientist Discovers Gravity While Falling Down Stairs",\
|
||||
"Boy Saves Tajaran From Tree on [affected_dest.name], Thousands Cheer",\
|
||||
"Shipment Of Apples Overturns, [affected_dest.name] Diner Offers Applesauce Special",\
|
||||
"Spotted Owl Spotted on [affected_dest.name]",\
|
||||
"Humans Everywhere Agree: Purring Tajarans Are Happy Tajarans",\
|
||||
"From The Desk Of Wise Guy Sammy: One Word In This Gazette Is Sdrawkcab",\
|
||||
"From The Desk Of Wise Guy Sammy: It's Hard To Have Too Much Shelf Space",\
|
||||
"From The Desk Of Wise Guy Sammy: Wine And Friendships Get Better With Age",\
|
||||
"From The Desk Of Wise Guy Sammy: The Insides Of Golf Balls Are Mostly Rubber Bands",\
|
||||
"From The Desk Of Wise Guy Sammy: You Don't Have To Fool All The People, Just The Right Ones",\
|
||||
"From The Desk Of Wise Guy Sammy: If You Made The Mess, You Clean It Up",\
|
||||
"From The Desk Of Wise Guy Sammy: It Is Easier To Get Forgiveness Than Permission",\
|
||||
"From The Desk Of Wise Guy Sammy: Check Your Facts Before Making A Fool Of Yourself",\
|
||||
"From The Desk Of Wise Guy Sammy: You Can't Outwait A Bureaucracy",\
|
||||
"From The Desk Of Wise Guy Sammy: It's Better To Yield Right Of Way Than To Demand It",\
|
||||
"From The Desk Of Wise Guy Sammy: A Person Who Likes Cats Can't Be All Bad",\
|
||||
"From The Desk Of Wise Guy Sammy: Help Is The Sunny Side Of Control",\
|
||||
"From The Desk Of Wise Guy Sammy: Two Points Determine A Straight Line",\
|
||||
"From The Desk Of Wise Guy Sammy: Reading Improves The Mind And Lifts The Spirit",\
|
||||
"From The Desk Of Wise Guy Sammy: Better To Aim High And Miss Then To Aim Low And Hit",\
|
||||
"From The Desk Of Wise Guy Sammy: Meteors Often Strike The Same Place More Than Once",\
|
||||
"Tommy B. Saif Sez: Look Both Ways Before Boarding The Shuttle",\
|
||||
"Tommy B. Saif Sez: Hold On; Sudden Stops Sometimes Necessary",\
|
||||
"Tommy B. Saif Sez: Keep Fingers Away From Moving Panels",\
|
||||
"Tommy B. Saif Sez: No Left Turn, Except Shuttles",\
|
||||
"Tommy B. Saif Sez: Return Seats And Trays To Their Proper Upright Position",\
|
||||
"Tommy B. Saif Sez: Eating And Drinking In Docking Bays Is Prohibited",\
|
||||
"Tommy B. Saif Sez: Accept No Substitutes, And Don't Be Fooled By Imitations",\
|
||||
"Tommy B. Saif Sez: Do Not Remove This Tag Under Penalty Of Law",\
|
||||
"Tommy B. Saif Sez: Always Mix Thoroughly When So Instructed",\
|
||||
"Tommy B. Saif Sez: Try To Keep Six Month's Expenses In Reserve",\
|
||||
"Tommy B. Saif Sez: Change Not Given Without Purchase",\
|
||||
"Tommy B. Saif Sez: If You Break It, You Buy It",\
|
||||
"Tommy B. Saif Sez: Reservations Must Be Cancelled 48 Hours Prior To Event To Obtain Refund",\
|
||||
"Doughnuts: Is There Anything They Can't Do",\
|
||||
"If Tin Whistles Are Made Of Tin, What Do They Make Foghorns Out Of?",\
|
||||
"Broccoli discovered to be colonies of tiny aliens with murder on their minds"\
|
||||
)
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "The Gibson Gazette")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("The Gibson Gazette")
|
||||
@@ -1,4 +1,7 @@
|
||||
|
||||
var/list/weighted_randomevent_locations = list()
|
||||
var/list/weighted_mundaneevent_locations = list()
|
||||
|
||||
/datum/trade_destination
|
||||
var/name = ""
|
||||
var/description = ""
|
||||
@@ -8,6 +11,10 @@
|
||||
var/can_shuttle_here = 0 //one day crew from the exodus will be able to travel to this destination
|
||||
var/list/viable_random_events = list()
|
||||
var/list/temp_price_change[BIOMEDICAL]
|
||||
var/list/viable_mundane_events = list()
|
||||
|
||||
/datum/trade_destination/proc/get_custom_eventstring(var/event_type)
|
||||
return null
|
||||
|
||||
//distance is measured in AU and co-relates to travel time
|
||||
/datum/trade_destination/centcomm
|
||||
@@ -17,6 +24,7 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(SECURITY_BREACH, CORPORATE_ATTACK, AI_LIBERATION)
|
||||
viable_mundane_events = list(ELECTION, RESIGNATION, CELEBRITY_DEATH)
|
||||
|
||||
/datum/trade_destination/anansi
|
||||
name = "NSS Anansi"
|
||||
@@ -25,6 +33,13 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(SECURITY_BREACH, CULT_CELL_REVEALED, BIOHAZARD_OUTBREAK, PIRATES, ALIEN_RAIDERS)
|
||||
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH, BARGAINS, GOSSIP)
|
||||
|
||||
/datum/trade_destination/anansi/get_custom_eventstring(var/event_type)
|
||||
if(event_type == RESEARCH_BREAKTHROUGH)
|
||||
return "Thanks to research conducted on the NSS Anansi, Second Red Cross Society wishes to announce a major breakthough in the field of \
|
||||
[pick("mind-machine interfacing","neuroscience","nano-augmentation","genetics")]. NanoTrasen is expected to announce a co-exploitation deal within the fortnight."
|
||||
return null
|
||||
|
||||
/datum/trade_destination/icarus
|
||||
name = "NMV Icarus"
|
||||
@@ -41,6 +56,13 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(INDUSTRIAL_ACCIDENT, PIRATES, CORPORATE_ATTACK)
|
||||
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH)
|
||||
|
||||
/datum/trade_destination/redolant/get_custom_eventstring(var/event_type)
|
||||
if(event_type == RESEARCH_BREAKTHROUGH)
|
||||
return "Thanks to research conducted on the OAV Redolant, Osiris Atmospherics wishes to announce a major breakthough in the field of \
|
||||
[pick("plasma research","high energy flux capacitance","super-compressed materials","theoretical particle physics")]. NanoTrasen is expected to announce a co-exploitation deal within the fortnight."
|
||||
return null
|
||||
|
||||
/datum/trade_destination/beltway
|
||||
name = "Beltway mining chain"
|
||||
@@ -49,6 +71,7 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(PIRATES, INDUSTRIAL_ACCIDENT)
|
||||
viable_mundane_events = list(TOURISM)
|
||||
|
||||
/datum/trade_destination/biesel
|
||||
name = "Biesel"
|
||||
@@ -57,6 +80,7 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
|
||||
viable_mundane_events = list(BARGAINS, GOSSIP, SONG_DEBUT, MOVIE_RELEASE, ELECTION, TOURISM, RESIGNATION, CELEBRITY_DEATH)
|
||||
|
||||
/datum/trade_destination/new_gibson
|
||||
name = "New Gibson"
|
||||
@@ -65,6 +89,7 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
|
||||
viable_mundane_events = list(ELECTION, TOURISM, RESIGNATION)
|
||||
|
||||
/datum/trade_destination/luthien
|
||||
name = "Luthien"
|
||||
@@ -73,6 +98,7 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
|
||||
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)
|
||||
|
||||
/datum/trade_destination/reade
|
||||
name = "Reade"
|
||||
@@ -81,5 +107,4 @@
|
||||
willing_to_buy = list()
|
||||
willing_to_sell = list()
|
||||
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
|
||||
|
||||
var/list/tradeable_destinations = typesof(/datum/trade_destination) - /datum/trade_destination
|
||||
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
|
||||
|
||||
// The department the job belongs to.
|
||||
/datum/job/var/department = null
|
||||
|
||||
// Whether this is a head position
|
||||
/datum/job/var/head_position = 0
|
||||
|
||||
/datum/job/captain/department = "Command"
|
||||
/datum/job/captain/head_position = 1
|
||||
|
||||
/datum/job/hop/department = "Civilian"
|
||||
/datum/job/hop/head_position = 1
|
||||
|
||||
/datum/job/assistant/department = "Civilian"
|
||||
|
||||
/datum/job/bartender/department = "Civilian"
|
||||
|
||||
/datum/job/chef/department = "Civilian"
|
||||
|
||||
/datum/job/hydro/department = "Civilian"
|
||||
|
||||
/datum/job/mining/department = "Civilian"
|
||||
|
||||
/datum/job/janitor/department = "Civilian"
|
||||
|
||||
/datum/job/librarian/department = "Civilian"
|
||||
|
||||
/datum/job/lawyer/department = "Civilian"
|
||||
|
||||
/datum/job/chaplain/department = "Civilian"
|
||||
|
||||
/datum/job/qm/department = "Cargo"
|
||||
/datum/job/qm/head_position = 1
|
||||
|
||||
/datum/job/cargo_tech/department = "Cargo"
|
||||
|
||||
/datum/job/chief_engineer/department = "Engineering"
|
||||
/datum/job/chief_engineer/head_position = 1
|
||||
|
||||
/datum/job/engineer/department = "Engineering"
|
||||
|
||||
/datum/job/atmos/department = "Engineering"
|
||||
|
||||
/datum/job/cmo/department = "Medical"
|
||||
/datum/job/cmo/head_position = 1
|
||||
|
||||
/datum/job/doctor/department = "Medical"
|
||||
|
||||
/datum/job/chemist/department = "Medical"
|
||||
|
||||
/datum/job/geneticist/department = "Medical"
|
||||
|
||||
/datum/job/psychiatrist/department = "Medical"
|
||||
|
||||
/datum/job/rd/department = "Science"
|
||||
/datum/job/rd/head_position = 1
|
||||
|
||||
/datum/job/scientist/department = "Science"
|
||||
|
||||
/datum/job/roboticist/department = "Science"
|
||||
|
||||
/datum/job/hos/department = "Security"
|
||||
/datum/job/hos/head_position = 1
|
||||
|
||||
/datum/job/warden/department = "Security"
|
||||
|
||||
/datum/job/detective/department = "Security"
|
||||
|
||||
/datum/job/officer/department = "Security"
|
||||
@@ -2,6 +2,8 @@
|
||||
//reactor areas
|
||||
|
||||
/area/engine
|
||||
icon_state = "engine"
|
||||
|
||||
fore
|
||||
name = "\improper Fore"
|
||||
|
||||
@@ -13,49 +15,63 @@
|
||||
|
||||
atmos_storage
|
||||
name = "\improper Atmos storage"
|
||||
icon_state = "engine_storage"
|
||||
|
||||
control
|
||||
name = "\improper Control"
|
||||
icon_state = "engine_control"
|
||||
|
||||
electrical_storage
|
||||
name = "\improper Electrical storage"
|
||||
|
||||
engine_monitoring
|
||||
name = "\improper Electrical storage"
|
||||
icon_state = "engine_monitoring"
|
||||
|
||||
reactor_core
|
||||
name = "\improper Reactor Core"
|
||||
icon_state = "engine_core"
|
||||
//icon_state = "engine_core"
|
||||
|
||||
reactor_gas
|
||||
name = "Reactor Gas Storage"
|
||||
icon_state = "engine_atmos"
|
||||
//icon_state = "engine_atmos"
|
||||
|
||||
aux_control
|
||||
name = "Reactor Auxiliary Control"
|
||||
icon_state = "engine_aux"
|
||||
//icon_state = "engine_aux"
|
||||
|
||||
turbine_control
|
||||
name = "Turbine Control"
|
||||
icon_state = "engine_turbine"
|
||||
//icon_state = "engine_turbine"
|
||||
|
||||
reactor_airlock
|
||||
name = "\improper Reactor Primary Entrance"
|
||||
icon_state = "engine_airlock"
|
||||
//icon_state = "engine_airlock"
|
||||
|
||||
reactor_fuel_storage
|
||||
name = "Reactor Fuel Storage"
|
||||
icon_state = "engine_fuel"
|
||||
//icon_state = "engine_fuel"
|
||||
|
||||
reactor_fuel_ports
|
||||
name = "\improper Reactor Fuel Ports"
|
||||
icon_state = "engine_port"
|
||||
//icon_state = "engine_port"
|
||||
|
||||
generators
|
||||
name = "\improper Generator Room"
|
||||
icon_state = "engine_generators"
|
||||
//icon_state = "engine_generators"
|
||||
|
||||
port_gyro_bay
|
||||
name = "\improper Port Gyrotron Bay"
|
||||
icon_state = "engine_starboardgyro"
|
||||
//icon_state = "engine_starboardgyro"
|
||||
|
||||
starboard_gyro_bay
|
||||
name = "\improper Starboard Gyrotron Bay"
|
||||
icon_state = "engine_portgyro"
|
||||
//icon_state = "engine_portgyro"
|
||||
|
||||
storage
|
||||
name = "\improper Engineering hallway"
|
||||
icon_state = "engine_storage"
|
||||
|
||||
hallway
|
||||
name = "\improper Engineering storage"
|
||||
icon_state = "engine_hallway"
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Core Control computer
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_core_control
|
||||
name = "Circuit board (RUST core controller)"
|
||||
build_path = "/obj/machinery/computer/rust_core_control"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
|
||||
datum/design/rust_core_control
|
||||
name = "Circuit Design (RUST core controller)"
|
||||
desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine."
|
||||
id = "rust_core_control"
|
||||
req_tech = list("programming" = 4, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core_control"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Control computer
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_fuel_control
|
||||
name = "Circuit board (RUST fuel controller)"
|
||||
build_path = "/obj/machinery/computer/rust_fuel_control"
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
|
||||
datum/design/rust_fuel_control
|
||||
name = "Circuit Design (RUST fuel controller)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine."
|
||||
id = "rust_fuel_control"
|
||||
req_tech = list("programming" = 4, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_fuel_control"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Port board
|
||||
|
||||
/obj/item/weapon/module/rust_fuel_port
|
||||
name = "Internal circuitry (RUST fuel port)"
|
||||
icon_state = "card_mod"
|
||||
origin_tech = "engineering=4;materials=5"
|
||||
|
||||
datum/design/rust_fuel_port
|
||||
name = "Internal circuitry (RUST fuel port)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine."
|
||||
id = "rust_fuel_port"
|
||||
req_tech = list("engineering" = 4, "materials" = 5)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000)
|
||||
build_path = "/obj/item/weapon/module/rust_fuel_port"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Compressor board
|
||||
|
||||
/obj/item/weapon/module/rust_fuel_compressor
|
||||
name = "Internal circuitry (RUST fuel compressor)"
|
||||
icon_state = "card_mod"
|
||||
origin_tech = "materials=6;plasmatech=4"
|
||||
|
||||
datum/design/rust_fuel_compressor
|
||||
name = "Circuit Design (RUST fuel compressor)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine."
|
||||
id = "rust_fuel_compressor"
|
||||
req_tech = list("materials" = 6, "plasmatech" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 1000)
|
||||
build_path = "/obj/item/weapon/module/rust_fuel_compressor"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Tokamak Core board
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_core
|
||||
name = "Internal circuitry (RUST tokamak core)"
|
||||
build_path = "/obj/machinery/power/rust_core"
|
||||
board_type = "machine"
|
||||
origin_tech = "bluespace=3;plasmatech=4;magnets=5;powerstorage=6"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Ultra Micro-Laser, 5 Pieces of Cable, 1 Subspace Crystal and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_core
|
||||
name = "Internal circuitry (RUST tokamak core)"
|
||||
desc = "The circuit board that for a RUST-pattern tokamak fusion core."
|
||||
id = "pacman"
|
||||
req_tech = list(bluespace = 3, plasmatech = 4, magnets = 5, powerstorage = 6)
|
||||
build_type = IMPRINTER
|
||||
reliability_base = 79
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Injector board
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_injector
|
||||
name = "Internal circuitry (RUST fuel injector)"
|
||||
build_path = "/obj/machinery/power/rust_fuel_injector"
|
||||
board_type = "machine"
|
||||
origin_tech = "powerstorage=3;engineering=4;plasmatech=4;materials=6"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Phasic Scanning Module, 1 Super Matter Bin, 1 Console Screen and 5 Pieces of Cable."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_injector
|
||||
name = "Internal circuitry (RUST tokamak core)"
|
||||
desc = "The circuit board that for a RUST-pattern particle accelerator."
|
||||
id = "pacman"
|
||||
req_tech = list(powerstorage = 3, engineering = 4, plasmatech = 4, materials = 6)
|
||||
build_type = IMPRINTER
|
||||
reliability_base = 79
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$uranium" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core"
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,143 @@
|
||||
|
||||
/obj/machinery/computer/rust_core_control
|
||||
name = "RUST Core Control"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "core_control"
|
||||
var/list/connected_devices = list()
|
||||
var/id_tag = "allan remember to update this before you leave"
|
||||
var/scan_range = 25
|
||||
|
||||
//currently viewed
|
||||
var/obj/machinery/power/rust_core/cur_viewed_device
|
||||
|
||||
/obj/machinery/computer/rust_core_control/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
/obj/machinery/computer/rust_core_control/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/rust_core_control/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/rust_core_control/interact(mob/user)
|
||||
if(stat & BROKEN)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=core_control")
|
||||
return
|
||||
if (!istype(user, /mob/living/silicon) && (get_dist(src, user) > 1 ))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=core_control")
|
||||
return
|
||||
|
||||
var/dat = ""
|
||||
if(stat & NOPOWER)
|
||||
dat += "<i>The console is dark and nonresponsive.</i>"
|
||||
else
|
||||
dat += "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(cur_viewed_device && cur_viewed_device.stat & (BROKEN|NOPOWER))
|
||||
cur_viewed_device = null
|
||||
if(cur_viewed_device && !cur_viewed_device.remote_access_enabled)
|
||||
cur_viewed_device = null
|
||||
|
||||
if(cur_viewed_device)
|
||||
dat += "<b>Device tag:</b> [cur_viewed_device.id_tag ? cur_viewed_device.id_tag : "UNSET"]<br>"
|
||||
dat += "<font color=blue>Device [cur_viewed_device.owned_field ? "activated" : "deactivated"].</font><br>"
|
||||
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];toggle_active=1'>\[Bring field [cur_viewed_device.owned_field ? "offline" : "online"]\]</a><br>"
|
||||
dat += "<b>Device [cur_viewed_device.anchored ? "secured" : "unsecured"].</b><br>"
|
||||
dat += "<hr>"
|
||||
dat += "<b>Field encumbrance:</b> [cur_viewed_device.owned_field ? 0 : "NA"]<br>"
|
||||
dat += "<b>Field strength:</b> [cur_viewed_device.field_strength] Wm^3<br>"
|
||||
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-1000'>\[----\]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-100'>\[--- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-10'>\[-- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-1'>\[- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=1'>\[+ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=10'>\[++ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=100'>\[+++ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=1000'>\[++++\]</a><br>"
|
||||
dat += "<b>Field frequency:</b> [cur_viewed_device.field_frequency] MHz<br>"
|
||||
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-1000'>\[----\]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-100'>\[--- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-10'>\[-- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-1'>\[- \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=1'>\[+ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=10'>\[++ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=100'>\[+++ \]</a> \
|
||||
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=1000'>\[++++\]</a><br>"
|
||||
|
||||
var/power_stat = "Good"
|
||||
if(cur_viewed_device.cached_power_avail < cur_viewed_device.active_power_usage)
|
||||
power_stat = "Insufficient"
|
||||
else if(cur_viewed_device.cached_power_avail < cur_viewed_device.active_power_usage * 2)
|
||||
power_stat = "Check"
|
||||
dat += "<b>Power status:</b> [power_stat]<br>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];scan=1'>\[Refresh device list\]</a><br><br>"
|
||||
if(connected_devices.len)
|
||||
dat += "<table width='100%' border=1>"
|
||||
dat += "<tr>"
|
||||
dat += "<td><b>Device tag</b></td>"
|
||||
dat += "<td></td>"
|
||||
dat += "</tr>"
|
||||
for(var/obj/machinery/power/rust_core/C in connected_devices)
|
||||
if(!check_core_status(C))
|
||||
connected_devices.Remove(C)
|
||||
continue
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[C.id_tag]</td>"
|
||||
dat += "<td><a href='?src=\ref[src];manage_individual=\ref[C]'>\[Manage\]</a></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
else
|
||||
dat += "No devices connected.<br>"
|
||||
|
||||
dat += "<hr>"
|
||||
dat += "<a href='?src=\ref[src];refresh=1'>Refresh</a> "
|
||||
dat += "<a href='?src=\ref[src];close=1'>Close</a>"
|
||||
|
||||
user << browse(dat, "window=core_control;size=500x400")
|
||||
onclose(user, "core_control")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/computer/rust_core_control/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if( href_list["goto_scanlist"] )
|
||||
cur_viewed_device = null
|
||||
|
||||
if( href_list["manage_individual"] )
|
||||
cur_viewed_device = locate(href_list["manage_individual"])
|
||||
|
||||
if( href_list["scan"] )
|
||||
connected_devices = list()
|
||||
for(var/obj/machinery/power/rust_core/C in range(scan_range, src))
|
||||
if(check_core_status(C))
|
||||
connected_devices.Add(C)
|
||||
|
||||
if( href_list["startup"] )
|
||||
if(cur_viewed_device)
|
||||
cur_viewed_device.Startup()
|
||||
|
||||
if( href_list["shutdown"] )
|
||||
if(cur_viewed_device)
|
||||
cur_viewed_device.Shutdown()
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=core_control")
|
||||
usr.unset_machine()
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/rust_core_control/proc/check_core_status(var/obj/machinery/power/rust_core/C)
|
||||
if(!C)
|
||||
return 0
|
||||
|
||||
if(C.stat & (BROKEN|NOPOWER) || !C.remote_access_enabled || !C.id_tag)
|
||||
if(connected_devices.Find(C))
|
||||
connected_devices.Remove(C)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -40,80 +40,247 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/rust/core
|
||||
name = "Tokamak core"
|
||||
#define MAX_FIELD_FREQ 1000
|
||||
#define MIN_FIELD_FREQ 1
|
||||
#define MAX_FIELD_STR 1000
|
||||
#define MIN_FIELD_STR 1
|
||||
|
||||
/obj/machinery/power/rust_core
|
||||
name = "RUST Tokamak core"
|
||||
desc = "Enormous solenoid for generating extremely high power electromagnetic fields"
|
||||
icon = 'core.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "core0"
|
||||
anchored = 1
|
||||
var/on = 0
|
||||
var/obj/machinery/rust/em_field/owned_field
|
||||
var/field_strength = 0.01
|
||||
//
|
||||
density = 1
|
||||
var/obj/effect/rust_em_field/owned_field
|
||||
var/field_strength = 1//0.01
|
||||
var/field_frequency = 1
|
||||
var/id_tag = "allan, don't forget to set the ID of this one too"
|
||||
req_access = list(access_engine)
|
||||
//
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 300
|
||||
idle_power_usage = 50
|
||||
active_power_usage = 500 //multiplied by field strength
|
||||
var/cached_power_avail = 0
|
||||
directwired = 1
|
||||
|
||||
var/state = 0
|
||||
var/locked = 1
|
||||
var/remote_access_enabled = 1
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["startup"] )
|
||||
Startup()
|
||||
return
|
||||
if( href_list["shutdown"] )
|
||||
Shutdown()
|
||||
return
|
||||
if( href_list["modify_field_strength"] )
|
||||
var/new_field_str = text2num(input("Enter new field strength", "Modifying field strength", owned_field.field_strength))
|
||||
if(!new_field_str)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
field_strength = max(new_field_str,0.1)
|
||||
field_strength = min(new_field_str,50)
|
||||
if(owned_field)
|
||||
owned_field.ChangeFieldStrength(field_strength)
|
||||
return
|
||||
/obj/machinery/power/rust_core/process()
|
||||
if(stat & BROKEN || !powernet)
|
||||
Shutdown()
|
||||
|
||||
proc/Startup()
|
||||
cached_power_avail = avail()
|
||||
//luminosity = round(owned_field.field_strength/10)
|
||||
//luminosity = max(luminosity,1)
|
||||
|
||||
/obj/machinery/power/rust_core/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(owned_field)
|
||||
user << "Turn off [src] first."
|
||||
return
|
||||
on = 1
|
||||
owned_field = new(src.loc)
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the external reinforcing bolts to the floor.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
"You undo the external reinforcing bolts.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(owned_field)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
if(1)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
connect_to_network()
|
||||
src.directwired = 1
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
disconnect_from_network()
|
||||
src.directwired = 0
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(emagged)
|
||||
user << "\red The lock seems to be broken"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
if(owned_field)
|
||||
src.locked = !src.locked
|
||||
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
src.locked = 0 //just in case it somehow gets locked
|
||||
user << "\red The controls can only be locked when the [src] is online"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_core/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/power/rust_core/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/rust_core/interact(mob/user)
|
||||
if(stat & BROKEN)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=core_gen")
|
||||
return
|
||||
if(!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=core_gen")
|
||||
return
|
||||
|
||||
var/dat = ""
|
||||
if(stat & NOPOWER || locked || state != 2)
|
||||
dat += "<i>The console is dark and nonresponsive.</i>"
|
||||
else
|
||||
dat += "<b>RUST Tokamak pattern Electromagnetic Field Generator</b><br>"
|
||||
dat += "<b>Device ID tag: </b> [id_tag ? id_tag : "UNSET"] <a href='?src=\ref[src];new_id_tag=1'>\[Modify\]</a><br>"
|
||||
dat += "<a href='?src=\ref[src];toggle_active=1'>\[[owned_field ? "Deactivate" : "Activate"]\]</a><br>"
|
||||
dat += "<a href='?src=\ref[src];toggle_remote=1'>\[[remote_access_enabled ? "Disable remote access to this device" : "Enable remote access to this device"]\]</a><br>"
|
||||
dat += "<hr>"
|
||||
dat += "<b>Field strength:</b> [field_strength]Wm^3<br>"
|
||||
dat += "<a href='?src=\ref[src];str=-1000'>\[----\]</a> \
|
||||
<a href='?src=\ref[src];str=-100'>\[--- \]</a> \
|
||||
<a href='?src=\ref[src];str=-10'>\[-- \]</a> \
|
||||
<a href='?src=\ref[src];str=-1'>\[- \]</a> \
|
||||
<a href='?src=\ref[src];str=1'>\[+ \]</a> \
|
||||
<a href='?src=\ref[src];str=10'>\[++ \]</a> \
|
||||
<a href='?src=\ref[src];str=100'>\[+++ \]</a> \
|
||||
<a href='?src=\ref[src];str=1000'>\[++++\]</a><br>"
|
||||
|
||||
dat += "<b>Field frequency:</b> [field_frequency]MHz<br>"
|
||||
dat += "<a href='?src=\ref[src];freq=-1000'>\[----\]</a> \
|
||||
<a href='?src=\ref[src];freq=-100'>\[--- \]</a> \
|
||||
<a href='?src=\ref[src];freq=-10'>\[-- \]</a> \
|
||||
<a href='?src=\ref[src];freq=-1'>\[- \]</a> \
|
||||
<a href='?src=\ref[src];freq=1'>\[+ \]</a> \
|
||||
<a href='?src=\ref[src];freq=10'>\[++ \]</a> \
|
||||
<a href='?src=\ref[src];freq=100'>\[+++ \]</a> \
|
||||
<a href='?src=\ref[src];freq=1000'>\[++++\]</a><br>"
|
||||
|
||||
var/font_colour = "green"
|
||||
if(cached_power_avail < active_power_usage)
|
||||
font_colour = "red"
|
||||
else if(cached_power_avail < active_power_usage * 2)
|
||||
font_colour = "orange"
|
||||
dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
|
||||
|
||||
user << browse(dat, "window=core_gen;size=500x300")
|
||||
onclose(user, "core_gen")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/power/rust_core/Topic(href, href_list)
|
||||
if(href_list["str"])
|
||||
var/dif = text2num(href_list["str"])
|
||||
field_strength = min(max(field_strength + dif, MIN_FIELD_STR), MAX_FIELD_STR)
|
||||
active_power_usage = 5 * field_strength //change to 500 later
|
||||
if(owned_field)
|
||||
owned_field.ChangeFieldStrength(field_strength)
|
||||
icon_state = "core1"
|
||||
luminosity = 1
|
||||
return 1
|
||||
|
||||
proc/Shutdown()
|
||||
if(href_list["freq"])
|
||||
var/dif = text2num(href_list["freq"])
|
||||
field_frequency = min(max(field_frequency + dif, MIN_FIELD_FREQ), MAX_FIELD_FREQ)
|
||||
if(owned_field)
|
||||
owned_field.ChangeFieldFrequency(field_frequency)
|
||||
|
||||
if(href_list["toggle_active"])
|
||||
if(!Startup())
|
||||
Shutdown()
|
||||
|
||||
if( href_list["toggle_remote"] )
|
||||
remote_access_enabled = !remote_access_enabled
|
||||
|
||||
if(href_list["new_id_tag"])
|
||||
if(usr)
|
||||
id_tag = input("Enter a new ID tag", "Tokamak core ID tag", id_tag) as text|null
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=core_gen")
|
||||
usr.unset_machine()
|
||||
|
||||
if(href_list["extern_update"])
|
||||
var/obj/machinery/computer/rust_core_control/C = locate(href_list["extern_update"])
|
||||
if(C)
|
||||
C.updateDialog()
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/power/rust_core/proc/Startup()
|
||||
if(owned_field)
|
||||
return
|
||||
owned_field = new(src.loc)
|
||||
owned_field.ChangeFieldStrength(field_strength)
|
||||
owned_field.ChangeFieldFrequency(field_frequency)
|
||||
icon_state = "core1"
|
||||
luminosity = 1
|
||||
use_power = 2
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rust_core/proc/Shutdown()
|
||||
//todo: safety checks for field status
|
||||
if(owned_field)
|
||||
icon_state = "core0"
|
||||
on = 0
|
||||
del(owned_field)
|
||||
luminosity = 0
|
||||
use_power = 1
|
||||
|
||||
proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(owned_field)
|
||||
owned_field.AddParticles(name, quantity)
|
||||
return 1
|
||||
return 0
|
||||
/obj/machinery/power/rust_core/proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(owned_field)
|
||||
owned_field.AddParticles(name, quantity)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
process()
|
||||
..()
|
||||
use_power(100 * field_strength + 500)
|
||||
if(on && !owned_field)
|
||||
Shutdown()
|
||||
return
|
||||
//
|
||||
luminosity = round(owned_field.field_strength/10)
|
||||
luminosity = max(luminosity,1)
|
||||
//
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
Shutdown()
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && owned_field)
|
||||
var/obj/item/projectile/beam/laserbeam = Proj
|
||||
owned_field.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
|
||||
return 0
|
||||
/obj/machinery/power/rust_core/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && owned_field)
|
||||
owned_field.AddEnergy(Proj.damage, 0, 1)
|
||||
return 0
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
|
||||
/obj/machinery/computer/rust/radiation_monitor
|
||||
name = "Core Radiation Monitor"
|
||||
|
||||
/obj/machinery/computer/rust/energy_monitor
|
||||
name = "Core Primary Monitor"
|
||||
icon_state = "power"
|
||||
var/obj/machinery/rust/core/core_generator = null
|
||||
var/updating = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(0)
|
||||
core_generator = locate() in world
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["shutdown"] )
|
||||
updating = 0
|
||||
core_generator.Topic(href, href_list)
|
||||
updateDialog()
|
||||
updating = 1
|
||||
return
|
||||
if( href_list["startup"] )
|
||||
updating = 0
|
||||
core_generator.Topic(href, href_list)
|
||||
updateDialog()
|
||||
updating = 1
|
||||
return
|
||||
if( href_list["modify_field_strength"] )
|
||||
updating = 0
|
||||
core_generator.Topic(href, href_list)
|
||||
updateDialog()
|
||||
updating = 1
|
||||
return
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=core_monitor")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
process()
|
||||
..()
|
||||
if(updating)
|
||||
src.updateDialog()
|
||||
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=core_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(core_generator)
|
||||
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
|
||||
if(core_generator.owned_field)
|
||||
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
|
||||
t += "Electromagnetic plasma suspension field status:<br>"
|
||||
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
|
||||
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
|
||||
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
|
||||
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
|
||||
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
|
||||
t += "<hr>"
|
||||
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
|
||||
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
|
||||
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
|
||||
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
|
||||
else
|
||||
t += " <font color=blue>No reactants present.</font><br>"
|
||||
else
|
||||
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=core_monitor;size=500x400")
|
||||
user.machine = src
|
||||
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -1,10 +1,10 @@
|
||||
|
||||
/obj/item/weapon/fuel_assembly
|
||||
icon = 'fuel_assembly.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel_assembly"
|
||||
name = "Fuel Rod Assembly"
|
||||
var/list/rod_quantities
|
||||
var/percent_depleted = 0
|
||||
var/percent_depleted = 1
|
||||
//
|
||||
New()
|
||||
rod_quantities = new/list
|
||||
|
||||
|
Before Width: | Height: | Size: 251 B |
@@ -1,31 +1,119 @@
|
||||
|
||||
/obj/machinery/rust/fuel_assembly_port
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port
|
||||
name = "Fuel Assembly Port"
|
||||
icon = 'fuel_assembly_port.dmi'
|
||||
icon_state = "port0"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "port2"
|
||||
density = 0
|
||||
var/obj/item/weapon/fuel_assembly/cur_assembly = null
|
||||
layer = 4
|
||||
var/obj/item/weapon/fuel_assembly/cur_assembly
|
||||
var/busy = 0
|
||||
anchored = 1
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I,/obj/item/weapon/fuel_assembly))
|
||||
if(cur_assembly)
|
||||
del cur_assembly
|
||||
var/opened = 1 //0=closed, 1=opened
|
||||
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I,/obj/item/weapon/fuel_assembly) && !opened)
|
||||
if(cur_assembly)
|
||||
user << "\red There is already a fuel rod assembly in there!"
|
||||
else
|
||||
cur_assembly = I
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
icon_state = "port1"
|
||||
user << "\blue You insert [I] into [src]. Touch the panel again to insert [I] into the injector."
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
if(cur_assembly)
|
||||
cur_assembly.loc = src.loc
|
||||
/obj/machinery/rust_fuel_assembly_port/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER) || opened)
|
||||
return
|
||||
|
||||
if(cur_assembly)
|
||||
if(try_insert_assembly())
|
||||
user << "\blue \icon[src] [src] inserts it's fuel rod assembly into an injector."
|
||||
else
|
||||
if(eject_assembly())
|
||||
user << "\red \icon[src] [src] ejects it's fuel assembly. Check the fuel injector status."
|
||||
else if(try_draw_assembly())
|
||||
user << "\blue \icon[src] [src] draws a fuel rod assembly from an injector."
|
||||
else if(try_draw_assembly())
|
||||
user << "\blue \icon[src] [src] draws a fuel rod assembly from an injector."
|
||||
else
|
||||
user << "\red \icon[src] [src] was unable to draw a fuel rod assembly from an injector."
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly()
|
||||
var/success = 0
|
||||
if(cur_assembly)
|
||||
var/turf/check_turf = get_step(get_turf(src), src.dir)
|
||||
check_turf = get_step(check_turf, src.dir)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
|
||||
if(I.stat & (BROKEN|NOPOWER))
|
||||
break
|
||||
if(I.cur_assembly)
|
||||
break
|
||||
if(I.state != 2)
|
||||
break
|
||||
|
||||
I.cur_assembly = cur_assembly
|
||||
cur_assembly.loc = I
|
||||
cur_assembly = null
|
||||
icon_state = "port0"
|
||||
success = 1
|
||||
|
||||
New()
|
||||
//embed the fuel port into a wall
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? 24 : -24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? 24 : -24) : 0
|
||||
return success
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
|
||||
if(cur_assembly)
|
||||
cur_assembly.loc = get_step(get_turf(src), src.dir)
|
||||
cur_assembly = null
|
||||
icon_state = "port0"
|
||||
return 1
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
|
||||
var/success = 0
|
||||
if(cur_assembly)
|
||||
var/turf/check_turf = get_step(get_turf(src), src.dir)
|
||||
check_turf = get_step(check_turf, src.dir)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
|
||||
if(I.stat & (BROKEN|NOPOWER))
|
||||
break
|
||||
if(!I.cur_assembly)
|
||||
break
|
||||
if(I.injecting)
|
||||
break
|
||||
if(I.state != 2)
|
||||
break
|
||||
|
||||
cur_assembly = I.cur_assembly
|
||||
cur_assembly.loc = src
|
||||
I.cur_assembly = null
|
||||
icon_state = "port1"
|
||||
success = 1
|
||||
|
||||
return success
|
||||
|
||||
/*
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_insert_assembly_verb()
|
||||
set name = "Attempt to insert assembly from port into injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_insert_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb()
|
||||
set name = "Attempt to eject assembly from port"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
eject_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_draw_assembly_verb()
|
||||
set name = "Draw assembly from injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_draw_assembly()
|
||||
*/
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,133 @@
|
||||
|
||||
//frame assembly
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame
|
||||
name = "Fuel Assembly Port frame"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "port2"
|
||||
w_class = 4
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Port cannot be placed on this spot."
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "\red Port cannot be placed in this area."
|
||||
return
|
||||
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
|
||||
del(src)
|
||||
|
||||
//construction steps
|
||||
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
|
||||
// offset 24 pixels in direction of dir
|
||||
// this allows the APC to be embedded in a wall, yet still inside an area
|
||||
if (building)
|
||||
dir = ndir
|
||||
else
|
||||
has_electronics = 3
|
||||
opened = 0
|
||||
icon_state = "port0"
|
||||
|
||||
//20% easier to read than apc code
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/attackby(obj/item/W, mob/user)
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
if(opened)
|
||||
if(has_electronics & 1)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "You begin removing the circuitboard" //lpeters - fixed grammar issues
|
||||
if(do_after(user, 50))
|
||||
user.visible_message(\
|
||||
"\red [user.name] has removed the circuitboard from [src.name]!",\
|
||||
"\blue You remove the circuitboard.")
|
||||
has_electronics = 0
|
||||
new /obj/item/weapon/module/rust_fuel_port(loc)
|
||||
has_electronics &= ~1
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "port0"
|
||||
user << "\blue You close the maintenance cover."
|
||||
else
|
||||
if(cur_assembly)
|
||||
user << "\red You cannot open the cover while there is a fuel assembly inside."
|
||||
else
|
||||
opened = 1
|
||||
user << "\blue You open the maintenance cover."
|
||||
icon_state = "port2"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
user << "\red You need more wires."
|
||||
return
|
||||
user << "You start adding cables to the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
C.use(10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] has added cables to the port frame!",\
|
||||
"You add cables to the port frame.")
|
||||
has_electronics &= 2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cabling inside the port.",\
|
||||
"You cut the cabling inside the port.")
|
||||
has_electronics &= ~2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/module/rust_fuel_port) && opened && !(has_electronics & 1))
|
||||
user << "You trying to insert the port control board into the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
has_electronics &= 1
|
||||
user << "You place the port control board inside the frame."
|
||||
del(W)
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.get_fuel() < 3)
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
user << "You start welding the port frame..."
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
new /obj/item/rust_fuel_assembly_port_frame(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut away from the wall by [user.name].",\
|
||||
"You detached the port frame.",\
|
||||
"\red You hear welding.")
|
||||
del(src)
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -1,87 +1,112 @@
|
||||
var/const/max_assembly_amount = 300
|
||||
|
||||
/obj/machinery/rust/fuel_compressor
|
||||
icon = 'fuel_compressor.dmi'
|
||||
icon_state = "fuel_compressor"
|
||||
/obj/machinery/rust_fuel_compressor
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel_compressor1"
|
||||
name = "Fuel Compressor"
|
||||
var/list/new_assembly_quantities
|
||||
//
|
||||
New()
|
||||
new_assembly_quantities = new/list
|
||||
spawn(0)
|
||||
new_assembly_quantities["Deuterium"] = 200
|
||||
new_assembly_quantities["Tritium"] = 100
|
||||
//
|
||||
new_assembly_quantities["Helium-3"] = 0
|
||||
new_assembly_quantities["Lithium-6"] = 0
|
||||
new_assembly_quantities["Silver"] = 0
|
||||
var/list/new_assembly_quantities = list("Deuterium" = 200,"Tritium" = 100,"Helium-3" = 0,"Lithium-6" = 0,"Silver" = 0)
|
||||
var/compressed_matter = 0
|
||||
anchored = 1
|
||||
layer = 2.9
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
var/opened = 1 //0=closed, 1=opened
|
||||
var/locked = 0
|
||||
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
/obj/machinery/rust_fuel_compressor/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/*power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
else
|
||||
if( powered() )
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "c_unpowered"
|
||||
stat |= NOPOWER*/
|
||||
/obj/machinery/rust_fuel_compressor/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuelcomp")
|
||||
usr.machine = null
|
||||
return
|
||||
//
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
if(href_list[reagent])
|
||||
var/new_amount = text2num(input("Enter new rod amount", "Fuel Assembly Rod Composition ([reagent])", new_assembly_quantities[reagent]) as text|null)
|
||||
if(!new_amount)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
var/sum_reactants = new_amount - new_assembly_quantities[reagent]
|
||||
for(var/rod in new_assembly_quantities)
|
||||
sum_reactants += new_assembly_quantities[rod]
|
||||
if(sum_reactants > max_assembly_amount)
|
||||
usr << "\red You have entered too many rods."
|
||||
else
|
||||
new_assembly_quantities[reagent] = new_amount
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["activate"] )
|
||||
var/obj/item/weapon/fuel_assembly/F = new(src)
|
||||
//world << "\blue New fuel rod assembly"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
F.loc = src.loc
|
||||
/obj/machinery/rust_fuel_compressor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
compressed_matter += 10
|
||||
del(W)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return
|
||||
|
||||
interact(mob/user)
|
||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return*/
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
if(locked)
|
||||
t += "Swipe your ID to unlock this console."
|
||||
else
|
||||
t += "Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a><br>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x800")
|
||||
user.machine = src
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];change_reagent=[reagent]'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
|
||||
user << browse(t, "window=fuelcomp;size=500x300")
|
||||
user.set_machine(src)
|
||||
|
||||
//var/locked
|
||||
//var/coverlocked
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuelcomp")
|
||||
usr.machine = null
|
||||
|
||||
if( href_list["eject_matter"] )
|
||||
var/ejected = 0
|
||||
while(compressed_matter > 10)
|
||||
new /obj/item/weapon/rcd_ammo(get_step(get_turf(src), src.dir))
|
||||
compressed_matter -= 10
|
||||
ejected = 1
|
||||
if(ejected)
|
||||
usr << "\blue \icon[src] [src] ejects some compressed matter units."
|
||||
else
|
||||
usr << "\red \icon[src] there are no more compressed matter units in [src]."
|
||||
|
||||
if( href_list["activate"] )
|
||||
//world << "\blue New fuel rod assembly"
|
||||
var/obj/item/weapon/fuel_assembly/F = new(src)
|
||||
var/fail = 0
|
||||
var/old_matter = compressed_matter
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
var/req_matter = new_assembly_quantities[reagent] / 30
|
||||
//world << "[reagent] matter: [req_matter]/[compressed_matter]"
|
||||
if(req_matter <= compressed_matter)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
compressed_matter -= req_matter
|
||||
else
|
||||
fail = 1
|
||||
break
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
if(fail)
|
||||
del(F)
|
||||
compressed_matter = old_matter
|
||||
usr << "\red \icon[src] [src] flashes red: \'Out of matter.\'"
|
||||
else
|
||||
F.loc = get_step(get_turf(src), src.dir)
|
||||
F.percent_depleted = 0
|
||||
if(compressed_matter < 0.034)
|
||||
compressed_matter = 0
|
||||
|
||||
if( href_list["change_reagent"] )
|
||||
var/cur_reagent = href_list["change_reagent"]
|
||||
var/avail_rods = 300
|
||||
for(var/rod in new_assembly_quantities)
|
||||
avail_rods -= new_assembly_quantities[rod]
|
||||
avail_rods += new_assembly_quantities[cur_reagent]
|
||||
avail_rods = max(avail_rods, 0)
|
||||
|
||||
var/new_amount = min(input("Enter new [cur_reagent] rod amount (max [avail_rods])", "Fuel Assembly Rod Composition ([cur_reagent])") as num, avail_rods)
|
||||
new_assembly_quantities[cur_reagent] = new_amount
|
||||
|
||||
updateDialog()
|
||||
|
||||
|
Before Width: | Height: | Size: 312 B |
@@ -0,0 +1,160 @@
|
||||
|
||||
//frame assembly
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame
|
||||
name = "Fuel Compressor frame"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel_compressor0"
|
||||
w_class = 4
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Compressor cannot be placed on this spot."
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "\red Compressor cannot be placed in this area."
|
||||
return
|
||||
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
|
||||
del(src)
|
||||
|
||||
//construction steps
|
||||
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
|
||||
// offset 24 pixels in direction of dir
|
||||
// this allows the APC to be embedded in a wall, yet still inside an area
|
||||
if (building)
|
||||
dir = ndir
|
||||
else
|
||||
has_electronics = 3
|
||||
opened = 0
|
||||
locked = 0
|
||||
icon_state = "fuel_compressor1"
|
||||
|
||||
//20% easier to read than apc code
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/attackby(obj/item/W, mob/user)
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
if(opened)
|
||||
if(has_electronics & 1)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "You begin removing the circuitboard" //lpeters - fixed grammar issues
|
||||
if(do_after(user, 50))
|
||||
user.visible_message(\
|
||||
"\red [user.name] has removed the circuitboard from [src.name]!",\
|
||||
"\blue You remove the circuitboard board.")
|
||||
has_electronics = 0
|
||||
new /obj/item/weapon/module/rust_fuel_compressor(loc)
|
||||
has_electronics &= ~1
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "fuel_compressor0"
|
||||
user << "\blue You close the maintenance cover."
|
||||
else
|
||||
if(compressed_matter > 0)
|
||||
user << "\red You cannot open the cover while there is compressed matter inside."
|
||||
else
|
||||
opened = 1
|
||||
user << "\blue You open the maintenance cover."
|
||||
icon_state = "fuel_compressor1"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
if(src.allowed(usr))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] the compressor interface."
|
||||
update_icon()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !emagged) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
user << "\red You need more wires."
|
||||
return
|
||||
user << "You start adding cables to the compressor frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
C.use(10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] has added cables to the compressor frame!",\
|
||||
"You add cables to the port frame.")
|
||||
has_electronics &= 2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cabling inside the compressor.",\
|
||||
"You cut the cabling inside the port.")
|
||||
has_electronics &= ~2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/module/rust_fuel_compressor) && opened && !(has_electronics & 1))
|
||||
user << "You trying to insert the circuitboard into the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
has_electronics &= 1
|
||||
user << "You place the circuitboard inside the frame."
|
||||
del(W)
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.get_fuel() < 3)
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
user << "You start welding the compressor frame..."
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
new /obj/item/rust_fuel_assembly_port_frame(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut away from the wall by [user.name].",\
|
||||
"You detached the compressor frame.",\
|
||||
"\red You hear welding.")
|
||||
del(src)
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -1,172 +1,192 @@
|
||||
|
||||
/obj/machinery/computer/rust/fuel_control
|
||||
name = "Fuel Injection Control"
|
||||
icon_state = "power"
|
||||
var/list/fuel_injectors
|
||||
var/list/stage_status
|
||||
/obj/machinery/computer/rust_fuel_control
|
||||
name = "RUST Fuel Injection Control"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel"
|
||||
var/list/connected_injectors = list()
|
||||
var/list/active_stages = list()
|
||||
var/list/proceeding_stages = list()
|
||||
var/list/stage_times = list()
|
||||
//var/list/stage_status
|
||||
var/announce_fueldepletion = 0
|
||||
var/announce_stageprogression = 0
|
||||
//var/obj/machinery/rust/fuel_injector/Injector = null
|
||||
New()
|
||||
..()
|
||||
//these are the only three stages we can accept
|
||||
//we have another console for SCRAM
|
||||
fuel_injectors = new/list
|
||||
stage_status = new/list
|
||||
var/scan_range = 25
|
||||
var/ticks_this_stage = 0
|
||||
|
||||
fuel_injectors.Add("One")
|
||||
fuel_injectors["One"] = new/list
|
||||
stage_status.Add("One")
|
||||
stage_status["One"] = 0
|
||||
fuel_injectors.Add("Two")
|
||||
fuel_injectors["Two"] = new/list
|
||||
stage_status.Add("Two")
|
||||
stage_status["Two"] = 0
|
||||
fuel_injectors.Add("Three")
|
||||
fuel_injectors["Three"] = new/list
|
||||
stage_status.Add("Three")
|
||||
stage_status["Three"] = 0
|
||||
fuel_injectors.Add("SCRAM")
|
||||
fuel_injectors["SCRAM"] = new/list
|
||||
stage_status.Add("SCRAM")
|
||||
stage_status["SCRAM"] = 0
|
||||
/*/obj/machinery/computer/rust_fuel_control/New()
|
||||
..()
|
||||
//these are the only three stages we can accept
|
||||
//we have another console for SCRAM
|
||||
fuel_injectors = new/list
|
||||
stage_status = new/list
|
||||
|
||||
spawn(0)
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in world)
|
||||
if(Injector.stage in fuel_injectors)
|
||||
var/list/targetlist = fuel_injectors[Injector.stage]
|
||||
targetlist.Add(Injector)
|
||||
fuel_injectors.Add("One")
|
||||
fuel_injectors["One"] = new/list
|
||||
stage_status.Add("One")
|
||||
stage_status["One"] = 0
|
||||
fuel_injectors.Add("Two")
|
||||
fuel_injectors["Two"] = new/list
|
||||
stage_status.Add("Two")
|
||||
stage_status["Two"] = 0
|
||||
fuel_injectors.Add("Three")
|
||||
fuel_injectors["Three"] = new/list
|
||||
stage_status.Add("Three")
|
||||
stage_status["Three"] = 0
|
||||
fuel_injectors.Add("SCRAM")
|
||||
fuel_injectors["SCRAM"] = new/list
|
||||
stage_status.Add("SCRAM")
|
||||
stage_status["SCRAM"] = 0
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
spawn(0)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/Injector in world)
|
||||
if(Injector.stage in fuel_injectors)
|
||||
var/list/targetlist = fuel_injectors[Injector.stage]
|
||||
targetlist.Add(Injector)*/
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
/obj/machinery/computer/rust_fuel_control/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/*updateDialog()
|
||||
for(var/mob/M in range(1))
|
||||
if(M.machine == src)
|
||||
interact(m)*/
|
||||
/obj/machinery/computer/rust_fuel_control/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuel_monitor")
|
||||
usr.machine = null
|
||||
return
|
||||
if( href_list["beginstage"] )
|
||||
var/stage_name = href_list["beginstage"]
|
||||
if(stage_name in fuel_injectors)
|
||||
var/success = 1
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
|
||||
if(!Injector.BeginInjecting())
|
||||
success = 0
|
||||
if(!success) //may still partially complete
|
||||
usr << "\red Unable to complete command."
|
||||
stage_status[stage_name] = 1
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["begincool"] )
|
||||
var/stage_name = href_list["begincool"]
|
||||
if(stage_name in fuel_injectors)
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
|
||||
Injector.StopInjecting()
|
||||
stage_status[stage_name] = 0
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["restart"] )
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["cooldown"] )
|
||||
for(var/stage_name in fuel_injectors)
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
|
||||
Injector.StopInjecting()
|
||||
stage_status[stage_name] = 0
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["update"] )
|
||||
updateDialog()
|
||||
return
|
||||
//
|
||||
if( href_list["disable_fueldepletion"] )
|
||||
announce_fueldepletion = 0
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["announce_fueldepletion"] )
|
||||
announce_fueldepletion = 1
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["broadcast_fueldepletion"] )
|
||||
announce_fueldepletion = 2
|
||||
updateDialog()
|
||||
return
|
||||
//
|
||||
if( href_list["disable_stageprogression"] )
|
||||
announce_stageprogression = 0
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["announce_stageprogression"] )
|
||||
announce_stageprogression = 1
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["broadcast_stageprogression"] )
|
||||
announce_stageprogression = 2
|
||||
updateDialog()
|
||||
return
|
||||
/obj/machinery/computer/rust_fuel_control/interact(mob/user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_control")
|
||||
return
|
||||
|
||||
process()
|
||||
..()
|
||||
src.updateDialog()
|
||||
if (!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_control")
|
||||
return
|
||||
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
var/cooling = 0
|
||||
for(var/stage in stage_status)
|
||||
if(stage_status[stage])
|
||||
t += "Fuel injection: <font color=blue>Active</font><br>"
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
cooling = 1
|
||||
break
|
||||
if(!cooling)
|
||||
t += "Fuel injection: <font color=blue>Cooling</font><br>"
|
||||
t += "----<br>"
|
||||
//
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage_name in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage_name]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_monitor;size=500x600")
|
||||
user.machine = src
|
||||
var/dat = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
/*dat += "<b>Fuel depletion announcement:</b> "
|
||||
dat += "[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"] "
|
||||
dat += "[announce_fueldepletion == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_fueldepletion=1'>\[Announce\]</a>"] "
|
||||
dat += "[announce_fueldepletion == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_fueldepletion=2'>\[Broadcast\]</a>"]<br>"
|
||||
dat += "<b>Stage progression announcement:</b> "
|
||||
dat += "[announce_stageprogression == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_stageprogression=0'>\[Disable\]</a>"] "
|
||||
dat += "[announce_stageprogression == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_stageprogression=1'>\[Announce\]</a>"] "
|
||||
dat += "[announce_stageprogression == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_stageprogression=2'>\[Broadcast\]</a>"]<br>"*/
|
||||
dat += "<hr>"
|
||||
|
||||
dat += "<b>Detected devices</b> <a href='?src=\ref[src];scan=1'>\[Refresh list\]</a>"
|
||||
dat += "<table border=1 width='100%'>"
|
||||
dat += "<tr>"
|
||||
dat += "<td><b>ID</b></td>"
|
||||
dat += "<td><b>Assembly</b></td>"
|
||||
dat += "<td><b>Consumption</b></td>"
|
||||
dat += "<td><b>Depletion</b></td>"
|
||||
dat += "<td><b>Duration</b></td>"
|
||||
dat += "<td><b>Next stage</b></td>"
|
||||
dat += "<td></td>"
|
||||
dat += "<td></td>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
|
||||
dat += "<tr>"
|
||||
dat += "<td>[I.id_tag]</td>"
|
||||
if(I.cur_assembly)
|
||||
dat += "<td><a href='?src=\ref[I];toggle_injecting=1;update_extern=\ref[src]'>\[[I.injecting ? "Halt injecting" : "Begin injecting"]\]</a></td>"
|
||||
else
|
||||
dat += "<td>None</td>"
|
||||
dat += "<td>[I.fuel_usage * 100]%</td>"
|
||||
if(I.cur_assembly)
|
||||
dat += "<td>[I.cur_assembly.percent_depleted * 100]%</td>"
|
||||
else
|
||||
dat += "<td>NA</td>"
|
||||
if(stage_times.Find(I.id_tag))
|
||||
dat += "<td>[ticks_this_stage]/[stage_times[I.id_tag]]s <a href='?src=\ref[src];stage_time=[I.id_tag]'>Modify</td>"
|
||||
else
|
||||
dat += "<td>[ticks_this_stage]s <a href='?src=\ref[src];stage_time=[I.id_tag]'>Set</td>"
|
||||
if(proceeding_stages.Find(I.id_tag))
|
||||
dat += "<td><a href='?src=\ref[src];set_next_stage=[I.id_tag]'>[proceeding_stages[I.id_tag]]</a></td>"
|
||||
else
|
||||
dat += "<td>None <a href='?src=\ref[src];set_next_stage=[I.id_tag]'>\[modify\]</a></td>"
|
||||
dat += "<td><a href='?src=\ref[src];toggle_stage=[I.id_tag]'>\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \]</a></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
dat += "<hr>"
|
||||
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A> "
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(dat, "window=fuel_control;size=800x400")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/computer/rust_fuel_control/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if( href_list["scan"] )
|
||||
connected_injectors = list()
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in range(scan_range, src))
|
||||
if(check_injector_status(I))
|
||||
connected_injectors.Add(I)
|
||||
|
||||
if( href_list["toggle_stage"] )
|
||||
var/cur_stage = href_list["toggle_stage"]
|
||||
if(active_stages.Find(cur_stage))
|
||||
active_stages.Remove(cur_stage)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
|
||||
if(I.id_tag == cur_stage && check_injector_status(I))
|
||||
I.StopInjecting()
|
||||
else
|
||||
active_stages.Add(cur_stage)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
|
||||
if(I.id_tag == cur_stage && check_injector_status(I))
|
||||
I.BeginInjecting()
|
||||
|
||||
if( href_list["cooldown"] )
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
|
||||
if(check_injector_status(I))
|
||||
I.StopInjecting()
|
||||
active_stages = list()
|
||||
|
||||
if( href_list["warmup"] )
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
|
||||
if(check_injector_status(I))
|
||||
I.BeginInjecting()
|
||||
if(!active_stages.Find(I.id_tag))
|
||||
active_stages.Add(I.id_tag)
|
||||
|
||||
if( href_list["stage_time"] )
|
||||
var/cur_stage = href_list["stage_time"]
|
||||
var/new_duration = input("Enter new stage duration in seconds", "Stage duration") as num
|
||||
if(new_duration)
|
||||
stage_times[cur_stage] = new_duration
|
||||
else if(stage_times.Find(cur_stage))
|
||||
stage_times.Remove(cur_stage)
|
||||
|
||||
if( href_list["announce_fueldepletion"] )
|
||||
announce_fueldepletion = text2num(href_list["announce_fueldepletion"])
|
||||
|
||||
if( href_list["announce_stageprogression"] )
|
||||
announce_stageprogression = text2num(href_list["announce_stageprogression"])
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuel_control")
|
||||
usr.unset_machine()
|
||||
|
||||
if( href_list["set_next_stage"] )
|
||||
var/cur_stage = href_list["set_next_stage"]
|
||||
if(!proceeding_stages.Find(cur_stage))
|
||||
proceeding_stages.Add(cur_stage)
|
||||
var/next_stage = input("Enter next stage ID", "Automated stage procession") as text|null
|
||||
if(next_stage)
|
||||
proceeding_stages[cur_stage] = next_stage
|
||||
else
|
||||
proceeding_stages.Remove(cur_stage)
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/rust_fuel_control/proc/check_injector_status(var/obj/machinery/power/rust_fuel_injector/I)
|
||||
if(!I)
|
||||
return 0
|
||||
|
||||
if(I.stat & (BROKEN|NOPOWER) || !I.remote_access_enabled || !I.id_tag)
|
||||
if(connected_injectors.Find(I))
|
||||
connected_injectors.Remove(I)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1,210 +1,290 @@
|
||||
|
||||
/obj/machinery/rust/fuel_injector
|
||||
/obj/machinery/power/rust_fuel_injector
|
||||
name = "Fuel Injector"
|
||||
icon = 'fuel_injector.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "injector0"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/obj/machinery/rust/fuel_assembly_port/owned_assembly_port
|
||||
//var/list/stageone_assemblyports
|
||||
//var/list/stagetwo_assemblyports
|
||||
//var/list/scram_assemblyports
|
||||
var/obj/machinery/rust/reactor_vessel/Vessel = null
|
||||
var/rate = 10 //microseconds between each cycle
|
||||
var/fuel_usage = 0.0001 //percentage of available fuel to use per cycle
|
||||
var/on = 1
|
||||
var/remote_enabled = 1
|
||||
var/state = 2
|
||||
var/locked = 0
|
||||
var/obj/item/weapon/fuel_assembly/cur_assembly
|
||||
var/fuel_usage = 0.0001 //percentage of available fuel to use per cycle
|
||||
var/id_tag = "One"
|
||||
var/injecting = 0
|
||||
var/stage = "One"
|
||||
var/targetting_field = 0
|
||||
layer = 4
|
||||
var/trying_to_swap_fuel = 0
|
||||
//
|
||||
req_access = list(access_engine)
|
||||
//
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 300
|
||||
active_power_usage = 500
|
||||
directwired = 0
|
||||
var/remote_access_enabled = 1
|
||||
var/cached_power_avail = 0
|
||||
var/emergency_insert_ready = 0
|
||||
|
||||
//fuel assembly should be embedded into the wall behind the injector
|
||||
New()
|
||||
..()
|
||||
name = "Stage [stage] Fuel Injector"
|
||||
//pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
//pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
/*
|
||||
stageone_assemblyports = new/list()
|
||||
stagetwo_assemblyports = new/list()
|
||||
scram_assemblyports = new/list()
|
||||
spawn(1)
|
||||
Vessel = locate() in range(6,src)
|
||||
for(var/obj/machinery/rust/fuel_assembly_port/S in range(6,src))
|
||||
switch(S.stage)
|
||||
if("One")
|
||||
stageone_assemblyports.Add(S)
|
||||
if("Two")
|
||||
stagetwo_assemblyports.Add(S)
|
||||
if("SCRAM")
|
||||
scram_assemblyports.Add(S)
|
||||
*/
|
||||
spawn(1)
|
||||
var/rev_dir = reverse_direction(dir)
|
||||
var/turf/mid = get_step(src, rev_dir)
|
||||
for(var/obj/machinery/rust/fuel_assembly_port/port in get_step(mid, rev_dir))
|
||||
owned_assembly_port = port
|
||||
//
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuel_injector")
|
||||
usr.machine = null
|
||||
return
|
||||
if( href_list["begin_injecting"] )
|
||||
BeginInjecting()
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["end_injecting"] )
|
||||
/obj/machinery/power/rust_fuel_injector/process()
|
||||
if(injecting)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
StopInjecting()
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["cyclerate"] )
|
||||
var/new_rate = text2num(input("Enter new injection rate (0.1 - 10 sec)", "Modifying injection rate", rate/10))
|
||||
if(!new_rate)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
new_rate = min(new_rate,0.1)
|
||||
new_rate = max(new_rate,10)
|
||||
rate = new_rate * 10
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["fuel_usage"] )
|
||||
var/new_rate = text2num(input("Enter new fuel usage (1 - 100%)", "Modifying fuel usage", rate/10))
|
||||
if(!new_rate)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
new_rate = min(new_rate,0.1)
|
||||
new_rate = max(new_rate,10)
|
||||
rate = new_rate * 10
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
/*if(stat & (BROKEN|NOPOWER))
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
|
||||
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
|
||||
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_injector;size=500x800")
|
||||
user.machine = src
|
||||
Inject()
|
||||
|
||||
proc/BeginInjecting()
|
||||
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
|
||||
icon_state = "injector1"
|
||||
injecting = 1
|
||||
spawn(rate)
|
||||
Inject()
|
||||
return 1
|
||||
return 0
|
||||
cached_power_avail = avail()
|
||||
|
||||
proc/StopInjecting()
|
||||
/obj/machinery/power/rust_fuel_injector/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(injecting)
|
||||
injecting = 0
|
||||
icon_state = "injector0"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/Inject()
|
||||
if(!injecting)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
if(owned_assembly_port.cur_assembly)
|
||||
var/obj/machinery/rust/em_field/target_field
|
||||
if(targetting_field)
|
||||
for(var/obj/machinery/rust/em_field/field in range(15))
|
||||
target_field = field
|
||||
var/amount_left = 0
|
||||
for(var/reagent in owned_assembly_port.cur_assembly.rod_quantities)
|
||||
//world << "checking [reagent]"
|
||||
if(owned_assembly_port.cur_assembly.rod_quantities[reagent] > 0)
|
||||
//world << " rods left: [owned_assembly_port.cur_assembly.rod_quantities[reagent]]"
|
||||
var/amount = owned_assembly_port.cur_assembly.rod_quantities[reagent] * fuel_usage
|
||||
var/numparticles = round(amount * 1000)
|
||||
if(numparticles < 1)
|
||||
numparticles = 1
|
||||
//world << " amount: [amount]"
|
||||
//world << " numparticles: [numparticles]"
|
||||
//
|
||||
var/obj/effect/accelerated_particle/particle = new/obj/effect/accelerated_particle(src.loc, src.dir)
|
||||
particle.particle_type = reagent
|
||||
particle.energy = 0
|
||||
particle.icon_state = "particle"
|
||||
particle.additional_particles = numparticles - 1
|
||||
particle.target = target_field
|
||||
//
|
||||
owned_assembly_port.cur_assembly.rod_quantities[reagent] -= amount
|
||||
amount_left += owned_assembly_port.cur_assembly.rod_quantities[reagent]
|
||||
owned_assembly_port.cur_assembly.percent_depleted = amount_left / 300
|
||||
flick("injector-emitting",src)
|
||||
use_power(fuel_usage * 10000 + 100) //0.0001
|
||||
if(injecting)
|
||||
spawn(rate)
|
||||
Inject()
|
||||
else
|
||||
injecting = 0
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the external reinforcing bolts to the floor.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
"You undo the external reinforcing bolts.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
|
||||
process()
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(injecting)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
if(1)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
connect_to_network()
|
||||
//src.directwired = 1
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
disconnect_from_network()
|
||||
//src.directwired = 0
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(emagged)
|
||||
user << "\red The lock seems to be broken"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/fuel_assembly) && !cur_assembly)
|
||||
if(emergency_insert_ready)
|
||||
cur_assembly = W
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
emergency_insert_ready = 0
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/interact(mob/user)
|
||||
if(stat & BROKEN)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
if(get_dist(src, user) > 1 )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
|
||||
var/dat = ""
|
||||
if (stat & NOPOWER || locked || state != 2)
|
||||
dat += "<i>The console is dark and nonresponsive.</i>"
|
||||
else
|
||||
dat += "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
dat += "<b>Device ID tag:</b> [id_tag] <a href='?src=\ref[src];modify_tag=1'>\[Modify\]</a><br>"
|
||||
dat += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
dat += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
dat += "<b>Fuel assembly port:</b> "
|
||||
dat += "<a href='?src=\ref[src];fuel_assembly=1'>\[[cur_assembly ? "Eject assembly to port" : "Draw assembly from port"]\]</a> "
|
||||
if(cur_assembly)
|
||||
dat += "<a href='?src=\ref[src];emergency_fuel_assembly=1'>\[Emergency eject\]</a><br>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];emergency_fuel_assembly=1'>\[[emergency_insert_ready ? "Cancel emergency insertion" : "Emergency insert"]\]</a><br>"
|
||||
var/font_colour = "green"
|
||||
if(cached_power_avail < active_power_usage)
|
||||
font_colour = "red"
|
||||
else if(cached_power_avail < active_power_usage * 2)
|
||||
font_colour = "orange"
|
||||
dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
|
||||
dat += "<a href='?src=\ref[src];toggle_remote=1'>\[[remote_access_enabled ? "Disable remote access" : "Enable remote access"]\]</a><br>"
|
||||
|
||||
dat += "<hr>"
|
||||
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A> "
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
|
||||
user << browse(dat, "window=fuel_injector;size=500x300")
|
||||
onclose(user, "fuel_injector")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if( href_list["modify_tag"] )
|
||||
id_tag = input("Enter new ID tag", "Modifying ID tag") as text|null
|
||||
|
||||
if( href_list["fuel_assembly"] )
|
||||
if(!trying_to_swap_fuel)
|
||||
trying_to_swap_fuel = 1
|
||||
spawn(50)
|
||||
attempt_fuel_swap()
|
||||
trying_to_swap_fuel = 0
|
||||
|
||||
if( href_list["emergency_fuel_assembly"] )
|
||||
if(cur_assembly)
|
||||
cur_assembly.loc = src.loc
|
||||
cur_assembly = null
|
||||
//irradiate!
|
||||
else
|
||||
emergency_insert_ready = !emergency_insert_ready
|
||||
|
||||
if( href_list["toggle_injecting"] )
|
||||
if(injecting)
|
||||
StopInjecting()
|
||||
else
|
||||
BeginInjecting()
|
||||
|
||||
if( href_list["toggle_remote"] )
|
||||
remote_access_enabled = !remote_access_enabled
|
||||
|
||||
if( href_list["fuel_usage"] )
|
||||
var/new_usage = text2num(input("Enter new fuel usage (0.01% - 100%)", "Modifying fuel usage", fuel_usage * 100))
|
||||
if(!new_usage)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
new_usage = max(new_usage, 0.01)
|
||||
new_usage = min(new_usage, 100)
|
||||
fuel_usage = new_usage / 100
|
||||
active_power_usage = 500 + 1000 * fuel_usage
|
||||
|
||||
if( href_list["update_extern"] )
|
||||
var/obj/machinery/computer/rust_fuel_control/C = locate(href_list["update_extern"])
|
||||
if(C)
|
||||
C.updateDialog()
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuel_injector")
|
||||
usr.unset_machine()
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting()
|
||||
if(!injecting && cur_assembly)
|
||||
icon_state = "injector1"
|
||||
injecting = 1
|
||||
use_power = 1
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/proc/StopInjecting()
|
||||
if(injecting)
|
||||
injecting = 0
|
||||
icon_state = "injector0"
|
||||
use_power = 0
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/proc/Inject()
|
||||
if(!injecting)
|
||||
return
|
||||
if(cur_assembly)
|
||||
var/amount_left = 0
|
||||
for(var/reagent in cur_assembly.rod_quantities)
|
||||
//world << "checking [reagent]"
|
||||
if(cur_assembly.rod_quantities[reagent] > 0)
|
||||
//world << " rods left: [cur_assembly.rod_quantities[reagent]]"
|
||||
var/amount = cur_assembly.rod_quantities[reagent] * fuel_usage
|
||||
var/numparticles = round(amount * 1000)
|
||||
if(numparticles < 1)
|
||||
numparticles = 1
|
||||
//world << " amount: [amount]"
|
||||
//world << " numparticles: [numparticles]"
|
||||
//
|
||||
|
||||
var/obj/effect/accelerated_particle/A = new/obj/effect/accelerated_particle(get_turf(src), dir)
|
||||
A.particle_type = reagent
|
||||
A.additional_particles = numparticles - 1
|
||||
//A.target = target_field
|
||||
//
|
||||
cur_assembly.rod_quantities[reagent] -= amount
|
||||
amount_left += cur_assembly.rod_quantities[reagent]
|
||||
cur_assembly.percent_depleted = amount_left / 300
|
||||
flick("injector-emitting",src)
|
||||
else
|
||||
StopInjecting()
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap()
|
||||
var/rev_dir = reverse_direction(dir)
|
||||
var/turf/mid = get_step(src, rev_dir)
|
||||
var/success = 0
|
||||
for(var/obj/machinery/rust_fuel_assembly_port/check_port in get_step(mid, rev_dir))
|
||||
if(cur_assembly)
|
||||
if(!check_port.cur_assembly)
|
||||
check_port.cur_assembly = cur_assembly
|
||||
cur_assembly.loc = check_port
|
||||
cur_assembly = null
|
||||
check_port.icon_state = "port1"
|
||||
success = 1
|
||||
else
|
||||
if(check_port.cur_assembly)
|
||||
cur_assembly = check_port.cur_assembly
|
||||
cur_assembly.loc = src
|
||||
check_port.cur_assembly = null
|
||||
check_port.icon_state = "port0"
|
||||
success = 1
|
||||
|
||||
break
|
||||
if(success)
|
||||
src.visible_message("\blue \icon[src] a green light flashes on [src].")
|
||||
updateDialog()
|
||||
//
|
||||
else
|
||||
src.visible_message("\red \icon[src] a red light flashes on [src].")
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -3,7 +3,7 @@
|
||||
/obj/item/projectile/beam/ehf_beam
|
||||
|
||||
/obj/machinery/rust/gyrotron
|
||||
icon = 'gyrotron.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "emitter-off"
|
||||
name = "Gyrotron"
|
||||
anchored = 1
|
||||
@@ -41,7 +41,7 @@
|
||||
new_val = min(new_val,0.01)
|
||||
new_val = max(new_val,0.001)
|
||||
mega_energy = new_val
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["modifyrate"] )
|
||||
@@ -52,7 +52,7 @@
|
||||
new_val = min(new_val,1)
|
||||
new_val = max(new_val,10)
|
||||
rate = new_val
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["modifyfreq"] )
|
||||
@@ -63,29 +63,29 @@
|
||||
new_val = min(new_val,1)
|
||||
new_val = max(new_val,50000)
|
||||
frequency = new_val
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["activate"] )
|
||||
emitting = 1
|
||||
spawn(rate)
|
||||
Emit()
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["deactivate"] )
|
||||
emitting = 0
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["enableremote"] )
|
||||
remoteenabled = 1
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
if( href_list["disableremote"] )
|
||||
remoteenabled = 0
|
||||
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
|
||||
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
|
||||
comp.updateDialog()
|
||||
return
|
||||
/*
|
||||
|
||||
|
Before Width: | Height: | Size: 6.0 KiB |
@@ -1,7 +1,8 @@
|
||||
|
||||
/obj/machinery/computer/rust/gyrotron_controller
|
||||
/obj/machinery/computer/rust_gyrotron_controller
|
||||
name = "Gyrotron Remote Controller"
|
||||
icon_state = "power"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "engine"
|
||||
var/updating = 1
|
||||
|
||||
New()
|
||||
|
||||
@@ -67,4 +67,8 @@
|
||||
//particle.invisibility = 2
|
||||
//
|
||||
return particle
|
||||
*/
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/rust_radiation_monitor
|
||||
name = "Radiation Monitor"
|
||||
icon_state = "power"
|
||||
|
||||
|
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 492 B |
@@ -1,49 +1,53 @@
|
||||
|
||||
//gimmicky hack to collect particles and direct them into the field
|
||||
//byond multitiles are basically... shit
|
||||
/obj/machinery/rust/particle_catcher
|
||||
invisibility = 101
|
||||
/obj/effect/rust_particle_catcher
|
||||
icon = 'effects.dmi'
|
||||
icon_state = "energynet"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/obj/machinery/rust/em_field/parent
|
||||
layer = 4
|
||||
var/obj/effect/rust_em_field/parent
|
||||
var/mysize = 0
|
||||
|
||||
/*New()
|
||||
for(var/obj/machinery/rust/em_field/field in range(6))
|
||||
parent = field
|
||||
if(!parent)
|
||||
del(src)*/
|
||||
invisibility = 101
|
||||
|
||||
proc/SetSize(var/newsize)
|
||||
name = "collector [newsize]"
|
||||
mysize = newsize
|
||||
UpdateSize()
|
||||
/*/obj/effect/rust_particle_catcher/New()
|
||||
for(var/obj/machinery/rust/em_field/field in range(6))
|
||||
parent = field
|
||||
if(!parent)
|
||||
del(src)*/
|
||||
|
||||
proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(parent && parent.size >= mysize)
|
||||
parent.AddParticles(name, quantity)
|
||||
return 1
|
||||
return 0
|
||||
/obj/effect/rust_particle_catcher/process()
|
||||
if(!parent)
|
||||
del(src)
|
||||
|
||||
proc/UpdateSize()
|
||||
if(parent.size >= mysize)
|
||||
density = 1
|
||||
//invisibility = 101
|
||||
name = "collector [mysize] ON"
|
||||
else
|
||||
density = 0
|
||||
name = "collector [mysize] OFF"
|
||||
//invisibility = 101
|
||||
/obj/effect/rust_particle_catcher/proc/SetSize(var/newsize)
|
||||
name = "collector [newsize]"
|
||||
mysize = newsize
|
||||
UpdateSize()
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && parent)
|
||||
var/obj/item/projectile/beam/laserbeam = Proj
|
||||
parent.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
|
||||
return 0
|
||||
/obj/effect/rust_particle_catcher/proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(parent && parent.size >= mysize)
|
||||
parent.AddParticles(name, quantity)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
process()
|
||||
..()
|
||||
if(!parent)
|
||||
del(src)
|
||||
/obj/effect/rust_particle_catcher/proc/UpdateSize()
|
||||
if(parent.size >= mysize)
|
||||
density = 1
|
||||
invisibility = 0
|
||||
name = "collector [mysize] ON"
|
||||
else
|
||||
density = 0
|
||||
invisibility = 101
|
||||
name = "collector [mysize] OFF"
|
||||
|
||||
/obj/effect/rust_particle_catcher/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && parent)
|
||||
parent.AddEnergy(Proj.damage, 0, 1)
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
/obj/effect/rust_particle_catcher/Bumped(atom/AM)
|
||||
if(ismob(AM) && density && prob(10))
|
||||
AM << "\red A powerful force pushes you back."
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
////////////////////////////////////////
|
||||
// External Shield Generator
|
||||
|
||||
/obj/item/weapon/circuitboard/shield_gen_ex
|
||||
name = "Circuit board (Experimental hull shield generator)"
|
||||
board_type = "machine"
|
||||
build_path = "/obj/machinery/shield_gen/external"
|
||||
origin_tech = "bluespace=4;plasmatech=3"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/transmitter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_gen_ex
|
||||
name = "Circuit Design (Experimental hull shield generator)"
|
||||
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
|
||||
id = "shield_gen"
|
||||
req_tech = list("bluespace" = 4, "plasmatech" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000)
|
||||
build_path = "/obj/machinery/shield_gen/external"
|
||||
|
||||
////////////////////////////////////////
|
||||
// Shield Generator
|
||||
|
||||
/obj/item/weapon/circuitboard/shield_gen
|
||||
name = "Circuit board (Experimental shield generator)"
|
||||
board_type = "machine"
|
||||
build_path = "/obj/machinery/shield_gen/external"
|
||||
origin_tech = "bluespace=4;plasmatech=3"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/transmitter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_gen
|
||||
name = "Circuit Design (Experimental shield generator)"
|
||||
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
|
||||
id = "shield_gen"
|
||||
req_tech = list("bluespace" = 4, "plasmatech" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000)
|
||||
build_path = "/obj/machinery/shield_gen/external"
|
||||
|
||||
////////////////////////////////////////
|
||||
// Shield Capacitor
|
||||
|
||||
/obj/item/weapon/circuitboard/shield_cap
|
||||
name = "Circuit board (Experimental shield capacitor)"
|
||||
board_type = "machine"
|
||||
build_path = "/obj/machinery/shield_capacitor"
|
||||
origin_tech = "magnets=3;powerstorage=4"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Filter, 5 Pieces of cable, 1 Subspace Treatment disk, 1 Subspace Analyzer and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_cap
|
||||
name = "Circuit Design (Experimental shield capacitor)"
|
||||
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
|
||||
id = "shield_cap"
|
||||
req_tech = list("magnets" = 3, "powerstorage" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$silver" = 10000)
|
||||
build_path = "/obj/machinery/shield_gen/external"
|
||||
@@ -1,52 +1,55 @@
|
||||
|
||||
//---------- actual energy field
|
||||
|
||||
/obj/effect/energy_field
|
||||
name = "energy field"
|
||||
desc = "Impenetrable field of energy, capable of blocking anything as long as it's active."
|
||||
icon = 'shielding.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
anchored = 1
|
||||
layer = 2.1
|
||||
density = 0
|
||||
invisibility = 2
|
||||
var/strength = 0
|
||||
var/obj/machinery/shield_gen/parent
|
||||
var/stress = 0
|
||||
|
||||
/obj/effect/energy_field/ex_act(var/severity)
|
||||
Stress(0.5 + severity)
|
||||
|
||||
/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj)
|
||||
Stress(1 + 1 * (Proj.damage / 100))
|
||||
|
||||
|
||||
/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj)
|
||||
if(M)
|
||||
walk(M,0)
|
||||
|
||||
/obj/effect/energy_field/proc/Stress(var/severity)
|
||||
strength -= severity
|
||||
stress += severity
|
||||
|
||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
||||
if(strength < 1)
|
||||
invisibility = 2
|
||||
density = 0
|
||||
|
||||
/obj/effect/energy_field/proc/Strengthen(var/severity)
|
||||
strength += severity
|
||||
|
||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
||||
if(strength > 1)
|
||||
invisibility = 0
|
||||
density = 1
|
||||
|
||||
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||
//Called by: Movement, airflow.
|
||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
||||
//Outputs: Boolean if can pass.
|
||||
|
||||
//return (!density || !height || air_group)
|
||||
return density
|
||||
|
||||
//---------- actual energy field
|
||||
|
||||
/obj/effect/energy_field
|
||||
name = "energy field"
|
||||
desc = "Impenetrable field of energy, capable of blocking anything as long as it's active."
|
||||
icon = 'shielding.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
anchored = 1
|
||||
layer = 2.1
|
||||
density = 0
|
||||
invisibility = 101
|
||||
var/strength = 0
|
||||
|
||||
/obj/effect/energy_field/ex_act(var/severity)
|
||||
Stress(0.5 + severity)
|
||||
|
||||
/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj)
|
||||
Stress(Proj.damage / 10)
|
||||
|
||||
/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj)
|
||||
if(M)
|
||||
walk(M,0)
|
||||
Stress(2)
|
||||
|
||||
/obj/effect/energy_field/proc/Stress(var/severity)
|
||||
strength -= severity
|
||||
|
||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
||||
if(strength < 1)
|
||||
invisibility = 101
|
||||
density = 0
|
||||
else if(strength >= 1)
|
||||
invisibility = 0
|
||||
density = 1
|
||||
|
||||
/obj/effect/energy_field/proc/Strengthen(var/severity)
|
||||
strength += severity
|
||||
|
||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
||||
if(strength >= 1)
|
||||
invisibility = 0
|
||||
density = 1
|
||||
else if(strength < 1)
|
||||
invisibility = 101
|
||||
density = 0
|
||||
|
||||
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||
//Called by: Movement, airflow.
|
||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
||||
//Outputs: Boolean if can pass.
|
||||
|
||||
//return (!density || !height || air_group)
|
||||
return !density
|
||||
@@ -1,158 +1,171 @@
|
||||
|
||||
//---------- shield capacitor
|
||||
//pulls energy out of a power net and charges an adjacent generator
|
||||
|
||||
/obj/machinery/shield_capacitor
|
||||
name = "shield capacitor"
|
||||
desc = "Machine that charges a shield generator."
|
||||
icon = 'shielding.dmi'
|
||||
icon_state = "capacitor"
|
||||
var/active = 1
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/machinery/shield_gen/target_generator
|
||||
var/stored_charge = 0
|
||||
var/time_since_fail = 100
|
||||
var/max_charge = 1000000
|
||||
var/max_charge_rate = 100000
|
||||
var/min_charge_rate = 0
|
||||
var/locked = 0
|
||||
//
|
||||
use_power = 1 //0 use nothing
|
||||
//1 use idle power
|
||||
//2 use active power
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
var/charge_rate = 100
|
||||
|
||||
/obj/machinery/shield_capacitor/New()
|
||||
spawn(10)
|
||||
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
|
||||
if(get_dir(src, possible_gen) == src.dir)
|
||||
target_generator = possible_gen
|
||||
possible_gen.owned_capacitor = src
|
||||
break
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_capacitor/verb/rotate()
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored || usr:stat)
|
||||
usr << "It is fastened to the floor!"
|
||||
return 0
|
||||
src.dir = turn(src.dir, 270)
|
||||
target_generator = locate() in get_step(src,dir)
|
||||
if(target_generator && !target_generator.owned_capacitor)
|
||||
target_generator.owned_capacitor = src
|
||||
return 1
|
||||
|
||||
/obj/machinery/shield_capacitor/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broke"
|
||||
else
|
||||
if( powered() )
|
||||
if (src.active)
|
||||
icon_state = "capacitor"
|
||||
else
|
||||
icon_state = "capacitor"
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "capacitor"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/shield_capacitor/process()
|
||||
//
|
||||
if(active)
|
||||
use_power = 2
|
||||
if(stored_charge + charge_rate > max_charge)
|
||||
active_power_usage = max_charge - stored_charge
|
||||
else
|
||||
active_power_usage = charge_rate
|
||||
stored_charge += active_power_usage
|
||||
else
|
||||
use_power = 1
|
||||
|
||||
time_since_fail++
|
||||
if(stored_charge < active_power_usage * 1.5)
|
||||
time_since_fail = 0
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
|
||||
/*if(istype(W, /obj/item/weapon/wrench))
|
||||
if(active)
|
||||
user << "Turn off the field generator first."
|
||||
return
|
||||
|
||||
else if(state == 0)
|
||||
state = 1
|
||||
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||
user << "You secure the external reinforcing bolts to the floor."
|
||||
src.anchored = 1
|
||||
return
|
||||
|
||||
else if(state == 1)
|
||||
state = 0
|
||||
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||
user << "You undo the external reinforcing bolts."
|
||||
src.anchored = 0
|
||||
return*/
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
src.anchored = !src.anchored
|
||||
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
|
||||
|
||||
else
|
||||
src.add_fingerprint(user)
|
||||
user << "\red You hit the [src.name] with your [W.name]!"
|
||||
for(var/mob/M in viewers(src))
|
||||
if(M == user) continue
|
||||
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
|
||||
|
||||
/obj/machinery/shield_capacitor/Topic(href, href_list[])
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=shield_capacitor")
|
||||
usr.machine = null
|
||||
return
|
||||
if( href_list["toggle"] )
|
||||
active = !active
|
||||
if(active)
|
||||
use_power = 2
|
||||
else
|
||||
use_power = 1
|
||||
if( href_list["charge_rate"] )
|
||||
charge_rate += text2num(href_list["charge_rate"])
|
||||
if(charge_rate > max_charge_rate)
|
||||
charge_rate = max_charge_rate
|
||||
else if(charge_rate < min_charge_rate)
|
||||
charge_rate = min_charge_rate
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_capacitor/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=shield_capacitor")
|
||||
return
|
||||
var/t = "<B>Shield Capacitor Control Console</B><BR>"
|
||||
t += "[target_generator ? "<font color=green>Shield generator connected.</font>" : "<font color=red>Unable to locate shield generator!</font>"]<br>"
|
||||
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
||||
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
|
||||
t += "Capacitor charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
|
||||
t += "Capacitor charge rate (approx): <a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> <a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> <a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec <a href='?src=\ref[src];charge_rate=100'>\[+\]</a> <a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> <a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=shield_capacitor;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
//---------- shield capacitor
|
||||
//pulls energy out of a power net and charges an adjacent generator
|
||||
|
||||
/obj/machinery/shield_capacitor
|
||||
name = "shield capacitor"
|
||||
desc = "Machine that charges a shield generator."
|
||||
icon = 'shielding.dmi'
|
||||
icon_state = "capacitor"
|
||||
var/active = 1
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/stored_charge = 0
|
||||
var/time_since_fail = 100
|
||||
var/max_charge = 1000000
|
||||
var/max_charge_rate = 100000
|
||||
var/min_charge_rate = 0
|
||||
var/locked = 0
|
||||
//
|
||||
use_power = 1 //0 use nothing
|
||||
//1 use idle power
|
||||
//2 use active power
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
var/charge_rate = 100
|
||||
|
||||
/obj/machinery/shield_capacitor/New()
|
||||
spawn(10)
|
||||
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
|
||||
if(get_dir(src, possible_gen) == src.dir)
|
||||
possible_gen.owned_capacitor = src
|
||||
break
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
updateDialog()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(prob(75))
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
updateDialog()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
src.anchored = !src.anchored
|
||||
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
|
||||
|
||||
spawn(0)
|
||||
for(var/obj/machinery/shield_gen/gen in range(1, src))
|
||||
if(get_dir(src, gen) == src.dir)
|
||||
if(!src.anchored && gen.owned_capacitor == src)
|
||||
gen.owned_capacitor = null
|
||||
break
|
||||
else if(src.anchored && !gen.owned_capacitor)
|
||||
gen.owned_capacitor = src
|
||||
break
|
||||
gen.updateDialog()
|
||||
updateDialog()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/attack_hand(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/shield_capacitor/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=shield_capacitor")
|
||||
return
|
||||
var/t = "<B>Shield Capacitor Control Console</B><br><br>"
|
||||
if(locked)
|
||||
t += "<i>Swipe your ID card to begin.</i>"
|
||||
else
|
||||
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
||||
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
|
||||
t += "Charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
|
||||
t += "Charge rate: \
|
||||
<a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> \
|
||||
<a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> \
|
||||
<a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec \
|
||||
<a href='?src=\ref[src];charge_rate=100'>\[+\]</a> \
|
||||
<a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> \
|
||||
<a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
|
||||
user << browse(t, "window=shield_capacitor;size=500x800")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/shield_capacitor/process()
|
||||
//
|
||||
if(active)
|
||||
use_power = 2
|
||||
if(stored_charge + charge_rate > max_charge)
|
||||
active_power_usage = max_charge - stored_charge
|
||||
else
|
||||
active_power_usage = charge_rate
|
||||
stored_charge += active_power_usage
|
||||
else
|
||||
use_power = 1
|
||||
|
||||
time_since_fail++
|
||||
if(stored_charge < active_power_usage * 1.5)
|
||||
time_since_fail = 0
|
||||
|
||||
/obj/machinery/shield_capacitor/Topic(href, href_list[])
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=shield_capacitor")
|
||||
usr.unset_machine()
|
||||
return
|
||||
if( href_list["toggle"] )
|
||||
active = !active
|
||||
if(active)
|
||||
use_power = 2
|
||||
else
|
||||
use_power = 1
|
||||
if( href_list["charge_rate"] )
|
||||
charge_rate += text2num(href_list["charge_rate"])
|
||||
if(charge_rate > max_charge_rate)
|
||||
charge_rate = max_charge_rate
|
||||
else if(charge_rate < min_charge_rate)
|
||||
charge_rate = min_charge_rate
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_capacitor/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broke"
|
||||
else
|
||||
if( powered() )
|
||||
if (src.active)
|
||||
icon_state = "capacitor"
|
||||
else
|
||||
icon_state = "capacitor"
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "capacitor"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/shield_capacitor/verb/rotate()
|
||||
set name = "Rotate capacitor clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor!"
|
||||
return
|
||||
src.dir = turn(src.dir, 270)
|
||||
return
|
||||
@@ -25,7 +25,6 @@
|
||||
var/max_field_strength = 10
|
||||
var/time_since_fail = 100
|
||||
var/energy_conversion_rate = 0.01 //how many renwicks per watt?
|
||||
var/flicker_shield_glitch = 1 //shield is slightly faulty and flickers - don't think this is working as intended
|
||||
//
|
||||
use_power = 1 //0 use nothing
|
||||
//1 use idle power
|
||||
@@ -38,14 +37,191 @@
|
||||
for(var/obj/machinery/shield_capacitor/possible_cap in range(1, src))
|
||||
if(get_dir(possible_cap, src) == possible_cap.dir)
|
||||
owned_capacitor = possible_cap
|
||||
possible_cap.target_generator = src
|
||||
break
|
||||
field = new/list()
|
||||
..()
|
||||
|
||||
//copied from a copypaste. DRY, right?
|
||||
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
updateDialog()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(prob(75))
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
updateDialog()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
src.anchored = !src.anchored
|
||||
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
|
||||
|
||||
spawn(0)
|
||||
for(var/obj/machinery/shield_gen/gen in range(1, src))
|
||||
if(get_dir(src, gen) == src.dir)
|
||||
if(!src.anchored && gen.owned_capacitor == src)
|
||||
gen.owned_capacitor = null
|
||||
break
|
||||
else if(src.anchored && !gen.owned_capacitor)
|
||||
gen.owned_capacitor = src
|
||||
break
|
||||
gen.updateDialog()
|
||||
updateDialog()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_gen/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_gen/attack_hand(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/shield_gen/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=shield_generator")
|
||||
return
|
||||
var/t = "<B>Shield Generator Control Console</B><BR><br>"
|
||||
if(locked)
|
||||
t += "<i>Swipe your ID card to begin.</i>"
|
||||
else
|
||||
t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
|
||||
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
||||
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
|
||||
t += "Coverage radius (restart required): \
|
||||
<a href='?src=\ref[src];change_radius=-5'>--</a> \
|
||||
<a href='?src=\ref[src];change_radius=-1'>-</a> \
|
||||
[field_radius * 2]m \
|
||||
<a href='?src=\ref[src];change_radius=1'>+</a> \
|
||||
<a href='?src=\ref[src];change_radius=5'>++</a><br>"
|
||||
t += "Overall field strength: [average_field_strength] Renwicks ([max_field_strength ? 100 * average_field_strength / max_field_strength : "NA"]%)<br>"
|
||||
t += "Charge rate: <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> \
|
||||
<a href='?src=\ref[src];strengthen_rate=-0.01'>-</a> \
|
||||
[strengthen_rate] Renwicks/sec \
|
||||
<a href='?src=\ref[src];strengthen_rate=0.01'>+</a> \
|
||||
<a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
|
||||
t += "Upkeep energy: [field.len * average_field_strength / energy_conversion_rate] Watts/sec<br>"
|
||||
t += "Additional energy required to charge: [field.len * strengthen_rate / energy_conversion_rate] Watts/sec<br>"
|
||||
t += "Maximum field strength: \
|
||||
<a href='?src=\ref[src];max_field_strength=-100'>\[min\]</a> \
|
||||
<a href='?src=\ref[src];max_field_strength=-10'>--</a> \
|
||||
<a href='?src=\ref[src];max_field_strength=-1'>-</a> \
|
||||
[max_field_strength] Renwicks \
|
||||
<a href='?src=\ref[src];max_field_strength=1'>+</a> \
|
||||
<a href='?src=\ref[src];max_field_strength=10'>++</a> \
|
||||
<a href='?src=\ref[src];max_field_strength=100'>\[max\]</a><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src]'>Refresh</A> "
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=shield_generator;size=500x800")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/shield_gen/process()
|
||||
|
||||
if(active && field.len)
|
||||
var/stored_renwicks = 0
|
||||
var/target_field_strength = min(strengthen_rate + max(average_field_strength, 0), max_field_strength)
|
||||
if(owned_capacitor)
|
||||
var/required_energy = field.len * target_field_strength / energy_conversion_rate
|
||||
var/assumed_charge = min(owned_capacitor.stored_charge, required_energy)
|
||||
stored_renwicks = assumed_charge * energy_conversion_rate
|
||||
owned_capacitor.stored_charge -= assumed_charge
|
||||
|
||||
time_since_fail++
|
||||
|
||||
average_field_strength = 0
|
||||
target_field_strength = stored_renwicks / field.len
|
||||
|
||||
for(var/obj/effect/energy_field/E in field)
|
||||
if(stored_renwicks)
|
||||
var/strength_change = target_field_strength - E.strength
|
||||
if(strength_change > stored_renwicks)
|
||||
strength_change = stored_renwicks
|
||||
if(E.strength >= 1)
|
||||
E.Strengthen(strength_change)
|
||||
else if(E.strength < 0)
|
||||
E.strength = 0
|
||||
E.Strengthen(0.1)
|
||||
|
||||
stored_renwicks -= strength_change
|
||||
|
||||
average_field_strength += E.strength
|
||||
else
|
||||
E.Strengthen(-E.strength)
|
||||
|
||||
average_field_strength /= field.len
|
||||
if(average_field_strength < 0)
|
||||
time_since_fail = 0
|
||||
else
|
||||
average_field_strength = 0
|
||||
|
||||
/obj/machinery/shield_gen/Topic(href, href_list[])
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=shield_generator")
|
||||
usr.unset_machine()
|
||||
return
|
||||
else if( href_list["toggle"] )
|
||||
toggle()
|
||||
else if( href_list["change_radius"] )
|
||||
field_radius += text2num(href_list["change_radius"])
|
||||
if(field_radius > 200)
|
||||
field_radius = 200
|
||||
else if(field_radius < 0)
|
||||
field_radius = 0
|
||||
else if( href_list["strengthen_rate"] )
|
||||
strengthen_rate += text2num(href_list["strengthen_rate"])
|
||||
if(strengthen_rate > 1)
|
||||
strengthen_rate = 1
|
||||
else if(strengthen_rate < 0)
|
||||
strengthen_rate = 0
|
||||
else if( href_list["max_field_strength"] )
|
||||
max_field_strength += text2num(href_list["max_field_strength"])
|
||||
if(max_field_strength > 1000)
|
||||
max_field_strength = 1000
|
||||
else if(max_field_strength < 0)
|
||||
max_field_strength = 0
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broke"
|
||||
else
|
||||
if( powered() )
|
||||
if (src.active)
|
||||
icon_state = "generator1"
|
||||
else
|
||||
icon_state = "generator0"
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "generator0"
|
||||
stat |= NOPOWER
|
||||
if (src.active)
|
||||
toggle()
|
||||
|
||||
/obj/machinery/shield_gen/ex_act(var/severity)
|
||||
|
||||
if(active)
|
||||
toggle()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
/obj/machinery/shield_gen/proc/check_powered()
|
||||
/*
|
||||
check_powered = 1
|
||||
if(!anchored)
|
||||
powered = 0
|
||||
@@ -76,122 +252,14 @@
|
||||
PN.newload += shieldload //uses powernet power.
|
||||
*/
|
||||
|
||||
/obj/machinery/shield_gen/process()
|
||||
|
||||
if(active && field.len)
|
||||
var/stored_renwicks = 0
|
||||
var/target_field_strength = min(average_field_strength + strengthen_rate, max_field_strength)
|
||||
if(owned_capacitor)
|
||||
var/assumed_charge = min(owned_capacitor.stored_charge, (target_field_strength / energy_conversion_rate) * field.len)
|
||||
stored_renwicks = assumed_charge * energy_conversion_rate
|
||||
owned_capacitor.stored_charge -= assumed_charge
|
||||
|
||||
time_since_fail++
|
||||
|
||||
average_field_strength = 0
|
||||
target_field_strength = stored_renwicks / field.len
|
||||
|
||||
if(!flicker_shield_glitch)
|
||||
for(var/obj/effect/energy_field/E in field)
|
||||
//check to see if the shield is strengthening or failing
|
||||
if(E.strength > target_field_strength)
|
||||
E.strength = target_field_strength
|
||||
else if(E.strength + strengthen_rate > target_field_strength)
|
||||
E.strength = target_field_strength
|
||||
else
|
||||
E.strength += strengthen_rate
|
||||
|
||||
if(stored_renwicks - E.strength < 0)
|
||||
E.strength = stored_renwicks
|
||||
stored_renwicks -= E.strength
|
||||
|
||||
average_field_strength += E.strength
|
||||
//check if the current shield tile has enough energy to maintain itself
|
||||
if(E.strength >= 1)
|
||||
E.density = 1
|
||||
E.invisibility = 0
|
||||
else
|
||||
E.density = 0
|
||||
E.invisibility = 2
|
||||
else
|
||||
//the flicker shield glitch is an intersting quirk in 'older' and/or faulty shielding models
|
||||
//basically, it strengthens the shields continuously until it can no longer sustain them... then it drops out for a few seconds and starts again
|
||||
//this makes the shield 'flicker' every now and then until it stabilises
|
||||
//when this glitch is fixed, shields will only be charged as much as is sustainable
|
||||
for(var/obj/effect/energy_field/E in field)
|
||||
//check to see if the shield is strengthening or failing
|
||||
if(E.strength < target_field_strength)
|
||||
E.strength += strengthen_rate
|
||||
|
||||
if(stored_renwicks - E.strength < 0)
|
||||
E.strength = stored_renwicks
|
||||
stored_renwicks -= E.strength
|
||||
|
||||
average_field_strength += E.strength
|
||||
//check if the current shield tile has enough energy to maintain itself
|
||||
if(E.strength >= 1)
|
||||
E.density = 1
|
||||
E.invisibility = 0
|
||||
else
|
||||
E.density = 0
|
||||
E.invisibility = 2
|
||||
|
||||
//add any leftover charge back to the capacitor
|
||||
if(owned_capacitor && stored_renwicks >= 0)
|
||||
owned_capacitor.stored_charge += stored_renwicks / energy_conversion_rate
|
||||
|
||||
average_field_strength /= field.len
|
||||
if(average_field_strength < 0)
|
||||
time_since_fail = 0
|
||||
else
|
||||
average_field_strength = 0
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
src.anchored = !src.anchored
|
||||
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
|
||||
|
||||
else
|
||||
src.add_fingerprint(user)
|
||||
user << "\red You hit the [src.name] with your [W.name]!"
|
||||
for(var/mob/M in viewers(src))
|
||||
if(M == user) continue
|
||||
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
|
||||
|
||||
/obj/machinery/shield_gen/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broke"
|
||||
else
|
||||
if( powered() )
|
||||
if (src.active)
|
||||
icon_state = "generator1"
|
||||
else
|
||||
icon_state = "generator0"
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "generator0"
|
||||
stat |= NOPOWER
|
||||
if (src.active)
|
||||
toggle()
|
||||
|
||||
/obj/machinery/shield_gen/proc/toggle()
|
||||
active = !active
|
||||
power_change()
|
||||
if(active)
|
||||
var/list/covered_turfs = get_shielded_turfs()
|
||||
if(get_turf(src) in covered_turfs)
|
||||
covered_turfs.Remove(get_turf(src))
|
||||
var/turf/T = get_turf(src)
|
||||
if(T in covered_turfs)
|
||||
covered_turfs.Remove(T)
|
||||
for(var/turf/O in covered_turfs)
|
||||
var/obj/effect/energy_field/E = new(O)
|
||||
field.Add(E)
|
||||
@@ -207,60 +275,10 @@
|
||||
for(var/mob/M in view(5,src))
|
||||
M << "\icon[src] You hear heavy droning fade out."
|
||||
|
||||
/obj/machinery/shield_gen/Topic(href, href_list[])
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=shield_generator")
|
||||
usr.machine = null
|
||||
return
|
||||
else if( href_list["toggle"] )
|
||||
toggle()
|
||||
else if( href_list["change_radius"] )
|
||||
field_radius += text2num(href_list["change_radius"])
|
||||
if(field_radius > 200)
|
||||
field_radius = 200
|
||||
else if(field_radius < 0)
|
||||
field_radius = 0
|
||||
else if( href_list["strengthen_rate"] )
|
||||
strengthen_rate += text2num(href_list["strengthen_rate"])
|
||||
if(strengthen_rate > 0.2)
|
||||
strengthen_rate = 0.2
|
||||
else if(strengthen_rate < 0)
|
||||
strengthen_rate = 0
|
||||
else if( href_list["max_field_strength"] )
|
||||
max_field_strength += text2num(href_list["max_field_strength"])
|
||||
if(max_field_strength > 1000)
|
||||
max_field_strength = 1000
|
||||
else if(max_field_strength < 0)
|
||||
max_field_strength = 0
|
||||
//
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/shield_gen/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=shield_generator")
|
||||
return
|
||||
var/t = "<B>Shield Generator Control Console</B><BR>"
|
||||
t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
|
||||
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
|
||||
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
|
||||
t += "Coverage radius (generator will need a restart to take effect): <a href='?src=\ref[src];change_radius=-5'>--</a> <a href='?src=\ref[src];change_radius=-1'>-</a> [field_radius * 2]m <a href='?src=\ref[src];change_radius=1'>+</a> <a href='?src=\ref[src];change_radius=5'>++</a><br>"
|
||||
t += "Overall field strength: [average_field_strength] Renwicks ([100 * average_field_strength / max_field_strength]%)<br>"
|
||||
t += "Charge consumption: [( (min(average_field_strength + strengthen_rate, max_field_strength)) / energy_conversion_rate) * field.len] Watts/sec<br>"
|
||||
t += "Field charge rate (approx): <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> <a href='?src=\ref[src];strengthen_rate=-0.01'>-</a>[strengthen_rate] Renwicks/sec <a href='?src=\ref[src];strengthen_rate=0.01'>+</a> <a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
|
||||
t += "Maximum field strength (avg across field): <a href='?src=\ref[src];max_field_strength=-100'>\[min\]</a> <a href='?src=\ref[src];max_field_strength=-10'>--</a> <a href='?src=\ref[src];max_field_strength=-1'>-</a>[max_field_strength] Renwicks <a href='?src=\ref[src];max_field_strength=1'>+</a> <a href='?src=\ref[src];max_field_strength=10'>++</a> <a href='?src=\ref[src];max_field_strength=100'>\[max\]</a><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=shield_generator;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
//grab the border tiles in a circle around this machine
|
||||
/obj/machinery/shield_gen/proc/get_shielded_turfs()
|
||||
return list()
|
||||
|
||||
/obj/machinery/shield_gen/ex_act(var/severity)
|
||||
|
||||
if(active)
|
||||
toggle()
|
||||
return ..()
|
||||
var/list/out = list()
|
||||
for(var/turf/T in range(field_radius, src))
|
||||
if(get_dist(src,T) == field_radius)
|
||||
out.Add(T)
|
||||
return out
|
||||
@@ -1,36 +1,42 @@
|
||||
|
||||
//---------- external shield generator
|
||||
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
|
||||
|
||||
/obj/machinery/shield_gen/external/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/external/get_shielded_turfs()
|
||||
var
|
||||
list
|
||||
open = list(get_turf(src))
|
||||
closed = list()
|
||||
|
||||
while(open.len)
|
||||
for(var/turf/T in open)
|
||||
for(var/turf/O in orange(1, T))
|
||||
if(get_dist(O,src) > field_radius)
|
||||
continue
|
||||
var/add_this_turf = 0
|
||||
if(istype(O,/turf/space))
|
||||
for(var/turf/simulated/G in orange(1, O))
|
||||
add_this_turf = 1
|
||||
break
|
||||
for(var/obj/structure/S in orange(1, O))
|
||||
add_this_turf = 1
|
||||
break
|
||||
for(var/obj/structure/S in O)
|
||||
add_this_turf = 0
|
||||
break
|
||||
|
||||
if(add_this_turf && !(O in open) && !(O in closed))
|
||||
open += O
|
||||
open -= T
|
||||
closed += T
|
||||
|
||||
return closed
|
||||
|
||||
//---------- external shield generator
|
||||
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
|
||||
|
||||
/obj/machinery/shield_gen/external/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/external/get_shielded_turfs()
|
||||
var
|
||||
list
|
||||
open = list(get_turf(src))
|
||||
closed = list()
|
||||
|
||||
while(open.len)
|
||||
for(var/turf/T in open)
|
||||
for(var/turf/O in orange(1, T))
|
||||
if(get_dist(O,src) > field_radius)
|
||||
continue
|
||||
var/add_this_turf = 0
|
||||
if(istype(O,/turf/space))
|
||||
for(var/turf/simulated/G in orange(1, O))
|
||||
add_this_turf = 1
|
||||
break
|
||||
|
||||
//uncomment this for structures (but not lattices) to be surrounded by shield as well
|
||||
/*if(!add_this_turf)
|
||||
for(var/obj/structure/S in orange(1, O))
|
||||
if(!istype(S, /obj/structure/lattice))
|
||||
add_this_turf = 1
|
||||
break
|
||||
if(add_this_turf)
|
||||
for(var/obj/structure/S in O)
|
||||
if(!istype(S, /obj/structure/lattice))
|
||||
add_this_turf = 0
|
||||
break*/
|
||||
|
||||
if(add_this_turf && !(O in open) && !(O in closed))
|
||||
open += O
|
||||
open -= T
|
||||
closed += T
|
||||
|
||||
return closed
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -24,27 +24,32 @@
|
||||
side_effects += M
|
||||
|
||||
/mob/living/carbon/human/proc/handle_medical_side_effects()
|
||||
if(src.reagents.has_reagent("bicaridine") || src.reagents.has_reagent("tricordrazine") || src.reagents.has_reagent("cryoxadone"))
|
||||
if(src.reagents.has_reagent("cryoxadone") || src.reagents.get_reagent_amount("bicaridine") >= 15 || src.reagents.get_reagent_amount("tricordrazine") >= 15)
|
||||
src.add_side_effect("Headache")
|
||||
|
||||
|
||||
if(src.reagents.has_reagent("kelotane") || src.reagents.has_reagent("dermaline"))
|
||||
if(src.reagents.get_reagent_amount("kelotane") >= 30 || src.reagents.get_reagent_amount("dermaline") >= 15)
|
||||
src.add_side_effect("Bad Stomach")
|
||||
|
||||
if(src.reagents.get_reagent_amount("tramadol") >= 16 || src.reagents.get_reagent_amount("anti_toxin") >= 30)
|
||||
src.add_side_effect("Cramps")
|
||||
|
||||
if(src.reagents.get_reagent_amount("space_drugs") >= 10)
|
||||
src.add_side_effect("Itch")
|
||||
|
||||
// One full cycle(in terms of strength) every 10 minutes
|
||||
var/strength_percent = sin(life_tick / 2)
|
||||
|
||||
// Only do anything if the effect is currently strong enough
|
||||
if(strength_percent >= 0.4)
|
||||
for (var/datum/medical_effect/M in side_effects)
|
||||
if (M.cure(src))
|
||||
if (M.cure(src) || M.strength > 60)
|
||||
side_effects -= M
|
||||
del(M)
|
||||
else
|
||||
if(life_tick % 15 == 0)
|
||||
if(life_tick % 45 == 0)
|
||||
M.on_life(src, strength_percent*M.strength)
|
||||
// Effect slowly growing stronger
|
||||
M.strength+=0.05
|
||||
M.strength+=0.08
|
||||
|
||||
// HEADACHE
|
||||
// ========
|
||||
@@ -55,33 +60,10 @@
|
||||
H.custom_pain("You feel a light pain in your head.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("You feel a throbbing pain in your head!",1)
|
||||
if(31 to 99)
|
||||
if(31 to 50)
|
||||
H.custom_pain("You feel an excrutiating pain in your head!",1)
|
||||
H.adjustBrainLoss(1)
|
||||
if(99 to INFINITY)
|
||||
H.custom_pain("It feels like your head is about to split open!",1)
|
||||
H.adjustBrainLoss(3)
|
||||
var/datum/organ/external/O = H.organs_by_name["head"]
|
||||
O.take_damage(0, 1, 0, "Headache")
|
||||
|
||||
/datum/medical_effect/headache/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("alkysine"))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// HEADACHE
|
||||
// ========
|
||||
/datum/medical_effect/headache/name = "Headache"
|
||||
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("You feel a light pain in your head.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("You feel a throbbing pain in your head!",1)
|
||||
if(31 to 99)
|
||||
H.custom_pain("You feel an excrutiating pain in your head!",1)
|
||||
H.adjustBrainLoss(1)
|
||||
if(99 to INFINITY)
|
||||
if(51 to INFINITY)
|
||||
H.custom_pain("It feels like your head is about to split open!",1)
|
||||
H.adjustBrainLoss(3)
|
||||
var/datum/organ/external/O = H.organs_by_name["head"]
|
||||
@@ -102,10 +84,10 @@
|
||||
H.custom_pain("You feel a bit light around the stomach.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("Your stomach hurts.",0)
|
||||
if(31 to 99)
|
||||
if(31 to 50)
|
||||
H.custom_pain("You feel sick.",1)
|
||||
H.adjustToxLoss(1)
|
||||
if(99 to INFINITY)
|
||||
if(51 to INFINITY)
|
||||
H.custom_pain("You can't hold it in any longer!",1)
|
||||
H.vomit()
|
||||
|
||||
@@ -125,11 +107,11 @@
|
||||
H.custom_pain("The muscles in your body hurt a little.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("The muscles in your body cramp up painfully.",0)
|
||||
if(31 to 99)
|
||||
if(31 to 50)
|
||||
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
|
||||
H.custom_pain("There's pain all over your body.",1)
|
||||
H.adjustToxLoss(1)
|
||||
if(99 to INFINITY)
|
||||
if(51 to INFINITY)
|
||||
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
|
||||
H.custom_pain("It feels as though your muscles are being ripped apart!",1)
|
||||
H.apply_damage(1, used_weapon = "Cramps")
|
||||
@@ -138,4 +120,29 @@
|
||||
if(H.reagents.has_reagent("inaprovaline"))
|
||||
H << "\red The cramps let up.."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// ITCH
|
||||
// ====
|
||||
/datum/medical_effect/itch/name = "Itch"
|
||||
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("You feel a slight itch.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("You want to scratch your itch badly.",0)
|
||||
if(31 to 50)
|
||||
H.emote("me",1,"shivers slightly.")
|
||||
H.custom_pain("This itch makes it really hard to concentrate.",1)
|
||||
H.adjustToxLoss(1)
|
||||
if(51 to INFINITY)
|
||||
H.emote("me",1,"shivers.")
|
||||
H.custom_pain("The itch starts hurting and oozing blood.",1)
|
||||
H.apply_damage(1, BURN, used_weapon = "Itch")
|
||||
H.drip(1)
|
||||
|
||||
/datum/medical_effect/itch/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("inaprovaline"))
|
||||
H << "\red The itching stops.."
|
||||
return 1
|
||||
return 0
|
||||
@@ -40,12 +40,23 @@ log transactions
|
||||
machine_id = "[station_name()] RT #[num_financial_terminals++]"
|
||||
|
||||
/obj/machinery/atm/process()
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(linked_db && ( (linked_db.stat & NOPOWER) || !linked_db.activated ) )
|
||||
linked_db = null
|
||||
authenticated_account = null
|
||||
src.visible_message("\red \icon[src] [src] buzzes rudely, \"Connection to remote database lost.\"")
|
||||
updateDialog()
|
||||
|
||||
if(ticks_left_timeout > 0)
|
||||
ticks_left_timeout--
|
||||
if(ticks_left_timeout <= 0)
|
||||
authenticated_account = null
|
||||
if(ticks_left_locked_down > 0)
|
||||
ticks_left_locked_down--
|
||||
if(ticks_left_locked_down <= 0)
|
||||
number_incorrect_tries = 0
|
||||
|
||||
for(var/obj/item/weapon/spacecash/S in src)
|
||||
S.loc = src.loc
|
||||
@@ -57,7 +68,7 @@ log transactions
|
||||
|
||||
/obj/machinery/atm/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
if(DB.z == src.z)
|
||||
if( DB.z == src.z && !(DB.stat & NOPOWER) && DB.activated )
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -68,7 +79,8 @@ log transactions
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
held_card = idcard
|
||||
authenticated_account = null
|
||||
if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
|
||||
authenticated_account = null
|
||||
else if(authenticated_account)
|
||||
if(istype(I,/obj/item/weapon/spacecash))
|
||||
//consume the money
|
||||
@@ -114,11 +126,11 @@ log transactions
|
||||
switch(view_screen)
|
||||
if(CHANGE_SECURITY_LEVEL)
|
||||
dat += "Select a new security level for this account:<br><hr>"
|
||||
var/text = "Zero - Only account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
|
||||
var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
|
||||
if(authenticated_account.security_level != 0)
|
||||
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
|
||||
dat += "[text]<hr>"
|
||||
text = "One - Both an account number and pin is required to access this account and process transactions."
|
||||
text = "One - An account number and pin must be manually entered to access this account and process transactions."
|
||||
if(authenticated_account.security_level != 1)
|
||||
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
|
||||
dat += "[text]<hr>"
|
||||
@@ -185,7 +197,7 @@ log transactions
|
||||
dat += "<span class='warning'>Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support.</span>"
|
||||
reconnect_database()
|
||||
|
||||
user << browse(dat,"window=atm;size=500x650")
|
||||
user << browse(dat,"window=atm;size=550x650")
|
||||
else
|
||||
user << browse(null,"window=atm")
|
||||
|
||||
@@ -223,7 +235,7 @@ log transactions
|
||||
var/new_sec_level = max( min(text2num(href_list["new_security_level"]), 2), 0)
|
||||
authenticated_account.security_level = new_sec_level
|
||||
if("attempt_auth")
|
||||
if(linked_db)
|
||||
if(linked_db && !ticks_left_locked_down)
|
||||
var/tried_account_num = text2num(href_list["account_num"])
|
||||
if(!tried_account_num)
|
||||
tried_account_num = held_card.associated_account_number
|
||||
@@ -231,11 +243,11 @@ log transactions
|
||||
|
||||
authenticated_account = linked_db.attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
|
||||
if(!authenticated_account)
|
||||
number_incorrect_tries++
|
||||
if(previous_account_number == tried_account_num)
|
||||
if(++number_incorrect_tries > max_pin_attempts)
|
||||
if(number_incorrect_tries > max_pin_attempts)
|
||||
//lock down the atm
|
||||
number_incorrect_tries = 0
|
||||
ticks_left_locked_down = 10
|
||||
ticks_left_locked_down = 30
|
||||
playsound(src, 'buzz-two.ogg', 50, 1)
|
||||
|
||||
//create an entry in the account transaction log
|
||||
@@ -247,9 +259,12 @@ log transactions
|
||||
T.time = worldtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\red \icon[src] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining."
|
||||
previous_account_number = tried_account_num
|
||||
number_incorrect_tries = 1
|
||||
playsound(src, 'buzz-sigh.ogg', 50, 1)
|
||||
else
|
||||
usr << "\red \icon[src] incorrect pin/account combination entered."
|
||||
number_incorrect_tries = 0
|
||||
else
|
||||
playsound(src, 'twobeep.ogg', 50, 1)
|
||||
ticks_left_timeout = 120
|
||||
@@ -263,6 +278,10 @@ log transactions
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
usr << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
|
||||
|
||||
previous_account_number = tried_account_num
|
||||
if("withdrawal")
|
||||
var/amount = max(text2num(href_list["funds_amount"]),0)
|
||||
if(authenticated_account && amount > 0)
|
||||
@@ -325,8 +344,8 @@ log transactions
|
||||
held_card = I
|
||||
if("logout")
|
||||
authenticated_account = null
|
||||
usr << browse(null,"window=atm")
|
||||
return
|
||||
//usr << browse(null,"window=atm")
|
||||
|
||||
src.attack_hand(usr)
|
||||
|
||||
//create the most effective combination of notes to make up the requested amount
|
||||
@@ -368,3 +387,14 @@ log transactions
|
||||
I = P.id
|
||||
if(I)
|
||||
authenticated_account = linked_db.attempt_account_access(I.associated_account_number)
|
||||
if(authenticated_account)
|
||||
human_user << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = authenticated_account.owner_name
|
||||
T.purpose = "Remote terminal access"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,405 @@
|
||||
|
||||
// Basic transit tubes. Straight pieces, curved sections,
|
||||
// and basic splits/joins (no routing logic).
|
||||
// Mappers: you can use "Generate Instances from Icon-states"
|
||||
// to get the different pieces.
|
||||
/obj/structure/transit_tube
|
||||
icon = 'transit_tube.dmi'
|
||||
icon_state = "E-W"
|
||||
density = 1
|
||||
layer = 3.1
|
||||
anchored = 1.0
|
||||
var/list/tube_dirs = null
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
|
||||
// A place where tube pods stop, and people can get in or out.
|
||||
// Mappers: use "Generate Instances from Directions" for this
|
||||
// one.
|
||||
/obj/structure/transit_tube/station
|
||||
icon = 'transit_tube_station.dmi'
|
||||
icon_state = "closed"
|
||||
exit_delay = 2
|
||||
enter_delay = 3
|
||||
var/pod_moving = 0
|
||||
var/automatic_launch_time = 100
|
||||
|
||||
var/const/OPEN_DURATION = 6
|
||||
var/const/CLOSE_DURATION = 6
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod
|
||||
icon = 'transit_tube_pod.dmi'
|
||||
icon_state = "pod"
|
||||
animate_movement = FORWARD_STEPS
|
||||
var/moving = 0
|
||||
var/datum/gas_mixture/air_contents
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/New(loc)
|
||||
..(loc)
|
||||
|
||||
spawn(automatic_launch_time)
|
||||
launch_pod()
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(mob/AM as mob|obj)
|
||||
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
AM.loc = pod
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
|
||||
if(!pod_moving)
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
if(icon_state == "closed")
|
||||
open_animation()
|
||||
|
||||
else if(icon_state == "open")
|
||||
close_animation()
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_animation()
|
||||
if(icon_state == "closed")
|
||||
icon_state = "opening"
|
||||
spawn(OPEN_DURATION)
|
||||
if(icon_state == "opening")
|
||||
icon_state = "open"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/close_animation()
|
||||
if(icon_state == "open")
|
||||
icon_state = "closing"
|
||||
spawn(CLOSE_DURATION)
|
||||
if(icon_state == "closing")
|
||||
icon_state = "closed"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/launch_pod()
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
spawn(5)
|
||||
pod_moving = 1
|
||||
close_animation()
|
||||
sleep(CLOSE_DURATION + 2)
|
||||
if(icon_state == "closed" && pod)
|
||||
pod.follow_tube()
|
||||
|
||||
pod_moving = 0
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
pod_moving = 1
|
||||
spawn(5)
|
||||
open_animation()
|
||||
sleep(OPEN_DURATION + 2)
|
||||
pod_moving = 0
|
||||
pod.mix_air()
|
||||
|
||||
if(automatic_launch_time)
|
||||
var/const/wait_step = 5
|
||||
var/i = 0
|
||||
while(i < automatic_launch_time)
|
||||
sleep(wait_step)
|
||||
i += wait_step
|
||||
|
||||
if(pod_moving || icon_state != "open")
|
||||
return
|
||||
|
||||
launch_pod()
|
||||
|
||||
|
||||
|
||||
// Returns a /list of directions this tube section can
|
||||
// connect to.
|
||||
/obj/structure/transit_tube/proc/directions()
|
||||
return tube_dirs
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_entrance(from_dir)
|
||||
from_dir = turn(from_dir, 180)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == from_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_exit(in_dir)
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// Searches for an exit direction within 45 degrees of the
|
||||
// specified dir. Returns that direction, or 0 if none match.
|
||||
/obj/structure/transit_tube/proc/get_exit(in_dir)
|
||||
var/near_dir = 0
|
||||
var/in_dir_cw = turn(in_dir, -45)
|
||||
var/in_dir_ccw = turn(in_dir, 45)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return direction
|
||||
|
||||
else if(direction == in_dir_cw)
|
||||
near_dir = direction
|
||||
|
||||
else if(direction == in_dir_ccw)
|
||||
near_dir = direction
|
||||
|
||||
return near_dir
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/exit_delay(pod, to_dir)
|
||||
return exit_delay
|
||||
|
||||
/obj/structure/transit_tube/proc/enter_delay(pod, to_dir)
|
||||
return enter_delay
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/proc/follow_tube()
|
||||
if(moving)
|
||||
return
|
||||
|
||||
moving = 1
|
||||
|
||||
spawn()
|
||||
var/obj/structure/transit_tube/current_tube = null
|
||||
var/next_dir
|
||||
var/next_loc
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(tube.has_exit(dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
while(current_tube)
|
||||
next_dir = current_tube.get_exit(dir)
|
||||
|
||||
if(!next_dir)
|
||||
break
|
||||
|
||||
sleep(current_tube.exit_delay(src, dir))
|
||||
next_loc = get_step(loc, next_dir)
|
||||
|
||||
current_tube = null
|
||||
for(var/obj/structure/transit_tube/tube in next_loc)
|
||||
if(tube.has_entrance(next_dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
if(current_tube == null)
|
||||
dir = next_dir
|
||||
step(src, dir)
|
||||
break
|
||||
|
||||
sleep(current_tube.enter_delay(src, next_dir))
|
||||
dir = next_dir
|
||||
loc = next_loc
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
current_tube.pod_stopped(src, dir)
|
||||
break
|
||||
|
||||
moving = 0
|
||||
|
||||
|
||||
|
||||
// HUGE HACK: Because the pod isn't a mecha, travelling through tubes over space
|
||||
// won't protect people from space.
|
||||
// This avoids editing an additional file, so that adding
|
||||
// tubes to a SS13 codebase is a simple as dropping this code file and the
|
||||
// required icon files somewhere where BYOND can find them.
|
||||
/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment)
|
||||
if(!istype(loc, /obj/structure/transit_tube_pod))
|
||||
return ..(environment)
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/return_air()
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.oxygen = MOLES_O2STANDARD * 2
|
||||
GM.nitrogen = MOLES_N2STANDARD
|
||||
GM.temperature = T20C
|
||||
return GM
|
||||
|
||||
// For now, copying what I found in an unused FEA file (and almost identical in a
|
||||
// used ZAS file). Means that assume_air and remove_air don't actually alter the
|
||||
// air contents.
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return 0
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
var/oxygen = MOLES_O2STANDARD
|
||||
var/carbon_dioxide = 0
|
||||
var/nitrogen = MOLES_N2STANDARD
|
||||
var/toxins = 0
|
||||
|
||||
var/datum/gas_mixture/GM = new()
|
||||
|
||||
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
||||
if(sum>0)
|
||||
GM.oxygen = (oxygen/sum)*amount
|
||||
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
|
||||
GM.nitrogen = (nitrogen/sum)*amount
|
||||
GM.toxins = (toxins/sum)*amount
|
||||
|
||||
GM.temperature = T20C
|
||||
GM.update_values() //Needed in ZAS to prevent suffocation. Not present in FEA. Comment/uncomment as nessecary.
|
||||
|
||||
return GM
|
||||
|
||||
|
||||
|
||||
// Called when a pod arrives at, and before a pod departs from a station,
|
||||
// giving it a chance to mix its internal air supply with the turf it is
|
||||
// currently on.
|
||||
/obj/structure/transit_tube_pod/proc/mix_air()
|
||||
//Needs to be implemented at some point
|
||||
|
||||
|
||||
|
||||
// When the player moves, check if the pos is currently stopped at a station.
|
||||
// if it is, check the direction. If the direction matches the direction of
|
||||
// the station, try to exit. If the direction matches one of the station's
|
||||
// tube directions, launch the pod in that direction.
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(!moving && istype(mob, /mob) && mob.client)
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(!station.pod_moving && (dir in station.directions()))
|
||||
if(direction == station.dir)
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
else if(direction in station.directions())
|
||||
dir = direction
|
||||
station.launch_pod()
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/New(loc)
|
||||
..(loc)
|
||||
|
||||
if(tube_dirs == null)
|
||||
init_dirs()
|
||||
|
||||
|
||||
|
||||
// Parse the icon_state into a list of directions.
|
||||
// This means that mappers can use Dream Maker's built in
|
||||
// "Generate Instances from Icon-states" option to get all
|
||||
// variations. Additionally, as a separate proc, sub-types
|
||||
// can handle it more intelligently.
|
||||
/obj/structure/transit_tube/proc/init_dirs()
|
||||
tube_dirs = parse_dirs(icon_state)
|
||||
|
||||
if(copytext(icon_state, 1, 3) == "D-")
|
||||
density = 0
|
||||
|
||||
|
||||
|
||||
// Tube station directions are simply 90 to either side of
|
||||
// the exit.
|
||||
/obj/structure/transit_tube/station/init_dirs()
|
||||
tube_dirs = list(turn(dir, 90), turn(dir, -90))
|
||||
|
||||
|
||||
|
||||
// Uses a list() to cache return values. Since they should
|
||||
// never be edited directly, all tubes with a certain
|
||||
// icon_state can just reference the same list. In theory,
|
||||
// reduces memory usage, and improves CPU cache usage.
|
||||
// In reality, I don't know if that is quite how BYOND works,
|
||||
// but it is probably safer to assume the existence of, and
|
||||
// rely on, a sufficiently smart compiler/optimizer.
|
||||
/obj/structure/transit_tube/proc/parse_dirs(text)
|
||||
var/global/list/direction_table = list()
|
||||
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
|
||||
var/list/split_text = stringsplit(text, "-")
|
||||
|
||||
// If the first token is D, the icon_state represents
|
||||
// a purely decorative tube, and doesn't actually
|
||||
// connect to anything.
|
||||
if(split_text[1] == "D")
|
||||
direction_table[text] = list()
|
||||
return null
|
||||
|
||||
var/list/directions = list()
|
||||
|
||||
for(var/text_part in split_text)
|
||||
var/direction = text2dir_extended(text_part)
|
||||
|
||||
if(direction > 0)
|
||||
directions += direction
|
||||
|
||||
direction_table[text] = directions
|
||||
return directions
|
||||
|
||||
|
||||
|
||||
// A copy of text2dir, extended to accept one and two letter
|
||||
// directions, and to clearly return 0 otherwise.
|
||||
/obj/structure/transit_tube/proc/text2dir_extended(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH", "N")
|
||||
return 1
|
||||
if("SOUTH", "S")
|
||||
return 2
|
||||
if("EAST", "E")
|
||||
return 4
|
||||
if("WEST", "W")
|
||||
return 8
|
||||
if("NORTHEAST", "NE")
|
||||
return 5
|
||||
if("NORTHWEST", "NW")
|
||||
return 9
|
||||
if("SOUTHEAST", "SE")
|
||||
return 6
|
||||
if("SOUTHWEST", "SW")
|
||||
return 10
|
||||
else
|
||||
return 0
|
||||
@@ -66,6 +66,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for(var/T in paths)
|
||||
var/datum/surgery_step/S = new T
|
||||
surgery_steps += S
|
||||
sort_surgeries()
|
||||
/* // Uncomment to debug chemical reaction list.
|
||||
/client/verb/debug_chemical_list()
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
var/server
|
||||
var/banappeals
|
||||
var/wikiurl
|
||||
var/forumurl
|
||||
var/wikiurl = "http://baystation12.net/wiki/index.php?title=Main_Page"
|
||||
var/forumurl = "http://baystation12.net/forums/"
|
||||
|
||||
//Alert level description
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
|
||||
@@ -118,7 +118,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
switch(H.get_species())
|
||||
if("Tajaran")
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
if( "Soghun")
|
||||
if("Unathi")
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
if("Skrell")
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
|
||||
@@ -61,6 +61,8 @@ datum/mind
|
||||
New(var/key)
|
||||
src.key = key
|
||||
|
||||
//put this here for easier tracking ingame
|
||||
var/datum/money_account/initial_account
|
||||
|
||||
proc/transfer_to(mob/living/new_character)
|
||||
if(!istype(new_character))
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/****************************************************
|
||||
INTERNAL ORGANS
|
||||
****************************************************/
|
||||
|
||||
/*
|
||||
/datum/organ/internal
|
||||
name = "internal"
|
||||
var/damage = 0
|
||||
@@ -62,3 +64,53 @@
|
||||
var/lungs = null
|
||||
var/stomach = null
|
||||
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/var/list/internal_organs = list()
|
||||
|
||||
/datum/organ/internal
|
||||
// amount of damage to the organ
|
||||
var/damage = 0
|
||||
var/min_bruised_damage = 10
|
||||
var/min_broken_damage = 30
|
||||
var/parent_organ = "chest"
|
||||
|
||||
/datum/organ/internal/proc/is_bruised()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
/datum/organ/internal/proc/is_broken()
|
||||
return damage >= min_broken_damage
|
||||
|
||||
|
||||
/datum/organ/internal/New(mob/living/carbon/human/H)
|
||||
..()
|
||||
var/datum/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs += src
|
||||
H.internal_organs[src.name] = src
|
||||
src.owner = H
|
||||
|
||||
/datum/organ/internal/proc/take_damage(amount)
|
||||
src.damage += amount
|
||||
|
||||
var/datum/organ/external/parent = owner.get_organ(parent_organ)
|
||||
owner.custom_pain("Something inside your [parent.display_name] hurts a lot.", 1)
|
||||
|
||||
/datum/organ/internal/heart
|
||||
name = "heart"
|
||||
parent_organ = "chest"
|
||||
|
||||
|
||||
/datum/organ/internal/lungs
|
||||
name = "lungs"
|
||||
parent_organ = "chest"
|
||||
|
||||
/datum/organ/internal/liver
|
||||
name = "liver"
|
||||
parent_organ = "chest"
|
||||
|
||||
|
||||
/datum/organ/internal/kidney
|
||||
name = "kidney"
|
||||
parent_organ = "chest"
|
||||
@@ -81,3 +81,10 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
maxdam = dam
|
||||
if(damaged_organ)
|
||||
pain(damaged_organ.display_name, maxdam, 0)
|
||||
|
||||
// Damage to internal organs hurts a lot.
|
||||
for(var/organ_name in internal_organs)
|
||||
var/datum/organ/internal/I = internal_organs[organ_name]
|
||||
if(I.damage > 2) if(prob(2))
|
||||
var/datum/organ/external/parent = get_organ(I.parent_organ)
|
||||
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1)
|
||||
@@ -96,6 +96,23 @@
|
||||
else if(damage_type == BURN)
|
||||
return salved
|
||||
|
||||
// checks if wound is considered open for external infections
|
||||
// untreated cuts (and bleeding bruises) and burns are possibly infectable, chance higher if wound is bigger
|
||||
proc/can_infect()
|
||||
if (is_treated() && damage < 10)
|
||||
return 0
|
||||
if (disinfected)
|
||||
return 0
|
||||
var/dam_coef = round(damage/10)
|
||||
switch (damage_type)
|
||||
if (BRUISE)
|
||||
return prob(dam_coef*5) && bleeding() //bruises only infectable if bleeding
|
||||
if (BURN)
|
||||
return prob(dam_coef*10)
|
||||
if (CUT)
|
||||
return prob(dam_coef*20)
|
||||
|
||||
return 0
|
||||
// heal the given amount of damage, and if the given amount of damage was more
|
||||
// than what needed to be healed, return how much heal was left
|
||||
// set @heals_internal to also heal internal organ damage
|
||||
@@ -131,31 +148,31 @@
|
||||
return (!(bandaged||clamped) && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
/datum/wound/cut/small
|
||||
// link wound descriptions to amounts of damage
|
||||
max_bleeding_stage = 2
|
||||
stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
|
||||
|
||||
/datum/wound/deep_cut
|
||||
/datum/wound/cut/deep
|
||||
max_bleeding_stage = 3
|
||||
stages = list("ugly deep ripped cut" = 25, "deep ripped cut" = 20, "deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/flesh_wound
|
||||
/datum/wound/cut/flesh
|
||||
max_bleeding_stage = 3
|
||||
stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/gaping_wound
|
||||
/datum/wound/cut/gaping
|
||||
max_bleeding_stage = 2
|
||||
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
|
||||
"small straight scar" = 0)
|
||||
|
||||
/datum/wound/big_gaping_wound
|
||||
/datum/wound/cut/gaping_big
|
||||
max_bleeding_stage = 2
|
||||
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
/datum/wound/massive_wound
|
||||
datum/wound/cut/massive
|
||||
max_bleeding_stage = 2
|
||||
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
|
||||
@@ -169,50 +186,51 @@
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
damage_type = BRUISE
|
||||
|
||||
/datum/wound/bruise/monumental_bruise
|
||||
/datum/wound/bruise/monumental
|
||||
|
||||
// implement sub-paths by starting at a later stage
|
||||
/datum/wound/bruise/huge_bruise
|
||||
current_stage = 1
|
||||
|
||||
/datum/wound/bruise/large_bruise
|
||||
current_stage = 2
|
||||
|
||||
/datum/wound/bruise/moderate_bruise
|
||||
current_stage = 3
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/small_bruise
|
||||
current_stage = 4
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/tiny_bruise
|
||||
/datum/wound/bruise/tiny
|
||||
current_stage = 5
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/small
|
||||
current_stage = 4
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/moderate
|
||||
current_stage = 3
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/large
|
||||
current_stage = 2
|
||||
|
||||
/datum/wound/bruise/huge
|
||||
current_stage = 1
|
||||
|
||||
/** BURNS **/
|
||||
/datum/wound/moderate_burn
|
||||
/datum/wound/burn/moderate
|
||||
stages = list("ripped burn" = 10, "moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/large_burn
|
||||
/datum/wound/burn/large
|
||||
stages = list("ripped large burn" = 20, "large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/severe_burn
|
||||
/datum/wound/burn/severe
|
||||
stages = list("ripped severe burn" = 35, "severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/deep_burn
|
||||
/datum/wound/burn/deep
|
||||
stages = list("ripped deep burn" = 45, "deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
@@ -220,7 +238,7 @@
|
||||
damage_type = BURN
|
||||
|
||||
|
||||
/datum/wound/carbonised_area
|
||||
/datum/wound/burn/carbonised
|
||||
stages = list("carbonised area" = 50, "treated carbonised area" = 20, "massive burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
@@ -18,7 +18,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
var/access = null
|
||||
var/hidden = 0
|
||||
var/contraband = 0
|
||||
var/group
|
||||
var/group = "Operations"
|
||||
|
||||
/datum/supply_packs/New()
|
||||
manifest += "<ul>"
|
||||
@@ -258,6 +258,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/largecrate/goat
|
||||
containername = "Goat Crate"
|
||||
access = access_hydroponics
|
||||
group = "Hydroponics"
|
||||
|
||||
/datum/supply_packs/chicken
|
||||
name = "Chicken Crate"
|
||||
@@ -265,6 +266,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/largecrate/chick
|
||||
containername = "Chicken Crate"
|
||||
access = access_hydroponics
|
||||
group = "Hydroponics"
|
||||
|
||||
/datum/supply_packs/lisa
|
||||
name = "Corgi Crate"
|
||||
@@ -272,6 +274,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
cost = 50
|
||||
containertype = /obj/structure/largecrate/lisa
|
||||
containername = "Corgi Crate"
|
||||
group = "Hydroponics"
|
||||
|
||||
/datum/supply_packs/seeds
|
||||
name = "Seeds Crate"
|
||||
@@ -338,7 +341,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Medical crate"
|
||||
group = "Medical / Science"
|
||||
|
||||
|
||||
/datum/supply_packs/virus
|
||||
name = "Virus crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
@@ -821,14 +823,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
group = "Medical / Science"
|
||||
|
||||
/datum/supply_packs/randomised/pizza
|
||||
num_contained = 6
|
||||
num_contained = 5
|
||||
contains = list(/obj/item/pizzabox/margherita,
|
||||
/obj/item/pizzabox/mushroom,
|
||||
/obj/item/pizzabox/meat,
|
||||
/obj/item/pizzabox/vegetable)
|
||||
name = "Surprise pack of half a dozen pizzas"
|
||||
name = "Surprise pack of five dozen pizzas"
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "Pizza crate"
|
||||
group = "Hospitality"
|
||||
|
||||
@@ -849,3 +851,83 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/closet
|
||||
containername = "Formalwear for the best occasions."
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/rust_injector
|
||||
contains = list(/obj/machinery/power/rust_fuel_injector)
|
||||
name = "RUST fuel injector"
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST injector crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_compressor
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_compressor)
|
||||
name = "RUST fuel compressor circuitry"
|
||||
cost = 60
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel compressor circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_assembly_port
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_port)
|
||||
name = "RUST fuel assembly port circuitry"
|
||||
cost = 40
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel assembly port circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_core
|
||||
contains = list(/obj/machinery/power/rust_core)
|
||||
name = "RUST Tokamak Core"
|
||||
cost = 75
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST tokamak crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/shield_gen
|
||||
contains = list(/obj/item/weapon/circuitboard/shield_gen)
|
||||
name = "Experimental shield generator circuitry"
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Experimental shield generator"
|
||||
group = "Engineering"
|
||||
access = access_ce
|
||||
|
||||
/datum/supply_packs/shield_cap
|
||||
contains = list(/obj/item/weapon/circuitboard/shield_cap)
|
||||
name = "Experimental shield capacitor circuitry"
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Experimental shield capacitor"
|
||||
group = "Engineering"
|
||||
access = access_ce
|
||||
|
||||
/datum/supply_packs/eftpos
|
||||
contains = list(/obj/item/device/eftpos)
|
||||
name = "EFTPOS scanner"
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "EFTPOS crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/teg
|
||||
contains = list(/obj/machinery/power/generator)
|
||||
name = "Mark I Thermoelectric Generator"
|
||||
cost = 75
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "Mk1 TEG crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/circulator
|
||||
contains = list(/obj/machinery/atmospherics/binary/circulator)
|
||||
name = "Binary atmospheric circulator"
|
||||
cost = 60
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "Atmospheric circulator crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
.manifest td:first-child {text-align:right}
|
||||
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
|
||||
</style></head>
|
||||
<table class="manifest">
|
||||
<table class="manifest" width='350px'>
|
||||
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
|
||||
"}
|
||||
var/even = 0
|
||||
@@ -94,28 +94,31 @@
|
||||
|
||||
//world << "[name]: [rank]"
|
||||
|
||||
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
|
||||
var/department = 0
|
||||
if(real_rank in command_positions)
|
||||
heads[name] = rank
|
||||
department = 1
|
||||
if(real_rank in security_positions)
|
||||
sec[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
if(real_rank in engineering_positions)
|
||||
eng[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
if(real_rank in medical_positions)
|
||||
med[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
if(real_rank in science_positions)
|
||||
sci[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
if(real_rank in civilian_positions)
|
||||
civ[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[name] = rank
|
||||
continue
|
||||
department = 1
|
||||
|
||||
if(!(name in heads))
|
||||
if(!department && !(name in heads))
|
||||
misc[name] = rank
|
||||
|
||||
if(heads.len > 0)
|
||||
|
||||
@@ -269,17 +269,17 @@
|
||||
if(prob(35))
|
||||
|
||||
if(istype(src, /area/chapel))
|
||||
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
|
||||
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/medical/morgue))
|
||||
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
|
||||
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg')
|
||||
else if(type == /area)
|
||||
sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
|
||||
sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/engine))
|
||||
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
|
||||
sound = pick('sound/ambience/ambimalf.ogg')
|
||||
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
|
||||
sound = pick('sound/ambience/ambimine.ogg')
|
||||
sound = pick('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg')
|
||||
musVolume = 25
|
||||
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
|
||||
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
|
||||
@@ -10,7 +10,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")
|
||||
required_players = 2
|
||||
required_players_secret = 5
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
@@ -37,7 +37,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/const/changeling_amount = 4
|
||||
var/changeling_amount = 4
|
||||
|
||||
/datum/game_mode/changeling/announce()
|
||||
world << "<B>The current game mode is - Changeling!</B>"
|
||||
@@ -55,6 +55,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
if(player.assigned_role == job)
|
||||
possible_changelings -= player
|
||||
|
||||
changeling_amount = 1 + round(num_players() / 10)
|
||||
|
||||
if(possible_changelings.len>0)
|
||||
for(var/i = 0, i < changeling_amount, i++)
|
||||
if(!possible_changelings.len) break
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
/proc/power_failure()
|
||||
command_alert("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")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
/proc/power_failure(var/announce = 1)
|
||||
if(announce)
|
||||
command_alert("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")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
continue
|
||||
@@ -47,11 +48,12 @@
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore()
|
||||
/proc/power_restore(var/announce = 1)
|
||||
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
if(announce)
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
@@ -70,11 +72,12 @@
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/power_restore_quick()
|
||||
/proc/power_restore_quick(var/announce = 1)
|
||||
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
if(announce)
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
|
||||
@@ -64,8 +64,8 @@ Whitespace:Seperator;
|
||||
Implants;
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
|
||||
/obj/item/weapon/implant/explosive:6:Explosive Implant (DANGER!);
|
||||
/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;Whitespace:Seperator;
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive:6:Explosive Implant (DANGER!);
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress:4:Compressed Matter Implant;Whitespace:Seperator;
|
||||
(Pointless) Badassery;
|
||||
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ var/global/datum/controller/gameticker/ticker
|
||||
var/triai = 0//Global holder for Triumvirate
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick('sound/ambience/title2.ogg','sound/ambience/title1.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
|
||||
for(var/mob/new_player/M in mob_list)
|
||||
if(M.client) M.client.playtitlemusic()
|
||||
login_music = pick(\
|
||||
'sound/music/space.ogg',\
|
||||
'sound/music/traitor.ogg')
|
||||
do
|
||||
pregame_timeleft = 180
|
||||
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
|
||||
@@ -105,12 +105,22 @@ var/global/datum/controller/gameticker/ticker
|
||||
else
|
||||
src.mode.announce()
|
||||
|
||||
//setup the money accounts
|
||||
if(!centcomm_account_db)
|
||||
for(var/obj/machinery/account_database/check_db in world)
|
||||
if(check_db.z == 2)
|
||||
centcomm_account_db = check_db
|
||||
break
|
||||
|
||||
create_characters() //Create player characters and transfer them
|
||||
collect_minds()
|
||||
equip_characters()
|
||||
data_core.manifest()
|
||||
current_state = GAME_STATE_PLAYING
|
||||
|
||||
//here to initialize the random events nicely at round start
|
||||
setup_economy()
|
||||
|
||||
spawn(0)//Forking here so we dont have to wait for this to finish
|
||||
mode.post_setup()
|
||||
//Cleanup some stuff
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
if(!H) return
|
||||
|
||||
var/fingerprints = num2text(md5(H.dna.uni_identity))
|
||||
var/traitor_name = H.real_name
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
@@ -147,6 +149,7 @@
|
||||
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
if(!H) return
|
||||
var/traitor_job = H.mind.assigned_role
|
||||
|
||||
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can."
|
||||
@@ -165,6 +168,7 @@
|
||||
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
if(!H) return
|
||||
var/traitor_job = H.mind.assigned_role
|
||||
|
||||
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector."
|
||||
|
||||
@@ -1012,7 +1012,7 @@ datum
|
||||
*/
|
||||
cyborg
|
||||
steal_target = /obj/item/robot_parts/robot_suit
|
||||
explanation_text = "Steal a completed cyborg shell (no brain)"
|
||||
explanation_text = "Steal a completed robot shell (no brain)"
|
||||
weight = 30
|
||||
|
||||
get_points(var/job)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
name = "nuclear emergency"
|
||||
config_tag = "nuclear"
|
||||
required_players = 6
|
||||
required_players_secret = 15 // 15 players - 5 players to be the nuke ops = 10 players remaining
|
||||
required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining
|
||||
required_enemies = 5
|
||||
recommended_enemies = 5
|
||||
|
||||
|
||||
@@ -294,6 +294,6 @@
|
||||
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M != traitor_mob)
|
||||
if(M && M != traitor_mob)
|
||||
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
|
||||
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
|
||||
@@ -63,6 +63,7 @@
|
||||
/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
|
||||
/var/const/access_gateway = 62
|
||||
/var/const/access_sec_doors = 63 // Security front doors
|
||||
/var/const/access_psychiatrist = 64 // Psychiatrist's office
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
@@ -205,7 +206,7 @@
|
||||
access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers,
|
||||
access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen,
|
||||
access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_construction,
|
||||
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
|
||||
access_hydroponics, access_library, access_lawyer, access_virology, access_psychiatrist, access_cmo, access_qm, access_clown, access_mime, access_surgery,
|
||||
access_theatre, access_research, access_mining, access_mailsorting,
|
||||
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
|
||||
access_keycard_auth, access_tcomsat, access_gateway)
|
||||
@@ -223,7 +224,7 @@
|
||||
if(1) //security
|
||||
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
|
||||
if(2) //medbay
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
|
||||
if(3) //research
|
||||
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_rd)
|
||||
if(4) //engineering and maintenance
|
||||
@@ -335,6 +336,8 @@
|
||||
return "Robotics"
|
||||
if(access_virology)
|
||||
return "Virology"
|
||||
if(access_psychiatrist)
|
||||
return "Psychiatrist's Office"
|
||||
if(access_cmo)
|
||||
return "Chief Medical Officer"
|
||||
if(access_qm)
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
req_admin_notify = 1
|
||||
access = list(access_medical, access_morgue, access_genetics, access_heads,
|
||||
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
|
||||
access_keycard_auth, access_sec_doors)
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
|
||||
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
|
||||
access_keycard_auth, access_sec_doors)
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist)
|
||||
minimal_player_age = 7
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -48,8 +48,8 @@
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery)
|
||||
alt_titles = list("Surgeon","Emergency Physician","Nurse","Orderly")
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery, access_virology)
|
||||
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
@@ -74,11 +74,12 @@
|
||||
if("Medical Doctor")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
if("Orderly")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
|
||||
if("Nurse")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
|
||||
if(H.gender == FEMALE)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
@@ -151,7 +152,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
return 1
|
||||
|
||||
/datum/job/virologist
|
||||
/*/datum/job/virologist
|
||||
title = "Virologist"
|
||||
flag = VIROLOGIST
|
||||
department_flag = MEDSCI
|
||||
@@ -182,4 +183,36 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
return 1
|
||||
return 1*/
|
||||
|
||||
/datum/job/psychiatrist
|
||||
title = "Psychiatrist"
|
||||
flag = PSYCHIATRIST
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_psychiatrist)
|
||||
alt_titles = list("Psychologist")
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
return 1
|
||||
@@ -74,7 +74,7 @@
|
||||
selection_color = "#ffeeff"
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
alt_titles = list("Biomedical Engineer","Mechatronic Engineer")
|
||||
alt_titles = list("Biomechanical Engineer","Mechatronic Engineer")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -324,6 +324,37 @@ var/global/datum/controller/occupations/job_master
|
||||
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
|
||||
H.loc = S.loc
|
||||
|
||||
//give them an account in the station database
|
||||
if(centcomm_account_db)
|
||||
var/datum/money_account/M = centcomm_account_db.add_account_across_all(H.real_name, starting_funds = rand(50,500)*10, pre_existing = 1)
|
||||
if(H.mind)
|
||||
var/remembered_info = ""
|
||||
remembered_info += "<b>Your account number is:</b> #[M.account_number]<br>"
|
||||
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
|
||||
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
|
||||
|
||||
if(M.transaction_log.len)
|
||||
var/datum/transaction/T = M.transaction_log[1]
|
||||
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
H.mind.initial_account = M
|
||||
|
||||
// If they're head, give them the account info for their department
|
||||
if(H.mind && job.head_position)
|
||||
var/remembered_info = ""
|
||||
var/datum/money_account/department_account = department_accounts[job.department]
|
||||
|
||||
if(department_account)
|
||||
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
|
||||
remembered_info += "<b>Your department's account pin is:</b> [department_account.remote_access_pin]<br>"
|
||||
remembered_info += "<b>Your department's account funds are:</b> $[department_account.money]<br>"
|
||||
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
spawn(0)
|
||||
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
|
||||
|
||||
var/alt_title = null
|
||||
if(H.mind)
|
||||
H.mind.assigned_role = rank
|
||||
@@ -385,13 +416,20 @@ var/global/datum/controller/occupations/job_master
|
||||
C.rank = rank
|
||||
C.assignment = title ? title : rank
|
||||
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
|
||||
|
||||
//put the player's account number onto the ID
|
||||
if(H.mind && H.mind.initial_account)
|
||||
C.associated_account_number = H.mind.initial_account.account_number
|
||||
|
||||
H.equip_to_slot_or_del(C, slot_wear_id)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
|
||||
if(locate(/obj/item/device/pda,H))
|
||||
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
|
||||
pda.owner = H.real_name
|
||||
pda.ownjob = C.assignment
|
||||
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ var/const/CMO =(1<<3)
|
||||
var/const/DOCTOR =(1<<4)
|
||||
var/const/GENETICIST =(1<<5)
|
||||
var/const/VIROLOGIST =(1<<6)
|
||||
var/const/PSYCHIATRIST =(1<<7)
|
||||
|
||||
|
||||
var/const/CIVILIAN =(1<<2)
|
||||
@@ -75,7 +76,7 @@ var/list/medical_positions = list(
|
||||
"Chief Medical Officer",
|
||||
"Medical Doctor",
|
||||
"Geneticist",
|
||||
"Virologist",
|
||||
"Psychiatrist",
|
||||
"Chemist"
|
||||
)
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
internal_bleeding = "<br>Internal Bleeding"
|
||||
break
|
||||
if(istype(e, /datum/organ/external/chest) && e:ruptured_lungs)
|
||||
if(istype(e, /datum/organ/external/chest) && occupant.is_lung_ruptured())
|
||||
lung_ruptured = "Lung Ruptured:"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted:"
|
||||
@@ -305,6 +305,11 @@
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/organ_name in occupant.internal_organs)
|
||||
var/datum/organ/internal/i = occupant.internal_organs[organ_name]
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>None:</td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
else
|
||||
dat += "\The [src] is empty."
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
brute_dam_coeff = 0.5
|
||||
// weight = 1.0E7
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
var/mob/living/carbon/target
|
||||
var/mob/target
|
||||
var/oldtarget_name
|
||||
var/threatlevel = 0
|
||||
var/target_lastloc //Loc of target when arrested.
|
||||
@@ -22,6 +22,7 @@
|
||||
var/idcheck = 0 //If false, all station IDs are authorized for weapons.
|
||||
var/check_records = 1 //Does it check security records?
|
||||
var/arrest_type = 0 //If true, don't handcuff
|
||||
var/next_harm_time = 0
|
||||
|
||||
var/mode = 0
|
||||
#define SECBOT_IDLE 0 // idle
|
||||
@@ -219,30 +220,47 @@ Auto Patrol: []"},
|
||||
|
||||
if(target) // make sure target exists
|
||||
if(get_dist(src, src.target) <= 1) // if right next to perp
|
||||
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
src.icon_state = "secbot-c"
|
||||
spawn(2)
|
||||
src.icon_state = "secbot[src.on]"
|
||||
var/mob/living/carbon/M = src.target
|
||||
var/maxstuns = 4
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M.stuttering < 10 && (!(HULK in M.mutations)))
|
||||
if(istype(src.target,/mob/living/carbon))
|
||||
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
src.icon_state = "secbot-c"
|
||||
spawn(2)
|
||||
src.icon_state = "secbot[src.on]"
|
||||
var/mob/living/carbon/M = src.target
|
||||
var/maxstuns = 4
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M.stuttering < 10 && (!(HULK in M.mutations)))
|
||||
M.stuttering = 10
|
||||
M.Stun(10)
|
||||
M.Weaken(10)
|
||||
else
|
||||
M.Weaken(10)
|
||||
M.stuttering = 10
|
||||
M.Stun(10)
|
||||
M.Weaken(10)
|
||||
else
|
||||
M.Weaken(10)
|
||||
M.stuttering = 10
|
||||
M.Stun(10)
|
||||
maxstuns--
|
||||
if(maxstuns <= 0)
|
||||
target = null
|
||||
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
|
||||
M.Stun(10)
|
||||
maxstuns--
|
||||
if(maxstuns <= 0)
|
||||
target = null
|
||||
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
|
||||
|
||||
mode = SECBOT_PREP_ARREST
|
||||
src.anchored = 1
|
||||
src.target_lastloc = M.loc
|
||||
return
|
||||
mode = SECBOT_PREP_ARREST
|
||||
src.anchored = 1
|
||||
src.target_lastloc = M.loc
|
||||
return
|
||||
else if(istype(src.target,/mob/living/simple_animal))
|
||||
//just harmbaton them until dead
|
||||
if(world.time > next_harm_time)
|
||||
next_harm_time = world.time + 15
|
||||
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
visible_message("\red <B>[src] beats [src.target] with the stun baton!</B>")
|
||||
src.icon_state = "secbot-c"
|
||||
spawn(2)
|
||||
src.icon_state = "secbot[src.on]"
|
||||
|
||||
var/mob/living/simple_animal/S = src.target
|
||||
S.AdjustStunned(10)
|
||||
S.adjustBruteLoss(15)
|
||||
if(S.stat)
|
||||
src.frustration = 8
|
||||
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
|
||||
|
||||
else // not next to perp
|
||||
var/turf/olddist = get_dist(src, src.target)
|
||||
@@ -251,6 +269,8 @@ Auto Patrol: []"},
|
||||
src.frustration++
|
||||
else
|
||||
src.frustration = 0
|
||||
else
|
||||
src.frustration = 8
|
||||
|
||||
if(SECBOT_PREP_ARREST) // preparing to arrest target
|
||||
|
||||
@@ -261,19 +281,22 @@ Auto Patrol: []"},
|
||||
return
|
||||
|
||||
if(istype(src.target,/mob/living/carbon))
|
||||
if(!src.target.handcuffed && !src.arrest_type)
|
||||
var/mob/living/carbon/C = target
|
||||
if(!C.handcuffed && !src.arrest_type)
|
||||
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
mode = SECBOT_ARREST
|
||||
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
|
||||
|
||||
spawn(60)
|
||||
if(get_dist(src, src.target) <= 1)
|
||||
if(src.target.handcuffed)
|
||||
return
|
||||
/*if(src.target.handcuffed)
|
||||
return*/
|
||||
|
||||
if(istype(src.target,/mob/living/carbon))
|
||||
target.handcuffed = new /obj/item/weapon/handcuffs(target)
|
||||
target.update_inv_handcuffed() //update the handcuffs overlay
|
||||
C = target
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/weapon/handcuffs(target)
|
||||
C.update_inv_handcuffed() //update the handcuffs overlay
|
||||
|
||||
mode = SECBOT_IDLE
|
||||
src.target = null
|
||||
@@ -284,6 +307,7 @@ Auto Patrol: []"},
|
||||
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
|
||||
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
|
||||
// src.speak(arrest_message)
|
||||
|
||||
else
|
||||
mode = SECBOT_IDLE
|
||||
src.target = null
|
||||
@@ -293,10 +317,16 @@ Auto Patrol: []"},
|
||||
|
||||
if(SECBOT_ARREST) // arresting
|
||||
|
||||
if(!target || target.handcuffed)
|
||||
if(!target || !istype(target, /mob/living/carbon))
|
||||
src.anchored = 0
|
||||
mode = SECBOT_IDLE
|
||||
return
|
||||
else
|
||||
var/mob/living/carbon/C = target
|
||||
if(!C.handcuffed)
|
||||
src.anchored = 0
|
||||
mode = SECBOT_IDLE
|
||||
return
|
||||
|
||||
|
||||
if(SECBOT_START_PATROL) // start a patrol
|
||||
@@ -560,27 +590,35 @@ Auto Patrol: []"},
|
||||
|
||||
/obj/machinery/bot/secbot/proc/look_for_perp()
|
||||
src.anchored = 0
|
||||
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
|
||||
if((C.stat) || (C.handcuffed))
|
||||
continue
|
||||
for (var/mob/living/M in view(7,src)) //Let's find us a criminal
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
if((C.stat) || (C.handcuffed))
|
||||
continue
|
||||
|
||||
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
|
||||
continue
|
||||
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
|
||||
continue
|
||||
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
src.threatlevel = src.assess_perp(C)
|
||||
else if((src.idcheck) && (istype(C, /mob/living/carbon/monkey)))
|
||||
src.threatlevel = 4
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
src.threatlevel = src.assess_perp(C)
|
||||
else if((src.idcheck) && (istype(C, /mob/living/carbon/monkey)))
|
||||
src.threatlevel = 4
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(M.stat == DEAD)
|
||||
continue
|
||||
else
|
||||
src.threatlevel = 4
|
||||
|
||||
if(!src.threatlevel)
|
||||
continue
|
||||
|
||||
else if(src.threatlevel >= 4)
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
src.target = M
|
||||
src.oldtarget_name = M.name
|
||||
src.speak("Level [src.threatlevel] infraction alert!")
|
||||
playsound(src.loc, pick('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg'), 50, 0)
|
||||
src.visible_message("<b>[src]</b> points at [C.name]!")
|
||||
src.visible_message("<b>[src]</b> points at [M.name]!")
|
||||
mode = SECBOT_HUNT
|
||||
spawn(0)
|
||||
process() // ensure bot quickly responds to a perp
|
||||
|
||||
@@ -51,14 +51,24 @@
|
||||
if (!( ticker ))
|
||||
return
|
||||
if (mode) // accessing crew manifest
|
||||
var/crew = ""
|
||||
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += "Entries cannot be modified from this terminal.<br><br>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(0) // make it monochrome
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=print'>Print</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br>"
|
||||
|
||||
/*var/crew = ""
|
||||
var/list/L = list()
|
||||
for (var/datum/data/record/t in data_core.general)
|
||||
var/R = t.fields["name"] + " - " + t.fields["rank"]
|
||||
L += R
|
||||
for(var/R in sortList(L))
|
||||
crew += "[R]<br>"
|
||||
dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=\ref[src];choice=print'>Print</a><br><br><a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
|
||||
crew += "[R]<br>"*/
|
||||
//dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=\ref[src];choice=print'>Print</a><br><br><a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
|
||||
else
|
||||
var/header = "<div align='center'><b>Identification Card Modifier</b></div>"
|
||||
|
||||
@@ -114,6 +124,14 @@
|
||||
var nameField = document.getElementById('namefield');
|
||||
nameField.style.backgroundColor = "#DDFFDD";
|
||||
}
|
||||
function markAccountGreen(){
|
||||
var nameField = document.getElementById('accountfield');
|
||||
nameField.style.backgroundColor = "#DDFFDD";
|
||||
}
|
||||
function markAccountRed(){
|
||||
var nameField = document.getElementById('accountfield');
|
||||
nameField.style.backgroundColor = "#FFDDDD";
|
||||
}
|
||||
function showAll(){
|
||||
var allJobsSlot = document.getElementById('alljobsslot');
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
|
||||
@@ -129,10 +147,16 @@
|
||||
carddesc += "<b>registered_name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>"
|
||||
carddesc += "<input type='submit' value='Rename' onclick='markGreen()'>"
|
||||
carddesc += "</form>"
|
||||
|
||||
carddesc += "<form name='accountnum' action='?src=\ref[src]' method='get'>"
|
||||
carddesc += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
carddesc += "<input type='hidden' name='choice' value='account'>"
|
||||
carddesc += "<b>Stored account number:</b> <input type='text' id='accountfield' name='account' value='[modify.associated_account_number]' style='width:250px; background-color:white;' onchange='markAccountRed()'>"
|
||||
carddesc += "<input type='submit' value='Rename' onclick='markAccountGreen()'>"
|
||||
carddesc += "</form>"
|
||||
|
||||
carddesc += "<b>Assignment:</b> "
|
||||
|
||||
var/jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
|
||||
|
||||
var/accesses = ""
|
||||
if(istype(src,/obj/machinery/computer/card/centcom))
|
||||
accesses += "<h5>Central Command:</h5>"
|
||||
@@ -260,6 +284,13 @@
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
if ("account")
|
||||
if (authenticated)
|
||||
var/t2 = modify
|
||||
//var/t1 = input(usr, "What name?", "ID computer", null) as text
|
||||
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
modify.associated_account_number = account_num
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
if ("print")
|
||||
@@ -267,13 +298,19 @@
|
||||
printing = 1
|
||||
sleep(50)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
|
||||
var/t1 = "<B>Crew Manifest:</B><BR>"
|
||||
/*var/t1 = "<B>Crew Manifest:</B><BR>"
|
||||
var/list/L = list()
|
||||
for (var/datum/data/record/t in data_core.general)
|
||||
var/R = t.fields["name"] + " - " + t.fields["rank"]
|
||||
L += R
|
||||
for(var/R in sortList(L))
|
||||
t1 += "[R]<br>"
|
||||
t1 += "[R]<br>"*/
|
||||
|
||||
var/t1 = "<h4>Crew Manifest</h4>"
|
||||
t1 += "<br>"
|
||||
if(data_core)
|
||||
t1 += data_core.get_manifest(0) // make it monochrome
|
||||
|
||||
P.info = t1
|
||||
P.name = "paper- 'Crew Manifest'"
|
||||
printing = null
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
var/temperature_archived
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/beaker = null
|
||||
var/next_trans = 0
|
||||
|
||||
var/current_heat_capacity = 50
|
||||
|
||||
@@ -164,12 +163,12 @@
|
||||
var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0
|
||||
var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0
|
||||
occupant.heal_organ_damage(heal_brute,heal_fire)
|
||||
if(beaker && (next_trans == 0))
|
||||
var/has_cryo = occupant.reagents.get_reagent_amount("cryoxadone") >= 1
|
||||
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
|
||||
var/has_cryo_medicine = has_cryo || has_clonexa
|
||||
if(beaker && !has_cryo_medicine)
|
||||
beaker:reagents.trans_to(occupant, 1, 10)
|
||||
beaker:reagents.reaction(occupant)
|
||||
next_trans++
|
||||
if(next_trans == 10)
|
||||
next_trans = 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
|
||||
if(air_contents.total_moles() < 1)
|
||||
|
||||
@@ -910,7 +910,7 @@ About the new airlock wires panel:
|
||||
/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0)
|
||||
if(!nowindow)
|
||||
..()
|
||||
if(usr.stat || usr.restrained())
|
||||
if(usr.stat || usr.restrained()|| usr.small)
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
if(href_list["close"])
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/mob/M = AM
|
||||
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
|
||||
M.last_bumped = world.time
|
||||
if(!M.restrained())
|
||||
if(!M.restrained() && !M.small)
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
|
||||
@@ -190,6 +190,12 @@
|
||||
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()
|
||||
@@ -244,6 +250,7 @@
|
||||
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"
|
||||
@@ -253,6 +260,7 @@
|
||||
/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"
|
||||
|
||||
@@ -126,6 +126,6 @@ var/list/uristrune_cache = list()
|
||||
result.Insert(I3, "", frame = 7, delay = 2)
|
||||
result.Insert(I2, "", frame = 8, delay = 2)
|
||||
|
||||
uristrune_cache[lookup] = result
|
||||
uristrune_cache[lookup] = result
|
||||
|
||||
return result
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/opened = 0
|
||||
var/temp
|
||||
var/list/part_sets = list( //set names must be unique
|
||||
"Cyborg"=list(
|
||||
"Robot"=list(
|
||||
/obj/item/robot_parts/robot_suit,
|
||||
/obj/item/robot_parts/chest,
|
||||
/obj/item/robot_parts/head,
|
||||
@@ -111,7 +111,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
),
|
||||
|
||||
"Cyborg Upgrade Modules" = list(
|
||||
"Robotic Upgrade Modules" = list(
|
||||
/obj/item/borg/upgrade/reset,
|
||||
/obj/item/borg/upgrade/rename,
|
||||
/obj/item/borg/upgrade/restart,
|
||||
|
||||
@@ -95,15 +95,16 @@
|
||||
anchored = 0
|
||||
layer = 2.7
|
||||
health = 3
|
||||
var/amount_grown = 0
|
||||
var/amount_grown = -1
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
New()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
processing_objects.Add(src)
|
||||
//50% chance to grow up
|
||||
if(prob(50))
|
||||
processing_objects.Add(src)
|
||||
amount_grown = 1
|
||||
|
||||
/obj/effect/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
@@ -134,8 +135,8 @@
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
src.visible_message("<B>[src] scrambles into the ventillation ducts!</B>")
|
||||
/*if(prob(50))
|
||||
src.visible_message("<B>[src] scrambles into the ventillation ducts!</B>")*/
|
||||
|
||||
spawn(rand(20,60))
|
||||
loc = exit_vent
|
||||
@@ -164,21 +165,24 @@
|
||||
entry_vent = null
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
else if(prob(25))
|
||||
var/list/nearby = oview(5, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
walk_to(src, target_atom, 5)
|
||||
if(prob(25))
|
||||
src.visible_message("\blue \the [src] skitters[pick(" away"," around","")].")
|
||||
else if(prob(10))
|
||||
else if(prob(5))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
walk_to(src, entry_vent, 5)
|
||||
break
|
||||
if(isturf(loc))
|
||||
|
||||
if(prob(1))
|
||||
src.visible_message("\blue \the [src] chitters.")
|
||||
if(isturf(loc) && amount_grown > 0)
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
|
||||
@@ -914,7 +914,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.show_message("\blue Localized Damage, Brute/Burn:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
|
||||
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.display_name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
|
||||
else
|
||||
user.show_message("\blue \t Limbs are OK.",1)
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ MASS SPECTROMETER
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][]\blue - []", \
|
||||
capitalize(org.getDisplayName()), \
|
||||
capitalize(org.display_name), \
|
||||
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
|
||||
(org.status & ORGAN_BLEEDING)?"\red <b>\[Bleeding\]</b>":"\t", \
|
||||
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
|
||||
@@ -146,7 +146,7 @@ MASS SPECTROMETER
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/e = H.organs_by_name[name]
|
||||
var/limb = e.getDisplayName()
|
||||
var/limb = e.display_name
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
|
||||
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
|
||||
@@ -328,4 +328,4 @@ MASS SPECTROMETER
|
||||
name = "advanced mass-spectrometer"
|
||||
icon_state = "adv_spectrometer"
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=2"
|
||||
origin_tech = "magnets=4;biotech=2"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/list/part = null
|
||||
|
||||
/obj/item/robot_parts/l_arm
|
||||
name = "Cyborg Left Arm"
|
||||
name = "robot left arm"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "l_arm"
|
||||
construction_time = 200
|
||||
@@ -18,7 +18,7 @@
|
||||
part = list("l_arm","l_hand")
|
||||
|
||||
/obj/item/robot_parts/r_arm
|
||||
name = "Cyborg Right Arm"
|
||||
name = "robot right arm"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "r_arm"
|
||||
construction_time = 200
|
||||
@@ -26,7 +26,7 @@
|
||||
part = list("r_arm","r_hand")
|
||||
|
||||
/obj/item/robot_parts/l_leg
|
||||
name = "Cyborg Left Leg"
|
||||
name = "robot left leg"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "l_leg"
|
||||
construction_time = 200
|
||||
@@ -34,7 +34,7 @@
|
||||
part = list("l_leg","l_foot")
|
||||
|
||||
/obj/item/robot_parts/r_leg
|
||||
name = "Cyborg Right Leg"
|
||||
name = "robot right leg"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "r_leg"
|
||||
construction_time = 200
|
||||
@@ -42,7 +42,7 @@
|
||||
part = list("r_leg","r_foot")
|
||||
|
||||
/obj/item/robot_parts/chest
|
||||
name = "Cyborg Torso"
|
||||
name = "robot torso"
|
||||
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
|
||||
icon_state = "chest"
|
||||
construction_time = 350
|
||||
@@ -51,7 +51,7 @@
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
|
||||
/obj/item/robot_parts/head
|
||||
name = "Cyborg Head"
|
||||
name = "robot head"
|
||||
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
|
||||
icon_state = "head"
|
||||
construction_time = 350
|
||||
@@ -60,7 +60,7 @@
|
||||
var/obj/item/device/flash/flash2 = null
|
||||
|
||||
/obj/item/robot_parts/robot_suit
|
||||
name = "Cyborg Endoskeleton"
|
||||
name = "robot endoskeleton"
|
||||
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
|
||||
icon_state = "robo_suit"
|
||||
construction_time = 500
|
||||
@@ -215,6 +215,7 @@
|
||||
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
O.Namepick()
|
||||
|
||||
del(src)
|
||||
else
|
||||
@@ -269,5 +270,12 @@
|
||||
W.loc = src
|
||||
src.flash1 = W
|
||||
user << "\blue You insert the flash into the eye socket!"
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/manipulator))
|
||||
user << "\blue You install some manipulators and modify the head, creating a functional spider-bot!"
|
||||
new /mob/living/simple_animal/spiderbot(get_turf(loc))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
usr << "/red The [src] will not function on a deceased cyborg."
|
||||
usr << "/red The [src] will not function on a deceased robot."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "cyborg module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
|
||||
name = "robotic module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
require_module = 1
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
name = "cyborg reclassification board"
|
||||
name = "robot reclassification board"
|
||||
desc = "Used to rename a cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
construction_cost = list("metal"=35000)
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
@@ -57,15 +57,15 @@
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/restart
|
||||
name = "cyborg emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired cyborg, bringing it back online."
|
||||
name = "robot emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
|
||||
construction_cost = list("metal"=60000 , "glass"=5000)
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
|
||||
if(R.health < 0)
|
||||
usr << "You have to repair the cyborg before using this module!"
|
||||
usr << "You have to repair the robot before using this module!"
|
||||
return 0
|
||||
|
||||
if(!R.key)
|
||||
@@ -78,8 +78,8 @@
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "cyborg VTEC Module"
|
||||
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
|
||||
name = "robotic VTEC Module"
|
||||
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
|
||||
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
|
||||
icon_state = "cyborg_upgrade2"
|
||||
require_module = 1
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/tasercooler
|
||||
name = "cyborg Rapid Taser Cooling Module"
|
||||
name = "robotic Rapid Taser Cooling Module"
|
||||
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate."
|
||||
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
@@ -116,7 +116,7 @@
|
||||
if(!T)
|
||||
T = locate() in R.module.modules
|
||||
if(!T)
|
||||
usr << "This cyborg has had its taser removed!"
|
||||
usr << "This robot has had its taser removed!"
|
||||
return 0
|
||||
|
||||
if(T.recharge_time <= 2)
|
||||
@@ -130,7 +130,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/jetpack
|
||||
name = "mining cyborg jetpack"
|
||||
name = "mining robot jetpack"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
|
||||
construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/
|
||||
name = "Illegal Equipment Module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg"
|
||||
desc = "Unlocks the hidden, deadlier functions of a robot"
|
||||
construction_cost = list("metal"=10000,"glass"=15000,"diamond" = 10000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
@@ -42,8 +42,19 @@
|
||||
user << "\red The wounds on [M]'s [affecting.display_name] have already been bandaged."
|
||||
return 1
|
||||
else
|
||||
user.visible_message( "\blue [user] bandages wounds on [M]'s [affecting.display_name].", \
|
||||
"\blue You bandage wounds on [M]'s [affecting.display_name]." )
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if (W.internal)
|
||||
continue
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.display_name].", \
|
||||
"\blue You bandage [W.desc] on [M]'s [affecting.display_name]." )
|
||||
//H.add_side_effect("Itch")
|
||||
else if (istype(W,/datum/wound/bruise))
|
||||
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.display_name].", \
|
||||
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.display_name]." )
|
||||
else
|
||||
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.display_name].", \
|
||||
"\blue You place bandaid over [W.desc] on [M]'s [affecting.display_name]." )
|
||||
|
||||
else if(src.heal_burn)
|
||||
if(!affecting.salve())
|
||||
@@ -53,7 +64,6 @@
|
||||
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.display_name].", \
|
||||
"\blue You salve wounds on [M]'s [affecting.display_name]." )
|
||||
|
||||
H.add_side_effect("Cramps")
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
@@ -73,6 +73,8 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/rust_fuel_assembly_port_frame, 12, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/rust_fuel_compressor_frame, 12, time = 50, one_per_turf = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plasteel
|
||||
|
||||
@@ -62,18 +62,18 @@ AI MODULES
|
||||
usr << "The upload computer is broken!"
|
||||
return
|
||||
if (!comp.current)
|
||||
usr << "You haven't selected a cyborg to transmit laws to!"
|
||||
usr << "You haven't selected a robot to transmit laws to!"
|
||||
return
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.emagged)
|
||||
usr << "Upload failed. No signal is being detected from the cyborg."
|
||||
usr << "Upload failed. No signal is being detected from the robot."
|
||||
else if (comp.current.connected_ai)
|
||||
usr << "Upload failed. The cyborg is slaved to an AI."
|
||||
usr << "Upload failed. The robot is slaved to an AI."
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
comp.current << "These are your laws now:"
|
||||
comp.current.show_laws()
|
||||
usr << "Upload complete. The cyborg's laws have been modified."
|
||||
usr << "Upload complete. The robot's laws have been modified."
|
||||
|
||||
|
||||
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
|
||||
@@ -180,33 +180,39 @@ Implant Specifics:<BR>"}
|
||||
switch (severity)
|
||||
if (2.0) //Weak EMP will make implant tear limbs off.
|
||||
if (prob(50))
|
||||
if (ishuman(imp_in) && part)
|
||||
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
|
||||
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
if (ishuman(imp_in) && part)
|
||||
//No tearing off these parts since it's pretty much killing
|
||||
//and you can't replace groins
|
||||
if (istype(part,/datum/organ/external/chest) || \
|
||||
istype(part,/datum/organ/external/groin) || \
|
||||
istype(part,/datum/organ/external/head))
|
||||
part.createwound(BRUISE, 60) //mangle them instead
|
||||
else
|
||||
part.droplimb(1)
|
||||
explosion(get_turf(imp_in), -1, -1, 2, 3, 3)
|
||||
del(src)
|
||||
|
||||
small_boom()
|
||||
if (1.0) //strong EMP will melt implant either making it go off, or disarming it
|
||||
if (prob(50))
|
||||
activate() //50% chance of bye bye
|
||||
else
|
||||
meltdown() //50% chance of implant disarming
|
||||
if (prob(70))
|
||||
if (prob(50))
|
||||
small_boom()
|
||||
else
|
||||
if (prob(50))
|
||||
activate() //50% chance of bye bye
|
||||
else
|
||||
meltdown() //50% chance of implant disarming
|
||||
spawn (20)
|
||||
malfunction--
|
||||
|
||||
islegal()
|
||||
return 0
|
||||
|
||||
proc/small_boom()
|
||||
if (ishuman(imp_in) && part)
|
||||
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
|
||||
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
if (ishuman(imp_in) && part)
|
||||
//No tearing off these parts since it's pretty much killing
|
||||
//and you can't replace groins
|
||||
if (istype(part,/datum/organ/external/chest) || \
|
||||
istype(part,/datum/organ/external/groin) || \
|
||||
istype(part,/datum/organ/external/head))
|
||||
part.createwound(BRUISE, 60) //mangle them instead
|
||||
else
|
||||
part.droplimb(1)
|
||||
explosion(get_turf(imp_in), -1, -1, 2, 3, 3)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/implant/chem
|
||||
name = "chem"
|
||||
desc = "Injects things."
|
||||
@@ -440,7 +446,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
activate()
|
||||
var/turf/t = get_turf(src)
|
||||
src.scanned.loc = t
|
||||
if (imp_in)
|
||||
imp_in.put_in_hands(scanned)
|
||||
else
|
||||
scanned.loc = t
|
||||
del src
|
||||
|
||||
implanted(mob/source as mob)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/item/weapon/implanter/compressed
|
||||
name = "implanter (C)"
|
||||
icon_state = "cimplanter0"
|
||||
icon_state = "cimplanter1"
|
||||
|
||||
/obj/item/weapon/implanter/compressed/New()
|
||||
imp = new /obj/item/weapon/implant/compressed( src )
|
||||
@@ -95,11 +95,11 @@
|
||||
if (imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if(!c.scanned)
|
||||
icon_state = "cimplanter0"
|
||||
else
|
||||
icon_state = "cimplanter1"
|
||||
else
|
||||
icon_state = "cimplanter2"
|
||||
else
|
||||
icon_state = "cimplanter2"
|
||||
icon_state = "cimplanter0"
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
@@ -83,24 +83,21 @@
|
||||
O.update()
|
||||
return
|
||||
|
||||
/*/obj/item/weapon/storage/box/syndie_kit/imp_compress
|
||||
name = "Compressed Matter Implant (with injector)"
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress
|
||||
name = "box (C)"
|
||||
|
||||
/obj/item/weapon/storage/syndie_kit/imp_compress/New()
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress/New()
|
||||
new /obj/item/weapon/implanter/compressed(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/syndie_kit/imp_explosive
|
||||
name = "Explosive Implant (with injector)"
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive
|
||||
name = "box (E)"
|
||||
|
||||
/obj/item/weapon/storage/syndie_kit/imp_explosive/New()
|
||||
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
|
||||
O.imp = new /obj/item/weapon/implant/explosive(O)
|
||||
O.name = "(BIO-HAZARD) BIO-detpack"
|
||||
O.update()
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive/New()
|
||||
new /obj/item/weapon/implanter/explosive(src)
|
||||
..()
|
||||
return*/
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
|
||||
name = "Uplink Implant (with injector)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/storage/wallet
|
||||
name = "wallet"
|
||||
desc = "It can hold a few small and personal things."
|
||||
storage_slots = 4
|
||||
storage_slots = 10
|
||||
icon_state = "wallet"
|
||||
w_class = 2
|
||||
can_hold = list(
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
force = 5
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
force_unwielded = 5
|
||||
force_wielded = 18
|
||||
force_unwielded = 10
|
||||
force_wielded = 40
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
|
||||
@@ -165,6 +165,16 @@
|
||||
sparks = "largebinsparks"
|
||||
emag = "largebinemag"
|
||||
|
||||
/obj/structure/closet/crate/secure/large
|
||||
name = "large crate"
|
||||
desc = "A hefty metal crate with an electronic locking system."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largecrate"
|
||||
icon_opened = "largecrateopen"
|
||||
icon_closed = "largecrate"
|
||||
redlight = "largecrater"
|
||||
greenlight = "largecrateg"
|
||||
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
name = "Secure crate"
|
||||
@@ -178,6 +188,15 @@
|
||||
var/broken = 0
|
||||
var/locked = 1
|
||||
|
||||
/obj/structure/closet/crate/large
|
||||
name = "large crate"
|
||||
desc = "A hefty metal crate."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largecrate"
|
||||
icon_opened = "largecrateopen"
|
||||
icon_closed = "largecrate"
|
||||
density = 1
|
||||
|
||||
/obj/structure/closet/crate/hydroponics
|
||||
name = "Hydroponics crate"
|
||||
desc = "All you need to destroy those pesky weeds and pests."
|
||||
|
||||
@@ -98,6 +98,7 @@ var/list/mechtoys = list(
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/hacked = 0
|
||||
var/can_order_contraband = 0
|
||||
var/last_viewed_group = "categories"
|
||||
|
||||
/obj/machinery/computer/ordercomp
|
||||
name = "Supply ordering console"
|
||||
@@ -106,6 +107,7 @@ var/list/mechtoys = list(
|
||||
circuit = "/obj/item/weapon/circuitboard/ordercomp"
|
||||
var/temp = null
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/last_viewed_group = "categories"
|
||||
|
||||
/*
|
||||
/obj/effect/marker/supplymarker
|
||||
@@ -375,19 +377,20 @@ var/list/mechtoys = list(
|
||||
if(href_list["order"] == "categories")
|
||||
//all_supply_groups
|
||||
//Request what?
|
||||
last_viewed_group = "categories"
|
||||
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/supply_group_name in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
|
||||
else
|
||||
var/cur_supply_group = href_list["order"]
|
||||
last_viewed_group = href_list["order"]
|
||||
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
|
||||
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
|
||||
temp += "<b>Request from: [last_viewed_group]</b><BR><BR>"
|
||||
for(var/supply_name in supply_shuttle.supply_packs )
|
||||
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
|
||||
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
|
||||
if(N.hidden || N.contraband || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
else if (href_list["doorder"])
|
||||
@@ -440,7 +443,7 @@ var/list/mechtoys = list(
|
||||
supply_shuttle.requestlist += O
|
||||
|
||||
temp = "Thanks for your request. The cargo team will process it as soon as possible.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
temp += "<BR><A href='?src=\ref[src];order=[last_viewed_group]'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["vieworders"])
|
||||
temp = "Current approved orders: <BR><BR>"
|
||||
@@ -558,19 +561,20 @@ var/list/mechtoys = list(
|
||||
if(href_list["order"] == "categories")
|
||||
//all_supply_groups
|
||||
//Request what?
|
||||
last_viewed_group = "categories"
|
||||
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/supply_group_name in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
|
||||
else
|
||||
var/cur_supply_group = href_list["order"]
|
||||
last_viewed_group = href_list["order"]
|
||||
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
|
||||
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
|
||||
temp += "<b>Request from: [last_viewed_group]</b><BR><BR>"
|
||||
for(var/supply_name in supply_shuttle.supply_packs )
|
||||
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
|
||||
if(N.hidden || (N.contraband && !can_order_contraband) || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
|
||||
if(N.hidden || (N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
|
||||
@@ -632,7 +636,7 @@ var/list/mechtoys = list(
|
||||
supply_shuttle.requestlist += O
|
||||
|
||||
temp = "Order request placed.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A> | <A href='?src=\ref[src];confirmorder=[O.ordernum]'>Authorize Order</A>"
|
||||
temp += "<BR><A href='?src=\ref[src];order=[last_viewed_group]'>Back</A> | <A href='?src=\ref[src];mainmenu=1'>Main Menu</A> | <A href='?src=\ref[src];confirmorder=[O.ordernum]'>Authorize Order</A>"
|
||||
|
||||
else if(href_list["confirmorder"])
|
||||
//Find the correct supply_order datum
|
||||
@@ -650,10 +654,10 @@ var/list/mechtoys = list(
|
||||
supply_shuttle.points -= P.cost
|
||||
supply_shuttle.shoppinglist += O
|
||||
temp = "Thanks for your order.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
else
|
||||
temp = "Not enough supply points.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
break
|
||||
|
||||
else if (href_list["vieworders"])
|
||||
@@ -692,7 +696,7 @@ var/list/mechtoys = list(
|
||||
supply_shuttle.requestlist.Cut(i,i+1)
|
||||
temp = "Request removed.<BR>"
|
||||
break
|
||||
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>OK</A>"
|
||||
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["clearreq"])
|
||||
supply_shuttle.requestlist.Cut()
|
||||
|
||||
@@ -265,6 +265,16 @@
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/rust_fuel_compressor_frame))
|
||||
var/obj/item/rust_fuel_compressor_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/rust_fuel_assembly_port_frame))
|
||||
var/obj/item/rust_fuel_assembly_port_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
place_poster(W,user)
|
||||
|
||||
@@ -41,22 +41,26 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
|
||||
log_ooc("[mob.name]/[key] : [msg]")
|
||||
|
||||
var/display_colour = normal_ooc_colour
|
||||
if(holder && !holder.fakekey)
|
||||
display_colour = "#0099cc" //light blue
|
||||
if(holder.rights & R_MOD && !(holder.rights & R_ADMIN))
|
||||
display_colour = "#184880" //dark blue
|
||||
else if(holder.rights & R_ADMIN)
|
||||
if(config.allow_admin_ooccolor)
|
||||
display_colour = src.prefs.ooccolor
|
||||
else
|
||||
display_colour = "#b82e00" //orange
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(C.prefs.toggles & CHAT_OOC)
|
||||
var/display_name = src.key
|
||||
var/display_colour = normal_ooc_colour
|
||||
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
if(C.holder)
|
||||
display_name = "[holder.fakekey]/([src.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
else if(config.allow_admin_ooccolor)
|
||||
display_colour = src.prefs.ooccolor
|
||||
else
|
||||
display_colour = "#b82e00"
|
||||
|
||||
C << "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
/*
|
||||
|
||||
@@ -46,11 +46,12 @@
|
||||
set category = "Admin"
|
||||
set name = "Adminwho"
|
||||
|
||||
var/msg = "<b>Current Admins:</b>\n"
|
||||
var/msg = ""
|
||||
var/num_mods_online = 0
|
||||
var/num_admins_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank != "Moderator")
|
||||
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey)
|
||||
@@ -66,28 +67,35 @@
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
|
||||
num_admins_online++
|
||||
else
|
||||
num_mods_online++
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank != "Moderator")
|
||||
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_admins_online++
|
||||
else
|
||||
num_mods_online++
|
||||
|
||||
msg += "<b>There are [num_mods_online] moderators online</b>\n"
|
||||
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg
|
||||
msg += "<b>There are also [num_mods_online] moderators online.</b> To view online moderators, type 'modwho'\n"
|
||||
src << msg
|
||||
|
||||
/client/verb/modwho()
|
||||
set category = "Admin"
|
||||
set name = "Modwho"
|
||||
|
||||
var/msg = "<b>Current Moderators:</b>\n"
|
||||
var/msg = ""
|
||||
var/num_admins_online = 0
|
||||
var/num_mods_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank == "Moderator")
|
||||
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
|
||||
num_admins_online++
|
||||
else
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
@@ -100,14 +108,14 @@
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
num_admins_online++
|
||||
num_mods_online++
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank == "Moderator")
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
else
|
||||
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
|
||||
num_admins_online++
|
||||
else
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
|
||||
msg += "<b>There are [num_admins_online] admins online</b>\n"
|
||||
msg = "<b>Current Moderators ([num_mods_online]):</b>\n" + msg
|
||||
msg += "<b>There are also [num_admins_online] admins online.</b> To view online admins, type 'adminwho'\n"
|
||||
src << msg
|
||||
|
||||
@@ -103,6 +103,7 @@ var/list/shuttles = list( )
|
||||
var/list/reg_dna = list( )
|
||||
// list/traitobj = list( )
|
||||
|
||||
var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
|
||||
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
|
||||