mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Merge pull request #1 from Baystation12/bleeding-edge-freeze
Bleeding edge freeze
This commit is contained in:
+58
-301
@@ -1,275 +1,9 @@
|
||||
// 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 "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/48x48"
|
||||
#define FILE_DIR "icons/effects"
|
||||
#define FILE_DIR "icons/mecha"
|
||||
#define FILE_DIR "icons/misc"
|
||||
#define FILE_DIR "icons/mob"
|
||||
#define FILE_DIR "icons/mob/human_races"
|
||||
#define FILE_DIR "icons/obj"
|
||||
#define FILE_DIR "icons/obj/assemblies"
|
||||
#define FILE_DIR "icons/obj/atmospherics"
|
||||
#define FILE_DIR "icons/obj/clothing"
|
||||
#define FILE_DIR "icons/obj/doors"
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
#define FILE_DIR "icons/spideros_icons"
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#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/hallucinations"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/music"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#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 +16,20 @@
|
||||
#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\maths.dm"
|
||||
#include "code\__HELPERS\mobs.dm"
|
||||
#include "code\__HELPERS\names.dm"
|
||||
#include "code\__HELPERS\sanitize_values.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 +97,23 @@
|
||||
#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\presets.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\heal.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\voice_change.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 +147,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 +254,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 +283,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 +378,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 +390,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 +421,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,10 +483,8 @@
|
||||
#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"
|
||||
#include "code\game\objects\items\weapons\RCD.dm"
|
||||
#include "code\game\objects\items\weapons\RSF.dm"
|
||||
#include "code\game\objects\items\weapons\scrolls.dm"
|
||||
@@ -780,6 +529,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"
|
||||
@@ -798,7 +548,6 @@
|
||||
#include "code\game\objects\structures\morgue.dm"
|
||||
#include "code\game\objects\structures\musician.dm"
|
||||
#include "code\game\objects\structures\noticeboard.dm"
|
||||
#include "code\game\objects\structures\shuttle_engines.dm"
|
||||
#include "code\game\objects\structures\tables_racks.dm"
|
||||
#include "code\game\objects\structures\tank_dispenser.dm"
|
||||
#include "code\game\objects\structures\target_stake.dm"
|
||||
@@ -833,12 +582,9 @@
|
||||
#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"
|
||||
#include "code\game\turfs\simulated\asteroid.dm"
|
||||
#include "code\game\turfs\simulated\beach.dm"
|
||||
#include "code\game\turfs\simulated\floor.dm"
|
||||
#include "code\game\turfs\simulated\floor_types.dm"
|
||||
#include "code\game\turfs\simulated\walls.dm"
|
||||
@@ -856,7 +602,6 @@
|
||||
#include "code\game\vehicles\airtight\space.dm"
|
||||
#include "code\game\verbs\atom_verbs.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
#include "code\game\verbs\sound.dm"
|
||||
#include "code\game\verbs\suicide.dm"
|
||||
#include "code\game\verbs\who.dm"
|
||||
#include "code\js\byjax.dm"
|
||||
@@ -864,6 +609,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"
|
||||
@@ -871,14 +617,13 @@
|
||||
#include "code\modules\admin\create_turf.dm"
|
||||
#include "code\modules\admin\holder2.dm"
|
||||
#include "code\modules\admin\IsBanned.dm"
|
||||
#include "code\modules\admin\mod_panel.dm"
|
||||
#include "code\modules\admin\NewBan.dm"
|
||||
#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,12 +656,14 @@
|
||||
#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"
|
||||
#include "code\modules\assembly\timer.dm"
|
||||
#include "code\modules\awaymissions\bluespaceartillery.dm"
|
||||
#include "code\modules\awaymissions\corpse.dm"
|
||||
#include "code\modules\awaymissions\exile.dm"
|
||||
#include "code\modules\awaymissions\gateway.dm"
|
||||
#include "code\modules\awaymissions\loot.dm"
|
||||
#include "code\modules\awaymissions\pamphlet.dm"
|
||||
@@ -928,6 +675,9 @@
|
||||
#include "code\modules\awaymissions\maploader\writer.dm"
|
||||
#include "code\modules\client\client defines.dm"
|
||||
#include "code\modules\client\client procs.dm"
|
||||
#include "code\modules\client\preferences.dm"
|
||||
#include "code\modules\client\preferences_savefile.dm"
|
||||
#include "code\modules\client\preferences_toggles.dm"
|
||||
#include "code\modules\clothing\clothing.dm"
|
||||
#include "code\modules\clothing\glasses\glasses.dm"
|
||||
#include "code\modules\clothing\glasses\hud.dm"
|
||||
@@ -977,7 +727,6 @@
|
||||
#include "code\modules\critters\critter_AI.dm"
|
||||
#include "code\modules\critters\critter_defenses.dm"
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
@@ -1002,7 +751,7 @@
|
||||
#include "code\modules\mining\mine_turfs.dm"
|
||||
#include "code\modules\mining\mint.dm"
|
||||
#include "code\modules\mining\money_bag.dm"
|
||||
#include "code\modules\mining\ores_materials_coins.dm"
|
||||
#include "code\modules\mining\ores_coins.dm"
|
||||
#include "code\modules\mining\satchel_ore_boxdm.dm"
|
||||
#include "code\modules\mob\death.dm"
|
||||
#include "code\modules\mob\inventory.dm"
|
||||
@@ -1071,6 +820,7 @@
|
||||
#include "code\modules\mob\living\carbon\brain\hud.dm"
|
||||
#include "code\modules\mob\living\carbon\brain\life.dm"
|
||||
#include "code\modules\mob\living\carbon\brain\MMI.dm"
|
||||
#include "code\modules\mob\living\carbon\brain\posibrain.dm"
|
||||
#include "code\modules\mob\living\carbon\brain\say.dm"
|
||||
#include "code\modules\mob\living\carbon\human\death.dm"
|
||||
#include "code\modules\mob\living\carbon\human\emote.dm"
|
||||
@@ -1157,11 +907,11 @@
|
||||
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
||||
#include "code\modules\mob\living\simple_animal\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\corpse.dm"
|
||||
#include "code\modules\mob\living\simple_animal\kobold.dm"
|
||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\shade.dm"
|
||||
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
||||
#include "code\modules\mob\living\simple_animal\syndicate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\worm.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
|
||||
@@ -1171,15 +921,18 @@
|
||||
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\carp.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\faithless.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hivebot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hostile.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\syndicate.dm"
|
||||
#include "code\modules\mob\new_player\hud.dm"
|
||||
#include "code\modules\mob\new_player\login.dm"
|
||||
#include "code\modules\mob\new_player\logout.dm"
|
||||
#include "code\modules\mob\new_player\new_player.dm"
|
||||
#include "code\modules\mob\new_player\poll.dm"
|
||||
#include "code\modules\mob\new_player\preferences.dm"
|
||||
#include "code\modules\mob\new_player\preferences_setup.dm"
|
||||
#include "code\modules\mob\new_player\savefile.dm"
|
||||
#include "code\modules\mob\new_player\skill.dm"
|
||||
#include "code\modules\mob\new_player\sprite_accessories.dm"
|
||||
#include "code\modules\mob\simple_animal\head.dm"
|
||||
@@ -1191,6 +944,7 @@
|
||||
#include "code\modules\paperwork\paperbin.dm"
|
||||
#include "code\modules\paperwork\pen.dm"
|
||||
#include "code\modules\paperwork\photocopier.dm"
|
||||
#include "code\modules\paperwork\photography.dm"
|
||||
#include "code\modules\paperwork\stamps.dm"
|
||||
#include "code\modules\power\apc.dm"
|
||||
#include "code\modules\power\cable.dm"
|
||||
@@ -1359,8 +1113,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 +1137,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
|
||||
|
||||
@@ -88,14 +88,14 @@ obj/machinery/atmospherics/binary/passive_gate
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "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
|
||||
|
||||
@@ -107,14 +107,14 @@ obj/machinery/atmospherics/binary/pump
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "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
|
||||
|
||||
@@ -97,14 +97,14 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
|
||||
"}
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "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
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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 = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[target_pressure]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
|
||||
@@ -395,7 +395,7 @@ obj/machinery/atmospherics/tvalve/mirrored
|
||||
return
|
||||
..()
|
||||
|
||||
//Radio remote control
|
||||
//Radio remote control -eh?
|
||||
|
||||
proc
|
||||
set_frequency(new_frequency)
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
+94
-11
@@ -721,7 +721,7 @@ obj/machinery/atmospherics/pipe
|
||||
|
||||
icon_state = "manifold_[connected]_[unconnected]"
|
||||
|
||||
if(!connected)
|
||||
if(!connected)
|
||||
del(src)
|
||||
|
||||
return
|
||||
@@ -832,7 +832,7 @@ obj/machinery/atmospherics/pipe
|
||||
icon_state = "manifold-y-f"
|
||||
|
||||
manifold4w
|
||||
icon = 'pipe_manifold.dmi'
|
||||
icon = 'icons/obj/atmospherics/pipe_manifold.dmi'
|
||||
icon_state = "manifold4w-f"
|
||||
|
||||
name = "4-way pipe manifold"
|
||||
@@ -841,7 +841,7 @@ obj/machinery/atmospherics/pipe
|
||||
volume = 140
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = EAST|NORTH|WEST|SOUTH
|
||||
initialize_directions = NORTH|SOUTH|EAST|WEST
|
||||
|
||||
var/obj/machinery/atmospherics/node1
|
||||
var/obj/machinery/atmospherics/node2
|
||||
@@ -849,6 +849,7 @@ obj/machinery/atmospherics/pipe
|
||||
var/obj/machinery/atmospherics/node4
|
||||
|
||||
level = 1
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
@@ -862,7 +863,7 @@ obj/machinery/atmospherics/pipe
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
machines.Remove(src)
|
||||
. = PROCESS_KILL
|
||||
/*
|
||||
if(!node1)
|
||||
parent.mingle_with_turf(loc, 70)
|
||||
@@ -913,14 +914,13 @@ obj/machinery/atmospherics/pipe
|
||||
if(reference == node4)
|
||||
if(istype(node4, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
node3 = null
|
||||
node4 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
overlays = new()
|
||||
if(node1&&node2&&node3&&node4)
|
||||
var/C = ""
|
||||
switch(color)
|
||||
@@ -934,7 +934,7 @@ obj/machinery/atmospherics/pipe
|
||||
|
||||
else
|
||||
icon_state = "manifold4w_ex"
|
||||
var/icon/con = new/icon('pipe_manifold.dmi',"manifold4w_con")
|
||||
var/icon/con = new/icon('pipe_manifold.dmi',"manifold4w_con") //Since 4-ways are supposed to be directionless, they need an overlay instead it seems.
|
||||
|
||||
if(node1)
|
||||
overlays += new/image(con,dir=1)
|
||||
@@ -950,23 +950,24 @@ obj/machinery/atmospherics/pipe
|
||||
return
|
||||
|
||||
initialize()
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,1))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if(target.initialize_directions & 2)
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,2))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if(target.initialize_directions & 1)
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,4))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if(target.initialize_directions & 8)
|
||||
node3 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,8))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if(target.initialize_directions & 4)
|
||||
node4 = target
|
||||
break
|
||||
|
||||
@@ -1026,6 +1027,88 @@ obj/machinery/atmospherics/pipe
|
||||
manifold4w/general/hidden
|
||||
level = 1
|
||||
icon_state = "manifold4w-f"
|
||||
|
||||
cap
|
||||
name = "pipe endcap"
|
||||
desc = "An endcap for pipes"
|
||||
icon = 'pipes.dmi'
|
||||
icon_state = "cap"
|
||||
level = 2
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
volume = 35
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = NORTH
|
||||
|
||||
var/obj/machinery/atmospherics/node
|
||||
|
||||
New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
initialize_directions = NORTH
|
||||
if(NORTH)
|
||||
initialize_directions = SOUTH
|
||||
if(WEST)
|
||||
initialize_directions = EAST
|
||||
if(EAST)
|
||||
initialize_directions = WEST
|
||||
|
||||
hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
pipeline_expansion()
|
||||
return list(node)
|
||||
|
||||
process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
Del()
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
|
||||
..()
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node)
|
||||
if(istype(node, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
node = null
|
||||
|
||||
update_icon()
|
||||
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
overlays = new()
|
||||
|
||||
icon_state = "cap[invisibility ? "-f" : ""]"
|
||||
return
|
||||
|
||||
initialize()
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
hide(T.intact)
|
||||
//update_icon()
|
||||
update_icon()
|
||||
|
||||
visible
|
||||
level = 2
|
||||
icon_state = "cap"
|
||||
|
||||
hidden
|
||||
level = 1
|
||||
icon_state = "cap-f"
|
||||
|
||||
|
||||
obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 = "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(core_generator)
|
||||
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
|
||||
if(core_generator.owned_field)
|
||||
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
|
||||
t += "Electromagnetic plasma suspension field status:<br>"
|
||||
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
|
||||
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
|
||||
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
|
||||
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
|
||||
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
|
||||
t += "<hr>"
|
||||
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
|
||||
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
|
||||
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
|
||||
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
|
||||
else
|
||||
t += " <font color=blue>No reactants present.</font><br>"
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=core_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Primary Monitor</B><BR>"
|
||||
if(core_generator)
|
||||
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
|
||||
if(core_generator.owned_field)
|
||||
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
|
||||
t += "Electromagnetic plasma suspension field status:<br>"
|
||||
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
|
||||
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
|
||||
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
|
||||
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
|
||||
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
|
||||
t += "<hr>"
|
||||
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
|
||||
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
|
||||
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
|
||||
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
|
||||
else
|
||||
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
|
||||
t += " <font color=blue>No reactants present.</font><br>"
|
||||
else
|
||||
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=core_monitor;size=500x400")
|
||||
user.machine = src
|
||||
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=core_monitor;size=500x400")
|
||||
user.machine = src
|
||||
|
||||
@@ -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 = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x800")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return*/
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
@@ -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 = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
var/cooling = 0
|
||||
for(var/stage in stage_status)
|
||||
if(stage_status[stage])
|
||||
t += "Fuel injection: <font color=blue>Active</font><br>"
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
cooling = 1
|
||||
break
|
||||
if(!cooling)
|
||||
t += "Fuel injection: <font color=blue>Cooling</font><br>"
|
||||
t += "----<br>"
|
||||
//
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage_name in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage_name]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_monitor;size=500x600")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_monitor")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
var/cooling = 0
|
||||
for(var/stage in stage_status)
|
||||
if(stage_status[stage])
|
||||
t += "Fuel injection: <font color=blue>Active</font><br>"
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
cooling = 1
|
||||
break
|
||||
if(!cooling)
|
||||
t += "Fuel injection: <font color=blue>Cooling</font><br>"
|
||||
t += "----<br>"
|
||||
//
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage_name in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage_name]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_monitor;size=500x600")
|
||||
user.machine = src
|
||||
|
||||
@@ -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 = "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
|
||||
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
|
||||
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_injector;size=500x800")
|
||||
user.machine = src
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuel_injector")
|
||||
return
|
||||
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
|
||||
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
|
||||
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
|
||||
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
|
||||
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuel_injector;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
proc/BeginInjecting()
|
||||
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
|
||||
|
||||
@@ -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 = "<B>Free electron MASER (Gyrotron) Control Panel</B><BR>"
|
||||
if(owned_gyrotron && owned_gyrotron.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(owned_gyrotron.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[owned_gyrotron];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "Not emitting</font> <a href='?src=\ref[owned_gyrotron];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [owned_gyrotron.rate] <a href='?src=\ref[owned_gyrotron];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [owned_gyrotron.frequency] <a href='?src=\ref[owned_gyrotron];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [owned_gyrotron.mega_energy] <a href='?src=\ref[owned_gyrotron];modifypower=1'>\[Modify\]</a><br>"
|
||||
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 = "<B>Free electron MASER (Gyrotron) Control Panel</B><BR>"
|
||||
if(owned_gyrotron && owned_gyrotron.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(owned_gyrotron.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[owned_gyrotron];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyro_monitor;size=500x800")
|
||||
user.machine = src
|
||||
t += "Not emitting</font> <a href='?src=\ref[owned_gyrotron];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [owned_gyrotron.rate] <a href='?src=\ref[owned_gyrotron];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [owned_gyrotron.frequency] <a href='?src=\ref[owned_gyrotron];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [owned_gyrotron.mega_energy] <a href='?src=\ref[owned_gyrotron];modifypower=1'>\[Modify\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyro_monitor;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
@@ -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 = "<B>Gyrotron Remote Control Console</B><BR>"
|
||||
t += "<hr>"
|
||||
for(var/obj/machinery/rust/gyrotron/gyro in world)
|
||||
if(gyro.remoteenabled && gyro.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(gyro.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[gyro];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "Not emitting</font> <a href='?src=\ref[gyro];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [gyro.rate] <a href='?src=\ref[gyro];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [gyro.frequency] <a href='?src=\ref[gyro];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [gyro.mega_energy] <a href='?src=\ref[gyro];modifypower=1'>\[Modify\]</a><br>"
|
||||
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 = "<B>Gyrotron Remote Control Console</B><BR>"
|
||||
t += "<hr>"
|
||||
for(var/obj/machinery/rust/gyrotron/gyro in world)
|
||||
if(gyro.remoteenabled && gyro.on)
|
||||
t += "<font color=green>Gyrotron operational</font><br>"
|
||||
t += "Operational mode: <font color=blue>"
|
||||
if(gyro.emitting)
|
||||
t += "Emitting</font> <a href='?src=\ref[gyro];deactivate=1'>\[Deactivate\]</a><br>"
|
||||
else
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
t += "Not emitting</font> <a href='?src=\ref[gyro];activate=1'>\[Activate\]</a><br>"
|
||||
t += "Emission rate: [gyro.rate] <a href='?src=\ref[gyro];modifyrate=1'>\[Modify\]</a><br>"
|
||||
t += "Beam frequency: [gyro.frequency] <a href='?src=\ref[gyro];modifyfreq=1'>\[Modify\]</a><br>"
|
||||
t += "Beam power: [gyro.mega_energy] <a href='?src=\ref[gyro];modifypower=1'>\[Modify\]</a><br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<b><font color=red>Gyrotron unresponsive</font></b>"
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyrotron_controller;size=500x400")
|
||||
user.machine = src
|
||||
/*
|
||||
var/t = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
t += "Current fuel injection stage: [active_stage]<br>"
|
||||
if(active_stage == "Cooling")
|
||||
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
|
||||
t += "----<br>"
|
||||
else
|
||||
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
|
||||
t += "Fuel depletion announcement: "
|
||||
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
|
||||
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
|
||||
t += "Stage progression announcement: "
|
||||
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
|
||||
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
|
||||
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
|
||||
t += "<hr>"
|
||||
t += "<table border=1><tr>"
|
||||
t += "<td><b>Injector Status</b></td>"
|
||||
t += "<td><b>Injection interval (sec)</b></td>"
|
||||
t += "<td><b>Assembly consumption per injection</b></td>"
|
||||
t += "<td><b>Fuel Assembly Port</b></td>"
|
||||
t += "<td><b>Assembly depletion percentage</b></td>"
|
||||
t += "</tr>"
|
||||
for(var/stage in fuel_injectors)
|
||||
var/list/cur_stage = fuel_injectors[stage]
|
||||
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
|
||||
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
|
||||
t += "<tr>"
|
||||
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
|
||||
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
|
||||
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
|
||||
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
|
||||
t += "</tr>"
|
||||
t += "</table>"
|
||||
*/
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=gyrotron_controller;size=500x400")
|
||||
user.machine = src
|
||||
|
||||
@@ -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 = "<TT><B>Laser status monitor</B><HR>"
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
t += "Zero Point Laser<br>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
|
||||
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
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 = "<TT><B>Laser status monitor</B><HR>"
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
t += "Zero Point Laser<br>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
|
||||
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=laser_control;size=500x800")
|
||||
user.machine = src
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/lasercon/proc/interact(mob/user)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_SCRUBBING]'>turn syphoning off</A>"
|
||||
else
|
||||
output += "<A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_PANIC]'><font color='red'><B>ACTIVATE PANIC SYPHON IN AREA</B></font></A>"
|
||||
|
||||
output += "<br><br>Atmospheric Lockdown: <a href='?src=\ref[src];alarm=\ref[current];atmos_unlock=[current.alarm_area.air_doors_activated]'>[current.alarm_area.air_doors_activated ? "<b>ENABLED</b>" : "Disabled"]</a>"
|
||||
if (AALARM_SCREEN_VENT)
|
||||
var/sensor_data = ""
|
||||
if(current.alarm_area.air_vent_names.len)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,499 @@
|
||||
//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 <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
visible_message("\red <B>\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("<b>[src]</b> 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 <b>[src]</b> 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
|
||||
@@ -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)
|
||||
|
||||
+137
-13
@@ -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
|
||||
@@ -48,8 +39,18 @@
|
||||
// evil infection stuff that will make everyone hate me
|
||||
var/can_infect = 0
|
||||
|
||||
proc/isright(obj/item/tool) //is it is a required surgical tool for this step
|
||||
return (istype(tool,required_tool))
|
||||
|
||||
proc/isacceptable(obj/item/tool) //is it is an accepted replacement tool for this step
|
||||
if (allowed_tools)
|
||||
for (var/T in allowed_tools)
|
||||
if (istype(tool,T))
|
||||
return 1
|
||||
return 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 +89,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 +118,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 +150,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 +189,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 +206,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 +252,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 +269,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 +307,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 +323,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 +352,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 +367,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 +389,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 +398,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 +434,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 +464,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 +487,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 +509,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 +534,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 +559,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 +584,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 +626,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 +652,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 +673,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 +704,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 +766,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 +786,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 +824,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 +840,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 +863,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 +931,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 +958,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 +989,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 +1092,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 +1117,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 +1129,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 +1203,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 +1225,79 @@ 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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// IMPLANT REMOVAL SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/implant_removal
|
||||
required_tool = /obj/item/weapon/hemostat
|
||||
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||
"You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
|
||||
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||
|
||||
var/find_prob = 0
|
||||
if (affected.implants.len)
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
if (imp.islegal())
|
||||
find_prob +=60
|
||||
else
|
||||
find_prob +=40
|
||||
if (isright(tool))
|
||||
find_prob +=20
|
||||
|
||||
if (prob(find_prob))
|
||||
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
affected.implants -= imp
|
||||
imp.loc = get_turf(target)
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else
|
||||
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
|
||||
"\blue You could not find anything inside [target]'s [affected.display_name]." )
|
||||
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(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20)
|
||||
if (affected.implants.len)
|
||||
var/fail_prob = 10
|
||||
if (!isright(tool))
|
||||
fail_prob += 30
|
||||
if (prob(fail_prob))
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
|
||||
playsound(imp.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
imp.activate()
|
||||
if (ishuman(user))
|
||||
user:bloody_hands(target, 0)
|
||||
user:bloody_body(target)
|
||||
@@ -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)))
|
||||
return(prob(sqrt(p)) && prob(sqrt(p)))
|
||||
|
||||
+35
-20
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+55
-23
@@ -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*/
|
||||
.[Z] = 1*/
|
||||
|
||||
@@ -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
|
||||
/client/proc/getFiles()
|
||||
for(var/file in args)
|
||||
src << browse_rsc(file)
|
||||
@@ -187,28 +187,23 @@
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios, var/level = 0)
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
|
||||
. = list()
|
||||
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
// This is usually for headsets, which only the wearer can hear.
|
||||
if(R.canhear_range == 0)
|
||||
if(ismob(R.loc))
|
||||
. |= R.loc
|
||||
continue
|
||||
|
||||
var/turf/speaker = get_turf(R)
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
speaker_coverage += T
|
||||
speaker_coverage[T] = T
|
||||
|
||||
// Try to find all the players who can hear the message
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/ear = get_turf(M)
|
||||
if(ear && (level == 0 || level == ear.z))
|
||||
if(ear in speaker_coverage)
|
||||
if(ear)
|
||||
if(speaker_coverage[ear])
|
||||
. |= M
|
||||
|
||||
return .
|
||||
@@ -280,7 +275,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 +314,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.prefs.be_special & 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
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
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/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
|
||||
//Preferences stuff
|
||||
//Hairstyles
|
||||
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
|
||||
var/global/list/hair_styles_male_list = list()
|
||||
var/global/list/hair_styles_female_list = list()
|
||||
var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
var/global/list/facial_hair_styles_male_list = list()
|
||||
var/global/list/facial_hair_styles_female_list = list()
|
||||
var/global/list/skin_styles_female_list = list() //unused
|
||||
//Underwear
|
||||
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours
|
||||
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
|
||||
//Backpacks
|
||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
|
||||
|
||||
//////////////////////////
|
||||
/////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
|
||||
switch(H.gender)
|
||||
if(MALE) hair_styles_male_list += H.name
|
||||
if(FEMALE) hair_styles_female_list += H.name
|
||||
else
|
||||
hair_styles_male_list += H.name
|
||||
hair_styles_female_list += H.name
|
||||
|
||||
//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
|
||||
switch(H.gender)
|
||||
if(MALE) facial_hair_styles_male_list += H.name
|
||||
if(FEMALE) facial_hair_styles_female_list += H.name
|
||||
else
|
||||
facial_hair_styles_male_list += H.name
|
||||
facial_hair_styles_female_list += H.name
|
||||
|
||||
//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
|
||||
|
||||
@@ -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<<browse_rsc(getFlatIcon(src), iconName)
|
||||
// Display the icon in their browser
|
||||
src<<browse("<body bgcolor='#000000'><p><img src='[iconName]'></p></body>")
|
||||
|
||||
Output_Icon()
|
||||
set name = "2. Output Icon"
|
||||
src<<"Icon is: \icon[getFlatIcon(src)]"
|
||||
|
||||
Label_Icon()
|
||||
set name = "3. Label Icon"
|
||||
// Give it a name for the cache
|
||||
var/iconName = "[ckey(src.name)]_flattened.dmi"
|
||||
// Copy the file to the rsc manually
|
||||
var/icon/I = fcopy_rsc(getFlatIcon(src))
|
||||
// Send the icon to src's local cache
|
||||
src<<browse_rsc(I, iconName)
|
||||
// Update the label to show it
|
||||
winset(src,"imageLabel","image='\ref[I]'");
|
||||
|
||||
Add_Overlay()
|
||||
set name = "4. Add Overlay"
|
||||
overlays += image(icon='old_or_unused.dmi',icon_state="yellow",pixel_x = rand(-64,32), pixel_y = rand(-64,32))
|
||||
|
||||
Stress_Test()
|
||||
set name = "5. Stress Test"
|
||||
for(var/i = 0 to 1000)
|
||||
// The third parameter forces it to generate a new one, even if it's already cached
|
||||
getFlatIcon(src,0,2)
|
||||
if(prob(5))
|
||||
Add_Overlay()
|
||||
Browse_Icon()
|
||||
|
||||
Cache_Test()
|
||||
set name = "6. Cache Test"
|
||||
for(var/i = 0 to 1000)
|
||||
getFlatIcon(src)
|
||||
Browse_Icon()
|
||||
|
||||
obj/effect/overlayTest
|
||||
icon = 'old_or_unused.dmi'
|
||||
icon_state = "blue"
|
||||
pixel_x = -24
|
||||
pixel_y = 24
|
||||
layer = TURF_LAYER // Should appear below the rest of the overlays
|
||||
|
||||
world
|
||||
view = "7x7"
|
||||
maxx = 20
|
||||
maxy = 20
|
||||
maxz = 1
|
||||
*/
|
||||
|
||||
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "," )
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return "[nothing_text]"
|
||||
@@ -304,4 +304,13 @@ proc/listclearnulls(list/list)
|
||||
if(bitfield & bit)
|
||||
r += bit
|
||||
|
||||
return r
|
||||
return r
|
||||
|
||||
// Returns the key based on the index
|
||||
/proc/get_key_by_index(var/list/L, var/index)
|
||||
var/i = 1
|
||||
for(var/key in L)
|
||||
if(index == i)
|
||||
return key
|
||||
i++
|
||||
return null
|
||||
@@ -1,3 +1,15 @@
|
||||
//print an error message to world.log
|
||||
/proc/error(msg)
|
||||
world.log << "## ERROR: [msg]"
|
||||
|
||||
//print a warning message to world.log
|
||||
/proc/warning(msg)
|
||||
world.log << "## WARNING: [msg]"
|
||||
|
||||
//print a testing-mode debug message to world.log
|
||||
/proc/testing(msg)
|
||||
world.log << "## TESTING: [msg]"
|
||||
|
||||
/proc/log_admin(text)
|
||||
admin_log.Add(text)
|
||||
if (config.log_admin)
|
||||
@@ -0,0 +1,114 @@
|
||||
// Credits to Nickr5 for the useful procs I've taken from his library resource.
|
||||
|
||||
var/const/E = 2.71828183
|
||||
var/const/Sqrt2 = 1.41421356
|
||||
|
||||
|
||||
/proc/Atan2(x, y)
|
||||
if(!x && !y) return 0
|
||||
var/a = arccos(x / sqrt(x*x + y*y))
|
||||
return y >= 0 ? a : -a
|
||||
|
||||
/proc/Ceiling(x)
|
||||
return -round(-x)
|
||||
|
||||
/proc/Clamp(val, min, max)
|
||||
return max(min, min(val, max))
|
||||
|
||||
// cotangent
|
||||
/proc/Cot(x)
|
||||
return 1 / Tan(x)
|
||||
|
||||
// cosecant
|
||||
/proc/Csc(x)
|
||||
return 1 / sin(x)
|
||||
|
||||
/proc/Default(a, b)
|
||||
return a ? a : b
|
||||
|
||||
/proc/Floor(x)
|
||||
return round(x)
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, a % b) : a
|
||||
|
||||
/proc/Inverse(x)
|
||||
return 1 / x
|
||||
|
||||
/proc/IsAboutEqual(a, b, deviation = 0.1)
|
||||
return abs(a - b) <= deviation
|
||||
|
||||
/proc/IsEven(x)
|
||||
return x % 2 == 0
|
||||
|
||||
// Returns true if val is from min to max, inclusive.
|
||||
/proc/IsInRange(val, min, max)
|
||||
return min <= val && val <= max
|
||||
|
||||
/proc/IsInteger(x)
|
||||
return Floor(x) == x
|
||||
|
||||
/proc/IsOdd(x)
|
||||
return !IsEven(x)
|
||||
|
||||
/proc/IsMultiple(x, y)
|
||||
return x % y == 0
|
||||
|
||||
// Least Common Multiple
|
||||
/proc/Lcm(a, b)
|
||||
return abs(a) / Gcd(a, b) * abs(b)
|
||||
|
||||
// Performs a linear interpolation between a and b.
|
||||
// Note that amount=0 returns a, amount=1 returns b, and
|
||||
// amount=0.5 returns the mean of a and b.
|
||||
/proc/Lerp(a, b, amount = 0.5)
|
||||
return a + (b - a) * amount
|
||||
|
||||
/proc/Mean(...)
|
||||
var/values = 0
|
||||
var/sum = 0
|
||||
for(var/val in args)
|
||||
values++
|
||||
sum += val
|
||||
return sum / values
|
||||
|
||||
|
||||
// Returns the nth root of x.
|
||||
/proc/Root(n, x)
|
||||
return x ** (1 / n)
|
||||
|
||||
// secant
|
||||
/proc/Sec(x)
|
||||
return 1 / cos(x)
|
||||
|
||||
// The quadratic formula. Returns a list with the solutions, or an empty list
|
||||
// if they are imaginary.
|
||||
/proc/SolveQuadratic(a, b, c)
|
||||
ASSERT(a)
|
||||
. = list()
|
||||
var/d = b*b - 4 * a * c
|
||||
var/bottom = 2 * a
|
||||
if(d < 0) return
|
||||
var/root = sqrt(d)
|
||||
. += (-b + root) / bottom
|
||||
if(!d) return
|
||||
. += (-b - root) / bottom
|
||||
|
||||
// tangent
|
||||
/proc/Tan(x)
|
||||
return sin(x) / cos(x)
|
||||
|
||||
/proc/ToDegrees(radians)
|
||||
// 180 / Pi
|
||||
return radians * 57.2957795
|
||||
|
||||
/proc/ToRadians(degrees)
|
||||
// Pi / 180
|
||||
return degrees * 0.0174532925
|
||||
|
||||
// min is inclusive, max is exclusive
|
||||
/proc/Wrap(val, min, max)
|
||||
var/d = max - min
|
||||
var/t = Floor((val - min) / d)
|
||||
return val - (t * d)
|
||||
@@ -0,0 +1,50 @@
|
||||
proc/random_hair_style(gender, species = "Human")
|
||||
switch(gender)
|
||||
if(MALE) return pick(hair_styles_male_list)
|
||||
if(FEMALE) return pick(hair_styles_female_list)
|
||||
else return pick(hair_styles_list)
|
||||
|
||||
proc/random_facial_hair_style(gender, species = "Human")
|
||||
switch(gender)
|
||||
if(MALE) return pick(facial_hair_styles_male_list)
|
||||
if(FEMALE) return pick(facial_hair_styles_female_list)
|
||||
else return pick(facial_hair_styles_list)
|
||||
|
||||
proc/random_name(gender, species = "Human")
|
||||
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
|
||||
proc/random_skin_tone()
|
||||
switch(pick(55;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino", 5;"weird"))
|
||||
if("caucasian") . = -10
|
||||
if("afroamerican") . = -115
|
||||
if("african") . = -165
|
||||
if("latino") . = -55
|
||||
if("albino") . = 34
|
||||
else . = rand(-185,34)
|
||||
return min(max( .+rand(-25, 25), -185),34)
|
||||
|
||||
proc/skintone2racedescription(tone)
|
||||
switch (tone)
|
||||
if(30 to INFINITY) return "albino"
|
||||
if(20 to 30) return "pale"
|
||||
if(5 to 15) return "light skinned"
|
||||
if(-10 to 5) return "white"
|
||||
if(-25 to -10) return "tan"
|
||||
if(-45 to -25) return "darker skinned"
|
||||
if(-65 to -45) return "brown"
|
||||
if(-INFINITY to -65) return "black"
|
||||
else return "unknown"
|
||||
|
||||
proc/age2agedescription(age)
|
||||
switch(age)
|
||||
if(0 to 1) return "infant"
|
||||
if(1 to 3) return "toddler"
|
||||
if(3 to 13) return "child"
|
||||
if(13 to 19) return "teenager"
|
||||
if(19 to 30) return "young adult"
|
||||
if(30 to 45) return "adult"
|
||||
if(45 to 60) return "middle-aged"
|
||||
if(60 to 70) return "aging"
|
||||
if(70 to INFINITY) return "elderly"
|
||||
else return "unknown"
|
||||
@@ -1,3 +1,117 @@
|
||||
var/church_name = null
|
||||
/proc/church_name()
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
var/command_name = null
|
||||
/proc/command_name()
|
||||
if (command_name)
|
||||
return command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
|
||||
command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(var/name)
|
||||
|
||||
command_name = name
|
||||
|
||||
return name
|
||||
|
||||
var/religion_name = null
|
||||
/proc/religion_name()
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if (station_name)
|
||||
return station_name
|
||||
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick("Imperium", "Heretical", "Cuban", "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", "Automated", "Experimental", "Augmented")
|
||||
station_name = name + " "
|
||||
|
||||
// Prefix
|
||||
switch(Holiday)
|
||||
//get normal name
|
||||
if(null,"",0)
|
||||
name = pick("", "Stanford", "Dorf", "Alium", "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist","Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", "System", "Mining", "Neckbeard", "Research", "Supply", "Military", "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", "Robot", "Hats", "Pizza")
|
||||
if(name)
|
||||
station_name += name + " "
|
||||
|
||||
//For special days like christmas, easter, new-years etc ~Carn
|
||||
if("Friday the 13th")
|
||||
name = pick("Mike","Friday","Evil","Myers","Murder","Deathly","Stabby")
|
||||
station_name += name + " "
|
||||
random = 13
|
||||
else
|
||||
//get the first word of the Holiday and use that
|
||||
var/i = findtext(Holiday," ",1,0)
|
||||
name = copytext(Holiday,1,i)
|
||||
station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick("Station", "Fortress", "Frontier", "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp")
|
||||
station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
station_name += pick("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega")
|
||||
if(3)
|
||||
station_name += pick("II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX")
|
||||
if(4)
|
||||
station_name += pick("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu")
|
||||
if(5)
|
||||
station_name += pick("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
|
||||
if(13)
|
||||
station_name += pick("13","XIII","Thirteen")
|
||||
|
||||
|
||||
if (config && config.server_name)
|
||||
world.name = "[config.server_name]: [name]"
|
||||
else
|
||||
world.name = station_name
|
||||
|
||||
return station_name
|
||||
|
||||
/proc/world_name(var/name)
|
||||
|
||||
station_name = name
|
||||
|
||||
if (config && config.server_name)
|
||||
world.name = "[config.server_name]: [name]"
|
||||
else
|
||||
world.name = name
|
||||
|
||||
return name
|
||||
|
||||
var/syndicate_name = null
|
||||
/proc/syndicate_name()
|
||||
if (syndicate_name)
|
||||
@@ -0,0 +1,46 @@
|
||||
//general stuff
|
||||
/proc/sanitize_integer(number, min=0, max=1, default=0)
|
||||
if(isnum(number))
|
||||
number = round(number)
|
||||
if(min <= number && number <= max)
|
||||
return number
|
||||
return default
|
||||
|
||||
/proc/sanitize_text(text, default="")
|
||||
if(istext(text))
|
||||
return text
|
||||
return default
|
||||
|
||||
/proc/sanitize_inlist(value, list/List, default)
|
||||
if(value in List) return value
|
||||
if(default) return default
|
||||
if(List && List.len)return List[1]
|
||||
|
||||
|
||||
|
||||
//more specialised stuff
|
||||
/proc/sanitize_gender(gender,neuter=0,plural=0, default="male")
|
||||
switch(gender)
|
||||
if(MALE, FEMALE)return gender
|
||||
if(NEUTER)
|
||||
if(neuter) return gender
|
||||
else return default
|
||||
if(PLURAL)
|
||||
if(plural) return gender
|
||||
else return default
|
||||
return default
|
||||
|
||||
/proc/sanitize_hexcolor(color, default="#000000")
|
||||
if(!istext(color)) return default
|
||||
var/len = length(color)
|
||||
if(len != 7 && len !=4) return default
|
||||
if(text2ascii(color,1) != 35) return default //35 is the ascii code for "#"
|
||||
. = "#"
|
||||
for(var/i=2,i<=len,i++)
|
||||
var/ascii = text2ascii(color,i)
|
||||
switch(ascii)
|
||||
if(48 to 57) . += ascii2text(ascii) //numbers 0 to 9
|
||||
if(97 to 102) . += ascii2text(ascii) //letters a to f
|
||||
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
|
||||
else return default
|
||||
return .
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
|
||||
/proc/sanitizeSQL(var/t as text)
|
||||
var/sanitized_text = dd_replacetext(t, "'", "\\'")
|
||||
sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"")
|
||||
var/sanitized_text = replacetext(t, "'", "\\'")
|
||||
sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
|
||||
return sanitized_text
|
||||
|
||||
/*
|
||||
@@ -177,18 +177,33 @@
|
||||
/*
|
||||
* Text modification
|
||||
*/
|
||||
/proc/replacetext(text, find, replacement)
|
||||
var/find_len = length(find)
|
||||
if(find_len < 1) return text
|
||||
. = ""
|
||||
var/last_found = 1
|
||||
while(1)
|
||||
var/found = findtext(text, find, last_found, 0)
|
||||
. += copytext(text, last_found, found)
|
||||
if(found)
|
||||
. += replacement
|
||||
last_found = found + find_len
|
||||
continue
|
||||
return .
|
||||
|
||||
//Search and replace a sub-string within a string
|
||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
||||
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
|
||||
return null
|
||||
var/textList = dd_text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
|
||||
//Search and replace a case sensitive sub-string within a string
|
||||
/proc/dd_replacetext_case(text, search_string, replacement_string)
|
||||
var/textList = dd_text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
/proc/replacetextEx(text, find, replacement)
|
||||
var/find_len = length(find)
|
||||
if(find_len < 1) return text
|
||||
. = ""
|
||||
var/last_found = 1
|
||||
while(1)
|
||||
var/found = findtextEx(text, find, last_found, 0)
|
||||
. += copytext(text, last_found, found)
|
||||
if(found)
|
||||
. += replacement
|
||||
last_found = found + find_len
|
||||
continue
|
||||
return .
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
/proc/add_zero(t, u)
|
||||
@@ -308,4 +323,10 @@
|
||||
var/a = copytext(text,i,i+1)
|
||||
if(a == character)
|
||||
count++
|
||||
return count
|
||||
return count
|
||||
|
||||
/proc/reverse_text(var/text = "")
|
||||
var/new_text = ""
|
||||
for(var/i = length(text); i > 0; i--)
|
||||
new_text += copytext(text, i, i+1)
|
||||
return new_text
|
||||
@@ -1,3 +1,11 @@
|
||||
//Returns the world time in english
|
||||
proc/worldtime2text()
|
||||
return "[round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"
|
||||
|
||||
proc/time_stamp()
|
||||
return time2text(world.timeofday, "hh:mm:ss")
|
||||
|
||||
/* Preserving this so future generations can see how fucking retarded some people are
|
||||
proc/time_stamp()
|
||||
var/hh = text2num(time2text(world.timeofday, "hh")) // Set the hour
|
||||
var/mm = text2num(time2text(world.timeofday, "mm")) // Set the minute
|
||||
@@ -9,7 +17,7 @@ proc/time_stamp()
|
||||
if(mm < 10) pm = "0"
|
||||
if(ss < 10) ps = "0"
|
||||
return"[ph][hh]:[pm][mm]:[ps][ss]"
|
||||
|
||||
*/
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
proc/isDay(var/month, var/day)
|
||||
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
* Holds procs designed to change one type of value, into another.
|
||||
* Contains:
|
||||
* hex2num & num2hex
|
||||
* text2list & list2text
|
||||
* file2list
|
||||
* angle2dir
|
||||
* angle2text
|
||||
* worldtime2text
|
||||
*/
|
||||
|
||||
//Returns an integer given a hex input
|
||||
/proc/hex2num(hex)
|
||||
if (!( istext(hex) ))
|
||||
return
|
||||
|
||||
var/num = 0
|
||||
var/power = 0
|
||||
var/i = null
|
||||
i = length(hex)
|
||||
while(i > 0)
|
||||
var/char = copytext(hex, i, i + 1)
|
||||
switch(char)
|
||||
if("0")
|
||||
//Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
|
||||
if("9", "8", "7", "6", "5", "4", "3", "2", "1")
|
||||
num += text2num(char) * 16 ** power
|
||||
if("a", "A")
|
||||
num += 16 ** power * 10
|
||||
if("b", "B")
|
||||
num += 16 ** power * 11
|
||||
if("c", "C")
|
||||
num += 16 ** power * 12
|
||||
if("d", "D")
|
||||
num += 16 ** power * 13
|
||||
if("e", "E")
|
||||
num += 16 ** power * 14
|
||||
if("f", "F")
|
||||
num += 16 ** power * 15
|
||||
else
|
||||
return
|
||||
power++
|
||||
i--
|
||||
return num
|
||||
|
||||
//Returns the hex value of a number given a value assumed to be a base-ten value
|
||||
/proc/num2hex(num, placeholder)
|
||||
|
||||
if (placeholder == null)
|
||||
placeholder = 2
|
||||
if (!( isnum(num) ))
|
||||
return
|
||||
if (!( num ))
|
||||
return "0"
|
||||
var/hex = ""
|
||||
var/i = 0
|
||||
while(16 ** i < num)
|
||||
i++
|
||||
var/power = null
|
||||
power = i - 1
|
||||
while(power >= 0)
|
||||
var/val = round(num / 16 ** power)
|
||||
num -= val * 16 ** power
|
||||
switch(val)
|
||||
if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
|
||||
hex += text("[]", val)
|
||||
if(10.0)
|
||||
hex += "A"
|
||||
if(11.0)
|
||||
hex += "B"
|
||||
if(12.0)
|
||||
hex += "C"
|
||||
if(13.0)
|
||||
hex += "D"
|
||||
if(14.0)
|
||||
hex += "E"
|
||||
if(15.0)
|
||||
hex += "F"
|
||||
else
|
||||
power--
|
||||
while(length(hex) < placeholder)
|
||||
hex = text("0[]", hex)
|
||||
return hex
|
||||
|
||||
|
||||
//Attaches each element of a list to a single string seperated by 'seperator'.
|
||||
/proc/dd_list2text(var/list/the_list, separator)
|
||||
var/total = the_list.len
|
||||
if(!total)
|
||||
return
|
||||
var/count = 2
|
||||
var/newText = "[the_list[1]]"
|
||||
while(count <= total)
|
||||
if(separator)
|
||||
newText += separator
|
||||
newText += "[the_list[count]]"
|
||||
count++
|
||||
return newText
|
||||
|
||||
|
||||
//slower then dd_list2text, but correctly processes associative lists.
|
||||
proc/tg_list2text(list/list, glue=",")
|
||||
if(!istype(list) || !list.len)
|
||||
return
|
||||
var/output
|
||||
for(var/i=1 to list.len)
|
||||
output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
|
||||
return output
|
||||
|
||||
|
||||
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator)
|
||||
//Returns an empty list if the text cannot be split, or the split text in a list.
|
||||
//Not giving a "" seperator will cause the text to be broken into a list of single letters.
|
||||
/proc/text2list(text, seperator="\n")
|
||||
. = list()
|
||||
|
||||
var/text_len = length(text) //length of the input text
|
||||
var/seperator_len = length(seperator) //length of the seperator text
|
||||
|
||||
if(text_len >= seperator_len)
|
||||
var/i
|
||||
var/last_i = 1
|
||||
|
||||
for(i=1,i<=(text_len+1-seperator_len),i++)
|
||||
if( cmptext(copytext(text,i,i+seperator_len), seperator) )
|
||||
if(i != last_i)
|
||||
. += copytext(text,last_i,i)
|
||||
last_i = i + seperator_len
|
||||
|
||||
if(last_i <= text_len)
|
||||
. += copytext(text, last_i, 0)
|
||||
else
|
||||
. += text
|
||||
return .
|
||||
|
||||
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator)
|
||||
//Returns an empty list if the text cannot be split, or the split text in a list.
|
||||
//Not giving a "" seperator will cause the text to be broken into a list of single letters.
|
||||
//Case Sensitive!
|
||||
/proc/text2listEx(text, seperator="\n")
|
||||
. = list()
|
||||
|
||||
var/text_len = length(text) //length of the input text
|
||||
var/seperator_len = length(seperator) //length of the seperator text
|
||||
|
||||
if(text_len >= seperator_len)
|
||||
var/i
|
||||
var/last_i = 1
|
||||
|
||||
for(i=1,i<=(text_len+1-seperator_len),i++)
|
||||
if( cmptextEx(copytext(text,i,i+seperator_len), seperator) )
|
||||
if(i != last_i)
|
||||
. += copytext(text,last_i,i)
|
||||
last_i = i + seperator_len
|
||||
|
||||
if(last_i <= text_len)
|
||||
. += copytext(text, last_i, 0)
|
||||
else
|
||||
. += text
|
||||
return .
|
||||
|
||||
//Splits the text of a file at seperator and returns them in a list.
|
||||
/proc/file2list(filename, seperator="\n")
|
||||
return text2list(return_file_text(filename),seperator)
|
||||
|
||||
|
||||
//Turns a direction into text
|
||||
/proc/dir2text(direction)
|
||||
switch(direction)
|
||||
if(1.0)
|
||||
return "north"
|
||||
if(2.0)
|
||||
return "south"
|
||||
if(4.0)
|
||||
return "east"
|
||||
if(8.0)
|
||||
return "west"
|
||||
if(5.0)
|
||||
return "northeast"
|
||||
if(6.0)
|
||||
return "southeast"
|
||||
if(9.0)
|
||||
return "northwest"
|
||||
if(10.0)
|
||||
return "southwest"
|
||||
else
|
||||
return
|
||||
|
||||
//Turns text into proper directions
|
||||
/proc/text2dir(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH")
|
||||
return 1
|
||||
if("SOUTH")
|
||||
return 2
|
||||
if("EAST")
|
||||
return 4
|
||||
if("WEST")
|
||||
return 8
|
||||
if("NORTHEAST")
|
||||
return 5
|
||||
if("NORTHWEST")
|
||||
return 9
|
||||
if("SOUTHEAST")
|
||||
return 6
|
||||
if("SOUTHWEST")
|
||||
return 10
|
||||
else
|
||||
return
|
||||
|
||||
//Converts an angle (degrees) into an ss13 direction
|
||||
/proc/angle2dir(var/degree)
|
||||
degree = ((degree+22.5)%365)
|
||||
if(degree < 45) return NORTH
|
||||
if(degree < 90) return NORTHEAST
|
||||
if(degree < 135) return EAST
|
||||
if(degree < 180) return SOUTHEAST
|
||||
if(degree < 225) return SOUTH
|
||||
if(degree < 270) return SOUTHWEST
|
||||
if(degree < 315) return WEST
|
||||
return NORTH|WEST
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
switch(D)
|
||||
if(NORTH) return 0
|
||||
if(SOUTH) return 180
|
||||
if(EAST) return 90
|
||||
if(WEST) return 270
|
||||
if(NORTHEAST) return 45
|
||||
if(SOUTHEAST) return 135
|
||||
if(NORTHWEST) return 315
|
||||
if(SOUTHWEST) return 225
|
||||
else return null
|
||||
|
||||
//Returns the angle in english
|
||||
/proc/angle2text(var/degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
|
||||
//Converts a rights bitfield into a string
|
||||
/proc/rights2text(rights,seperator="")
|
||||
if(rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
|
||||
if(rights & R_ADMIN) . += "[seperator]+ADMIN"
|
||||
if(rights & R_BAN) . += "[seperator]+BAN"
|
||||
if(rights & R_FUN) . += "[seperator]+FUN"
|
||||
if(rights & R_SERVER) . += "[seperator]+SERVER"
|
||||
if(rights & R_DEBUG) . += "[seperator]+DEBUG"
|
||||
if(rights & R_POSSESS) . += "[seperator]+POSSESS"
|
||||
if(rights & R_PERMISSIONS) . += "[seperator]+PERMISSIONS"
|
||||
if(rights & R_STEALTH) . += "[seperator]+STEALTH"
|
||||
if(rights & R_REJUVINATE) . += "[seperator]+REJUVINATE"
|
||||
if(rights & R_VAREDIT) . += "[seperator]+VAREDIT"
|
||||
if(rights & R_SOUNDS) . += "[seperator]+SOUND"
|
||||
if(rights & R_SPAWN) . += "[seperator]+SPAWN"
|
||||
if(rights & R_MOD) . += "[seperator]+MODERATOR"
|
||||
return .
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
switch(ui_style)
|
||||
if("old") return 'icons/mob/screen1_old.dmi'
|
||||
if("Orange") return 'icons/mob/screen1_Orange.dmi'
|
||||
else return 'icons/mob/screen1_Midnight.dmi'
|
||||
@@ -503,68 +503,52 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
|
||||
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
|
||||
var/mob/the_mob = null
|
||||
var/client/the_client = null
|
||||
var/the_key = ""
|
||||
var/mob/M
|
||||
var/client/C
|
||||
var/key
|
||||
|
||||
if (isnull(whom))
|
||||
return "*null*"
|
||||
else if (istype(whom, /client))
|
||||
the_client = whom
|
||||
the_mob = the_client.mob
|
||||
the_key = the_client.key
|
||||
else if (ismob(whom))
|
||||
the_mob = whom
|
||||
the_client = the_mob.client
|
||||
the_key = the_mob.key
|
||||
else if (istype(whom, /datum))
|
||||
var/datum/the_datum = whom
|
||||
return "*invalid:[the_datum.type]*"
|
||||
if(!whom) return "*null*"
|
||||
if(istype(whom, /client))
|
||||
C = whom
|
||||
M = C.mob
|
||||
key = C.key
|
||||
else if(ismob(whom))
|
||||
M = whom
|
||||
C = M.client
|
||||
key = M.key
|
||||
else if(istype(whom, /datum))
|
||||
var/datum/D = whom
|
||||
return "*invalid:[D.type]*"
|
||||
else
|
||||
return "*invalid*"
|
||||
|
||||
var/text = ""
|
||||
. = ""
|
||||
|
||||
if (!the_key)
|
||||
text += "*no client*"
|
||||
else
|
||||
var/linked = 1
|
||||
if (include_link && !isnull(the_mob))
|
||||
if (istext(include_link))
|
||||
text += "<a href=\"byond://?src=[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
if(ismob(include_link))
|
||||
var/mob/MM = include_link
|
||||
if(MM.client)
|
||||
text += "<a href=\"byond://?src=\ref[MM.client];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
else if (istype(include_link, /client))
|
||||
text += "<a href=\"byond://?src=\ref[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
if(key)
|
||||
if(include_link && C)
|
||||
. += "<a href='?priv_msg=\ref[C]'>"
|
||||
|
||||
if (the_client && the_client.holder && the_client.holder.fakekey && !include_name)
|
||||
text += "Administrator"
|
||||
if(C && C.holder && C.holder.fakekey && !include_name)
|
||||
. += "Administrator"
|
||||
else
|
||||
text += "[the_key]"
|
||||
. += key
|
||||
|
||||
if (!isnull(include_link) && !isnull(the_mob))
|
||||
if(linked)
|
||||
text += "</a>"
|
||||
else
|
||||
text += " (DC)"
|
||||
if(include_link)
|
||||
if(C) . += "</a>"
|
||||
else . += " (DC)"
|
||||
else
|
||||
. += "*no key*"
|
||||
|
||||
if (include_name && !isnull(the_mob))
|
||||
if (the_mob.real_name)
|
||||
text += "/([the_mob.real_name])"
|
||||
else if (the_mob.name)
|
||||
text += "/([the_mob.name])"
|
||||
if(include_name && M)
|
||||
if(M.real_name)
|
||||
. += "/([M.real_name])"
|
||||
else if(M.name)
|
||||
. += "/([M.name])"
|
||||
|
||||
return text
|
||||
return .
|
||||
|
||||
/proc/key_name_admin(var/whom, var/include_name = 1)
|
||||
return key_name(whom, "%admin_ref%", include_name)
|
||||
return key_name(whom, 1, include_name)
|
||||
|
||||
|
||||
// Registers the on-close verb for a browse window (client/verb/.windowclose)
|
||||
@@ -615,7 +599,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
//world << "[src] was [src.mob.machine], setting to null"
|
||||
src.mob.machine = null
|
||||
src.mob.unset_machine()
|
||||
return
|
||||
|
||||
//Will return the location of the turf an atom is ultimatly sitting on
|
||||
@@ -945,7 +929,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
corner.density = 1
|
||||
corner.anchored = 1
|
||||
corner.icon = X.icon
|
||||
corner.icon_state = dd_replacetext(X.icon_state, "_s", "_f")
|
||||
corner.icon_state = replacetext(X.icon_state, "_s", "_f")
|
||||
corner.tag = "delete me"
|
||||
corner.name = "wall"
|
||||
|
||||
@@ -965,7 +949,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
// Reset the shuttle corners
|
||||
if(O.tag == "delete me")
|
||||
X.icon = 'icons/turf/shuttle.dmi'
|
||||
X.icon_state = dd_replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.icon_state = replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.name = "wall"
|
||||
del(O) // prevents multiple shuttle corners from stacking
|
||||
continue
|
||||
@@ -995,7 +979,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
fromupdate += ttl
|
||||
|
||||
else
|
||||
T.ReplaceWithSpace()
|
||||
T.ChangeTurf(/turf/space)
|
||||
|
||||
refined_src -= T
|
||||
refined_trg -= B
|
||||
@@ -1353,6 +1337,7 @@ proc/is_hot(obj/item/W as obj)
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) \
|
||||
)
|
||||
|
||||
/proc/is_surgery_tool(obj/item/W as obj)
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/scalpel) || \
|
||||
@@ -1363,6 +1348,14 @@ proc/is_hot(obj/item/W as obj)
|
||||
istype(W, /obj/item/weapon/bonesetter)
|
||||
)
|
||||
|
||||
//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))
|
||||
|
||||
/proc/reverse_direction(var/dir)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
@@ -1381,3 +1374,47 @@ proc/is_hot(obj/item/W as obj)
|
||||
return EAST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
|
||||
/*
|
||||
Checks if that loc and dir has a item on the wall
|
||||
*/
|
||||
var/list/WALLITEMS = list(
|
||||
"/obj/machinery/power/apc", "/obj/machinery/alarm", "/obj/item/device/radio/intercom",
|
||||
"/obj/structure/extinguisher_cabinet", "/obj/structure/reagent_dispensers/peppertank",
|
||||
"/obj/machinery/status_display", "/obj/machinery/requests_console", "/obj/machinery/light_switch", "/obj/effect/sign",
|
||||
"/obj/machinery/newscaster", "/obj/machinery/firealarm", "/obj/structure/noticeboard", "/obj/machinery/door_control",
|
||||
"/obj/machinery/computer/security/telescreen", "/obj/machinery/embedded_controller/radio/simple_vent_controller",
|
||||
"/obj/item/weapon/secstorage/ssafe", "/obj/machinery/door_timer", "/obj/machinery/flasher", "/obj/machinery/keycard_auth",
|
||||
"/obj/structure/mirror", "/obj/structure/closet/fireaxecabinet", "/obj/machinery/computer/security/telescreen/entertainment"
|
||||
)
|
||||
/proc/gotwallitem(loc, dir)
|
||||
for(var/obj/O in loc)
|
||||
for(var/item in WALLITEMS)
|
||||
if(istype(O, text2path(item)))
|
||||
//Direction works sometimes
|
||||
if(O.dir == dir)
|
||||
return 1
|
||||
|
||||
//Some stuff doesn't use dir properly, so we need to check pixel instead
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
if(O.pixel_y > 10)
|
||||
return 1
|
||||
if(NORTH)
|
||||
if(O.pixel_y < -10)
|
||||
return 1
|
||||
if(WEST)
|
||||
if(O.pixel_x > 10)
|
||||
return 1
|
||||
if(EAST)
|
||||
if(O.pixel_x < -10)
|
||||
return 1
|
||||
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in get_step(loc, dir))
|
||||
for(var/item in WALLITEMS)
|
||||
if(istype(O, text2path(item)))
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
@@ -18,6 +18,7 @@
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/sql_enabled = 1 // for sql switching
|
||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
var/allow_vote_mode = 0 // allow votes to change mode
|
||||
var/allow_admin_jump = 1 // allows admin jumping
|
||||
@@ -102,7 +103,11 @@
|
||||
var/metroid_delay = 0
|
||||
var/animal_delay = 0
|
||||
|
||||
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system.
|
||||
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
|
||||
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
|
||||
var/assistant_maint = 0 //Do assistants get maint access?
|
||||
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
@@ -123,20 +128,10 @@
|
||||
src.votable_modes += "secret"
|
||||
|
||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||
var/text = file2text(filename)
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No [filename] file found, setting defaults"
|
||||
src = new /datum/configuration()
|
||||
return
|
||||
|
||||
diary << "Reading configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
for(var/t in Lines)
|
||||
if(!t) continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
@@ -162,6 +157,9 @@
|
||||
if ("admin_legacy_system")
|
||||
config.admin_legacy_system = 1
|
||||
|
||||
if ("ban_legacy_system")
|
||||
config.ban_legacy_system = 1
|
||||
|
||||
if ("log_ooc")
|
||||
config.log_ooc = 1
|
||||
|
||||
@@ -204,6 +202,9 @@
|
||||
if ("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
|
||||
if("allow_admin_ooccolor")
|
||||
config.allow_admin_ooccolor = 1
|
||||
|
||||
if ("allow_vote_restart")
|
||||
config.allow_vote_restart = 1
|
||||
|
||||
@@ -364,6 +365,12 @@
|
||||
limitalienplayers = 1
|
||||
alien_to_human_ratio = text2num(value)
|
||||
|
||||
if("assistant_maint")
|
||||
config.assistant_maint = 1
|
||||
|
||||
if("gateway_delay")
|
||||
config.gateway_delay = text2num(value)
|
||||
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
@@ -412,20 +419,9 @@
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/loadsql(filename) // -- TLE
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No dbconfig.txt file found, retaining defaults"
|
||||
world << "No dbconfig.txt file found, retaining defaults"
|
||||
return
|
||||
|
||||
diary << "Reading database configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
var/list/Lines = file2list(filename)
|
||||
for(var/t in Lines)
|
||||
if(!t) continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
@@ -469,20 +465,9 @@
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/loadforumsql(filename) // -- TLE
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No forumdbconfig.txt file found, retaining defaults"
|
||||
world << "No forumdbconfig.txt file found, retaining defaults"
|
||||
return
|
||||
|
||||
diary << "Reading forum database configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
var/list/Lines = file2list(filename)
|
||||
for(var/t in Lines)
|
||||
if(!t) continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
|
||||
@@ -34,12 +34,10 @@ var/datum/controller/failsafe/Failsafe
|
||||
if(0 to 3)
|
||||
MC_defcon++
|
||||
if(4)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has not fired in the last [MC_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
admins << "<font color='red' size='2'><b>Warning. The Master Controller has not fired in the last [MC_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
MC_defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has still not fired within the last [MC_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
admins << "<font color='red' size='2'><b>Warning. The Master Controller has still not fired within the last [MC_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/game_controller() //replace the old master_controller (hence killing the old one's process)
|
||||
master_controller.process() //Start it rolling again
|
||||
MC_defcon = 0
|
||||
@@ -53,12 +51,10 @@ var/datum/controller/failsafe/Failsafe
|
||||
if(0 to 3)
|
||||
lighting_defcon++
|
||||
if(4)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Lighting Controller has not fired in the last [lighting_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
admins << "<font color='red' size='2'><b>Warning. The Lighting Controller has not fired in the last [lighting_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
lighting_defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Lighting Controller has still not fired within the last [lighting_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
admins << "<font color='red' size='2'><b>Warning. The Lighting Controller has still not fired within the last [lighting_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/lighting() //replace the old lighting_controller (hence killing the old one's process)
|
||||
lighting_controller.process() //Start it rolling again
|
||||
lighting_defcon = 0
|
||||
|
||||
@@ -42,9 +42,9 @@ datum/controller/game_controller/New()
|
||||
|
||||
if(!job_master)
|
||||
job_master = new /datum/controller/occupations()
|
||||
if(job_master.SetupOccupations())
|
||||
world << "\red \b Job setup complete"
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
job_master.SetupOccupations()
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
world << "\red \b Job setup complete"
|
||||
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
|
||||
@@ -288,6 +288,13 @@ datum/shuttle_controller
|
||||
|
||||
if(1)
|
||||
|
||||
// Just before it leaves, close the damn doors!
|
||||
if(timeleft == 2 || timeleft == 1)
|
||||
var/area/start_location = locate(/area/shuttle/escape/station)
|
||||
for(var/obj/machinery/door/D in start_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
if(timeleft>0)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if("Supply Shuttle")
|
||||
supply_shuttle.process()
|
||||
feedback_add_details("admin_verb","RSupply")
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.", 1)
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
return
|
||||
|
||||
|
||||
@@ -74,5 +74,5 @@
|
||||
if("Cameras")
|
||||
debug_variables(cameranet)
|
||||
feedback_add_details("admin_verb","DCameras")
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.", 1)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
return
|
||||
|
||||
@@ -64,7 +64,7 @@ datum/controller/vote
|
||||
greatest_votes = votes
|
||||
//default-vote for everyone who didn't vote
|
||||
if(!config.vote_no_default && choices.len)
|
||||
var/non_voters = (client_list.len - total_votes)
|
||||
var/non_voters = (clients.len - total_votes)
|
||||
if(non_voters > 0)
|
||||
if(mode == "restart")
|
||||
choices["Continue Playing"] += non_voters
|
||||
@@ -186,7 +186,7 @@ datum/controller/vote
|
||||
var/trialmin = 0
|
||||
if(C.holder)
|
||||
admin = 1
|
||||
if (C.holder.level >= 3)
|
||||
if(C.holder.rights & R_ADMIN)
|
||||
trialmin = 1
|
||||
voting |= C
|
||||
|
||||
|
||||
+421
-467
@@ -173,27 +173,27 @@ client
|
||||
if(istype(D,/atom))
|
||||
var/atom/A = D
|
||||
if(isliving(A))
|
||||
body += "<a href='byond://?src=\ref[src];rename=\ref[D]'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
var/mob/living/M = A
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brute"]'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["fire"]'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["toxin"]'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["oxygen"]'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["clone"]'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brain"]'>[M.getBrainLoss()]</a>
|
||||
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
"}
|
||||
else
|
||||
body += "<a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
else
|
||||
body += "<b>[D]</b>"
|
||||
|
||||
@@ -219,10 +219,10 @@ client
|
||||
|
||||
body += "</div></td>"
|
||||
|
||||
body += "<td width='50%'><div align='center'><a href='byond://?src=\ref[src];datumrefresh=\ref[D]'>Refresh</a>"
|
||||
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
|
||||
|
||||
//if(ismob(D))
|
||||
// body += "<br><a href='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
|
||||
body += {" <form>
|
||||
<select name="file" size="1"
|
||||
@@ -237,36 +237,37 @@ client
|
||||
"}
|
||||
|
||||
|
||||
body += "<option value='byond://?src=\ref[src];mark_object=\ref[D]'>Mark Object</option>"
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
body += "<option value>---</option>"
|
||||
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='byond://?src=\ref[src];ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='byond://?src=\ref[src];make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='byond://?src=\ref[src];drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='byond://?src=\ref[src];regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value='?_src_=vars;setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='?_src_=vars;makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];gib=\ref[D]'>Gib</option>"
|
||||
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
|
||||
if(isobj(D))
|
||||
body += "<option value='byond://?src=\ref[src];delall=\ref[D]'>Delete all of type</option>"
|
||||
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
|
||||
if(isobj(D) || ismob(D) || isturf(D))
|
||||
body += "<option value='byond://?src=\ref[src];explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='byond://?src=\ref[src];emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
|
||||
body += "</select></form>"
|
||||
|
||||
@@ -326,7 +327,7 @@ client
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
html += "<li style='backgroundColor:white'>(<a href='byond://?src=\ref[src];datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='byond://?src=\ref[src];datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='byond://?src=\ref[src];datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
@@ -363,11 +364,11 @@ client
|
||||
|
||||
else if (istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
var/list/L = value
|
||||
@@ -397,437 +398,390 @@ client
|
||||
|
||||
return html
|
||||
|
||||
/client/proc/view_var_Topic(href,href_list,hsrc)
|
||||
/client/proc/view_var_Topic(href, href_list, hsrc)
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client == src) && src.holder )
|
||||
. = 1 //default return
|
||||
if (href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if (href_list["rename"])
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M)) return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1)
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if (href_list["varnameedit"])
|
||||
if(!href_list["datumedit"] || !href_list["varnameedit"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/DAT = locate(href_list["datumedit"])
|
||||
if(!DAT)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(DAT,/datum) && !istype(DAT,/client))
|
||||
usr << "Can't edit an item of this type. Type must be /datum or /client, so anything except simple variables."
|
||||
return
|
||||
modify_variables(DAT, href_list["varnameedit"], 1)
|
||||
else if (href_list["varnamechange"])
|
||||
if(!href_list["datumchange"] || !href_list["varnamechange"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/DAT = locate(href_list["datumchange"])
|
||||
if(!DAT)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(DAT,/datum) && !istype(DAT,/client))
|
||||
usr << "Can't edit an item of this type. Type must be /datum or /client, so anything except simple variables."
|
||||
return
|
||||
modify_variables(DAT, href_list["varnamechange"], 0)
|
||||
else if (href_list["varnamemass"])
|
||||
if(!href_list["datummass"] || !href_list["varnamemass"])
|
||||
usr << "Varedit error: Not all information has been sent. Contact a coder."
|
||||
return
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!A)
|
||||
usr << "Item not found"
|
||||
return
|
||||
if(!istype(A,/atom))
|
||||
usr << "Can't mass edit an item of this type. Type must be /atom, so an object, turf, mob or area. You cannot mass edit clients!"
|
||||
return
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
else if (href_list["mob_player_panel"])
|
||||
if(!href_list["mob_player_panel"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["mob_player_panel"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
src.holder.show_player_panel(MOB)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
else if (href_list["give_spell"])
|
||||
if(!href_list["give_spell"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["give_spell"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.give_spell(MOB)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
else if (href_list["ninja"])
|
||||
if(!href_list["ninja"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["ninja"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_ninjafy(MOB)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
else if (href_list["godmode"])
|
||||
if(!href_list["godmode"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["godmode"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_godmode(MOB)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
else if (href_list["gib"])
|
||||
if(!href_list["gib"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["gib"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_gib(MOB)
|
||||
|
||||
else if (href_list["build_mode"])
|
||||
if(!href_list["build_mode"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["build_mode"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
togglebuildmode(MOB)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if (href_list["drop_everything"])
|
||||
if(!href_list["drop_everything"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["drop_everything"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
usr.client.cmd_admin_drop_everything(MOB)
|
||||
|
||||
else if (href_list["direct_control"])
|
||||
if(!href_list["direct_control"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["direct_control"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
usr.client.cmd_assume_direct_control(MOB)
|
||||
|
||||
else if (href_list["make_skeleton"])
|
||||
if(!href_list["make_skeleton"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["make_skeleton"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
if(ishuman(MOB))
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
var/mob/living/carbon/human/HUMANMOB = MOB
|
||||
HUMANMOB.makeSkeleton()
|
||||
|
||||
else if (href_list["delall"])
|
||||
if(!href_list["delall"])
|
||||
return
|
||||
var/atom/A = locate(href_list["delall"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!A)
|
||||
return
|
||||
if(!isobj(A))
|
||||
usr << "This can only be used on objects (of type /obj)"
|
||||
return
|
||||
if(!A.type)
|
||||
return
|
||||
var/action_type = alert("Strict type ([A.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(alert("Are you really sure you want to delete all objects of type [A.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
var/a_type = A.type
|
||||
if(action_type == "Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/O in world)
|
||||
if(O.type == a_type)
|
||||
i++
|
||||
del(O)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of scrict type [a_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of scrict type [a_type] ([i] objects deleted) ", 1)
|
||||
else if(action_type == "Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/O in world)
|
||||
if(istype(O,a_type))
|
||||
i++
|
||||
del(O)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of scrict type with subtypes [a_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type with subtypes [a_type] ([i] objects deleted) ", 1)
|
||||
|
||||
else if (href_list["explode"])
|
||||
if(!href_list["explode"])
|
||||
return
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!A)
|
||||
return
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
else if (href_list["emp"])
|
||||
if(!href_list["emp"])
|
||||
return
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!A)
|
||||
return
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
else if (href_list["mark_object"])
|
||||
if(!href_list["mark_object"])
|
||||
return
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!D)
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
else if (href_list["rotatedatum"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!href_list["rotatedir"])
|
||||
return
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!A)
|
||||
return
|
||||
if(!istype(A,/atom))
|
||||
usr << "This can only be done to objects of type /atom"
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
switch(href_list["rotatedir"])
|
||||
if("right")
|
||||
A.dir = turn(A.dir, -45)
|
||||
if("left")
|
||||
A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
else if (href_list["makemonkey"])
|
||||
var/mob/M = locate(href_list["makemonkey"])
|
||||
if(!M)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
else if (href_list["makerobot"])
|
||||
var/mob/M = locate(href_list["makerobot"])
|
||||
if(!M)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
else if (href_list["makealien"])
|
||||
var/mob/M = locate(href_list["makealien"])
|
||||
if(!M)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
else if (href_list["makemetroid"])
|
||||
var/mob/M = locate(href_list["makemetroid"])
|
||||
if(!M)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
else if (href_list["makeai"])
|
||||
var/mob/M = locate(href_list["makeai"])
|
||||
if(!M)
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!ishuman(M))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
|
||||
if(!action_type || action_type == "Cancel")
|
||||
return
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
else if (href_list["setmutantrace"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","tajaran","skrell") //BS12 EDIT TAJ EDIT SKR
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H || !istype(H))
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
else if (href_list["regenerateicons"])
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to objects of type /mob"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
M.regenerate_icons()
|
||||
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
var/mob/M = locate(href_list["mobToDamage"])
|
||||
var/Text = locate(href_list["adjustDamage"])
|
||||
|
||||
if(!isliving(M)) return
|
||||
var/mob/living/L = M
|
||||
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
if(Text == "brute")
|
||||
L.adjustBruteLoss(amount)
|
||||
else if(Text == "fire")
|
||||
L.adjustFireLoss(amount)
|
||||
else if(Text == "toxin")
|
||||
L.adjustToxLoss(amount)
|
||||
else if(Text == "oxygen")
|
||||
L.adjustOxyLoss(amount)
|
||||
else if(Text == "brain")
|
||||
L.adjustBrainLoss(amount)
|
||||
else if(Text == "clone")
|
||||
L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [M] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [M] ", 1)
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
else
|
||||
. = 0
|
||||
if (href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!DAT)
|
||||
return
|
||||
if(!istype(DAT,/datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
. = 1
|
||||
if( (usr.client != src) || !src.holder )
|
||||
return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","shadow","tajaran","skrell")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
+56
-21
@@ -1,10 +1,10 @@
|
||||
#define NON_CONTAGIOUS -1
|
||||
#define SPECIAL 0
|
||||
#define CONTACT_GENERAL 1
|
||||
#define CONTACT_HANDS 2
|
||||
#define CONTACT_FEET 3
|
||||
#define AIRBORNE 4
|
||||
#define BLOOD 5
|
||||
#define SPECIAL -1
|
||||
#define NON_CONTAGIOUS 0
|
||||
#define BLOOD 1
|
||||
#define CONTACT_FEET 2
|
||||
#define CONTACT_HANDS 3
|
||||
#define CONTACT_GENERAL 4
|
||||
#define AIRBORNE 5
|
||||
|
||||
#define SCANNER 1
|
||||
#define PANDEMIC 2
|
||||
@@ -17,6 +17,8 @@ to null does not delete the object itself. Thank you.
|
||||
|
||||
*/
|
||||
|
||||
var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
|
||||
/datum/disease
|
||||
var/form = "Virus" //During medscans, what the disease is referred to as
|
||||
@@ -28,6 +30,7 @@ to null does not delete the object itself. Thank you.
|
||||
var/cure_list = null // allows for multiple possible cure combinations
|
||||
var/cure_chance = 8//chance for the cure to do its job
|
||||
var/spread = null //spread type description
|
||||
var/initial_spread = null
|
||||
var/spread_type = AIRBORNE
|
||||
var/contagious_period = 0//the disease stage when it can be spread
|
||||
var/list/affected_species = list()
|
||||
@@ -58,15 +61,19 @@ to null does not delete the object itself. Thank you.
|
||||
//world << "[affected_mob] is carrier"
|
||||
return
|
||||
|
||||
spread = (cure_present?"Remissive":initial(spread))
|
||||
spread = (cure_present?"Remissive":initial_spread)
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
if(stage_prob != 0 && prob(stage_prob) && stage != max_stages && !cure_present && age > stage_minimum_age * stage) //now the disease shouldn't get back up to stage 4 in no time
|
||||
|
||||
if(stage < max_stages && prob(stage_prob) && !cure_present) //now the disease shouldn't get back up to stage 4 in no time
|
||||
stage++
|
||||
if(stage != 1 && (prob(1) || (cure_present && prob(cure_chance))))
|
||||
//world << "up"
|
||||
if(stage > 0 && (cure_present && prob(cure_chance)))
|
||||
stage--
|
||||
else if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
|
||||
//world << "down"
|
||||
|
||||
if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
|
||||
// world << "Cured as stage act"
|
||||
cure()
|
||||
return
|
||||
@@ -93,11 +100,21 @@ to null does not delete the object itself. Thank you.
|
||||
|
||||
return result
|
||||
|
||||
/datum/disease/proc/spread_by_touch()
|
||||
switch(spread_type)
|
||||
if(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source=null)
|
||||
/datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread)
|
||||
//world << "Disease [src] proc spread was called from holder [source]"
|
||||
|
||||
if(spread_type == SPECIAL || spread_type == NON_CONTAGIOUS)//does not spread
|
||||
// If we're overriding how we spread, say so here
|
||||
var/how_spread = spread_type
|
||||
if(force_spread)
|
||||
how_spread = force_spread
|
||||
|
||||
if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS || how_spread == BLOOD)//does not spread
|
||||
return
|
||||
|
||||
if(stage < contagious_period) //the disease is not contagious at this stage
|
||||
@@ -109,27 +126,36 @@ to null does not delete the object itself. Thank you.
|
||||
else //no source and no mob affected. Rogue disease. Break
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return // Don't spread if we have spaceacillin in our system.
|
||||
|
||||
var/check_range = AIRBORNE//defaults to airborne - range 4
|
||||
var/check_range = airborne_range//defaults to airborne - range 2
|
||||
|
||||
if(spread_type != AIRBORNE && spread_type != SPECIAL)
|
||||
check_range = 0 // everything else, like infect-on-contact things, only infect things on top of it
|
||||
if(how_spread != AIRBORNE && how_spread != SPECIAL)
|
||||
check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it
|
||||
|
||||
for(var/mob/living/carbon/M in oview(check_range, source)) //I have no idea why oview works when oviewers doesn't. -Pete
|
||||
M.contract_disease(src)
|
||||
if(isturf(source.loc))
|
||||
for(var/mob/living/carbon/M in oview(check_range, source))
|
||||
if(isturf(M.loc))
|
||||
if(AStar(source.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
|
||||
M.contract_disease(src, 0, 1, force_spread)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/proc/process()
|
||||
if(!holder) return
|
||||
if(!holder)
|
||||
active_diseases -= src
|
||||
return
|
||||
if(prob(65))
|
||||
spread(holder)
|
||||
|
||||
if(affected_mob)
|
||||
for(var/datum/disease/D in affected_mob.viruses)
|
||||
if(D != src)
|
||||
if(istype(src, D.type))
|
||||
if(IsSame(D))
|
||||
//error("Deleting [D.name] because it's the same as [src.name].")
|
||||
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||
|
||||
if(holder == affected_mob)
|
||||
@@ -159,10 +185,19 @@ to null does not delete the object itself. Thank you.
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/New(var/process=1)//process = 1 - adding the object to global list. List is processed by master controller.
|
||||
/datum/disease/New(var/process=1, var/datum/disease/D)//process = 1 - adding the object to global list. List is processed by master controller.
|
||||
cure_list = list(cure_id) // to add more cures, add more vars to this list in the actual disease's New()
|
||||
if(process) // Viruses in list are considered active.
|
||||
active_diseases += src
|
||||
initial_spread = spread
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/Copy(var/process = 0)
|
||||
return new type(process, src)
|
||||
|
||||
/*
|
||||
/datum/disease/Del()
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
/*
|
||||
|
||||
Advance Disease is a system for Virologist to Engineer their own disease with symptoms that have effects and properties
|
||||
which add onto the overall disease.
|
||||
|
||||
If you need help with creating new symptoms or expanding the advance disease, ask for Giacom on #coderbus.
|
||||
|
||||
*/
|
||||
|
||||
#define RANDOM_STARTING_LEVEL 2
|
||||
|
||||
var/list/archive_diseases = list()
|
||||
|
||||
// The order goes from easy to cure to hard to cure.
|
||||
var/list/advance_cures = list(
|
||||
"nutriment", "sugar", "orangejuice",
|
||||
"spaceacillin", "kelotane", "ethanol",
|
||||
"leporazine", "synaptizine", "lipozine",
|
||||
"silver", "gold", "plasma"
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
PROPERTIES
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance
|
||||
|
||||
name = "Unknown" // We will always let our Virologist name our disease.
|
||||
desc = "An engineered disease which can contain a multitude of symptoms."
|
||||
form = "Advance Disease" // Will let med-scanners know that this disease was engineered.
|
||||
agent = "advance microbes"
|
||||
max_stages = 5
|
||||
spread = "Unknown"
|
||||
affected_species = list("Human","Monkey")
|
||||
|
||||
// NEW VARS
|
||||
|
||||
var/list/symptoms = list() // The symptoms of the disease.
|
||||
var/id = ""
|
||||
var/processing = 0
|
||||
|
||||
/*
|
||||
|
||||
OLD PROCS
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
|
||||
|
||||
// Setup our dictionary if it hasn't already.
|
||||
if(!dictionary_symptoms.len)
|
||||
for(var/symp in list_symptoms)
|
||||
var/datum/symptom/S = new symp
|
||||
dictionary_symptoms[S.id] = symp
|
||||
|
||||
if(!istype(D))
|
||||
D = null
|
||||
// Generate symptoms if we weren't given any.
|
||||
|
||||
if(!symptoms || !symptoms.len)
|
||||
|
||||
if(!D || !D.symptoms || !D.symptoms.len)
|
||||
symptoms = GenerateSymptoms()
|
||||
else
|
||||
for(var/datum/symptom/S in D.symptoms)
|
||||
symptoms += new S.type
|
||||
|
||||
Refresh()
|
||||
..(process, D)
|
||||
return
|
||||
|
||||
/datum/disease/advance/Del()
|
||||
if(processing)
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.End(src)
|
||||
..()
|
||||
|
||||
// Randomly pick a symptom to activate.
|
||||
/datum/disease/advance/stage_act()
|
||||
..()
|
||||
if(symptoms && symptoms.len)
|
||||
|
||||
if(!processing)
|
||||
processing = 1
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.Start(src)
|
||||
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.Activate(src)
|
||||
else
|
||||
CRASH("We do not have any symptoms during stage_act()!")
|
||||
|
||||
// Compares type then ID.
|
||||
/datum/disease/advance/IsSame(var/datum/disease/advance/D)
|
||||
if(!(istype(D, /datum/disease/advance)))
|
||||
//error("Returning 0 because not same type.")
|
||||
|
||||
return 0
|
||||
//error("Comparing [src.GetDiseaseID()] [D.GetDiseaseID()]")
|
||||
if(src.GetDiseaseID() != D.GetDiseaseID())
|
||||
//error("Returing 0")
|
||||
return 0
|
||||
//error("Returning 1")
|
||||
return 1
|
||||
|
||||
// To add special resistances.
|
||||
/datum/disease/advance/cure(var/resistance=1)
|
||||
if(affected_mob)
|
||||
var/id = "[GetDiseaseID()]"
|
||||
if(resistance && !(id in affected_mob.resistances))
|
||||
affected_mob.resistances[id] = id
|
||||
affected_mob.viruses -= src //remove the datum from the list
|
||||
del(src) //delete the datum to stop it processing
|
||||
return
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
/datum/disease/advance/Copy(var/process = 0)
|
||||
return new /datum/disease/advance(process, src, 1)
|
||||
|
||||
/*
|
||||
|
||||
NEW PROCS
|
||||
|
||||
*/
|
||||
|
||||
// Mix the symptoms of two diseases (the src and the argument)
|
||||
/datum/disease/advance/proc/Mix(var/datum/disease/advance/D)
|
||||
if(!(src.IsSame(D)))
|
||||
var/list/possible_symptoms = shuffle(D.symptoms)
|
||||
for(var/datum/symptom/S in possible_symptoms)
|
||||
AddSymptom(new S.type)
|
||||
|
||||
/datum/disease/advance/proc/HasSymptom(var/datum/symptom/S)
|
||||
for(var/datum/symptom/symp in symptoms)
|
||||
if(symp.id == S.id)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
|
||||
/datum/disease/advance/proc/GenerateSymptoms(var/type_level_limit = RANDOM_STARTING_LEVEL, var/amount_get = 0)
|
||||
|
||||
var/list/generated = list() // Symptoms we generated.
|
||||
|
||||
// Generate symptoms. By default, we only choose non-deadly symptoms.
|
||||
var/list/possible_symptoms = list()
|
||||
for(var/symp in list_symptoms)
|
||||
var/datum/symptom/S = new symp
|
||||
if(S.level <= type_level_limit)
|
||||
if(!HasSymptom(S))
|
||||
possible_symptoms += S
|
||||
|
||||
if(!possible_symptoms.len)
|
||||
return
|
||||
//error("Advance Disease - We weren't able to get any possible symptoms in GenerateSymptoms([type_level_limit], [amount_get])")
|
||||
|
||||
// Random chance to get more than one symptom
|
||||
var/number_of = amount_get
|
||||
if(!amount_get)
|
||||
number_of = 1
|
||||
while(prob(20))
|
||||
number_of += 1
|
||||
|
||||
for(var/i = 1; number_of >= i; i++)
|
||||
var/datum/symptom/S = pick(possible_symptoms)
|
||||
generated += S
|
||||
possible_symptoms -= S
|
||||
|
||||
return generated
|
||||
|
||||
/datum/disease/advance/proc/Refresh(var/new_name = 0)
|
||||
//world << "[src.name] \ref[src] - REFRESH!"
|
||||
var/list/properties = GenerateProperties()
|
||||
AssignProperties(properties)
|
||||
|
||||
if(!archive_diseases[GetDiseaseID()])
|
||||
if(new_name)
|
||||
AssignName()
|
||||
archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
|
||||
archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
|
||||
|
||||
var/datum/disease/advance/A = archive_diseases[GetDiseaseID()]
|
||||
AssignName(A.name)
|
||||
|
||||
//Generate disease properties based on the effects. Returns an associated list.
|
||||
/datum/disease/advance/proc/GenerateProperties()
|
||||
|
||||
if(!symptoms || !symptoms.len)
|
||||
CRASH("We did not have any symptoms before generating properties.")
|
||||
return
|
||||
|
||||
var/list/properties = list("resistance" = 1, "stealth" = 1, "stage_rate" = 1, "transmittable" = 1, "severity" = 1)
|
||||
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
|
||||
properties["resistance"] += S.resistance
|
||||
properties["stealth"] += S.stealth
|
||||
properties["stage_rate"] += S.stage_speed
|
||||
properties["transmittable"] += S.transmittable
|
||||
properties["severity"] = max(properties["severity"], S.level) // severity is based on the highest level symptom
|
||||
|
||||
return properties
|
||||
|
||||
// Assign the properties that are in the list.
|
||||
/datum/disease/advance/proc/AssignProperties(var/list/properties = list())
|
||||
|
||||
if(properties && properties.len)
|
||||
|
||||
hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) )
|
||||
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
|
||||
SetSpread(Clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE))
|
||||
permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 1)
|
||||
cure_chance = 15 - Clamp(properties["resistance"], -5, 5) // can be between 10 and 20
|
||||
stage_prob = max(properties["stage_rate"], 2)
|
||||
SetSeverity(properties["severity"])
|
||||
GenerateCure(properties)
|
||||
else
|
||||
CRASH("Our properties were empty or null!")
|
||||
|
||||
|
||||
// Assign the spread type and give it the correct description.
|
||||
/datum/disease/advance/proc/SetSpread(var/spread_id)
|
||||
switch(spread_id)
|
||||
|
||||
if(NON_CONTAGIOUS)
|
||||
spread = "None"
|
||||
if(SPECIAL)
|
||||
spread = "None"
|
||||
if(CONTACT_GENERAL, CONTACT_HANDS, CONTACT_FEET)
|
||||
spread = "On contact"
|
||||
if(AIRBORNE)
|
||||
spread = "Airborne"
|
||||
if(BLOOD)
|
||||
spread = "Blood"
|
||||
|
||||
spread_type = spread_id
|
||||
//world << "Setting spread type to [spread_id]/[spread]"
|
||||
|
||||
/datum/disease/advance/proc/SetSeverity(var/level_sev)
|
||||
|
||||
switch(level_sev)
|
||||
|
||||
if(-INFINITY to 0)
|
||||
severity = "Non-Threat"
|
||||
if(1)
|
||||
severity = "Minor"
|
||||
if(2)
|
||||
severity = "Medium"
|
||||
if(3)
|
||||
severity = "Harmful"
|
||||
if(4)
|
||||
severity = "Dangerous!"
|
||||
if(5 to INFINITY)
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
else
|
||||
severity = "Unknown"
|
||||
|
||||
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
//world << "Res = [res]"
|
||||
cure_id = advance_cures[res]
|
||||
|
||||
// Get the cure name from the cure_id
|
||||
var/datum/reagent/D = chemical_reagents_list[cure_id]
|
||||
cure = D.name
|
||||
|
||||
|
||||
return
|
||||
|
||||
// Randomly generate a symptom, has a chance to lose or gain a symptom.
|
||||
/datum/disease/advance/proc/Evolve(var/level = 2)
|
||||
var/s = safepick(GenerateSymptoms(level, 1))
|
||||
if(s)
|
||||
AddSymptom(s)
|
||||
Refresh(1)
|
||||
return
|
||||
|
||||
// Randomly remove a symptom.
|
||||
/datum/disease/advance/proc/Devolve()
|
||||
if(symptoms.len > 1)
|
||||
var/s = safepick(symptoms)
|
||||
if(s)
|
||||
RemoveSymptom(s)
|
||||
Refresh(1)
|
||||
return
|
||||
|
||||
// Name the disease.
|
||||
/datum/disease/advance/proc/AssignName(var/name = "Unknown")
|
||||
src.name = name
|
||||
return
|
||||
|
||||
// Return a unique ID of the disease.
|
||||
/datum/disease/advance/proc/GetDiseaseID()
|
||||
|
||||
var/list/L = list()
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
L += S.id
|
||||
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
var/result = dd_list2text(L, ":")
|
||||
id = result
|
||||
return result
|
||||
|
||||
|
||||
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
|
||||
// we take a random symptom away and add the new one.
|
||||
/datum/disease/advance/proc/AddSymptom(var/datum/symptom/S)
|
||||
|
||||
if(HasSymptom(S))
|
||||
return
|
||||
|
||||
if(symptoms.len < 5 + rand(-1, 1))
|
||||
symptoms += S
|
||||
else
|
||||
RemoveSymptom(pick(symptoms))
|
||||
symptoms += S
|
||||
return
|
||||
|
||||
// Simply removes the symptom.
|
||||
/datum/disease/advance/proc/RemoveSymptom(var/datum/symptom/S)
|
||||
symptoms -= S
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
Static Procs
|
||||
|
||||
*/
|
||||
|
||||
// Mix a list of advance diseases and return the mixed result.
|
||||
/proc/Advance_Mix(var/list/D_list)
|
||||
|
||||
//world << "Mixing!!!!"
|
||||
|
||||
var/list/diseases = list()
|
||||
|
||||
for(var/datum/disease/advance/A in D_list)
|
||||
diseases += A.Copy()
|
||||
|
||||
if(!diseases.len)
|
||||
return null
|
||||
if(diseases.len <= 1)
|
||||
return pick(diseases) // Just return the only entry.
|
||||
|
||||
var/i = 0
|
||||
// Mix our diseases until we are left with only one result.
|
||||
while(i < 20 && diseases.len > 1)
|
||||
|
||||
i++
|
||||
|
||||
var/datum/disease/advance/D1 = pick(diseases)
|
||||
diseases -= D1
|
||||
|
||||
var/datum/disease/advance/D2 = pick(diseases)
|
||||
D2.Mix(D1)
|
||||
|
||||
// Should be only 1 entry left, but if not let's only return a single entry
|
||||
//world << "END MIXING!!!!!"
|
||||
var/datum/disease/advance/to_return = pick(diseases)
|
||||
to_return.Refresh(1)
|
||||
return to_return
|
||||
|
||||
/proc/SetViruses(var/datum/reagent/R, var/list/data)
|
||||
if(data)
|
||||
var/list/preserve = list()
|
||||
if(istype(data) && data["viruses"])
|
||||
for(var/datum/disease/A in data["viruses"])
|
||||
preserve += A.Copy()
|
||||
R.data = data.Copy()
|
||||
else
|
||||
R.data = data
|
||||
if(preserve.len)
|
||||
R.data["viruses"] = preserve
|
||||
|
||||
/proc/AdminCreateVirus(var/mob/user)
|
||||
var/i = 5
|
||||
|
||||
var/datum/disease/advance/D = new(0, null)
|
||||
D.symptoms = list()
|
||||
|
||||
var/list/symptoms = list()
|
||||
symptoms += "Done"
|
||||
symptoms += list_symptoms.Copy()
|
||||
do
|
||||
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
|
||||
if(istext(symptom))
|
||||
i = 0
|
||||
else if(ispath(symptom))
|
||||
var/datum/symptom/S = new symptom
|
||||
if(!D.HasSymptom(S))
|
||||
D.symptoms += S
|
||||
i -= 1
|
||||
while(i > 0)
|
||||
|
||||
if(D.symptoms.len > 0)
|
||||
|
||||
var/new_name = input(user, "Name your new disease.", "New Name")
|
||||
D.AssignName(new_name)
|
||||
D.Refresh()
|
||||
|
||||
for(var/datum/disease/advance/AD in active_diseases)
|
||||
AD.Refresh()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
if(H.z != 1)
|
||||
continue
|
||||
if(!H.has_disease(D))
|
||||
H.contract_disease(D, 1)
|
||||
break
|
||||
|
||||
var/list/name_symptoms = list()
|
||||
for(var/datum/symptom/S in D.symptoms)
|
||||
name_symptoms += S.name
|
||||
message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
|
||||
#undef RANDOM_STARTING_LEVEL
|
||||
@@ -0,0 +1,43 @@
|
||||
// Cold
|
||||
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Flu
|
||||
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Voice Changing
|
||||
|
||||
/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Epiglottis Mutation"
|
||||
symptoms = list(new/datum/symptom/voice_change)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Toxin Filter
|
||||
|
||||
/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Liver Enhancer"
|
||||
symptoms = list(new/datum/symptom/heal)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Hullucigen
|
||||
|
||||
/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Impairment"
|
||||
symptoms = list(new/datum/symptom/hallucigen)
|
||||
..(process, D, copy)
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Confusion
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance.
|
||||
Decreases stage speed.
|
||||
Not very transmittable.
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Makes the affected mob be confused for short periods of time.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/confusion
|
||||
|
||||
name = "Confusion"
|
||||
stealth = 1
|
||||
resistance = -1
|
||||
stage_speed = -3
|
||||
transmittable = 0
|
||||
level = 4
|
||||
|
||||
|
||||
/datum/symptom/confusion/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel confused.", "You forgot what you were thinking about.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>You are unable to think straight!</span>"
|
||||
M.confused = min(100, M.confused + 2)
|
||||
|
||||
return
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Coughing
|
||||
|
||||
Noticable.
|
||||
Little Resistance.
|
||||
Doesn't increase stage speed much.
|
||||
Transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Will force the affected mob to drop small items!
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/cough
|
||||
|
||||
name = "Cough"
|
||||
stealth = -1
|
||||
resistance = 3
|
||||
stage_speed = 1
|
||||
transmittable = 2
|
||||
level = 1
|
||||
|
||||
/datum/symptom/cough/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3)
|
||||
M << "<span notice='notice'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>"
|
||||
else
|
||||
M.emote("cough")
|
||||
var/obj/item/I = M.get_active_hand()
|
||||
if(I && I.w_class < 3)
|
||||
M.drop_item()
|
||||
return
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Damage Converter
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance tremendously.
|
||||
Decreases stage speed tremendously.
|
||||
Reduced transmittablity
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Slowly converts brute/fire damage to toxin.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/damage_converter
|
||||
|
||||
name = "Toxic Compensation"
|
||||
stealth = 1
|
||||
resistance = -4
|
||||
stage_speed = -4
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/damage_converter/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
Convert(M)
|
||||
return
|
||||
|
||||
/datum/symptom/damage_converter/proc/Convert(var/mob/living/M)
|
||||
|
||||
if(M.getFireLoss() < M.getMaxHealth() || M.getBruteLoss() < M.getMaxHealth())
|
||||
var/get_damage = rand(1, 2)
|
||||
M.adjustFireLoss(-get_damage)
|
||||
M.adjustBruteLoss(-get_damage)
|
||||
M.adjustToxLoss(get_damage)
|
||||
return 1
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Dizziness
|
||||
|
||||
Hidden.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittability
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Shakes the affected mob's screen for short periods.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/dizzy // Not the egg
|
||||
|
||||
name = "Dizziness"
|
||||
stealth = 2
|
||||
resistance = -2
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 4
|
||||
|
||||
/datum/symptom/dizzy/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel dizzy.", "Your head starts spinning.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>You are unable to look straight!</span>"
|
||||
M.make_dizzy(5)
|
||||
return
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Fever
|
||||
|
||||
No change to hidden.
|
||||
Increases resistance.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low level.
|
||||
|
||||
Bonus
|
||||
Heats up your body.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/fever
|
||||
|
||||
name = "Fever"
|
||||
stealth = 0
|
||||
resistance = 3
|
||||
stage_speed = 3
|
||||
transmittable = 2
|
||||
level = 2
|
||||
|
||||
/datum/symptom/fever/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel hot.", "You feel like you're burning.")]</span>"
|
||||
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
M.bodytemperature = min(M.bodytemperature + (20 * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
|
||||
|
||||
return
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Hallucigen
|
||||
|
||||
Very noticable.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Critical Level.
|
||||
|
||||
Bonus
|
||||
Makes the affected mob be hallucinated for short periods of time.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/hallucigen
|
||||
|
||||
name = "Hallucigen"
|
||||
stealth = -2
|
||||
resistance = -3
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 5
|
||||
|
||||
/datum/symptom/hallucigen/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You notice someone in the corner of your eye.", "Is that footsteps?.")]</span>"
|
||||
else
|
||||
M.hallucination += 5
|
||||
|
||||
return
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Headache
|
||||
|
||||
Noticable.
|
||||
Highly resistant.
|
||||
Increases stage speed.
|
||||
Not transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Displays an annoying message!
|
||||
Should be used for buffing your disease.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/headache
|
||||
|
||||
name = "Headache"
|
||||
stealth = -1
|
||||
resistance = 4
|
||||
stage_speed = 2
|
||||
transmittable = 0
|
||||
level = 1
|
||||
|
||||
/datum/symptom/headache/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("Your head hurts.", "Your head starts pounding.")]</span>"
|
||||
return
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Healing
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance tremendously.
|
||||
Decreases stage speed tremendously.
|
||||
Decreases transmittablity temrendously.
|
||||
Fatal Level.
|
||||
|
||||
Bonus
|
||||
Heals toxins in the affected mob's blood stream.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/heal
|
||||
|
||||
name = "Toxic Filter"
|
||||
stealth = 1
|
||||
resistance = -4
|
||||
stage_speed = -4
|
||||
transmittable = -4
|
||||
level = 6
|
||||
|
||||
/datum/symptom/heal/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
Heal(M)
|
||||
return
|
||||
|
||||
/datum/symptom/heal/proc/Heal(var/mob/living/M)
|
||||
|
||||
var/get_damage = rand(1, 2)
|
||||
M.adjustToxLoss(-get_damage)
|
||||
return 1
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Itching
|
||||
|
||||
Not noticable or unnoticable.
|
||||
Resistant.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Displays an annoying message!
|
||||
Should be used for buffing your disease.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/itching
|
||||
|
||||
name = "Itching"
|
||||
stealth = 0
|
||||
resistance = 3
|
||||
stage_speed = 3
|
||||
transmittable = 1
|
||||
level = 1
|
||||
|
||||
/datum/symptom/itching/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
M << "<span class='notice'>Your [pick("back", "arm", "leg", "elbow", "head")] itches.</span>"
|
||||
return
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Shivering
|
||||
|
||||
No change to hidden.
|
||||
Increases resistance.
|
||||
Increases stage speed.
|
||||
Little transmittable.
|
||||
Low level.
|
||||
|
||||
Bonus
|
||||
Cools down your body.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/shivering
|
||||
|
||||
name = "Shivering"
|
||||
stealth = 0
|
||||
resistance = 2
|
||||
stage_speed = 2
|
||||
transmittable = 2
|
||||
level = 2
|
||||
|
||||
/datum/symptom/shivering/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel cold.", "You start shaking from the cold.")]</span>"
|
||||
if(M.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
M.bodytemperature = min(M.bodytemperature - (20 * A.stage), BODYTEMP_COLD_DAMAGE_LIMIT + 1)
|
||||
|
||||
return
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Sneezing
|
||||
|
||||
Very Noticable.
|
||||
Increases resistance.
|
||||
Doesn't increase stage speed.
|
||||
Very transmittable.
|
||||
Low Level.
|
||||
|
||||
Bonus
|
||||
Forces a spread type of AIRBORNE
|
||||
with extra range!
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/sneeze
|
||||
|
||||
name = "Sneezing"
|
||||
stealth = -2
|
||||
resistance = 3
|
||||
stage_speed = 0
|
||||
transmittable = 4
|
||||
level = 1
|
||||
|
||||
/datum/symptom/sneeze/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3)
|
||||
M.emote("sniff")
|
||||
else
|
||||
M.emote("sneeze")
|
||||
A.spread(A.holder, 5, AIRBORNE)
|
||||
return
|
||||
@@ -0,0 +1,38 @@
|
||||
// Symptoms are the effects that engineered advanced diseases do.
|
||||
|
||||
var/list/list_symptoms = typesof(/datum/symptom) - /datum/symptom
|
||||
var/list/dictionary_symptoms = list()
|
||||
|
||||
var/global/const/SYMPTOM_ACTIVATION_PROB = 3
|
||||
|
||||
/datum/symptom
|
||||
// Buffs/Debuffs the symptom has to the overall engineered disease.
|
||||
var/name = ""
|
||||
var/stealth = 0
|
||||
var/resistance = 0
|
||||
var/stage_speed = 0
|
||||
var/transmittable = 0
|
||||
// The type level of the symptom. Higher is more lethal and harder to generate.
|
||||
var/level = 0
|
||||
// The hash tag for our diseases, we will add it up with our other symptoms to get a unique id! ID MUST BE UNIQUE!!!
|
||||
var/id = ""
|
||||
|
||||
/datum/symptom/New()
|
||||
var/list/S = list_symptoms
|
||||
for(var/i = 1; i <= S.len; i++)
|
||||
if(src.type == S[i])
|
||||
id = "[i]"
|
||||
return
|
||||
CRASH("We couldn't assign an ID!")
|
||||
|
||||
// Called when processing of the advance disease, which holds this symptom, starts.
|
||||
/datum/symptom/proc/Start(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
// Called when the advance disease is going to be deleted or when the advance disease stops processing.
|
||||
/datum/symptom/proc/End(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
/datum/symptom/proc/Activate(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Voice Change
|
||||
|
||||
Very Very noticable.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Fatal Level.
|
||||
|
||||
Bonus
|
||||
Changes the voice of the affected mob. Causing confusion in communication.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/voice_change
|
||||
|
||||
name = "Voice Change"
|
||||
stealth = -2
|
||||
resistance = -3
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 6
|
||||
|
||||
/datum/symptom/voice_change/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("Your throat hurts.", "You clear your throat.")]</span>"
|
||||
else
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/random_name = ""
|
||||
switch(H.gender)
|
||||
if(MALE)
|
||||
random_name = pick(first_names_male)
|
||||
else
|
||||
random_name = pick(first_names_female)
|
||||
random_name += " [pick(last_names)]"
|
||||
H.SetSpecialVoice(random_name)
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/voice_change/End(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(ishuman(A.affected_mob))
|
||||
var/mob/living/carbon/human/H = A.affected_mob
|
||||
H.UnsetSpecialVoice()
|
||||
return
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Vomiting
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Doesn't increase stage speed.
|
||||
Little transmittable.
|
||||
Medium Level.
|
||||
|
||||
Bonus
|
||||
Forces the affected mob to vomit!
|
||||
Meaning your disease can spread via
|
||||
people walking on vomit.
|
||||
Makes the affected mob lose nutrition and
|
||||
heal toxin damage.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/vomit
|
||||
|
||||
name = "Vomiting"
|
||||
stealth = -2
|
||||
resistance = -1
|
||||
stage_speed = 0
|
||||
transmittable = 1
|
||||
level = 3
|
||||
|
||||
/datum/symptom/vomit/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB / 2))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel nauseous.", "You feel like you're going to throw up!")]</span>"
|
||||
else
|
||||
Vomit(M)
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/vomit/proc/Vomit(var/mob/living/M)
|
||||
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
M.nutrition -= 20
|
||||
M.adjustToxLoss(-3)
|
||||
|
||||
var/turf/pos = get_turf(M)
|
||||
pos.add_vomit_floor(M)
|
||||
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Vomiting Blood
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Little transmittable.
|
||||
Intense level.
|
||||
|
||||
Bonus
|
||||
Forces the affected mob to vomit blood!
|
||||
Meaning your disease can spread via
|
||||
people walking on the blood.
|
||||
Makes the affected mob lose health.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/vomit/blood
|
||||
|
||||
name = "Blood Vomiting"
|
||||
stealth = -2
|
||||
resistance = -1
|
||||
stage_speed = -1
|
||||
transmittable = 1
|
||||
level = 4
|
||||
|
||||
/datum/symptom/vomit/blood/Vomit(var/mob/living/M)
|
||||
|
||||
M.Stun(1)
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
// They lose blood and health.
|
||||
var/brute_dam = M.getBruteLoss()
|
||||
if(brute_dam >= 50)
|
||||
M.adjustBruteLoss(3)
|
||||
|
||||
var/turf/pos = get_turf(M)
|
||||
pos.add_blood_floor(M)
|
||||
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Gain
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Intense Level.
|
||||
|
||||
Bonus
|
||||
Increases the weight gain of the mob,
|
||||
forcing it to eventually turn fat.
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_gain
|
||||
|
||||
name = "Weight Gain"
|
||||
stealth = -3
|
||||
resistance = -3
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/weight_gain/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel blubbery.", "You feel full.")]</span>"
|
||||
else
|
||||
M.overeatduration = min(M.overeatduration + 100, 600)
|
||||
M.nutrition = min(M.nutrition + 100, 500)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Loss
|
||||
|
||||
Very Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced Transmittable.
|
||||
High level.
|
||||
|
||||
Bonus
|
||||
Decreases the weight of the mob,
|
||||
forcing it to be skinny.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_loss
|
||||
|
||||
name = "Weight Loss"
|
||||
stealth = -3
|
||||
resistance = -2
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 3
|
||||
|
||||
/datum/symptom/weight_loss/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("You feel hungry.", "You crave for food.")]</span>"
|
||||
else
|
||||
M << "<span class='notice'>Your stomach rumbles.</span>"
|
||||
M.overeatduration = max(M.overeatduration - 100, 0)
|
||||
M.nutrition = max(M.nutrition - 100, 0)
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Weight Even
|
||||
|
||||
Very Noticable.
|
||||
Decreases resistance.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
High level.
|
||||
|
||||
Bonus
|
||||
Causes the weight of the mob to
|
||||
be even, meaning eating isn't
|
||||
required anymore.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/weight_even
|
||||
|
||||
name = "Weight Even"
|
||||
stealth = -3
|
||||
resistance = -2
|
||||
stage_speed = -2
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/weight_loss/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
M.overeatduration = 0
|
||||
M.nutrition = 400
|
||||
|
||||
return
|
||||
@@ -5,7 +5,6 @@
|
||||
if(!holder) return
|
||||
if(holder == affected_mob)
|
||||
stage_act()
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.stat == DEAD)
|
||||
if(prob(50))
|
||||
@@ -35,26 +34,18 @@
|
||||
spread_type = SPECIAL
|
||||
cure = "Unknown"
|
||||
cure_id = list("lexorin","toxin","gargleblaster")
|
||||
cure_chance = 20
|
||||
cure_chance = 50
|
||||
affected_species = list("Human", "Monkey")
|
||||
permeability_mod = 15//likely to infect
|
||||
can_carry = 0
|
||||
stage_prob = 3
|
||||
var/gibbed = 0
|
||||
stage_minimum_age = 300
|
||||
|
||||
/datum/disease/alien_embryo/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(1))
|
||||
affected_mob << "\red Your throat feels sore."
|
||||
if(prob(1))
|
||||
affected_mob << "\red Mucous runs down the back of your throat."
|
||||
if(3)
|
||||
if(2, 3)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
@@ -83,22 +74,24 @@
|
||||
affected_mob.updatehealth()
|
||||
if(prob(50))
|
||||
if(gibbed != 0) return 0
|
||||
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++
|
||||
var/list/candidates = get_alien_candidates()
|
||||
var/picked = null
|
||||
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
// if we find no ghosts to become the alien. If the host has a client
|
||||
// he will become the alien but if he doesn't then we will set the stage
|
||||
// to 2, so we don't do a process heavy check everytime.
|
||||
|
||||
if(candidates.len)
|
||||
picked = pick(candidates)
|
||||
else if(affected_mob.client)
|
||||
picked = affected_mob.key
|
||||
else
|
||||
stage = 2 // Let's try again later.
|
||||
return
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
if(candidates.len)
|
||||
new_xeno.key = pick(candidates)
|
||||
else
|
||||
new_xeno.key = affected_mob.key
|
||||
|
||||
new_xeno.key = picked
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
affected_mob.gib()
|
||||
src.cure(0)
|
||||
@@ -111,15 +104,15 @@ Des: Removes all infection images from aliens and places an infection image on a
|
||||
----------------------------------------*/
|
||||
/datum/disease/alien_embryo/proc/RefreshInfectionImage()
|
||||
spawn(0)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
for (var/mob/living/carbon/alien/alien in player_list)
|
||||
if (alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.icon_state == "infected")
|
||||
del(I)
|
||||
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
for (var/mob/living/carbon/alien/alien in player_list)
|
||||
if (alien.client)
|
||||
for (var/mob/living/carbon/C in world)
|
||||
for (var/mob/living/carbon/C in mob_list)
|
||||
if(C)
|
||||
if (C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
@@ -132,7 +125,7 @@ Des: Checks if the passed mob (C) is infected with the alien egg, then gives eac
|
||||
----------------------------------------*/
|
||||
/datum/disease/alien_embryo/proc/AddInfectionImages(var/mob/living/carbon/C)
|
||||
if (C)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
for (var/mob/living/carbon/alien/alien in player_list)
|
||||
if (alien.client)
|
||||
if (C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
@@ -146,7 +139,7 @@ Des: Removes the alien infection image from all aliens in the world located in p
|
||||
|
||||
/datum/disease/alien_embryo/proc/RemoveInfectionImages(var/mob/living/carbon/C)
|
||||
if (C)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
for (var/mob/living/carbon/alien/alien in player_list)
|
||||
if (alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.loc == C)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
|
||||
if(prob(40))
|
||||
cure_id = list("ryetalyn")
|
||||
cure_list = list("ryetalyn")
|
||||
else
|
||||
restcure = 1
|
||||
|
||||
|
||||
@@ -19,18 +19,10 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
|
||||
New(filename)
|
||||
..()
|
||||
if(!fexists(filename))
|
||||
return abort()
|
||||
|
||||
var/text = file2text(file(filename))
|
||||
if(!text)
|
||||
diary << "Unable to get [filename] contents, aborting"
|
||||
return abort()
|
||||
|
||||
var/list/CL = tg_text2list(text, "\n")
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
var/list/Lines = file2list(filename)
|
||||
if(!Lines.len) return abort()
|
||||
for(var/t in Lines)
|
||||
if(!t) continue
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
@@ -53,11 +45,24 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
revhref = value
|
||||
|
||||
if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries")))
|
||||
var/list/filelist = dd_file2list("[svndirpath]/entries",null)
|
||||
if(filelist.len < 4)
|
||||
return abort()
|
||||
revision = filelist[4]
|
||||
commiter = filelist[12]
|
||||
var/list/filelist = file2list("[svndirpath]/entries")
|
||||
var/s_archive = "" //Stores the previous line so the revision owner can be assigned.
|
||||
|
||||
//This thing doesn't count blank lines, so doing filelist[4] isn't working.
|
||||
for(var/s in filelist)
|
||||
if(!commiter)
|
||||
if(s == "has-props")//The line before this is the committer.
|
||||
commiter = s_archive
|
||||
if(!revision)
|
||||
var/n = text2num(s)
|
||||
if(isnum(n))
|
||||
if(n > 5000 && n < 99999) //Do you think we'll still be up and running at r100000? :) ~Errorage
|
||||
revision = s
|
||||
if(revision && commiter)
|
||||
break
|
||||
s_archive = s
|
||||
if(!revision)
|
||||
abort()
|
||||
diary << "Revision info loaded succesfully"
|
||||
return
|
||||
return abort()
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
@@ -168,6 +169,17 @@
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
if(destination.z > 7)
|
||||
|
||||
if(destination.z == 2) //centcomm z-level
|
||||
if(istype(teleatom, /obj/mecha))
|
||||
var/obj/mecha/MM = teleatom
|
||||
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
|
||||
return 0
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
|
||||
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
if(destination.z > 7) //Away mission z-levels
|
||||
return 0
|
||||
return 1
|
||||
+15
-19
@@ -68,6 +68,7 @@ datum/mind
|
||||
if(current) //remove ourself from our old body's mind variable
|
||||
if(changeling)
|
||||
current.remove_changeling_powers()
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
current.mind = null
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
@@ -312,7 +313,7 @@ datum/mind
|
||||
crystals = suplink.uses
|
||||
if (suplink)
|
||||
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_FUN)
|
||||
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
|
||||
else
|
||||
text += ", [crystals] crystals"
|
||||
@@ -330,7 +331,7 @@ datum/mind
|
||||
else
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=\ref[src];obj_edit=\ref[objective]'>Edit</a> <a href='?src=\ref[src];obj_delete=\ref[objective]'>Delete</a><br>"
|
||||
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=\ref[src];obj_edit=\ref[objective]'>Edit</a> <a href='?src=\ref[src];obj_delete=\ref[objective]'>Delete</a> <a href='?src=\ref[src];obj_completed=\ref[objective]'><font color=[objective.completed ? "green" : "red"]>Toggle Completion</font></a><br>"
|
||||
obj_count++
|
||||
out += "<a href='?src=\ref[src];obj_add=1'>Add objective</a><br><br>"
|
||||
|
||||
@@ -339,17 +340,7 @@ datum/mind
|
||||
usr << browse(out, "window=edit_memory[src]")
|
||||
|
||||
Topic(href, href_list)
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
|
||||
if(!usr.client.holder)
|
||||
message_admins("\red [key_name(usr)] tried to access [current]'s mind without authorization.")
|
||||
log_admin("[key_name(usr)] tried to access [current]'s mind without authorization.")
|
||||
return
|
||||
|
||||
if (!(usr.client.holder.rank in list("Trial Admin", "Badmin", "Game Admin", "Game Master")))
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
return
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if (href_list["role_edit"])
|
||||
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
|
||||
@@ -480,9 +471,14 @@ datum/mind
|
||||
|
||||
else if (href_list["obj_delete"])
|
||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
||||
if (!objective) return
|
||||
if(!istype(objective)) return
|
||||
objectives -= objective
|
||||
|
||||
else if(href_list["obj_completed"])
|
||||
var/datum/objective/objective = locate(href_list["obj_completed"])
|
||||
if(!istype(objective)) return
|
||||
objective.completed = !objective.completed
|
||||
|
||||
else if (href_list["revolution"])
|
||||
switch(href_list["revolution"])
|
||||
if("clear")
|
||||
@@ -761,12 +757,12 @@ datum/mind
|
||||
return
|
||||
switch(href_list["monkey"])
|
||||
if("healthy")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]")
|
||||
src = null
|
||||
M = H.monkeyize()
|
||||
src = M.mind
|
||||
@@ -776,7 +772,7 @@ datum/mind
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is done through spawn(0)
|
||||
if("infected")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
@@ -796,7 +792,7 @@ datum/mind
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is doing throught spawn(0)
|
||||
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
|
||||
var/obj/item/weapon/dnainjector/m2h/m2h = new
|
||||
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
|
||||
src = null
|
||||
@@ -880,7 +876,7 @@ datum/mind
|
||||
take_uplink()
|
||||
memory = null//Remove any memory they may have had.
|
||||
if("crystals")
|
||||
if (usr.client.holder.level >= 3)
|
||||
if (usr.client.holder.rights & R_FUN)
|
||||
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||
var/crystals
|
||||
if (suplink)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
|
||||
var/list/implants = list()
|
||||
// INTERNAL germs inside the organ, this is BAD if it's greater 0
|
||||
var/germ_level = 0
|
||||
|
||||
@@ -426,8 +427,22 @@
|
||||
else
|
||||
H.icon_state = initial(H.icon_state)+"_l"
|
||||
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
if(status & ORGAN_ROBOT)
|
||||
del H
|
||||
switch(body_part)
|
||||
if(LEG_RIGHT)
|
||||
H = new /obj/item/robot_parts/r_leg(owner.loc)
|
||||
if(LEG_LEFT)
|
||||
H = new /obj/item/robot_parts/l_leg(owner.loc)
|
||||
if(ARM_RIGHT)
|
||||
H = new /obj/item/robot_parts/r_arm(owner.loc)
|
||||
if(ARM_LEFT)
|
||||
H = new /obj/item/robot_parts/l_arm(owner.loc)
|
||||
|
||||
if(H)
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
|
||||
destspawn = 1
|
||||
if(status & ORGAN_ROBOT)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
@@ -514,10 +529,15 @@
|
||||
proc/emp_act(severity)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
return
|
||||
if(prob(30*severity))
|
||||
var/probability = 30
|
||||
var/damage = 15
|
||||
if(severity == 2)
|
||||
probability = 1
|
||||
damage = 3
|
||||
if(prob(probability))
|
||||
droplimb(1)
|
||||
else
|
||||
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")
|
||||
take_damage(damage, 0, 1, used_weapon = "EMP")
|
||||
|
||||
proc/getDisplayName()
|
||||
switch(name)
|
||||
@@ -588,6 +608,25 @@
|
||||
body_part = HEAD
|
||||
var/disfigured = 0
|
||||
|
||||
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||
..(brute, burn, sharp, used_weapon, forbidden_limbs)
|
||||
if (brute_dam > 40)
|
||||
if (prob(50))
|
||||
disfigure("brute")
|
||||
if (burn_dam > 40)
|
||||
disfigure("burn")
|
||||
|
||||
proc/disfigure(var/type = "brute")
|
||||
if(type == "brute")
|
||||
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s face.", \
|
||||
"\red <b>Your face becomes unrecognizible mangled mess!</b>", \
|
||||
"You hear a sickening crack.")
|
||||
else
|
||||
owner.visible_message("\red [owner]'s face melts away, turning into mangled mess!", \
|
||||
"\red <b>Your face melts off!</b>", \
|
||||
"You hear a sickening sizzle.")
|
||||
disfigured = 1
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l_arm"
|
||||
display_name = "left arm"
|
||||
@@ -663,6 +702,18 @@
|
||||
obj/item/weapon/organ
|
||||
icon = 'icons/mob/human_races/r_human.dmi'
|
||||
|
||||
/*
|
||||
//Damage will not exceed max_damage using this proc
|
||||
//Cannot apply negative damage
|
||||
/datum/organ/external/proc/take_damage(brute, burn)
|
||||
if(owner && (owner.status_flags & GODMODE)) return 0 //godmode
|
||||
brute = max(brute,0)
|
||||
burn = max(burn,0)
|
||||
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam)
|
||||
if(!can_inflict) return 0
|
||||
*/
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
if(!istype(H))
|
||||
|
||||
@@ -64,6 +64,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr))
|
||||
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
usr << "Mmmf mrrfff!"
|
||||
return 0
|
||||
|
||||
if(clothes_req) //clothes check
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
@@ -96,7 +101,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(prob(50))//Auto-mute? Fuck that noise
|
||||
usr.say(invocation)
|
||||
else
|
||||
usr.say(dd_replacetext(invocation," ","`"))
|
||||
usr.say(replacetext(invocation," ","`"))
|
||||
if(usr.gender==MALE)
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
else
|
||||
@@ -105,7 +110,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(prob(50))
|
||||
usr.whisper(invocation)
|
||||
else
|
||||
usr.whisper(dd_replacetext(invocation," ","`"))
|
||||
usr.whisper(replacetext(invocation," ","`"))
|
||||
|
||||
/obj/effect/proc_holder/spell/New()
|
||||
..()
|
||||
|
||||
@@ -29,16 +29,21 @@
|
||||
var/spawn_place = pick(targets)
|
||||
if(summon_ignore_prev_spawn_points)
|
||||
targets -= spawn_place
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
if(ispath(summoned_object_type,/turf))
|
||||
var/turf/O = spawn_place
|
||||
var/turf/N = summoned_object_type
|
||||
O.ChangeTurf(N)
|
||||
else
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
else
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
|
||||
@@ -73,26 +73,5 @@
|
||||
S.update_solar_exposure()
|
||||
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
switch(D)
|
||||
if(1)
|
||||
return 0
|
||||
if(2)
|
||||
return 180
|
||||
if(4)
|
||||
return 90
|
||||
if(8)
|
||||
return 270
|
||||
if(5)
|
||||
return 45
|
||||
if(6)
|
||||
return 135
|
||||
if(9)
|
||||
return 315
|
||||
if(10)
|
||||
return 225
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
+95
-23
@@ -16,6 +16,7 @@
|
||||
var/access = null
|
||||
var/hidden = 0
|
||||
var/contraband = 0
|
||||
var/group
|
||||
|
||||
/datum/supply_packs/New()
|
||||
manifest += "<ul>"
|
||||
@@ -100,7 +101,9 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/cigpacket/dromedaryco,
|
||||
/obj/item/weapon/lipstick/random)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Party equipment"
|
||||
@@ -202,6 +205,13 @@
|
||||
containertype = /obj/structure/largecrate/mule
|
||||
containername = "MULEbot Crate"
|
||||
|
||||
/datum/supply_packs/lisa
|
||||
name = "Corgi Crate"
|
||||
contains = list()
|
||||
cost = 50
|
||||
containertype = /obj/structure/largecrate/lisa
|
||||
containername = "Corgi Crate"
|
||||
|
||||
/datum/supply_packs/hydroponics // -- Skie
|
||||
name = "Hydroponics Supply Crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
|
||||
@@ -272,27 +282,18 @@
|
||||
|
||||
/datum/supply_packs/virus
|
||||
name = "Virus crate"
|
||||
contains = list(/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random
|
||||
/* VIRUS2 4LIFE
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/magnitis,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/wizarditis, worse than GBS if anything
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/gbs, No. Just no.
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/brainrot,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion,
|
||||
/obj/item/weapon/storage/syringes,
|
||||
/obj/item/weapon/storage/beakerbox
|
||||
*/
|
||||
)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate/secure/weapon
|
||||
/obj/item/weapon/storage/beakerbox,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
|
||||
containername = "Virus crate"
|
||||
access = access_cmo
|
||||
|
||||
@@ -331,9 +332,9 @@
|
||||
contains = list(/obj/item/weapon/storage/belt/utility/full,
|
||||
/obj/item/weapon/storage/belt/utility/full,
|
||||
/obj/item/weapon/storage/belt/utility/full,
|
||||
/obj/item/clothing/suit/hazardvest,
|
||||
/obj/item/clothing/suit/hazardvest,
|
||||
/obj/item/clothing/suit/hazardvest,
|
||||
/obj/item/clothing/suit/storage/hazardvest,
|
||||
/obj/item/clothing/suit/storage/hazardvest,
|
||||
/obj/item/clothing/suit/storage/hazardvest,
|
||||
/obj/item/clothing/head/welding,
|
||||
/obj/item/clothing/head/welding,
|
||||
/obj/item/clothing/head/hardhat)
|
||||
@@ -597,14 +598,85 @@
|
||||
manifest += "Contains any [num_contained] of:"
|
||||
..()
|
||||
|
||||
/datum/supply_packs/artscrafts
|
||||
name = "Arts and Crafts supplies"
|
||||
contains = list(/obj/item/weapon/storage/crayonbox,
|
||||
/obj/item/device/camera,
|
||||
/obj/item/device/camera_film,
|
||||
/obj/item/device/camera_film,
|
||||
/obj/item/weapon/storage/photo_album,
|
||||
/obj/item/weapon/packageWrap,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/red,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/green,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/blue,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/yellow,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/violet,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/black,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/white,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/remover,
|
||||
/obj/item/weapon/wrapping_paper,
|
||||
/obj/item/weapon/wrapping_paper,
|
||||
/obj/item/weapon/wrapping_paper,
|
||||
/obj/item/weapon/contraband/poster)
|
||||
cost = 5
|
||||
containertype = "/obj/structure/closet/crate"
|
||||
containername = "Arts and Crafts crate"
|
||||
|
||||
|
||||
/datum/supply_packs/randomised/contraband
|
||||
num_contained = 5
|
||||
contains = list(/obj/item/weapon/contraband/poster,
|
||||
/obj/item/weapon/cigpacket/dromedaryco,
|
||||
/obj/item/weapon/lipstick/random)
|
||||
contains = list(/obj/item/seeds/bloodtomatoseed,
|
||||
/obj/item/weapon/storage/pill_bottle/zoom,
|
||||
/obj/item/weapon/storage/pill_bottle/happy,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe)
|
||||
name = "Contraband crate"
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Contraband crate"
|
||||
containername = "Unlabeled crate"
|
||||
contraband = 1
|
||||
|
||||
/datum/supply_packs/boxes
|
||||
name = "Empty Box supplies"
|
||||
contains = list(/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box,
|
||||
/obj/item/weapon/storage/box)
|
||||
cost = 5
|
||||
containertype = "/obj/structure/closet/crate"
|
||||
containername = "Empty Box crate"
|
||||
|
||||
/datum/supply_packs/surgery
|
||||
name = "Surgery crate"
|
||||
contains = list(/obj/item/weapon/cautery,
|
||||
/obj/item/weapon/surgicaldrill,
|
||||
/obj/item/clothing/mask/breath/medical,
|
||||
/obj/item/weapon/tank/anesthetic,
|
||||
/obj/item/weapon/FixOVein,
|
||||
/obj/item/weapon/hemostat,
|
||||
/obj/item/weapon/scalpel,
|
||||
/obj/item/weapon/bonegel,
|
||||
/obj/item/weapon/retractor,
|
||||
/obj/item/weapon/bonesetter,
|
||||
/obj/item/weapon/circular_saw)
|
||||
cost = 25
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Surgery crate"
|
||||
access = access_medical
|
||||
group = "Medical / Science"
|
||||
|
||||
/datum/supply_packs/sterile
|
||||
name = "Sterile equipment crate"
|
||||
contains = list(/obj/item/clothing/under/rank/medical/green,
|
||||
/obj/item/clothing/under/rank/medical/green,
|
||||
/obj/item/weapon/storage/stma_kit,
|
||||
/obj/item/weapon/storage/lglo_kit)
|
||||
cost = 10
|
||||
containertype = "/obj/structure/closet/crate"
|
||||
containername = "Sterile equipment crate"
|
||||
group = "Medical / Science"
|
||||
|
||||
+35
-38
@@ -39,6 +39,10 @@
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
|
||||
/*
|
||||
* This item is completely unused, but removing it will break something in R&D and Radio code causing PDA and Ninja code to fail on compile
|
||||
*/
|
||||
|
||||
/obj/effect/datacore
|
||||
name = "datacore"
|
||||
var/medical[] = list()
|
||||
@@ -56,7 +60,7 @@
|
||||
var/list/civ = new()
|
||||
var/list/bot = new()
|
||||
var/list/misc = new()
|
||||
|
||||
var/list/isactive = new()
|
||||
var/dat = {"
|
||||
<head><style>
|
||||
.manifest {border-collapse:collapse;}
|
||||
@@ -67,7 +71,7 @@
|
||||
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
|
||||
</style></head>
|
||||
<table class="manifest">
|
||||
<tr class='head'><th>Name</th><th>Rank</th></tr>
|
||||
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
|
||||
"}
|
||||
var/even = 0
|
||||
|
||||
@@ -77,6 +81,17 @@
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
|
||||
var/active = 0
|
||||
for(var/mob/M in player_list) if(M.name == name)
|
||||
// For dead ones, have a chance to get their status wrong
|
||||
if(M.stat == 2)
|
||||
active = M.x % 2 // Should be good enough, avoids their status flipping constantly
|
||||
break
|
||||
else if(M.client && M.client.inactivity <= 10 * 60 * 10)
|
||||
active = 1
|
||||
break
|
||||
isactive[name] = active ? "Active" : "SSD"
|
||||
|
||||
//world << "[name]: [rank]"
|
||||
|
||||
if(real_rank in command_positions)
|
||||
@@ -104,65 +119,54 @@
|
||||
misc[name] = rank
|
||||
|
||||
if(heads.len > 0)
|
||||
dat += "<tr><th colspan=2>Heads</th></tr>"
|
||||
dat += "<tr><th colspan=3>Heads</th></tr>"
|
||||
for(name in heads)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sec.len > 0)
|
||||
dat += "<tr><th colspan=2>Security</th></tr>"
|
||||
dat += "<tr><th colspan=3>Security</th></tr>"
|
||||
for(name in sec)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(eng.len > 0)
|
||||
dat += "<tr><th colspan=2>Engineering</th></tr>"
|
||||
dat += "<tr><th colspan=3>Engineering</th></tr>"
|
||||
for(name in eng)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(med.len > 0)
|
||||
dat += "<tr><th colspan=2>Medical</th></tr>"
|
||||
dat += "<tr><th colspan=3>Medical</th></tr>"
|
||||
for(name in med)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sci.len > 0)
|
||||
dat += "<tr><th colspan=2>Science</th></tr>"
|
||||
dat += "<tr><th colspan=3>Science</th></tr>"
|
||||
for(name in sci)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(civ.len > 0)
|
||||
dat += "<tr><th colspan=2>Civilian</th></tr>"
|
||||
dat += "<tr><th colspan=3>Civilian</th></tr>"
|
||||
for(name in civ)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// in case somebody is insane and added them to the manifest, why not
|
||||
if(bot.len > 0)
|
||||
dat += "<tr><th colspan=2>Silicon</th></tr>"
|
||||
dat += "<tr><th colspan=3>Silicon</th></tr>"
|
||||
for(name in bot)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// misc guys
|
||||
if(misc.len > 0)
|
||||
dat += "<tr><th colspan=2>Miscellaneous</th></tr>"
|
||||
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
|
||||
for(name in misc)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td></tr>"
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
|
||||
dat += "</table>"
|
||||
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = dd_replacetext(dat, "\t", "")
|
||||
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = replacetext(dat, "\t", "")
|
||||
return dat
|
||||
|
||||
/obj/item/device/infra_sensor
|
||||
name = "Infrared Sensor"
|
||||
desc = "Scans for infrared beams in the vicinity."
|
||||
icon_state = "infra_sensor"
|
||||
var/passive = 1.0
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
item_state = "electronic"
|
||||
m_amt = 150
|
||||
origin_tech = "magnets=2"
|
||||
|
||||
|
||||
/obj/effect/laser
|
||||
name = "laser"
|
||||
desc = "IT BURNS!!!"
|
||||
@@ -243,13 +247,6 @@
|
||||
anchored = 1
|
||||
unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr
|
||||
|
||||
/obj/effect/deskclutter
|
||||
name = "desk clutter"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "deskclutter"
|
||||
desc = "Some clutter the detective has accumalated over the years..."
|
||||
anchored = 1
|
||||
|
||||
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
// TODO: robust mixology system! (and merge with beakers, maybe)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/effect/landmark/costume/madscientist/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/suit/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/glasses/gglasses(src.loc)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/effect/landmark/costume/madscientist/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/suit/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/glasses/gglasses(src.loc)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
var/growthstages = 0
|
||||
var/plant_type = 0 // 0 = 'normal plant'; 1 = weed; 2 = shroom
|
||||
|
||||
/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "*** <B>[plantname]</B> ***"
|
||||
user << "-Plant Endurance: \blue [endurance]"
|
||||
user << "-Plant Lifespan: \blue [lifespan]"
|
||||
if(yield != -1)
|
||||
user << "-Plant Yield: \blue [yield]"
|
||||
user << "-Plant Production: \blue [production]"
|
||||
if(potency != -1)
|
||||
user << "-Plant Potency: \blue [potency]"
|
||||
|
||||
/obj/item/seeds/chiliseed
|
||||
name = "pack of chili seeds"
|
||||
@@ -706,6 +716,23 @@
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/poisonedappleseed
|
||||
name = "pack of apple seeds"
|
||||
desc = "These seeds grow into apple trees."
|
||||
icon_state = "seed-apple"
|
||||
mypath = "/obj/item/seeds/poisonedappleseed"
|
||||
species = "apple"
|
||||
plantname = "Apple Tree"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned"
|
||||
lifespan = 55
|
||||
endurance = 35
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/goldappleseed
|
||||
name = "pack of golden apple seeds"
|
||||
desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space."
|
||||
@@ -979,6 +1006,32 @@
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/kudzuseed
|
||||
name = "pack of kudzu seeds"
|
||||
desc = "These seeds grow into a weed that grows incredibly fast."
|
||||
icon_state = "seed-kudzu"
|
||||
mypath = "/obj/item/seeds/kudzuseed"
|
||||
species = "kudzu"
|
||||
plantname = "Kudzu"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod"
|
||||
lifespan = 20
|
||||
endurance = 10
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 4
|
||||
potency = 10
|
||||
growthstages = 4
|
||||
plant_type = 1
|
||||
|
||||
/obj/item/seeds/kudzuseed/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
user << "<span class='notice'>You plant the kudzu. You monster.</span>"
|
||||
new /obj/effect/spacevine_controller(user.loc)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
/* // Maybe one day when I get it to work like a grenade which exlodes gibs.
|
||||
/obj/item/seeds/gibtomatoseed
|
||||
name = "Gib Tomato seeds"
|
||||
|
||||
+12
-20
@@ -14,15 +14,6 @@
|
||||
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
|
||||
icon_state = "cultpack"
|
||||
|
||||
/obj/item/weapon/storage/trashbag
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
w_class = 4.0
|
||||
storage_slots = 20
|
||||
max_w_class = 1
|
||||
max_combined_w_class = 20
|
||||
/*
|
||||
/obj/item/weapon/storage/lbe
|
||||
name = "Load Bearing Equipment"
|
||||
@@ -31,6 +22,7 @@
|
||||
w_class = 2.0
|
||||
max_combined_w_class = 17
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
@@ -519,23 +511,23 @@
|
||||
|
||||
//Plasma (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/plasma(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/silver(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/gold(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/uranium(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/diamond(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
@@ -553,12 +545,12 @@
|
||||
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/gold,
|
||||
/obj/item/stack/sheet/silver,
|
||||
/obj/item/stack/sheet/plasma,
|
||||
/obj/item/stack/sheet/uranium,
|
||||
/obj/item/stack/sheet/diamond,
|
||||
/obj/item/stack/sheet/clown,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/mineral/clown,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
|
||||
|
||||
+31
-1
@@ -10,6 +10,23 @@
|
||||
/obj/item/toy/prize
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "ripleytoy"
|
||||
var/cooldown = 0
|
||||
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/prize/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
cooldown = world.time
|
||||
|
||||
/obj/item/toy/prize/attack_hand(mob/user as mob)
|
||||
if(loc == user)
|
||||
if(cooldown < world.time - 8)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
|
||||
cooldown = world.time
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/prize/ripley
|
||||
name = "toy ripley"
|
||||
@@ -485,4 +502,17 @@
|
||||
item_state = "balloon"
|
||||
else
|
||||
icon_state = "waterballoon-e"
|
||||
item_state = "balloon-empty"
|
||||
item_state = "balloon-empty"
|
||||
|
||||
/obj/item/toy/katana
|
||||
name = "replica katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
|
||||
@@ -25,7 +25,7 @@
|
||||
var/vend_reply //Thank you for shopping!
|
||||
var/last_reply = 0
|
||||
var/last_slogan = 0 //When did we last pitch?
|
||||
var/slogan_delay = 600 //How long until we can pitch again?
|
||||
var/slogan_delay = 6000 //How long until we can pitch again?
|
||||
var/icon_vend //Icon_state when vending!
|
||||
var/icon_deny //Icon_state when vending!
|
||||
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
@@ -214,8 +214,8 @@
|
||||
desc = "A plant nutrients vendor"
|
||||
icon_state = "nutri"
|
||||
icon_deny = "nutri-deny"
|
||||
product_paths = "/obj/item/nutrient/ez;/obj/item/nutrient/l4z;/obj/item/nutrient/rh;/obj/item/weapon/pestspray;/obj/item/weapon/reagent_containers/syringe;/obj/item/weapon/plantbag"
|
||||
product_amounts = "35;25;15;20;5;5"
|
||||
product_paths = "/obj/item/nutrient/ez;/obj/item/nutrient/l4z;/obj/item/nutrient/rh;/obj/item/weapon/pestspray;/obj/item/weapon/reagent_containers/syringe;/obj/item/weapon/plantbag;/obj/item/weapon/seedbag"
|
||||
product_amounts = "35;25;15;20;5;5;5"
|
||||
product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!"
|
||||
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/ammonia;/obj/item/weapon/reagent_containers/glass/bottle/diethylamine"
|
||||
product_hideamt = "10;5"
|
||||
|
||||
+27
-67
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/obj/item/weapon
|
||||
name = "weapon"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
@@ -37,14 +35,17 @@
|
||||
m_amt = 1000
|
||||
origin_tech = "materials=2"
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
IsShield()
|
||||
return 1
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/melee/baton))
|
||||
user.visible_message("<span class='warning'>[user] bashes their [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -83,9 +84,6 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
@@ -306,7 +304,7 @@
|
||||
/obj/item/weapon/spacecash/attack_self(var/mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/weapon/spacecash/proc/interact(var/mob/user)
|
||||
/obj/item/weapon/spacecash/interact(var/mob/user)
|
||||
|
||||
user.machine = src
|
||||
|
||||
@@ -598,15 +596,6 @@
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
|
||||
/obj/item/weapon/camera
|
||||
name = "camera"
|
||||
desc = "Use this to take pictures."
|
||||
icon_state = "camera"
|
||||
var/last_pic = 1.0
|
||||
item_state = "wrench"
|
||||
w_class = 2.0
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
@@ -789,7 +778,7 @@
|
||||
desc = "A cane used by a true gentlemen."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "cane"
|
||||
item_state = "cane"
|
||||
item_state = "stick"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
@@ -821,25 +810,6 @@
|
||||
/obj/item/weapon/dummy/blob_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_card
|
||||
name = "finger print card"
|
||||
desc = "Used to take fingerprints."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
icon_state = "fingerprint0"
|
||||
var/amount = 10.0
|
||||
item_state = "paper"
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
|
||||
|
||||
/obj/item/weapon/fcardholder
|
||||
name = "fingerprint card case"
|
||||
desc = "Apply finger print card."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "fcardholder0"
|
||||
item_state = "clipboard"
|
||||
|
||||
/*
|
||||
/obj/item/weapon/game_kit
|
||||
@@ -937,23 +907,23 @@
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
throwforce = 0
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 0 //cannot be thrown
|
||||
origin_tech = "materials=1"
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap
|
||||
name = "bear trap"
|
||||
icon_state = "beartrap"
|
||||
throw_speed = 2
|
||||
throw_range = 1
|
||||
icon_state = "beartrap0"
|
||||
desc = "A trap used to catch bears and other legged creatures."
|
||||
breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
var/armed = 0
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/attack_self()
|
||||
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(ishuman(usr) && !usr.stat && !usr.restrained())
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
usr << "\blue \the [src] is now [(armed)?"armed":"disarmed"]"
|
||||
icon_state = "beartrap[armed]"
|
||||
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/HasEntered(AM as mob|obj)
|
||||
if(armed)
|
||||
@@ -962,16 +932,16 @@
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
armed = 0
|
||||
usr.legcuffed = src
|
||||
src.loc = usr
|
||||
usr.update_inv_legcuffed()
|
||||
H.legcuffed = src
|
||||
src.loc = H
|
||||
H.update_inv_legcuffed()
|
||||
H << "\red <B>You step on \the [src]!</B>"
|
||||
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] steps on \the [src].</B>", 1)
|
||||
if(isanimal(AM))
|
||||
if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot))
|
||||
armed = 0
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
SA.health = 0
|
||||
@@ -1206,6 +1176,12 @@
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined")
|
||||
|
||||
/obj/item/weapon/staff/broom
|
||||
name = "broom"
|
||||
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "broom"
|
||||
|
||||
/obj/item/weapon/staff/stick
|
||||
name = "stick"
|
||||
desc = "A great tool to drag someone else's drinks across the bar."
|
||||
@@ -1430,7 +1406,7 @@
|
||||
pressure_resistance = 70
|
||||
|
||||
|
||||
/obj/item/weapon/camera_bug
|
||||
/obj/item/device/camera_bug
|
||||
name = "camera bug"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "flash"
|
||||
@@ -1490,6 +1466,7 @@
|
||||
m_amt = 12000
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
@@ -1713,23 +1690,6 @@
|
||||
var/cigarcount = 6
|
||||
flags = ONBELT | TABLEPASS */
|
||||
|
||||
|
||||
/obj/item/weapon/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "mousetrap"
|
||||
item_state = "mousetrap"
|
||||
w_class = 1
|
||||
force = null
|
||||
throwforce = null
|
||||
var/armed = 0
|
||||
origin_tech = "combat=1"
|
||||
|
||||
/obj/item/weapon/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
|
||||
/obj/item/weapon/pai_cable
|
||||
desc = "A flexible coated cable with a universal jack on one end."
|
||||
name = "data cable"
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
var/church_name = null
|
||||
/proc/church_name()
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
@@ -1,30 +0,0 @@
|
||||
var/command_name = null
|
||||
/proc/command_name()
|
||||
if (command_name)
|
||||
return command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
/*
|
||||
if (prob(10))
|
||||
name += pick("Super", "Ultra")
|
||||
name += " "
|
||||
|
||||
// Prefix
|
||||
if (name)
|
||||
name += pick("", "Central", "System", "Home", "Primary", "Alpha", "Friend", "Science", "Renegade")
|
||||
else
|
||||
name += pick("Central", "System", "Home", "Primary", "Alpha", "Friend", "Science", "Renegade")
|
||||
if (name)
|
||||
name += " "
|
||||
|
||||
// Suffix
|
||||
name += pick("Federation", "Command", "Alliance", "Unity", "Empire", "Confederation", "Kingdom", "Monarchy", "Complex", "Protectorate", "Commonwealth", "Imperium", "Republic")
|
||||
*/
|
||||
command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(var/name)
|
||||
|
||||
command_name = name
|
||||
|
||||
return name
|
||||
+111
-110
@@ -39,37 +39,6 @@ var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
proc
|
||||
Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
var/_db_con // This variable contains a reference to the actual database connection.
|
||||
var/dbi // This variable is a string containing the DBI MySQL requires.
|
||||
var/user // This variable contains the username data.
|
||||
@@ -79,61 +48,47 @@ DBConnection
|
||||
var/server = ""
|
||||
var/port = 3306
|
||||
|
||||
DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
|
||||
DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!sqllogging)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
cursor_handler = src.default_cursor
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
DBConnection/proc/IsConnected()
|
||||
if(!sqllogging) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
_db_query = _dm_db_new_query()
|
||||
return ..()
|
||||
|
||||
|
||||
DBQuery
|
||||
New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
_db_query = _dm_db_new_query()
|
||||
return ..()
|
||||
|
||||
proc
|
||||
|
||||
Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
results = list()
|
||||
for(var/C in columns)
|
||||
results+=C
|
||||
var/DBColumn/cur_col = columns[C]
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
var/sql // The sql query being executed.
|
||||
var/default_cursor
|
||||
var/list/columns //list of DB Columns populated by Columns()
|
||||
@@ -143,6 +98,52 @@ DBQuery
|
||||
var/DBConnection/db_connection
|
||||
var/_db_query
|
||||
|
||||
DBQuery/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
DBQuery/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
DBQuery/proc/Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
DBQuery/proc/GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
results = list()
|
||||
for(var/C in columns)
|
||||
results+=C
|
||||
var/DBColumn/cur_col = columns[C]
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
DBQuery/proc/Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
DBQuery/proc/Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
DBQuery/proc/SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
|
||||
DBColumn
|
||||
var/name
|
||||
var/table
|
||||
@@ -152,32 +153,32 @@ DBColumn
|
||||
var/length
|
||||
var/max_length
|
||||
|
||||
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
src.sql_type = type_handler
|
||||
src.flags = flag_handler
|
||||
src.length = length_handler
|
||||
src.max_length = max_length_handler
|
||||
return ..()
|
||||
DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
src.sql_type = type_handler
|
||||
src.flags = flag_handler
|
||||
src.length = length_handler
|
||||
src.max_length = max_length_handler
|
||||
return ..()
|
||||
|
||||
proc
|
||||
SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
if(MEDIUMINT) return "MEDIUMINT"
|
||||
if(INTEGER) return "INTEGER"
|
||||
if(BIGINT) return "BIGINT"
|
||||
if(FLOAT) return "FLOAT"
|
||||
if(DOUBLE) return "DOUBLE"
|
||||
if(DATE) return "DATE"
|
||||
if(DATETIME) return "DATETIME"
|
||||
if(TIMESTAMP) return "TIMESTAMP"
|
||||
if(TIME) return "TIME"
|
||||
if(STRING) return "STRING"
|
||||
if(BLOB) return "BLOB"
|
||||
|
||||
DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
if(MEDIUMINT) return "MEDIUMINT"
|
||||
if(INTEGER) return "INTEGER"
|
||||
if(BIGINT) return "BIGINT"
|
||||
if(FLOAT) return "FLOAT"
|
||||
if(DOUBLE) return "DOUBLE"
|
||||
if(DATE) return "DATE"
|
||||
if(DATETIME) return "DATETIME"
|
||||
if(TIMESTAMP) return "TIMESTAMP"
|
||||
if(TIME) return "TIME"
|
||||
if(STRING) return "STRING"
|
||||
if(BLOB) return "BLOB"
|
||||
|
||||
|
||||
#undef Default_Cursor
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//*******************************
|
||||
//
|
||||
// Forum SQL Account Activation
|
||||
//
|
||||
//*******************************
|
||||
//
|
||||
// This module allows players to associate their BYOND keys with a specific forum username on the /tg/station forums.
|
||||
// Its original intent is to disable posting for any non-associated forum accounts, and only allow players who've activated
|
||||
// their account in-game to be able to post, hopefully reducing the spam the forum receives dramatically.
|
||||
//
|
||||
// This effect, of course, is not achieved entirely within BYOND. Some configuration on the forum-side is required as well.
|
||||
// Targetted for phpBB3, not tested with earlier versions.
|
||||
//
|
||||
//
|
||||
// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB )
|
||||
//
|
||||
// Written by TLE for /tg/station13
|
||||
|
||||
|
||||
/proc/associate_key_with_forum(var/accname as text, var/playerkey as text)
|
||||
var/DBConnection/dbcon = new()
|
||||
var/uid
|
||||
|
||||
// TODO: Replace local vars with global var references
|
||||
var/TG13user = forumsqllogin
|
||||
var/TG13pass = forumsqlpass
|
||||
var/TG13db = forumsqldb
|
||||
var/TG13address = forumsqladdress
|
||||
var/TG13port = forumsqlport
|
||||
|
||||
dbcon.Connect("dbi:mysql:[TG13db]:[TG13address]:[TG13port]","[TG13user]","[TG13pass]")
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<font color=red><b>Server Connection Error</b> : Unable to open a connection with the forum database.</font>"
|
||||
src << "<i>Potential causes for this problem: Incorrect login information, incorrect server connection information, the forum server is down or not responding to requests, your firewall is blocking outgoing SQL requests.</i>"
|
||||
return
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
accname = sanitizeSQL(accname)
|
||||
playerkey = sanitizeSQL(playerkey)
|
||||
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT user_id FROM [forumsqldb].phpbb_users WHERE username = '[accname]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
uid = query.item[1] // Find and save the account's user_id
|
||||
if(!uid)
|
||||
src << "Forum account not found!"
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT pf_byondkey FROM [forumsqldb].phpbb_profile_fields_data WHERE user_id = '[uid]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already associated with a BYOND key or not. This error shouldn't occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
query.NextRow()
|
||||
var/currentholder = query.item[1]
|
||||
src << "Forum account already has a BYOND key associated with it. The current BYOND key associated with the account is \"[currentholder]\"."
|
||||
src << "If this is not a key you own and you feel that someone has wrongfully authenticated your forum account please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("SELECT * FROM [forumsqldb].phpbb_user_group WHERE user_id = '[uid]' AND group_id = '[forum_authenticated_group]'")
|
||||
if(!query.Execute())
|
||||
src << "Unable to verify whether account is already part of the authenticated group or not. This error should not occur, please contact an administrator."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
if(query.RowCount() > 0)
|
||||
src << "Forum account already belongs to the authenticated group. If this is your account and you did not authenticate it please contact an administrator to have your account returned to you."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("INSERT INTO [forumsqldb].phpbb_profile_fields_data (user_id, pf_byondkey) VALUES ('[uid]', '[playerkey]')") // Remember which key is associated with the account
|
||||
if(!query.Execute())
|
||||
src << "Unable to associate key with account. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'registered_name Users' group with 'Activated Users'
|
||||
if(!query.Execute())
|
||||
src << "Unable to move account into authenticated group. This error shouldn't occur, contact an administrator for help. Authentication failed."
|
||||
dbcon.Disconnect()
|
||||
return
|
||||
|
||||
query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_users SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]'") // Change 'default group' the the authenticated group. Not doing so was causing many authenticated accounts to retain their unauthenticated permissions, despite being succesfully authenticated.
|
||||
if(!query.Execute())
|
||||
src << "Unable to modify default group for account. This error should never occur, contact an administrator for help. Authentication failed."
|
||||
else
|
||||
src << "Authentication succeeded. You may now start posting on the <a href=http://nanotrasen.com/phpBB3/>tgstation forums</a>."
|
||||
dbcon.Disconnect()
|
||||
|
||||
|
||||
// This actually opens up a bunch of security holes to the forum DB. Given that it's not used much in the first place,
|
||||
// I'm going to keep this commented out until we're sure everything's secure. -- TLE
|
||||
/*
|
||||
/client/verb/activate_forum_account(var/a as text)
|
||||
set name = "Activate Forum Account"
|
||||
set category = "Special Verbs"
|
||||
set desc = "Associate a tgstation forum account with your BYOND key to enable posting."
|
||||
associate_key_with_forum(a, src.key)
|
||||
*/
|
||||
@@ -1,146 +0,0 @@
|
||||
//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 logged in players **with clients attached** (Based on mob reference)
|
||||
var/global/list/admin_list = list() //List of all logged in admins (Based on mob reference)
|
||||
var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //List of all living mobs, including clientless
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless
|
||||
var/global/list/client_list = list() //List of all clients, based on ckey
|
||||
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
|
||||
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
//Realistically, these should never be run, but ideally, they should only be run once at round-start
|
||||
|
||||
/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
|
||||
|
||||
proc/make_player_list()//Global proc that rebuilds the player list
|
||||
for(var/mob/p in player_list)//Clears out everyone that logged out
|
||||
if(!(p.client))
|
||||
player_list -= p
|
||||
for(var/mob/M in world)//Adds everyone that has logged in
|
||||
if(M.client)
|
||||
player_list += M
|
||||
|
||||
proc/make_admin_list()//Rebuild that shit to try and avoid issues with stealthmins
|
||||
admin_list = list()
|
||||
for(var/client/C in client_list)
|
||||
if(C && C.holder)
|
||||
admin_list += C
|
||||
|
||||
proc/make_mob_list()
|
||||
for(var/mob/p in mob_list)
|
||||
if(!p)//If it's a null reference, remove it
|
||||
mob_list -= p
|
||||
for(var/mob/M in world)
|
||||
mob_list += M
|
||||
|
||||
proc/make_extra_mob_list()
|
||||
for(var/mob/p in living_mob_list)
|
||||
if(!p)
|
||||
living_mob_list -= p
|
||||
if(p.stat == DEAD)//Transfer
|
||||
living_mob_list -= p
|
||||
dead_mob_list += p
|
||||
for(var/mob/p in dead_mob_list)
|
||||
if(!p)
|
||||
dead_mob_list -= p
|
||||
if(p.stat != DEAD)
|
||||
dead_mob_list -= p
|
||||
living_mob_list += p
|
||||
for(var/mob/M in world)
|
||||
if(M.stat == DEAD)
|
||||
living_mob_list += M
|
||||
else
|
||||
dead_mob_list += M
|
||||
|
||||
|
||||
//Alright, this proc should NEVER be called in the code, ever. This is more of an 'oh god everything is broken'-emergency button.
|
||||
proc/rebuild_mob_lists()
|
||||
player_list = list()
|
||||
admin_list = list()
|
||||
mob_list = list()
|
||||
living_mob_list = list()
|
||||
dead_mob_list = list()
|
||||
client_list = list()
|
||||
for(var/mob/M in world)
|
||||
mob_list += M
|
||||
if(M.client)
|
||||
player_list += M
|
||||
if(M.stat != DEAD)
|
||||
living_mob_list += M
|
||||
else
|
||||
dead_mob_list += M
|
||||
for(var/client/C)
|
||||
client_list += C.ckey
|
||||
if(C.holder)
|
||||
admin_list += C
|
||||
|
||||
proc/add_to_mob_list(var/mob/A)//Adds an individual mob
|
||||
if(A)
|
||||
mob_list |= A
|
||||
if(istype(A,/mob/new_player))//New players are only on the mob list, but not the dead/living
|
||||
return
|
||||
else
|
||||
if(A.stat == 2)
|
||||
dead_mob_list |= A
|
||||
if(A.stat != 2)
|
||||
living_mob_list |= A
|
||||
// if(A.client)
|
||||
// player_list |= A
|
||||
|
||||
proc/remove_from_mob_list(var/mob/R)//Removes an individual mob
|
||||
mob_list -= R
|
||||
if(R.stat == 2)
|
||||
dead_mob_list -= R
|
||||
if(R.stat != 2)
|
||||
living_mob_list -= R
|
||||
// if(R.client)
|
||||
// player_list -= R
|
||||
|
||||
proc/make_client_list()//Rebuilds client list
|
||||
for(var/mob/c in client_list)
|
||||
if(!c.client)
|
||||
client_list -= c.ckey
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
client_list += M.ckey
|
||||
|
||||
|
||||
|
||||
/*/obj/item/listdebug//Quick debugger for the global lists
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "radio-igniter-tank"
|
||||
|
||||
/obj/item/listdebug/attack_self()
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
|
||||
if("Players")
|
||||
usr << dd_list2text(player_list,",")
|
||||
if("Admins")
|
||||
usr << dd_list2text(admin_list,",")
|
||||
if("Mobs")
|
||||
usr << dd_list2text(mob_list,",")
|
||||
if("Living Mobs")
|
||||
usr << dd_list2text(living_mob_list,",")
|
||||
if("Dead Mobs")
|
||||
usr << dd_list2text(dead_mob_list,",")
|
||||
if("Clients")
|
||||
usr << dd_list2text(client_list,",")*/
|
||||
@@ -1,266 +0,0 @@
|
||||
/*
|
||||
* Holds procs designed to change one type of value, into another.
|
||||
* Contains:
|
||||
* hex2num & num2hex
|
||||
* text2list & list2text
|
||||
* file2list
|
||||
* angle2dir
|
||||
* angle2text
|
||||
* worldtime2text
|
||||
*/
|
||||
|
||||
//Returns an integer given a hex input
|
||||
/proc/hex2num(hex)
|
||||
if (!( istext(hex) ))
|
||||
return
|
||||
|
||||
var/num = 0
|
||||
var/power = 0
|
||||
var/i = null
|
||||
i = length(hex)
|
||||
while(i > 0)
|
||||
var/char = copytext(hex, i, i + 1)
|
||||
switch(char)
|
||||
if("0")
|
||||
//Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
|
||||
if("9", "8", "7", "6", "5", "4", "3", "2", "1")
|
||||
num += text2num(char) * 16 ** power
|
||||
if("a", "A")
|
||||
num += 16 ** power * 10
|
||||
if("b", "B")
|
||||
num += 16 ** power * 11
|
||||
if("c", "C")
|
||||
num += 16 ** power * 12
|
||||
if("d", "D")
|
||||
num += 16 ** power * 13
|
||||
if("e", "E")
|
||||
num += 16 ** power * 14
|
||||
if("f", "F")
|
||||
num += 16 ** power * 15
|
||||
else
|
||||
return
|
||||
power++
|
||||
i--
|
||||
return num
|
||||
|
||||
//Returns the hex value of a number given a value assumed to be a base-ten value
|
||||
/proc/num2hex(num, placeholder)
|
||||
|
||||
if (placeholder == null)
|
||||
placeholder = 2
|
||||
if (!( isnum(num) ))
|
||||
return
|
||||
if (!( num ))
|
||||
return "0"
|
||||
var/hex = ""
|
||||
var/i = 0
|
||||
while(16 ** i < num)
|
||||
i++
|
||||
var/power = null
|
||||
power = i - 1
|
||||
while(power >= 0)
|
||||
var/val = round(num / 16 ** power)
|
||||
num -= val * 16 ** power
|
||||
switch(val)
|
||||
if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
|
||||
hex += text("[]", val)
|
||||
if(10.0)
|
||||
hex += "A"
|
||||
if(11.0)
|
||||
hex += "B"
|
||||
if(12.0)
|
||||
hex += "C"
|
||||
if(13.0)
|
||||
hex += "D"
|
||||
if(14.0)
|
||||
hex += "E"
|
||||
if(15.0)
|
||||
hex += "F"
|
||||
else
|
||||
power--
|
||||
while(length(hex) < placeholder)
|
||||
hex = text("0[]", hex)
|
||||
return hex
|
||||
|
||||
//Text 'text' will be added as elements of a list when seperated by 'seperator'
|
||||
/proc/dd_text2list(text, separator, var/list/withinList)
|
||||
var/textlength = length(text)
|
||||
var/separatorlength = length(separator)
|
||||
if(withinList && !withinList.len) withinList = null
|
||||
var/list/textList = new()
|
||||
var/searchPosition = 1
|
||||
var/findPosition = 1
|
||||
var/loops = 999
|
||||
while(loops) //Byond will think 1000+ iterations of a loop is an infinite loop
|
||||
findPosition = findtext(text, separator, searchPosition, 0)
|
||||
var/buggyText = copytext(text, searchPosition, findPosition)
|
||||
if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
|
||||
if(!findPosition) return textList
|
||||
searchPosition = findPosition + separatorlength
|
||||
if(searchPosition > textlength)
|
||||
textList += ""
|
||||
return textList
|
||||
loops--
|
||||
return
|
||||
|
||||
//Text 'text' will be added as elements of a list when seperated by 'seperator'. The separator is case sensitive.
|
||||
/proc/dd_text2list_case(text, separator, var/list/withinList)
|
||||
var/textlength = length(text)
|
||||
var/separatorlength = length(separator)
|
||||
if(withinList && !withinList.len) withinList = null
|
||||
var/list/textList = new()
|
||||
var/searchPosition = 1
|
||||
var/findPosition = 1
|
||||
var/loops = 999
|
||||
while(loops) //Byond will think 1000+ iterations of a loop is an infinite loop
|
||||
findPosition = findtextEx(text, separator, searchPosition, 0)
|
||||
var/buggyText = copytext(text, searchPosition, findPosition)
|
||||
if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
|
||||
if(!findPosition) return textList
|
||||
searchPosition = findPosition + separatorlength
|
||||
if(searchPosition > textlength)
|
||||
textList += ""
|
||||
return textList
|
||||
loops--
|
||||
return
|
||||
|
||||
//Attaches each element of a list to a single string seperated by 'seperator'.
|
||||
/proc/dd_list2text(var/list/the_list, separator)
|
||||
var/total = the_list.len
|
||||
if(!total)
|
||||
return
|
||||
var/count = 2
|
||||
var/newText = "[the_list[1]]"
|
||||
while(count <= total)
|
||||
if(separator)
|
||||
newText += separator
|
||||
newText += "[the_list[count]]"
|
||||
count++
|
||||
return newText
|
||||
|
||||
//tg_text2list is faster then dd_text2list
|
||||
//not case sensitive version
|
||||
proc/tg_text2list(string, separator=",")
|
||||
if(!string)
|
||||
return
|
||||
var/list/output = new
|
||||
var/seplength = length(separator)
|
||||
var/strlength = length(string)
|
||||
var/prev = 1
|
||||
var/index
|
||||
do
|
||||
index = findtext(string, separator, prev, 0)
|
||||
output += copytext(string, prev, index)
|
||||
if(!index)
|
||||
break
|
||||
prev = index+seplength
|
||||
if(prev>strlength)
|
||||
break
|
||||
while(index)
|
||||
return output
|
||||
|
||||
//case sensitive version
|
||||
proc/tg_text2list_case(string, separator=",")
|
||||
if(!string)
|
||||
return
|
||||
var/list/output = new
|
||||
var/seplength = length(separator)
|
||||
var/strlength = length(string)
|
||||
var/prev = 1
|
||||
var/index
|
||||
do
|
||||
index = findtextEx(string, separator, prev, 0)
|
||||
output += copytext(string, prev, index)
|
||||
if(!index)
|
||||
break
|
||||
prev = index+seplength
|
||||
if(prev>strlength)
|
||||
break
|
||||
while(index)
|
||||
return output
|
||||
|
||||
//slower then dd_list2text, but correctly processes associative lists.
|
||||
proc/tg_list2text(list/list, glue=",")
|
||||
if(!istype(list) || !list.len)
|
||||
return
|
||||
var/output
|
||||
for(var/i=1 to list.len)
|
||||
output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
|
||||
return output
|
||||
|
||||
//Gets a file and adds its contents to a list.
|
||||
/proc/dd_file2list(file_path, separator)
|
||||
var/file
|
||||
if(separator == null)
|
||||
separator = "\n"
|
||||
if(isfile(file_path))
|
||||
file = file_path
|
||||
else
|
||||
file = file(file_path)
|
||||
return dd_text2list(file2text(file), separator)
|
||||
|
||||
//Turns a direction into text
|
||||
/proc/dir2text(direction)
|
||||
switch(direction)
|
||||
if(1.0)
|
||||
return "north"
|
||||
if(2.0)
|
||||
return "south"
|
||||
if(4.0)
|
||||
return "east"
|
||||
if(8.0)
|
||||
return "west"
|
||||
if(5.0)
|
||||
return "northeast"
|
||||
if(6.0)
|
||||
return "southeast"
|
||||
if(9.0)
|
||||
return "northwest"
|
||||
if(10.0)
|
||||
return "southwest"
|
||||
else
|
||||
return
|
||||
|
||||
//Turns text into proper directions
|
||||
/proc/text2dir(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH")
|
||||
return 1
|
||||
if("SOUTH")
|
||||
return 2
|
||||
if("EAST")
|
||||
return 4
|
||||
if("WEST")
|
||||
return 8
|
||||
if("NORTHEAST")
|
||||
return 5
|
||||
if("NORTHWEST")
|
||||
return 9
|
||||
if("SOUTHEAST")
|
||||
return 6
|
||||
if("SOUTHWEST")
|
||||
return 10
|
||||
else
|
||||
return
|
||||
|
||||
//Converts an angle (degrees) into an ss13 direction
|
||||
/proc/angle2dir(var/degree)
|
||||
degree = ((degree+22.5)%365)
|
||||
if(degree < 45) return NORTH
|
||||
if(degree < 90) return NORTH|EAST
|
||||
if(degree < 135) return EAST
|
||||
if(degree < 180) return SOUTH|EAST
|
||||
if(degree < 225) return SOUTH
|
||||
if(degree < 270) return SOUTH|WEST
|
||||
if(degree < 315) return WEST
|
||||
return NORTH|WEST
|
||||
|
||||
//Returns the angle in english
|
||||
/proc/angle2text(var/degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
//Returns the world time in english
|
||||
proc/worldtime2text(var/time = 0)
|
||||
if(time == 0)
|
||||
time = world.time
|
||||
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
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<<browse_rsc(getFlatIcon(src), iconName)
|
||||
// Display the icon in their browser
|
||||
src<<browse("<body bgcolor='#000000'><p><img src='[iconName]'></p></body>")
|
||||
|
||||
Output_Icon()
|
||||
set name = "2. Output Icon"
|
||||
src<<"Icon is: \icon[getFlatIcon(src)]"
|
||||
|
||||
Label_Icon()
|
||||
set name = "3. Label Icon"
|
||||
// Give it a name for the cache
|
||||
var/iconName = "[ckey(src.name)]_flattened.dmi"
|
||||
// Copy the file to the rsc manually
|
||||
var/icon/I = fcopy_rsc(getFlatIcon(src))
|
||||
// Send the icon to src's local cache
|
||||
src<<browse_rsc(I, iconName)
|
||||
// Update the label to show it
|
||||
winset(src,"imageLabel","image='\ref[I]'");
|
||||
|
||||
Add_Overlay()
|
||||
set name = "4. Add Overlay"
|
||||
overlays += image(icon='old_or_unused.dmi',icon_state="yellow",pixel_x = rand(-64,32), pixel_y = rand(-64,32))
|
||||
|
||||
Stress_Test()
|
||||
set name = "5. Stress Test"
|
||||
for(var/i = 0 to 1000)
|
||||
// The third parameter forces it to generate a new one, even if it's already cached
|
||||
getFlatIcon(src,0,2)
|
||||
if(prob(5))
|
||||
Add_Overlay()
|
||||
Browse_Icon()
|
||||
|
||||
Cache_Test()
|
||||
set name = "6. Cache Test"
|
||||
for(var/i = 0 to 1000)
|
||||
getFlatIcon(src)
|
||||
Browse_Icon()
|
||||
|
||||
obj/effect/overlayTest
|
||||
icon = 'old_or_unused.dmi'
|
||||
icon_state = "blue"
|
||||
pixel_x = -24
|
||||
pixel_y = 24
|
||||
layer = TURF_LAYER // Should appear below the rest of the overlays
|
||||
|
||||
world
|
||||
view = "7x7"
|
||||
maxx = 20
|
||||
maxy = 20
|
||||
maxz = 1
|
||||
*/
|
||||
@@ -1,11 +0,0 @@
|
||||
var/religion_name = null
|
||||
/proc/religion_name()
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
@@ -0,0 +1,168 @@
|
||||
/* sd_Alert library
|
||||
by Shadowdarke (shadowdarke@byond.com)
|
||||
|
||||
sd_Alert() is a powerful and flexible alternative to the built in BYOND
|
||||
alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
|
||||
appearance, and even the option to popup without stealing keyboard focus
|
||||
from the map or command line.
|
||||
|
||||
Please see demo.dm for detailed examples.
|
||||
|
||||
FORMAT
|
||||
sd_Alert(who, message, title, buttons, default, duration, unfocus, \
|
||||
size, table, style, tag, select, flags)
|
||||
|
||||
ARGUMENTS
|
||||
who - the client or mob to display the alert to.
|
||||
message - text message to display
|
||||
title - title of the alert box
|
||||
buttons - list of buttons
|
||||
Default Value: list("Ok")
|
||||
default - default button selestion
|
||||
Default Value: the first button in the list
|
||||
duration - the number of ticks before this alert expires. If not
|
||||
set, the alert lasts until a button is clicked.
|
||||
Default Value: 0 (unlimited)
|
||||
unfocus - if this value is set, the popup will not steal keyboard
|
||||
focus from the map or command line.
|
||||
Default Value: 1 (do not take focus)
|
||||
size - size of the popup window in px
|
||||
Default Value: "300x200"
|
||||
table - optional parameters for the HTML table in the alert
|
||||
Default Value: "width=100% height=100%" (fill the window)
|
||||
style - optional style sheet information
|
||||
tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
|
||||
externally. (i.e. force the alert to close, change options and redisplay,
|
||||
reuse the same window, etc.)
|
||||
select - if set, the buttons will be replaced with a selection box with a number of
|
||||
lines displayed equal to this value.
|
||||
Default value: 0 (use buttons)
|
||||
flags - optional flags effecting the alert display. These flags may be ORed (|)
|
||||
together for multiple effects.
|
||||
SD_ALERT_SCROLL = display a scrollbar
|
||||
SD_ALERT_SELECT_MULTI = forces selection box display (instead of
|
||||
buttons) allows the user to select multiple
|
||||
choices.
|
||||
SD_ALERT_LINKS = display each choice as a plain text link.
|
||||
Any selection box style overrides this flag.
|
||||
SD_ALERT_NOVALIDATE = don't validate responses
|
||||
Default value: SD_ALERT_SCROLL
|
||||
(button display with scroll bar, validate responses)
|
||||
RETURNS
|
||||
The text of the selected button, or null if the alert duration expired
|
||||
without a button click.
|
||||
|
||||
Version 1 changes (from version 0):
|
||||
* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
|
||||
* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
|
||||
customization by developers. Primarily developers would want to use Display() to change
|
||||
the display of active tagged windows
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define SD_ALERT_SCROLL 1
|
||||
#define SD_ALERT_SELECT_MULTI 2
|
||||
#define SD_ALERT_LINKS 4
|
||||
#define SD_ALERT_NOVALIDATE 8
|
||||
|
||||
proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
default, duration = 0, unfocus = 1, size = "300x200", \
|
||||
table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
|
||||
|
||||
if(ismob(who))
|
||||
var/mob/M = who
|
||||
who = M.client
|
||||
if(!istype(who)) CRASH("sd_Alert: Invalid target:[who] (\ref[who])")
|
||||
|
||||
var/sd_alert/T = locate(tag)
|
||||
if(T)
|
||||
if(istype(T)) del(T)
|
||||
else CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])")
|
||||
T = new(who, tag)
|
||||
if(duration)
|
||||
spawn(duration)
|
||||
if(T) del(T)
|
||||
return
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
|
||||
sd_alert
|
||||
var
|
||||
client/target
|
||||
response
|
||||
list/validation
|
||||
|
||||
Del()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
|
||||
New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
|
||||
Topic(href,params[])
|
||||
if(usr.client != target) return
|
||||
response = params["clk"]
|
||||
|
||||
proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
|
||||
if(unfocus) spawn() target << browse(null,null)
|
||||
if(istext(buttons)) buttons = list(buttons)
|
||||
if(!default) default = buttons[1]
|
||||
if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
|
||||
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
|
||||
if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
|
||||
html += "</th></tr></table></body>"
|
||||
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
|
||||
proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len) response = null
|
||||
else validated = 1
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) del(src)
|
||||
return response
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user