mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Conflicts: README.txt SQL/tgstation_schema.sql baystation12.dme code/ATMOSPHERICS/components/unary/vent_pump.dm code/ATMOSPHERICS/pipes.dm code/FEA/FEA_airgroup.dm code/FEA/FEA_fire.dm code/FEA/FEA_gas_mixture.dm code/FEA/FEA_turf_tile.dm code/TriDimension/Pipes.dm code/WorkInProgress/buildmode.dm code/WorkInProgress/organs/organs.dm code/WorkInProgress/virus2/Disease2/analyser.dm code/WorkInProgress/virus2/Disease2/biohazard destroyer.dm code/WorkInProgress/virus2/Disease2/cureimplanter.dm code/WorkInProgress/virus2/Disease2/diseasesplicer.dm code/WorkInProgress/virus2/Disease2/dishincubator.dm code/WorkInProgress/virus2/Disease2/isolator.dm code/WorkInProgress/virus2/Disease2/monkeydispensor.dm code/WorkInProgress/virus2/analyser.dm code/WorkInProgress/virus2/antibodies.dm code/WorkInProgress/virus2/base.dm code/WorkInProgress/virus2/biohazard destroyer.dm code/WorkInProgress/virus2/cureimplanter.dm code/WorkInProgress/virus2/curer.dm code/WorkInProgress/virus2/diseasesplicer.dm code/WorkInProgress/virus2/dishincubator.dm code/WorkInProgress/virus2/isolator.dm code/WorkInProgress/virus2/monkeydispensor.dm code/datums/ai_laws.dm code/datums/configuration.dm code/datums/datumvars.dm code/datums/diseases/alien_embryo.dm code/datums/diseases/appendicitis.dm code/datums/diseases/robotic_transformation.dm code/datums/diseases/xeno_transformation.dm code/datums/helper_datums/getrev.dm code/datums/helper_datums/teleport.dm code/datums/helper_datums/tension.dm code/datums/mind.dm code/datums/mixed.dm code/datums/shuttle_controller.dm code/datums/spell.dm code/datums/spells/ethereal_jaunt.dm code/datums/spells/genetic.dm code/datums/spells/wizard.dm code/defines/area/Space Station 13 areas.dm code/defines/atom.dm code/defines/global.dm code/defines/mob/dead/observer.dm code/defines/mob/living/carbon/alien.dm code/defines/mob/living/carbon/alien_humanoid.dm code/defines/mob/living/carbon/carbon.dm code/defines/mob/living/carbon/metroid.dm code/defines/mob/living/carbon/monkey.dm code/defines/mob/living/living.dm code/defines/mob/living/silicon/ai.dm code/defines/mob/living/silicon/robot.dm code/defines/obj.dm code/defines/obj/closet.dm code/defines/obj/clothing.dm code/defines/obj/clothing/costume.dm code/defines/obj/computer.dm code/defines/obj/costume.dm code/defines/obj/decal.dm code/defines/obj/door.dm code/defines/obj/hydro.dm code/defines/obj/machinery.dm code/defines/obj/storage.dm code/defines/obj/supplypacks.dm code/defines/obj/toy.dm code/defines/obj/vending.dm code/defines/obj/weapon.dm code/defines/procs/AStar.dm code/defines/procs/command_name.dm code/defines/procs/dbcore.dm code/defines/procs/forum_activation.dm code/defines/procs/gamehelpers.dm code/defines/procs/helpers.dm code/defines/procs/icon_procs.dm code/defines/procs/station_name.dm code/defines/procs/statistics.dm code/defines/turf.dm code/game/algorithm.dm code/game/area/areas.dm code/game/asteroid/artifacts.dm code/game/atom_procs.dm code/game/cellautomata.dm code/game/dna.dm code/game/events/EventProcs/clang.dm code/game/events/EventProcs/dust.dm code/game/events/EventProcs/ninja_abilities.dm code/game/events/EventProcs/ninja_equipment.dm code/game/events/EventProcs/space_ninja.dm code/game/events/EventProcs/spacevines.dm code/game/gamemodes/blob/blob.dm code/game/gamemodes/blob/blob_finish.dm code/game/gamemodes/blob/blob_report.dm code/game/gamemodes/blob/theblob.dm code/game/gamemodes/changeling/changeling.dm code/game/gamemodes/changeling/changeling_powers.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/changeling/traitor_chan.dm code/game/gamemodes/cult/cult.dm code/game/gamemodes/cult/cult_items.dm code/game/gamemodes/cult/cult_structures.dm code/game/gamemodes/events.dm code/game/gamemodes/events/black_hole.dm code/game/gamemodes/events/miniblob.dm code/game/gamemodes/factions.dm code/game/gamemodes/game_mode.dm code/game/gamemodes/gameticker.dm code/game/gamemodes/malfunction/malfunction.dm code/game/gamemodes/meteor/meteor.dm code/game/gamemodes/meteor/meteors.dm code/game/gamemodes/nuclear/nuclear.dm code/game/gamemodes/nuclear/nuclearbomb.dm code/game/gamemodes/nuclear/pinpointer.dm code/game/gamemodes/objective.dm code/game/gamemodes/revolution/revolution.dm code/game/gamemodes/sandbox/h_sandbox.dm code/game/gamemodes/sandbox/sandbox.dm code/game/gamemodes/setupgame.dm code/game/gamemodes/traitor/traitor.dm code/game/gamemodes/wizard/rightandwrong.dm code/game/gamemodes/wizard/soulstone.dm code/game/gamemodes/wizard/spellbook.dm code/game/gamemodes/wizard/spells.dm code/game/gamemodes/wizard/veilrender.dm code/game/gamemodes/wizard/wizard.dm code/game/hud.dm code/game/jobs/access.dm code/game/jobs/job/captain.dm code/game/jobs/job/civilian.dm code/game/jobs/job/civilian_chaplain.dm code/game/jobs/job/engineering.dm code/game/jobs/job/job.dm code/game/jobs/job/medical.dm code/game/jobs/job/science.dm code/game/jobs/job/security.dm code/game/jobs/job/silicon.dm code/game/jobs/job_controller.dm code/game/jobs/jobs.dm code/game/machinery/Beacon.dm code/game/machinery/OpTable.dm code/game/machinery/Sleeper.dm code/game/machinery/alarm.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/autolathe.dm code/game/machinery/biogenerator.dm code/game/machinery/bots/bots.dm code/game/machinery/bots/cleanbot.dm code/game/machinery/bots/ed209bot.dm code/game/machinery/bots/floorbot.dm code/game/machinery/bots/medbot.dm code/game/machinery/bots/mulebot.dm code/game/machinery/camera.dm code/game/machinery/cell_charger.dm code/game/machinery/cloning.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/Operating.dm code/game/machinery/computer/ai_core.dm code/game/machinery/computer/arcade.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/buildandrepair.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/communications.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/crew.dm code/game/machinery/computer/hologram.dm code/game/machinery/computer/law.dm code/game/machinery/computer/medical.dm code/game/machinery/computer/message.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/power.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/robot.dm code/game/machinery/computer/security.dm code/game/machinery/computer/shuttle.dm code/game/machinery/constructable_frame.dm code/game/machinery/deployable.dm code/game/machinery/door_control.dm code/game/machinery/doors/airlock.dm code/game/machinery/doors/airlock_electronics.dm code/game/machinery/doors/brigdoors.dm code/game/machinery/doors/door.dm code/game/machinery/doors/firedoor.dm code/game/machinery/doors/poddoor.dm code/game/machinery/doors/unpowered.dm code/game/machinery/doors/windowdoor.dm code/game/machinery/flasher.dm code/game/machinery/gateway.dm code/game/machinery/hologram.dm code/game/machinery/hydroponics.dm code/game/machinery/kitchen/gibber.dm code/game/machinery/morgue.dm code/game/machinery/newscaster.dm code/game/machinery/pipe/construction.dm code/game/machinery/pipe/pipe_dispenser.dm code/game/machinery/portable_turret.dm code/game/machinery/recharger.dm code/game/machinery/rechargestation.dm code/game/machinery/requests_console.dm code/game/machinery/shieldgen.dm code/game/machinery/spaceheater.dm code/game/machinery/suit_storage_unit.dm code/game/machinery/syndicatebeacon.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/telecomms/telemonitor.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/teleporter.dm code/game/machinery/turrets.dm code/game/machinery/vending.dm code/game/magic/cultist/ritual.dm code/game/magic/cultist/runes.dm code/game/magic/library.dm code/game/magic/musician.dm code/game/master_controller.dm code/game/mecha/combat/combat.dm code/game/mecha/combat/gygax.dm code/game/mecha/equipment/mecha_equipment.dm code/game/mecha/equipment/tools/tools.dm code/game/mecha/equipment/weapons/weapons.dm code/game/mecha/mech_fabricator.dm code/game/mecha/mecha.dm code/game/mecha/mecha_construction_paths.dm code/game/mecha/mecha_wreckage.dm code/game/mecha/medical/medical.dm code/game/mecha/medical/odysseus.dm code/game/mecha/working/ripley.dm code/game/objects/alien/facehugger.dm code/game/objects/alien/resin.dm code/game/objects/bodybag.dm code/game/objects/closets.dm code/game/objects/closets/emergency.dm code/game/objects/closets/extinguisher.dm code/game/objects/closets/fireaxe.dm code/game/objects/closets/firecloset.dm code/game/objects/closets/fitnesscloset.dm code/game/objects/closets/janitor.dm code/game/objects/closets/kitchen.dm code/game/objects/closets/nuclear.dm code/game/objects/closets/secure/bar.dm code/game/objects/closets/secure/cargo.dm code/game/objects/closets/secure/engineering.dm code/game/objects/closets/secure/hydroponics.dm code/game/objects/closets/secure/medical.dm code/game/objects/closets/secure/personal.dm code/game/objects/closets/secure/scientist.dm code/game/objects/closets/secure/secure_closets.dm code/game/objects/closets/secure/security.dm code/game/objects/closets/syndicate.dm code/game/objects/closets/wardrobe.dm code/game/objects/contraband.dm code/game/objects/crates.dm code/game/objects/devices/PDA/PDA.dm code/game/objects/devices/PDA/cart.dm code/game/objects/devices/PDA/chatroom.dm code/game/objects/devices/aicard.dm code/game/objects/devices/flash.dm code/game/objects/devices/flashlight.dm code/game/objects/devices/paicard.dm code/game/objects/devices/scanners.dm code/game/objects/devices/taperecorder.dm code/game/objects/devices/traitordevices.dm code/game/objects/door_assembly.dm code/game/objects/effect_system.dm code/game/objects/electricchair.dm code/game/objects/explosion.dm code/game/objects/gibs.dm code/game/objects/grille.dm code/game/objects/items.dm code/game/objects/items/blueprints.dm code/game/objects/items/candle.dm code/game/objects/items/clothing.dm code/game/objects/items/food.dm code/game/objects/items/helper_procs.dm code/game/objects/items/item.dm code/game/objects/items/robot_items.dm code/game/objects/items/robot_parts.dm code/game/objects/items/tk_grab.dm code/game/objects/items/weapons/AI_modules.dm code/game/objects/items/weapons/RCD.dm code/game/objects/items/weapons/RSF.dm code/game/objects/items/weapons/cameras.dm code/game/objects/items/weapons/cards_ids.dm code/game/objects/items/weapons/cigs_lighters.dm code/game/objects/items/weapons/clown_items.dm code/game/objects/items/weapons/dna_injector.dm code/game/objects/items/weapons/explosives.dm code/game/objects/items/weapons/flamethrower.dm code/game/objects/items/weapons/grenades.dm code/game/objects/items/weapons/hand_lablers.dm code/game/objects/items/weapons/hydroponics.dm code/game/objects/items/weapons/implants/implant.dm code/game/objects/items/weapons/implants/implantcase.dm code/game/objects/items/weapons/implants/implantchair.dm code/game/objects/items/weapons/implants/implanter.dm code/game/objects/items/weapons/implants/implantfreedom.dm code/game/objects/items/weapons/implants/implantnanoaug.dm code/game/objects/items/weapons/implants/implantpad.dm code/game/objects/items/weapons/kitchen.dm code/game/objects/items/weapons/manuals.dm code/game/objects/items/weapons/medical.dm code/game/objects/items/weapons/mops_cleaners.dm code/game/objects/items/weapons/papers_bins.dm code/game/objects/items/weapons/stunbaton.dm code/game/objects/items/weapons/surgery_tools.dm code/game/objects/items/weapons/swords_axes_etc.dm code/game/objects/items/weapons/table_rack_parts.dm code/game/objects/items/weapons/tools.dm code/game/objects/items/weapons/twohanded.dm code/game/objects/items/weapons/wrappingpaper.dm code/game/objects/mineral_doors.dm code/game/objects/radio/beacon.dm code/game/objects/radio/electropack.dm code/game/objects/radio/encryptionkey.dm code/game/objects/radio/headset.dm code/game/objects/radio/intercom.dm code/game/objects/radio/radio.dm code/game/objects/secstorage/sbriefcase.dm code/game/objects/secstorage/ssafe.dm code/game/objects/stacks/glass.dm code/game/objects/stacks/metal.dm code/game/objects/stacks/stack.dm code/game/objects/stacks/wood.dm code/game/objects/stool.dm code/game/objects/storage/backpack.dm code/game/objects/storage/belt.dm code/game/objects/storage/bible.dm code/game/objects/storage/briefcase.dm code/game/objects/storage/lockbox.dm code/game/objects/storage/storage.dm code/game/objects/storage/uplink_kits.dm code/game/objects/structures.dm code/game/objects/tables_racks.dm code/game/objects/tank.dm code/game/objects/tanks/emergency.dm code/game/objects/tanks/jetpack.dm code/game/objects/toys.dm code/game/objects/transfer_valve.dm code/game/objects/uplinks.dm code/game/objects/watercloset.dm code/game/objects/weapons.dm code/game/objects/windoor_assembly.dm code/game/objects/window.dm code/game/prisonshuttle.dm code/game/smoothwall.dm code/game/sound.dm code/game/step_triggers.dm code/game/structure/structure.dm code/game/supplyshuttle.dm code/game/throwing.dm code/game/topic.dm code/game/turf.dm code/game/vehicles/airtight/airtight.dm code/game/vehicles/airtight/land.dm code/game/vehicles/airtight/space.dm code/game/vehicles/vehicle.dm code/game/verbs/ooc.dm code/game/verbs/sound.dm code/game/verbs/suicide.dm code/game/verbs/who.dm code/game/vote.dm code/modules/admin/IsBanned.dm code/modules/admin/NewBan.dm code/modules/admin/admin.dm code/modules/admin/admin_investigate.dm code/modules/admin/admin_memo.dm code/modules/admin/admin_verbs.dm code/modules/admin/banjob.dm code/modules/admin/create_mob.dm code/modules/admin/create_object.dm code/modules/admin/create_turf.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/MC.dm code/modules/admin/verbs/adminhelp.dm code/modules/admin/verbs/adminjump.dm code/modules/admin/verbs/adminpm.dm code/modules/admin/verbs/adminsay.dm code/modules/admin/verbs/atmosdebug.dm code/modules/admin/verbs/cinematic.dm code/modules/admin/verbs/deadsay.dm code/modules/admin/verbs/debug.dm code/modules/admin/verbs/diagnostics.dm code/modules/admin/verbs/getlogs.dm code/modules/admin/verbs/mapping.dm code/modules/admin/verbs/massmodvar.dm code/modules/admin/verbs/modifyvariables.dm code/modules/admin/verbs/onlyone.dm code/modules/admin/verbs/playsound.dm code/modules/admin/verbs/possess.dm code/modules/admin/verbs/pray.dm code/modules/admin/verbs/randomverbs.dm code/modules/admin/verbs/striketeam.dm code/modules/admin/verbs/striketeam_syndicate.dm code/modules/assembly/assembly.dm code/modules/assembly/signaler.dm code/modules/chemical/Chemistry-Machinery.dm code/modules/chemical/Chemistry-Tools.dm code/modules/client/client defines.dm code/modules/client/client procs.dm code/modules/clothing/costume.dm code/modules/clothing/gimmick.dm code/modules/clothing/glasses.dm code/modules/clothing/glasses/glasses.dm code/modules/clothing/glasses/hud.dm code/modules/clothing/gloves.dm code/modules/clothing/head/hardhat.dm code/modules/clothing/jumpsuit.dm code/modules/clothing/mask.dm code/modules/clothing/shoes.dm code/modules/clothing/spacesuit.dm code/modules/clothing/spacesuits/captain.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/clothing/spacesuits/ninja.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/spacesuits/syndi.dm code/modules/clothing/spacesuits/void.dm code/modules/clothing/suit.dm code/modules/clothing/suits/armor.dm code/modules/clothing/suits/bio.dm code/modules/clothing/suits/bomb.dm code/modules/clothing/suits/detective.dm code/modules/clothing/suits/fire.dm code/modules/clothing/suits/heavy.dm code/modules/clothing/suits/hos.dm code/modules/clothing/suits/labcoat.dm code/modules/clothing/suits/miscellaneous.dm code/modules/clothing/suits/wiz_robe.dm code/modules/clothing/uniforms/lawyer.dm code/modules/critters/critter.dm code/modules/critters/critter_AI.dm code/modules/critters/critters.dm code/modules/critters/hivebots/hivebot.dm code/modules/flufftext/Dreaming.dm code/modules/flufftext/Hallucination.dm code/modules/flufftext/TextFilters.dm code/modules/food/food.dm code/modules/food/meat.dm code/modules/food/recipes_microwave.dm code/modules/maps/SwapMaps.dm code/modules/maps/dmm_suite.dm code/modules/maps/fromdmp.dm code/modules/maps/randomZlevel.dm code/modules/maps/reader.dm code/modules/maps/writer.dm code/modules/mining/machine_processing.dm code/modules/mining/machine_stacking.dm code/modules/mining/machine_unloading.dm code/modules/mining/mine_items.dm code/modules/mining/mine_turfs.dm code/modules/mining/mint.dm code/modules/mining/ores_materials_coins.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/dead/death.dm code/modules/mob/dead/observer/observer.dm code/modules/mob/death.dm code/modules/mob/living/blob/blob.dm code/modules/mob/living/carbon/alien/alien.dm code/modules/mob/living/carbon/alien/death.dm code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm code/modules/mob/living/carbon/alien/humanoid/death.dm code/modules/mob/living/carbon/alien/humanoid/hud.dm code/modules/mob/living/carbon/alien/humanoid/humanoid.dm code/modules/mob/living/carbon/alien/humanoid/life.dm code/modules/mob/living/carbon/alien/humanoid/login.dm code/modules/mob/living/carbon/alien/humanoid/queen.dm code/modules/mob/living/carbon/alien/larva/death.dm code/modules/mob/living/carbon/alien/larva/hud.dm code/modules/mob/living/carbon/alien/larva/larva.dm code/modules/mob/living/carbon/alien/larva/life.dm code/modules/mob/living/carbon/alien/larva/login.dm code/modules/mob/living/carbon/alien/larva/powers.dm code/modules/mob/living/carbon/alien/special/_main.dm code/modules/mob/living/carbon/alien/special/snakeman.dm code/modules/mob/living/carbon/brain/MMI.dm code/modules/mob/living/carbon/brain/brain.dm code/modules/mob/living/carbon/brain/death.dm code/modules/mob/living/carbon/brain/hud.dm code/modules/mob/living/carbon/brain/life.dm code/modules/mob/living/carbon/brain/say.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/human/death.dm code/modules/mob/living/carbon/human/emote.dm code/modules/mob/living/carbon/human/examine.dm code/modules/mob/living/carbon/human/hud.dm code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/human_attackalien.dm code/modules/mob/living/carbon/human/human_attackhand.dm code/modules/mob/living/carbon/human/human_damage.dm code/modules/mob/living/carbon/human/human_defense.dm code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/human/login.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/whisper.dm code/modules/mob/living/carbon/metroid/death.dm code/modules/mob/living/carbon/metroid/examine.dm code/modules/mob/living/carbon/metroid/life.dm code/modules/mob/living/carbon/metroid/login.dm code/modules/mob/living/carbon/metroid/metroid.dm code/modules/mob/living/carbon/metroid/powers.dm code/modules/mob/living/carbon/monkey/death.dm code/modules/mob/living/carbon/monkey/examine.dm code/modules/mob/living/carbon/monkey/hud.dm code/modules/mob/living/carbon/monkey/life.dm code/modules/mob/living/carbon/monkey/login.dm code/modules/mob/living/carbon/monkey/monkey.dm code/modules/mob/living/carbon/monkey/powers.dm code/modules/mob/living/damage_procs.dm code/modules/mob/living/living.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/login.dm code/modules/mob/living/say.dm code/modules/mob/living/silicon/ai/ai.dm code/modules/mob/living/silicon/ai/death.dm code/modules/mob/living/silicon/ai/examine.dm code/modules/mob/living/silicon/ai/life.dm code/modules/mob/living/silicon/ai/login.dm code/modules/mob/living/silicon/ai/move.dm code/modules/mob/living/silicon/death.dm code/modules/mob/living/silicon/decoy/death.dm code/modules/mob/living/silicon/pai/death.dm code/modules/mob/living/silicon/pai/hud.dm code/modules/mob/living/silicon/pai/pai.dm code/modules/mob/living/silicon/pai/recruit.dm code/modules/mob/living/silicon/pai/software.dm code/modules/mob/living/silicon/robot/death.dm code/modules/mob/living/silicon/robot/emote.dm code/modules/mob/living/silicon/robot/examine.dm code/modules/mob/living/silicon/robot/hud.dm code/modules/mob/living/silicon/robot/life.dm code/modules/mob/living/silicon/robot/login.dm code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/living/silicon/robot/robot_modules.dm code/modules/mob/living/silicon/robot/say.dm code/modules/mob/living/silicon/robot/wires.dm code/modules/mob/living/silicon/say.dm code/modules/mob/living/simple_animal/life.dm code/modules/mob/login.dm code/modules/mob/logout.dm code/modules/mob/mob.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_grab.dm code/modules/mob/mob_helpers.dm code/modules/mob/mob_movement.dm code/modules/mob/mob_transformation_simple.dm code/modules/mob/new_player/login.dm code/modules/mob/new_player/new_player.dm code/modules/mob/new_player/preferences.dm code/modules/mob/new_player/preferences_setup.dm code/modules/mob/new_player/savefile.dm code/modules/mob/new_player/sprite_accessories.dm code/modules/mob/organ/organ.dm code/modules/mob/organ/organ_external.dm code/modules/mob/organ/pain.dm code/modules/mob/say.dm code/modules/mob/screen.dm code/modules/mob/simple_animal/crab.dm code/modules/mob/transform_procs.dm code/modules/paperwork/clipboard.dm code/modules/paperwork/filingcabinet.dm code/modules/paperwork/folders.dm code/modules/paperwork/handlabeler.dm code/modules/paperwork/paper.dm code/modules/paperwork/paperbin.dm code/modules/paperwork/pen.dm code/modules/paperwork/photocopier.dm code/modules/paperwork/stamps.dm code/modules/power/antimatter/computer.dm code/modules/power/antimatter/engine.dm code/modules/power/antimatter/fuel.dm code/modules/power/apc.dm code/modules/power/cable.dm code/modules/power/cable_heavyduty.dm code/modules/power/cell.dm code/modules/power/generator.dm code/modules/power/generator_type2.dm code/modules/power/gravitygenerator.dm code/modules/power/lighting.dm code/modules/power/port_gen.dm code/modules/power/sd_DynamicAreaLighting.dm code/modules/power/singularity/collector.dm code/modules/power/singularity/containment_field.dm code/modules/power/singularity/emitter.dm code/modules/power/singularity/field_generator.dm code/modules/power/singularity/generator.dm code/modules/power/singularity/investigate.dm code/modules/power/singularity/particle_accelerator/particle.dm code/modules/power/singularity/particle_accelerator/particle_accelerator.dm code/modules/power/singularity/particle_accelerator/particle_chamber.dm code/modules/power/singularity/particle_accelerator/particle_control.dm code/modules/power/singularity/particle_accelerator/particle_emitter.dm code/modules/power/singularity/particle_accelerator/particle_power.dm code/modules/power/singularity/singularity.dm code/modules/power/smes.dm code/modules/power/solar.dm code/modules/power/switch.dm code/modules/power/turbine.dm code/modules/projectiles/ammunition.dm code/modules/projectiles/gun.dm code/modules/projectiles/guns/energy.dm code/modules/projectiles/guns/energy/laser.dm code/modules/projectiles/guns/energy/nuclear.dm code/modules/projectiles/guns/energy/pulse.dm code/modules/projectiles/guns/energy/special.dm code/modules/projectiles/guns/energy/stun.dm code/modules/projectiles/guns/projectile.dm code/modules/projectiles/guns/projectile/pistol.dm code/modules/projectiles/guns/projectile/revolver.dm code/modules/projectiles/guns/projectile/shotgun.dm code/modules/projectiles/projectile.dm code/modules/projectiles/projectile/beams.dm code/modules/projectiles/projectile/bullets.dm code/modules/projectiles/projectile/change.dm code/modules/projectiles/projectile/special.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Recipes.dm code/modules/recycling/conveyor2.dm code/modules/recycling/disposal-construction.dm code/modules/recycling/disposal.dm code/modules/recycling/sortingmachinery.dm code/modules/research/designs.dm code/modules/research/destructive_analyzer.dm code/modules/research/message_server.dm code/modules/research/protolathe.dm code/modules/research/rdconsole.dm code/modules/research/rdmachines.dm code/modules/research/research.dm code/modules/research/server.dm code/modules/scripting/AST/Operators/Binary Operators.dm code/modules/scripting/Implementations/Telecomms.dm code/modules/scripting/Parser/Keywords.dm code/modules/scripting/Scanner/Tokens.dm code/modules/scripting/stack.dm code/modules/security levels/keycard authentication.dm code/modules/security levels/security levels.dm code/setup.dm code/stylesheet.dm code/unused/AI_Visibility.dm code/unused/Ultralight.dm code/unused/airtunnel.dm code/unused/beast/bodypart.dm code/unused/conveyor.dm code/unused/disease2/analyser.dm code/unused/disease2/base.dm code/unused/disease2/biohazard destroyer.dm code/unused/disease2/cureimplanter.dm code/unused/disease2/curer.dm code/unused/disease2/diseasesplicer.dm code/unused/disease2/dishincubator.dm code/unused/disease2/isolator.dm code/unused/disease2/monkeydispensor.dm code/unused/dna.dm code/unused/gamemodes/deathmatch.dm code/unused/jobs.dm code/unused/mining/datum_processing_recipe.dm code/unused/mining/spaceship_builder_unused.dm code/unused/new_year.dm code/unused/spacecraft/manufacturing.dm code/unused/spacecraft/shipcore.dm config/README feedback.txt config/admins.txt config/config.txt config/rules.html data/mode.txt html/add-to-changelog.html html/archivedchangelog.html html/changelog.css html/changelog.html html/changelog.js icons/effects/blood.dmi icons/effects/genetics.dmi icons/misc/fullscreen.dmi icons/mob/AI.dmi icons/mob/alien.dmi icons/mob/animal.dmi icons/mob/back.dmi icons/mob/belt.dmi icons/mob/blob.dmi icons/mob/critter.dmi icons/mob/dam_human.dmi icons/mob/eyes.dmi icons/mob/feet.dmi icons/mob/hands.dmi icons/mob/head.dmi icons/mob/human.dmi icons/mob/human_face.dmi icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/livestock.dmi icons/mob/mask.dmi icons/mob/mecha.dmi icons/mob/mob.dmi icons/mob/monkey.dmi icons/mob/robots.dmi icons/mob/screen1.dmi icons/mob/screen1_Midnight.dmi icons/mob/screen1_Orange.dmi icons/mob/screen1_alien.dmi icons/mob/screen1_old.dmi icons/mob/suit.dmi icons/mob/uniform.dmi icons/mob/zone_sel.dmi icons/obj/Cryogenic2.dmi icons/obj/aibots.dmi icons/obj/ammo.dmi icons/obj/atmos.dmi icons/obj/bureaucracy.dmi icons/obj/card.dmi icons/obj/cigarettes.dmi icons/obj/closet.dmi icons/obj/clothing/glasses.dmi icons/obj/clothing/gloves.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/shoes.dmi icons/obj/clothing/suits.dmi icons/obj/clothing/uniforms.dmi icons/obj/computer.dmi icons/obj/contraband.dmi icons/obj/decals.dmi icons/obj/device.dmi icons/obj/doors/DoorHazard.dmi icons/obj/doors/door_assembly.dmi icons/obj/drinks.dmi icons/obj/engine.dmi icons/obj/food.dmi icons/obj/grenade.dmi icons/obj/gun.dmi icons/obj/harvest.dmi icons/obj/hydroponics.dmi icons/obj/items.dmi icons/obj/janitor.dmi icons/obj/library.dmi icons/obj/lighting.dmi icons/obj/machines/field_generator.dmi icons/obj/machines/gateway.dmi icons/obj/machines/mining_machines.dmi icons/obj/machines/particle_accelerator.dmi icons/obj/meter.dmi icons/obj/mining.dmi icons/obj/objects.dmi icons/obj/paper.dmi icons/obj/pda.dmi icons/obj/pipes/disposal.dmi icons/obj/plants.dmi icons/obj/power.dmi icons/obj/projectiles.dmi icons/obj/robotics.dmi icons/obj/seeds.dmi icons/obj/singularity.dmi icons/obj/stationobjs.dmi icons/obj/stock_parts.dmi icons/obj/storage.dmi icons/obj/structures.dmi icons/obj/surgery.dmi icons/obj/syringe.dmi icons/obj/tank.dmi icons/obj/terminals.dmi icons/obj/toy.dmi icons/obj/vending.dmi icons/obj/watercloset.dmi icons/obj/weapons.dmi icons/obj/wizard.dmi icons/turf/areas.dmi icons/turf/floors.dmi icons/turf/walls.dmi interface/interface.dm interface/skin.dmf maps/Antiqua.dmm maps/RandomZLevels/assistantChamber.dmm maps/RandomZLevels/fileList.txt maps/tgstation.2.0.9.dmm sound/AI/animes.ogg sound/AI/newroundsexy.ogg sound/AI/newroundsexy2.ogg sound/effects/adminhelp.ogg tools/UnstandardnessTestForDM/UnstandardnessTestForDM.sln tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.resx tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Program.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/AssemblyInfo.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Resources.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Resources.resx tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Settings.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Settings.settings tools/UnstandardnessTestForDM/UnstandardnessTestForDM/UnstandardnessTestForDM.csproj tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin/Debug/UnstandardnessTestForDM.vshost.exe.manifest tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86/Debug/UnstandardnessTestForDM.csproj.FileListAbsolute.txt tools/expand_filedir_paths.py tools/readme.txt Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
1254 lines
40 KiB
Plaintext
1254 lines
40 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
|
|
|
|
|
/proc/RandomAAlarmWires()
|
|
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
|
var/list/AAlarmwires = list(0, 0, 0, 0, 0)
|
|
AAlarmIndexToFlag = list(0, 0, 0, 0, 0)
|
|
AAlarmIndexToWireColor = list(0, 0, 0, 0, 0)
|
|
AAlarmWireColorToIndex = list(0, 0, 0, 0, 0)
|
|
var/flagIndex = 1
|
|
for (var/flag=1, flag<32, flag+=flag)
|
|
var/valid = 0
|
|
while (!valid)
|
|
var/colorIndex = rand(1, 5)
|
|
if (AAlarmwires[colorIndex]==0)
|
|
valid = 1
|
|
AAlarmwires[colorIndex] = flag
|
|
AAlarmIndexToFlag[flagIndex] = flag
|
|
AAlarmIndexToWireColor[flagIndex] = colorIndex
|
|
AAlarmWireColorToIndex[colorIndex] = flagIndex
|
|
flagIndex+=1
|
|
return AAlarmwires
|
|
|
|
|
|
|
|
// A datum for dealing with threshold limit values
|
|
// used in /obj/machinery/alarm
|
|
/datum/tlv
|
|
var/min2
|
|
var/min1
|
|
var/max1
|
|
var/max2
|
|
New(_min2 as num, _min1 as num, _max1 as num, _max2 as num)
|
|
min2 = _min2
|
|
min1 = _min1
|
|
max1 = _max1
|
|
max2 = _max2
|
|
proc/get_danger_level(curval as num)
|
|
if (max2 >=0 && curval>=max2)
|
|
return 2
|
|
if (min2 >=0 && curval<=min2)
|
|
return 2
|
|
if (max1 >=0 && curval>=max1)
|
|
return 1
|
|
if (min1 >=0 && curval<=min1)
|
|
return 1
|
|
return 0
|
|
proc/CopyFrom(datum/tlv/other)
|
|
min2 = other.min2
|
|
min1 = other.min1
|
|
max1 = other.max1
|
|
max2 = other.max2
|
|
|
|
/obj/machinery/alarm
|
|
name = "alarm"
|
|
icon = 'icons/obj/monitors.dmi'
|
|
icon_state = "alarm0"
|
|
anchored = 1
|
|
use_power = 1
|
|
idle_power_usage = 4
|
|
active_power_usage = 8
|
|
power_channel = ENVIRON
|
|
req_access = list(access_atmospherics)
|
|
var/frequency = 1439
|
|
//var/skipprocess = 0 //Experimenting
|
|
var/alarm_frequency = 1437
|
|
#define AALARM_REPORT_TIMEOUT 100
|
|
var/datum/radio_frequency/radio_connection
|
|
var/locked = 1
|
|
var/wiresexposed = 0 // If it's been screwdrivered open.
|
|
var/aidisabled = 0
|
|
var/AAlarmwires = 31
|
|
var/shorted = 0
|
|
var/remote_control = 0
|
|
|
|
// Uses code from apc.dm
|
|
|
|
#define AALARM_WIRE_IDSCAN 1 //Added wires
|
|
#define AALARM_WIRE_POWER 2
|
|
#define AALARM_WIRE_SYPHON 3
|
|
#define AALARM_WIRE_AI_CONTROL 4
|
|
#define AALARM_WIRE_AALARM 5
|
|
|
|
|
|
#define AALARM_MODE_SCRUBBING 1
|
|
#define AALARM_MODE_VENTING 2 //makes draught
|
|
#define AALARM_MODE_PANIC 3 //constantly sucks all air
|
|
#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing
|
|
#define AALARM_MODE_OFF 5
|
|
var/mode = AALARM_MODE_SCRUBBING
|
|
|
|
#define AALARM_SCREEN_MAIN 1
|
|
#define AALARM_SCREEN_VENT 2
|
|
#define AALARM_SCREEN_SCRUB 3
|
|
#define AALARM_SCREEN_MODE 4
|
|
#define AALARM_SCREEN_SENSORS 5
|
|
var/screen = AALARM_SCREEN_MAIN
|
|
var/area_uid
|
|
var/area/alarm_area
|
|
var/danger_level = 0
|
|
|
|
// breathable air according to human/Life()
|
|
var/list/TLV = list(
|
|
"oxygen" = new/datum/tlv( 16, 19, 135, 140), // Partial pressure, kpa
|
|
"carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa
|
|
"plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa
|
|
"other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa
|
|
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20), /* kpa */
|
|
"temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), // K
|
|
)
|
|
|
|
/*
|
|
// breathable air according to wikipedia
|
|
"oxygen" = new/datum/tlv( 9, 12, 158, 296), // Partial pressure, kpa
|
|
"carbon dioxide" = new/datum/tlv(-1.0,-1.0, 0.5, 1), // Partial pressure, kpa
|
|
*/
|
|
/obj/machinery/alarm/server
|
|
//req_access = list(access_rd) //no, let departaments to work together
|
|
TLV = list(
|
|
"oxygen" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // Partial pressure, kpa
|
|
"carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa
|
|
"plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa
|
|
"other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa
|
|
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60), /* kpa */
|
|
"temperature" = new/datum/tlv(40, 60, 100, 120), // K
|
|
)
|
|
|
|
/obj/machinery/alarm/kitchen_cold_room
|
|
TLV = list(
|
|
"oxygen" = new/datum/tlv( 16, 19, 135, 140), // Partial pressure, kpa
|
|
"carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa
|
|
"plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa
|
|
"other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa
|
|
"pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.50,ONE_ATMOSPHERE*1.60), /* kpa */
|
|
"temperature" = new/datum/tlv(200, 210, 273.15, 283.15), // K
|
|
)
|
|
|
|
//all air alarms in area are connected via magic
|
|
/area
|
|
var/obj/machinery/alarm/master_air_alarm
|
|
var/list/air_vent_names
|
|
var/list/air_scrub_names
|
|
var/list/air_vent_info
|
|
var/list/air_scrub_info
|
|
|
|
/obj/machinery/alarm/New()
|
|
..()
|
|
alarm_area = get_area(loc)
|
|
if (alarm_area.master)
|
|
alarm_area = alarm_area.master
|
|
area_uid = alarm_area.uid
|
|
if (name == "alarm")
|
|
name = "[alarm_area.name] Air Alarm"
|
|
|
|
/obj/machinery/alarm/initialize()
|
|
set_frequency(frequency)
|
|
if (!master_is_operating())
|
|
elect_master()
|
|
|
|
/obj/machinery/alarm/proc/master_is_operating()
|
|
return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN))
|
|
|
|
/obj/machinery/alarm/proc/elect_master()
|
|
for (var/area/A in alarm_area.related)
|
|
for (var/obj/machinery/alarm/AA in A)
|
|
if (!(AA.stat & (NOPOWER|BROKEN)))
|
|
alarm_area.master_air_alarm = AA
|
|
if (!alarm_area.air_vent_names)
|
|
alarm_area.air_vent_names = new
|
|
alarm_area.air_scrub_names = new
|
|
alarm_area.air_vent_info = new
|
|
alarm_area.air_scrub_info = new
|
|
return 1
|
|
return 0
|
|
|
|
/obj/machinery/alarm/attack_hand(mob/user)
|
|
. = ..()
|
|
if (.)
|
|
return
|
|
user.machine = src
|
|
|
|
if ( (get_dist(src, user) > 1 ))
|
|
if (!istype(user, /mob/living/silicon))
|
|
user.machine = null
|
|
user << browse(null, "window=air_alarm")
|
|
user << browse(null, "window=AAlarmwires")
|
|
return
|
|
|
|
|
|
else if (istype(user, /mob/living/silicon) && src.aidisabled)
|
|
user << "AI control for this Air Alarm interface has been disabled."
|
|
user << browse(null, "window=air_alarm")
|
|
return
|
|
|
|
if(wiresexposed && (!istype(user, /mob/living/silicon)))
|
|
var/t1 = text("<html><head><title>[alarm_area.name] Air Alarm Wires</title></head><body><B>Access Panel</B><br>\n")
|
|
var/list/AAlarmwires = list(
|
|
"Orange" = 1,
|
|
"Dark red" = 2,
|
|
"White" = 3,
|
|
"Yellow" = 4,
|
|
"Black" = 5,
|
|
)
|
|
for(var/wiredesc in AAlarmwires)
|
|
var/is_uncut = src.AAlarmwires & AAlarmWireColorToFlag[AAlarmwires[wiredesc]]
|
|
t1 += "[wiredesc] wire: "
|
|
if(!is_uncut)
|
|
t1 += "<a href='?src=\ref[src];AAlarmwires=[AAlarmwires[wiredesc]]'>Mend</a>"
|
|
|
|
else
|
|
t1 += "<a href='?src=\ref[src];AAlarmwires=[AAlarmwires[wiredesc]]'>Cut</a> "
|
|
t1 += "<a href='?src=\ref[src];pulse=[AAlarmwires[wiredesc]]'>Pulse</a> "
|
|
|
|
t1 += "<br>"
|
|
t1 += text("<br>\n[(src.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((src.shorted || (stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(src.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
|
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p></body></html>")
|
|
user << browse(t1, "window=AAlarmwires")
|
|
onclose(user, "AAlarmwires")
|
|
|
|
if(!shorted)
|
|
user << browse(return_text(),"window=air_alarm")
|
|
onclose(user, "air_alarm")
|
|
refresh_all()
|
|
|
|
return
|
|
|
|
|
|
/obj/machinery/alarm/proc/isWireColorCut(var/wireColor)
|
|
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
|
return ((src.AAlarmwires & wireFlag) == 0)
|
|
|
|
/obj/machinery/alarm/proc/isWireCut(var/wireIndex)
|
|
var/wireFlag = AAlarmIndexToFlag[wireIndex]
|
|
return ((src.AAlarmwires & wireFlag) == 0)
|
|
|
|
/obj/machinery/alarm/proc/cut(var/wireColor)
|
|
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
|
var/wireIndex = AAlarmWireColorToIndex[wireColor]
|
|
AAlarmwires &= ~wireFlag
|
|
switch(wireIndex)
|
|
if(AALARM_WIRE_IDSCAN)
|
|
src.locked = 1
|
|
//world << "Idscan wire cut"
|
|
|
|
if(AALARM_WIRE_POWER)
|
|
src.shock(usr, 50)
|
|
src.shorted = 1
|
|
update_icon()
|
|
//world << "Power wire cut"
|
|
|
|
if (AALARM_WIRE_AI_CONTROL)
|
|
if (src.aidisabled == 0)
|
|
src.aidisabled = 1
|
|
//world << "AI Control Wire Cut"
|
|
|
|
if(AALARM_WIRE_SYPHON)
|
|
mode = AALARM_MODE_PANIC
|
|
apply_mode()
|
|
//world << "Syphon Wire Cut"
|
|
|
|
if(AALARM_WIRE_AALARM)
|
|
|
|
if (alarm_area.atmosalert(2))
|
|
post_alert(2)
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
update_icon()
|
|
|
|
//world << "AAlarm Wire Cut"
|
|
|
|
src.updateDialog()
|
|
|
|
return
|
|
|
|
/obj/machinery/alarm/proc/mend(var/wireColor)
|
|
var/wireFlag = AAlarmWireColorToFlag[wireColor]
|
|
var/wireIndex = AAlarmWireColorToIndex[wireColor] //not used in this function
|
|
AAlarmwires |= wireFlag
|
|
switch(wireIndex)
|
|
if(AALARM_WIRE_IDSCAN)
|
|
//world << "Idscan wire mended"
|
|
|
|
if(AALARM_WIRE_POWER)
|
|
src.shorted = 0
|
|
src.shock(usr, 50)
|
|
update_icon()
|
|
//world << "Power wire mended"
|
|
|
|
if(AALARM_WIRE_AI_CONTROL)
|
|
if (src.aidisabled == 1)
|
|
src.aidisabled = 0
|
|
//world << "AI Cont. wire mended"
|
|
|
|
|
|
// if(AALARM_WIRE_SYPHON)
|
|
// world << "Syphon Wire mended"
|
|
|
|
|
|
// if(AALARM_WIRE_AALARM)
|
|
//world << "AAlarm Wire mended"
|
|
|
|
src.updateDialog()
|
|
return
|
|
|
|
/obj/machinery/alarm/proc/pulse(var/wireColor)
|
|
//var/wireFlag = AAlarmWireColorToFlag[wireColor] //not used in this function
|
|
var/wireIndex = AAlarmWireColorToIndex[wireColor]
|
|
switch(wireIndex)
|
|
if(AALARM_WIRE_IDSCAN) //unlocks for 30 seconds, if you have a better way to hack I'm all ears
|
|
src.locked = 0
|
|
spawn(300)
|
|
src.locked = 1
|
|
//world << "Idscan wire pulsed"
|
|
|
|
if (AALARM_WIRE_POWER)
|
|
// world << "Power wire pulsed"
|
|
if(shorted == 0)
|
|
shorted = 1
|
|
update_icon()
|
|
|
|
spawn(1200)
|
|
if(shorted == 1)
|
|
shorted = 0
|
|
update_icon()
|
|
|
|
|
|
if (AALARM_WIRE_AI_CONTROL)
|
|
// world << "AI Control wire pulsed"
|
|
if (src.aidisabled == 0)
|
|
src.aidisabled = 1
|
|
src.updateDialog()
|
|
spawn(10)
|
|
if (src.aidisabled == 1)
|
|
src.aidisabled = 0
|
|
src.updateDialog()
|
|
|
|
if(AALARM_WIRE_SYPHON)
|
|
// world << "Syphon wire pulsed"
|
|
mode = AALARM_MODE_REPLACEMENT
|
|
apply_mode()
|
|
|
|
if(AALARM_WIRE_AALARM)
|
|
// world << "Aalarm wire pulsed"
|
|
if (alarm_area.atmosalert(0))
|
|
post_alert(0)
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
update_icon()
|
|
|
|
src.updateDialog()
|
|
return
|
|
|
|
/obj/machinery/alarm/proc/shock(mob/user, prb)
|
|
if((stat & (NOPOWER))) // unpowered, no shock
|
|
return 0
|
|
if(!prob(prb))
|
|
return 0 //you lucked out, no shock for you
|
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
s.set_up(5, 1, src)
|
|
s.start() //sparks always.
|
|
if (electrocute_mob(user, get_area(src), src))
|
|
return 1
|
|
else
|
|
return 0
|
|
|
|
/obj/machinery/alarm/receive_signal(datum/signal/signal)
|
|
if(stat & (NOPOWER|BROKEN))
|
|
return
|
|
if (alarm_area.master_air_alarm != src)
|
|
if (master_is_operating())
|
|
return
|
|
elect_master()
|
|
if (alarm_area.master_air_alarm != src)
|
|
return
|
|
if(!signal || signal.encryption)
|
|
return
|
|
var/id_tag = signal.data["tag"]
|
|
if (!id_tag)
|
|
return
|
|
if (signal.data["area"] != area_uid)
|
|
return
|
|
if (signal.data["sigtype"] != "status")
|
|
return
|
|
|
|
var/dev_type = signal.data["device"]
|
|
if(!(id_tag in alarm_area.air_scrub_names) && !(id_tag in alarm_area.air_vent_names))
|
|
register_env_machine(id_tag, dev_type)
|
|
if(dev_type == "AScr")
|
|
alarm_area.air_scrub_info[id_tag] = signal.data
|
|
else if(dev_type == "AVP")
|
|
alarm_area.air_vent_info[id_tag] = signal.data
|
|
|
|
/obj/machinery/alarm/proc/register_env_machine(var/m_id, var/device_type)
|
|
var/new_name
|
|
if (device_type=="AVP")
|
|
new_name = "[alarm_area.name] Vent Pump #[alarm_area.air_vent_names.len+1]"
|
|
alarm_area.air_vent_names[m_id] = new_name
|
|
else if (device_type=="AScr")
|
|
new_name = "[alarm_area.name] Air Scrubber #[alarm_area.air_scrub_names.len+1]"
|
|
alarm_area.air_scrub_names[m_id] = new_name
|
|
else
|
|
return
|
|
spawn (10)
|
|
send_signal(m_id, list("init" = new_name) )
|
|
|
|
/obj/machinery/alarm/proc/refresh_all()
|
|
for(var/id_tag in alarm_area.air_vent_names)
|
|
var/list/I = alarm_area.air_vent_info[id_tag]
|
|
if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
|
|
continue
|
|
send_signal(id_tag, list("status") )
|
|
for(var/id_tag in alarm_area.air_scrub_names)
|
|
var/list/I = alarm_area.air_scrub_info[id_tag]
|
|
if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time)
|
|
continue
|
|
send_signal(id_tag, list("status") )
|
|
|
|
/obj/machinery/alarm/proc/set_frequency(new_frequency)
|
|
radio_controller.remove_object(src, frequency)
|
|
frequency = new_frequency
|
|
radio_connection = radio_controller.add_object(src, frequency, RADIO_TO_AIRALARM)
|
|
|
|
/obj/machinery/alarm/proc/send_signal(var/target, var/list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
|
if(!radio_connection)
|
|
return 0
|
|
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = 1 //radio signal
|
|
signal.source = src
|
|
|
|
signal.data = command
|
|
signal.data["tag"] = target
|
|
signal.data["sigtype"] = "command"
|
|
|
|
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
|
|
// world << text("Signal [] Broadcasted to []", command, target)
|
|
|
|
return 1
|
|
|
|
/obj/machinery/alarm/proc/return_text()
|
|
if(!(istype(usr, /mob/living/silicon)) && locked)
|
|
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
|
else
|
|
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[return_controls()]</body></html>"
|
|
|
|
/obj/machinery/alarm/proc/return_status()
|
|
var/turf/location = src.loc
|
|
var/datum/gas_mixture/environment = location.return_air()
|
|
var/total = environment.oxygen + environment.carbon_dioxide + environment.toxins + environment.nitrogen
|
|
var/output = "<b>Air Status:</b><br>"
|
|
|
|
if(total == 0)
|
|
output +={"<font color='red'><b>Warning: Cannot obtain air sample for analysis.</b></font>"}
|
|
return output
|
|
|
|
output += {"
|
|
<style>
|
|
.dl0 { color: green; }
|
|
.dl1 { color: orange; }
|
|
.dl2 { color: red; font-weght: bold;}
|
|
</style>
|
|
"}
|
|
var/datum/tlv/cur_tlv
|
|
var/GET_PP = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
|
|
|
|
cur_tlv = TLV["pressure"]
|
|
var/environment_pressure = environment.return_pressure()
|
|
var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
|
|
|
|
cur_tlv = TLV["oxygen"]
|
|
var/oxygen_dangerlevel = cur_tlv.get_danger_level(environment.oxygen*GET_PP)
|
|
var/oxygen_percent = round(environment.oxygen / total * 100, 2)
|
|
|
|
cur_tlv = TLV["carbon dioxide"]
|
|
var/co2_dangerlevel = cur_tlv.get_danger_level(environment.carbon_dioxide*GET_PP)
|
|
var/co2_percent = round(environment.carbon_dioxide / total * 100, 2)
|
|
|
|
cur_tlv = TLV["plasma"]
|
|
var/plasma_dangerlevel = cur_tlv.get_danger_level(environment.toxins*GET_PP)
|
|
var/plasma_percent = round(environment.toxins / total * 100, 2)
|
|
|
|
cur_tlv = TLV["other"]
|
|
var/other_moles = 0.0
|
|
for(var/datum/gas/G in environment.trace_gases)
|
|
other_moles+=G.moles
|
|
var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
|
|
|
|
cur_tlv = TLV["temperature"]
|
|
var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
|
|
|
|
output += {"
|
|
Pressure: <span class='dl[pressure_dangerlevel]'>[environment_pressure]</span>kPa<br>
|
|
Oxygen: <span class='dl[oxygen_dangerlevel]'>[oxygen_percent]</span>%<br>
|
|
Carbon dioxide: <span class='dl[co2_dangerlevel]'>[co2_percent]</span>%<br>
|
|
Toxins: <span class='dl[plasma_dangerlevel]'>[plasma_percent]</span>%<br>
|
|
"}
|
|
if (other_dangerlevel==2)
|
|
output += {"Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"}
|
|
else if (other_dangerlevel==1)
|
|
output += {"Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"}
|
|
|
|
output += {"
|
|
Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K<br>
|
|
"}
|
|
|
|
var/display_danger_level = max(
|
|
pressure_dangerlevel,
|
|
oxygen_dangerlevel,
|
|
co2_dangerlevel,
|
|
plasma_dangerlevel,
|
|
other_dangerlevel,
|
|
temperature_dangerlevel
|
|
)
|
|
|
|
//Overall status
|
|
output += {"Local Status: "}
|
|
if(display_danger_level == 2)
|
|
output += {"<span class='dl2'>DANGER: Internals Required</span>"}
|
|
else if(display_danger_level == 1)
|
|
output += {"<span class='dl1'>Caution</span>"}
|
|
else if (alarm_area.atmosalm)
|
|
output += {"<span class='dl1'>Caution: Atmos alert in area</span>"}
|
|
else
|
|
output += {"<span class='dl0'>Optimal</span>"}
|
|
|
|
return output
|
|
|
|
/obj/machinery/alarm/proc/return_controls()
|
|
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
|
|
|
switch(screen)
|
|
if (AALARM_SCREEN_MAIN)
|
|
if(alarm_area.atmosalm)
|
|
output += {"<a href='?src=\ref[src];atmos_reset=1'>Reset - Atmospheric Alarm</a><hr>"}
|
|
else
|
|
output += {"<a href='?src=\ref[src];atmos_alarm=1'>Activate - Atmospheric Alarm</a><hr>"}
|
|
|
|
output += {"
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
|
|
<HR>
|
|
"}
|
|
if (mode==AALARM_MODE_PANIC)
|
|
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
|
|
else
|
|
output += "<A href='?src=\ref[src];mode=[AALARM_MODE_PANIC]'><font color='red'><B>ACTIVATE PANIC SYPHON IN AREA</B></font></A>"
|
|
if (AALARM_SCREEN_VENT)
|
|
var/sensor_data = ""
|
|
if(alarm_area.air_vent_names.len)
|
|
for(var/id_tag in alarm_area.air_vent_names)
|
|
var/long_name = alarm_area.air_vent_names[id_tag]
|
|
var/list/data = alarm_area.air_vent_info[id_tag]
|
|
if(!data)
|
|
continue;
|
|
var/state = ""
|
|
|
|
sensor_data += {"
|
|
<B>[long_name]</B>[state]<BR>
|
|
<B>Operating:</B>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
|
<BR>
|
|
<B>Pressure checks:</B>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
|
<BR>
|
|
<B>External pressure bound:</B>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
|
[data["external"]]
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
|
|
<BR>
|
|
"}
|
|
if (data["direction"] == "siphon")
|
|
sensor_data += {"
|
|
<B>Direction:</B>
|
|
siphoning
|
|
<BR>
|
|
"}
|
|
sensor_data += {"<HR>"}
|
|
else
|
|
sensor_data = "No vents connected.<BR>"
|
|
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
|
if (AALARM_SCREEN_SCRUB)
|
|
var/sensor_data = ""
|
|
if(alarm_area.air_scrub_names.len)
|
|
for(var/id_tag in alarm_area.air_scrub_names)
|
|
var/long_name = alarm_area.air_scrub_names[id_tag]
|
|
var/list/data = alarm_area.air_scrub_info[id_tag]
|
|
if(!data)
|
|
continue;
|
|
var/state = ""
|
|
|
|
sensor_data += {"
|
|
<B>[long_name]</B>[state]<BR>
|
|
<B>Operating:</B>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
|
<B>Type:</B>
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
|
"}
|
|
|
|
if(data["scrubbing"])
|
|
sensor_data += {"
|
|
<B>Filtering:</B>
|
|
Carbon Dioxide
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
|
Toxins
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_toxins"]]'>[data["filter_toxins"]?"on":"off"]</A>;
|
|
Nitrous Oxide
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
|
|
<BR>
|
|
"}
|
|
sensor_data += {"
|
|
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
|
|
<A href='?src=\ref[src];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
|
<HR>
|
|
"}
|
|
else
|
|
sensor_data = "No scrubbers connected.<BR>"
|
|
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
|
|
|
if (AALARM_SCREEN_MODE)
|
|
output += {"
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
|
<b>Air machinery mode for the area:</b><ul>"}
|
|
var/list/modes = list(
|
|
AALARM_MODE_SCRUBBING = "Filtering",
|
|
AALARM_MODE_VENTING = "Draught",
|
|
AALARM_MODE_PANIC = "<font color='red'>PANIC</font>",
|
|
AALARM_MODE_REPLACEMENT = "<font color='red'>REPLACE AIR</font>",
|
|
AALARM_MODE_OFF = "Off",
|
|
)
|
|
for (var/m=1,m<=modes.len,m++)
|
|
if (mode==m)
|
|
output += {"<li><A href='?src=\ref[src];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"}
|
|
else
|
|
output += {"<li><A href='?src=\ref[src];mode=[m]'>[modes[m]]</A></li>"}
|
|
output += "</ul>"
|
|
if (AALARM_SCREEN_SENSORS)
|
|
output += {"
|
|
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
|
<b>Alarm thresholds:</b><br>
|
|
Partial pressure for gases
|
|
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
|
|
table td { border-left: 1px solid black; border-top: 1px solid black;}
|
|
table tr:first-child th { border-left: 1px solid black;}
|
|
table th:first-child { border-top: 1px solid black; font-weight: normal;}
|
|
table tr:first-child th:first-child { border: none;}
|
|
.dl0 { color: green; }
|
|
.dl1 { color: orange; }
|
|
.dl2 { color: red; font-weght: bold;}
|
|
</style>
|
|
<table cellspacing=0>
|
|
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
|
|
"}
|
|
var/list/gases = list(
|
|
"oxygen" = "O<sub>2</sub>",
|
|
"carbon dioxide" = "CO<sub>2</sub>",
|
|
"plasma" = "Toxin",
|
|
"other" = "Other",
|
|
)
|
|
var/list/thresholds = list("min2", "min1", "max1", "max2")
|
|
var/datum/tlv/tlv
|
|
for (var/g in gases)
|
|
output += {"
|
|
<TR><th>[gases[g]]</th>
|
|
"}
|
|
tlv = TLV[g]
|
|
for (var/v in thresholds)
|
|
output += {"
|
|
<td>
|
|
<A href='?src=\ref[src];command=set_threshold;env=[g];var=[v]'>[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]</A>
|
|
</td>
|
|
"}
|
|
output += {"
|
|
</TR>
|
|
"}
|
|
tlv = TLV["pressure"]
|
|
output += {"
|
|
<TR><th>Pressure</th>
|
|
"}
|
|
for (var/v in thresholds)
|
|
output += {"
|
|
<td>
|
|
<A href='?src=\ref[src];command=set_threshold;env=pressure;var=[v]'>[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]</A>
|
|
</td>
|
|
"}
|
|
output += {"
|
|
</TR>
|
|
"}
|
|
tlv = TLV["temperature"]
|
|
output += {"
|
|
<TR><th>Temperature</th>
|
|
"}
|
|
for (var/v in thresholds)
|
|
output += {"
|
|
<td>
|
|
<A href='?src=\ref[src];command=set_threshold;env=temperature;var=[v]'>[tlv.vars[v]>=0?tlv.vars[v]:"OFF"]</A>
|
|
</td>
|
|
"}
|
|
output += {"
|
|
</TR>
|
|
"}
|
|
output += {"</table>"}
|
|
|
|
return output
|
|
|
|
/obj/machinery/alarm/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
src.add_fingerprint(usr)
|
|
usr.machine = src
|
|
|
|
if ( (get_dist(src, usr) > 1 ))
|
|
if (!istype(usr, /mob/living/silicon))
|
|
usr.machine = null
|
|
usr << browse(null, "window=air_alarm")
|
|
usr << browse(null, "window=AAlarmwires")
|
|
return
|
|
|
|
if (href_list["AAlarmwires"])
|
|
var/t1 = text2num(href_list["AAlarmwires"])
|
|
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
|
usr << "You need wirecutters!"
|
|
return
|
|
if (src.isWireColorCut(t1))
|
|
src.mend(t1)
|
|
else
|
|
src.cut(t1)
|
|
else if (href_list["pulse"])
|
|
var/t1 = text2num(href_list["pulse"])
|
|
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
|
usr << "You need a multitool!"
|
|
return
|
|
if (src.isWireColorCut(t1))
|
|
usr << "You can't pulse a cut wire."
|
|
return
|
|
else
|
|
src.pulse(t1)
|
|
|
|
|
|
|
|
if(href_list["command"])
|
|
var/device_id = href_list["id_tag"]
|
|
switch(href_list["command"])
|
|
if(
|
|
"power",
|
|
"adjust_external_pressure",
|
|
"set_external_pressure",
|
|
"checks",
|
|
"co2_scrub",
|
|
"tox_scrub",
|
|
"n2o_scrub",
|
|
"panic_siphon",
|
|
"scrubbing"
|
|
)
|
|
send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
|
|
spawn(3)
|
|
src.updateUsrDialog()
|
|
|
|
//if("adjust_threshold") //was a good idea but required very wide window
|
|
if("set_threshold")
|
|
var/env = href_list["env"]
|
|
var/varname = href_list["var"]
|
|
var/datum/tlv/tlv = TLV[env]
|
|
var/newval = input("Enter [varname] for env", "Alarm triggers", tlv.vars[varname]) as num|null
|
|
|
|
if (isnull(newval) || ..() || (locked && !issilicon(usr)))
|
|
return
|
|
if (newval<0)
|
|
tlv.vars[varname] = -1.0
|
|
else if (env=="temperature" && newval>5000)
|
|
tlv.vars[varname] = 5000
|
|
else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
|
|
tlv.vars[varname] = 50*ONE_ATMOSPHERE
|
|
else if (env!="temperature" && env!="pressure" && newval>200)
|
|
tlv.vars[varname] = 200
|
|
else
|
|
newval = round(newval,0.01)
|
|
tlv.vars[varname] = newval
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
|
|
if(href_list["screen"])
|
|
screen = text2num(href_list["screen"])
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
|
|
|
|
if(href_list["atmos_alarm"])
|
|
if (alarm_area.atmosalert(2))
|
|
post_alert(2)
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
update_icon()
|
|
if(href_list["atmos_reset"])
|
|
if (alarm_area.atmosalert(0))
|
|
post_alert(0)
|
|
spawn(1)
|
|
src.updateUsrDialog()
|
|
update_icon()
|
|
|
|
if(href_list["mode"])
|
|
mode = text2num(href_list["mode"])
|
|
apply_mode()
|
|
spawn(5)
|
|
src.updateUsrDialog()
|
|
|
|
return
|
|
|
|
/obj/machinery/alarm/proc/apply_mode()
|
|
switch(mode)
|
|
if(AALARM_MODE_SCRUBBING)
|
|
for(var/device_id in alarm_area.air_scrub_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1,
|
|
"co2_scrub"= 1,
|
|
"scrubbing"= 1,
|
|
"panic_siphon"= 0,
|
|
))
|
|
for(var/device_id in alarm_area.air_vent_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1,
|
|
"checks"= 1,
|
|
"set_external_pressure"= ONE_ATMOSPHERE
|
|
))
|
|
|
|
if(AALARM_MODE_VENTING)
|
|
for(var/device_id in alarm_area.air_scrub_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1,
|
|
"panic_siphon"= 0,
|
|
"scrubbing"= 0
|
|
))
|
|
for(var/device_id in alarm_area.air_vent_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1,
|
|
"checks"= 1,
|
|
"set_external_pressure"= ONE_ATMOSPHERE
|
|
))
|
|
if(
|
|
AALARM_MODE_PANIC,
|
|
AALARM_MODE_REPLACEMENT
|
|
)
|
|
for(var/device_id in alarm_area.air_scrub_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1,
|
|
"panic_siphon"= 1
|
|
))
|
|
for(var/device_id in alarm_area.air_vent_names)
|
|
send_signal(device_id, list(
|
|
"power"= 0
|
|
))
|
|
/*if(AALARM_MODE_OFF) Commented out cause the "turn off panic" uses scrubbing mode now instead.
|
|
for(var/device_id in alarm_area.air_scrub_names)
|
|
send_signal(device_id, list(
|
|
"panic_siphon" = 0
|
|
))
|
|
for(var/device_id in alarm_area.air_vent_names)
|
|
send_signal(device_id, list(
|
|
"power"= 1
|
|
))*/
|
|
|
|
/obj/machinery/alarm/update_icon()
|
|
if(wiresexposed)
|
|
icon_state = "alarmx"
|
|
return
|
|
if((stat & (NOPOWER|BROKEN)) || shorted)
|
|
icon_state = "alarmp"
|
|
return
|
|
switch(max(danger_level, alarm_area.atmosalm))
|
|
if (0)
|
|
src.icon_state = "alarm0"
|
|
if (1)
|
|
src.icon_state = "alarm2" //yes, alarm2 is yellow alarm
|
|
if (2)
|
|
src.icon_state = "alarm1"
|
|
|
|
/obj/machinery/alarm/process()
|
|
if((stat & (NOPOWER|BROKEN)) || shorted)
|
|
return
|
|
|
|
var/turf/simulated/location = src.loc
|
|
if (!istype(location))
|
|
return 0
|
|
|
|
var/datum/gas_mixture/environment = location.return_air()
|
|
|
|
var/datum/tlv/cur_tlv
|
|
var/GET_PP = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
|
|
|
|
cur_tlv = TLV["pressure"]
|
|
var/environment_pressure = environment.return_pressure()
|
|
var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
|
|
|
|
cur_tlv = TLV["oxygen"]
|
|
var/oxygen_dangerlevel = cur_tlv.get_danger_level(environment.oxygen*GET_PP)
|
|
|
|
cur_tlv = TLV["carbon dioxide"]
|
|
var/co2_dangerlevel = cur_tlv.get_danger_level(environment.carbon_dioxide*GET_PP)
|
|
|
|
cur_tlv = TLV["plasma"]
|
|
var/plasma_dangerlevel = cur_tlv.get_danger_level(environment.toxins*GET_PP)
|
|
|
|
cur_tlv = TLV["other"]
|
|
var/other_moles = 0.0
|
|
for(var/datum/gas/G in environment.trace_gases)
|
|
other_moles+=G.moles
|
|
var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
|
|
|
|
cur_tlv = TLV["temperature"]
|
|
var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
|
|
|
|
var/old_danger_level = danger_level
|
|
danger_level = max(
|
|
pressure_dangerlevel,
|
|
oxygen_dangerlevel,
|
|
co2_dangerlevel,
|
|
plasma_dangerlevel,
|
|
other_dangerlevel,
|
|
temperature_dangerlevel
|
|
)
|
|
if (old_danger_level!=danger_level)
|
|
apply_danger_level()
|
|
|
|
if (mode==AALARM_MODE_REPLACEMENT && environment_pressure<ONE_ATMOSPHERE*0.05)
|
|
mode=AALARM_MODE_SCRUBBING
|
|
apply_mode()
|
|
|
|
src.updateDialog()
|
|
return
|
|
|
|
/obj/machinery/alarm/proc/post_alert(alert_level)
|
|
|
|
var/datum/radio_frequency/frequency = radio_controller.return_frequency(alarm_frequency)
|
|
|
|
if(!frequency) return
|
|
|
|
var/datum/signal/alert_signal = new
|
|
alert_signal.source = src
|
|
alert_signal.transmission_method = 1
|
|
alert_signal.data["zone"] = alarm_area.name
|
|
alert_signal.data["type"] = "Atmospheric"
|
|
|
|
if(alert_level==2)
|
|
alert_signal.data["alert"] = "severe"
|
|
else if (alert_level==1)
|
|
alert_signal.data["alert"] = "minor"
|
|
else if (alert_level==0)
|
|
alert_signal.data["alert"] = "clear"
|
|
|
|
frequency.post_signal(src, alert_signal)
|
|
|
|
/obj/machinery/alarm/proc/apply_danger_level()
|
|
var/new_area_danger_level = 0
|
|
for (var/area/A in alarm_area.related)
|
|
for (var/obj/machinery/alarm/AA in A)
|
|
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
|
new_area_danger_level = max(new_area_danger_level,AA.danger_level)
|
|
if (alarm_area.atmosalert(new_area_danger_level)) //if area was in normal state or if area was in alert state
|
|
post_alert(new_area_danger_level)
|
|
update_icon()
|
|
|
|
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
|
/* if (istype(W, /obj/item/weapon/wirecutters))
|
|
stat ^= BROKEN
|
|
src.add_fingerprint(user)
|
|
for(var/mob/O in viewers(user, null))
|
|
O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1)
|
|
update_icon()
|
|
return
|
|
*/
|
|
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
|
//user << "You pop the Air Alarm's maintence panel open."
|
|
wiresexposed = !wiresexposed
|
|
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
|
update_icon()
|
|
return
|
|
|
|
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
|
|
return src.attack_hand(user)
|
|
|
|
|
|
else if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
|
if(stat & (NOPOWER|BROKEN))
|
|
user << "It does nothing"
|
|
else
|
|
if(src.allowed(usr) && !isWireCut(AALARM_WIRE_IDSCAN))
|
|
locked = !locked
|
|
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
|
|
src.updateUsrDialog()
|
|
else
|
|
user << "\red Access denied."
|
|
return
|
|
return ..()
|
|
|
|
/obj/machinery/alarm/power_change()
|
|
if(powered(power_channel))
|
|
stat &= ~NOPOWER
|
|
else
|
|
stat |= NOPOWER
|
|
spawn(rand(0,15))
|
|
update_icon()
|
|
|
|
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
|
if(src.detecting)
|
|
if(temperature > T0C+200)
|
|
src.alarm() // added check of detector status here
|
|
return
|
|
|
|
/obj/machinery/firealarm/attack_ai(mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/firealarm/bullet_act(BLAH)
|
|
return src.alarm()
|
|
|
|
/obj/machinery/firealarm/attack_paw(mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/firealarm/emp_act(severity)
|
|
if(prob(50/severity)) alarm()
|
|
..()
|
|
|
|
/obj/machinery/firealarm/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if (istype(W, /obj/item/weapon/wirecutters))
|
|
src.detecting = !( src.detecting )
|
|
if (src.detecting)
|
|
user.visible_message("\red [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
|
|
else
|
|
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
|
|
else
|
|
src.alarm()
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
/obj/machinery/firealarm/process()
|
|
if(stat & (NOPOWER|BROKEN))
|
|
return
|
|
|
|
var/area/A = src.loc
|
|
A = A.loc
|
|
|
|
if(A.fire)
|
|
src.icon_state = "fire1"
|
|
else
|
|
src.icon_state = "fire0"
|
|
|
|
if (src.timing)
|
|
if (src.time > 0)
|
|
src.time = round(src.time) - 1
|
|
else
|
|
alarm()
|
|
src.time = 0
|
|
src.timing = 0
|
|
src.updateDialog()
|
|
return
|
|
|
|
/obj/machinery/firealarm/power_change()
|
|
if(powered(ENVIRON))
|
|
stat &= ~NOPOWER
|
|
icon_state = "fire0"
|
|
else
|
|
spawn(rand(0,15))
|
|
stat |= NOPOWER
|
|
icon_state = "firep"
|
|
|
|
/obj/machinery/firealarm/attack_hand(mob/user as mob)
|
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
|
return
|
|
|
|
user.machine = src
|
|
var/area/A = src.loc
|
|
var/d1
|
|
var/d2
|
|
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
|
|
A = A.loc
|
|
|
|
if (A.fire)
|
|
d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src)
|
|
else
|
|
d1 = text("<A href='?src=\ref[];alarm=1'>Alarm - Lockdown</A>", src)
|
|
if (src.timing)
|
|
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Lock</A>", src)
|
|
else
|
|
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Lock</A>", src)
|
|
var/second = src.time % 60
|
|
var/minute = (src.time - second) / 60
|
|
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>Fire alarm</B> [d1]\n<HR>The current alert level is: [get_security_level()]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
|
user << browse(dat, "window=firealarm")
|
|
onclose(user, "firealarm")
|
|
else
|
|
A = A.loc
|
|
if (A.fire)
|
|
d1 = text("<A href='?src=\ref[];reset=1'>[]</A>", src, stars("Reset - Lockdown"))
|
|
else
|
|
d1 = text("<A href='?src=\ref[];alarm=1'>[]</A>", src, stars("Alarm - Lockdown"))
|
|
if (src.timing)
|
|
d2 = text("<A href='?src=\ref[];time=0'>[]</A>", src, stars("Stop Time Lock"))
|
|
else
|
|
d2 = text("<A href='?src=\ref[];time=1'>[]</A>", src, stars("Initiate Time Lock"))
|
|
var/second = src.time % 60
|
|
var/minute = (src.time - second) / 60
|
|
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>[stars("Fire alarm")]</B> [d1]\n<HR><b>The current alert level is: [stars(get_security_level())]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? text("[]:", minute) : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
|
user << browse(dat, "window=firealarm")
|
|
onclose(user, "firealarm")
|
|
return
|
|
|
|
/obj/machinery/firealarm/Topic(href, href_list)
|
|
..()
|
|
if (usr.stat || stat & (BROKEN|NOPOWER))
|
|
return
|
|
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
|
usr.machine = src
|
|
if (href_list["reset"])
|
|
src.reset()
|
|
else
|
|
if (href_list["alarm"])
|
|
src.alarm()
|
|
else
|
|
if (href_list["time"])
|
|
src.timing = text2num(href_list["time"])
|
|
else
|
|
if (href_list["tp"])
|
|
var/tp = text2num(href_list["tp"])
|
|
src.time += tp
|
|
src.time = min(max(round(src.time), 0), 120)
|
|
src.updateUsrDialog()
|
|
|
|
src.add_fingerprint(usr)
|
|
else
|
|
usr << browse(null, "window=firealarm")
|
|
return
|
|
return
|
|
|
|
/obj/machinery/firealarm/proc/reset()
|
|
if (!( src.working ))
|
|
return
|
|
var/area/A = src.loc
|
|
A = A.loc
|
|
if (!( istype(A, /area) ))
|
|
return
|
|
for(var/area/RA in A.related)
|
|
RA.firereset()
|
|
return
|
|
|
|
/obj/machinery/firealarm/proc/alarm()
|
|
if (!( src.working ))
|
|
return
|
|
var/area/A = src.loc
|
|
A = A.loc
|
|
if (!( istype(A, /area) ))
|
|
return
|
|
for(var/area/RA in A.related)
|
|
RA.firealert()
|
|
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
|
return
|
|
|
|
/obj/machinery/partyalarm/attack_paw(mob/user as mob)
|
|
return src.attack_hand(user)
|
|
/obj/machinery/partyalarm/attack_hand(mob/user as mob)
|
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
|
return
|
|
|
|
user.machine = src
|
|
var/area/A = src.loc
|
|
var/d1
|
|
var/d2
|
|
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
|
|
A = A.loc
|
|
|
|
if (A.party)
|
|
d1 = text("<A href='?src=\ref[];reset=1'>No Party :(</A>", src)
|
|
else
|
|
d1 = text("<A href='?src=\ref[];alarm=1'>PARTY!!!</A>", src)
|
|
if (src.timing)
|
|
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Lock</A>", src)
|
|
else
|
|
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Lock</A>", src)
|
|
var/second = src.time % 60
|
|
var/minute = (src.time - second) / 60
|
|
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>Party Button</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
|
user << browse(dat, "window=partyalarm")
|
|
onclose(user, "partyalarm")
|
|
else
|
|
A = A.loc
|
|
if (A.fire)
|
|
d1 = text("<A href='?src=\ref[];reset=1'>[]</A>", src, stars("No Party :("))
|
|
else
|
|
d1 = text("<A href='?src=\ref[];alarm=1'>[]</A>", src, stars("PARTY!!!"))
|
|
if (src.timing)
|
|
d2 = text("<A href='?src=\ref[];time=0'>[]</A>", src, stars("Stop Time Lock"))
|
|
else
|
|
d2 = text("<A href='?src=\ref[];time=1'>[]</A>", src, stars("Initiate Time Lock"))
|
|
var/second = src.time % 60
|
|
var/minute = (src.time - second) / 60
|
|
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>[]</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", stars("Party Button"), d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
|
user << browse(dat, "window=partyalarm")
|
|
onclose(user, "partyalarm")
|
|
return
|
|
|
|
/obj/machinery/partyalarm/proc/reset()
|
|
if (!( src.working ))
|
|
return
|
|
var/area/A = src.loc
|
|
A = A.loc
|
|
if (!( istype(A, /area) ))
|
|
return
|
|
A.partyreset()
|
|
return
|
|
|
|
/obj/machinery/partyalarm/proc/alarm()
|
|
if (!( src.working ))
|
|
return
|
|
var/area/A = src.loc
|
|
A = A.loc
|
|
if (!( istype(A, /area) ))
|
|
return
|
|
A.partyalert()
|
|
return
|
|
|
|
/obj/machinery/partyalarm/Topic(href, href_list)
|
|
..()
|
|
if (usr.stat || stat & (BROKEN|NOPOWER))
|
|
return
|
|
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
|
|
usr.machine = src
|
|
if (href_list["reset"])
|
|
src.reset()
|
|
else
|
|
if (href_list["alarm"])
|
|
src.alarm()
|
|
else
|
|
if (href_list["time"])
|
|
src.timing = text2num(href_list["time"])
|
|
else
|
|
if (href_list["tp"])
|
|
var/tp = text2num(href_list["tp"])
|
|
src.time += tp
|
|
src.time = min(max(round(src.time), 0), 120)
|
|
src.updateUsrDialog()
|
|
|
|
src.add_fingerprint(usr)
|
|
else
|
|
usr << browse(null, "window=partyalarm")
|
|
return
|
|
return
|