diff --git a/baystation12.dme b/baystation12.dme
index bdbb2ffbcb..9de1e153ca 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -1,235 +1,17 @@
-// DM Environment file for tgstation.dme.
-// All manual changes should be made outside the BEGIN_ and END_ blocks.
- // New source code should be placed in .dm files: choose File/New --> Code File.
+// DM Environment file for baystation12.dme.
+// All manual changes should be made outside the BEGIN_ and END_ blocks.
+ // New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_INTERNALS
// END_INTERNALS
-
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "code"
-#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/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/obj/clothing"
-#define FILE_DIR "code/defines/procs"
-#define FILE_DIR "code/defines/sd_procs"
-#define FILE_DIR "code/FEA"
-#define FILE_DIR "code/game"
-#define FILE_DIR "code/game/area"
-#define FILE_DIR "code/game/events"
-#define FILE_DIR "code/game/events/EventProcs"
-#define FILE_DIR "code/game/events/Events"
-#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/secstorage"
-#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/player"
-#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/vehicles/airtight"
-#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/chemical"
-#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/clothing/uniforms"
-#define FILE_DIR "code/modules/critters"
-#define FILE_DIR "code/modules/critters/hivebots"
-#define FILE_DIR "code/modules/customitems"
-#define FILE_DIR "code/modules/DetectiveWork"
-#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/amorph"
-#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/parasite"
-#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/new_player"
-#define FILE_DIR "code/modules/mob/simple_animal"
-#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/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/Rust"
#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/mapload"
-#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/SkyMarshal"
-#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/Susan"
#define FILE_DIR "html"
#define FILE_DIR "icons"
#define FILE_DIR "icons/48x48"
@@ -251,13 +33,12 @@
#define FILE_DIR "icons/turf"
#define FILE_DIR "icons/vehicles"
#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/wind"
#define FILE_DIR "sound/hallucinations"
#define FILE_DIR "sound/items"
#define FILE_DIR "sound/machines"
@@ -268,8 +49,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
@@ -282,6 +61,17 @@
#include "code\setup.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
+#include "code\__HELPERS\files.dm"
+#include "code\__HELPERS\game.dm"
+#include "code\__HELPERS\global_lists.dm"
+#include "code\__HELPERS\icons.dm"
+#include "code\__HELPERS\lists.dm"
+#include "code\__HELPERS\logging.dm"
+#include "code\__HELPERS\names.dm"
+#include "code\__HELPERS\text.dm"
+#include "code\__HELPERS\time.dm"
+#include "code\__HELPERS\type2type.dm"
+#include "code\__HELPERS\unsorted.dm"
#include "code\ATMOSPHERICS\atmospherics.dm"
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
#include "code\ATMOSPHERICS\datum_pipeline.dm"
@@ -349,6 +139,22 @@
#include "code\datums\diseases\robotic_transformation.dm"
#include "code\datums\diseases\wizarditis.dm"
#include "code\datums\diseases\xeno_transformation.dm"
+#include "code\datums\diseases\advance\advance.dm"
+#include "code\datums\diseases\advance\cold.dm"
+#include "code\datums\diseases\advance\flu.dm"
+#include "code\datums\diseases\advance\symptoms\confusion.dm"
+#include "code\datums\diseases\advance\symptoms\cough.dm"
+#include "code\datums\diseases\advance\symptoms\damage_converter.dm"
+#include "code\datums\diseases\advance\symptoms\dizzy.dm"
+#include "code\datums\diseases\advance\symptoms\fever.dm"
+#include "code\datums\diseases\advance\symptoms\hallucigen.dm"
+#include "code\datums\diseases\advance\symptoms\headache.dm"
+#include "code\datums\diseases\advance\symptoms\itching.dm"
+#include "code\datums\diseases\advance\symptoms\shivering.dm"
+#include "code\datums\diseases\advance\symptoms\sneeze.dm"
+#include "code\datums\diseases\advance\symptoms\symptoms.dm"
+#include "code\datums\diseases\advance\symptoms\vomit.dm"
+#include "code\datums\diseases\advance\symptoms\weight.dm"
#include "code\datums\helper_datums\construction_datum.dm"
#include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
@@ -382,25 +188,10 @@
#include "code\defines\obj\weapon.dm"
#include "code\defines\procs\AStar.dm"
#include "code\defines\procs\captain_announce.dm"
-#include "code\defines\procs\church_name.dm"
#include "code\defines\procs\command_alert.dm"
-#include "code\defines\procs\command_name.dm"
#include "code\defines\procs\dbcore.dm"
-#include "code\defines\procs\forum_activation.dm"
-#include "code\defines\procs\gamehelpers.dm"
-#include "code\defines\procs\global_lists.dm"
-#include "code\defines\procs\helper_list.dm"
-#include "code\defines\procs\helper_text.dm"
-#include "code\defines\procs\helper_type2type.dm"
-#include "code\defines\procs\helpers.dm"
-#include "code\defines\procs\icon_procs.dm"
-#include "code\defines\procs\icon_procs_readme.dm"
-#include "code\defines\procs\logging.dm"
-#include "code\defines\procs\religion_name.dm"
-#include "code\defines\procs\station_name.dm"
+#include "code\defines\procs\sd_Alert.dm"
#include "code\defines\procs\statistics.dm"
-#include "code\defines\procs\syndicate_name.dm"
-#include "code\defines\procs\time_stamp.dm"
#include "code\game\asteroid.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
@@ -504,6 +295,7 @@
#include "code\game\machinery\floodlight.dm"
#include "code\game\machinery\Freezer.dm"
#include "code\game\machinery\hologram.dm"
+#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\hydroponics.dm"
#include "code\game\machinery\igniter.dm"
#include "code\game\machinery\iv_drip.dm"
@@ -532,7 +324,6 @@
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
-#include "code\game\machinery\wishgranter.dm"
#include "code\game\machinery\atmoalter\area_atmos_computer.dm"
#include "code\game\machinery\atmoalter\canister.dm"
#include "code\game\machinery\atmoalter\meter.dm"
@@ -628,7 +419,6 @@
#include "code\game\mecha\equipment\weapons\weapons.dm"
#include "code\game\mecha\medical\medical.dm"
#include "code\game\mecha\medical\odysseus.dm"
-#include "code\game\mecha\working\firefighter.dm"
#include "code\game\mecha\working\ripley.dm"
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\empulse.dm"
@@ -641,6 +431,7 @@
#include "code\game\objects\weapons.dm"
#include "code\game\objects\closets\walllocker.dm"
#include "code\game\objects\effects\aliens.dm"
+#include "code\game\objects\effects\barsign.dm"
#include "code\game\objects\effects\biomass_rift.dm"
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\effect_system.dm"
@@ -671,6 +462,7 @@
#include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\bodybag.dm"
#include "code\game\objects\items\candle.dm"
+#include "code\game\objects\items\contraband.dm"
#include "code\game\objects\items\crayons.dm"
#include "code\game\objects\items\latexballoon.dm"
#include "code\game\objects\items\shooting_range.dm"
@@ -732,7 +524,6 @@
#include "code\game\objects\items\weapons\kitchen.dm"
#include "code\game\objects\items\weapons\manuals.dm"
#include "code\game\objects\items\weapons\mop.dm"
-#include "code\game\objects\items\weapons\mousetraps.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
#include "code\game\objects\items\weapons\photography.dm"
@@ -780,6 +571,7 @@
#include "code\game\objects\items\weapons\tanks\jetpack.dm"
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
+#include "code\game\objects\storage\coat.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\displaycase.dm"
#include "code\game\objects\structures\door_assembly.dm"
@@ -833,7 +625,6 @@
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
-#include "code\game\player\admin_report.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\turfs\unsimulated.dm"
@@ -864,6 +655,7 @@
#include "code\modules\admin\admin.dm"
#include "code\modules\admin\admin_investigate.dm"
#include "code\modules\admin\admin_memo.dm"
+#include "code\modules\admin\admin_ranks.dm"
#include "code\modules\admin\admin_verbs.dm"
#include "code\modules\admin\banjob.dm"
#include "code\modules\admin\create_mob.dm"
@@ -876,9 +668,9 @@
#include "code\modules\admin\newbanjob.dm"
#include "code\modules\admin\player_notes.dm"
#include "code\modules\admin\player_panel.dm"
+#include "code\modules\admin\topic.dm"
#include "code\modules\admin\ToRban.dm"
#include "code\modules\admin\DB ban\functions.dm"
-#include "code\modules\admin\permissionverbs\assignment.dm"
#include "code\modules\admin\permissionverbs\permissionedit.dm"
#include "code\modules\admin\verbs\adminhelp.dm"
#include "code\modules\admin\verbs\adminjump.dm"
@@ -911,6 +703,7 @@
#include "code\modules\assembly\holder.dm"
#include "code\modules\assembly\igniter.dm"
#include "code\modules\assembly\infrared.dm"
+#include "code\modules\assembly\mousetrap.dm"
#include "code\modules\assembly\proximity.dm"
#include "code\modules\assembly\shock_kit.dm"
#include "code\modules\assembly\signaler.dm"
@@ -1359,8 +1152,10 @@
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
#include "code\WorkInProgress\Chinsky\ashtray.dm"
+#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
+#include "code\WorkInProgress\Susan\susan_desert_turfs.dm"
#include "code\WorkInProgress\virus2\analyser.dm"
#include "code\WorkInProgress\virus2\antibodies.dm"
#include "code\WorkInProgress\virus2\base.dm"
@@ -1381,5 +1176,6 @@
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\tgstation.2.0.9.1.dmm"
+#include "maps\RandomZLevels\Academy.dm"
#include "maps\RandomZLevels\stationCollision.dm"
// END_INCLUDE
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 1f3aae999d..e92cc48510 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -88,14 +88,14 @@ obj/machinery/atmospherics/binary/passive_gate
return 1
- interact(mob/user as mob)
- var/dat = {"Power: [on?"On":"Off"]
- Desirable output pressure:
- [round(target_pressure,0.1)]kPa | Change
- "}
+ interact(mob/user as mob)
+ var/dat = {"Power: [on?"On":"Off"]
+ Desirable output pressure:
+ [round(target_pressure,0.1)]kPa | Change
+ "}
- user << browse("
[src.name] control[dat]", "window=atmo_pump")
- onclose(user, "atmo_pump")
+ user << browse("[src.name] control[dat]", "window=atmo_pump")
+ onclose(user, "atmo_pump")
initialize()
..()
@@ -138,7 +138,7 @@ obj/machinery/atmospherics/binary/passive_gate
if(!src.allowed(user))
user << "\red Access denied."
return
- usr.machine = src
+ usr.set_machine(src)
interact(user)
return
@@ -149,7 +149,7 @@ obj/machinery/atmospherics/binary/passive_gate
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
- usr.machine = src
+ usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 7746d238d2..f22da69ff8 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -107,14 +107,14 @@ obj/machinery/atmospherics/binary/pump
return 1
- interact(mob/user as mob)
- var/dat = {"Power: [on?"On":"Off"]
- Desirable output pressure:
- [round(target_pressure,0.1)]kPa | Change
- "}
+ interact(mob/user as mob)
+ var/dat = {"Power: [on?"On":"Off"]
+ Desirable output pressure:
+ [round(target_pressure,0.1)]kPa | Change
+ "}
- user << browse("[src.name] control[dat]", "window=atmo_pump")
- onclose(user, "atmo_pump")
+ user << browse("[src.name] control[dat]", "window=atmo_pump")
+ onclose(user, "atmo_pump")
initialize()
..()
@@ -156,7 +156,7 @@ obj/machinery/atmospherics/binary/pump
if(!src.allowed(user))
user << "\red Access denied."
return
- usr.machine = src
+ usr.set_machine(src)
interact(user)
return
@@ -167,7 +167,7 @@ obj/machinery/atmospherics/binary/pump
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
- usr.machine = src
+ usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index c04a927fc4..2c5f233706 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -97,14 +97,14 @@ obj/machinery/atmospherics/binary/volume_pump
return 1
- interact(mob/user as mob)
- var/dat = {"Power: [on?"On":"Off"]
- Desirable output flow:
- [round(transfer_rate,1)]l/s | Change
- "}
+ interact(mob/user as mob)
+ var/dat = {"Power: [on?"On":"Off"]
+ Desirable output flow:
+ [round(transfer_rate,1)]l/s | Change
+ "}
- user << browse("[src.name] control[dat]", "window=atmo_pump")
- onclose(user, "atmo_pump")
+ user << browse("[src.name] control[dat]", "window=atmo_pump")
+ onclose(user, "atmo_pump")
@@ -147,7 +147,7 @@ obj/machinery/atmospherics/binary/volume_pump
if(!src.allowed(user))
user << "\red Access denied."
return
- usr.machine = src
+ usr.set_machine(src)
interact(user)
return
@@ -158,7 +158,7 @@ obj/machinery/atmospherics/binary/volume_pump
if(href_list["set_transfer_rate"])
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
src.transfer_rate = max(0, min(200, new_transfer_rate))
- usr.machine = src
+ usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 55b0a19516..a2d72ca523 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -211,7 +211,7 @@ obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
obj/machinery/atmospherics/trinary/filter/Topic(href, href_list) // -- TLE
if(..())
return
- usr.machine = src
+ usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["filterset"])
src.filter_type = text2num(href_list["filterset"])
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 026c3531fd..69307784a9 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -112,7 +112,7 @@ obj/machinery/atmospherics/trinary/mixer
if(!src.allowed(user))
user << "\red Access denied."
return
- usr.machine = src
+ usr.set_machine(src)
var/dat = {"Power: [on?"On":"Off"]
Desirable output pressure:
[target_pressure]kPa | Change
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 7b9444d890..9aae6910c7 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -5,13 +5,14 @@
name = "Air Vent"
desc = "Has a valve and pump attached to it"
- var/area/initial_loc
level = 1
var/area_uid
- var/id_tag = null
+ var/id_tag
+ power_channel = ENVIRON
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
+ var/pump_speed = 1 //Used to adjust speed for siphons
var/external_pressure_bound = ONE_ATMOSPHERE
var/internal_pressure_bound = 0
@@ -42,25 +43,27 @@
icon_state = "in"
New()
- initial_loc = get_area(loc)
- if (initial_loc.master)
- initial_loc = initial_loc.master
- area_uid = initial_loc.uid
+ var/area/A = get_area(loc)
+ if (A.master)
+ A = A.master
+ area_uid = A.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
- src.initialize()
- src.broadcast_status()
+ initialize()
+ broadcast_status()
..()
high_volume
name = "Large Air Vent"
power_channel = EQUIP
+
New()
..()
air_contents.volume = 1000
+
update_icon()
if(welded)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
@@ -77,11 +80,12 @@
process()
..()
+// broadcast_status()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
- //broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
+
if(!on)
return 0
@@ -101,7 +105,7 @@
if(pressure_delta > 0)
if(air_contents.temperature > 0)
- var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*environment.volume*environment.group_multiplier*pump_speed/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
@@ -119,7 +123,7 @@
if(pressure_delta > 0)
if(environment.temperature > 0)
- var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*air_contents.volume*air_contents.group_multiplier*pump_speed/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
@@ -132,39 +136,42 @@
return 1
+
+
+
//Radio remote control
- proc
- set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- if(frequency)
- radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
+ proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ if(frequency)
+ radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
- broadcast_status()
- if(!radio_connection)
- return 0
+ proc/broadcast_status()
+ if(!radio_connection)
+ return 0
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.source = src
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.source = src
- signal.data = list(
- "area" = src.area_uid,
- "tag" = src.id_tag,
- "device" = "AVP",
- "power" = on,
- "direction" = pump_direction?("release"):("siphon"),
- "checks" = pressure_checks,
- "internal" = internal_pressure_bound,
- "external" = external_pressure_bound,
- "timestamp" = world.time,
- "sigtype" = "status"
- )
+ signal.data = list(
+ "area" = src.area_uid,
+ "tag" = src.id_tag,
+ "device" = "AVP",
+ "power" = on,
+ "direction" = pump_direction?("release"):("siphon"),
+ "checks" = pressure_checks,
+ "internal" = internal_pressure_bound,
+ "external" = external_pressure_bound,
+ "timestamp" = world.time,
+ "sigtype" = "status",
+ "setting" = pump_speed
+ )
- radio_connection.post_signal(src, signal, radio_filter_out)
+ radio_connection.post_signal(src, signal, radio_filter_out)
- return 1
+ return 1
initialize()
@@ -176,6 +183,7 @@
if(frequency)
set_frequency(frequency)
+
receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
@@ -203,47 +211,29 @@
if("checks_toggle" in signal.data)
pressure_checks = (pressure_checks?0:3)
- if("direction" in signal.data)
+ if("direction" in signal)
pump_direction = text2num(signal.data["direction"])
if("set_internal_pressure" in signal.data)
- internal_pressure_bound = between(
- 0,
- text2num(signal.data["set_internal_pressure"]),
- ONE_ATMOSPHERE*50
- )
+ internal_pressure_bound = between(0, text2num(signal.data["set_internal_pressure"]), ONE_ATMOSPHERE*50)
if("set_external_pressure" in signal.data)
- external_pressure_bound = between(
- 0,
- text2num(signal.data["set_external_pressure"]),
- ONE_ATMOSPHERE*50
- )
+ external_pressure_bound = between(0, text2num(signal.data["set_external_pressure"]), ONE_ATMOSPHERE*50)
if("adjust_internal_pressure" in signal.data)
- internal_pressure_bound = between(
- 0,
- internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
- ONE_ATMOSPHERE*50
- )
+ internal_pressure_bound = between(0, internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]), ONE_ATMOSPHERE*50)
if("adjust_external_pressure" in signal.data)
- external_pressure_bound = between(
- 0,
- external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
- ONE_ATMOSPHERE*50
- )
+ external_pressure_bound = between(0, external_pressure_bound + text2num(signal.data["adjust_external_pressure"]), ONE_ATMOSPHERE*50)
if("init" in signal.data)
name = signal.data["init"]
return
- if("status" in signal.data)
- spawn(2)
- broadcast_status()
- return //do not update_icon
+ if("setting" in signal.data)
+ pump_speed = text2num(signal.data["setting"])
- //log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
+ //log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()
@@ -284,6 +274,7 @@
else
user << "\blue You need more welding fuel to complete this task."
return 1
+
examine()
set src in oview(1)
..()
@@ -321,10 +312,4 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
-
- /obj/machinery/atmospherics/unary/vent_pump/Del()
- if (initial_loc.air_scrub_info)
- initial_loc.air_scrub_info -= id_tag
- ..()
- return
+ del(src)
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 84378df3d1..b9c26d3251 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -7,34 +7,36 @@
level = 1
- var/area/initial_loc
var/id_tag = null
- var/frequency = 1439
- var/datum/radio_frequency/radio_connection
var/on = 0
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/scrub_CO2 = 1
var/scrub_Toxins = 0
var/scrub_N2O = 0
+ var/scrub_rate = 1
var/volume_rate = 120
var/panic = 0 //is this scrubber panicked?
var/area_uid
+
+ var/frequency = 1439
+ var/datum/radio_frequency/radio_connection
var/radio_filter_out
var/radio_filter_in
+
New()
- initial_loc = get_area(loc)
- if (initial_loc.master)
- initial_loc = initial_loc.master
- area_uid = initial_loc.uid
+ var/area/A = get_area(loc)
+ if (A.master)
+ A = A.master
+ area_uid = A.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
- src.initialize()
- src.broadcast_status()
+ initialize()
+ broadcast_status()
..()
update_icon()
@@ -86,20 +88,20 @@
process()
..()
+// broadcast_status()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
- //broadcast_status()
+
if(!on)
return 0
-
var/datum/gas_mixture/environment = loc.return_air()
if(scrubbing)
if((environment.toxins>0) || (environment.carbon_dioxide>0) || (environment.trace_gases.len>0))
- var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
+ var/transfer_moles = min(1, volume_rate*scrub_rate/environment.volume)*environment.total_moles
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
@@ -118,15 +120,14 @@
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
- if(istype(trace_gas, /datum/gas/oxygen_agent_b))
- removed.trace_gases -= trace_gas
- filtered_out.trace_gases += trace_gas
- else if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O)
+ if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O)
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
//Remix the resulting gases
+ filtered_out.update_values()
+ removed.update_values()
air_contents.merge(filtered_out)
loc.assume_air(removed)
@@ -138,7 +139,7 @@
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
return
- var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
+ var/transfer_moles = environment.total_moles*(volume_rate*scrub_rate/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
@@ -220,6 +221,9 @@
broadcast_status()
return //do not update_icon
+ if("setting" in signal.data)
+ scrub_rate = text2num(signal.data["setting"])
+
// log_admin("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
@@ -227,7 +231,7 @@
return
power_change()
- if(powered(power_channel))
+ if(powered(ENVIRON))
stat &= ~NOPOWER
else
stat |= NOPOWER
@@ -257,10 +261,4 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
- del(src)
-
- /obj/machinery/atmospherics/unary/vent_scrubber/Del()
- if (initial_loc.air_scrub_info)
- initial_loc.air_scrub_info -= id_tag
- ..()
- return
+ del(src)
\ No newline at end of file
diff --git a/code/FEA/FEA_airgroup.dm b/code/FEA/FEA_airgroup.dm
index 00a6afc394..67b5c75756 100644
--- a/code/FEA/FEA_airgroup.dm
+++ b/code/FEA/FEA_airgroup.dm
@@ -90,7 +90,8 @@ datum/air_group
if (next_check > 0)
next_check--
return 1
- next_check += check_delay + rand(max(check_delay, 1)/2,check_delay)
+ var/player_count = max(player_list.len, 3) / 3
+ next_check += check_delay + rand(player_count, player_count * 1.5)
check_delay++
var/turf/simulated/list/border_individual = list()
diff --git a/code/FEA/FEA_fire.dm b/code/FEA/FEA_fire.dm
index d28df56a34..6aaf328b9b 100644
--- a/code/FEA/FEA_fire.dm
+++ b/code/FEA/FEA_fire.dm
@@ -152,7 +152,7 @@
else
chance_of_deletion = 100
if(prob(chance_of_deletion))
- T.ReplaceWithSpace()
+ T.ChangeTurf(/turf/space)
else
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0
diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm
index d043e34824..1fd6aaf715 100644
--- a/code/FEA/FEA_turf_tile.dm
+++ b/code/FEA/FEA_turf_tile.dm
@@ -304,7 +304,8 @@ turf
if (next_check > 0)
next_check--
return 1
- next_check += check_delay + rand(max(check_delay, 1)/2,check_delay)
+ var/player_count = max(player_list.len, 3) / 3
+ next_check += check_delay + rand(player_count, player_count * 1.5)
check_delay++
var/turf/simulated/list/possible_fire_spreads = list()
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/core_monitor.dm b/code/WorkInProgress/Cael_Aislinn/Rust/core_monitor.dm
index 3dcfda32c0..b7a464a675 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/core_monitor.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/core_monitor.dm
@@ -13,15 +13,6 @@
spawn(0)
core_generator = locate() in world
- attack_ai(mob/user)
- attack_hand(user)
-
- attack_hand(mob/user)
- add_fingerprint(user)
- if(stat & (BROKEN|NOPOWER))
- return
- interact(user)
-
Topic(href, href_list)
..()
if( href_list["shutdown"] )
@@ -52,36 +43,35 @@
if(updating)
src.updateDialog()
- proc
- 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 = "Reactor Core Primary Monitor
"
- if(core_generator)
- t += "[core_generator.on ? "Core Generator connected" : "Core Generator operational"]
"
- if(core_generator.owned_field)
- t += "Core suspension field online \[Bring field offline\]
"
- t += "Electromagnetic plasma suspension field status:
"
- t += " Strength (T): [core_generator.owned_field.field_strength] \[Modify\]
"
- t += " Energy levels (MeV): [core_generator.owned_field.mega_energy]
"
- t += " Core frequency: [core_generator.owned_field.frequency]
"
- t += " Moles of plasma: [core_generator.owned_field.held_plasma.toxins]
"
- t += " Core temperature: [core_generator.owned_field.held_plasma.temperature]
"
- t += "
"
- t += "Core atomic and subatomic constituents:
"
- 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 += " [reagent]: [core_generator.owned_field.dormant_reactant_quantities[reagent]]
"
- else
- t += " No reactants present.
"
+ 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 = "Reactor Core Primary Monitor
"
+ if(core_generator)
+ t += "[core_generator.on ? "Core Generator connected" : "Core Generator operational"]
"
+ if(core_generator.owned_field)
+ t += "Core suspension field online \[Bring field offline\]
"
+ t += "Electromagnetic plasma suspension field status:
"
+ t += " Strength (T): [core_generator.owned_field.field_strength] \[Modify\]
"
+ t += " Energy levels (MeV): [core_generator.owned_field.mega_energy]
"
+ t += " Core frequency: [core_generator.owned_field.frequency]
"
+ t += " Moles of plasma: [core_generator.owned_field.held_plasma.toxins]
"
+ t += " Core temperature: [core_generator.owned_field.held_plasma.temperature]
"
+ t += "
"
+ t += "Core atomic and subatomic constituents:
"
+ 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 += " [reagent]: [core_generator.owned_field.dormant_reactant_quantities[reagent]]
"
else
- t += "Core suspension field offline \[Bring field online\]
"
+ t += " No reactants present.
"
else
- t += "Core Generator unresponsive
"
- t += "
"
- t += "Close
"
- user << browse(t, "window=core_monitor;size=500x400")
- user.machine = src
+ t += "Core suspension field offline \[Bring field online\]
"
+ else
+ t += "Core Generator unresponsive
"
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=core_monitor;size=500x400")
+ user.machine = src
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor.dm
index 0b05a73927..a1e2829426 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor.dm
@@ -68,21 +68,20 @@ var/const/max_assembly_amount = 300
F.loc = src.loc
return
- proc
- 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 = "Reactor Fuel Rod Compressor / Assembler
"
- t += "Close
"
- t += "Activate Fuel Synthesis
(fuel assemblies require no more than [max_assembly_amount] rods).
"
- t += "
"
- t += "- New fuel assembly constituents:-
"
- for(var/reagent in new_assembly_quantities)
- t += " [reagent] rods: [new_assembly_quantities[reagent]] \[Modify\]
"
- t += "
"
- t += "Close
"
- user << browse(t, "window=fuelcomp;size=500x800")
- user.machine = src
+ 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 = "Reactor Fuel Rod Compressor / Assembler
"
+ t += "Close
"
+ t += "Activate Fuel Synthesis
(fuel assemblies require no more than [max_assembly_amount] rods).
"
+ t += "
"
+ t += "- New fuel assembly constituents:-
"
+ for(var/reagent in new_assembly_quantities)
+ t += " [reagent] rods: [new_assembly_quantities[reagent]] \[Modify\]
"
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=fuelcomp;size=500x800")
+ user.machine = src
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_control.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_control.dm
index 4895dfe919..f4a7f700fa 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_control.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_control.dm
@@ -121,53 +121,52 @@
..()
src.updateDialog()
- proc
- 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 = "Reactor Core Fuel Control
"
- var/cooling = 0
- for(var/stage in stage_status)
- if(stage_status[stage])
- t += "Fuel injection: Active
"
- t += "Enter cooldown phase
"
- cooling = 1
- break
- if(!cooling)
- t += "Fuel injection: Cooling
"
- t += "----
"
- //
- t += "Fuel depletion announcement: "
- t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
- t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
- t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
- t += "Stage progression announcement: "
- t += "[announce_stageprogression ? "Disable" : "Disabled"] "
- t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
- t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
- t += "
"
- t += ""
- t += "| Injector Status | "
- t += "Injection interval (sec) | "
- t += "Assembly consumption per injection | "
- t += "Fuel Assembly Port | "
- t += "Assembly depletion percentage | "
- t += "
"
- for(var/stage_name in fuel_injectors)
- var/list/cur_stage = fuel_injectors[stage_name]
- t += "| Fuel Injection Stage: [stage_name], [stage_status[stage_name] ? "Active \[Enter cooldown\]" : "Cooling \[Begin injection\]"] |
"
- for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
- t += ""
- t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
- t += "[Injector.rate/10] Modify | "
- t += "[Injector.fuel_usage*100]% Modify | "
- t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
- t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""] | "
- t += "
"
- t += "
"
- t += "Close
"
- user << browse(t, "window=fuel_monitor;size=500x600")
- user.machine = src
+ 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 = "Reactor Core Fuel Control
"
+ var/cooling = 0
+ for(var/stage in stage_status)
+ if(stage_status[stage])
+ t += "Fuel injection: Active
"
+ t += "Enter cooldown phase
"
+ cooling = 1
+ break
+ if(!cooling)
+ t += "Fuel injection: Cooling
"
+ t += "----
"
+ //
+ t += "Fuel depletion announcement: "
+ t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
+ t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
+ t += "Stage progression announcement: "
+ t += "[announce_stageprogression ? "Disable" : "Disabled"] "
+ t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
+ t += "
"
+ t += ""
+ t += "| Injector Status | "
+ t += "Injection interval (sec) | "
+ t += "Assembly consumption per injection | "
+ t += "Fuel Assembly Port | "
+ t += "Assembly depletion percentage | "
+ t += "
"
+ for(var/stage_name in fuel_injectors)
+ var/list/cur_stage = fuel_injectors[stage_name]
+ t += "| Fuel Injection Stage: [stage_name], [stage_status[stage_name] ? "Active \[Enter cooldown\]" : "Cooling \[Begin injection\]"] |
"
+ for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
+ t += ""
+ t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
+ t += "[Injector.rate/10] Modify | "
+ t += "[Injector.fuel_usage*100]% Modify | "
+ t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
+ t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""] | "
+ t += "
"
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=fuel_monitor;size=500x600")
+ user.machine = src
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
index 6963b1f5be..e773939c9f 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
@@ -97,59 +97,58 @@
return*/
interact(user)
- proc
- 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 = "Reactor Core Fuel Injector
"
- t += "Stage: [stage]
"
- t += "Status: [injecting ? "Active \[Disable\]" : "Standby \[Enable\]"]
"
- t += "Interval (sec): [rate/10] \[Modify\]
"
- t += "Fuel usage: [fuel_usage*100]% \[Modify\]
"
- /*
- var/t = "Reactor Core Fuel Control
"
- t += "Current fuel injection stage: [active_stage]
"
- if(active_stage == "Cooling")
- //t += "Restart injection cycle
"
- t += "----
"
- else
- t += "Enter cooldown phase
"
- t += "Fuel depletion announcement: "
- t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
- t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
- t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
- t += "Stage progression announcement: "
- t += "[announce_stageprogression ? "Disable" : "Disabled"] "
- t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
- t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
- t += "
"
- t += ""
- t += "| Injector Status | "
- t += "Injection interval (sec) | "
- t += "Assembly consumption per injection | "
- t += "Fuel Assembly Port | "
- t += "Assembly depletion percentage | "
- t += "
"
- for(var/stage in fuel_injectors)
- var/list/cur_stage = fuel_injectors[stage]
- t += "| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] |
"
- for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
- t += ""
- t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
- t += "[Injector.rate/10] Modify | "
- t += "[Injector.fuel_usage*100]% Modify | "
- t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
- t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | "
- t += "
"
- t += "
"
- */
- t += "
"
- t += "Close
"
- user << browse(t, "window=fuel_injector;size=500x800")
- user.machine = src
+ 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 = "Reactor Core Fuel Injector
"
+ t += "Stage: [stage]
"
+ t += "Status: [injecting ? "Active \[Disable\]" : "Standby \[Enable\]"]
"
+ t += "Interval (sec): [rate/10] \[Modify\]
"
+ t += "Fuel usage: [fuel_usage*100]% \[Modify\]
"
+ /*
+ var/t = "Reactor Core Fuel Control
"
+ t += "Current fuel injection stage: [active_stage]
"
+ if(active_stage == "Cooling")
+ //t += "Restart injection cycle
"
+ t += "----
"
+ else
+ t += "Enter cooldown phase
"
+ t += "Fuel depletion announcement: "
+ t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
+ t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
+ t += "Stage progression announcement: "
+ t += "[announce_stageprogression ? "Disable" : "Disabled"] "
+ t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
+ t += "
"
+ t += ""
+ t += "| Injector Status | "
+ t += "Injection interval (sec) | "
+ t += "Assembly consumption per injection | "
+ t += "Fuel Assembly Port | "
+ t += "Assembly depletion percentage | "
+ t += "
"
+ for(var/stage in fuel_injectors)
+ var/list/cur_stage = fuel_injectors[stage]
+ t += "| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] |
"
+ for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
+ t += ""
+ t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
+ t += "[Injector.rate/10] Modify | "
+ t += "[Injector.fuel_usage*100]% Modify | "
+ t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
+ t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | "
+ t += "
"
+ t += "
"
+ */
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=fuel_injector;size=500x800")
+ user.machine = src
proc/BeginInjecting()
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
index 69553a3d8f..3926d84033 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
@@ -163,36 +163,26 @@
pixel_x = -pixel_x
pixel_y = -pixel_y
- attack_ai(mob/user)
- attack_hand(user)
-
- attack_hand(mob/user)
- add_fingerprint(user)
- /*if(stat & (BROKEN|NOPOWER))
- return*/
- interact(user)
-
- proc
- 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=gyro_monitor")
- return
- var/t = "Free electron MASER (Gyrotron) Control Panel
"
- if(owned_gyrotron && owned_gyrotron.on)
- t += "Gyrotron operational
"
- t += "Operational mode: "
- if(owned_gyrotron.emitting)
- t += "Emitting \[Deactivate\]
"
- else
- t += "Not emitting \[Activate\]
"
- t += "Emission rate: [owned_gyrotron.rate] \[Modify\]
"
- t += "Beam frequency: [owned_gyrotron.frequency] \[Modify\]
"
- t += "Beam power: [owned_gyrotron.mega_energy] \[Modify\]
"
+ 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=gyro_monitor")
+ return
+ var/t = "Free electron MASER (Gyrotron) Control Panel
"
+ if(owned_gyrotron && owned_gyrotron.on)
+ t += "Gyrotron operational
"
+ t += "Operational mode: "
+ if(owned_gyrotron.emitting)
+ t += "Emitting \[Deactivate\]
"
else
- t += "Gyrotron unresponsive"
- t += "
"
- t += "Close
"
- user << browse(t, "window=gyro_monitor;size=500x800")
- user.machine = src
+ t += "Not emitting \[Activate\]
"
+ t += "Emission rate: [owned_gyrotron.rate] \[Modify\]
"
+ t += "Beam frequency: [owned_gyrotron.frequency] \[Modify\]
"
+ t += "Beam power: [owned_gyrotron.mega_energy] \[Modify\]
"
+ else
+ t += "Gyrotron unresponsive"
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=gyro_monitor;size=500x800")
+ user.machine = src
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron_controller.dm b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron_controller.dm
index 37bbed0e9f..2c9b6f37d8 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron_controller.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron_controller.dm
@@ -7,20 +7,6 @@
New()
..()
- attack_ai(mob/user)
- attack_hand(user)
-
- attack_hand(mob/user)
- add_fingerprint(user)
- /*if(stat & (BROKEN|NOPOWER))
- return*/
- interact(user)
-
- /*updateDialog()
- for(var/mob/M in range(1))
- if(M.machine == src)
- interact(m)*/
-
Topic(href, href_list)
..()
if( href_list["close"] )
@@ -37,66 +23,65 @@
if(updating)
src.updateDialog()
- proc
- 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=gyrotron_controller")
- return
- var/t = "Gyrotron Remote Control Console
"
- t += "
"
- for(var/obj/machinery/rust/gyrotron/gyro in world)
- if(gyro.remoteenabled && gyro.on)
- t += "Gyrotron operational
"
- t += "Operational mode: "
- if(gyro.emitting)
- t += "Emitting \[Deactivate\]
"
- else
- t += "Not emitting \[Activate\]
"
- t += "Emission rate: [gyro.rate] \[Modify\]
"
- t += "Beam frequency: [gyro.frequency] \[Modify\]
"
- t += "Beam power: [gyro.mega_energy] \[Modify\]
"
+ 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=gyrotron_controller")
+ return
+ var/t = "Gyrotron Remote Control Console
"
+ t += "
"
+ for(var/obj/machinery/rust/gyrotron/gyro in world)
+ if(gyro.remoteenabled && gyro.on)
+ t += "Gyrotron operational
"
+ t += "Operational mode: "
+ if(gyro.emitting)
+ t += "Emitting \[Deactivate\]
"
else
- t += "Gyrotron unresponsive"
- t += "
"
- /*
- var/t = "Reactor Core Fuel Control
"
- t += "Current fuel injection stage: [active_stage]
"
- if(active_stage == "Cooling")
- //t += "Restart injection cycle
"
- t += "----
"
+ t += "Not emitting \[Activate\]
"
+ t += "Emission rate: [gyro.rate] \[Modify\]
"
+ t += "Beam frequency: [gyro.frequency] \[Modify\]
"
+ t += "Beam power: [gyro.mega_energy] \[Modify\]
"
else
- t += "Enter cooldown phase
"
- t += "Fuel depletion announcement: "
- t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
- t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
- t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
- t += "Stage progression announcement: "
- t += "[announce_stageprogression ? "Disable" : "Disabled"] "
- t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
- t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
+ t += "Gyrotron unresponsive"
t += "
"
- t += ""
- t += "| Injector Status | "
- t += "Injection interval (sec) | "
- t += "Assembly consumption per injection | "
- t += "Fuel Assembly Port | "
- t += "Assembly depletion percentage | "
- t += "
"
- for(var/stage in fuel_injectors)
- var/list/cur_stage = fuel_injectors[stage]
- t += "| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] |
"
- for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
- t += ""
- t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
- t += "[Injector.rate/10] Modify | "
- t += "[Injector.fuel_usage*100]% Modify | "
- t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
- t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | "
- t += "
"
- t += "
"
- */
- t += "Close
"
- user << browse(t, "window=gyrotron_controller;size=500x400")
- user.machine = src
+ /*
+ var/t = "Reactor Core Fuel Control
"
+ t += "Current fuel injection stage: [active_stage]
"
+ if(active_stage == "Cooling")
+ //t += "Restart injection cycle
"
+ t += "----
"
+ else
+ t += "Enter cooldown phase
"
+ t += "Fuel depletion announcement: "
+ t += "[announce_fueldepletion ? "Disable" : "Disabled"] "
+ t += "[announce_fueldepletion == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_fueldepletion == 2 ? "Broadcasting" : "Broadcast"]
"
+ t += "Stage progression announcement: "
+ t += "[announce_stageprogression ? "Disable" : "Disabled"] "
+ t += "[announce_stageprogression == 1 ? "Announcing" : "Announce"] "
+ t += "[announce_stageprogression == 2 ? "Broadcasting" : "Broadcast"] "
+ t += "
"
+ t += ""
+ t += "| Injector Status | "
+ t += "Injection interval (sec) | "
+ t += "Assembly consumption per injection | "
+ t += "Fuel Assembly Port | "
+ t += "Assembly depletion percentage | "
+ t += "
"
+ for(var/stage in fuel_injectors)
+ var/list/cur_stage = fuel_injectors[stage]
+ t += "| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] |
"
+ for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
+ t += ""
+ t += "| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | "
+ t += "[Injector.rate/10] Modify | "
+ t += "[Injector.fuel_usage*100]% Modify | "
+ t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | "
+ t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | "
+ t += "
"
+ t += "
"
+ */
+ t += "Close
"
+ user << browse(t, "window=gyrotron_controller;size=500x400")
+ user.machine = src
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
index 50017200cb..d606337f4c 100644
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
@@ -14,36 +14,26 @@
if(las.id == src.id)
lasers += las
- attack_hand(mob/user)
- add_fingerprint(user)
- if(stat & (BROKEN|NOPOWER))
- return
- interact(user)
-
- attack_ai(mob/user)
- attack_hand(user)
-
process()
..()
updateDialog()
- proc
- 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=laser_control")
- return
- var/t = "Laser status monitor
"
- for(var/obj/machinery/zero_point_emitter/laser in lasers)
- t += "Zero Point Laser
"
- t += "Power level: - - - - [laser.energy]MeV + + + +
"
- t += "Frequency: - - [laser.freq] + +
"
- t += "Output: [laser.active ? "Online Offline" : "Online Offline "]
"
- t += "
"
- t += "Close
"
- user << browse(t, "window=laser_control;size=500x800")
- user.machine = src
+ 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=laser_control")
+ return
+ var/t = "Laser status monitor
"
+ for(var/obj/machinery/zero_point_emitter/laser in lasers)
+ t += "Zero Point Laser
"
+ t += "Power level: - - - - [laser.energy]MeV + + + +
"
+ t += "Frequency: - - [laser.freq] + +
"
+ t += "Output: [laser.active ? "Online Offline" : "Online Offline "]
"
+ t += "
"
+ t += "Close
"
+ user << browse(t, "window=laser_control;size=500x800")
+ user.machine = src
/*
/obj/machinery/computer/lasercon/proc/interact(mob/user)
diff --git a/code/WorkInProgress/Cael_Aislinn/shield_capacitor.dm b/code/WorkInProgress/Cael_Aislinn/shield_capacitor.dm
index 6aca0fd18a..bd7ccfd773 100644
--- a/code/WorkInProgress/Cael_Aislinn/shield_capacitor.dm
+++ b/code/WorkInProgress/Cael_Aislinn/shield_capacitor.dm
@@ -119,10 +119,6 @@
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/attack_hand(mob/user as mob)
- interact(user)
- src.add_fingerprint(user)
-
/obj/machinery/shield_capacitor/Topic(href, href_list[])
..()
if( href_list["close"] )
@@ -144,7 +140,7 @@
//
updateDialog()
-/obj/machinery/shield_capacitor/proc/interact(mob/user)
+/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
diff --git a/code/WorkInProgress/Cael_Aislinn/shield_gen.dm b/code/WorkInProgress/Cael_Aislinn/shield_gen.dm
index c0327346f9..c87fb4aab9 100644
--- a/code/WorkInProgress/Cael_Aislinn/shield_gen.dm
+++ b/code/WorkInProgress/Cael_Aislinn/shield_gen.dm
@@ -148,11 +148,6 @@
//
updateDialog()
-/obj/machinery/shield_gen/attack_hand(mob/user as mob)
-
- interact(user)
- src.add_fingerprint(user)
-
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -241,7 +236,7 @@
//
updateDialog()
-/obj/machinery/shield_gen/proc/interact(mob/user)
+/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
diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/WorkInProgress/Mini/atmos_control.dm
index 6c06a16b79..506258cdf9 100644
--- a/code/WorkInProgress/Mini/atmos_control.dm
+++ b/code/WorkInProgress/Mini/atmos_control.dm
@@ -16,7 +16,7 @@
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
if(..())
return
- user.machine = src
+ user.set_machine(src)
if(allowed(user))
overridden = 1
else if(!emagged)
@@ -139,6 +139,12 @@
src.updateUsrDialog()
return
+ if(href_list["atmos_unlock"])
+ switch(href_list["atmos_unlock"])
+ if("0")
+ current.air_doors_close(1)
+ if("1")
+ current.air_doors_open(1)
if(href_list["atmos_alarm"])
if (current.alarm_area.atmosalert(2))
@@ -187,6 +193,8 @@
output += "PANIC SYPHON ACTIVE
turn syphoning off"
else
output += "ACTIVATE PANIC SYPHON IN AREA"
+
+ output += "
Atmospheric Lockdown: [current.alarm_area.air_doors_activated ? "ENABLED" : "Disabled"]"
if (AALARM_SCREEN_VENT)
var/sensor_data = ""
if(current.alarm_area.air_vent_names.len)
diff --git a/code/WorkInProgress/Ported/Abi79/uplinks.dm b/code/WorkInProgress/Ported/Abi79/uplinks.dm
index 55cd988af8..3cba4e3c6c 100644
--- a/code/WorkInProgress/Ported/Abi79/uplinks.dm
+++ b/code/WorkInProgress/Ported/Abi79/uplinks.dm
@@ -31,7 +31,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
if(!uplink_data)
uplink_data = ticker.mode.uplink_items
- items = dd_replacetext(uplink_data, "\n", "") // Getting the text string of items
+ items = replacetext(uplink_data, "\n", "") // Getting the text string of items
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
diff --git a/code/WorkInProgress/SkyMarshal/wardrobes.dm b/code/WorkInProgress/SkyMarshal/wardrobes.dm
index 214edfae54..2ddb9adff4 100755
--- a/code/WorkInProgress/SkyMarshal/wardrobes.dm
+++ b/code/WorkInProgress/SkyMarshal/wardrobes.dm
@@ -116,7 +116,7 @@
new /obj/item/clothing/head/helmet/welding(src)
new /obj/item/weapon/storage/belt/utility/full(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
- new /obj/item/clothing/suit/hazardvest(src)
+ new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
@@ -135,7 +135,7 @@
new /obj/item/weapon/pen(src)
new /obj/item/device/pda/engineering(src)
new /obj/item/device/t_scanner(src)
- new /obj/item/clothing/suit/hazardvest(src)
+ new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/weapon/storage/belt/utility/full(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/mask/gas(src)
@@ -426,7 +426,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/pda/detective(src)
- new /obj/item/clothing/suit/det_suit/armor(src)
+ new /obj/item/clothing/suit/storage/det_suit/armor(src)
new /obj/item/clothing/suit/storage/det_suit(src)
new /obj/item/clothing/gloves/detective(src)
new /obj/item/clothing/head/det_hat(src)
@@ -606,9 +606,9 @@
new /obj/item/clothing/shoes/brown(src)
if(prob(50))
new /obj/item/clothing/under/lawyer/bluesuit(src)
- new /obj/item/clothing/suit/lawyer/bluejacket(src)
+ new /obj/item/clothing/suit/storage/lawyer/bluejacket(src)
else
new /obj/item/clothing/under/lawyer/purpsuit(src)
- new /obj/item/clothing/suit/lawyer/purpjacket(src)
+ new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
diff --git a/code/WorkInProgress/Susan/biocraps.dmi b/code/WorkInProgress/Susan/biocraps.dmi
new file mode 100644
index 0000000000..1bcbec018f
Binary files /dev/null and b/code/WorkInProgress/Susan/biocraps.dmi differ
diff --git a/code/WorkInProgress/Susan/desert.dmi b/code/WorkInProgress/Susan/desert.dmi
new file mode 100644
index 0000000000..439f5630f0
Binary files /dev/null and b/code/WorkInProgress/Susan/desert.dmi differ
diff --git a/code/WorkInProgress/Susan/susan_desert_turfs.dm b/code/WorkInProgress/Susan/susan_desert_turfs.dm
new file mode 100644
index 0000000000..472510abed
--- /dev/null
+++ b/code/WorkInProgress/Susan/susan_desert_turfs.dm
@@ -0,0 +1,497 @@
+//this is everything i'm going to be using in my outpost zeta map, and possibly future maps.
+
+turf/unsimulated/desert
+ name = "desert"
+ icon = 'desert.dmi'
+ icon_state = "desert"
+ temperature = 393.15
+ luminosity = 5
+ brightness_on = 1
+ lighting_lumcount = 8
+
+turf/unsimulated/desert/New()
+ icon_state = "desert[rand(0,4)]"
+
+/area/awaymission/labs/researchdivision
+ name = "Research"
+ icon_state = "away3"
+
+/area/awaymission/labs/militarydivision
+ name = "Military"
+ icon_state = "away2"
+
+/area/awaymission/labs/gateway
+ name = "Gateway"
+ icon_state = "away1"
+
+/area/awaymission/labs/command
+ name = "Command"
+ icon_state = "away"
+
+/area/awaymission/labs/civilian
+ name = "Civilian"
+ icon_state = "away3"
+
+/area/awaymission/labs/cargo
+ name = "Cargo"
+ icon_state = "away2"
+
+/area/awaymission/labs/medical
+ name = "Medical"
+ icon_state = "away1"
+
+/area/awaymission/labs/security
+ name = "Security"
+ icon_state = "away"
+
+/area/awaymission/labs/solars
+ name = "Solars"
+ icon_state = "away3"
+
+/area/awaymission/labs/cave
+ name = "Caves"
+ icon_state = "away2"
+
+//corpses and possibly other decorative items
+
+/obj/effect/landmark/corpse/alien/New() //Creates a mob and checks for gear in each slot before attempting to equip it.
+ var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
+ M.dna.mutantrace = "lizard"
+ M.real_name = src.name
+ M.stat = 2 //Kills the new mob
+ if(src.corpseuniform)
+ M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
+ if(src.corpsesuit)
+ M.equip_to_slot_or_del(new src.corpsesuit(M), slot_wear_suit)
+ if(src.corpseshoes)
+ M.equip_to_slot_or_del(new src.corpseshoes(M), slot_shoes)
+ if(src.corpsegloves)
+ M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
+ if(src.corpseradio)
+ M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
+ if(src.corpseglasses)
+ M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
+ if(src.corpsemask)
+ M.equip_to_slot_or_del(new src.corpsemask(M), slot_wear_mask)
+ if(src.corpsehelmet)
+ M.equip_to_slot_or_del(new src.corpsehelmet(M), slot_head)
+ if(src.corpsebelt)
+ M.equip_to_slot_or_del(new src.corpsebelt(M), slot_belt)
+ if(src.corpsepocket1)
+ M.equip_to_slot_or_del(new src.corpsepocket1(M), slot_r_store)
+ if(src.corpsepocket2)
+ M.equip_to_slot_or_del(new src.corpsepocket2(M), slot_l_store)
+ if(src.corpseback)
+ M.equip_to_slot_or_del(new src.corpseback(M), slot_back)
+ if(src.corpseid == 1)
+ var/obj/item/weapon/card/id/W = new(M)
+ W.name = "[M.real_name]'s ID Card"
+ if(src.corpseidicon)
+ W.icon_state = corpseidicon
+ if(src.corpseidaccess)
+ W.access = get_access(corpseidaccess)
+ if(corpseidjob)
+ W.assignment = corpseidjob
+ W.registered_name = M.real_name
+ M.equip_to_slot_or_del(W, slot_wear_id)
+ del(src)
+
+/obj/effect/landmark/corpse/alien/cargo
+ name = "Cargo Technician"
+ corpseuniform = /obj/item/clothing/under/rank/cargo
+ corpseradio = /obj/item/device/radio/headset/headset_cargo
+ corpseid = 1
+ corpseidjob = "Cargo Technician"
+ corpseidaccess = "Quartermaster"
+
+/obj/effect/landmark/corpse/alien/laborer
+ name = "Laborer"
+ corpseuniform = /obj/item/clothing/under/overalls
+ corpseradio = /obj/item/device/radio/headset/headset_eng
+ corpseback = /obj/item/weapon/storage/backpack/industrial
+ corpsebelt = /obj/item/weapon/storage/belt/utility/full
+ corpsehelmet = /obj/item/clothing/head/hardhat
+ corpseid = 1
+ corpseidjob = "Laborer"
+ corpseidaccess = "Engineer"
+
+/obj/effect/landmark/corpse/alien/testsubject
+ name = "Unfortunate Test Subject"
+ corpseuniform = /obj/item/clothing/under/color/white
+ corpseid = 0
+
+/obj/effect/landmark/corpse/overseer
+ name = "Overseer"
+ corpseuniform = /obj/item/clothing/under/rank/navyhead_of_security
+ corpsesuit = /obj/item/clothing/suit/armor/hosnavycoat
+ corpseradio = /obj/item/device/radio/headset/heads/captain
+ corpsegloves = /obj/item/clothing/gloves/black/hos
+ corpseshoes = /obj/item/clothing/shoes/swat
+ corpsehelmet = /obj/item/clothing/head/beret/navyhos
+ corpseglasses = /obj/item/clothing/glasses/eyepatch
+ corpseid = 1
+ corpseidjob = "Facility Overseer"
+ corpseidaccess = "Captain"
+
+/obj/effect/landmark/corpse/officer
+ name = "Security Officer"
+ corpseuniform = /obj/item/clothing/under/rank/navysecurity
+ corpsesuit = /obj/item/clothing/suit/armor/navysecvest
+ corpseradio = /obj/item/device/radio/headset/headset_sec
+ corpseshoes = /obj/item/clothing/shoes/swat
+ corpsehelmet = /obj/item/clothing/head/beret/navysec
+ corpseid = 1
+ corpseidjob = "Security Officer"
+ corpseidaccess = "Security Officer"
+
+/*
+ * Weeds
+ */
+#define NODERANGE 1
+
+/obj/effect/alien/flesh/weeds
+ name = "Fleshy Growth"
+ desc = "A pulsating grouping of odd, alien tissues. It's almost like it has a heartbeat..."
+ icon = 'biocraps.dmi'
+ icon_state = "flesh"
+
+ anchored = 1
+ density = 0
+ var/health = 15
+ var/obj/effect/alien/weeds/node/linked_node = null
+
+/obj/effect/alien/flesh/weeds/node
+ icon_state = "fleshnode"
+ icon = 'biocraps.dmi'
+ name = "Throbbing Pustule"
+ desc = "A grotquese, oozing, pimple-like growth. You swear you can see something moving around in the bulb..."
+ luminosity = NODERANGE
+ var/node_range = NODERANGE
+
+/obj/effect/alien/flesh/weeds/node/New()
+ ..(src.loc, src)
+
+
+/obj/effect/alien/flesh/weeds/New(pos, node)
+ ..()
+ linked_node = node
+ if(istype(loc, /turf/space))
+ del(src)
+ return
+ if(icon_state == "flesh")icon_state = pick("flesh", "flesh1", "flesh2")
+ spawn(rand(150, 200))
+ if(src)
+ Life()
+ return
+
+/obj/effect/alien/flesh/weeds/proc/Life()
+ set background = 1
+ var/turf/U = get_turf(src)
+/*
+ if (locate(/obj/movable, U))
+ U = locate(/obj/movable, U)
+ if(U.density == 1)
+ del(src)
+ return
+
+Alien plants should do something if theres a lot of poison
+ if(U.poison> 200000)
+ health -= round(U.poison/200000)
+ update()
+ return
+*/
+ if (istype(U, /turf/space))
+ del(src)
+ return
+
+ direction_loop:
+ for(var/dirn in cardinal)
+ var/turf/T = get_step(src, dirn)
+
+ if (!istype(T) || T.density || locate(/obj/effect/alien/flesh/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
+ continue
+
+ if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
+ return
+
+ // if (locate(/obj/movable, T)) // don't propogate into movables
+ // continue
+
+ for(var/obj/O in T)
+ if(O.density)
+ continue direction_loop
+
+ new /obj/effect/alien/flesh/weeds(T, linked_node)
+
+
+/obj/effect/alien/flesh/weeds/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ if(2.0)
+ if (prob(50))
+ del(src)
+ if(3.0)
+ if (prob(5))
+ del(src)
+ return
+
+/obj/effect/alien/flesh/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
+ if(W.attack_verb.len)
+ visible_message("\red \The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
+ else
+ visible_message("\red \The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
+
+ var/damage = W.force / 4.0
+
+ if(istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+
+ if(WT.remove_fuel(0, user))
+ damage = 15
+ playsound(loc, 'sound/items/Welder.ogg', 100, 1)
+
+ health -= damage
+ healthcheck()
+
+/obj/effect/alien/flesh/weeds/proc/healthcheck()
+ if(health <= 0)
+ del(src)
+
+
+/obj/effect/alien/flesh/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > 300)
+ health -= 5
+ healthcheck()
+
+/*/obj/effect/alien/weeds/burn(fi_amount)
+ if (fi_amount > 18000)
+ spawn( 0 )
+ del(src)
+ return
+ return 0
+ return 1
+*/
+
+#undef NODERANGE
+
+//clothing, weapons, and other items that can be worn or used in some way
+
+/obj/item/clothing/under/rank/navywarden
+ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the word \"Warden\" written on the shoulders."
+ name = "warden's jumpsuit"
+ icon_state = "wardendnavyclothes"
+ item_state = "wardendnavyclothes"
+ color = "wardendnavyclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/under/rank/navysecurity
+ name = "security officer's jumpsuit"
+ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection."
+ icon_state = "officerdnavyclothes"
+ item_state = "officerdnavyclothes"
+ color = "officerdnavyclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/under/rank/navyhead_of_security
+ desc = "It's a jumpsuit worn by those few with the dedication to achieve the position of \"Head of Security\". It has additional armor to protect the wearer."
+ name = "head of security's jumpsuit"
+ icon_state = "hosdnavyclothes"
+ item_state = "hosdnavyclothes"
+ color = "hosdnavyclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/suit/armor/hosnavycoat
+ name = "armored coat"
+ desc = "A coat enchanced with a special alloy for some protection and style."
+ icon_state = "hosdnavyjacket"
+ item_state = "armor"
+ armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
+
+/obj/item/clothing/head/beret/navysec
+ name = "security beret"
+ desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety."
+ icon_state = "officerberet"
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/head/beret/navywarden
+ name = "warden's beret"
+ desc = "A beret with a two-colored security insignia emblazoned on it. For wardens that are more inclined towards style than safety."
+ icon_state = "wardenberet"
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/head/beret/navyhos
+ name = "security head's beret"
+ desc = "A stylish beret bearing a golden insignia that proudly displays the security coat of arms. A commander's must-have."
+ icon_state = "hosberet"
+ flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/suit/armor/navysecvest
+ name = "armored coat"
+ desc = "An armored coat that protects against some damage."
+ icon_state = "officerdnavyjacket"
+ item_state = "armor"
+ flags = FPRINT | TABLEPASS
+ armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
+
+/obj/item/clothing/suit/armor/navywardenvest
+ name = "Warden's jacket"
+ desc = "An armoured jacket with silver rank pips and livery."
+ icon_state = "wardendnavyjacket"
+ item_state = "armor"
+ flags = FPRINT | TABLEPASS
+ armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
+
+//hostile entities or npcs
+
+/obj/item/projectile/slimeglob
+ icon = 'projectiles.dmi'
+ icon_state = "toxin"
+ damage = 20
+ damage_type = BRUTE
+
+/obj/effect/critter/fleshmonster
+ name = "Fleshy Horror"
+ desc = "A grotesque, shambling fleshy horror... was this once a... a person?"
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "horror"
+ health = 120
+ max_health = 120
+ aggressive = 1
+ defensive = 1
+ wanderer = 1
+ opensdoors = 1
+ atkcarbon = 1
+ atksilicon = 1
+ atkcritter = 1
+ atksame = 0
+ atkmech = 1
+ firevuln = 0.5
+ brutevuln = 1
+ seekrange = 25
+ armor = 15
+ melee_damage_lower = 12
+ melee_damage_upper = 17
+ angertext = "shambles"
+ attacktext = "slashes"
+ var/ranged = 0
+ var/rapid = 0
+ proc
+ Shoot(var/target, var/start, var/user, var/bullet = 0)
+ OpenFire(var/thing)//bluh ill rename this later or somethin
+
+
+ Die()
+ if (!src.alive) return
+ src.alive = 0
+ walk_to(src,0)
+ src.visible_message("[src] disintegrates into mush!")
+ playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
+ var/turf/Ts = get_turf(src)
+ new /obj/effect/decal/cleanable/blood(Ts)
+ del(src)
+
+ seek_target()
+ src.anchored = 0
+ var/T = null
+ for(var/mob/living/C in view(src.seekrange,src))//TODO: mess with this
+ if (src.target)
+ src.task = "chasing"
+ break
+ if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100)) continue
+ if(istype(C, /mob/living/carbon/) && !src.atkcarbon) continue
+ if(istype(C, /mob/living/silicon/) && !src.atksilicon) continue
+ if(C.health < 0) continue
+ if(istype(C, /mob/living/carbon/) && src.atkcarbon)
+ if(C:mind)
+ if(C:mind:special_role == "H.I.V.E")
+ continue
+ src.attack = 1
+ if(istype(C, /mob/living/silicon/) && src.atksilicon)
+ if(C:mind)
+ if(C:mind:special_role == "H.I.V.E")
+ continue
+ src.attack = 1
+ if(src.attack)
+ T = C
+ break
+
+ if(!src.attack)
+ for(var/obj/effect/critter/C in view(src.seekrange,src))
+ if(istype(C, /obj/effect/critter) && !src.atkcritter) continue
+ if(C.health <= 0) continue
+ if(istype(C, /obj/effect/critter) && src.atkcritter)
+ if((istype(C, /obj/effect/critter/hivebot) && !src.atksame) || (C == src)) continue
+ T = C
+ break
+
+ for(var/obj/mecha/M in view(src.seekrange,src))
+ if(istype(M, /obj/mecha) && !src.atkmech) continue
+ if(M.health <= 0) continue
+ if(istype(M, /obj/mecha) && src.atkmech) src.attack = 1
+ if(src.attack)
+ T = M
+ break
+
+ if(src.attack)
+ src.target = T
+ src.oldtarget_name = T:name
+ if(src.ranged)
+ OpenFire(T)
+ return
+ src.task = "chasing"
+ return
+
+
+ OpenFire(var/thing)
+ src.target = thing
+ src.oldtarget_name = thing:name
+ for(var/mob/O in viewers(src, null))
+ O.show_message("\red [src] spits a glob at [src.target]!", 1)
+
+ var/tturf = get_turf(target)
+ if(rapid)
+ spawn(1)
+ Shoot(tturf, src.loc, src)
+ spawn(4)
+ Shoot(tturf, src.loc, src)
+ spawn(6)
+ Shoot(tturf, src.loc, src)
+ else
+ Shoot(tturf, src.loc, src)
+
+ src.attack = 0
+ sleep(12)
+ seek_target()
+ src.task = "thinking"
+ return
+
+
+ Shoot(var/target, var/start, var/user, var/bullet = 0)
+ if(target == start)
+ return
+
+ var/obj/item/projectile/slimeglob/A = new /obj/item/projectile/slimeglob(user:loc)
+ playsound(user, 'sound/weapons/bite.ogg', 100, 1)
+
+ if(!A) return
+
+ if (!istype(target, /turf))
+ del(A)
+ return
+ A.current = target
+ A.yo = target:y - start:y
+ A.xo = target:x - start:x
+ spawn( 0 )
+ A.process()
+ return
+
+obj/effect/critter/fleshmonster/fleshslime
+ name = "Flesh Slime"
+ icon = 'biocraps.dmi'
+ icon_state = "livingflesh"
+ desc = "A creature that appears to be made out of living tissue strewn together haphazardly. Some kind of liquid bubbles from its maw."
+ ranged = 1
\ No newline at end of file
diff --git a/code/WorkInProgress/buildmode.dm b/code/WorkInProgress/buildmode.dm
index 0c42c913d5..5e4a45e21a 100644
--- a/code/WorkInProgress/buildmode.dm
+++ b/code/WorkInProgress/buildmode.dm
@@ -149,13 +149,13 @@
if(objholder in removed_paths)
alert("That path is not allowed.")
objholder = "/obj/structure/closet"
- else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
+ else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
objholder = "/obj/structure/closet"
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
- if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))
+ if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return
@@ -186,28 +186,28 @@
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
if(istype(object,/turf/space))
var/turf/T = object
- T.ReplaceWithFloor()
+ T.ChangeTurf(/turf/simulated/floor)
return
else if(istype(object,/turf/simulated/floor))
var/turf/T = object
- T.ReplaceWithWall()
+ T.ChangeTurf(/turf/simulated/wall)
return
else if(istype(object,/turf/simulated/wall))
var/turf/T = object
- T.ReplaceWithRWall()
+ T.ChangeTurf(/turf/simulated/wall/r_wall)
return
else if(pa.Find("right"))
if(istype(object,/turf/simulated/wall))
var/turf/T = object
- T.ReplaceWithFloor()
+ T.ChangeTurf(/turf/simulated/floor)
return
else if(istype(object,/turf/simulated/floor))
var/turf/T = object
- T.ReplaceWithSpace()
+ T.ChangeTurf(/turf/space)
return
else if(istype(object,/turf/simulated/wall/r_wall))
var/turf/T = object
- T.ReplaceWithWall()
+ T.ChangeTurf(/turf/simulated/wall)
return
else if(istype(object,/obj))
del(object)
@@ -235,7 +235,6 @@
if(pa.Find("left"))
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
- blink(A)
else if(pa.Find("right"))
if(isobj(object)) del(object)
@@ -244,14 +243,12 @@
if(object.vars.Find(holder.buildmode.varholder))
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
- blink(object)
else
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
if(pa.Find("right"))
if(object.vars.Find(holder.buildmode.varholder))
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
- blink(object)
else
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
@@ -262,8 +259,3 @@
if(holder.throw_atom)
holder.throw_atom.throw_at(object, 10, 1)
-/proc/blink(atom/A)
- A.icon += rgb(0,75,75)
- spawn(5)
- if(A)
- A.icon = initial(A.icon)
diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm
index 3b1401708d..404afdbb85 100644
--- a/code/WorkInProgress/surgery.dm
+++ b/code/WorkInProgress/surgery.dm
@@ -1,12 +1,3 @@
-
-//check if mob is lying down on something we can operate him on.
-/proc/can_operate(mob/living/carbon/M)
- return (locate(/obj/machinery/optable, M.loc) && M.resting) || \
- (locate(/obj/structure/stool/bed/roller, M.loc) && \
- (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || \
- (locate(/obj/structure/table/, M.loc) && \
- (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))
-
/datum/surgery_status/
var/eyes = 0
var/face = 0
@@ -49,7 +40,7 @@
var/can_infect = 0
// Build this list by iterating over all typesof(/datum/surgery_step) and sorting the results by priority
-var/global/list/surgery_steps = null
+
proc/build_surgery_steps_list()
surgery_steps = list()
@@ -88,6 +79,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/generic/cut_open
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
@@ -116,9 +108,12 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!")
affected.createwound(CUT, 10)
+ if (ishuman(user))
+ user:bloody_hands(target, 0)
/datum/surgery_step/generic/clamp_bleeders
required_tool = /obj/item/weapon/hemostat
+ allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 40
max_duration = 60
@@ -145,9 +140,12 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
affected.createwound(CUT, 10)
+ if (ishuman(user))
+ user:bloody_hands(target, 0)
/datum/surgery_step/generic/retract_skin
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 30
max_duration = 40
@@ -181,6 +179,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message(msg, self_msg)
affected.open = 2
spread_germs_to_organ(affected, user)
+ if (prob(40)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -197,6 +196,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/generic/cauterize
required_tool = /obj/item/weapon/cautery
+ allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
@@ -242,6 +242,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/appendectomy/cut_appendix
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 70
max_duration = 90
@@ -258,15 +259,19 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
"\blue You have separated [target]'s appendix with \the [tool].")
target.op_stage.appendix = 1
+ if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/groin = target.get_organ("groin")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
- groin.createwound(CUT, 50)
+ groin.createwound(CUT, 50, 1)
+ if (ishuman(user))
+ user:bloody_body(target)
/datum/surgery_step/appendectomy/remove_appendix
required_tool = /obj/item/weapon/hemostat
+ allowed_tools = list(/obj/item/weapon/wirecutters)
min_duration = 60
max_duration = 80
@@ -292,6 +297,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
else
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
target.op_stage.appendix = 2
+ if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -307,6 +313,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/fix_vein
required_tool = /obj/item/weapon/FixOVein
+ allowed_tools = list(/obj/item/weapon/cable_coil)
min_duration = 70
max_duration = 90
@@ -335,6 +342,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
affected.update_damages()
+ if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -349,6 +357,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/glue_bone
required_tool = /obj/item/weapon/bonegel
+ allowed_tools = list(/obj/item/weapon/screwdriver)
min_duration = 50
max_duration = 60
@@ -370,6 +379,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
affected.stage = 1
spread_germs_to_organ(affected, user)
+ if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -378,6 +388,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/set_bone
required_tool = /obj/item/weapon/bonesetter
+ allowed_tools = list(/obj/item/weapon/wrench)
min_duration = 60
max_duration = 70
@@ -413,6 +424,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/mend_skull
required_tool = /obj/item/weapon/bonesetter
+ allowed_tools = list(/obj/item/weapon/wrench)
min_duration = 60
max_duration = 70
@@ -442,6 +454,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/finish_bone
required_tool = /obj/item/weapon/bonegel
+ allowed_tools = list(/obj/item/weapon/screwdriver)
min_duration = 50
max_duration = 60
@@ -464,6 +477,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
affected.stage = 0
affected.perma_injury = 0
spread_germs_to_organ(affected, user)
+ if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -485,6 +499,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/eye/cut_open
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
@@ -509,6 +524,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/eye/lift_eyes
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 30
max_duration = 40
@@ -533,6 +549,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/eye/mend_eyes
required_tool = /obj/item/weapon/hemostat
+ allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 80
max_duration = 100
@@ -557,6 +574,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/eye/cauterize
required_tool = /obj/item/weapon/cautery
+ allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
@@ -598,6 +616,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/generic/cut_face
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 90
max_duration = 110
@@ -623,6 +642,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/face/mend_vocal
required_tool = /obj/item/weapon/hemostat
+ allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
min_duration = 70
max_duration = 90
@@ -643,9 +663,13 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
"\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
target.losebreath += 10
+ if (ishuman(user))
+ user:bloody_body(target)
+ user:bloody_hands(target, 0)
/datum/surgery_step/face/fix_face
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 80
max_duration = 100
@@ -670,6 +694,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/face/cauterize
required_tool = /obj/item/weapon/cautery
+ allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 70
max_duration = 100
@@ -731,6 +756,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/brain/cut_brain
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 80
max_duration = 100
@@ -750,7 +776,10 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
- target.apply_damage(50, BRUTE, "head")
+ target.apply_damage(50, BRUTE, "head", 1)
+ if (ishuman(user))
+ user:bloody_body(target)
+ user:bloody_hands(target, 0)
/datum/surgery_step/brain/saw_spine
required_tool = /obj/item/weapon/circular_saw
@@ -785,7 +814,10 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
- target.apply_damage(30, BRUTE, "head")
+ target.apply_damage(30, BRUTE, "head", 1)
+ if (ishuman(user))
+ user:bloody_body(target)
+ user:bloody_hands(target, 0)
//////////////////////////////////////////////////////////////////
@@ -798,6 +830,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/metroid/cut_flesh
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 30
max_duration = 50
@@ -820,6 +853,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/metroid/cut_innards
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 30
max_duration = 50
@@ -887,6 +921,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/limb/cut
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 80
max_duration = 100
@@ -913,6 +948,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/limb/mend
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
min_duration = 80
max_duration = 100
@@ -943,6 +979,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/limb/prepare
required_tool = /obj/item/weapon/cautery
+ allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
min_duration = 60
max_duration = 70
@@ -1045,6 +1082,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/ribcage/retract_ribcage
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/crowbar)
min_duration = 30
max_duration = 40
@@ -1069,6 +1107,9 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
var/datum/organ/external/affected = target.get_organ(target_zone)
affected.fracture()
+ if (ishuman(user))
+ user:bloody_hands(target, 0)
+
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
@@ -1078,6 +1119,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
/datum/surgery_step/ribcage/close_ribcage
required_tool = /obj/item/weapon/retractor
+ allowed_tools = list(/obj/item/weapon/crowbar)
min_duration = 20
max_duration = 40
@@ -1151,8 +1193,11 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
for(var/datum/disease/alien_embryo in target.viruses)
alien_embryo.cure()
+ if (ishuman(user)) user:bloody_hands(target, 0)
+
/datum/surgery_step/ribcage/fix_lungs
required_tool = /obj/item/weapon/scalpel
+ allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
min_duration = 70
max_duration = 90
@@ -1170,10 +1215,14 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
affected.ruptured_lungs = 0
+ if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!")
affected.createwound(CUT, 20)
+ if (ishuman(user))
+ user:bloody_hands(target, 0)
+ user:bloody_body(target)
diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm
index 7950389ad3..3d8954fc99 100644
--- a/code/WorkInProgress/virus2/base.dm
+++ b/code/WorkInProgress/virus2/base.dm
@@ -235,7 +235,6 @@ proc/airborne_can_reach(turf/source, turf/target)
if(prob(1))
majormutate()
if(mob.reagents.has_reagent("spaceacillin"))
- mob.reagents.remove_reagent("spaceacillin",0.3)
return
if(mob.reagents.has_reagent("virusfood"))
mob.reagents.remove_reagent("virusfood",0.1)
@@ -599,4 +598,4 @@ proc/airborne_can_reach(turf/source, turf/target)
getrandomeffect_greater()
/proc/dprob(var/p)
- return(prob(sqrt(p)) && prob(sqrt(p)))
\ No newline at end of file
+ return(prob(sqrt(p)) && prob(sqrt(p)))
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 661fe74d9b..e2edcaac7a 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -133,15 +133,16 @@ proc/Airflow(zone/A, zone/B)
else
connected_turfs |= C.B
- //Get lists of things that can be thrown across the room for each zone.
- var/list/pplz = B.movables()
- var/list/otherpplz = A.movables()
+ //Get lists of things that can be thrown across the room for each zone (assumes air is moving from zone B to zone A)
+ var/list/air_sucked = B.movables()
+ var/list/air_repelled = A.movables()
if(n < 0)
- var/list/temporary_pplz = pplz
- pplz = otherpplz
- otherpplz = temporary_pplz
+ //air is moving from zone A to zone B
+ var/list/temporary_pplz = air_sucked
+ air_sucked = air_repelled
+ air_repelled = temporary_pplz
- for(var/atom/movable/M in pplz)
+ for(var/atom/movable/M in air_sucked)
if(M.last_airflow > world.time - vsc.airflow_delay) continue
@@ -166,7 +167,7 @@ proc/Airflow(zone/A, zone/B)
spawn M.GotoAirflowDest(abs(n)/5)
//Do it again for the stuff in the other zone, making it fly away.
- for(var/atom/movable/M in otherpplz)
+ for(var/atom/movable/M in air_repelled)
if(M.last_airflow > world.time - vsc.airflow_delay) continue
@@ -240,12 +241,15 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
- if(src:nodamage) return
+ if(src:nodamage)
+ return
if(istype(src, /mob/living/carbon/human))
- if(istype(src, /mob/living/carbon/human))
- if(src:buckled) return
- if(src:shoes)
- if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
+ if(src:buckled)
+ return
+ if(src:shoes)
+ if(src:shoes.type == /obj/item/clothing/shoes/magboots)
+ if(src:shoes.flags & NOSLIP)
+ return
src << "\red You are sucked away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
if(airflow_falloff < 1)
@@ -266,9 +270,15 @@ atom/movable
airflow_speed -= vsc.airflow_speed_decay
if(airflow_speed > 7)
if(airflow_time++ >= airflow_speed - 7)
+ if(od)
+ density = 0
sleep(1 * tick_multiplier)
else
+ if(od)
+ density = 0
sleep(max(1,10-(airflow_speed+3)) * tick_multiplier)
+ if(od)
+ density = 1
if ((!( src.airflow_dest ) || src.loc == src.airflow_dest))
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
@@ -276,7 +286,8 @@ atom/movable
if(!istype(loc, /turf))
return
step_towards(src, src.airflow_dest)
- if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
+ if(ismob(src) && src:client)
+ src:client:move_delay = world.time + vsc.airflow_mob_slowdown
airflow_dest = null
airflow_speed = 0
airflow_time = 0
@@ -295,12 +306,15 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
- if(src:nodamage) return
+ if(src:nodamage)
+ return
if(istype(src, /mob/living/carbon/human))
- if(istype(src, /mob/living/carbon/human))
- if(src:buckled) return
- if(src:shoes)
- if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
+ if(src:buckled)
+ return
+ if(src:shoes)
+ if(src:shoes.type == /obj/item/clothing/shoes/magboots)
+ if(src:shoes.flags & NOSLIP)
+ return
src << "\red You are pushed away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
if(airflow_falloff < 1)
@@ -331,7 +345,8 @@ atom/movable
if(!istype(loc, /turf))
return
step_towards(src, src.airflow_dest)
- if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
+ if(ismob(src) && src:client)
+ src:client:move_delay = world.time + vsc.airflow_mob_slowdown
airflow_dest = null
airflow_speed = 0
airflow_time = 0
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 9b02ec553e..592be10d06 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -280,8 +280,8 @@ pl_control
else if(istext(vars["[V]_RANDOM"]))
var/txt = vars["[V]_RANDOM"]
if(findtextEx(txt,"PROB"))
- txt = dd_text2list(txt,"/")
- txt[1] = dd_replacetext(txt[1],"PROB","")
+ txt = text2list(txt,"/")
+ txt[1] = replacetext(txt[1],"PROB","")
var/p = text2num(txt[1])
var/r = txt[2]
if(prob(p))
@@ -289,8 +289,8 @@ pl_control
else
newvalue = vars[V]
else if(findtextEx(txt,"PICK"))
- txt = dd_replacetext(txt,"PICK","")
- txt = dd_text2list(txt,",")
+ txt = replacetext(txt,"PICK","")
+ txt = text2list(txt,",")
newvalue = pick(txt)
else
newvalue = roll(txt)
diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm
index afda25eba8..17867abf26 100644
--- a/code/ZAS/ZAS_Zones.dm
+++ b/code/ZAS/ZAS_Zones.dm
@@ -16,6 +16,9 @@ zone
last_update = 0
progress = "nothing"
+ // To make sure you're not spammed to death by airflow sound effects
+ tmp/playsound_cooldown = 0
+
//CREATION AND DELETION
New(turf/start)
. = ..()
@@ -33,7 +36,7 @@ zone
if(!istype(T,/turf/simulated))
AddTurf(T)
- //Generate the gas_mixture for use in this zone by using the average of the gases
+ //Generate the gas_mixture for use in txhis zone by using the average of the gases
//defined at startup.
air = new
var/members = contents.len
@@ -161,6 +164,16 @@ zone/proc/process()
RemoveTurf(T)
if(unsimulated_tiles)
var/moved_air = ShareSpace(air,unsimulated_tiles)
+
+ // Only play a sound effect every once in a while
+ if(playsound_cooldown <= world.time)
+ // Play a nice sound effect at one of the bordering turfs
+
+ playsound_cooldown = world.time + rand(30, 70)
+
+ var/turf/random_border = pick(contents)
+ play_wind_sound(random_border, abs(moved_air))
+
if(moved_air > vsc.airflow_lightest_pressure)
AirflowSpace(src)
@@ -239,7 +252,17 @@ zone/proc/process()
for(var/zone/Z in connected_zones)
if(air && Z.air)
//Ensure we're not doing pointless calculations on equilibrium zones.
- if(abs(air.total_moles() - Z.air.total_moles()) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
+ var/moles_delta = abs(air.total_moles() - Z.air.total_moles())
+ if(moles_delta > 0.1)
+ // Only play a sound effect every once in a while
+ if(playsound_cooldown <= world.time)
+ // Play a nice sound effect at one of the bordering turfs
+
+ playsound_cooldown = world.time + rand(30, 70)
+
+ var/turf/random_border = pick(contents)
+ play_wind_sound(random_border, abs(moles_delta))
+ if(moles_delta > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
Airflow(src,Z)
ShareRatio( air , Z.air , connected_zones[Z] )
@@ -255,7 +278,7 @@ var/list/sharing_lookup_table = list(0.06, 0.11, 0.15, 0.18, 0.20, 0.21)
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
- ratio = 0.21
+ ratio = 0.50
size = max(1,A.group_multiplier)
share_size = max(1,B.group_multiplier)
@@ -281,9 +304,6 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
- if(sharing_lookup_table.len >= connecting_tiles) //6 or more interconnecting tiles will max at 42% of air moved per tick.
- ratio = sharing_lookup_table[connecting_tiles]
-
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg )
@@ -338,37 +358,34 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
unsim_temperature += T.temperature/unsimulated_tiles.len
var
- ratio = 0.21
+ // Depressurize very, very fast(it's fine since many rooms are internally multiple zones)
+ ratio = 0.50
old_pressure = A.return_pressure()
size = max(1,A.group_multiplier)
share_size = max(1,unsimulated_tiles.len)
- full_oxy = A.oxygen * size
- full_nitro = A.nitrogen * size
- full_co2 = A.carbon_dioxide * size
- full_plasma = A.toxins * size
+ //full_oxy = A.oxygen * size
+ //full_nitro = A.nitrogen * size
+ //full_co2 = A.carbon_dioxide * size
+ //full_plasma = A.toxins * size
- full_heat_capacity = A.heat_capacity() * size
+ //full_heat_capacity = A.heat_capacity() * size
- oxy_avg = (full_oxy + unsim_oxygen) / (size + share_size)
- nit_avg = (full_nitro + unsim_nitrogen) / (size + share_size)
- co2_avg = (full_co2 + unsim_co2) / (size + share_size)
- plasma_avg = (full_plasma + unsim_plasma) / (size + share_size)
+ oxy_avg = unsim_oxygen//(full_oxy + unsim_oxygen) / (size + share_size)
+ nit_avg = unsim_nitrogen//(full_nitro + unsim_nitrogen) / (size + share_size)
+ co2_avg = unsim_co2//(full_co2 + unsim_co2) / (size + share_size)
+ plasma_avg = unsim_plasma//(full_plasma + unsim_plasma) / (size + share_size)
- temp_avg = (A.temperature * full_heat_capacity + unsim_temperature * unsim_heat_capacity) / (full_heat_capacity + unsim_heat_capacity)
-
- if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
- ratio = sharing_lookup_table[unsimulated_tiles.len]
- ratio *= 2
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg )
A.toxins = max(0, (A.toxins - plasma_avg) * (1-ratio) + plasma_avg )
- A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg )
+ // EXPERIMENTAL: Disable space being cold
+ //A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg )
for(var/datum/gas/G in A.trace_gases)
var/G_avg = (G.moles*size + 0) / (size+share_size)
@@ -458,6 +475,21 @@ zone/proc/Rebuild()
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
T.zone.AddTurf(S)
+proc/play_wind_sound(var/turf/random_border, var/n)
+ if(random_border)
+ var/windsound = 'sound/effects/wind/wind_2_1.ogg'
+ switch(n)
+ if(0 to 30)
+ windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
+ if(31 to 40)
+ windsound = pick('sound/effects/wind/wind_3_1.ogg')
+ if(41 to 60)
+ windsound = pick('sound/effects/wind/wind_4_1.ogg', 'sound/effects/wind/wind_4_2.ogg')
+ if(61 to 1000000)
+ windsound = pick('sound/effects/wind/wind_5_1.ogg')
+
+ playsound(random_border, windsound, 50, 1, 1)
+
//UNUSED
/*
zone/proc/connected_zones()
@@ -474,4 +506,4 @@ zone/proc/connected_zones()
.[Z]++
else
. += Z
- .[Z] = 1*/
\ No newline at end of file
+ .[Z] = 1*/
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
new file mode 100644
index 0000000000..955c5ba300
--- /dev/null
+++ b/code/__HELPERS/files.dm
@@ -0,0 +1,18 @@
+//checks if a file exists and contains text
+//returns text as a string if these conditions are met
+/proc/return_file_text(filename)
+ if(fexists(filename) == 0)
+ error("File not found ([filename])")
+ return
+
+ var/text = file2text(filename)
+ if(!text)
+ error("File empty ([filename])")
+ return
+
+ return text
+
+//Sends resource files to client cache
+/mob/proc/getFiles()
+ for(var/file in args)
+ src << browse_rsc(file)
\ No newline at end of file
diff --git a/code/defines/procs/gamehelpers.dm b/code/__HELPERS/game.dm
similarity index 84%
rename from code/defines/procs/gamehelpers.dm
rename to code/__HELPERS/game.dm
index 864cc3666f..ab258c8e32 100644
--- a/code/defines/procs/gamehelpers.dm
+++ b/code/__HELPERS/game.dm
@@ -280,7 +280,6 @@ proc/isInSight(var/atom/A, var/atom/B)
if(M.ckey == lowertext(key))
return M
return null
-
proc/check_can_reach(atom/user, atom/target)
if(!in_range(user,target))
return 0
@@ -320,3 +319,33 @@ var/list/DummyCache = list()
D.loc = null
DummyCache.Add(D)
return 1
+
+// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
+
+/proc/get_active_candidates(var/buffer = 1)
+
+ var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
+ var/i = 0
+ while(candidates.len <= 0 && i < 5)
+ for(var/mob/dead/observer/G in player_list)
+ if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien
+ if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
+ candidates += G.key
+ i++
+ return candidates
+
+// Same as above but for alien candidates.
+
+/proc/get_alien_candidates()
+
+ var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
+ var/i = 0
+ while(candidates.len <= 0 && i < 5)
+ for(var/mob/dead/observer/G in player_list)
+ if(G.client.be_alien)
+ if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
+ if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
+ candidates += G.key
+ i++
+ return candidates
+
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
new file mode 100644
index 0000000000..47f61c261a
--- /dev/null
+++ b/code/__HELPERS/global_lists.dm
@@ -0,0 +1,42 @@
+var/list/clients = list() //list of all clients
+var/list/admins = list() //list of all clients whom are admins
+var/list/directory = list() //list of all ckeys with associated client
+
+//Since it didn't really belong in any other category, I'm putting this here
+//This is for procs to replace all the goddamn 'in world's that are chilling around the code
+
+var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player
+var/global/list/mob_list = list() //List of all mobs, including clientless
+var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
+var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
+
+var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
+var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
+var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
+var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
+var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
+var/global/list/landmarks_list = list() //list of all landmarks created
+var/global/list/surgery_steps = list() //list of all surgery steps |BS12
+//////////////////////////
+/////Initial Building/////
+//////////////////////////
+
+/proc/make_datum_references_lists()
+ var/list/paths
+ //Hair - Initialise all /datum/sprite_accessory/hair into an list indexed by hair-style name
+ paths = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
+ for(var/path in paths)
+ var/datum/sprite_accessory/hair/H = new path()
+ hair_styles_list[H.name] = H
+ //Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name
+ paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
+ for(var/path in paths)
+ var/datum/sprite_accessory/facial_hair/H = new path()
+ facial_hair_styles_list[H.name] = H
+ //Surgery Steps - Initialize all /datum/surgery_step into a list
+ paths = typesof(/datum/surgery_step)-/datum/surgery_step
+ for(var/T in paths)
+ var/datum/surgery_step/S = new T
+ surgery_steps += S
+
+
diff --git a/code/defines/procs/icon_procs.dm b/code/__HELPERS/icons.dm
similarity index 62%
rename from code/defines/procs/icon_procs.dm
rename to code/__HELPERS/icons.dm
index ce56408ead..cfca598adb 100644
--- a/code/defines/procs/icon_procs.dm
+++ b/code/__HELPERS/icons.dm
@@ -1,8 +1,217 @@
/*
- IconProcs
- by Lummox JR
- Check the icon_procs_readme.dm for how they work.
- */
+IconProcs README
+
+A BYOND library for manipulating icons and colors
+
+by Lummox JR
+
+version 1.0
+
+The IconProcs library was made to make a lot of common icon operations much easier. BYOND's icon manipulation
+routines are very capable but some of the advanced capabilities like using alpha transparency can be unintuitive to beginners.
+
+CHANGING ICONS
+
+Several new procs have been added to the /icon datum to simplify working with icons. To use them,
+remember you first need to setup an /icon var like so:
+
+var/icon/my_icon = new('iconfile.dmi')
+
+icon/ChangeOpacity(amount = 1)
+ A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
+ transparent is usually much easier than making it less so, however. This proc basically is a frontend
+ for MapColors() which can change opacity any way you like, in much the same way that SetIntensity()
+ can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half.
+ If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque.
+icon/GrayScale()
+ Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact.
+icon/ColorTone(tone)
+ Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an
+ RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect.
+ See also the global ColorTone() proc.
+icon/MinColors(icon)
+ The icon is blended with a second icon where the minimum of each RGB pixel is the result.
+ Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon.
+icon/MaxColors(icon)
+ The icon is blended with a second icon where the maximum of each RGB pixel is the result.
+ Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon.
+icon/Opaque(background = "#000000")
+ All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify.
+icon/BecomeAlphaMask()
+ You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc.
+ The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white.
+icon/AddAlphaMask(mask)
+ The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque,
+ the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent.
+ Where the mask is translucent, the current icon becomes more transparent.
+icon/UseAlphaMask(mask, mode)
+ Sometimes you may want to take the alpha values from one icon and use them on a different icon.
+ This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change
+ so it has the same colors as before but uses the mask for opacity.
+
+COLOR MANAGEMENT AND HSV
+
+RGB isn't the only way to represent color. Sometimes it's more useful to work with a model called HSV, which stands for hue, saturation, and value.
+
+ * The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to
+ cyan to blue to magenta and back to red.
+ * The saturation of a color is how much color is in it. A color with low saturation will be more gray,
+ and with no saturation at all it is a shade of gray.
+ * The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark,
+ and no value at all is black.
+
+Just as BYOND uses "#rrggbb" to represent RGB values, a similar format is used for HSV: "#hhhssvv". The hue is three
+hex digits because it ranges from 0 to 0x5FF.
+
+ * 0 to 0xFF - red to yellow
+ * 0x100 to 0x1FF - yellow to green
+ * 0x200 to 0x2FF - green to cyan
+ * 0x300 to 0x3FF - cyan to blue
+ * 0x400 to 0x4FF - blue to magenta
+ * 0x500 to 0x5FF - magenta to red
+
+Knowing this, you can figure out that red is "#000ffff" in HSV format, which is hue 0 (red), saturation 255 (as colorful as possible),
+value 255 (as bright as possible). Green is "#200ffff" and blue is "#400ffff".
+
+More than one HSV color can match the same RGB color.
+
+Here are some procs you can use for color management:
+
+ReadRGB(rgb)
+ Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used
+ that includes alpha, the list will have a fourth item for the alpha value.
+hsv(hue, sat, val, apha)
+ Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa"
+ format. Alpha is not included in the result if null.
+ReadHSV(rgb)
+ Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that
+ includes alpha, the list will have a fourth item for the alpha value.
+RGBtoHSV(rgb)
+ Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff".
+HSVtoRGB(hsv)
+ Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa".
+BlendRGB(rgb1, rgb2, amount)
+ Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result;
+ if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
+ The returned value is an RGB or RGBA color.
+BlendHSV(hsv1, hsv2, amount)
+ Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB
+ blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1,
+ the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
+ The returned value is an HSV or HSVA color.
+BlendRGBasHSV(rgb1, rgb2, amount)
+ Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form.
+HueToAngle(hue)
+ Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue.
+AngleToHue(hue)
+ Converts an angle to a hue in the valid range.
+RotateHue(hsv, angle)
+ Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
+ (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value
+ as the original, but a different hue.
+GrayScale(rgb)
+ Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
+ColorTone(rgb, tone)
+ Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of
+ using strict shades of gray. The tone value is an RGB color; any alpha value is ignored.
+*/
+
+/*
+Get Flat Icon DEMO by DarkCampainger
+
+This is a test for the get flat icon proc, modified approprietly for icons and their states.
+Probably not a good idea to run this unless you want to see how the proc works in detail.
+mob
+ icon = 'old_or_unused.dmi'
+ icon_state = "green"
+
+ Login()
+ // Testing image underlays
+ underlays += image(icon='old_or_unused.dmi',icon_state="red")
+ underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = 32)
+ underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = -32)
+
+ // Testing image overlays
+ overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = -32)
+ overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = 32)
+ overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = -32, pixel_y = -32)
+
+ // Testing icon file overlays (defaults to mob's state)
+ overlays += '_flat_demoIcons2.dmi'
+
+ // Testing icon_state overlays (defaults to mob's icon)
+ overlays += "white"
+
+ // Testing dynamic icon overlays
+ var/icon/I = icon('old_or_unused.dmi', icon_state="aqua")
+ I.Shift(NORTH,16,1)
+ overlays+=I
+
+ // Testing dynamic image overlays
+ I=image(icon=I,pixel_x = -32, pixel_y = 32)
+ overlays+=I
+
+ // Testing object types (and layers)
+ overlays+=/obj/effect/overlayTest
+
+ loc = locate (10,10,1)
+ verb
+ Browse_Icon()
+ set name = "1. Browse Icon"
+ // Give it a name for the cache
+ var/iconName = "[ckey(src.name)]_flattened.dmi"
+ // Send the icon to src's local cache
+ src<