From fb619648a9a214a649194e5ea928771cf9426238 Mon Sep 17 00:00:00 2001 From: Couls Date: Fri, 3 May 2019 22:28:04 -0400 Subject: [PATCH] Resolve conflicts --- .../MetaStation/MetaStation.v41A.II.dmm | 2 +- _maps/map_files/RandomZLevels/spacehotel.dmm | 6 - .../RandomZLevels/stationCollision.dmm | 2 +- .../map_files/RandomZLevels/terrorspiders.dmm | 2 +- _maps/map_files/cyberiad/cyberiad.dmm | 649 +++---- _maps/map_files/cyberiad/z2.dmm | 297 +-- _maps/map_files/shuttles/admin_admin.dmm | 1094 ++++++++++++ _maps/map_files/shuttles/admin_hospital.dmm | 1589 +++++++++++++++++ .../components/binary_devices/pump.dm | 50 +- .../components/binary_devices/volume_pump.dm | 50 +- .../components/trinary_devices/filter.dm | 53 +- .../components/trinary_devices/mixer.dm | 54 +- code/__DEFINES/combat.dm | 6 - code/__DEFINES/misc.dm | 66 +- code/__DEFINES/mobs.dm | 7 + code/__DEFINES/snpc.dm | 23 - code/__HELPERS/lists.dm | 15 +- code/__HELPERS/mobs.dm | 2 +- code/__HELPERS/text.dm | 9 +- code/_globalvars/configuration.dm | 2 +- code/_globalvars/lists/mobs.dm | 3 +- code/_globalvars/lists/objects.dm | 1 - code/_globalvars/misc.dm | 3 + code/_globalvars/station.dm | 3 - code/_onclick/ai.dm | 4 +- code/_onclick/click.dm | 4 + code/_onclick/hud/action_button.dm | 24 +- code/controllers/Processes/npcai.dm | 41 - code/controllers/configuration.dm | 29 +- code/controllers/subsystem/idlenpcpool.dm | 41 + code/controllers/subsystem/jobs.dm | 83 + code/controllers/subsystem/machinery.dm | 24 - code/controllers/subsystem/mobs.dm | 7 +- code/controllers/subsystem/npcai.dm | 24 - code/controllers/subsystem/npcpool.dm | 140 +- code/controllers/verbs.dm | 6 +- code/datums/action.dm | 14 + code/datums/diseases/critical.dm | 4 +- code/datums/mind.dm | 1 + code/datums/outfits/outfit.dm | 9 +- code/datums/outfits/outfit_admin.dm | 8 +- code/datums/shuttles.dm | 15 + code/datums/supplypacks.dm | 6 + code/datums/uplink_item.dm | 41 +- code/game/area/Space Station 13 areas.dm | 7 +- code/game/atoms_movable.dm | 12 +- code/game/gamemodes/blob/blobs/core.dm | 7 +- code/game/gamemodes/blob/blobs/factory.dm | 7 +- code/game/gamemodes/blob/blobs/resource.dm | 8 +- code/game/gamemodes/blob/powers.dm | 15 +- code/game/gamemodes/gameticker.dm | 6 + .../gamemodes/miniantags/abduction/gland.dm | 63 - .../gamemodes/miniantags/revenant/revenant.dm | 10 + code/game/jobs/job/job.dm | 9 + code/game/jobs/job_exp.dm | 10 +- code/game/machinery/atmoalter/canister.dm | 10 +- .../atmoalter/portable_atmospherics.dm | 51 +- code/game/machinery/atmoalter/pump.dm | 14 + .../game/machinery/computer/buildandrepair.dm | 11 + code/game/machinery/computer/card.dm | 82 +- code/game/machinery/computer/power.dm | 2 +- code/game/machinery/doors/windowdoor.dm | 7 +- code/game/machinery/pipe/pipe_dispenser.dm | 46 +- code/game/machinery/syndicatebeacon.dm | 8 +- code/game/machinery/telecomms/ntsl2.dm | 184 +- code/game/machinery/vending.dm | 2 + .../game/objects/effects/spawners/lootdrop.dm | 4 +- .../effects/spawners/random_spawners.dm | 2 +- code/game/objects/items.dm | 29 +- code/game/objects/items/dehy_carp.dm | 2 +- code/game/objects/items/devices/flashlight.dm | 3 + code/game/objects/items/devices/megaphone.dm | 2 +- code/game/objects/items/devices/powersink.dm | 186 +- .../game/objects/items/devices/radio/radio.dm | 1 - code/game/objects/items/devices/voice.dm | 44 + .../items/stacks/sheets/sheet_types.dm | 1 + code/game/objects/items/stacks/stack.dm | 6 +- code/game/objects/items/toys.dm | 26 + code/game/objects/items/weapons/cards_ids.dm | 15 + code/game/objects/items/weapons/dice.dm | 7 +- .../objects/items/weapons/dna_injector.dm | 23 + code/game/objects/items/weapons/legcuffs.dm | 7 + .../objects/items/weapons/storage/backpack.dm | 3 +- .../objects/items/weapons/storage/belt.dm | 16 +- .../objects/items/weapons/storage/storage.dm | 1 + .../items/weapons/storage/uplink_kits.dm | 29 +- .../structures/crates_lockers/crittercrate.dm | 4 + code/game/objects/structures/extinguisher.dm | 28 + code/game/objects/structures/grille.dm | 4 +- code/game/world.dm | 57 +- code/modules/admin/admin.dm | 7 +- code/modules/admin/admin_verbs.dm | 30 - code/modules/admin/player_panel.dm | 28 +- .../admin/verbs/infiltratorteam_syndicate.dm | 2 +- code/modules/arcade/arcade_prize.dm | 4 +- code/modules/arcade/prize_datums.dm | 4 +- .../awaymissions/mission_code/spacehotel.dm | 26 +- .../mission_code/spacehotel_npcs.dm | 132 -- code/modules/awaymissions/snpc.dm | 85 - code/modules/client/client defines.dm | 2 +- code/modules/client/client procs.dm | 21 +- code/modules/clothing/clothing.dm | 63 +- code/modules/clothing/masks/gasmask.dm | 5 - code/modules/clothing/masks/voice.dm | 38 - code/modules/clothing/shoes/miscellaneous.dm | 18 - .../spacesuits/rig/modules/utility.dm | 13 +- code/modules/clothing/suits/miscellaneous.dm | 11 +- code/modules/clothing/under/chameleon.dm | 522 +++++- code/modules/clothing/under/miscellaneous.dm | 1 + code/modules/crafting/recipes.dm | 4 +- code/modules/customitems/item_defines.dm | 14 +- code/modules/events/blob.dm | 4 +- code/modules/flufftext/Hallucination.dm | 4 +- code/modules/hydroponics/biogenerator.dm | 4 +- code/modules/mining/minebot.dm | 2 +- code/modules/mining/satchel_ore_boxdm.dm | 3 + code/modules/mob/dead/dead.dm | 1 + code/modules/mob/dead/observer/observer.dm | 9 +- .../mob/living/carbon/human/examine.dm | 10 +- code/modules/mob/living/carbon/human/human.dm | 18 +- .../carbon/human/interactive/functions.dm | 874 --------- .../carbon/human/interactive/interactive.dm | 960 ---------- .../carbon/human/interactive/prefabs.dm | 24 - code/modules/mob/living/carbon/human/life.dm | 17 + code/modules/mob/living/carbon/human/say.dm | 22 +- .../mob/living/carbon/human/update_icons.dm | 8 +- code/modules/mob/living/life.dm | 9 + code/modules/mob/living/living.dm | 21 + code/modules/mob/living/login.dm | 4 + code/modules/mob/living/logout.dm | 1 + code/modules/mob/living/silicon/ai/ai.dm | 8 +- code/modules/mob/living/silicon/death.dm | 6 + .../modules/mob/living/silicon/pai/recruit.dm | 8 +- .../mob/living/silicon/robot/component.dm | 51 +- .../mob/living/silicon/robot/drone/drone.dm | 6 +- .../modules/mob/living/silicon/robot/robot.dm | 23 +- .../mob/living/silicon/robot/robot_damage.dm | 72 +- .../mob/living/silicon/robot/robot_defense.dm | 4 +- code/modules/mob/living/silicon/silicon.dm | 1 + .../living/simple_animal/bot/construction.dm | 63 +- .../mob/living/simple_animal/bot/floorbot.dm | 33 +- .../living/simple_animal/friendly/corgi.dm | 4 +- .../living/simple_animal/friendly/mouse.dm | 3 +- .../mob/living/simple_animal/friendly/pug.dm | 2 +- .../mob/living/simple_animal/hostile/carp.dm | 33 +- .../living/simple_animal/hostile/hostile.dm | 50 +- .../simple_animal/hostile/mining_mobs.dm | 2 +- .../simple_animal/hostile/retaliate/fish.dm | 29 +- .../mob/living/simple_animal/simple_animal.dm | 62 +- .../mob/living/simple_animal/spawner.dm | 2 +- code/modules/mob/login.dm | 4 +- code/modules/mob/mob.dm | 14 +- code/modules/mob/mob_defines.dm | 2 + code/modules/mob/new_player/new_player.dm | 52 +- .../computers/item/computer_power.dm | 4 +- .../file_system/programs/command/card.dm | 58 +- .../programs/engineering/power_monitor.dm | 2 +- .../modular_computers/hardware/recharger.dm | 2 +- code/modules/ninja/suit/mask.dm | 12 +- code/modules/ninja/suit/suit.dm | 4 +- code/modules/paperwork/clipboard.dm | 6 +- code/modules/paperwork/photography.dm | 7 +- code/modules/paperwork/stamps.dm | 24 - code/modules/pda/cart_apps.dm | 2 +- code/modules/power/apc.dm | 80 +- code/modules/power/cable.dm | 257 +-- code/modules/power/gravitygenerator.dm | 4 +- code/modules/power/power.dm | 156 +- code/modules/power/powernet.dm | 99 +- code/modules/power/singularity/collector.dm | 4 +- code/modules/power/singularity/emitter.dm | 100 +- .../power/singularity/field_generator.dm | 4 +- .../particle_accelerator/particle.dm | 56 +- .../particle_accelerator/particle_control.dm | 4 +- .../particle_accelerator/particle_emitter.dm | 21 +- .../particle_accelerator/particle_power.dm | 6 +- code/modules/power/smes.dm | 119 +- code/modules/power/solar.dm | 9 +- code/modules/power/switch.dm | 84 - code/modules/power/terminal.dm | 19 +- code/modules/power/tesla/coil.dm | 10 +- code/modules/power/tracker.dm | 19 +- code/modules/power/treadmill.dm | 9 +- code/modules/power/turbine.dm | 16 +- .../chemistry/machinery/chem_dispenser.dm | 2 + .../chemistry/machinery/chem_heater.dm | 6 +- .../chemistry/machinery/chem_master.dm | 2 + .../reagents/chemistry/reagents/blob.dm | 6 +- .../research/designs/autolathe_designs.dm | 8 + .../research/designs/biogenerator_designs.dm | 10 +- code/modules/shuttle/on_move.dm | 13 +- code/modules/shuttle/shuttle.dm | 23 +- code/modules/shuttle/syndicate.dm | 2 +- .../surgery/organs/augments_internal.dm | 12 +- code/modules/surgery/organs/organ_internal.dm | 2 + config/example/config.txt | 14 +- html/changelog.html | 231 +++ html/changelogs/.all_changelog.yml | 253 +++ html/changelogs/AutoChangeLog-pr-10327.yml | 9 - html/changelogs/AutoChangeLog-pr-11102.yml | 5 - html/changelogs/AutoChangeLog-pr-11214.yml | 4 - html/changelogs/AutoChangeLog-pr-11217.yml | 4 - html/changelogs/AutoChangeLog-pr-11224.yml | 4 - html/changelogs/AutoChangeLog-pr-11227.yml | 7 - html/changelogs/AutoChangeLog-pr-11230.yml | 5 - html/changelogs/AutoChangeLog-pr-11231.yml | 6 - html/changelogs/AutoChangeLog-pr-11243.yml | 4 - html/changelogs/AutoChangeLog-pr-11253.yml | 5 - html/changelogs/AutoChangeLog-pr-11255.yml | 6 - html/changelogs/AutoChangeLog-pr-11257.yml | 4 - html/changelogs/AutoChangeLog-pr-11259.yml | 13 - html/changelogs/AutoChangeLog-pr-11270.yml | 4 - html/changelogs/AutoChangeLog-pr-11277.yml | 4 - html/changelogs/AutoChangeLog-pr-11278.yml | 4 - html/changelogs/AutoChangeLog-pr-11279.yml | 4 - html/changelogs/AutoChangeLog-pr-11280.yml | 4 - html/changelogs/AutoChangeLog-pr-11282.yml | 5 - html/changelogs/AutoChangeLog-pr-11283.yml | 4 - html/changelogs/AutoChangeLog-pr-11284.yml | 6 - html/changelogs/AutoChangeLog-pr-11285.yml | 8 - html/changelogs/AutoChangeLog-pr-11287.yml | 6 - html/changelogs/AutoChangeLog-pr-11288.yml | 4 - html/changelogs/AutoChangeLog-pr-11292.yml | 5 - html/changelogs/AutoChangeLog-pr-11294.yml | 4 - html/changelogs/AutoChangeLog-pr-11296.yml | 4 - html/changelogs/AutoChangeLog-pr-11297.yml | 9 - html/changelogs/AutoChangeLog-pr-11298.yml | 5 - html/changelogs/AutoChangeLog-pr-11300.yml | 5 - html/changelogs/AutoChangeLog-pr-11301.yml | 7 - html/changelogs/AutoChangeLog-pr-11305.yml | 4 - html/changelogs/AutoChangeLog-pr-11310.yml | 4 - html/changelogs/AutoChangeLog-pr-11313.yml | 4 - html/changelogs/AutoChangeLog-pr-11314.yml | 4 - html/changelogs/AutoChangeLog-pr-11317.yml | 4 - html/changelogs/AutoChangeLog-pr-11318.yml | 4 - html/changelogs/AutoChangeLog-pr-11320.yml | 4 - html/changelogs/AutoChangeLog-pr-11328.yml | 5 - html/changelogs/AutoChangeLog-pr-11329.yml | 4 - html/changelogs/AutoChangeLog-pr-11331.yml | 4 - html/changelogs/AutoChangeLog-pr-11332.yml | 4 - html/changelogs/AutoChangeLog-pr-11333.yml | 4 - html/changelogs/AutoChangeLog-pr-11336.yml | 4 - html/changelogs/AutoChangeLog-pr-11339.yml | 4 - html/changelogs/AutoChangeLog-pr-11350.yml | 5 - html/changelogs/AutoChangeLog-pr-11355.yml | 4 - html/changelogs/AutoChangeLog-pr-11360.yml | 6 - html/changelogs/AutoChangeLog-pr-11361.yml | 4 - html/changelogs/AutoChangeLog-pr-11362.yml | 4 - html/changelogs/AutoChangeLog-pr-11364.yml | 4 - html/changelogs/AutoChangeLog-pr-11367.yml | 4 - html/changelogs/AutoChangeLog-pr-11384.yml | 4 + html/changelogs/AutoChangeLog-pr-11403.yml | 4 + html/changelogs/AutoChangeLog-pr-11415.yml | 4 + html/changelogs/AutoChangeLog-pr-11416.yml | 4 + html/changelogs/AutoChangeLog-pr-11418.yml | 4 + html/changelogs/AutoChangeLog-pr-11425.yml | 5 + html/changelogs/AutoChangeLog-pr-11426.yml | 5 + html/changelogs/AutoChangeLog-pr-11428.yml | 5 + html/changelogs/AutoChangeLog-pr-11429.yml | 4 + html/changelogs/AutoChangeLog-pr-11431.yml | 4 + html/changelogs/AutoChangeLog-pr-11434.yml | 4 + html/changelogs/AutoChangeLog-pr-11442.yml | 6 + html/changelogs/AutoChangeLog-pr-11443.yml | 4 + html/changelogs/AutoChangeLog-pr-11445.yml | 4 + html/changelogs/AutoChangeLog-pr-11450.yml | 12 + html/changelogs/AutoChangeLog-pr-11451.yml | 4 + html/changelogs/__CHANGELOG_README.txt | 2 - icons/mob/actions/actions.dmi | Bin 93208 -> 96413 bytes icons/mob/animal.dmi | Bin 309843 -> 302856 bytes icons/mob/blob.dmi | Bin 486762 -> 856074 bytes icons/mob/carp.dmi | Bin 0 -> 19111 bytes icons/mob/inhands/clothing_lefthand.dmi | Bin 84261 -> 89934 bytes icons/mob/inhands/clothing_righthand.dmi | Bin 82900 -> 88599 bytes icons/mob/inhands/equipment/belt_lefthand.dmi | Bin 0 -> 4431 bytes .../mob/inhands/equipment/belt_righthand.dmi | Bin 0 -> 4428 bytes icons/mob/inhands/fluff_lefthand.dmi | Bin 3238 -> 3802 bytes icons/mob/inhands/fluff_righthand.dmi | Bin 3138 -> 3712 bytes icons/mob/inhands/items_lefthand.dmi | Bin 147870 -> 149965 bytes icons/mob/inhands/items_righthand.dmi | Bin 145335 -> 146549 bytes icons/mob/species/vox/uniform.dmi | Bin 296378 -> 309124 bytes icons/obj/aibots.dmi | Bin 72104 -> 73067 bytes icons/obj/custom_items.dmi | Bin 114560 -> 125908 bytes icons/obj/device.dmi | Bin 41315 -> 41577 bytes icons/obj/lighting.dmi | Bin 84153 -> 84404 bytes icons/obj/toy.dmi | Bin 73506 -> 75141 bytes nano/assets/nanoui.css | 4 +- nano/styles/_link.less | 23 +- nano/templates/card_prog.tmpl | 51 +- nano/templates/identification_computer.tmpl | 65 +- paradise.dme | 12 +- sound/voice/borg_deathsound.ogg | Bin 0 -> 18100 bytes sound/weapons/bolathrow.ogg | Bin 0 -> 10572 bytes strings/npc_chatter.json | 137 -- strings/revenant_names.json | 55 + tools/ss13_genchangelog.py | 9 +- 295 files changed, 6775 insertions(+), 4840 deletions(-) create mode 100644 _maps/map_files/shuttles/admin_admin.dmm create mode 100644 _maps/map_files/shuttles/admin_hospital.dmm delete mode 100644 code/__DEFINES/snpc.dm delete mode 100644 code/controllers/Processes/npcai.dm create mode 100644 code/controllers/subsystem/idlenpcpool.dm delete mode 100644 code/controllers/subsystem/npcai.dm create mode 100644 code/game/objects/items/devices/voice.dm delete mode 100644 code/modules/awaymissions/mission_code/spacehotel_npcs.dm delete mode 100644 code/modules/awaymissions/snpc.dm delete mode 100644 code/modules/clothing/masks/voice.dm delete mode 100644 code/modules/mob/living/carbon/human/interactive/functions.dm delete mode 100644 code/modules/mob/living/carbon/human/interactive/interactive.dm delete mode 100644 code/modules/mob/living/carbon/human/interactive/prefabs.dm delete mode 100644 code/modules/power/switch.dm delete mode 100644 html/changelogs/AutoChangeLog-pr-10327.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11102.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11214.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11217.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11224.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11227.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11230.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11231.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11243.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11253.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11255.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11257.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11259.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11270.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11277.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11278.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11279.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11280.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11282.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11283.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11284.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11285.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11287.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11288.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11292.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11294.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11296.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11297.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11298.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11300.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11301.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11305.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11310.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11313.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11314.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11317.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11318.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11320.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11328.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11329.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11331.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11332.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11333.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11336.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11339.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11350.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11355.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11360.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11361.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11362.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11364.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-11367.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11384.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11403.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11415.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11416.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11418.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11425.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11426.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11428.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11429.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11431.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11434.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11442.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11443.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11445.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11450.yml create mode 100644 html/changelogs/AutoChangeLog-pr-11451.yml create mode 100644 icons/mob/carp.dmi create mode 100644 icons/mob/inhands/equipment/belt_lefthand.dmi create mode 100644 icons/mob/inhands/equipment/belt_righthand.dmi create mode 100644 sound/voice/borg_deathsound.ogg create mode 100644 sound/weapons/bolathrow.ogg delete mode 100644 strings/npc_chatter.json create mode 100644 strings/revenant_names.json diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 1301895facd..0e64cefc7aa 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -11703,7 +11703,7 @@ }) "auD" = ( /obj/machinery/light_construct/small, -/obj/item/toolbox_tiles_sensor, +/obj/item/toolbox_tiles/sensor, /turf/simulated/floor/plating, /area/maintenance/fpmaint2{ name = "Port Maintenance" diff --git a/_maps/map_files/RandomZLevels/spacehotel.dmm b/_maps/map_files/RandomZLevels/spacehotel.dmm index 73d86c17201..56df786fab5 100644 --- a/_maps/map_files/RandomZLevels/spacehotel.dmm +++ b/_maps/map_files/RandomZLevels/spacehotel.dmm @@ -3125,7 +3125,6 @@ }, /area/awaymission/spacehotel/kitchen) "gE" = ( -/mob/living/carbon/human/interactive/away/hotel/chef, /turf/unsimulated/floor{ icon_state = "cafeteria" }, @@ -3278,7 +3277,6 @@ }, /area/awaymission/spacehotel) "ha" = ( -/mob/living/carbon/human/interactive/away/hotel/bartender, /turf/unsimulated/floor{ icon_state = "whiteyellowfull" }, @@ -4135,9 +4133,6 @@ /turf/unsimulated/floor/carpet, /area/awaymission/spacehotel) "jm" = ( -/obj/effect/spawner/snpc_squad{ - squad_type = /mob/living/carbon/human/interactive/away/hotel/guard - }, /turf/unsimulated/floor/carpet, /area/awaymission/spacehotel) "jn" = ( @@ -4489,7 +4484,6 @@ /obj/structure/chair{ dir = 8 }, -/mob/living/carbon/human/interactive/away/hotel/concierge, /turf/unsimulated/floor/carpet, /area/awaymission/spacehotel/reception) "kk" = ( diff --git a/_maps/map_files/RandomZLevels/stationCollision.dmm b/_maps/map_files/RandomZLevels/stationCollision.dmm index a8e3a533033..cc1767248cf 100644 --- a/_maps/map_files/RandomZLevels/stationCollision.dmm +++ b/_maps/map_files/RandomZLevels/stationCollision.dmm @@ -4123,7 +4123,7 @@ /turf/simulated/floor/plasteel, /area/awaymission/arrivalblock) "kG" = ( -/obj/item/clothing/shoes/syndigaloshes, +/obj/item/clothing/shoes/chameleon/noslip, /obj/item/clothing/under/syndicate, /obj/effect/decal/remains/human{ desc = "This guy seemed to have died in terrible way! Half his remains are dust."; diff --git a/_maps/map_files/RandomZLevels/terrorspiders.dmm b/_maps/map_files/RandomZLevels/terrorspiders.dmm index 1a64a0d7f0a..ed0bb019b83 100644 --- a/_maps/map_files/RandomZLevels/terrorspiders.dmm +++ b/_maps/map_files/RandomZLevels/terrorspiders.dmm @@ -13398,7 +13398,7 @@ /area/awaymission/UO71/loot) "zt" = ( /obj/structure/chair/wood/normal, -/obj/item/clothing/shoes/syndigaloshes, +/obj/item/clothing/shoes/chameleon/noslip, /turf/simulated/floor/carpet, /area/awaymission/UO71/loot) "zu" = ( diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 606fabcc4b5..7d2cc96b6fe 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -9787,6 +9787,7 @@ pixel_y = 2 }, /obj/item/stamp/law, +/obj/item/pen/multi, /turf/simulated/floor/plasteel{ tag = "icon-cult"; icon_state = "cult"; @@ -50860,7 +50861,7 @@ icon_state = "diagonalWall3" }, /area/shuttle/administration) -"bPM" = ( +"bPN" = ( /obj/machinery/door/airlock/external{ id_tag = "s_docking_airlock"; name = "Shuttle Hatch"; @@ -50873,25 +50874,17 @@ id = "admin"; name = "administration shuttle"; roundstart_move = "admin_away"; + timid = 1; width = 18 }, /obj/docking_port/stationary{ dir = 2; - dwidth = 8; - height = 15; + dwidth = 9; + height = 18; id = "admin_home"; name = "port bay 1"; - width = 18 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) -"bPN" = ( -/obj/machinery/door/airlock/external{ - id_tag = "s_docking_airlock"; - name = "Shuttle Hatch"; - req_access_txt = "106" + timid = 1; + width = 19 }, /turf/simulated/shuttle/floor{ icon_state = "floor4" @@ -52066,21 +52059,6 @@ icon_state = "wall3" }, /area/shuttle/administration) -"bRH" = ( -/obj/machinery/door_control{ - id = "adminshuttleblast"; - name = "blast door control"; - pixel_x = -30; - req_access_txt = "106" - }, -/obj/machinery/light{ - icon_state = "tube1"; - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "bRI" = ( /obj/structure/plasticflaps/mining, /obj/machinery/conveyor/east{ @@ -54158,28 +54136,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /turf/simulated/floor/plasteel, /area/engine/gravitygenerator) -"bVk" = ( -/obj/machinery/door_control{ - id = "adminshuttleblast"; - name = "blast door control"; - pixel_x = -30; - req_access_txt = "106" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) -"bVl" = ( -/obj/machinery/door/airlock/centcom{ - id_tag = "adminshuttle"; - name = "Workshop"; - opacity = 1; - req_access_txt = "105" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "bVm" = ( /obj/machinery/light/spot{ tag = "icon-tube1 (WEST)"; @@ -55149,14 +55105,6 @@ icon_state = "floor4" }, /area/shuttle/administration) -"bWO" = ( -/obj/structure/shuttle/engine/propulsion{ - dir = 8; - icon_state = "propulsion_l"; - tag = "icon-propulsion_l (EAST)" - }, -/turf/simulated/shuttle/plating, -/area/shuttle/administration) "bWP" = ( /obj/machinery/door/airlock/external{ id_tag = "s_docking_airlock"; @@ -56131,14 +56079,6 @@ icon_state = "floor4" }, /area/shuttle/administration) -"bYu" = ( -/obj/structure/shuttle/engine/propulsion{ - dir = 8; - icon_state = "propulsion_r"; - tag = "icon-propulsion_r (EAST)" - }, -/turf/simulated/shuttle/plating, -/area/shuttle/administration) "bYv" = ( /turf/space, /turf/simulated/shuttle/wall{ @@ -57421,17 +57361,6 @@ "cam" = ( /turf/simulated/wall, /area/quartermaster/miningdock) -"can" = ( -/obj/structure/table/reinforced, -/obj/machinery/light/spot{ - tag = "icon-tube1 (NORTH)"; - icon_state = "tube1"; - dir = 1 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "cao" = ( /obj/structure/filingcabinet, /turf/simulated/floor/plasteel, @@ -58235,23 +58164,6 @@ icon_state = "floor4" }, /area/shuttle/administration) -"cby" = ( -/obj/machinery/computer/shuttle/admin, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) -"cbz" = ( -/obj/machinery/door/airlock/centcom{ - id_tag = "adminshuttle"; - name = "Bridge"; - opacity = 1; - req_access_txt = "106" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "cbA" = ( /obj/machinery/door/poddoor/shutters{ density = 0; @@ -59504,18 +59416,9 @@ icon_state = "floor3" }, /area/shuttle/administration) -"cdq" = ( -/obj/machinery/computer/card/centcom, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "cdr" = ( -/obj/structure/table/reinforced, -/obj/machinery/door_control{ - id = "adminshuttleshutters"; - name = "remote shutter control"; - req_access_txt = "106" +/obj/machinery/computer/camera_advanced/shuttle_docker/admin{ + name = "NTV Argos shuttle navigation computer" }, /turf/simulated/shuttle/floor{ icon_state = "floor4" @@ -60289,17 +60192,6 @@ tag = "icon-cafeteria (NORTHEAST)" }, /area/crew_quarters/hor) -"ceT" = ( -/obj/machinery/door/airlock/centcom{ - id_tag = "adminshuttle"; - name = "Medbay"; - opacity = 1; - req_access_txt = "103" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/administration) "ceU" = ( /obj/structure/shuttle/engine/propulsion, /turf/simulated/shuttle/plating, @@ -96571,6 +96463,12 @@ }, /turf/simulated/floor/plating, /area/toxins/mixing) +"gQL" = ( +/obj/machinery/computer/card, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) "hsy" = ( /obj/machinery/atmospherics/pipe/simple/insulated{ dir = 4 @@ -96625,6 +96523,35 @@ /area/toxins/launch{ name = "Toxins Launch Room" }) +"jnJ" = ( +/obj/machinery/light/spot{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "Blast door control"; + pixel_x = -5; + pixel_y = 35; + req_access = list(101); + req_access_txt = "0" + }, +/obj/machinery/door_control{ + id = "adminshuttleshutters"; + name = "Shutter control"; + pixel_x = 5; + pixel_y = 35; + req_access = list(101); + req_access_txt = "0" + }, +/obj/structure/chair/comfy/black{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) "kOE" = ( /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction{ dir = 4 @@ -96638,22 +96565,90 @@ }, /turf/space, /area/space) +"oZV" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Medbay"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"pwN" = ( +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "blast door control"; + pixel_x = -30; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) "pZO" = ( /obj/machinery/atmospherics/pipe/simple/heat_exchanging{ dir = 10 }, /turf/space, /area/space) +"qgG" = ( +/obj/machinery/door/airlock/external{ + id_tag = "s_docking_airlock"; + name = "Shuttle Hatch"; + req_access_txt = "101" + }, +/obj/structure/fans/tiny, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) "qUv" = ( /obj/machinery/atmospherics/pipe/simple/heat_exchanging, /turf/space, /area/space) +"rEw" = ( +/obj/machinery/computer/shuttle/admin{ + name = "NTV Argos shuttle console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"rSv" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 8; + icon_state = "propulsion_l"; + tag = "icon-propulsion_l (EAST)" + }, +/turf/space, +/area/shuttle/administration) +"rYq" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Bridge"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) "uxy" = ( /obj/machinery/atmospherics/pipe/simple/heat_exchanging{ dir = 4 }, /turf/space, /area/space) +"uBM" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 8; + icon_state = "propulsion_r"; + tag = "icon-propulsion_r (EAST)" + }, +/turf/space, +/area/shuttle/administration) "uDK" = ( /obj/machinery/atmospherics/pipe/simple/heat_exchanging{ tag = "icon-intact (NORTHEAST)"; @@ -96684,6 +96679,32 @@ }, /turf/space, /area/space) +"yeP" = ( +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "blast door control"; + pixel_x = -30; + req_access_txt = "101" + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ylx" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Workshop"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) (1,1,1) = {" aaa @@ -105048,15 +105069,15 @@ aaa aaa aaa aaa +bPL +rSv +uBM +cae aaa -aaa -aaa -aaa -aaa -aaa -aaa -aaa -aaa +bPL +rSv +uBM +cae aaa aaa aaa @@ -105304,18 +105325,18 @@ aaa aaa aaa aaa -aaa bPL -bWO -bYu +bPI +bWG +bWG +bPI +bPI +bPI +bWG +bWG +bPI cae aaa -bPL -bWO -bYu -cae -aaa -aaa aaa aaa aaa @@ -105560,16 +105581,17 @@ aaa aaa aaa aaa -aaa bPL bPI -bWG -bWG +bVe +bRA +bRA +caf bPI -bPI -bPI -bWG -bWG +cdl +ceR +ceR +cig bPI cae aaa @@ -105678,7 +105700,6 @@ aaa aaa aaa aaa -aaa "} (36,1,1) = {" aaa @@ -105812,22 +105833,23 @@ bCd bCd bCd bAR -aaa -aaa +bjQ aaa aaa aaa bPL -bPI -bVe +bRu +bRA +bVf bRA bRA -caf +cag bPI -cdl +cdm ceR ceR -cig +ceR +ckd bPI cae aaa @@ -105935,7 +105957,6 @@ aaa aaa aaa aaa -aaa "} (37,1,1) = {" aaa @@ -106069,25 +106090,25 @@ bCc bDG bEK bAR -bjQ +aLd aaa aaa aaa -bPL -bRu -bRA -bVf -bRA -bRA -cag bPI -cdm -ceR -ceR -ceR -ckd +bRv +bRA +bVg +cuH +bRA +cah +bPI +cdp +ceR +ceR +ceR +ceR +clC bPI -cae aaa aaa aaa @@ -106326,24 +106347,24 @@ aAi bCb bCl bAR -aLd +aSd aaa aaa aaa bPI -bRv +bRw bRA -bVg +bVh cuH bRA -cah +cai bPI -cdp +cdl ceR +cgw +cih ceR -ceR -ceR -clC +clD bPI aaa aaa @@ -106588,19 +106609,19 @@ aaa aaa aaa bPI -bRw -bRA -bVh +bRx +bTl +bVi cuH bRA -cai +bRA bPI -cdl +cdo ceR -cgw -cih -ceR -clD +cgx +cii +ckf +clE bPI aaa aaa @@ -106841,23 +106862,23 @@ bCb bEL bAR aSd -aaa -aaa -aaa +aSd +aSd +aSd bPI -bRx -bTl -bVi -cuH -bRA -bRA -bPI -cdo -ceR -cgx -cii -ckf -clE +bRG +bRG +bRG +bRG +bYt +bRG +bRG +bRG +oZV +bRG +bRG +bRG +bRG bPI aaa aaa @@ -107098,23 +107119,23 @@ bCb bEL bAR aSd -aSd -aSd -aSd -bPI -bRG -bRG -bRG -bRG -bYt -bRG -bRG -bRG -ceT -bRG -bRG -bRG -bRG +bGm +bLY +bKp +qgG +yeP +bTn +pwN +bRA +bRA +bRA +bTo +bRA +bRA +bRA +bRA +bRA +bRA bPI aaa aaa @@ -107355,23 +107376,23 @@ bCb bEL bAR aSd -bGm -bLY +bGl +bLX bKp bPN -bRH +bRA bTn -bVk -bRA -bRA -bRA -bTo bRA bRA bRA bRA bRA bRA +bRA +bRA +bRA +bRA +clF bPI aaa aaa @@ -107612,23 +107633,23 @@ bCb bEL bAR aSd -bGl -bLX bKp -bPM -bRA -bTn -bRA -bRA -bRA -bRA -bRA -bRA -bRA -bRA -bRA -bRA -clF +bKp +bOb +bPI +bRG +bRG +ylx +bRG +bRG +bRG +rYq +bRG +bRG +bRG +cik +bRG +bRG bPI aaa aaa @@ -107869,23 +107890,23 @@ bCb bAR bER aSd -bKp -bKp -bOb +aMd +bLZ +aSd bPI -bRG -bRG -bVl -bRG -bRG -bRG -cbz -bRG -bRG -bRG -cik -bRG -bRG +bRB +bTo +bRA +bWI +bPI +gQL +bRA +bRA +bPI +bRA +bRA +ckg +clG bPI aaa aaa @@ -108130,19 +108151,19 @@ aMd bLZ aSd bPI -bRB -bTo +bRC bRA -bWI +bRA +bWJ +bPI +jnJ +cbx +cbx bPI bRA bRA bRA -bPI -bRA -bRA -ckg -clG +clI bPI aaa aaa @@ -108387,19 +108408,19 @@ aMd bLZ aSd bPI -bRC +bRD bRA bRA -bWJ +bWK bPI -can -cbx +cak +rEw cdr bPI bRA bRA bRA -clI +bRA bPI aaa aaa @@ -108643,21 +108664,21 @@ aSd aMd bMa bjQ +bPR bPI -bRD -bRA -bRA -bWK -bPI -cak -cby -cdq -bPI -bRA -bRA +bTp bRA bRA bPI +car +cbA +cds +bPI +cgz +cio +ckj +bPI +bYv aaa aaa aaa @@ -108900,21 +108921,21 @@ bLs bmS bMb aLd -bPR +aaa +bPI +bWL +bRA +bWM +bPI +aaa +aaa +aaa bPI -bTp bRA bRA +ckh bPI -car -cbA -cds -bPI -cgz -cio -ckj -bPI -bYv +aaa aaa aaa aaa @@ -109158,19 +109179,19 @@ aSf bLZ aSd aaa +bPR bPI -bWL -bRA -bWM +bTl +bWN bPI aaa aaa aaa bPI -bRA -bRA -ckh +cgA +cil bPI +bYv aaa aaa aaa @@ -109415,22 +109436,22 @@ aSf bMc aSd aaa +aaa bPR -bPI -bTl -bWN -bPI -aaa -aaa -aaa -bPI -cgA -cil -bPI +bRG +bRG bYv aaa aaa aaa +bPR +bRG +bRG +bYv +aaa +aaa +aaa +aaa aaa aaa aaa @@ -109673,17 +109694,17 @@ bCf bCf aaa aaa -bPR -bRG -bRG -bYv aaa aaa aaa -bPR -bRG -bRG -bYv +aaa +aaa +aaa +aaa +aaa +aaa +aaa +aaa aaa aaa aaa diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm index ee6ca15f83d..dda71eb7e09 100644 --- a/_maps/map_files/cyberiad/z2.dmm +++ b/_maps/map_files/cyberiad/z2.dmm @@ -8030,11 +8030,12 @@ "tH" = ( /obj/docking_port/stationary{ dir = 2; - dwidth = 8; - height = 15; + dwidth = 9; + height = 18; id = "admin_away"; name = "centcom bay 1"; - width = 18 + timid = 1; + width = 19 }, /turf/space, /area/space) @@ -8543,7 +8544,7 @@ pixel_y = 3 }, /obj/item/clothing/mask/gas/cyborg, -/obj/item/clothing/mask/gas/voice, +/obj/item/clothing/mask/chameleon, /obj/item/clothing/mask/balaclava{ pixel_x = 3; pixel_y = -3 @@ -8729,7 +8730,7 @@ /area/admin) "uY" = ( /obj/structure/rack, -/obj/item/clothing/under/chameleon/all{ +/obj/item/clothing/mask/chameleon{ pixel_x = -3; pixel_y = 3 }, @@ -9036,7 +9037,7 @@ pixel_y = 3 }, /obj/item/clothing/shoes/centcom, -/obj/item/clothing/shoes/syndigaloshes{ +/obj/item/clothing/shoes/chameleon/noslip{ pixel_x = 3; pixel_y = -3 }, @@ -12275,7 +12276,7 @@ "Hv" = ( /obj/structure/rack, /obj/item/katana/energy, -/obj/item/clothing/mask/gas/voice/space_ninja, +/obj/item/clothing/mask/gas/space_ninja, /turf/unsimulated/floor{ icon_state = "engine" }, @@ -35340,9 +35341,9 @@ wK wK wK wK -aN -aN -aN +wK +wK +wK aN aN aN @@ -35581,21 +35582,24 @@ aN aN cp cj -yt -yt -yt -cr aN aN -cr -yt -cr aN aN -cr -yt -yt -yt +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -35638,9 +35642,6 @@ aN aN aN aN -aN -aN -aN jZ kz kM @@ -35838,9 +35839,6 @@ aN aN cp cj -yt -yt -cr aN aN aN @@ -35850,9 +35848,15 @@ aN aN aN aN -cr -yt -yt +aN +aN +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -35918,9 +35922,6 @@ aN aN aN aN -aN -aN -aN "} (91,1,1) = {" aN @@ -36095,8 +36096,6 @@ aN aN cp cj -yt -cr aN aN aN @@ -36108,8 +36107,13 @@ aN aN aN aN -cr -yt +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -36152,9 +36156,6 @@ aN aN aN aN -aN -aN -aN jU kw kE @@ -36352,7 +36353,6 @@ aN aN cp cj -cr aN aN aN @@ -36366,7 +36366,11 @@ aN aN aN aN -cr +aN +aN +aN +aN +aN wK aN aN @@ -36408,9 +36412,6 @@ aN aN aN aN -aN -aN -aN jQ jW kD @@ -36624,6 +36625,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -36665,9 +36669,6 @@ aN aN aN aN -aN -aN -aN jP kt kx @@ -36881,6 +36882,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -36922,9 +36926,6 @@ aN aN aN aN -aN -aN -aN jS kv kx @@ -37138,6 +37139,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -37179,9 +37183,6 @@ aN aN aN aN -aN -aN -aN jR ku kx @@ -37395,6 +37396,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -37436,9 +37440,6 @@ aN aN aN aN -aN -aN -aN jT ka kA @@ -37652,6 +37653,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -37694,9 +37698,6 @@ aN aN aN aN -aN -aN -aN jZ kz kM @@ -37909,6 +37910,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -37974,9 +37978,6 @@ aN aN aN aN -aN -aN -aN "} (99,1,1) = {" aN @@ -38166,6 +38167,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -38231,9 +38235,6 @@ aN aN aN aN -aN -aN -aN "} (100,1,1) = {" aN @@ -38423,6 +38424,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -38488,9 +38492,6 @@ aN aN aN aN -aN -aN -aN "} (101,1,1) = {" aN @@ -38680,6 +38681,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -38713,9 +38717,6 @@ aN aN aN aN -aN -aN -aN mr mr mr @@ -38937,6 +38938,9 @@ aN aN aN aN +aN +aN +aN wK aN aN @@ -38970,9 +38974,6 @@ aN aN aN aN -aN -aN -aN mr aN aN @@ -39179,7 +39180,6 @@ qo qs tx wK -cr aN aN aN @@ -39193,7 +39193,11 @@ aN aN aN aN -cr +aN +aN +aN +aN +aN wK aN aN @@ -39227,9 +39231,6 @@ aN aN aN aN -aN -aN -aN mr aN aN @@ -39436,21 +39437,24 @@ qo qs tA wK -yt aN aN aN aN aN -yt -yt -yt aN aN aN aN aN -yt +aN +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -39484,9 +39488,6 @@ aN aN aN aN -aN -aN -aN mr aN aN @@ -39693,21 +39694,24 @@ tq tv tz wK -yt -cr aN aN aN aN -yt -yt -yt aN aN aN aN -cr -yt +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -39741,9 +39745,6 @@ aN aN aN aN -aN -aN -aN mr aN aN @@ -39950,21 +39951,24 @@ wK wK wK wK -yt -yt -cr aN aN -cr -yt -yt -yt -cr aN aN -cr -yt -yt +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN wK aN aN @@ -39998,9 +40002,6 @@ aN aN aN aN -aN -aN -aN mr aN aN @@ -40207,22 +40208,6 @@ aN aN aN wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK -wK aN aN aN @@ -40241,6 +40226,22 @@ aN aN aN aN +wK +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN aN aN aN @@ -40463,26 +40464,26 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK +wK aN aN aN diff --git a/_maps/map_files/shuttles/admin_admin.dmm b/_maps/map_files/shuttles/admin_admin.dmm new file mode 100644 index 00000000000..36badb71d1b --- /dev/null +++ b/_maps/map_files/shuttles/admin_admin.dmm @@ -0,0 +1,1094 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aa" = ( +/turf/space, +/area/space) +"ab" = ( +/turf/space, +/turf/simulated/shuttle/wall{ + dir = 8; + icon_state = "diagonalWall3" + }, +/area/shuttle/administration) +"ac" = ( +/turf/simulated/shuttle/wall{ + icon_state = "wall3" + }, +/area/shuttle/administration) +"ad" = ( +/obj/machinery/door/airlock/external{ + id_tag = "s_docking_airlock"; + name = "Shuttle Hatch"; + req_access_txt = "101" + }, +/obj/structure/fans/tiny, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ae" = ( +/obj/machinery/door/airlock/external{ + id_tag = "s_docking_airlock"; + name = "Shuttle Hatch"; + req_access_txt = "101" + }, +/obj/docking_port/mobile{ + dir = 2; + dwidth = 8; + height = 15; + id = "admin"; + name = "admin"; + roundstart_move = null; + timid = 1; + width = 18 + }, +/obj/structure/fans/tiny, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"af" = ( +/turf/space, +/turf/simulated/shuttle/wall{ + dir = 1; + icon_state = "diagonalWall3" + }, +/area/shuttle/administration) +"ag" = ( +/obj/machinery/vending/boozeomat, +/turf/simulated/shuttle/wall{ + icon_state = "wall3" + }, +/area/shuttle/administration) +"ah" = ( +/obj/structure/table/reinforced, +/obj/machinery/chem_dispenser/beer, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ai" = ( +/obj/structure/table/reinforced, +/obj/item/storage/box/drinkingglasses, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aj" = ( +/obj/structure/table/reinforced, +/obj/machinery/chem_dispenser/soda, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ak" = ( +/turf/simulated/shuttle/wall{ + dir = 4; + icon_state = "wall3" + }, +/area/shuttle/administration) +"al" = ( +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "blast door control"; + pixel_x = -30; + req_access_txt = "101" + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"am" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"an" = ( +/obj/machinery/cell_charger, +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ao" = ( +/obj/item/storage/toolbox/mechanical, +/obj/item/multitool, +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ap" = ( +/obj/structure/table, +/obj/machinery/recharger{ + pixel_y = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aq" = ( +/obj/machinery/light/spot{ + tag = "icon-tube1 (EAST)"; + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ar" = ( +/obj/machinery/door/poddoor/preopen{ + id_tag = "adminshuttleblast"; + name = "Blast Doors"; + req_access_txt = "101" + }, +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "General Access"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"as" = ( +/obj/machinery/light/spot{ + tag = "icon-tube1 (WEST)"; + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"at" = ( +/obj/item/stack/sheet/metal, +/obj/structure/table, +/obj/item/stack/sheet/glass{ + pixel_x = 4; + pixel_y = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"au" = ( +/obj/machinery/mecha_part_fabricator/upgraded, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"av" = ( +/obj/machinery/kitchen_machine/microwave/upgraded, +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aw" = ( +/obj/machinery/door/window/northright{ + name = "bar" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ax" = ( +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ay" = ( +/obj/item/ashtray/glass, +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"az" = ( +/obj/item/storage/fancy/cigarettes/dromedaryco, +/obj/item/lighter/zippo{ + pixel_x = 5 + }, +/obj/structure/table, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aA" = ( +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "blast door control"; + pixel_x = -30; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aB" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Workshop"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aC" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 8; + icon_state = "propulsion_l"; + tag = "icon-propulsion_l (EAST)" + }, +/turf/space, +/area/shuttle/administration) +"aD" = ( +/obj/structure/shuttle/engine/heater{ + tag = "icon-heater (WEST)"; + icon_state = "heater"; + dir = 8 + }, +/obj/structure/window/plasmareinforced{ + color = "#FF0000"; + dir = 4 + }, +/turf/simulated/shuttle/wall{ + icon_state = "wall3" + }, +/area/shuttle/administration) +"aE" = ( +/obj/structure/chair/stool/bar, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aF" = ( +/obj/structure/reagent_dispensers/fueltank, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aG" = ( +/obj/structure/reagent_dispensers/watertank, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aH" = ( +/obj/machinery/recharge_station/upgraded, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aI" = ( +/obj/machinery/autolathe/upgraded{ + hacked = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aJ" = ( +/obj/structure/dispenser, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aK" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 8; + icon_state = "propulsion_r"; + tag = "icon-propulsion_r (EAST)" + }, +/turf/space, +/area/shuttle/administration) +"aL" = ( +/obj/machinery/door/airlock/public/glass, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aM" = ( +/turf/space, +/turf/simulated/shuttle/wall{ + dir = 4; + icon_state = "diagonalWall3" + }, +/area/shuttle/administration) +"aN" = ( +/turf/space, +/turf/simulated/shuttle/wall{ + icon_state = "diagonalWall3" + }, +/area/shuttle/administration) +"aO" = ( +/obj/machinery/vending/snack, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aP" = ( +/obj/machinery/vending/cola, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aQ" = ( +/obj/machinery/vending/coffee, +/obj/machinery/light/spot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aR" = ( +/obj/machinery/vending/cigarette, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aS" = ( +/obj/machinery/computer/card, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aT" = ( +/obj/machinery/computer/communications, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aU" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 4; + icon_state = "open"; + id_tag = "adminshuttleshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/shuttle/window{ + tag = "icon-window5_end (WEST)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 8 + }, +/turf/simulated/floor/plating, +/area/shuttle/administration) +"aV" = ( +/obj/machinery/light/spot{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/obj/machinery/door_control{ + id = "adminshuttleblast"; + name = "Blast door control"; + pixel_x = -5; + pixel_y = 35; + req_access = list(101); + req_access_txt = "0" + }, +/obj/machinery/door_control{ + id = "adminshuttleshutters"; + name = "Shutter control"; + pixel_x = 5; + pixel_y = 35; + req_access = list(101); + req_access_txt = "0" + }, +/obj/structure/chair/comfy/black{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aW" = ( +/obj/structure/chair/comfy/black{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aX" = ( +/obj/machinery/computer/shuttle/admin{ + name = "NTV Argos shuttle console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aY" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 4; + icon_state = "open"; + id_tag = "adminshuttleshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/shuttle/window{ + dir = 4; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_mid"; + tag = "icon-window5 (EAST)" + }, +/turf/simulated/floor/plating, +/area/shuttle/administration) +"aZ" = ( +/obj/machinery/dna_scannernew/upgraded, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ba" = ( +/obj/machinery/computer/cloning, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bb" = ( +/obj/machinery/clonepod/upgraded, +/obj/machinery/light/spot{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bc" = ( +/obj/machinery/computer/scan_consolenew, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bd" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Bridge"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"be" = ( +/obj/machinery/computer/camera_advanced/shuttle_docker/admin{ + name = "NTV Argos shuttle navigation computer" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bf" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 4; + icon_state = "open"; + id_tag = "adminshuttleshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/shuttle/window{ + tag = "icon-window5_end (EAST)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 4 + }, +/turf/simulated/floor/plating, +/area/shuttle/administration) +"bg" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bh" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Medbay"; + opacity = 1; + req_access_txt = "101" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bi" = ( +/obj/machinery/bodyscanner, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bj" = ( +/obj/machinery/body_scanconsole, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bk" = ( +/obj/structure/window/plasmareinforced{ + color = "#FF0000"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bl" = ( +/obj/structure/chair{ + dir = 8 + }, +/obj/machinery/light/spot{ + tag = "icon-tube1 (EAST)"; + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bm" = ( +/obj/machinery/sleeper/upgraded{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bn" = ( +/obj/machinery/chem_master, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bo" = ( +/obj/machinery/chem_dispenser, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bp" = ( +/obj/machinery/door/airlock/centcom{ + id_tag = "adminshuttle"; + name = "Holding Cell"; + opacity = 1; + req_access_txt = "104" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bq" = ( +/obj/machinery/door/window/brigdoor/westleft{ + color = "#d70000"; + req_access_txt = "104" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"br" = ( +/obj/structure/chair{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bs" = ( +/obj/machinery/iv_drip, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bt" = ( +/obj/machinery/light/spot{ + tag = "icon-tube1 (EAST)"; + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bu" = ( +/obj/structure/table, +/obj/item/storage/box/handcuffs, +/obj/machinery/light/spot{ + tag = "icon-tube1 (WEST)"; + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bv" = ( +/obj/structure/window/plasmareinforced{ + color = "#FF0000"; + dir = 8 + }, +/obj/structure/chair{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bw" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bx" = ( +/obj/structure/table, +/obj/item/bonegel, +/obj/item/bonesetter, +/obj/item/hemostat, +/obj/item/cautery, +/obj/item/surgicaldrill, +/obj/item/circular_saw, +/obj/item/scalpel, +/obj/item/retractor, +/obj/item/FixOVein, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"by" = ( +/obj/machinery/optable, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bz" = ( +/obj/machinery/vending/medical, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bA" = ( +/obj/machinery/light, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bB" = ( +/obj/structure/table, +/obj/item/storage/lockbox/mindshield, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"bC" = ( +/obj/structure/table, +/obj/item/storage/box/chemimp{ + pixel_x = 4; + pixel_y = 3 + }, +/obj/item/storage/box/trackimp, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) + +(1,1,1) = {" +aa +aa +aa +ab +aC +aK +aN +aa +ab +aC +aK +aN +aa +aa +aa +aa +aa +aa +"} +(2,1,1) = {" +aa +aa +ab +ac +aD +aD +ac +ac +ac +aD +aD +ac +aN +aa +aa +aa +aa +aa +"} +(3,1,1) = {" +aa +ab +ac +av +am +am +aO +ac +aZ +bg +bg +bm +ac +aN +aa +aa +aa +aa +"} +(4,1,1) = {" +ab +ag +am +aw +am +am +aP +ac +ba +bg +bg +bg +bs +ac +aN +aa +aa +aa +"} +(5,1,1) = {" +ac +ah +am +ax +aE +am +aQ +ac +bb +bg +bg +bg +bg +bx +ac +aa +aa +aa +"} +(6,1,1) = {" +ac +ai +am +ay +aE +am +aR +ac +aZ +bg +bi +bn +bg +by +ac +aa +aa +aa +"} +(7,1,1) = {" +ac +aj +aq +az +aE +am +am +ac +bc +bg +bj +bo +bt +bz +ac +aa +aa +aa +"} +(8,1,1) = {" +ac +ak +ak +ak +ak +aL +ak +ak +ak +bh +ak +ak +ak +ak +ac +aa +aa +aa +"} +(9,1,1) = {" +ad +al +ar +aA +am +am +am +as +am +am +am +am +am +am +ac +aa +aa +aa +"} +(10,1,1) = {" +ae +am +ar +am +am +am +am +am +am +am +am +am +am +bA +ac +aa +aa +aa +"} +(11,1,1) = {" +ac +ak +ak +aB +ak +ak +ak +bd +ak +ak +ak +bp +ak +ak +ac +aa +aa +aa +"} +(12,1,1) = {" +ac +an +as +am +aF +ac +aS +am +am +ac +am +am +bu +bB +ac +aa +aa +aa +"} +(13,1,1) = {" +ac +ao +am +am +aG +ac +aV +aW +aW +ac +am +am +am +bC +ac +aa +aa +aa +"} +(14,1,1) = {" +ac +ap +am +am +aH +ac +aT +aX +be +ac +am +am +am +am +ac +aa +aa +aa +"} +(15,1,1) = {" +af +ac +at +am +am +ac +aU +aY +bf +ac +bk +bq +bv +ac +aM +aa +aa +aa +"} +(16,1,1) = {" +aa +ac +au +am +aI +ac +aa +aa +aa +ac +am +am +bw +ac +aa +aa +aa +aa +"} +(17,1,1) = {" +aa +af +ac +aq +aJ +ac +aa +aa +aa +ac +bl +br +ac +aM +aa +aa +aa +aa +"} +(18,1,1) = {" +aa +aa +af +ak +ak +aM +aa +aa +aa +af +ak +ak +aM +aa +aa +aa +aa +aa +"} +(19,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} diff --git a/_maps/map_files/shuttles/admin_hospital.dmm b/_maps/map_files/shuttles/admin_hospital.dmm new file mode 100644 index 00000000000..2c2d31a0bb4 --- /dev/null +++ b/_maps/map_files/shuttles/admin_hospital.dmm @@ -0,0 +1,1589 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aa" = ( +/turf/space, +/area/space) +"ab" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall_s6"; + dir = 2 + }, +/area/shuttle/administration) +"ac" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/administration) +"ad" = ( +/obj/structure/shuttle/window{ + tag = "icon-window5_end"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 2 + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"ae" = ( +/obj/structure/shuttle/window{ + tag = "icon-window5_mid"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_mid"; + dir = 2 + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"af" = ( +/obj/structure/shuttle/window{ + tag = "icon-window5_end (NORTH)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 1 + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"ag" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall14"; + dir = 2 + }, +/area/shuttle/administration) +"ah" = ( +/obj/structure/sign/redcross{ + desc = "The Star of Life, a symbol of Medical Aid."; + icon_state = "lifestar"; + name = "NHV Asclepius" + }, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall8"; + tag = "icon-swall12" + }, +/area/shuttle/administration) +"ai" = ( +/obj/structure/fans/tiny, +/obj/machinery/door/airlock/external, +/obj/machinery/door/poddoor{ + density = 0; + icon_state = "open"; + id_tag = "asclblast"; + name = "Blast Door"; + opacity = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aj" = ( +/obj/structure/fans/tiny, +/obj/machinery/door/airlock/external, +/obj/docking_port/mobile{ + dir = 2; + dwidth = 9; + height = 18; + id = "admin"; + name = "hospital"; + roundstart_move = "cc_bay_1"; + timid = 1; + width = 19 + }, +/obj/machinery/door/poddoor{ + density = 0; + icon_state = "open"; + id_tag = "asclblast"; + name = "Blast Door"; + opacity = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ak" = ( +/obj/structure/sign/redcross{ + desc = "The Star of Life, a symbol of Medical Aid."; + icon_state = "lifestar"; + name = "NHV Asclepius" + }, +/turf/simulated/shuttle/wall{ + tag = "icon-swall14"; + icon_state = "swall4"; + dir = 2 + }, +/area/shuttle/administration) +"al" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/shuttle/window{ + tag = "icon-window5_mid"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_mid"; + dir = 2 + }, +/turf/space, +/area/shuttle/administration) +"am" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/shuttle/window{ + tag = "icon-window5_end (NORTH)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 1 + }, +/turf/space, +/area/shuttle/administration) +"an" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall_s10"; + dir = 2 + }, +/area/shuttle/administration) +"ao" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall3"; + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/administration) +"ap" = ( +/obj/machinery/chem_master, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aq" = ( +/obj/machinery/chem_dispenser, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ar" = ( +/obj/machinery/chem_heater, +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"as" = ( +/obj/structure/closet/secure_closet/reagents, +/obj/item/storage/bag/chemistry, +/obj/item/storage/bag/chemistry, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"at" = ( +/obj/structure/closet/secure_closet/chemical, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"au" = ( +/obj/structure/sign/chemistry{ + pixel_y = 1 + }, +/turf/simulated/shuttle/wall{ + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/administration) +"av" = ( +/obj/structure/chair{ + tag = "icon-chair (EAST)"; + icon_state = "chair"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aw" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ax" = ( +/obj/structure/chair{ + dir = 8 + }, +/obj/machinery/camera{ + dir = 8; + icon_state = "camera"; + name = "NHV Asclepius Lobby"; + network = list("NHV Asclepius") + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ay" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/glass/beaker/cryoxadone, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"az" = ( +/obj/machinery/clonepod{ + biomass = 300 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aA" = ( +/obj/machinery/computer/cloning, +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aB" = ( +/obj/machinery/dna_scannernew, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aC" = ( +/obj/machinery/atmospherics/unary/cryo_cell, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aD" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall7"; + dir = 2 + }, +/area/shuttle/administration) +"aE" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/administration) +"aF" = ( +/obj/structure/reagent_dispensers/fueltank/chem{ + pixel_x = -32 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aG" = ( +/obj/structure/chair/office/light{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aH" = ( +/obj/structure/table/reinforced, +/obj/machinery/door/window/brigdoor/westleft{ + req_access_txt = "33" + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aI" = ( +/obj/machinery/light{ + dir = 4; + icon_state = "tube1" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aJ" = ( +/obj/structure/sign/nosmoking_2, +/turf/simulated/shuttle/wall{ + tag = "icon-swall1"; + icon_state = "swall1"; + dir = 2 + }, +/area/shuttle/administration) +"aK" = ( +/obj/machinery/atmospherics/pipe/simple/hidden, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aL" = ( +/obj/structure/shuttle/engine/heater{ + icon_state = "heater"; + dir = 4 + }, +/obj/structure/window/plasmareinforced{ + dir = 8 + }, +/turf/unsimulated/floor, +/area/shuttle/administration) +"aM" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 4; + icon_state = "propulsion" + }, +/turf/space, +/area/shuttle/administration) +"aN" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/dropper, +/obj/item/reagent_containers/spray/cleaner{ + desc = "Someone has crossed out the 'Space' from Space Cleaner and written in Chemistry. Scrawled on the back is, 'Okay, whoever filled this with polytrinic acid, it was only funny the first time. It was hard enough replacing the CMO's first cat!'"; + name = "Chemistry Cleaner" + }, +/obj/item/reagent_containers/glass/bucket, +/obj/item/reagent_containers/glass/bucket, +/obj/item/reagent_containers/glass/bucket, +/obj/item/reagent_containers/glass/bucket, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aO" = ( +/obj/structure/closet/crate/can, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aP" = ( +/obj/structure/shuttle/window, +/obj/structure/grille, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aQ" = ( +/obj/structure/chair{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aR" = ( +/obj/structure/chair{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aS" = ( +/obj/structure/table/reinforced, +/obj/item/storage/box/syringes, +/obj/item/storage/box/beakers, +/obj/machinery/reagentgrinder, +/obj/machinery/camera{ + dir = 4; + icon_state = "camera"; + name = "NHV Asclepius Chemistry"; + network = list("NHV Asclepius") + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aT" = ( +/obj/machinery/door/airlock/shuttle/glass{ + name = "Chemistry"; + req_access_txt = "33" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aU" = ( +/obj/machinery/door/airlock/shuttle/glass, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aV" = ( +/obj/machinery/camera{ + dir = 8; + icon_state = "camera"; + name = "NHV Asclepius Cloning"; + network = list("NHV Asclepius") + }, +/obj/machinery/atmospherics/pipe/simple/hidden, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aW" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall_s9"; + dir = 2 + }, +/area/shuttle/administration) +"aX" = ( +/obj/machinery/iv_drip, +/obj/item/reagent_containers/iv_bag, +/obj/structure/reagent_dispensers/fueltank/chem{ + pixel_x = -32 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aY" = ( +/obj/structure/chair/office/light, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"aZ" = ( +/obj/machinery/atmospherics/pipe/simple/hidden{ + dir = 6 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ba" = ( +/obj/machinery/chem_heater, +/obj/machinery/light, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bb" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/administration) +"bc" = ( +/obj/structure/reagent_dispensers/water_cooler, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bd" = ( +/obj/machinery/vending/coffee, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"be" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/spray/cleaner, +/obj/item/storage/box/gloves, +/obj/item/storage/box/masks, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bf" = ( +/obj/machinery/atmospherics/pipe/manifold/hidden{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bg" = ( +/obj/structure/table/reinforced, +/obj/item/storage/firstaid, +/obj/item/storage/firstaid, +/obj/item/storage/firstaid/adv, +/obj/item/storage/firstaid/adv, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bh" = ( +/obj/structure/table/reinforced, +/obj/item/storage/belt/medical, +/obj/item/storage/belt/medical, +/obj/item/storage/belt/medical, +/obj/item/clothing/glasses/hud/health, +/obj/item/clothing/glasses/hud/health, +/obj/item/clothing/glasses/hud/health, +/obj/machinery/light, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bi" = ( +/obj/machinery/atmospherics/unary/cold_sink/freezer{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bj" = ( +/obj/machinery/smartfridge/medbay, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bk" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall13"; + icon_state = "swall13"; + dir = 2 + }, +/area/shuttle/administration) +"bl" = ( +/obj/structure/shuttle/window, +/obj/structure/grille, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall8"; + tag = "icon-swall12" + }, +/area/shuttle/administration) +"bm" = ( +/obj/structure/shuttle/window, +/obj/structure/grille, +/turf/simulated/shuttle/wall{ + tag = "icon-swall14"; + icon_state = "swall4"; + dir = 2 + }, +/area/shuttle/administration) +"bn" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall15"; + icon_state = "swall15"; + dir = 2 + }, +/area/shuttle/administration) +"bo" = ( +/obj/structure/shuttle/window{ + tag = "icon-window5_end (WEST)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 8 + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 8; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"bp" = ( +/obj/machinery/computer/pandemic, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bq" = ( +/obj/machinery/camera{ + c_tag = "Tech Storage"; + dir = 2; + name = "NHV Asclepius Command Center"; + network = list("NHV Asclepius") + }, +/obj/structure/chair{ + dir = 8 + }, +/obj/machinery/door_control{ + dir = 4; + id = "Asclshutters"; + name = "remote shutter control"; + pixel_x = -5; + pixel_y = 35; + req_access = list(101); + req_access_txt = "0" + }, +/obj/machinery/keycard_auth{ + pixel_y = 24 + }, +/obj/machinery/door_control{ + dir = 2; + id = "asclblast"; + name = "blast door control"; + pixel_x = 5; + pixel_y = 35; + pixel_z = 0; + req_access = list(101); + req_access_txt = "0" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"br" = ( +/obj/machinery/recharger/wallcharger{ + pixel_y = 25 + }, +/obj/machinery/recharger/wallcharger{ + pixel_y = 35 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bs" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall1"; + icon_state = "swall1"; + dir = 2 + }, +/area/shuttle/administration) +"bt" = ( +/obj/structure/sink{ + icon_state = "sink"; + dir = 8; + pixel_x = -12; + pixel_y = 2 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bu" = ( +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/obj/structure/closet/walllocker/emerglocker{ + pixel_y = 32 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bv" = ( +/obj/machinery/vending/medical, +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bw" = ( +/obj/structure/table/tray, +/obj/item/stack/medical/bruise_pack/advanced, +/obj/item/scalpel, +/obj/item/hemostat, +/obj/item/retractor, +/obj/item/circular_saw, +/obj/item/bonegel, +/obj/item/bonesetter, +/obj/item/cautery, +/obj/item/FixOVein, +/obj/item/surgicaldrill, +/obj/item/storage/backpack/duffel/medical, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bx" = ( +/obj/machinery/optable, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"by" = ( +/obj/machinery/computer/operating, +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bz" = ( +/obj/structure/closet/secure_closet/medical3, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bA" = ( +/obj/structure/closet/secure_closet/medical2, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bB" = ( +/obj/structure/shuttle/window{ + dir = 4; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_mid"; + tag = "icon-window5 (EAST)" + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 8; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"bC" = ( +/obj/machinery/computer/shuttle/admin{ + name = "NHV Asclepius shuttle console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bD" = ( +/obj/machinery/door/airlock/command{ + name = "Command Center"; + req_access = null; + req_access_txt = "19" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bE" = ( +/obj/structure/closet/crate/freezer, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bF" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall1"; + dir = 2 + }, +/area/shuttle/administration) +"bG" = ( +/obj/machinery/camera{ + dir = 4; + icon_state = "camera"; + name = "NHV Asclepius OR 1"; + network = list("NHV Asclepius") + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bH" = ( +/obj/machinery/computer/camera_advanced/shuttle_docker/admin{ + name = "NHV Asclepius navigation computer" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bI" = ( +/obj/machinery/door/airlock/shuttle/glass{ + name = "Operating Room"; + req_access = null; + req_access_txt = "45" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bJ" = ( +/obj/structure/sink{ + dir = 4; + icon_state = "sink"; + pixel_x = 11; + pixel_y = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bK" = ( +/obj/structure/shuttle/window{ + tag = "icon-window5_end (EAST)"; + icon = 'icons/turf/shuttle.dmi'; + icon_state = "window5_end"; + dir = 4 + }, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 8; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/turf/space, +/area/shuttle/administration) +"bL" = ( +/obj/machinery/computer/communications{ + name = "NHV Asclepius Communications Console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bM" = ( +/obj/structure/chair{ + dir = 8 + }, +/obj/machinery/light, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bN" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall2"; + icon_state = "swall2"; + dir = 2 + }, +/area/shuttle/administration) +"bO" = ( +/obj/machinery/sleeper, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bP" = ( +/obj/machinery/sleeper{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bQ" = ( +/obj/structure/bed{ + name = "Triage: High Priority" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bR" = ( +/obj/machinery/bodyscanner, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bS" = ( +/obj/machinery/body_scanconsole, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bT" = ( +/obj/machinery/light, +/obj/structure/closet/crate/can, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bU" = ( +/obj/item/reagent_containers/spray/cleaner{ + desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; + name = "Surgery Cleaner" + }, +/obj/structure/table/glass, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bV" = ( +/obj/structure/closet/crate/freezer, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/obj/item/reagent_containers/iv_bag/blood/OMinus, +/obj/machinery/iv_drip, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"bW" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/administration) +"bX" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall13"; + dir = 2 + }, +/area/shuttle/administration) +"bY" = ( +/obj/structure/sign/examroom, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/administration) +"bZ" = ( +/obj/machinery/defibrillator_mount/loaded, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall8"; + tag = "icon-swall12" + }, +/area/shuttle/administration) +"ca" = ( +/obj/machinery/light{ + dir = 8 + }, +/obj/machinery/camera{ + dir = 5; + icon_state = "camera"; + name = "NHV Asclepius Central"; + network = list("NHV Asclepius") + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cb" = ( +/obj/machinery/light{ + dir = 4; + icon_state = "tube1" + }, +/obj/structure/bed{ + name = "Triage: High Priority" + }, +/obj/machinery/iv_drip, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cc" = ( +/obj/structure/sign/nosmoking_2, +/turf/simulated/shuttle/wall{ + icon_state = "swall7"; + dir = 2 + }, +/area/shuttle/administration) +"cd" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall11"; + dir = 2 + }, +/area/shuttle/administration) +"ce" = ( +/obj/machinery/portable_atmospherics/canister/oxygen{ + name = "Canister: \[O2] (CRYO)" + }, +/obj/machinery/atmospherics/unary/portables_connector{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cf" = ( +/obj/structure/table/glass, +/obj/item/reagent_containers/glass/beaker/cryoxadone, +/obj/item/reagent_containers/glass/beaker/cryoxadone, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cg" = ( +/obj/machinery/portable_atmospherics/canister/oxygen{ + name = "Canister: \[O2] (CRYO)" + }, +/obj/machinery/light{ + tag = "icon-tube1 (NORTH)"; + icon_state = "tube1"; + dir = 1 + }, +/obj/machinery/camera{ + dir = 4; + icon_state = "camera"; + name = "NHV Asclepius Cryo"; + network = list("NHV Asclepius") + }, +/obj/machinery/atmospherics/unary/portables_connector, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ch" = ( +/obj/structure/table/glass, +/obj/item/reagent_containers/spray/cleaner{ + desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; + name = "Surgery Cleaner" + }, +/obj/machinery/cell_charger, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ci" = ( +/obj/structure/bed{ + name = "Triage: High Priority" + }, +/obj/machinery/iv_drip, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cj" = ( +/obj/machinery/atmospherics/unary/cold_sink/freezer, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ck" = ( +/obj/machinery/camera{ + dir = 4; + icon_state = "camera"; + name = "NHV Asclepius OR 2"; + network = list("NHV Asclepius") + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cl" = ( +/obj/structure/closet/radiation, +/obj/item/clothing/head/radiation, +/obj/item/clothing/head/radiation, +/obj/item/clothing/head/radiation, +/obj/item/clothing/suit/radiation, +/obj/item/clothing/suit/radiation, +/obj/item/clothing/suit/radiation, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cm" = ( +/obj/structure/closet/l3closet, +/obj/item/clothing/head/bio_hood, +/obj/item/clothing/head/bio_hood, +/obj/item/clothing/head/bio_hood, +/obj/item/clothing/suit/bio_suit, +/obj/item/clothing/suit/bio_suit, +/obj/item/clothing/suit/bio_suit, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cn" = ( +/obj/structure/closet/secure_closet/medical1, +/obj/item/clothing/head/beret/med, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"co" = ( +/obj/machinery/portable_atmospherics/canister/oxygen, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cp" = ( +/obj/machinery/suit_storage_unit/cmo/secure/sec_storage, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cq" = ( +/obj/machinery/light, +/obj/machinery/suit_storage_unit/cmo/secure/sec_storage, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cr" = ( +/obj/structure/dispenser/oxygen, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cs" = ( +/obj/machinery/vending/medical, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"ct" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall_s5"; + dir = 2 + }, +/area/shuttle/administration) +"cu" = ( +/obj/machinery/atmospherics/pipe/simple/hidden{ + dir = 5; + icon_state = "intact" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cv" = ( +/obj/machinery/atmospherics/pipe/manifold/hidden, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cw" = ( +/obj/machinery/atmospherics/pipe/simple/hidden{ + dir = 4; + level = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) +"cx" = ( +/obj/machinery/atmospherics/pipe/simple/hidden{ + dir = 9; + icon_state = "intact" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor3" + }, +/area/shuttle/administration) + +(1,1,1) = {" +ab +ao +aE +aE +aE +aE +aE +aD +bo +bB +bB +bK +aD +aE +aE +aE +aE +ct +"} +(2,1,1) = {" +ac +ap +aF +aN +aS +aX +ap +ac +bp +bC +bH +bL +ac +cg +cu +aw +cl +ac +"} +(3,1,1) = {" +ad +aq +aG +aw +aw +aY +aq +ac +bq +aR +aR +bM +ac +aC +cv +aw +cm +ad +"} +(4,1,1) = {" +ae +ar +aw +aw +aw +aw +ba +ac +br +aw +aw +aw +bW +cf +cw +aw +cn +ae +"} +(5,1,1) = {" +af +as +aw +aw +aw +aw +aw +ag +bs +bD +aP +bN +bX +aC +cv +aw +co +af +"} +(6,1,1) = {" +ac +at +aw +aO +aw +aw +aw +bj +bt +aw +aw +bO +bY +cj +cx +aw +cp +ac +"} +(7,1,1) = {" +ag +au +aH +aP +aT +aP +bb +bk +bu +aw +aw +bP +bZ +ch +aw +aw +cq +ac +"} +(8,1,1) = {" +ah +av +aw +aQ +aw +aQ +bc +bl +aw +aw +aw +aw +ca +aw +aw +aw +cr +ac +"} +(9,1,1) = {" +ai +aw +aw +aw +aw +aw +aw +aU +aw +aw +aw +aw +aw +aw +aw +aw +bR +ac +"} +(10,1,1) = {" +aj +aw +aw +aw +aw +aw +aw +aU +aw +aw +aw +aw +aw +aw +aw +aw +bS +ac +"} +(11,1,1) = {" +ak +ax +aI +aR +aw +aR +bd +bm +bv +bE +aw +bQ +cb +ci +bQ +aw +cs +ac +"} +(12,1,1) = {" +ag +ao +aJ +aP +aU +aP +bb +bn +aP +bF +bI +bN +cc +aP +bF +bI +bN +bX +"} +(13,1,1) = {" +ac +ay +aw +aw +aw +aw +be +ac +bw +bG +aw +bR +ac +bw +ck +aw +bR +ac +"} +(14,1,1) = {" +ad +az +aw +aw +aw +aw +bg +ac +bx +aw +aw +bS +ac +bx +aw +aw +bS +ad +"} +(15,1,1) = {" +al +aA +aw +aw +aw +aw +bh +ac +by +aw +aw +bT +ac +by +aw +aw +bT +ae +"} +(16,1,1) = {" +am +aB +aw +aw +aw +aZ +bi +ac +bz +aw +aw +bU +ac +bz +aw +aw +bU +af +"} +(17,1,1) = {" +ac +aC +aK +aK +aV +bf +ce +ac +bA +aw +bJ +bV +ac +bA +aw +bJ +bV +ac +"} +(18,1,1) = {" +an +aD +aL +aL +aD +aE +aE +bn +aL +aL +aD +aE +cd +aD +aL +aL +aD +aW +"} +(19,1,1) = {" +aa +an +aM +aM +aW +aa +aa +an +aM +aM +aW +aa +aa +an +aM +aM +aW +aa +"} diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index b138d19b513..8171efa7825 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New(): var/id = null var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + toggle() + return ..() + +/obj/machinery/atmospherics/binary/pump/AICtrlClick() + toggle() + return ..() + +/obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + set_max() + return + +/obj/machinery/atmospherics/binary/pump/AIAltClick() + set_max() + return ..() + +/obj/machinery/atmospherics/binary/pump/proc/toggle() + if(powered()) + on = !on + update_icon() + +/obj/machinery/atmospherics/binary/pump/proc/set_max() + if(powered()) + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() + /obj/machinery/atmospherics/binary/pump/Destroy() if(SSradio) SSradio.remove_object(src, frequency) @@ -203,7 +243,15 @@ Thus, the two variables affect pump operation are set in New(): update_icon() /obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params) - if(!istype(W, /obj/item/wrench)) + if(istype(W, /obj/item/pen)) + var/t = copytext(stripped_input(user, "Enter the name for the pump.", "Rename", name), 1, MAX_NAME_LEN) + if(!t) + return + if(!in_range(src, usr) && loc != usr) + return + name = t + return + else if(!istype(W, /obj/item/wrench)) return ..() if(!(stat & NOPOWER) && on) to_chat(user, "You cannot unwrench this [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 11874172340..6633c1ac10d 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New(): var/id = null var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + toggle() + return ..() + +/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick() + toggle() + return ..() + +/obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + set_max() + return + +/obj/machinery/atmospherics/binary/volume_pump/AIAltClick() + set_max() + return ..() + +/obj/machinery/atmospherics/binary/volume_pump/proc/toggle() + if(powered()) + on = !on + update_icon() + +/obj/machinery/atmospherics/binary/volume_pump/proc/set_max() + if(powered()) + transfer_rate = MAX_TRANSFER_RATE + update_icon() + /obj/machinery/atmospherics/binary/volume_pump/Destroy() if(SSradio) SSradio.remove_object(src, frequency) @@ -199,7 +239,15 @@ Thus, the two variables affect pump operation are set in New(): update_icon() /obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params) - if(!istype(W, /obj/item/wrench)) + if(istype(W, /obj/item/pen)) + var/t = copytext(stripped_input(user, "Enter the name for the volume pump.", "Rename", name), 1, MAX_NAME_LEN) + if(!t) + return + if(!in_range(src, usr) && loc != usr) + return + name = t + return + else if(!istype(W, /obj/item/wrench)) return ..() if(!(stat & NOPOWER) && on) to_chat(user, "You cannot unwrench this [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index c6720e45f6e..a778b01ea86 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -22,6 +22,45 @@ Filter types: var/frequency = 0 var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/trinary/filter/CtrlClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + toggle() + return ..() + +/obj/machinery/atmospherics/trinary/filter/AICtrlClick() + toggle() + return ..() + +/obj/machinery/atmospherics/trinary/filter/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + set_max() + return + +/obj/machinery/atmospherics/trinary/filter/AIAltClick() + set_max() + return ..() + +/obj/machinery/atmospherics/trinary/filter/proc/toggle() + if(powered()) + on = !on + update_icon() + +/obj/machinery/atmospherics/trinary/filter/proc/set_max() + if(powered()) + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() /obj/machinery/atmospherics/trinary/filter/Destroy() if(SSradio) @@ -211,4 +250,16 @@ Filter types: . = TRUE update_icon() - SSnanoui.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) + +/obj/machinery/atmospherics/trinary/filter/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/pen)) + var/t = copytext(stripped_input(user, "Enter the name for the filter.", "Rename", name), 1, MAX_NAME_LEN) + if(!t) + return + if(!in_range(src, usr) && loc != usr) + return + name = t + return + else + return ..() \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 0c64804b6da..e7c91172e3b 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -12,10 +12,50 @@ //node 3 is the outlet, nodes 1 & 2 are intakes +/obj/machinery/atmospherics/trinary/mixer/CtrlClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + toggle() + return ..() + +/obj/machinery/atmospherics/trinary/mixer/AICtrlClick() + toggle() + return ..() + +/obj/machinery/atmospherics/trinary/mixer/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) && !issilicon(usr)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + set_max() + return + +/obj/machinery/atmospherics/trinary/mixer/AIAltClick() + set_max() + return ..() + /obj/machinery/atmospherics/trinary/mixer/flipped icon_state = "mmap" flipped = 1 +/obj/machinery/atmospherics/trinary/mixer/proc/toggle() + if(powered()) + on = !on + update_icon() + +/obj/machinery/atmospherics/trinary/mixer/proc/set_max() + if(powered()) + target_pressure = MAX_OUTPUT_PRESSURE + update_icon() + /obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0) if(flipped) icon_state = "m" @@ -176,4 +216,16 @@ . = TRUE update_icon() - SSnanoui.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) + +/obj/machinery/atmospherics/trinary/mixer/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/pen)) + var/t = copytext(stripped_input(user, "Enter the name for the mixer.", "Rename", name), 1, MAX_NAME_LEN) + if(!t) + return + if(!in_range(src, usr) && loc != usr) + return + name = t + return + else + return ..() \ No newline at end of file diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 0903ffe7b41..fbc28695ebf 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -52,12 +52,6 @@ #define GRAB_UPGRADING 4 #define GRAB_KILL 5 - -//Hostile Mob AI Status -#define AI_ON 1 -#define AI_IDLE 2 -#define AI_OFF 3 - //Attack types for checking shields/hit reactions #define MELEE_ATTACK 1 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index c18787f0c0d..84a7043eb61 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -197,33 +197,34 @@ #define MFOAM_IRON 2 //Human Overlays Indexes///////// -#define BODY_LAYER 37 -#define MUTANTRACE_LAYER 36 -#define TAIL_UNDERLIMBS_LAYER 35 //Tail split-rendering. -#define LIMBS_LAYER 34 -#define INTORGAN_LAYER 33 -#define MARKINGS_LAYER 32 -#define UNDERWEAR_LAYER 31 -#define MUTATIONS_LAYER 30 -#define H_DAMAGE_LAYER 29 -#define UNIFORM_LAYER 28 -#define ID_LAYER 27 -#define SHOES_LAYER 26 -#define GLOVES_LAYER 25 -#define EARS_LAYER 24 -#define SUIT_LAYER 23 -#define BELT_LAYER 22 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 21 -#define BACK_LAYER 20 -#define HEAD_ACCESSORY_LAYER 19 -#define FHAIR_LAYER 18 -#define GLASSES_LAYER 17 -#define HAIR_LAYER 16 //TODO: make part of head layer? -#define HEAD_ACC_OVER_LAYER 15 //Select-layer rendering. -#define FHAIR_OVER_LAYER 14 //Select-layer rendering. -#define GLASSES_OVER_LAYER 13 //Select-layer rendering. -#define TAIL_LAYER 12 //bs12 specific. this hack is probably gonna come back to haunt me -#define FACEMASK_LAYER 11 +#define BODY_LAYER 38 +#define MUTANTRACE_LAYER 37 +#define TAIL_UNDERLIMBS_LAYER 36 //Tail split-rendering. +#define LIMBS_LAYER 35 +#define INTORGAN_LAYER 34 +#define MARKINGS_LAYER 33 +#define UNDERWEAR_LAYER 32 +#define MUTATIONS_LAYER 31 +#define H_DAMAGE_LAYER 30 +#define UNIFORM_LAYER 29 +#define ID_LAYER 28 +#define SHOES_LAYER 27 +#define GLOVES_LAYER 26 +#define EARS_LAYER 25 +#define SUIT_LAYER 24 +#define BELT_LAYER 23 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 22 +#define BACK_LAYER 21 +#define HEAD_ACCESSORY_LAYER 20 +#define FHAIR_LAYER 19 +#define GLASSES_LAYER 18 +#define HAIR_LAYER 17 //TODO: make part of head layer? +#define HEAD_ACC_OVER_LAYER 16 //Select-layer rendering. +#define FHAIR_OVER_LAYER 15 //Select-layer rendering. +#define GLASSES_OVER_LAYER 14 //Select-layer rendering. +#define TAIL_LAYER 13 //bs12 specific. this hack is probably gonna come back to haunt me +#define FACEMASK_LAYER 12 +#define OVER_MASK_LAYER 11 //Select-layer rendering. #define HEAD_LAYER 10 #define COLLAR_LAYER 9 #define HANDCUFF_LAYER 8 @@ -234,7 +235,7 @@ #define FIRE_LAYER 3 //If you're on fire #define MISC_LAYER 2 #define FROZEN_LAYER 1 -#define TOTAL_LAYERS 37 +#define TOTAL_LAYERS 38 ///Access Region Codes/// #define REGION_ALL 0 @@ -390,4 +391,11 @@ #define GHOST_ORBIT_TRIANGLE "triangle" #define GHOST_ORBIT_HEXAGON "hexagon" #define GHOST_ORBIT_SQUARE "square" -#define GHOST_ORBIT_PENTAGON "pentagon" \ No newline at end of file +#define GHOST_ORBIT_PENTAGON "pentagon" + +//suit sensors: sensor_mode defines + +#define SENSOR_OFF 0 +#define SENSOR_LIVING 1 +#define SENSOR_VITALS 2 +#define SENSOR_COORDS 3 \ No newline at end of file diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 0f05c08b2f7..284b0e4d745 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -94,6 +94,13 @@ #define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD #define APPEARANCE_ALL 32767 +//If you add a new status, be sure to add a list for it to the simple_animals global in _globalvars/lists/mobs.dm +//Hostile Mob AI Status +#define AI_ON 1 +#define AI_IDLE 2 +#define AI_OFF 3 +#define AI_Z_OFF 4 + // Intents #define INTENT_HELP "help" #define INTENT_DISARM "disarm" diff --git a/code/__DEFINES/snpc.dm b/code/__DEFINES/snpc.dm deleted file mode 100644 index 8d4768005cd..00000000000 --- a/code/__DEFINES/snpc.dm +++ /dev/null @@ -1,23 +0,0 @@ -#define SNPC_MAX_RANGE_FIND 32 -#define SNPC_MIN_RANGE_FIND 16 -#define SNPC_FUZZY_CHANCE_HIGH 85 -#define SNPC_FUZZY_CHANCE_LOW 50 -#define SNPC_CHANCE_TALK 15 - -#define SNPC_BRUTE 1 -#define SNPC_STEALTH 2 -#define SNPC_MARTYR 3 -#define SNPC_PSYCHO 4 - -#define SNPC_INTERACTING 2 -#define SNPC_TRAVEL 4 -#define SNPC_FIGHTING 8 -#define SNPC_SPECIAL 16 - -#define TRAIT_ROBUST 2 -#define TRAIT_UNROBUST 4 -#define TRAIT_SMART 8 -#define TRAIT_DUMB 16 -#define TRAIT_MEAN 32 -#define TRAIT_FRIENDLY 64 -#define TRAIT_THIEVING 128 \ No newline at end of file diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index f1e6f38a2d4..6b5807deaef 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -124,9 +124,13 @@ . += A //Like typesof() or subtypesof(), but returns a typecache instead of a list -/proc/typecacheof(path, ignore_root_path) +/proc/typecacheof(path, ignore_root_path, only_root_path = FALSE) if(ispath(path)) - var/list/types = ignore_root_path ? subtypesof(path) : typesof(path) + var/list/types = list() + if(only_root_path) + types = list(path) + else + types = ignore_root_path ? subtypesof(path) : typesof(path) var/list/L = list() for(var/T in types) L[T] = TRUE @@ -140,8 +144,11 @@ L[T] = TRUE else for(var/P in pathlist) - for(var/T in typesof(P)) - L[T] = TRUE + if(only_root_path) + L[P] = TRUE + else + for(var/T in typesof(P)) + L[T] = TRUE return L //Removes any null entries from the list diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index fd5fd510e40..c567ba7adb2 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -491,7 +491,7 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list()) to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") to_chat(user, "Location = [location_description];") to_chat(user, "[special_role_description]") - to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") + to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") // Gets the first mob contained in an atom, and warns the user if there's not exactly one /proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 5b639cc80f8..b90f7502e65 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -113,9 +113,14 @@ /proc/typing_input(mob/user, message = "", title = "", default = "") if(user.client.checkTyping()) // Prevent double windows return null - user.client.typing = TRUE + var/client/C = user.client // Save it in a var in case the client disconnects from the mob + C.typing = TRUE var/msg = input(user, message, title, default) as text|null - user.client.typing = FALSE + if(!C) + return null + C.typing = FALSE + if(!user || C != user.client) // User got out of the mob for some reason or the mob is gone + return null return msg //Filters out undesirable characters from names diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index 1e35e150a25..6dc18d4fdff 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -3,7 +3,7 @@ var/datum/configuration/config = null var/host = null var/join_motd = null GLOBAL_VAR(join_tos) -var/game_version = "Custom ParaCode" +var/game_version = "ParaCode" var/changelog_hash = md5('html/changelog.html') //used to check if the CL changed var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 551b729028e..b6fcae25061 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -22,8 +22,7 @@ GLOBAL_LIST_INIT(living_mob_list, list()) //List of all alive mobs, including GLOBAL_LIST_INIT(dead_mob_list, list()) //List of all dead mobs, including clientless. Excludes /mob/new_player GLOBAL_LIST_INIT(respawnable_list, list()) //List of all mobs, dead or in mindless creatures that still be respawned. GLOBAL_LIST_INIT(non_respawnable_keys, list()) //List of ckeys that are excluded from respawning for remainder of round. -GLOBAL_LIST_INIT(simple_animal_list, list()) //List of all simple animals, including clientless -GLOBAL_LIST_INIT(snpc_list, list()) //List of all snpc's, including clientless +GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless GLOBAL_LIST_INIT(bots_list, list()) //List of all bots(beepsky, medibots,etc) GLOBAL_LIST_INIT(med_hud_users, list()) diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 906bacf0e54..e6f463d6f23 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -19,7 +19,6 @@ GLOBAL_LIST_INIT(navigation_computers, list()) GLOBAL_LIST_INIT(all_areas, list()) GLOBAL_LIST_INIT(machines, list()) -GLOBAL_LIST_INIT(processing_power_items, list()) //items that ask to be called every cycle GLOBAL_LIST_INIT(rcd_list, list()) //list of Rapid Construction Devices. GLOBAL_LIST_INIT(apcs, list()) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 0b8c8d58a95..77443fb4ab2 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -1,6 +1,9 @@ var/global/obj/effect/overlay/plmaster = null var/global/obj/effect/overlay/slmaster = null +GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule +GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) + // Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. var/global/obj/item/radio/intercom/global_announcer = create_global_announcer() var/global/obj/item/radio/intercom/command/command_announcer = create_command_announcer() diff --git a/code/_globalvars/station.dm b/code/_globalvars/station.dm index 2d635996b30..e997a672e1f 100644 --- a/code/_globalvars/station.dm +++ b/code/_globalvars/station.dm @@ -1,6 +1,3 @@ var/global/datum/datacore/data_core = null -var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) -var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) - var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New() \ No newline at end of file diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index c84a64722c5..22921f5228d 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -49,7 +49,7 @@ if(!can_see(A)) if(isturf(A)) //On unmodified clients clicking the static overlay clicks the turf underneath return // So there's no point messaging admins - message_admins("[key_name_admin(src)] might be running a modified client! (failed can_see on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))") + add_attack_logs(src, src, "[key_name_admin(src)] might be running a modified client! (failed can_see on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))", ATKLOG_ALL) var/message = "[key_name(src)] might be running a modified client! (failed can_see on AI click of [A]([COORD(pixel_turf)]))" log_admin(message) send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))") @@ -64,7 +64,7 @@ else if(pixel_turf.obscured) log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])") - message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))") + add_attack_logs(src, src, "[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))", ATKLOG_ALL) send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))") return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 24e58b502ad..286f8ce7095 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -122,6 +122,10 @@ throw_item(A) return + if(isLivingSSD(A)) + if(client && client.send_ssd_warning(A)) + return + var/obj/item/W = get_active_hand() if(W == A) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 32a9d7cf46d..5780e86a298 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -17,6 +17,7 @@ //Hide/Show Action Buttons ... Button /obj/screen/movable/action_button/hide_toggle name = "Hide Buttons" + desc = "Shift-click any button to reset its position. Alt-click to reset all buttons to their default positions." icon = 'icons/mob/actions/actions.dmi' icon_state = "bg_default" var/hidden = 0 @@ -24,8 +25,18 @@ /obj/screen/movable/action_button/hide_toggle/Click(location,control,params) var/list/modifiers = params2list(params) if(modifiers["shift"]) - moved = 0 - return 1 + moved = FALSE + usr.update_action_buttons(TRUE) + return TRUE + if(modifiers["alt"]) + for(var/V in usr.actions) + var/datum/action/A = V + var/obj/screen/movable/action_button/B = A.button + B.moved = FALSE + moved = FALSE + usr.update_action_buttons(TRUE) + to_chat(usr, "Action button positions have been reset.") + return TRUE usr.hud_used.action_buttons_hidden = !usr.hud_used.action_buttons_hidden hidden = usr.hud_used.action_buttons_hidden @@ -36,6 +47,15 @@ UpdateIcon() usr.update_action_buttons() +/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user) + for(var/V in user.actions) + var/datum/action/A = V + var/obj/screen/movable/action_button/B = A.button + B.moved = FALSE + if(moved) + moved = FALSE + user.update_action_buttons(TRUE) + to_chat(user, "Action button positions have been reset.") /obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user) if(isalien(user)) diff --git a/code/controllers/Processes/npcai.dm b/code/controllers/Processes/npcai.dm deleted file mode 100644 index 127429efd34..00000000000 --- a/code/controllers/Processes/npcai.dm +++ /dev/null @@ -1,41 +0,0 @@ -var/global/datum/controller/process/npcai/npcai_master - -/datum/controller/process/npcai - var/current_cycle - -/datum/controller/process/npcai/setup() - name = "npc ai" - schedule_interval = 20 // every 2 seconds - start_delay = 16 - log_startup_progress("NPC ticker starting up.") - -/datum/controller/process/npcai/started() - ..() - if(!GLOB.simple_animal_list) - GLOB.simple_animal_list = list() - if(!GLOB.snpc_list) - GLOB.snpc_list = list() - -/datum/controller/process/npcai/statProcess() - ..() - stat(null, "[GLOB.simple_animal_list.len] simple animals") - stat(null, "[GLOB.snpc_list.len] SNPC's") - -/datum/controller/process/npcai/doWork() - for(last_object in GLOB.simple_animal_list) - var/mob/living/simple_animal/M = last_object - if(istype(M) && !QDELETED(M)) - if(!M.client && M.stat == CONSCIOUS) - try - M.process_ai() - catch(var/exception/e) - catchException(e, M) - SCHECK - else - catchBadType(M) - GLOB.simple_animal_list -= M - - current_cycle++ - - -DECLARE_GLOBAL_CONTROLLER(npcai, npcai_master) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 01cf57aad9e..12b5b0fd1a5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -1,5 +1,7 @@ /datum/configuration var/server_name = null // server name (for world name / status) + var/server_tag_line = null // server tagline (for showing on hub entry) + var/server_extra_features = null // server-specific extra features (for hub entry) var/server_suffix = 0 // generate numeric suffix based on server port var/minimum_client_build = 1421 // Build 1421 due to the middle mouse button exploit @@ -53,7 +55,6 @@ var/humans_need_surnames = 0 var/allow_random_events = 0 // enables random events mid-round when set to 1 var/allow_ai = 1 // allow ai job - var/hostedby = null var/respawn = 0 var/guest_jobban = 1 var/usewhitelist = 0 @@ -69,6 +70,9 @@ var/assistantlimit = 0 //enables assistant limiting var/assistantratio = 2 //how many assistants to security members + var/auto_cryo_ssd_mins = 0 + var/ssd_warning = 0 + var/prob_free_golems = 75 //chance for free golems spawners to appear roundstart var/unrestricted_free_golems = FALSE //if true, free golems can appear on all roundtypes @@ -213,7 +217,7 @@ // Automatic localhost admin disable var/disable_localhost_admin = 0 - + //Start now warning var/start_now_confirmation = 0 @@ -293,6 +297,12 @@ if("shadowling_max_age") config.shadowling_max_age = text2num(value) + if("auto_cryo_ssd_mins") + config.auto_cryo_ssd_mins = text2num(value) + + if("ssd_warning") + config.ssd_warning = 1 + if("log_ooc") config.log_ooc = 1 @@ -358,10 +368,10 @@ if("no_dead_vote") config.vote_no_dead = 1 - + if("vote_autotransfer_initial") config.vote_autotransfer_initial = text2num(value) - + if("vote_autotransfer_interval") config.vote_autotransfer_interval = text2num(value) @@ -386,6 +396,12 @@ if("servername") config.server_name = value + if("server_tag_line") + config.server_tag_line = value + + if("server_extra_features") + config.server_extra_features = value + if("serversuffix") config.server_suffix = 1 @@ -395,9 +411,6 @@ if("nudge_script_path") config.nudge_script_path = value - if("hostedby") - config.hostedby = value - if("server") config.server = value @@ -645,7 +658,7 @@ if("disable_karma") config.disable_karma = 1 - + if("start_now_confirmation") config.start_now_confirmation = 1 diff --git a/code/controllers/subsystem/idlenpcpool.dm b/code/controllers/subsystem/idlenpcpool.dm new file mode 100644 index 00000000000..2dad0abca0f --- /dev/null +++ b/code/controllers/subsystem/idlenpcpool.dm @@ -0,0 +1,41 @@ +SUBSYSTEM_DEF(idlenpcpool) + name = "Idling NPC Pool" + flags = SS_POST_FIRE_TIMING|SS_BACKGROUND + priority = FIRE_PRIORITY_IDLE_NPC + wait = 60 + runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME + + var/list/currentrun = list() + var/static/list/idle_mobs_by_zlevel[][] + +/datum/controller/subsystem/idlenpcpool/stat_entry() + var/list/idlelist = GLOB.simple_animals[AI_IDLE] + var/list/zlist = GLOB.simple_animals[AI_Z_OFF] + ..("IdleNPCS:[idlelist.len]|Z:[zlist.len]") + +/datum/controller/subsystem/idlenpcpool/Initialize(start_timeofday) + idle_mobs_by_zlevel = new /list(world.maxz,0) + return ..() + +/datum/controller/subsystem/idlenpcpool/fire(resumed = FALSE) + if(!resumed) + var/list/idlelist = GLOB.simple_animals[AI_IDLE] + src.currentrun = idlelist.Copy() + + //cache for sanic speed (lists are references anyways) + var/list/currentrun = src.currentrun + + while(currentrun.len) + var/mob/living/simple_animal/SA = currentrun[currentrun.len] + --currentrun.len + if(!SA) + GLOB.simple_animals[AI_IDLE] -= SA + continue + + if(!SA.ckey) + if(SA.stat != DEAD) + SA.handle_automated_movement() + if(SA.stat != DEAD) + SA.consider_wakeup() + if(MC_TICK_CHECK) + return \ No newline at end of file diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index ccd83640aa6..02f2681b22d 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -8,6 +8,8 @@ SUBSYSTEM_DEF(jobs) var/list/name_occupations = list() //Dict of all jobs, keys are titles var/list/type_occupations = list() //Dict of all jobs, keys are types var/list/prioritized_jobs = list() // List of jobs set to priority by HoP/Captain + var/list/id_change_records = list() // List of all job transfer records + var/list/id_change_counter = 1 //Players who need jobs var/list/unassigned = list() //Debug info @@ -601,3 +603,84 @@ SUBSYSTEM_DEF(jobs) spawn(0) to_chat(H, "Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]") + +/datum/controller/subsystem/jobs/proc/format_jobs_for_id_computer(obj/item/card/id/tgtcard) + var/list/jobs_to_formats = list() + if(tgtcard) + var/mob/M = tgtcard.getPlayer() + for(var/datum/job/job in occupations) + if(tgtcard.assignment && tgtcard.assignment == job.title) + jobs_to_formats[job.title] = "disabled" // the job they already have is pre-selected + else if(!job.would_accept_job_transfer_from_player(M)) + jobs_to_formats[job.title] = "linkDiscourage" // karma jobs they don't have available are discouraged + else if(job.total_positions && !job.current_positions && job.title != "Civilian") + jobs_to_formats[job.title] = "linkEncourage" // jobs with nobody doing them at all are encouraged + else if(job.total_positions >= 0 && job.current_positions >= job.total_positions) + jobs_to_formats[job.title] = "linkDiscourage" // jobs that are full (no free positions) are discouraged + return jobs_to_formats + + +/datum/controller/subsystem/jobs/proc/log_job_transfer(transferee, oldvalue, newvalue, whodidit) + id_change_records["[id_change_counter]"] = list("transferee" = transferee, "oldvalue" = oldvalue, "newvalue" = newvalue, "whodidit" = whodidit, "timestamp" = station_time_timestamp()) + id_change_counter++ + +/datum/controller/subsystem/jobs/proc/slot_job_transfer(oldtitle, newtitle) + var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle) + var/datum/job/newjobdatum = SSjobs.GetJob(newtitle) + if(istype(oldjobdatum) && oldjobdatum.current_positions > 0 && istype(newjobdatum)) + if(!(oldjobdatum.title in command_positions) && !(newjobdatum.title in command_positions)) + oldjobdatum.current_positions-- + newjobdatum.current_positions++ + + +/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom) + var/record_html = "" + + var/table_headers = list("Crewman", "Old Rank", "New Rank", "Authorized By", "Time") + var/hidden_fields = list("deletedby") + if(centcom) + table_headers += "Deleted By" + record_html += "" + for(var/thisheader in table_headers) + record_html += "" + record_html += "" + + var/visible_record_count = 0 + for(var/thisid in id_change_records) + var/thisrecord = id_change_records[thisid] + + if(thisrecord["deletedby"] && !centcom) + continue + + record_html += "" + for(var/lkey in thisrecord) + if(lkey in hidden_fields) + if(centcom) + record_html += "" + else + continue + else + record_html += "" + record_html += "" + visible_record_count++ + + record_html += "
[thisheader]
[thisrecord[lkey]][thisrecord[lkey]]
" + + if(!visible_record_count) + return "No records on file yet." + return record_html + +/datum/controller/subsystem/jobs/proc/delete_log_records(sourceuser, delete_all) + . = 0 + if(!sourceuser) + return + var/list/new_id_change_records = list() + for(var/thisid in id_change_records) + var/thisrecord = id_change_records[thisid] + if(!thisrecord["deletedby"]) + if(delete_all || thisrecord["whodidit"] == sourceuser) + thisrecord["deletedby"] = sourceuser + .++ + new_id_change_records["[id_change_counter]"] = thisrecord + id_change_counter++ + id_change_records = new_id_change_records \ No newline at end of file diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm index 7038ad4db4f..9a73c1dbabb 100644 --- a/code/controllers/subsystem/machinery.dm +++ b/code/controllers/subsystem/machinery.dm @@ -64,23 +64,6 @@ SUBSYSTEM_DEF(machines) if(MC_TICK_CHECK) return -/datum/controller/subsystem/machines/proc/process_premachines(resumed = 0) - /* Literally exists as snowflake for fucking powersinks goddamnit */ - if(!resumed) - src.currentrun = GLOB.processing_power_items.Copy() - //cache for sanid speed (lists are references anyways) - var/list/currentrun = src.currentrun - while(currentrun.len) - var/obj/item/I = currentrun[currentrun.len] - currentrun.len-- - if(!QDELETED(I)) - if(!I.pwr_drain()) - GLOB.processing_power_items.Remove(I) - else - GLOB.processing_power_items.Remove(I) - if(MC_TICK_CHECK) - return - /datum/controller/subsystem/machines/proc/process_machines(resumed = 0) var/seconds = wait * 0.1 if(!resumed) @@ -113,13 +96,6 @@ SUBSYSTEM_DEF(machines) if(state != SS_RUNNING) return resumed = 0 - currentpart = SSMACHINES_PREMACHINERY - - if(currentpart == SSMACHINES_PREMACHINERY || !resumed) - process_premachines(resumed) - if(state != SS_RUNNING) - return - resumed = 0 currentpart = SSMACHINES_MACHINERY if(currentpart == SSMACHINES_MACHINERY || !resumed) diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm index d19396af767..20061d7489b 100644 --- a/code/controllers/subsystem/mobs.dm +++ b/code/controllers/subsystem/mobs.dm @@ -1,14 +1,19 @@ SUBSYSTEM_DEF(mobs) name = "Mobs" priority = FIRE_PRIORITY_MOBS - flags = SS_KEEP_TIMING | SS_NO_INIT + flags = SS_KEEP_TIMING runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME var/list/currentrun = list() + var/static/list/clients_by_zlevel[][] /datum/controller/subsystem/mobs/stat_entry() ..("P:[GLOB.mob_list.len]") +/datum/controller/subsystem/mobs/Initialize(start_timeofday) + clients_by_zlevel = new /list(world.maxz,0) + return ..() + /datum/controller/subsystem/mobs/fire(resumed = 0) var/seconds = wait * 0.1 if(!resumed) diff --git a/code/controllers/subsystem/npcai.dm b/code/controllers/subsystem/npcai.dm deleted file mode 100644 index f8fa3a5aa0f..00000000000 --- a/code/controllers/subsystem/npcai.dm +++ /dev/null @@ -1,24 +0,0 @@ -SUBSYSTEM_DEF(npcai) - name = "NPC AI" // Simple AI controller, isolated from the SNPC one (NPCPool). - flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND - priority = FIRE_PRIORITY_NPC - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME - var/list/simple_animal_list = list() - -/datum/controller/subsystem/npcai/stat_entry() - ..("SimAnimals:[simple_animal_list.len]") - -/datum/controller/subsystem/npcai/fire(resumed = FALSE) - if(!resumed) - src.simple_animal_list = simple_animal_list.Copy() - for(var/mob/living/simple_animal/M in simple_animal_list) - if(istype(M) && !QDELETED(M)) - if(!M.client && M.stat == CONSCIOUS) - M.process_ai() - if(MC_TICK_CHECK) - return - else - simple_animal_list -= M - -/datum/controller/subsystem/npcai/Recover() - simple_animal_list = SSnpcai.simple_animal_list \ No newline at end of file diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index b06d33f6f32..0de306b12eb 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -1,127 +1,33 @@ -#define PROCESSING_NPCS 0 -#define PROCESSING_DELEGATES 1 -#define PROCESSING_ASSISTANTS 2 - SUBSYSTEM_DEF(npcpool) - name = "NPC Pool" - flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND - priority = FIRE_PRIORITY_NPC - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME + name = "NPC Pool" + flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND + priority = FIRE_PRIORITY_NPC + runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME - var/list/canBeUsed = list() - var/list/needsDelegate = list() - var/list/needsAssistant = list() - - var/list/processing = list() - var/list/currentrun = list() - var/stage + var/list/currentrun = list() /datum/controller/subsystem/npcpool/stat_entry() - ..("NPCS:[processing.len]|D:[needsDelegate.len]|A:[needsAssistant.len]|U:[canBeUsed.len]") - -/datum/controller/subsystem/npcpool/proc/stop_processing(mob/living/carbon/human/interactive/I) - processing -= I - currentrun -= I - needsDelegate -= I - canBeUsed -= I - needsAssistant -= I + var/list/activelist = GLOB.simple_animals[AI_ON] + ..("SimpleAnimals:[activelist.len]") /datum/controller/subsystem/npcpool/fire(resumed = FALSE) - //bot delegation and coordination systems - //General checklist/Tasks for delegating a task or coordinating it (for SNPCs) - // 1. Bot proximity to task target: if too far, delegate, if close, coordinate - // 2. Bot Health/status: check health with bots in local area, if their health is higher, delegate task to them, else coordinate - // 3. Process delegation: if a bot (or bots) has been delegated, assign them to the task. - // 4. Process coordination: if a bot(or bots) has been asked to coordinate, assign them to help. - // 5. Do all assignments: goes through the delegated/coordianted bots and assigns the right variables/tasks to them. - if (!resumed) - currentrun = processing.Copy() - stage = PROCESSING_NPCS - //cache for sanic speed (lists are references anyways) - var/list/cachecurrentrun = currentrun - var/list/cachecanBeUsed = canBeUsed + if(!resumed) + var/list/activelist = GLOB.simple_animals[AI_ON] + src.currentrun = activelist.Copy() - if(stage == PROCESSING_NPCS) - while(cachecurrentrun.len) - var/mob/living/carbon/human/interactive/thing = cachecurrentrun[cachecurrentrun.len] - --cachecurrentrun.len + var/list/currentrun = src.currentrun - thing.InteractiveProcess() + while(currentrun.len) + var/mob/living/simple_animal/SA = currentrun[currentrun.len] + --currentrun.len - var/checkInRange = view(SNPC_MAX_RANGE_FIND,thing) - if(thing.IsDeadOrIncap(FALSE) || !(locate(thing.TARGET) in checkInRange)) - needsDelegate += thing - else if(thing.doing & SNPC_FIGHTING) - needsAssistant += thing - else - cachecanBeUsed += thing - - if (MC_TICK_CHECK) - return - stage = PROCESSING_DELEGATES - cachecurrentrun = needsDelegate //localcache - currentrun = cachecurrentrun - - if(stage == PROCESSING_DELEGATES) - while(cachecurrentrun.len && cachecanBeUsed.len) - var/mob/living/carbon/human/interactive/check = cachecurrentrun[cachecurrentrun.len] - var/mob/living/carbon/human/interactive/candidate = cachecanBeUsed[cachecanBeUsed.len] - --cachecurrentrun.len - - var/helpProb = 0 - var/list/chfac = check.faction - var/list/canfac = candidate.faction - var/facCount = LAZYLEN(chfac) * LAZYLEN(canfac) - - for(var/C in chfac) - if(C in canfac) - helpProb = min(100,helpProb + 25) - if(helpProb >= 100) - break - - if(facCount == 1 && helpProb) - helpProb = 100 - - if(prob(helpProb) && candidate.takeDelegate(check)) - --cachecanBeUsed.len - candidate.change_eye_color(255, 0, 0) - candidate.update_icons() - - if(MC_TICK_CHECK) - return - stage = PROCESSING_ASSISTANTS - cachecurrentrun = needsAssistant //localcache - currentrun = cachecurrentrun - - //no need for the stage check - - while(cachecurrentrun.len && cachecanBeUsed.len) - var/mob/living/carbon/human/interactive/check = cachecurrentrun[cachecurrentrun.len] - var/mob/living/carbon/human/interactive/candidate = cachecanBeUsed[cachecanBeUsed.len] - --cachecurrentrun.len - - var/helpProb = 0 - var/list/chfac = check.faction - var/list/canfac = candidate.faction - var/facCount = LAZYLEN(chfac) * LAZYLEN(canfac) - - for(var/C in chfac) - if(C in canfac) - helpProb = min(100,helpProb + 25) - if(helpProb >= 100) - break - - if(facCount == 1 && helpProb) - helpProb = 100 - - if(prob(helpProb) && candidate.takeDelegate(check,FALSE)) - --cachecanBeUsed.len - candidate.change_eye_color(255, 255, 0) - candidate.update_icons() - - if(!cachecurrentrun.len || MC_TICK_CHECK) //don't change SS state if it isn't necessary - return - -/datum/controller/subsystem/npcpool/Recover() - processing = SSnpcpool.processing \ No newline at end of file + if(!SA.ckey && !SA.notransform) + if(SA.stat != DEAD) + SA.handle_automated_movement() + if(SA.stat != DEAD) + SA.handle_automated_action() + if(SA.stat != DEAD) + SA.handle_automated_speech() + if(MC_TICK_CHECK) + return \ No newline at end of file diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 83217fde0bd..40f671ae383 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -80,9 +80,9 @@ if("Mob") debug_variables(SSmobs) feedback_add_details("admin_verb","DMob") - if("NPC AI") - debug_variables(SSnpcai) - feedback_add_details("admin_verb","DNPCAI") + if("NPC Pool") + debug_variables(SSnpcpool) + feedback_add_details("admin_verb","DNPCPool") if("Shuttle") debug_variables(SSshuttle) feedback_add_details("admin_verb","DShuttle") diff --git a/code/datums/action.dm b/code/datums/action.dm index d316bd29b41..5972579834b 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -107,6 +107,7 @@ /datum/action/item_action check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS var/use_itemicon = TRUE + /datum/action/item_action/New(Target, custom_icon, custom_icon_state) ..() var/obj/item/I = target @@ -406,6 +407,19 @@ name = "Use [target.name]" button.name = name +/datum/action/item_action/voice_changer/toggle + name = "Toggle Voice Changer" + +/datum/action/item_action/voice_changer/voice + name = "Set Voice" + +/datum/action/item_action/voice_changer/voice/Trigger() + if(!IsAvailable()) + return FALSE + + var/obj/item/voice_changer/V = target + V.set_voice(usr) + // for clothing accessories like holsters /datum/action/item_action/accessory check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS diff --git a/code/datums/diseases/critical.dm b/code/datums/diseases/critical.dm index 82748802cce..55b10fbf971 100644 --- a/code/datums/diseases/critical.dm +++ b/code/datums/diseases/critical.dm @@ -19,7 +19,7 @@ spread_text = "The patient is in shock" max_stages = 3 spread_flags = SPECIAL - cure_text = "Saline Solution" + cure_text = "Saline-Glucose Solution" cures = list("salglu_solution") cure_chance = 10 viable_mobtypes = list(/mob/living/carbon/human) @@ -80,7 +80,7 @@ spread_text = "The patient is having a cardiac emergency" max_stages = 3 spread_flags = SPECIAL - cure_text = "Cardiac Stimulants" + cure_text = "Atropine or Epinephrine" cures = list("atropine", "epinephrine") cure_chance = 10 needs_all_cures = FALSE diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 6f589101f2f..65b3940cde2 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -29,6 +29,7 @@ var/memory var/assigned_role //assigned role is what job you're assigned to when you join the station. + var/playtime_role //if set, overrides your assigned_role for the purpose of playtime awards. Set by IDcomputer when your ID is changed. var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal. var/offstation_role = FALSE //set to true for ERT, deathsquad, abductors, etc, that can go from and to z2 at will and shouldn't be antag targets var/list/restricted_roles = list() diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 8c172f3592f..184f1155da2 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -25,6 +25,7 @@ var/list/implants = null var/list/cybernetic_implants = null + var/list/chameleon_extras //extra types for chameleon outfit changes, mostly guns /datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) //to be overriden for customization depending on client prefs,species etc @@ -151,4 +152,10 @@ H.r_store.add_fingerprint(H, 1) if(H.wear_pda) H.wear_pda.add_fingerprint(H, 1) - return 1 \ No newline at end of file + return 1 + +/datum/outfit/proc/get_chameleon_disguise_info() + var/list/types = list(uniform, suit, back, belt, gloves, shoes, head, mask, l_ear, r_ear, glasses, id, l_pocket, r_pocket, suit_store, r_hand, l_hand, pda) + types += chameleon_extras + listclearnulls(types) + return types diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 3ac473edfeb..09282ec77b1 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -123,7 +123,7 @@ /datum/outfit/admin/syndicate/spy name = "Syndicate Spy" uniform = /obj/item/clothing/under/suit_jacket/really_black - shoes = /obj/item/clothing/shoes/syndigaloshes/black + shoes = /obj/item/clothing/shoes/chameleon/noslip uplink_uses = 40 id_access = "Syndicate Agent" @@ -228,7 +228,7 @@ back = /obj/item/storage/backpack belt = /obj/item/storage/belt/utility/full/multitool gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/syndigaloshes/black + shoes = /obj/item/clothing/shoes/chameleon/noslip l_ear = /obj/item/radio/headset/centcom id = /obj/item/card/id pda = /obj/item/pda @@ -990,7 +990,7 @@ suit = /obj/item/clothing/suit/hooded/chaplain_hoodie back = /obj/item/storage/backpack gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/syndigaloshes/black + shoes = /obj/item/clothing/shoes/chameleon/noslip l_ear = /obj/item/radio/headset/syndicate id = /obj/item/card/id/syndicate l_hand = /obj/item/twohanded/dualsaber/red @@ -1021,7 +1021,7 @@ suit = /obj/item/clothing/suit/draculacoat back = /obj/item/storage/backpack gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/syndigaloshes/black + shoes = /obj/item/clothing/shoes/chameleon/noslip l_ear = /obj/item/radio/headset/syndicate id = /obj/item/card/id backpack_contents = list( diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index d20255bc57c..53517d5dbc9 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -25,6 +25,11 @@ port_id = "ferry" name = "Base Shuttle Template (Ferry)" +/datum/map_template/shuttle/admin + port_id = "admin" + name = "Base Shuttle Template (Admin)" + + // Shuttles start here: @@ -117,3 +122,13 @@ definitely no zombifyin' reagents!" admin_notes = "Meat currently contains no zombifying reagents, people on \ meatspike must be spawned in." + +/datum/map_template/shuttle/admin/hospital + suffix = "hospital" + name = "NHV Asclepius" + description = "Nanostrasen Hospital ship, for medical assistance during disasters." + +/datum/map_template/shuttle/admin/admin + suffix = "admin" + name = "NTV Argos" + description = "Default Admin ship. An older ship used for special operations." diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index ec43330a8eb..8fdaf8c25df 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1073,6 +1073,12 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containertype = /obj/structure/closet/critter/cow containername = "cow crate" +/datum/supply_packs/organic/pig + name = "Pig Crate" + cost = 25 + containertype = /obj/structure/closet/critter/pig + containername = "pig crate" + /datum/supply_packs/organic/goat name = "Goat Crate" cost = 25 diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index a714e17d236..3a78dfc9b28 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -1067,13 +1067,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/stealthy_tools category = "Stealth and Camouflage Items" -/datum/uplink_item/stealthy_tools/chameleon_jumpsuit - name = "Chameleon Jumpsuit" - desc = "A jumpsuit used to imitate the uniforms of Nanotrasen crewmembers." - reference = "CJ" - item = /obj/item/clothing/under/chameleon - cost = 2 - /datum/uplink_item/stealthy_tools/chameleon_stamp name = "Chameleon Stamp" desc = "A stamp that can be activated to imitate an official Nanotrasen Stamp. The disguised stamp will work exactly like the real stamp and will allow you to forge false documents to gain access or equipment; \ @@ -1092,20 +1085,19 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 35 /datum/uplink_item/stealthy_tools/syndigaloshes - name = "No-Slip Syndicate Shoes" - desc = "These allow you to run on wet floors. They do not work on lubricated surfaces." + name = "No-Slip Chameleon Shoes" + desc = "These shoes will allow the wearer to run on wet floors and slippery objects without falling down. \ + They do not work on heavily lubricated surfaces." reference = "NSSS" - item = /obj/item/clothing/shoes/syndigaloshes + item = /obj/item/clothing/shoes/chameleon/noslip cost = 2 excludefrom = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_tools/syndigaloshes/nuke - name = "Tactical No-Slip Brown Shoes" - desc = "These allow you to run on wet floors. They do not work on lubricated surfaces, and the maker swears they're better than normal ones, somehow." - reference = "NNSSS" + reference = "TNSSS" cost = 4 //but they aren't - gamemodes = list(/datum/game_mode/nuclear) excludefrom = list() + gamemodes = list(/datum/game_mode/nuclear) /datum/uplink_item/stealthy_tools/chamsechud name = "Chameleon Security HUD" @@ -1146,12 +1138,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/card/id/syndicate cost = 2 -/datum/uplink_item/stealthy_tools/voice_changer - name = "Voice Changer" - desc = "A conspicuous gas mask that mimics the voice named on your identification card. When no identification is worn, the mask will render your voice unrecognisable." - reference = "VC" - item = /obj/item/clothing/mask/gas/voice - cost = 3 +/datum/uplink_item/stealthy_tools/chameleon + name = "Chameleon Kit" + desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anything on the station, and more! \ + Due to budget cuts, the shoes don't provide protection against slipping. The set comes with a complementary chameleon stamp." + reference = "CHAM" + item = /obj/item/storage/box/syndie_kit/chameleon + cost = 2 /datum/uplink_item/stealthy_tools/chameleon_proj name = "Chameleon-Projector" @@ -1210,7 +1203,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/stealthy_tools/clownkit name = "Honk Brand Infiltration Kit" - desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer clown mask, magnetic clown shoes, and standard clown outfit, tools, and backpack." + desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer mask, magnetic clown shoes, and standard clown outfit, tools, and backpack." reference = "HBIK" item = /obj/item/storage/backpack/clown/syndie cost = 6 @@ -1544,10 +1537,10 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 12 /datum/uplink_item/cyber_implants/reviver - name = "Reviver Implant" - desc = "This implant will attempt to revive you if you lose consciousness. Comes with an automated implanting tool." + name = "Hardened Reviver Implant" + desc = "This implant will attempt to revive you if you lose consciousness. It is invulnerable to EMPs. Comes with an automated implanting tool." reference = "CIR" - item = /obj/item/organ/internal/cyberimp/chest/reviver + item = /obj/item/organ/internal/cyberimp/chest/reviver/hardened cost = 8 // POINTLESS BADASSERY diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 067223c0285..5d508685e5b 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -63,6 +63,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default? var/nad_allowed = FALSE //is the station NAD allowed on this area? + var/fast_despawn = FALSE + /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ var/list/teleportlocs = list() @@ -333,7 +335,7 @@ var/list/ghostteleportlocs = list() icon_state = "shuttle" /area/shuttle/administration - name = "\improper Administration Shuttle" + name = "\improper Nanotrasen Vessel" icon_state = "shuttlered" /area/shuttle/administration/centcom @@ -855,10 +857,12 @@ var/list/ghostteleportlocs = list() /area/prison/solitary name = "\improper Solitary Confinement" icon_state = "brig" + fast_despawn = TRUE /area/prison/cell_block name = "\improper Prison Cell Block" icon_state = "brig" + fast_despawn = TRUE /area/prison/cell_block/A name = "\improper Prison Cell Block A" @@ -1676,6 +1680,7 @@ var/list/ghostteleportlocs = list() /area/security/permabrig name = "\improper Prison Wing" icon_state = "sec_prison_perma" + fast_despawn = TRUE /area/security/prison name = "\improper Prison Wing" diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 9383d0e78ad..3ef94ae9866 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -220,7 +220,12 @@ destination.Entered(src) for(var/atom/movable/AM in destination) AM.Crossed(src) - + var/turf/oldturf = get_turf(old_loc) + var/turf/destturf = get_turf(destination) + var/old_z = (oldturf ? oldturf.z : null) + var/dest_z = (destturf ? destturf.z : null) + if(old_z != dest_z) + onTransitZ(old_z, dest_z) if(isturf(destination) && opacity) var/turf/new_loc = destination new_loc.reconsider_lights() @@ -233,6 +238,11 @@ return 1 +/atom/movable/proc/onTransitZ(old_z,new_z) + for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care. + var/atom/movable/AM = item + AM.onTransitZ(old_z,new_z) + /mob/living/forceMove(atom/destination) if(buckled) addtimer(CALLBACK(src, .proc/check_buckled), 1, TIMER_UNIQUE) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index bd934eefb44..0482a8e19ae 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -135,4 +135,9 @@ else log_debug("/obj/structure/blob/core/proc/lateblobcheck: Blob core lacks a overmind.mind.") else - log_debug("/obj/structure/blob/core/proc/lateblobcheck: Blob core lacks an overmind.") \ No newline at end of file + log_debug("/obj/structure/blob/core/proc/lateblobcheck: Blob core lacks an overmind.") + +/obj/structure/blob/core/onTransitZ(old_z, new_z) + if(overmind && is_station_level(new_z)) + overmind.forceMove(get_turf(src)) + return ..() \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index fde2c9bf8a3..fd6aa8c9f4a 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -23,13 +23,12 @@ /obj/structure/blob/factory/run_action() if(spores.len >= max_spores) - return 0 + return if(spore_delay > world.time) - return 0 + return + flick("blob_factory_glow", src) spore_delay = world.time + 100 // 10 seconds var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore(src.loc, src) BS.color = overmind.blob_reagent_datum.complementary_color BS.overmind = overmind overmind.blob_mobs.Add(BS) - return 0 - diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm index 7198d3ef081..14c240f681b 100644 --- a/code/game/gamemodes/blob/blobs/resource.dm +++ b/code/game/gamemodes/blob/blobs/resource.dm @@ -13,13 +13,9 @@ qdel(src) /obj/structure/blob/resource/run_action() - if(resource_delay > world.time) - return 0 - + return + flick("blob_resource_glow", src) resource_delay = world.time + 40 // 4 seconds - if(overmind) overmind.add_points(1) - return 0 - diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 748823829b5..61196c9862f 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -331,17 +331,13 @@ /mob/camera/blob/verb/rally_spores_power() set category = "Blob" - set name = "Rally Spores (5)" + set name = "Rally Spores" set desc = "Rally the spores to move to your location." var/turf/T = get_turf(src) rally_spores(T) /mob/camera/blob/proc/rally_spores(var/turf/T) - - if(!can_buy(5)) - return - to_chat(src, "You rally your spores.") var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z)) @@ -373,12 +369,12 @@ if(!N) to_chat(src, "A node is required to birth your offspring...") return - + if(!can_buy(100)) return split_used = TRUE - + new /obj/structure/blob/core/ (get_turf(N), 200, null, blob_core.point_rate, "offspring") qdel(N) @@ -399,7 +395,8 @@ else to_chat(usr, "You broadcast with your minions, [speak_text]") for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs) - blob_minion.say(speak_text) + if(blob_minion.stat == CONSCIOUS) + blob_minion.say(speak_text) return /mob/camera/blob/verb/create_storage() @@ -478,4 +475,4 @@ to_chat(src, "Node Blobs are blobs which grow, like the core. Like the core it can activate resource and factory blobs.") to_chat(src, "In addition to the buttons on your HUD, there are a few click shortcuts to speed up expansion and defense.") to_chat(src, "Shortcuts: Click = Expand Blob | CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click = Remove Blob") - to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.") \ No newline at end of file + to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.") diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 6ae995a1e77..972075ceece 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -508,6 +508,12 @@ var/round_start_time = 0 //Ask the event manager to print round end information SSevents.RoundEnd() + // Add AntagHUD to everyone, see who was really evil the whole time! + for(var/datum/atom_hud/antag/H in huds) + for(var/m in GLOB.player_list) + var/mob/M = m + H.add_hud_to(M) + return 1 /datum/controller/gameticker/proc/HasRoundStarted() diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index fbe1774525f..2b0162829e1 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -320,69 +320,6 @@ for(var/mob/living/carbon/human/H in oview(3,owner)) //Blood decals for simple animals would be neat. aka Carp with blood on it. H.add_mob_blood(owner) -/obj/item/organ/internal/heart/gland/bodysnatch - cooldown_low = 600 - cooldown_high = 600 - human_only = 1 - uses = 1 - -/obj/item/organ/internal/heart/gland/bodysnatch/activate() - to_chat(owner, "You feel something moving around inside you...") - //spawn cocoon with clone greytide snpc inside - if(ishuman(owner)) - var/obj/effect/cocoon/abductor/C = new (get_turf(owner)) - C.Copy(owner) - C.Start() - owner.adjustBruteLoss(40) - owner.add_splatter_floor() - -/obj/effect/cocoon/abductor - name = "slimy cocoon" - desc = "Something is moving inside." - icon = 'icons/effects/effects.dmi' - icon_state = "cocoon_large3" - color = rgb(10,120,10) - density = 1 - var/hatch_time = 0 - -/obj/effect/cocoon/abductor/proc/Copy(mob/living/carbon/human/H) - var/mob/living/carbon/human/interactive/greytide/clone = new(src) - var/datum/dna/owner_dna = H.dna - clone.rename_character(clone.name, owner_dna.real_name) - clone.set_species(owner_dna.species.type) - clone.dna = owner_dna.Clone() - clone.body_accessory = H.body_accessory - domutcheck(clone) - - for(var/obj/item/I in clone) - if(istype(I, /obj/item/implant)) - continue - if(istype(I, /obj/item/organ)) - continue - qdel(I) - - //There's no define for this / get all items ? - var/list/slots = list(slot_back,slot_w_uniform,slot_wear_suit,\ - slot_wear_mask,slot_head,slot_shoes,slot_gloves,slot_l_ear,slot_r_ear,\ - slot_glasses,slot_belt,slot_s_store,slot_l_store,slot_r_store,slot_wear_id,slot_wear_pda) - - for(var/slot in slots) - var/obj/item/I = H.get_item_by_slot(slot) - if(I) - clone.equip_to_slot_or_del(new I.type(clone), slot) - -/obj/effect/cocoon/abductor/proc/Start() - hatch_time = world.time + 600 - START_PROCESSING(SSobj, src) - -/obj/effect/cocoon/abductor/process() - if(world.time > hatch_time) - STOP_PROCESSING(SSobj, src) - for(var/mob/M in contents) - src.visible_message("[src] hatches!") - M.forceMove(get_turf(src)) - qdel(src) - /obj/item/organ/internal/heart/gland/plasma cooldown_low = 1200 diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index bde3f7ee8e9..54b01ff38ce 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -2,7 +2,9 @@ //"Ghosts" that are invisible and move like ghosts, cannot take damage while invsible //Don't hear deadchat and are NOT normal ghosts //Admin-spawn or random event + #define INVISIBILITY_REVENANT 50 +#define REVENANT_NAME_FILE "revenant_names.json" /mob/living/simple_animal/revenant name = "revenant" @@ -124,9 +126,17 @@ ghost_darkness_images |= ghostimage updateallghostimages() remove_from_all_data_huds() + random_revenant_name() addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives) +/mob/living/simple_animal/revenant/proc/random_revenant_name() + var/built_name = "" + built_name += pick(strings(REVENANT_NAME_FILE, "spirit_type")) + built_name += " of " + built_name += pick(strings(REVENANT_NAME_FILE, "adjective")) + built_name += pick(strings(REVENANT_NAME_FILE, "theme")) + name = built_name /mob/living/simple_animal/revenant/proc/firstSetupAttempt() if(mind) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 9e06d662053..eebe4f2e9e4 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -256,6 +256,8 @@ if(H.mind && H.mind.initial_account) C.associated_account_number = H.mind.initial_account.account_number + C.owner_uid = H.UID() + C.owner_ckey = H.ckey /datum/outfit/job/proc/imprint_pda(mob/living/carbon/human/H) var/obj/item/pda/PDA = H.wear_pda @@ -265,3 +267,10 @@ PDA.ownjob = C.assignment PDA.ownrank = C.rank PDA.name = "PDA-[H.real_name] ([PDA.ownjob])" + +/datum/job/proc/would_accept_job_transfer_from_player(mob/player) + if(!guest_jobbans(title)) // actually checks if job is a whitelisted position + return TRUE + if(!istype(player)) + return FALSE + return is_job_whitelisted(player, title) diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 6f5be69280a..2a7927d09bf 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -257,13 +257,19 @@ var/global/list/role_playtime_requirements = list( play_records[rtype] = text2num(read_records[rtype]) else play_records[rtype] = 0 - if(mob.stat == CONSCIOUS && mob.mind.assigned_role) + var/myrole + if(mob.mind) + if(mob.mind.playtime_role) + myrole = mob.mind.playtime_role + else if(mob.mind.assigned_role) + myrole = mob.mind.assigned_role + if(mob.stat == CONSCIOUS && myrole) play_records[EXP_TYPE_LIVING] += minutes if(announce_changes) to_chat(mob,"You got: [minutes] Living EXP!") for(var/category in exp_jobsmap) if(exp_jobsmap[category]["titles"]) - if(mob.mind.assigned_role in exp_jobsmap[category]["titles"]) + if(myrole in exp_jobsmap[category]["titles"]) play_records[category] += minutes if(announce_changes) to_chat(mob,"You got: [minutes] [category] EXP!") diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 95e609ee524..e392b468557 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -371,7 +371,15 @@ update_flag SSnanoui.update_uis(src) // Update all NanoUIs attached to src - +/obj/machinery/portable_atmospherics/canister/replace_tank(mob/living/user, close_valve) + . = ..() + if(.) + if(close_valve) + valve_open = FALSE + update_icon() + investigate_log("Valve was closed by [key_name(user)].
", "atmos") + else if(valve_open && holding) + investigate_log("[key_name(user)] started a transfer into [holding].
", "atmos") /obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob) src.add_hiddenprint(user) diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index dfecc3a4409..71e1310f96b 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -82,16 +82,49 @@ /obj/machinery/portable_atmospherics/portableConnectorReturnAir() return air_contents -/obj/machinery/portable_atmospherics/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - if((istype(W, /obj/item/tank) && !( src.destroyed ))) - if(src.holding) - return - var/obj/item/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - update_icon() +/obj/machinery/portable_atmospherics/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") return + if(!in_range(src, user)) + return + if(!ishuman(usr) && !issilicon(usr)) + return + if(holding) + to_chat(user, "You remove [holding] from [src].") + replace_tank(user, TRUE) + +/obj/machinery/portable_atmospherics/examine(mob/user) + ..() + if(holding) + to_chat(user, "\The [src] contains [holding]. Alt-click [src] to remove it.") + +/obj/machinery/portable_atmospherics/proc/replace_tank(mob/living/user, close_valve, obj/item/tank/new_tank) + if(holding) + holding.forceMove(drop_location()) + if(Adjacent(user) && !issilicon(user)) + user.put_in_hands(holding) + if(new_tank) + holding = new_tank + else + holding = null + update_icon() + return TRUE + +/obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/tank)) + if(!(stat & BROKEN)) + if(!user.drop_item()) + return + var/obj/item/tank/T = W + user.drop_item() + if(src.holding) + to_chat(user, "[holding ? "In one smooth motion you pop [holding] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].") + replace_tank(user, FALSE) + T.loc = src + src.holding = T + update_icon() + return else if(istype(W, /obj/item/wrench)) if(connected_port) diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index a7680e815ff..5bd441f6748 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -95,6 +95,16 @@ /obj/machinery/portable_atmospherics/pump/return_air() return air_contents +/obj/machinery/portable_atmospherics/pump/replace_tank(mob/living/user, close_valve) + . = ..() + if(.) + if(close_valve) + if(on) + on = FALSE + update_icon() + else if(on && holding && direction_out) + investigate_log("[key_name(user)] started a transfer into [holding].
", "atmos") + /obj/machinery/portable_atmospherics/pump/attack_ai(var/mob/user as mob) src.add_hiddenprint(user) return src.attack_hand(user) @@ -139,10 +149,14 @@ if(href_list["power"]) on = !on + if(on && direction_out) + investigate_log("[key_name(usr)] started a transfer into [holding].
", "atmos") update_icon() if(href_list["direction"]) direction_out = !direction_out + if(on && holding) + investigate_log("[key_name(usr)] started a transfer into [holding].
", "atmos") if(href_list["remove_tank"]) if(holding) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 2b294db78c9..c9e5e8ba676 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -56,6 +56,17 @@ /obj/item/circuitboard/machine board_type = "machine" +/obj/item/circuitboard/examine(mob/user) + ..() + if(LAZYLEN(req_components)) + var/list/nice_list = list() + for(var/B in req_components) + var/atom/A = B + if(!ispath(A)) + continue + nice_list += list("[req_components[A]] [initial(A.name)]") + to_chat(user,"Required components: [english_list(nice_list)].") + /obj/item/circuitboard/message_monitor name = "Circuit board (Message Monitor)" build_path = /obj/machinery/computer/message_monitor diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 5cb19358358..f4d21cbd125 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -66,14 +66,15 @@ var/time_last_changed_position = 0 /obj/machinery/computer/card/proc/get_target_rank() return modify && modify.assignment ? modify.assignment : "Unassigned" -/obj/machinery/computer/card/proc/format_jobs(list/jobs) +/obj/machinery/computer/card/proc/format_jobs(list/jobs, targetrank, list/jobformats) var/list/formatted = list() for(var/job in jobs) if(job_in_department(SSjobs.GetJob(job))) formatted.Add(list(list( "display_name" = replacetext(job, " ", " "), - "target_rank" = get_target_rank(), - "job" = job))) + "target_rank" = targetrank, + "job" = job, + "jlinkformat" = jobformats[job] ? jobformats[job] : null))) return formatted @@ -117,12 +118,14 @@ var/time_last_changed_position = 0 if(!usr.get_active_hand() && Adjacent(usr)) usr.put_in_hands(scan) scan = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else if(modify) to_chat(usr, "You remove \the [modify] from \the [src].") modify.forceMove(get_turf(src)) if(!usr.get_active_hand() && Adjacent(usr)) usr.put_in_hands(modify) modify = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else to_chat(usr, "There is nothing to remove from the console.") @@ -134,10 +137,12 @@ var/time_last_changed_position = 0 user.drop_item() id_card.loc = src scan = id_card + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else if(!modify) user.drop_item() id_card.loc = src modify = id_card + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) SSnanoui.update_uis(src) attack_hand(user) @@ -242,6 +247,7 @@ var/time_last_changed_position = 0 data["target_owner"] = modify && modify.registered_name ? modify.registered_name : "-----" data["target_rank"] = get_target_rank() data["scan_name"] = scan ? scan.name : "-----" + data["scan_owner"] = scan && scan.registered_name ? scan.registered_name : null data["authenticated"] = is_authenticated(user) data["has_modify"] = !!modify data["account_number"] = modify ? modify.associated_account_number : null @@ -249,15 +255,19 @@ var/time_last_changed_position = 0 data["all_centcom_access"] = null data["regions"] = null data["target_dept"] = target_dept + data["card_is_owned"] = modify && modify.owner_ckey - data["engineering_jobs"] = format_jobs(engineering_positions) - data["medical_jobs"] = format_jobs(medical_positions) - data["science_jobs"] = format_jobs(science_positions) - data["security_jobs"] = format_jobs(security_positions) - data["support_jobs"] = format_jobs(support_positions) - data["civilian_jobs"] = format_jobs(civilian_positions) - data["special_jobs"] = format_jobs(whitelisted_positions) - data["centcom_jobs"] = format_jobs(get_all_centcom_jobs()) + var/list/job_formats = SSjobs.format_jobs_for_id_computer(modify) + + data["top_jobs"] = format_jobs(list("Captain", "Custom"), data["target_rank"], job_formats) + data["engineering_jobs"] = format_jobs(engineering_positions, data["target_rank"], job_formats) + data["medical_jobs"] = format_jobs(medical_positions, data["target_rank"], job_formats) + data["science_jobs"] = format_jobs(science_positions, data["target_rank"], job_formats) + data["security_jobs"] = format_jobs(security_positions, data["target_rank"], job_formats) + data["support_jobs"] = format_jobs(support_positions, data["target_rank"], job_formats) + data["civilian_jobs"] = format_jobs(civilian_positions, data["target_rank"], job_formats) + data["special_jobs"] = format_jobs(whitelisted_positions, data["target_rank"], job_formats) + data["centcom_jobs"] = format_jobs(get_all_centcom_jobs(), data["target_rank"], job_formats) data["card_skins"] = format_card_skins(get_station_card_skins()) data["job_slots"] = format_job_slots() @@ -268,6 +278,9 @@ var/time_last_changed_position = 0 data["cooldown_mins"] = mins data["cooldown_secs"] = (seconds < 10) ? "0[seconds]" : seconds + if(mode == 3 && is_authenticated(user)) + data["id_change_html"] = SSjobs.fetch_transfer_record_html(is_centcom()) + if(modify) data["current_skin"] = modify.icon_state @@ -315,15 +328,18 @@ var/time_last_changed_position = 0 if(!usr.get_active_hand() && Adjacent(usr)) usr.put_in_hands(modify) modify = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else modify.forceMove(get_turf(src)) modify = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else if(Adjacent(usr)) var/obj/item/I = usr.get_active_hand() if(istype(I, /obj/item/card/id)) usr.drop_item() I.forceMove(src) modify = I + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) if("scan") if(scan) @@ -332,15 +348,18 @@ var/time_last_changed_position = 0 if(!usr.get_active_hand() && Adjacent(usr)) usr.put_in_hands(scan) scan = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else scan.forceMove(get_turf(src)) scan = null + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) else if(Adjacent(usr)) var/obj/item/I = usr.get_active_hand() if(istype(I, /obj/item/card/id)) usr.drop_item() I.forceMove(src) scan = I + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0) if("access") if(href_list["allowed"] && !target_dept) @@ -361,7 +380,7 @@ var/time_last_changed_position = 0 if("assign") if(is_authenticated(usr) && modify) var/t1 = href_list["assign_target"] - if(target_dept && modify.assignment == "Unassigned") + if(target_dept && modify.assignment == "Demoted") visible_message("[src]: Demoted individuals must see the HoP for a new job.") return 0 if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE)) @@ -373,11 +392,12 @@ var/time_last_changed_position = 0 var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN)) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) + SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name) modify.assignment = temp_t log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".") else var/list/access = list() - if(is_centcom()) + if(is_centcom() && islist(get_centcom_access(t1))) access = get_centcom_access(t1) else var/datum/job/jobdatum @@ -397,6 +417,16 @@ var/time_last_changed_position = 0 if(t1 == "Civilian") message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name) + SSjobs.slot_job_transfer(modify.rank, t1) + + var/mob/living/carbon/human/H = modify.getPlayer() + if(istype(H)) + if(jobban_isbanned(H, t1)) + message_admins("[ADMIN_FULLMONTY(H)] has been assigned the job [t1], in possible violation of their job ban.") + if(H.mind) + H.mind.playtime_role = t1 + modify.access = access modify.rank = t1 modify.assignment = t1 @@ -426,6 +456,20 @@ var/time_last_changed_position = 0 if("mode") mode = text2num(href_list["mode_target"]) + if("wipe_my_logs") + if(is_authenticated(usr) && is_centcom()) + var/delcount = SSjobs.delete_log_records(scan.registered_name, FALSE) + if(delcount) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + SSnanoui.update_uis(src) + + if("wipe_all_logs") + if(is_authenticated(usr) && !target_dept) + var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE) + if(delcount) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + SSnanoui.update_uis(src) + if("print") if(!printing && !target_dept) printing = 1 @@ -464,14 +508,15 @@ var/time_last_changed_position = 0 var/jobnamedata = modify.getRankAndAssignment() log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") + SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name) modify.assignment = "Terminated" modify.access = list() callHook("terminate_employee", list(modify)) if("demote") if(is_authenticated(usr)) - if(modify.assignment == "Unassigned") - visible_message("[src]: Unassigned crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.") + if(modify.assignment == "Demoted") + visible_message("[src]: Demoted crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.") return 0 if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE)) visible_message("[src]: Heads may only demote members of their own department.") @@ -482,12 +527,13 @@ var/time_last_changed_position = 0 access = jobdatum.get_access() var/jobnamedata = modify.getRankAndAssignment() - log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".") - message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".") + log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Demoted)\".") + message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Demoted)\".") + SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Demoted", scan.registered_name) modify.access = access modify.rank = "Civilian" - modify.assignment = "Unassigned" + modify.assignment = "Demoted" modify.icon_state = "id" if("make_job_available") diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm index a5198da6e56..b39c005855c 100644 --- a/code/game/machinery/computer/power.dm +++ b/code/game/machinery/computer/power.dm @@ -38,7 +38,7 @@ if(isturf(T)) attached = locate() in T if(attached) - return attached.get_powernet() + return attached.powernet /obj/machinery/computer/monitor/attack_ai(mob/user) attack_hand(user) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 21ff909796f..3838a52325f 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -87,10 +87,7 @@ if(operating || !density) return add_fingerprint(user) - if(!requiresID()) - user = null - - if(allowed(user)) + if(!requiresID() || allowed(user)) open_and_close() else do_animate("deny") @@ -217,7 +214,7 @@ return attack_hand(user) /obj/machinery/door/window/attack_hand(mob/user) - return attackby(user, user) + return bumpopen(user) /obj/machinery/door/window/emag_act(mob/user, obj/weapon) if(!operating && density && !emagged) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 1b3dfe19001..bb5847fc6fb 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -2,8 +2,8 @@ name = "Pipe Dispenser" icon = 'icons/obj/stationobjs.dmi' icon_state = "pipe_d" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE var/unwrenched = 0 var/wait = 0 @@ -75,29 +75,25 @@ /obj/machinery/pipedispenser/Topic(href, href_list) if(..() || unwrenched) - return 1 + return usr.set_machine(src) add_fingerprint(usr) + if(world.time < wait + 4) + return + wait = world.time if(href_list["make"]) - if(!wait) - var/p_type = text2num(href_list["make"]) - var/p_dir = text2num(href_list["dir"]) - var/obj/item/pipe/P = new (loc, pipe_type=p_type, dir=p_dir) - P.update() - P.add_fingerprint(usr) - wait = world.time + 10 + var/p_type = text2num(href_list["make"]) + var/p_dir = text2num(href_list["dir"]) + var/obj/item/pipe/P = new (loc, pipe_type=p_type, dir=p_dir) + P.update() + P.add_fingerprint(usr) if(href_list["makemeter"]) - if(wait < world.time) - new /obj/item/pipe_meter(loc) - wait = world.time + 15 + new /obj/item/pipe_meter(loc) if(href_list["makegsensor"]) - if(!wait) - new /obj/item/pipe_gsensor(loc) - wait = 1 - spawn(15) - wait = 0 + new /obj/item/pipe_gsensor(loc) + return TRUE /obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob, params) add_fingerprint(usr) @@ -140,8 +136,6 @@ name = "Disposal Pipe Dispenser" icon = 'icons/obj/stationobjs.dmi' icon_state = "pipe_d" - density = 1 - anchored = 1.0 //Allow you to drag-drop disposal pipes into it /obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe, mob/usr) @@ -182,16 +176,10 @@ popup.open() /obj/machinery/pipedispenser/disposal/Topic(href, href_list) - if(..() || unwrenched) - return 1 - - usr.set_machine(src) - add_fingerprint(usr) - - if(wait < world.time) + if(!..()) + return + if(href_list["dmake"]) var/p_type = text2num(href_list["dmake"]) var/obj/structure/disposalconstruct/C = new(loc, p_type) if(p_type in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE)) C.density = TRUE - C.add_fingerprint(usr) - wait = world.time + 15 diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 304dc7dc639..6422e94dc74 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -188,11 +188,11 @@ /obj/machinery/power/singularity_beacon/process() if(!active) return PROCESS_KILL + + if(surplus() >= 1500) + add_load(1500) else - if(surplus() > 1500) - draw_power(1500) - else - Deactivate() + Deactivate() /obj/machinery/power/singularity_beacon/syndicate icontype = "beaconsynd" diff --git a/code/game/machinery/telecomms/ntsl2.dm b/code/game/machinery/telecomms/ntsl2.dm index f01f173ebb3..604fcdfbe7e 100644 --- a/code/game/machinery/telecomms/ntsl2.dm +++ b/code/game/machinery/telecomms/ntsl2.dm @@ -10,109 +10,109 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new()) */ /datum/nttc_configuration // ALL OF THE JOB CRAP - // Dict of all jobs and their colors + // Dict of all jobs and their department color classes var/all_jobs = list( // AI - "AI" = "#FF00FF", - "Android" = "#FF00FF", - "Cyborg" = "#FF00FF", - "Personal AI" = "#FF00FF", - "Robot" = "#FF00FF", + "AI" = "airadio", + "Android" = "airadio", + "Cyborg" = "airadio", + "Personal AI" = "airadio", + "Robot" = "airadio", // Civilian + Varients - "Assistant" = "#408010", - "Businessman" = "#408010", - "Civilian" = "#408010", - "Tourist" = "#408010", - "Trader" = "#408010", + "Assistant" = "radio", + "Businessman" = "radio", + "Civilian" = "radio", + "Tourist" = "radio", + "Trader" = "radio", // Command (Solo command, not department heads) - "Blueshield" = "#204090", - "Captain" = "#204090", - "Head of Personnel" = "#204090", - "Nanotrasen Representative" = "#204090", + "Blueshield" = "comradio", + "Captain" = "comradio", + "Head of Personnel" = "comradio", + "Nanotrasen Representative" = "comradio", // Engineeering - "Atmospheric Technician" = "#A66300", - "Chief Engineer" = "#A66300", - "Electrician" = "#A66300", - "Engine Technician" = "#A66300", - "Life Support Specialist" = "#A66300", - "Maintenance Technician" = "#A66300", - "Mechanic" = "#A66300", - "Station Engineer" = "#A66300", + "Atmospheric Technician" = "engradio", + "Chief Engineer" = "engradio", + "Electrician" = "engradio", + "Engine Technician" = "engradio", + "Life Support Specialist" = "engradio", + "Maintenance Technician" = "engradio", + "Mechanic" = "engradio", + "Station Engineer" = "engradio", // ERT - "Emergency Response Team Engineer" = "#5C5C7C", - "Emergency Response Team Leader" = "#5C5C7C", - "Emergency Response Team Medic" = "#5C5C7C", - "Emergency Response Team Member" = "#5C5C7C", - "Emergency Response Team Officer" = "#5C5C7C", + "Emergency Response Team Engineer" = "dsquadradio", // I know this says deathsquad but the class for responseteam is neon green. No. + "Emergency Response Team Leader" = "dsquadradio", + "Emergency Response Team Medic" = "dsquadradio", + "Emergency Response Team Member" = "dsquadradio", + "Emergency Response Team Officer" = "dsquadradio", // Medical - "Chemist" = "#009190", - "Chief Medical Officer" = "#009190", - "Coroner" = "#009190", - "Medical Doctor" = "#009190", - "Microbiologist" = "#009190", - "Nurse" = "#009190", - "Paramedic" = "#009190", - "Pharmacologist" = "#009190", - "Pharmacist" = "#009190", - "Psychiatrist" = "#009190", - "Psychologist" = "#009190", - "Surgeon" = "#009190", - "Therapist" = "#009190", - "Virologist" = "#009190", + "Chemist" = "medradio", + "Chief Medical Officer" = "medradio", + "Coroner" = "medradio", + "Medical Doctor" = "medradio", + "Microbiologist" = "medradio", + "Nurse" = "medradio", + "Paramedic" = "medradio", + "Pharmacologist" = "medradio", + "Pharmacist" = "medradio", + "Psychiatrist" = "medradio", + "Psychologist" = "medradio", + "Surgeon" = "medradio", + "Therapist" = "medradio", + "Virologist" = "medradio", // Science - "Anomalist" = "#993399", - "Biomechanical Engineer" = "#993399", - "Chemical Researcher" = "#993399", - "Geneticist" = "#993399", - "Mechatronic Engineer" = "#993399", - "Plasma Researcher" = "#993399", - "Research Director" = "#993399", - "Roboticist" = "#993399", - "Scientist" = "#993399", - "Xenoarcheologist" = "#993399", - "Xenobiologist" = "#993399", + "Anomalist" = "sciradio", + "Biomechanical Engineer" = "sciradio", + "Chemical Researcher" = "sciradio", + "Geneticist" = "sciradio", + "Mechatronic Engineer" = "sciradio", + "Plasma Researcher" = "sciradio", + "Research Director" = "sciradio", + "Roboticist" = "sciradio", + "Scientist" = "sciradio", + "Xenoarcheologist" = "sciradio", + "Xenobiologist" = "sciradio", // Security - "Brig Physician" = "#A30000", - "Detective" = "#A30000", - "Forensic Technician" = "#A30000", - "Head of Security" = "#A30000", - "Human Resources Agent" = "#A30000", - "Internal Affairs Agent" = "#A30000", - "Magistrate" = "#A30000", - "Security Officer" = "#A30000", - "Security Pod Pilot" = "#A30000", - "Warden" = "#A30000", + "Brig Physician" = "secradio", + "Detective" = "secradio", + "Forensic Technician" = "secradio", + "Head of Security" = "secradio", + "Human Resources Agent" = "secradio", + "Internal Affairs Agent" = "secradio", + "Magistrate" = "secradio", + "Security Officer" = "secradio", + "Security Pod Pilot" = "secradio", + "Warden" = "secradio", // Supply - "Quartermaster" = "#7F6539", - "Cargo Technician" = "#7F6539", - "Shaft Miner" = "#7F6539", - "Spelunker" = "#7F6539", + "Quartermaster" = "supradio", + "Cargo Technician" = "supradio", + "Shaft Miner" = "supradio", + "Spelunker" = "supradio", // Service - "Barber" = "#80A000", - "Bartender" = "#80A000", - "Beautician" = "#80A000", - "Botanical Researcher" = "#80A000", - "Botanist" = "#80A000", - "Butcher" = "#80A000", - "Chaplain" = "#80A000", - "Chef" = "#80A000", - "Clown" = "#80A000", - "Cook" = "#80A000", - "Culinary Artist" = "#80A000", - "Custodial Technician" = "#80A000", - "Hair Stylist" = "#80A000", - "Hydroponicist" = "#80A000", - "Janitor" = "#80A000", - "Journalist" = "#80A000", - "Librarian" = "#80A000", - "Mime" = "#80A000", + "Barber" = "srvradio", + "Bartender" = "srvradio", + "Beautician" = "srvradio", + "Botanical Researcher" = "srvradio", + "Botanist" = "srvradio", + "Butcher" = "srvradio", + "Chaplain" = "srvradio", + "Chef" = "srvradio", + "Clown" = "srvradio", + "Cook" = "srvradio", + "Culinary Artist" = "srvradio", + "Custodial Technician" = "srvradio", + "Hair Stylist" = "srvradio", + "Hydroponicist" = "srvradio", + "Janitor" = "srvradio", + "Journalist" = "srvradio", + "Librarian" = "srvradio", + "Mime" = "srvradio", ) // Just command members var/heads = list("Captain", "Head of Personnel", "Nanotrasen Representative", "Blueshield", "Chief Engineer", "Chief Medical Officer", "Research Director", "Head of Security") // Just ERT var/ert_jobs = list("Emergency Response Team Officer", "Emergency Response Team Engineer", "Emergency Response Team Medic", "Emergency Response Team Leader", "Emergency Response Team Member") // Defined so code compiles and incase someone has a non-standard job - var/job_color = "#000000" + var/job_class = "radio" // NOW FOR ACTUAL TOGGLES /* Simple Toggles */ var/toggle_activated = TRUE @@ -274,10 +274,10 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new()) // All job and coloring shit if(toggle_job_color || toggle_name_color) var/job = signal.data["job"] - job_color = all_jobs[job] + job_class = all_jobs[job] if(toggle_name_color) - var/new_name = "" + signal.data["name"] + "" + var/new_name = "" + signal.data["name"] + "" signal.data["name"] = new_name signal.data["realname"] = new_name // this is required because the broadcaster uses this directly if the speaker doesn't have a voice changer on @@ -289,13 +289,13 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new()) if(toggle_job_color) switch(job_indicator_type) if(JOB_STYLE_1) - new_name = signal.data["name"] + " ([job]) " + new_name = signal.data["name"] + " ([job]) " if(JOB_STYLE_2) - new_name = signal.data["name"] + " - [job] " + new_name = signal.data["name"] + " - [job] " if(JOB_STYLE_3) - new_name = "\[[job]\] " + signal.data["name"] + " " + new_name = "\[[job]\] " + signal.data["name"] + " " if(JOB_STYLE_4) - new_name = "([job]) " + signal.data["name"] + " " + new_name = "([job]) " + signal.data["name"] + " " else switch(job_indicator_type) if(JOB_STYLE_1) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d0872fa8f93..dc4b9124d77 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -741,6 +741,8 @@ throw_item.throw_at(target, 16, 3, src) visible_message("[src] launches [throw_item.name] at [target.name]!") +/obj/machinery/vending/onTransitZ() + return /* * Vending machine types */ diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 057c52a2a4c..b7311519f7a 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -140,8 +140,8 @@ /obj/item/suppressor = 4, /obj/item/clothing/under/chameleon = 2, /obj/item/stamp/chameleon = 2, - /obj/item/clothing/shoes/syndigaloshes = 5, - /obj/item/clothing/mask/gas/voice = 2, + /obj/item/clothing/shoes/chameleon/noslip = 5, + /obj/item/clothing/mask/chameleon = 2, /obj/item/dnascrambler = 1, /obj/item/storage/backpack/satchel_flat = 2, /obj/item/storage/toolbox/syndicate = 2, diff --git a/code/game/objects/effects/spawners/random_spawners.dm b/code/game/objects/effects/spawners/random_spawners.dm index 510e5b90380..03e49c56a50 100644 --- a/code/game/objects/effects/spawners/random_spawners.dm +++ b/code/game/objects/effects/spawners/random_spawners.dm @@ -214,7 +214,7 @@ /obj/item/storage/pill_bottle/zoom = 1, /obj/item/storage/pill_bottle/random_drug_bottle = 2, /obj/item/storage/backpack/duffel/syndie/surgery = 1, - /obj/item/clothing/shoes/syndigaloshes = 1, + /obj/item/clothing/shoes/chameleon/noslip = 1, /obj/item/storage/belt/military = 1, /obj/item/clothing/under/chameleon = 1, /obj/item/storage/backpack/satchel_flat = 1, diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 77b263fb8f2..23509a06f63 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -100,6 +100,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/trip_walksafe = TRUE var/trip_tiles = 0 + //Tooltip vars + var/in_inventory = FALSE //is this item equipped into an inventory slot or hand of a mob? + var/tip_timer = 0 + /obj/item/New() ..() for(var/path in actions_types) @@ -340,11 +344,13 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d A.Remove(user) if(flags & DROPDEL) qdel(src) + in_inventory = FALSE SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user) + in_inventory = TRUE return TRUE // called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. @@ -374,6 +380,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/datum/action/A = X if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. A.Grant(user) + in_inventory = TRUE /obj/item/proc/item_action_slot_check(slot, mob/user) return 1 @@ -532,6 +539,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(callback) //call the original callback . = callback.Invoke() throw_speed = initial(throw_speed) //explosions change this. + in_inventory = FALSE /obj/item/proc/pwr_drain() return 0 // Process Kill @@ -578,4 +586,23 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d return TRUE /obj/item/attack_hulk(mob/living/carbon/human/user) - return FALSE \ No newline at end of file + return FALSE + +/obj/item/proc/openTip(location, control, params, user) + openToolTip(user, src, params, title = name, content = "[desc]", theme = "") + +/obj/item/MouseEntered(location, control, params) + if(in_inventory) + var/timedelay = 8 + var/user = usr + tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE) + +/obj/item/MouseExited() + deltimer(tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes + closeToolTip(usr) + +/obj/item/proc/update_slot_icon() + if(!ismob(loc)) + return + var/mob/owner = loc + owner.regenerate_icons() diff --git a/code/game/objects/items/dehy_carp.dm b/code/game/objects/items/dehy_carp.dm index 3125c24837a..a975a0b4d06 100644 --- a/code/game/objects/items/dehy_carp.dm +++ b/code/game/objects/items/dehy_carp.dm @@ -37,7 +37,7 @@ visible_message("[src] swells up!") // Animation - icon = 'icons/mob/animal.dmi' + icon = 'icons/mob/carp.dmi' flick("carp_swell", src) // Wait for animation to end sleep(6) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 316b937f749..e65c9a683a7 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -307,6 +307,9 @@ brightness_on = 7 icon_state = "torch" item_state = "torch" + lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items_righthand.dmi' + light_color = LIGHT_COLOR_ORANGE on_damage = 10 /obj/item/flashlight/slime diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 59a7a650383..941e90a31ef 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -35,7 +35,7 @@ return if(H.mind) span = H.mind.speech_span - if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice) || istype(H.get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown)) + if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice)) span = "sans" if(spamcheck) to_chat(user, "\The [src] needs to recharge!") diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 463223f4268..562800c2ce0 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -1,3 +1,7 @@ +#define DISCONNECTED 0 +#define CLAMPED_OFF 1 +#define OPERATING 2 + // Powersink - used to drain station power /obj/item/powersink @@ -13,28 +17,55 @@ throw_range = 2 materials = list(MAT_METAL=750) origin_tech = "powerstorage=5;syndicate=5" - var/drain_rate = 1600000 // amount of power to drain per tick - var/apc_drain_rate = 50 // Max. amount drained from single APC. In Watts. - var/dissipation_rate = 20000 // Passive dissipation of drained power. In Watts. - var/power_drained = 0 // Amount of power drained. - var/max_power = 1e10 // Detonation point. - var/mode = 0 // 0 = off, 1=clamped (off), 2=operating - var/drained_this_tick = 0 // This is unfortunately necessary to ensure we process powersinks BEFORE other machinery such as APCs. - var/admins_warned = 0 // stop spam, only warn the admins once that we are about to go boom + var/drain_rate = 2000000 // amount of power to drain per tick + var/power_drained = 0 // has drained this much power + var/max_power = 6e8 // maximum power that can be drained before exploding + var/mode = 0 // 0 = off, 1=clamped (off), 2=operating + var/admins_warned = FALSE // stop spam, only warn the admins once that we are about to boom - var/datum/powernet/PN // Our powernet var/obj/structure/cable/attached // the attached cable /obj/item/powersink/Destroy() STOP_PROCESSING(SSobj, src) - GLOB.processing_power_items.Remove(src) - PN = null attached = null return ..() -/obj/item/powersink/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/screwdriver)) - if(mode == 0) +/obj/item/powersink/update_icon() + icon_state = "powersink[mode == OPERATING]" + +/obj/item/powersink/proc/set_mode(value) + if(value == mode) + return + switch(value) + if(DISCONNECTED) + attached = null + if(mode == OPERATING) + STOP_PROCESSING(SSobj, src) + anchored = FALSE + density = FALSE + + if(CLAMPED_OFF) + if(!attached) + return + if(mode == OPERATING) + STOP_PROCESSING(SSobj, src) + anchored = TRUE + density = TRUE + + if(OPERATING) + if(!attached) + return + START_PROCESSING(SSobj, src) + anchored = TRUE + density = TRUE + + mode = value + update_icon() + set_light(0) + +/obj/item/powersink/attackby(obj/item/I, mob/user) + if(isscrewdriver(I)) + if(mode == DISCONNECTED) var/turf/T = loc if(isturf(T) && !T.intact) attached = locate() in T @@ -42,98 +73,81 @@ to_chat(user, "No exposed cable here to attach to.") return else - anchored = 1 - mode = 1 - src.visible_message("[user] attaches [src] to the cable!") + set_mode(CLAMPED_OFF) + visible_message("[user] attaches [src] to the cable!") message_admins("Power sink activated by [key_name_admin(user)] at ([x],[y],[z] - JMP)") log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])") - return else to_chat(user, "Device must be placed over an exposed cable to attach to it.") - return else - if(mode == 2) - STOP_PROCESSING(SSobj, src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite - GLOB.processing_power_items.Remove(src) - anchored = 0 - mode = 0 + set_mode(DISCONNECTED) src.visible_message("[user] detaches [src] from the cable!") - set_light(0) - icon_state = "powersink0" - - return else - ..() + return ..() /obj/item/powersink/attack_ai() return /obj/item/powersink/attack_hand(var/mob/user) switch(mode) - if(0) + if(DISCONNECTED) ..() - if(1) - src.visible_message("[user] activates [src]!") - mode = 2 - icon_state = "powersink1" - START_PROCESSING(SSobj, src) - GLOB.processing_power_items.Add(src) - if(2) //This switch option wasn't originally included. It exists now. --NeoFite - src.visible_message("[user] deactivates [src]!") - mode = 1 - set_light(0) - icon_state = "powersink0" - STOP_PROCESSING(SSobj, src) - GLOB.processing_power_items.Remove(src) - -/obj/item/powersink/pwr_drain() - if(!attached) - return 0 - - if(drained_this_tick) - return 1 - drained_this_tick = 1 - - var/drained = 0 - - if(!PN) - return 1 - - set_light(12) - PN.trigger_warning() - // found a powernet, so drain up to max power from it - drained = PN.draw_power(drain_rate) - // if tried to drain more than available on powernet - // now look for APCs and drain their cells - if(drained < drain_rate) - for(var/obj/machinery/power/terminal/T in PN.nodes) - // Enough power drained this tick, no need to torture more APCs - if(drained >= drain_rate) - break - if(istype(T.master, /obj/machinery/power/apc)) - var/obj/machinery/power/apc/A = T.master - if(A.operating && A.cell) - A.cell.charge = max(0, A.cell.charge - apc_drain_rate) - drained += apc_drain_rate - if(A.charging == 2) // If the cell was full - A.charging = 1 // It's no longer full - power_drained += drained - return 1 + if(CLAMPED_OFF) + user.visible_message( \ + "[user] activates \the [src]!", \ + "You activate \the [src].", + "You hear a click.") + message_admins("Power sink activated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(src)]") + log_game("Power sink activated by [key_name(user)] at [AREACOORD(src)]") + set_mode(OPERATING) + if(OPERATING) + user.visible_message( \ + "[user] deactivates \the [src]!", \ + "You deactivate \the [src].", + "You hear a click.") + set_mode(CLAMPED_OFF) /obj/item/powersink/process() - drained_this_tick = 0 - power_drained -= min(dissipation_rate, power_drained) + if(!attached) + set_mode(DISCONNECTED) + return + + var/datum/powernet/PN = attached.powernet + if(PN) + set_light(5) + + // found a powernet, so drain up to max power from it + + var/drained = min (drain_rate, attached.newavail()) + attached.add_delayedload(drained) + power_drained += drained + + // if tried to drain more than available on powernet + // now look for APCs and drain their cells + if(drained < drain_rate) + for(var/obj/machinery/power/terminal/T in PN.nodes) + if(istype(T.master, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/A = T.master + if(A.operating && A.cell) + A.cell.charge = max(0, A.cell.charge - 50) + power_drained += 50 + if(A.charging == 2) // If the cell was full + A.charging = 1 // It's no longer full + if(drained >= drain_rate) + break + if(power_drained > max_power * 0.98) - if(!admins_warned) - admins_warned = 1 + if (!admins_warned) + admins_warned = TRUE message_admins("Power sink at ([x],[y],[z] - JMP) is 95% full. Explosion imminent.") playsound(src, 'sound/effects/screech.ogg', 100, 1, 1) + if(power_drained >= max_power) + STOP_PROCESSING(SSobj, src) explosion(src.loc, 4,8,16,32) qdel(src) - return - if(attached && attached.powernet) - PN = attached.powernet - else - PN = null + +#undef DISCONNECTED +#undef CLAMPED_OFF +#undef OPERATING \ No newline at end of file diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 83a8c9304a1..00efc83668b 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -397,7 +397,6 @@ var/global/list/default_medbay_channels = list( var/mob/living/carbon/human/H = M displayname = H.voice if(H.voice != real_name) - jobname = "Unknown" voicemask = TRUE if(syndiekey && syndiekey.change_voice && connection.frequency == SYND_FREQ) diff --git a/code/game/objects/items/devices/voice.dm b/code/game/objects/items/devices/voice.dm new file mode 100644 index 00000000000..339271cdcca --- /dev/null +++ b/code/game/objects/items/devices/voice.dm @@ -0,0 +1,44 @@ +/obj/item/voice_changer + name = "voice changer" + desc = "A voice scrambling module." + icon = 'icons/obj/device.dmi' + icon_state = "voice_changer_off" + + actions_types = list(/datum/action/item_action/voice_changer/toggle, /datum/action/item_action/voice_changer/voice) + + var/obj/item/parent + + var/voice + var/active + +/obj/item/voice_changer/New() + . = ..() + + if(isitem(loc)) + parent = loc + parent.actions |= actions + +/obj/item/voice_changer/Destroy() + if(isitem(parent)) + parent.actions -= actions + + return ..() + +/obj/item/voice_changer/attack_self(mob/user) + active = !active + icon_state = "voice_changer_[active ? "on" : "off"]" + to_chat(user, "You toggle [src] [active ? "on" : "off"].") + + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + +/obj/item/voice_changer/proc/set_voice(mob/user) + var/chosen_voice = input(user, "What voice would you like to mimic? Leave this empty to use the voice on your ID card.", "Set Voice Changer", voice) as text + if(!chosen_voice) + voice = null + to_chat(user, "You are now mimicking the voice on your ID card.") + return + + voice = sanitize(copytext(chosen_voice, 1, MAX_MESSAGE_LEN)) + to_chat(user, "You are now mimicking [voice].") \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index abc328a8bf1..2c1222154b0 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -240,6 +240,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \ var/global/list/datum/stack_recipe/cardboard_recipes = list ( new /datum/stack_recipe("box", /obj/item/storage/box), new /datum/stack_recipe("large box", /obj/item/storage/box/large, 4), + new /datum/stack_recipe("patch pack", /obj/item/storage/pill_bottle/patch_pack, 2), new /datum/stack_recipe("light tubes", /obj/item/storage/box/lights/tubes), new /datum/stack_recipe("light bulbs", /obj/item/storage/box/lights/bulbs), new /datum/stack_recipe("mouse traps", /obj/item/storage/box/mousetraps), diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 5cab26e062b..b0a1286d3b2 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -54,7 +54,7 @@ to_chat(user, "There are [amount] [singular_name]\s in the stack.") else to_chat(user, "There are [amount] [name]\s in the stack.") - to_chat(user,"Ctrl-Shift-click to take a custom amount.") + to_chat(user,"Alt-click to take a custom amount.") /obj/item/stack/proc/add(newamount) amount += newamount @@ -263,7 +263,7 @@ else ..() -/obj/item/stack/CtrlShiftClick(mob/living/user) +/obj/item/stack/AltClick(mob/living/user) if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return @@ -276,7 +276,7 @@ //get amount from user var/min = 0 var/max = get_amount() - var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as num) + var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as null|num) if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount()) return change_stack(user,stackmaterial) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 19864e0ba18..393ca1f3c0b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1066,6 +1066,32 @@ obj/item/toy/cards/deck/syndicate/black name = "tuxedo cat plushie" icon_state = "tuxedocat" +//New generation TG plushies + +/obj/item/toy/plushie/lizardplushie + name = "lizard plushie" + desc = "An adorable stuffed toy that resembles a lizardperson." + icon_state = "plushie_lizard" + item_state = "plushie_lizard" + +/obj/item/toy/plushie/snakeplushie + name = "snake plushie" + desc = "An adorable stuffed toy that resembles a snake. Not to be mistaken for the real thing." + icon_state = "plushie_snake" + item_state = "plushie_snake" + +/obj/item/toy/plushie/nukeplushie + name = "operative plushie" + desc = "An stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious." + icon_state = "plushie_nuke" + item_state = "plushie_nuke" + +/obj/item/toy/plushie/slimeplushie + name = "slime plushie" + desc = "An adorable stuffed toy that resembles a slime. It is practically just a hacky sack." + icon_state = "plushie_slime" + item_state = "plushie_slime" + /* * Foam Armblade */ diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 150b21692f2..74318bfa16d 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -98,6 +98,8 @@ //alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system var/assignment = null //can be alt title or the actual job var/rank = null //actual job + var/owner_uid + var/owner_ckey var/dorm = 0 // determines if this ID has claimed a dorm already var/sex @@ -195,6 +197,19 @@ jobnamedata += " (" + assignment + ")" return jobnamedata +/obj/item/card/id/proc/getPlayer() + if(owner_uid) + var/mob/living/carbon/human/H = locateUID(owner_uid) + if(istype(H) && H.ckey == owner_ckey) + return H + owner_uid = null + if(owner_ckey) + for(var/mob/M in GLOB.player_list) + if(M.ckey && M.ckey == owner_ckey) + owner_uid = M.UID() + return M + owner_ckey = null + /obj/item/card/id/proc/is_untrackable() return untrackable diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 666c14801d8..40fc1bf7d56 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -112,10 +112,9 @@ /obj/item/dice/attack_self(mob/user as mob) diceroll(user) -/obj/item/dice/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) - if(!..()) - return - diceroll(thrower) +/obj/item/dice/throw_impact(atom/target) + diceroll(thrownby) + . = ..() /obj/item/dice/proc/diceroll(mob/user) result = rand(1, sides) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index d2f2ed2c54d..c7627688b5e 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -668,4 +668,27 @@ /obj/item/dnainjector/m2h/Initialize() block = MONKEYBLOCK + ..() + + +/obj/item/dnainjector/comic + name = "DNA-Injector (Comic)" + desc = "Honk!" + datatype = DNA2_BUF_SE + value = 0xFFF + forcedmutation = TRUE + +/obj/item/dnainjector/comic/Initialize() + block = COMICBLOCK + ..() + +/obj/item/dnainjector/anticomic + name = "DNA-Injector (Ant-Comic)" + desc = "Honk...?" + datatype = DNA2_BUF_SE + value = 0x001 + forcedmutation = TRUE + +/obj/item/dnainjector/anticomic/Initialize() + block = COMICBLOCK ..() \ No newline at end of file diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 297966525f0..66e0ba6b110 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -152,8 +152,14 @@ breakouttime = 35//easy to apply, easy to break out of gender = NEUTER origin_tech = "engineering=3;combat=1" + hitsound = 'sound/effects/snap.ogg' var/weaken = 0 +/obj/item/restraints/legcuffs/bola/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) + playsound(loc,'sound/weapons/bolathrow.ogg', 50, TRUE) + if(!..()) + return + /obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom) if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed, return//abort @@ -166,6 +172,7 @@ feedback_add_details("handcuffs","B") to_chat(C, "[src] ensnares you!") C.Weaken(weaken) + playsound(loc, hitsound, 50, TRUE) /obj/item/restraints/legcuffs/bola/tactical //traitor variant name = "reinforced bola" diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index e5ee3562228..56ae2864071 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -112,7 +112,7 @@ ..() new /obj/item/clothing/under/rank/clown(src) new /obj/item/clothing/shoes/magboots/clown(src) - new /obj/item/clothing/mask/gas/voice/clown(src) + new /obj/item/clothing/mask/chameleon(src) new /obj/item/radio/headset/headset_service(src) new /obj/item/pda/clown(src) new /obj/item/storage/box/survival(src) @@ -124,6 +124,7 @@ new /obj/item/reagent_containers/food/drinks/bottle/bottleofbanana(src) new /obj/item/instrument/bikehorn(src) new /obj/item/bikehorn(src) + new /obj/item/dnainjector/comic(src) /obj/item/storage/backpack/mime name = "Parcel Parceaux" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index e406b097bee..9b1e89769cb 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -4,23 +4,22 @@ icon = 'icons/obj/clothing/belts.dmi' icon_state = "utilitybelt" item_state = "utility" + lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi' slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") var/use_item_overlays = 0 // Do we have overlays for items held inside the belt? - /obj/item/storage/belt/update_icon() if(use_item_overlays) overlays.Cut() for(var/obj/item/I in contents) overlays += "[I.name]" - ..() /obj/item/storage/belt/proc/can_use() return is_equipped() - /obj/item/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location) var/mob/M = usr if(!istype(over_object, /obj/screen)) @@ -68,7 +67,7 @@ new /obj/item/weldingtool(src) new /obj/item/crowbar(src) new /obj/item/wirecutters(src) - new /obj/item/stack/cable_coil(src, 30, pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)) + new /obj/item/stack/cable_coil/random(src, 30) update_icon() /obj/item/storage/belt/utility/full/multitool/New() @@ -99,7 +98,7 @@ new /obj/item/crowbar/power(src) new /obj/item/weldingtool/experimental(src)//This can be changed if this is too much new /obj/item/multitool(src) - new /obj/item/stack/cable_coil(src, 30, pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)) + new /obj/item/stack/cable_coil/random(src, 30) new /obj/item/extinguisher/mini(src) new /obj/item/analyzer(src) update_icon() @@ -184,7 +183,6 @@ new /obj/item/reagent_containers/food/pill/salicylic(src) update_icon() - /obj/item/storage/belt/botany name = "botanist belt" desc = "Can hold various botanical supplies." @@ -207,7 +205,6 @@ /obj/item/wrench, ) - /obj/item/storage/belt/security name = "security belt" desc = "Can hold security gear like handcuffs and flashes." @@ -472,7 +469,6 @@ ..() update_icon() - /obj/item/storage/belt/holster name = "shoulder holster" desc = "A holster to conceal a carried handgun. WARNING: Badasses only." @@ -510,7 +506,6 @@ W.charges = W.max_charges update_icon() - /obj/item/storage/belt/fannypack name = "fannypack" desc = "A dorky fannypack for keeping small items in." @@ -599,7 +594,6 @@ // Bluespace Belt // ------------------------------------- - /obj/item/storage/belt/bluespace name = "Belt of Holding" desc = "The greatest in pants-supporting technology." @@ -632,8 +626,6 @@ var/bolacount = 0 var/cooldown = 0 - - /obj/item/storage/belt/bluespace/owlman/New() ..() new /obj/item/grenade/smokebomb(src) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 507d6fdb9f3..581ace78ef9 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -312,6 +312,7 @@ if(usr.s_active) usr.s_active.show_to(usr) W.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt + W.in_inventory = TRUE update_icon() return 1 diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index ecf1acd701e..56db11ad058 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -5,7 +5,7 @@ if("bloodyspai") // 28TC new /obj/item/twohanded/garrote(src) new /obj/item/pinpointer/advpinpointer(src) - new /obj/item/clothing/mask/gas/voice(src) + new /obj/item/clothing/mask/chameleon(src) new /obj/item/clothing/under/chameleon(src) new /obj/item/card/id/syndicate(src) new /obj/item/flashlight/emp(src) @@ -19,7 +19,7 @@ new /obj/item/chameleon(src) new /obj/item/clothing/gloves/color/black/thief(src) new /obj/item/card/id/syndicate(src) - new /obj/item/clothing/shoes/syndigaloshes(src) + new /obj/item/clothing/shoes/chameleon/noslip(src) new /obj/item/storage/box/syndie_kit/safecracking(src) return @@ -83,14 +83,14 @@ new /obj/item/dnainjector/telemut/darkbundle(src) new /obj/item/clothing/suit/hooded/chaplain_hoodie(src) new /obj/item/card/id/syndicate(src) - new /obj/item/clothing/shoes/syndigaloshes(src) - new /obj/item/clothing/mask/gas/voice(src) + new /obj/item/clothing/shoes/chameleon/noslip(src) + new /obj/item/clothing/mask/chameleon(src) return if("gadgets") // 30TC new /obj/item/clothing/gloves/color/yellow/power(src) new /obj/item/pen/sleepy(src) - new /obj/item/clothing/shoes/syndigaloshes(src) + new /obj/item/clothing/shoes/chameleon/noslip(src) new /obj/item/clothing/glasses/thermal/syndi(src) new /obj/item/flashlight/emp(src) new /obj/item/stamp/chameleon(src) @@ -340,4 +340,21 @@ To apply, hold the injector a short distance away from the outer thigh before ap new /obj/item/clothing/gloves/color/latex/nitrile(src) new /obj/item/clothing/mask/balaclava(src) new /obj/item/clothing/accessory/stethoscope(src) - new /obj/item/book/manual/engineering_hacking(src) \ No newline at end of file + new /obj/item/book/manual/engineering_hacking(src) + +/obj/item/storage/box/syndie_kit/chameleon + name = "chameleon kit" + +/obj/item/storage/box/syndie_kit/chameleon/New() + ..() + new /obj/item/clothing/under/chameleon(src) + new /obj/item/clothing/suit/chameleon(src) + new /obj/item/clothing/gloves/chameleon(src) + new /obj/item/clothing/shoes/chameleon(src) + new /obj/item/clothing/glasses/chameleon(src) + new /obj/item/clothing/head/chameleon(src) + new /obj/item/clothing/mask/chameleon(src) + new /obj/item/storage/backpack/chameleon(src) + new /obj/item/radio/headset/chameleon(src) + new /obj/item/stamp/chameleon(src) + new /obj/item/pda/chameleon(src) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm index ffaff75288d..50d9b056e96 100644 --- a/code/game/objects/structures/crates_lockers/crittercrate.dm +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -44,6 +44,10 @@ name = "cow crate" content_mob = /mob/living/simple_animal/cow +/obj/structure/closet/critter/pig + name = "pig crate" + content_mob = /mob/living/simple_animal/pig + /obj/structure/closet/critter/goat name = "goat crate" content_mob = /mob/living/simple_animal/hostile/retaliate/goat diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 568fb0ededc..303862ff66f 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -28,6 +28,22 @@ else has_extinguisher = new/obj/item/extinguisher +/obj/structure/extinguisher_cabinet/examine(mob/user) + ..() + to_chat(user, "Alt-click to [opened ? "close":"open"] it.") + +/obj/structure/extinguisher_cabinet/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user)) + return + if(!iscarbon(usr)) + return + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) + opened = !opened + update_icon() + /obj/structure/extinguisher_cabinet/Destroy() QDEL_NULL(has_extinguisher) return ..() @@ -37,11 +53,16 @@ return if(istype(O, /obj/item/extinguisher)) if(!has_extinguisher && opened) + if(!user.drop_item()) + return user.drop_item(O) contents += O has_extinguisher = O + update_icon() to_chat(user, "You place [O] in [src].") + return TRUE else + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened else if(istype(O, /obj/item/weldingtool)) if(has_extinguisher) @@ -65,6 +86,7 @@ new material_drop(T) qdel(src) else + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened update_icon() @@ -81,21 +103,27 @@ to_chat(user, "You try to move your [temp.name], but cannot!") return if(has_extinguisher) + if(icon_state == "extinguisher_closed") + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) user.put_in_hands(has_extinguisher) to_chat(user, "You take [has_extinguisher] from [src].") has_extinguisher = null opened = 1 else + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened update_icon() /obj/structure/extinguisher_cabinet/attack_tk(mob/user) if(has_extinguisher) + if(icon_state == "extinguisher_closed") + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) has_extinguisher.loc = loc to_chat(user, "You telekinetically remove [has_extinguisher] from [src].") has_extinguisher = null opened = 1 else + playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened update_icon() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 154d4438530..1e3cb331cd1 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -273,8 +273,8 @@ var/obj/structure/cable/C = T.get_cable_node() if(C) playsound(loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5) - tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. - C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock. + tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. + C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock. return ..() /obj/structure/grille/broken // Pre-broken grilles for map placement diff --git a/code/game/world.dm b/code/game/world.dm index 4681f46498a..86ca6d883bd 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -374,26 +374,28 @@ var/world_topic_spam_protect_time = world.timeofday // apply some settings from config.. /world/proc/update_status() + status = get_status_text() + +/proc/get_world_status_text() + return world.get_status_text() + +/world/proc/get_status_text() var/s = "" if(config && config.server_name) s += "[config.server_name] — " + s += "[station_name()] " + if(config && config.githuburl) + s+= "([game_version])" - s += "[station_name()]"; - s += " (" - s += "" //Change this to wherever you want the hub to link to. - s += "[game_version]" - s += "" - s += ")" - s += "
The Perfect Mix of RP & Action
" - - - + if(config && config.server_tag_line) + s += "
[config.server_tag_line]" + s += "
" var/list/features = list() if(ticker) - if(master_mode) + if(master_mode && master_mode != "secret") features += master_mode else features += "STARTING" @@ -401,39 +403,22 @@ var/world_topic_spam_protect_time = world.timeofday if(!enter_allowed) features += "closed" - features += abandon_allowed ? "respawn" : "no respawn" + if(config && config.server_extra_features) + features += config.server_extra_features if(config && config.allow_vote_mode) features += "vote" - if(config && config.allow_ai) - features += "AI allowed" + if(config && config.wikiurl) + features += "Wiki" - var/n = 0 - for(var/mob/M in GLOB.player_list) - if(M.client) - n++ - - if(n > 1) - features += "~[n] players" - else if(n > 0) - features += "~[n] player" - - /* - is there a reason for this? the byond site shows 'hosted by X' when there is a proper host already. - if(host) - features += "hosted by [host]" - */ - -// if(!host && config && config.hostedby) -// features += "hosted by [config.hostedby]" + if(abandon_allowed) + features += "respawn" if(features) - s += ": [jointext(features, ", ")]" + s += "[jointext(features, ", ")]" - /* does this help? I do not know */ - if(src.status != s) - src.status = s + return s #define FAILED_DB_CONNECTION_CUTOFF 5 var/failed_db_connections = 0 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c15600f7bb6..4fcf95dbfd2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -78,7 +78,7 @@ var/global/nologevent = 0 body += "VV - " body += "[ADMIN_TP(M,"TP")] - " if(M.client) - body += "PM - " + body += "PM - " body += "[ADMIN_SM(M,"SM")] - " if(ishuman(M) && M.mind) body += "HM -" @@ -950,9 +950,6 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space for(var/obj/machinery/mech_bay_recharge_port/P in toArea) P.update_recharge_turf() - for(var/obj/machinery/power/apc/A in toArea) - A.init() - if(gamma_ship_location) gamma_ship_location = 0 else @@ -1096,7 +1093,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space dat += "" + id + "" dat += "" + ckey + "" dat += "Unlink" - + dat += "" usr << browse(dat, "window=duplicates;size=500x480") \ No newline at end of file diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6b4072a800b..4a455cd8e5d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -72,7 +72,6 @@ var/list/admin_verbs_admin = list( /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */ /client/proc/debug_variables, - /client/proc/show_snpc_verbs, /client/proc/reset_all_tcs, /*resets all telecomms scripts*/ /client/proc/toggle_mentor_chat, /client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/ @@ -216,11 +215,6 @@ var/list/admin_verbs_proccall = list( /client/proc/callproc_datum, /client/proc/SDQL2_query ) -var/list/admin_verbs_snpc = list( - /client/proc/resetSNPC, - /client/proc/customiseSNPC, - /client/proc/hide_snpc_verbs -) var/list/admin_verbs_ticket = list( /client/proc/openAdminTicketUI, /client/proc/toggleticketlogs, @@ -291,8 +285,6 @@ var/list/admin_verbs_ticket = list( admin_verbs_proccall, admin_verbs_show_debug_verbs, /client/proc/readmin, - admin_verbs_snpc, - /client/proc/hide_snpc_verbs, admin_verbs_ticket ) @@ -1013,28 +1005,6 @@ var/list/admin_verbs_ticket = list( log_admin("[key_name(usr)] told everyone to man up and deal with it.") message_admins("[key_name_admin(usr)] told everyone to man up and deal with it.") -/client/proc/show_snpc_verbs() - set name = "Show SNPC Verbs" - set category = "Admin" - - if(!check_rights(R_ADMIN)) - return - - verbs += admin_verbs_snpc - verbs -= /client/proc/show_snpc_verbs - to_chat(src, "SNPC verbs have been toggled on.") - -/client/proc/hide_snpc_verbs() - set name = "Hide SNPC Verbs" - set category = "Admin" - - if(!check_rights(R_ADMIN)) - return - - verbs -= admin_verbs_snpc - verbs += /client/proc/show_snpc_verbs - to_chat(src, "SNPC verbs have been toggled off.") - /client/proc/toggle_advanced_interaction() set name = "Toggle Advanced Admin Interaction" set category = "Admin" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index f50bae146c3..970defdd672 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -61,7 +61,7 @@ } - function expand(id,job,name,real_name,image,key,ip,antagonist,UID,eyeUID){ + function expand(id,job,name,real_name,image,key,ip,antagonist,mobUID,clientUID,eyeUID){ clearAll(); @@ -75,13 +75,13 @@ body += ""; - body += "PP - " + body += "PP - " body += "N - " - body += "VV - " - body += "TP - " - body += "PM - " - body += "SM - " - body += "FLW" + body += "VV - " + body += "TP - " + body += "PM - " + body += "SM - " + body += "FLW" if(eyeUID) body += "|EYE" body += "
" @@ -293,6 +293,7 @@ var/mob/living/silicon/ai/A = M if(A.client && A.eyeobj) // No point following clientless AI eyes M_eyeUID = "[A.eyeobj.UID()]" + var/clientUID = M.client ? M.client.UID() : null //output for each mob dat += {" @@ -300,7 +301,7 @@ [M_name] - [M_rname] - [M_key] ([M_job]) @@ -371,7 +372,7 @@ dat += {"[(M.client ? "[M.client]" : "No client")] X - PM + PM "} switch(is_special_character(M)) if(0) @@ -389,16 +390,13 @@ /datum/admins/proc/check_antagonists_line(mob/M, caption = "", close = 1) var/logout_status - if(istype(M, /mob/living/carbon/human/interactive)) - logout_status = " (snpc)" - else - logout_status = M.client ? "" : " (logged out)" + logout_status = M.client ? "" : " (logged out)" var/dname = M.real_name if(!dname) dname = M return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] - PM[close ? "" : ""]"} + PM[close ? "" : ""]"} /datum/admins/proc/check_antagonists() if(!check_rights(R_ADMIN)) return @@ -473,7 +471,7 @@ var/mob/M = blob.current if(M) dat += "[ADMIN_PP(M,"[M.real_name]")][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]" - dat += "PM" + dat += "PM" else dat += "Blob not found!" dat += "" diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 551076be62a..4597a838733 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -170,7 +170,7 @@ var/global/sent_syndicate_infiltration_team = 0 equip_or_collect(new /obj/item/pda(src), slot_in_backpack) // Other gear - equip_to_slot_or_del(new /obj/item/clothing/shoes/syndigaloshes(src), slot_shoes) + equip_to_slot_or_del(new /obj/item/clothing/shoes/chameleon/noslip(src), slot_shoes) var/obj/item/card/id/syndicate/W = new(src) if (flag_mgmt) diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm index 94c265848b7..a91e392e125 100644 --- a/code/modules/arcade/arcade_prize.dm +++ b/code/modules/arcade/arcade_prize.dm @@ -42,8 +42,8 @@ possible_contents = list(/obj/random/carp_plushie) /obj/item/toy/prizeball/plushie - name = "animal plushie capsule" - desc = "Contains one cuddly animal plushie!" + name = "plushie capsule" + desc = "Contains one cuddly plushie!" possible_contents = list(/obj/random/plushie) /obj/item/toy/prizeball/figure diff --git a/code/modules/arcade/prize_datums.dm b/code/modules/arcade/prize_datums.dm index a68071f8f44..4d2e062677a 100644 --- a/code/modules/arcade/prize_datums.dm +++ b/code/modules/arcade/prize_datums.dm @@ -157,8 +157,8 @@ var/global/datum/prizes/global_prizes = new cost = 65 /datum/prize_item/plushie - name = "Random Animal Plushie" - desc = "A colorful animal-shaped plush toy." + name = "Random Plushie" + desc = "A colorful plush toy." typepath = /obj/item/toy/prizeball/plushie cost = 75 diff --git a/code/modules/awaymissions/mission_code/spacehotel.dm b/code/modules/awaymissions/mission_code/spacehotel.dm index 0328dea5b53..fc8b4f4d260 100644 --- a/code/modules/awaymissions/mission_code/spacehotel.dm +++ b/code/modules/awaymissions/mission_code/spacehotel.dm @@ -152,14 +152,6 @@ /obj/machinery/door/unpowered/hotel_door/autoclose() if(!density && !operating && autoclose) close() - -/obj/machinery/door/unpowered/hotel_door/emag_act(mob/user) - if(isliving(user) && density) - var/obj/effect/hotel_controller/H - if(H.controller) - H.controller.deploy_sec(user) - ..() - /obj/item/card/hotel_card name = "Key Card" icon_state = "guest" @@ -283,20 +275,4 @@ spawn(300) if(D.occupant == deadbeat) // they still haven't checked out... - deploy_sec(deadbeat) - checkout(roomid) - -/obj/effect/hotel_controller/proc/deploy_sec(mob/living/target) - if(!istype(target) || !istype(get_area(target), /area/awaymission/spacehotel)) - return - - var/list/secs[0] - for(var/mob/living/carbon/human/interactive/away/hotel/guard/M in get_area(src)) - if(!M.retal) - secs += M - var/mob/living/carbon/human/interactive/away/hotel/guard/S = safepick(secs) - if(!S) - return - - S.retal_target = target - S.retal = 1 + checkout(roomid) \ No newline at end of file diff --git a/code/modules/awaymissions/mission_code/spacehotel_npcs.dm b/code/modules/awaymissions/mission_code/spacehotel_npcs.dm deleted file mode 100644 index 2a524ab738c..00000000000 --- a/code/modules/awaymissions/mission_code/spacehotel_npcs.dm +++ /dev/null @@ -1,132 +0,0 @@ -/mob/living/carbon/human/interactive/away/hotel - away_area = /area/awaymission/spacehotel - override_under = /obj/item/clothing/under/mafia - chattyness = SNPC_CHANCE_TALK / 4 - -/mob/living/carbon/human/interactive/away/hotel/Initialize(mapload) - . = ..(mapload, /datum/species/skrell) - -/mob/living/carbon/human/interactive/away/hotel/doSetup() - ..() - MYID.access = list(access_syndicate) - RPID.access = list(access_syndicate) - -/mob/living/carbon/human/interactive/away/hotel/guard - default_job = /datum/job/officer - -/mob/living/carbon/human/interactive/away/hotel/guard/doSetup() - ..("Guard") - - // anti-pinata cheese - var/obj/item/implant/dust/D = new /obj/item/implant/dust(src) - D.implant(src) - - for(var/obj/item/I in get_all_slots()) - I.flags |= NODROP - -/mob/living/carbon/human/interactive/away/hotel/guard/KnockOut() - // you'll never take me alive (this triggers the implant) - emote("deathgasp") - if(stat != DEAD) - // mission failed. we'll get em next time - ..() - -/mob/living/carbon/human/interactive/away/hotel/chef - default_job = /datum/job/chef - away_area = /area/awaymission/spacehotel/kitchen - override_under = /obj/item/clothing/under/mafia/vest - -/mob/living/carbon/human/interactive/away/hotel/bartender - default_job = /datum/job/bartender - override_under = /obj/item/clothing/under/mafia/vest - -/mob/living/carbon/human/interactive/away/hotel/concierge - override_under = /obj/item/clothing/under/mafia/white - away_area = /area/awaymission/spacehotel/reception - var/list/known_guests[0] - var/obj/effect/hotel_controller/hotel - var/obj/item/card/id/last_seen_id = null - -/mob/living/carbon/human/interactive/away/hotel/concierge/random() - ..() - equip_or_collect(new /obj/item/clipboard(src), slot_l_hand) - -/mob/living/carbon/human/interactive/away/hotel/concierge/doSetup() - ..("Concierge") - -/mob/living/carbon/human/interactive/away/hotel/concierge/setup_job() - favoured_types = list(/obj/item/paper, /obj/item/clipboard) - functions += list("stamping", "concierge") - restrictedJob = 1 - -/mob/living/carbon/human/interactive/away/hotel/concierge/proc/concierge() - if(!hotel) - hotel = hotel.controller - if(!hotel) - return - - var/verbs_use = pick_list(speak_file, "verbs_use") - var/verbs_touch = pick_list(speak_file, "verbs_touch") - var/verbs_move = pick_list(speak_file, "verbs_move") - var/nouns_generic = pick_list(speak_file, "nouns_generic") - var/adjective_insult = pick_list(speak_file, "adjective_insult") - var/adjective_objects = pick_list(speak_file, "adjective_objects") - var/adjective_generic = pick_list(speak_file, "adjective_generic") - var/curse_words = pick_list(speak_file, "curse_words") - - var/found = 0 - for(var/mob/living/carbon/human/H in nearby - known_guests) - pointed(H) - known_guests += H - found = 1 - if(found) - say("Welcome to [hotel], [nouns_generic]! Please check in by [ing_verb(verbs_move)] and [ing_verb(verbs_use)] your [adjective_objects] ID onto the table.") - return - - var/obj/item/card/id - var/id_seen = 0 - for(var/obj/item/card/id/I in get_area(src)) - id_seen = 1 - if(I != last_seen_id) - id = I - if(!id_seen) - last_seen_id = null - return - if(!id) - return - var/turf/idloc = get_turf(id) - if(!Adjacent(idloc)) - tryWalk(idloc) - else - // is the last jerk that touched it over here? - var/mob/id_owner - for(var/mob/living/carbon/human/H in nearby) - if(H.ckey == id.fingerprintslast) - id_owner = H - break - - if(!id_owner) - say("Whose card is this?") - pointed(id) - return - - last_seen_id = id - // Checking in or out? - if(id_owner in hotel.guests) - // Check out - say ("Hope you enjoyed your [adjective_objects] stay at our [adjective_generic] hotel!") - hotel.checkout(hotel.guests[id_owner]) - else - // pick a room - var/obj/machinery/door/unpowered/hotel_door/D = safepick(hotel.vacant_rooms) - if(!D) - say("Sorry, all the [adjective_objects] are occupied currently.") - else - // Check in - say("$100 per 10 minutes. The cost will be automatically [past_verb(verbs_touch)] while you're checked in.") - - var/obj/item/card/hotel_card/K = hotel.checkin(D.id, id_owner, id) - if(K) - K.forceMove(idloc) - else - say("Your [adjective_insult] [curse_words] card was rejected.") diff --git a/code/modules/awaymissions/snpc.dm b/code/modules/awaymissions/snpc.dm deleted file mode 100644 index 8d65aa44a92..00000000000 --- a/code/modules/awaymissions/snpc.dm +++ /dev/null @@ -1,85 +0,0 @@ -/mob/living/carbon/human/interactive/away - var/away_area = /area/awaymission // their overriden job area - var/override_under = null // optional type for uniform, else default for job - var/squad_member = 0 // was spawned by squad - var/home_z - -/mob/living/carbon/human/interactive/away/Initialize(mapload) - . = ..() - TRAITS |= TRAIT_ROBUST - faction += "away" - -/mob/living/carbon/human/interactive/away/random() - ..() - // a little hacky but it should prevent doubled uniforms - if(ispath(override_under, /obj/item/clothing/under)) - var/old_under = w_uniform - w_uniform = null - equip_to_slot(new override_under(src), slot_w_uniform) - qdel(old_under) - -/mob/living/carbon/human/interactive/away/doSetup() - ..() - var/datum/data/pda/app/messenger/M = MYPDA.find_program(/datum/data/pda/app/messenger) - M.toff = 1 - -/mob/living/carbon/human/interactive/away/job2area() - return away_area - -/mob/living/carbon/human/interactive/away/doProcess() - if(!home_z) - home_z = get_turf(z) - if(home_z != get_turf(z)) - gib() - ..() - -/obj/effect/spawner/snpc_squad - name = "squad spawner" - icon = 'icons/mob/screen_gen.dmi' - icon_state = "x" - density = 0 - opacity = 0 - invisibility = 101 - var/squad_type = /mob/living/carbon/human/interactive/away - var/squad_size = 3 - - var/global/list/squads[0] - var/list/squad - -/obj/effect/spawner/snpc_squad/New() - START_PROCESSING(SSobj, src) - - squad = squads[squad_type] - if(!squad) - squad = list() - squads[squad_type] = squad - squad += src - -/obj/effect/spawner/snpc_squad/Destroy() - squad = null - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/effect/spawner/snpc_squad/process() - // check squad memebers - var/living = 0 - for(var/mob/living/carbon/human/interactive/away/A in squad) - if(!A.stat) - living++ - else - // see if anyone's looking, if not, despawn - var/can_despawn = 1 - for(var/mob/living/M in viewers(A, world.view + 1)) - if(M.client) - living++ // dead guy that can be seen still takes up a slot - can_despawn = 0 - break - if(can_despawn) - squad -= A - qdel(A) - - // spawn new ones - if(living < squad_size && !length(viewers(src, world.view))) - var/mob/living/carbon/human/interactive/away/A = new squad_type(loc) - squad += A - A.squad_member = 1 diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 7d12142eb76..aa928ef35e6 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -50,7 +50,7 @@ var/received_irc_pm = -99999 var/irc_admin //IRC admin that spoke with them last. var/mute_irc = 0 - + var/ssd_warning_acknowledged = FALSE //////////////////////////////////// //things that require the database// diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index d8634e4ba98..afb0ce7a209 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -9,6 +9,7 @@ #define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing. //I would just like the code ready should it ever need to be used. #define SUGGESTED_CLIENT_VERSION 511 // only integers (e.g: 510, 511) useful here. Does not properly handle minor versions (e.g: 510.58, 511.848) +#define SSD_WARNING_TIMER 30 // cycles, not seconds, so 30=60s /* When somebody clicks a link in game, this Topic is called first. @@ -73,9 +74,7 @@ //Admin PM if(href_list["priv_msg"]) var/client/C = locate(href_list["priv_msg"]) - if(ismob(C)) //Old stuff can feed-in mobs instead of clients - var/mob/M = C - C = M.client + if(!C) // Might be a stealthmin ID, so pass it in straight C = href_list["priv_msg"] else if(C.UID() != href_list["priv_msg"]) @@ -227,6 +226,9 @@ vote_on_poll(pollid, optionid, 1) src << browse(null, "window=playerpoll") handle_player_polling() + if(href_list["ssdwarning"]) + ssd_warning_acknowledged = TRUE + to_chat(src, "SSD warning acknowledged.") switch(href_list["action"]) if("openLink") @@ -775,3 +777,16 @@ winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF") else winset(src, "rpane.changelog", "background-color=none;text-color=#000000") + + +/client/proc/send_ssd_warning(mob/M) + if(!config.ssd_warning) + return FALSE + if(ssd_warning_acknowledged) + return FALSE + if(M && M.player_logged < SSD_WARNING_TIMER) + return FALSE + to_chat(src, "Interacting with SSD players is against server rules unless you've ahelped first for permission. If you have, confirm that and proceed.") + return TRUE + +#undef SSD_WARNING_TIMER \ No newline at end of file diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 484151de797..67cb12689ce 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -159,6 +159,7 @@ var/list/color_view = null//overrides client.color while worn var/prescription = 0 var/prescription_upgradable = 0 + var/over_mask = FALSE //Whether or not the eyewear is rendered above the mask. Purely cosmetic. strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets put_on_delay = 25 burn_state = FIRE_PROOF @@ -173,6 +174,28 @@ SEE_PIXELS// if an object is located on an unlit area, but some of its pixels ar BLIND // can't see anything */ +/obj/item/clothing/glasses/verb/adjust_eyewear() //Adjust eyewear to be worn above or below the mask. + set name = "Adjust Eyewear" + set category = "Object" + set desc = "Adjust your eyewear to be worn over or under a mask." + set src in usr + + var/mob/living/carbon/human/user = usr + if(!istype(user)) + return + if(user.incapacitated()) //Dead spessmen adjust no glasses. Resting/buckled ones do, though + return + + var/action_fluff = "You adjust \the [src]" + if(user.glasses == src) + if(!user.canUnEquip(src)) + to_chat(usr, "[src] is stuck to you!") + return + if(attack_hand(user)) //Remove the glasses for this action. Prevents logic-defying instances where glasses phase through your mask as it ascends/descends to another plane of existence. + action_fluff = "You remove \the [src] and adjust it" + + over_mask = !over_mask + to_chat(user, "[action_fluff] to be worn [over_mask ? "over" : "under"] a mask.") //Gloves /obj/item/clothing/gloves @@ -574,8 +597,9 @@ BLIND // can't see anything "Drask" = 'icons/mob/species/drask/uniform.dmi', "Grey" = 'icons/mob/species/grey/uniform.dmi' ) - var/has_sensor = 1//For the crew computer 2 = unable to change mode - var/sensor_mode = 0 + var/has_sensor = TRUE//For the crew computer 2 = unable to change mode + var/sensor_mode = SENSOR_OFF + var/random_sensor = TRUE /* 1 = Report living/dead 2 = Report detailed damages @@ -587,7 +611,8 @@ BLIND // can't see anything var/basecolor /obj/item/clothing/under/rank/New() - sensor_mode = pick(0,1,2,3) + if(random_sensor) + sensor_mode = pick(SENSOR_OFF, SENSOR_LIVING, SENSOR_VITALS, SENSOR_COORDS) ..() /obj/item/clothing/under/Destroy() @@ -627,38 +652,6 @@ BLIND // can't see anything ..() -/obj/item/clothing/under/attack_hand(mob/user as mob) - //only forward to the attached accessory if the clothing is equipped (not in a storage) - if(accessories.len && src.loc == user) - for(var/obj/item/clothing/accessory/A in accessories) - A.attack_hand(user) - return - - if(ishuman(usr) && src.loc == user) //make it harder to accidentally undress yourself - return - - ..() - -/obj/item/clothing/under/MouseDrop(obj/over_object as obj) - if(ishuman(usr)) - //makes sure that the clothing is equipped so that we can't drag it into our hand from miles away. - if(!(src.loc == usr)) - return - if(!( usr.restrained() ) && !( usr.stat ) && ( over_object )) - if(!usr.canUnEquip(src)) - to_chat(usr, "[src] appears stuck on you!") - return - switch(over_object.name) - if("r_hand") - usr.unEquip(src) - usr.put_in_r_hand(src) - if("l_hand") - usr.unEquip(src) - usr.put_in_l_hand(src) - src.add_fingerprint(usr) - return - return - /obj/item/clothing/under/examine(mob/user) ..(user) switch(src.sensor_mode) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 0c4dba9ae49..1bd53217770 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -162,11 +162,6 @@ item_state = "sexymime" burn_state = FLAMMABLE -/obj/item/clothing/mask/gas/death_commando - name = "Death Commando Mask" - icon_state = "death_commando_mask" - item_state = "death_commando_mask" - /obj/item/clothing/mask/gas/cyborg name = "cyborg visor" desc = "Beep boop" diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm deleted file mode 100644 index b5b6298dcb2..00000000000 --- a/code/modules/clothing/masks/voice.dm +++ /dev/null @@ -1,38 +0,0 @@ -/obj/item/voice_changer - name = "voice changer" - desc = "A voice scrambling module. If you can see this, report it as a bug on the tracker." - var/voice //If set and item is present in mask/suit, this name will be used for the wearer's speech. - var/active - -/obj/item/clothing/mask/gas/voice - name = "gas mask" -// desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics." - var/obj/item/voice_changer/changer - burn_state = FIRE_PROOF - -/obj/item/clothing/mask/gas/voice/verb/Toggle_Voice_Changer() - set category = "Object" - set src in usr - - changer.active = !changer.active - to_chat(usr, "You [changer.active ? "enable" : "disable"] the voice-changing module in \the [src].") - -/obj/item/clothing/mask/gas/voice/verb/Set_Voice(name as text) - set category = "Object" - set src in usr - - var/voice = sanitize(copytext(name,1,MAX_MESSAGE_LEN)) - if(!voice || !length(voice)) return - changer.voice = voice - to_chat(usr, "You are now mimicking [changer.voice].") - -/obj/item/clothing/mask/gas/voice/New() - ..() - changer = new(src) - -/obj/item/clothing/mask/gas/voice/clown - name = "clown wig and mask" - desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." - icon_state = "clown" - item_state = "clown_hat" - flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | BLOCKHAIR \ No newline at end of file diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index f3a2efed260..d4411fbdbe6 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -1,21 +1,3 @@ -/obj/item/clothing/shoes/syndigaloshes - desc = "A pair of brown shoes. They seem to have extra grip." - name = "brown shoes" - icon_state = "brown" - item_state = "brown" - permeability_coefficient = 0.05 - flags = NOSLIP - origin_tech = "syndicate=2" - burn_state = FIRE_PROOF - var/list/clothing_choices = list() - silence_steps = 1 - -/obj/item/clothing/shoes/syndigaloshes/black - name = "black shoes" - icon_state = "black" - item_color = "black" - desc = "A pair of black shoes. They seem to have extra grip." - /obj/item/clothing/shoes/mime name = "mime shoes" icon_state = "mime" diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index aa62763a6d3..bfb326eae1d 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -269,14 +269,13 @@ /obj/item/rig_module/voice/New() ..() voice_holder = new(src) - voice_holder.active = 0 + voice_holder.active = FALSE /obj/item/rig_module/voice/installed() ..() holder.speech = src /obj/item/rig_module/voice/engage() - if(!..()) return 0 @@ -287,17 +286,17 @@ switch(choice) if("Enable") - active = 1 - voice_holder.active = 1 + active = TRUE + voice_holder.active = TRUE to_chat(usr, "You enable the speech synthesiser.") if("Disable") - active = 0 - voice_holder.active = 0 + active = FALSE + voice_holder.active = FALSE to_chat(usr, "You disable the speech synthesiser.") if("Set Name") var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null, MAX_NAME_LEN) if(!raw_choice) - return 0 + return FALSE voice_holder.voice = raw_choice to_chat(usr, "You are now mimicking [voice_holder.voice].") return 1 diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 13ef3e074da..0903710ddc8 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -345,7 +345,7 @@ name = "winter coat" desc = "A heavy jacket made from 'synthetic' animal furs." icon_state = "wintercoat" - item_state = "labcoat" + item_state = "coatwinter" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT @@ -369,6 +369,7 @@ /obj/item/clothing/suit/hooded/wintercoat/captain name = "captain's winter coat" icon_state = "wintercoat_captain" + item_state = "coatcaptain" armor = list(melee = 25, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) hoodtype = /obj/item/clothing/head/winterhood/captain @@ -379,6 +380,7 @@ /obj/item/clothing/suit/hooded/wintercoat/security name = "security winter coat" icon_state = "wintercoat_sec" + item_state = "coatsecurity" armor = list(melee = 10, bullet = 10, laser = 10, energy = 5, bomb = 15, bio = 0, rad = 0) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) hoodtype = /obj/item/clothing/head/winterhood/security @@ -389,6 +391,7 @@ /obj/item/clothing/suit/hooded/wintercoat/medical name = "medical winter coat" icon_state = "wintercoat_med" + item_state = "coatmedical" allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0) hoodtype = /obj/item/clothing/head/winterhood/medical @@ -399,6 +402,7 @@ /obj/item/clothing/suit/hooded/wintercoat/science name = "science winter coat" icon_state = "wintercoat_sci" + item_state = "coatscience" allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) hoodtype = /obj/item/clothing/head/winterhood/science @@ -409,6 +413,7 @@ /obj/item/clothing/suit/hooded/wintercoat/engineering name = "engineering winter coat" icon_state = "wintercoat_engi" + item_state = "coatengineer" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) allowed = list(/obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/t_scanner, /obj/item/rcd) hoodtype = /obj/item/clothing/head/winterhood/engineering @@ -419,6 +424,7 @@ /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos name = "atmospherics winter coat" icon_state = "wintercoat_atmos" + item_state = "coatatmos" hoodtype = /obj/item/clothing/head/winterhood/engineering/atmos /obj/item/clothing/head/winterhood/engineering/atmos @@ -427,6 +433,7 @@ /obj/item/clothing/suit/hooded/wintercoat/hydro name = "hydroponics winter coat" icon_state = "wintercoat_hydro" + item_state = "coathydro" allowed = list(/obj/item/reagent_containers/spray, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/glass/bottle, /obj/item/hatchet, /obj/item/storage/bag/plants) hoodtype = /obj/item/clothing/head/winterhood/hydro @@ -436,6 +443,7 @@ /obj/item/clothing/suit/hooded/wintercoat/cargo name = "cargo winter coat" icon_state = "wintercoat_cargo" + item_state = "coatcargo" hoodtype = /obj/item/clothing/head/winterhood/cargo /obj/item/clothing/head/winterhood/cargo @@ -444,6 +452,7 @@ /obj/item/clothing/suit/hooded/wintercoat/miner name = "mining winter coat" icon_state = "wintercoat_miner" + item_state = "coatminer" allowed = list(/obj/item/pickaxe, /obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) hoodtype = /obj/item/clothing/head/winterhood/miner diff --git a/code/modules/clothing/under/chameleon.dm b/code/modules/clothing/under/chameleon.dm index b320237996e..b08a1ce72c9 100644 --- a/code/modules/clothing/under/chameleon.dm +++ b/code/modules/clothing/under/chameleon.dm @@ -1,86 +1,478 @@ +#define EMP_RANDOMISE_TIME 300 + +/datum/action/chameleon_outfit + name = "Select Chameleon Outfit" + button_icon_state = "chameleon_outfit" + var/list/outfit_options //By default, this list is shared between all instances. It is not static because if it were, subtypes would not be able to have their own. If you ever want to edit it, copy it first. + +/datum/action/chameleon_outfit/New() + ..() + initialize_outfits() + +/datum/action/chameleon_outfit/proc/initialize_outfits() + var/static/list/standard_outfit_options + if(!standard_outfit_options) + standard_outfit_options = list() + for(var/path in subtypesof(/datum/outfit/job)) + var/datum/outfit/O = path + standard_outfit_options[initial(O.name)] = path + sortTim(standard_outfit_options, /proc/cmp_text_asc) + outfit_options = standard_outfit_options + +/datum/action/chameleon_outfit/Trigger() + return select_outfit(owner) + +/datum/action/chameleon_outfit/proc/select_outfit(mob/user) + if(!user || !IsAvailable()) + return FALSE + var/selected = input("Select outfit to change into", "Chameleon Outfit") as null|anything in outfit_options + if(!IsAvailable() || QDELETED(src) || QDELETED(user)) + return FALSE + var/outfit_type = outfit_options[selected] + if(!outfit_type) + return FALSE + var/datum/outfit/O = new outfit_type() + var/list/outfit_types = O.get_chameleon_disguise_info() + + for(var/V in user.chameleon_item_actions) + var/datum/action/item_action/chameleon/change/A = V + var/done = FALSE + for(var/T in outfit_types) + for(var/name in A.chameleon_list) + if(A.chameleon_list[name] == T) + A.update_look(user, T) + outfit_types -= T + done = TRUE + break + if(done) + break + //hardsuit helmets/suit hoods + if(ispath(O.suit, /obj/item/clothing/suit/hooded) && ishuman(user)) + var/mob/living/carbon/human/H = user + //make sure they are actually wearing the suit, not just holding it, and that they have a chameleon hat + if(istype(H.wear_suit, /obj/item/clothing/suit/chameleon) && istype(H.head, /obj/item/clothing/head/chameleon)) + var/helmet_type + var/obj/item/clothing/suit/hooded/hooded = O.suit + helmet_type = initial(hooded.hoodtype) + + if(helmet_type) + var/obj/item/clothing/head/chameleon/hat = H.head + hat.chameleon_action.update_look(user, helmet_type) + qdel(O) + return TRUE + + +/datum/action/item_action/chameleon/change + name = "Chameleon Change" + var/list/chameleon_blacklist = list() //This is a typecache + var/list/chameleon_list = list() + var/chameleon_type = null + var/chameleon_name = "Item" + + var/emp_timer + +/datum/action/item_action/chameleon/change/Grant(mob/M) + if(M && (owner != M)) + if(!M.chameleon_item_actions) + M.chameleon_item_actions = list(src) + var/datum/action/chameleon_outfit/O = new /datum/action/chameleon_outfit() + O.Grant(M) + else + M.chameleon_item_actions |= src + ..() + +/datum/action/item_action/chameleon/change/Remove(mob/M) + if(M && (M == owner)) + LAZYREMOVE(M.chameleon_item_actions, src) + if(!LAZYLEN(M.chameleon_item_actions)) + var/datum/action/chameleon_outfit/O = locate(/datum/action/chameleon_outfit) in M.actions + qdel(O) + ..() + +/datum/action/item_action/chameleon/change/proc/initialize_disguises() + if(button) + button.name = "Change [chameleon_name] Appearance" + + chameleon_blacklist |= typecacheof(target.type) + for(var/V in typesof(chameleon_type)) + if(ispath(V) && ispath(V, /obj/item)) + var/obj/item/I = V + if(chameleon_blacklist[V] || (initial(I.flags) & ABSTRACT) || !initial(I.icon_state)) + continue + var/chameleon_item_name = "[initial(I.name)] ([initial(I.icon_state)])" + chameleon_list[chameleon_item_name] = I + +/datum/action/item_action/chameleon/change/proc/select_look(mob/user) + var/obj/item/picked_item + var/picked_name + picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list + if(!picked_name) + return + picked_item = chameleon_list[picked_name] + if(!picked_item) + return + update_look(user, picked_item) + +/datum/action/item_action/chameleon/change/proc/random_look(mob/user) + var/picked_name = pick(chameleon_list) + // If a user is provided, then this item is in use, and we + // need to update our icons and stuff + + if(user) + update_look(user, chameleon_list[picked_name]) + + // Otherwise, it's likely a random initialisation, so we + // don't have to worry + + else + update_item(chameleon_list[picked_name]) + +/datum/action/item_action/chameleon/change/proc/update_look(mob/user, obj/item/picked_item) + if(isliving(user)) + var/mob/living/C = user + if(C.stat != CONSCIOUS) + return + + update_item(picked_item) + var/obj/item/thing = target + thing.update_slot_icon() + UpdateButtonIcon() + +/datum/action/item_action/chameleon/change/proc/update_item(obj/item/picked_item) + target.name = initial(picked_item.name) + target.desc = initial(picked_item.desc) + target.icon_state = initial(picked_item.icon_state) + if(isitem(target)) + var/obj/item/I = target + I.item_state = initial(picked_item.item_state) + I.item_color = initial(picked_item.item_color) + if(istype(I, /obj/item/clothing) && istype(initial(picked_item), /obj/item/clothing)) + var/obj/item/clothing/CL = I + var/obj/item/clothing/PCL = picked_item + CL.flags_cover = initial(PCL.flags_cover) + target.icon = initial(picked_item.icon) + +/datum/action/item_action/chameleon/change/Trigger() + if(!IsAvailable()) + return + + select_look(owner) + return 1 + +/datum/action/item_action/chameleon/change/proc/emp_randomise(var/amount = EMP_RANDOMISE_TIME) + START_PROCESSING(SSprocessing, src) + random_look(owner) + + var/new_value = world.time + amount + if(new_value > emp_timer) + emp_timer = new_value + +/datum/action/item_action/chameleon/change/process() + if(world.time > emp_timer) + STOP_PROCESSING(SSprocessing, src) + return + random_look(owner) + /obj/item/clothing/under/chameleon //starts off as black name = "black jumpsuit" icon_state = "black" item_state = "bl_suit" item_color = "black" - desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." - origin_tech = "syndicate=2" - var/list/clothing_choices = list() - burn_state = FIRE_PROOF - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0) + desc = "It's a plain jumpsuit. It has a small dial on the wrist." + sensor_mode = SENSOR_OFF //Hey who's this guy on the Syndicate Shuttle?? + random_sensor = FALSE + resistance_flags = NONE + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - New() - ..() - var/blocked = list(/obj/item/clothing/under/color/random, /obj/item/clothing/under/rank/centcom) // Stops random coloured jumpsuit and undefined centcomm suit appearing in the list. - for(var/U in subtypesof(/obj/item/clothing/under/color) - blocked) - var/obj/item/clothing/under/V = new U - src.clothing_choices += V + var/datum/action/item_action/chameleon/change/chameleon_action - for(var/U in subtypesof(/obj/item/clothing/under/rank) - blocked) - var/obj/item/clothing/under/V = new U - src.clothing_choices += V - return +/obj/item/clothing/under/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/under + chameleon_action.chameleon_name = "Jumpsuit" + chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/under, /obj/item/clothing/under/color, /obj/item/clothing/under/rank), only_root_path = TRUE) + chameleon_action.initialize_disguises() +/obj/item/clothing/under/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() - attackby(obj/item/clothing/under/U as obj, mob/user as mob, params) - ..() - if(istype(U, /obj/item/clothing/under/chameleon)) - to_chat(user, "Nothing happens.") - return - if(istype(U, /obj/item/clothing/under)) - if(src.clothing_choices.Find(U)) - to_chat(user, "Pattern is already recognised by the suit.") - return - src.clothing_choices += U - to_chat(user, "Pattern absorbed by the suit.") +/obj/item/clothing/under/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) +/obj/item/clothing/suit/chameleon + name = "armor" + desc = "A slim armored vest that protects against most types of damage." + icon_state = "armor" + item_state = "armor" + blood_overlay_type = "armor" + resistance_flags = NONE + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - emp_act(severity) - name = "psychedelic" - desc = "Groovy!" - icon_state = "psyche" - item_color = "psyche" - usr.update_inv_w_uniform() - spawn(200) - name = initial(name) - icon_state = initial(icon_state) - item_color = initial(item_color) - desc = initial(desc) - usr.update_inv_w_uniform() - ..() + var/datum/action/item_action/chameleon/change/chameleon_action +/obj/item/clothing/suit/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/suit + chameleon_action.chameleon_name = "Suit" + chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/suit/armor/abductor), only_root_path = TRUE) + chameleon_action.initialize_disguises() - verb/change() - set name = "Change Color" - set category = "Object" - set src in usr +/obj/item/clothing/suit/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() - if(icon_state == "psyche") - to_chat(usr, "Your suit is malfunctioning") - return +/obj/item/clothing/suit/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) - var/obj/item/clothing/under/A - A = input("Select Colour to change it to", "BOOYEA", A) in clothing_choices - if(!A) - return +/obj/item/clothing/glasses/chameleon + name = "Optical Meson Scanner" + desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." + icon_state = "meson" + item_state = "meson" + resistance_flags = NONE + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - desc = null - permeability_coefficient = 0.90 + var/datum/action/item_action/chameleon/change/chameleon_action - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - item_color = A.item_color - usr.update_inv_w_uniform() //so our overlays update. +/obj/item/clothing/glasses/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/glasses + chameleon_action.chameleon_name = "Glasses" + chameleon_action.chameleon_blacklist = list() + chameleon_action.initialize_disguises() +/obj/item/clothing/glasses/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() +/obj/item/clothing/glasses/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) -/obj/item/clothing/under/chameleon/all/New() - ..() - var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/chameleon/all) - //to prevent an infinite loop - for(var/U in typesof(/obj/item/clothing/under)-blocked) - var/obj/item/clothing/under/V = new U - src.clothing_choices += V +/obj/item/clothing/gloves/chameleon + desc = "These gloves will protect the wearer from electric shock." + name = "insulated gloves" + icon_state = "yellow" + item_state = "ygloves" + + resistance_flags = NONE + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) + + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/clothing/gloves/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/gloves + chameleon_action.chameleon_name = "Gloves" + chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/gloves, /obj/item/clothing/gloves/color), only_root_path = TRUE) + chameleon_action.initialize_disguises() + +/obj/item/clothing/gloves/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/clothing/gloves/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/clothing/head/chameleon + name = "grey cap" + desc = "It's a baseball hat in a tasteful grey colour." + icon_state = "greysoft" + item_color = "grey" + + resistance_flags = NONE + armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) + + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/clothing/head/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/head + chameleon_action.chameleon_name = "Hat" + chameleon_action.chameleon_blacklist = list() + chameleon_action.initialize_disguises() + +/obj/item/clothing/head/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/clothing/head/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/clothing/mask/chameleon + name = "gas mask" + desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate + icon_state = "gas_alt" + item_state = "gas_alt" + resistance_flags = NONE + armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) + flags = AIRTIGHT | BLOCK_GAS_SMOKE_EFFECT + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + gas_transfer_coefficient = 0.01 + permeability_coefficient = 0.01 + flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH + + var/obj/item/voice_changer/voice_changer + + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/clothing/mask/chameleon/Initialize() + . = ..() + + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/mask + chameleon_action.chameleon_name = "Mask" + chameleon_action.chameleon_blacklist = list() + chameleon_action.initialize_disguises() + + voice_changer = new(src) + +/obj/item/clothing/mask/chameleon/Destroy() + QDEL_NULL(voice_changer) + return ..() + +/obj/item/clothing/mask/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/clothing/mask/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/clothing/shoes/chameleon + name = "black shoes" + icon_state = "black" + item_color = "black" + desc = "A pair of black shoes." + permeability_coefficient = 0.05 + resistance_flags = NONE + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) + + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/clothing/shoes/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/clothing/shoes + chameleon_action.chameleon_name = "Shoes" + chameleon_action.chameleon_blacklist = list() + chameleon_action.initialize_disguises() + +/obj/item/clothing/shoes/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/clothing/shoes/chameleon/noslip + name = "black shoes" + icon_state = "black" + item_color = "black" + desc = "A pair of black shoes." + flags = NOSLIP + +/obj/item/clothing/shoes/chameleon/noslip/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/storage/backpack/chameleon + name = "backpack" + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/storage/backpack/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/storage/backpack + chameleon_action.chameleon_name = "Backpack" + chameleon_action.initialize_disguises() + +/obj/item/storage/backpack/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/storage/backpack/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/storage/belt/chameleon + name = "toolbelt" + desc = "Holds tools." + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/storage/belt/chameleon/Initialize() + . = ..() + + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/storage/belt + chameleon_action.chameleon_name = "Belt" + chameleon_action.initialize_disguises() + +/obj/item/storage/belt/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/storage/belt/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/radio/headset/chameleon + name = "radio headset" + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/radio/headset/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/radio/headset + chameleon_action.chameleon_name = "Headset" + chameleon_action.initialize_disguises() + +/obj/item/radio/headset/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/radio/headset/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/pda/chameleon + name = "PDA" + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/pda/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/pda + chameleon_action.chameleon_name = "PDA" + chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/pda/heads), only_root_path = TRUE) + chameleon_action.initialize_disguises() + +/obj/item/pda/chameleon/emp_act(severity) + . = ..() + chameleon_action.emp_randomise() + +/obj/item/pda/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) + +/obj/item/stamp/chameleon + var/datum/action/item_action/chameleon/change/chameleon_action + +/obj/item/stamp/chameleon/Initialize() + . = ..() + chameleon_action = new(src) + chameleon_action.chameleon_type = /obj/item/stamp + chameleon_action.chameleon_name = "Stamp" + chameleon_action.initialize_disguises() + +/obj/item/stamp/chameleon/broken/Initialize() + . = ..() + chameleon_action.emp_randomise(INFINITY) \ No newline at end of file diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 6ad3bd70d55..1cce81c12c2 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -802,6 +802,7 @@ lefthand_file = 'icons/goonstation/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi' flags = NODROP + flags_size = ONESIZEFITSALL has_sensor = 0 // HUNKE /obj/item/clothing/under/victdress diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 5116abf32e6..bc99aa07b0e 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -117,8 +117,8 @@ /datum/crafting_recipe/floorbot name = "Floorbot" result = /mob/living/simple_animal/bot/floorbot - reqs = list(/obj/item/storage/toolbox/mechanical = 1, - /obj/item/stack/tile/plasteel = 1, + reqs = list(/obj/item/storage/toolbox = 1, + /obj/item/stack/tile/plasteel = 10, /obj/item/assembly/prox_sensor = 1, /obj/item/robot_parts/r_arm = 1) time = 40 diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index fc27234648d..d2b32f720cf 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -1773,4 +1773,16 @@ /obj/item/clothing/gloves/ring/fluff/benjaminfallout //Benjaminfallout: Pretzel Brassheart name = "Pretzel's Ring" desc = "A small platinum ring with a large light blue diamond. Engraved inside the band are the words: 'To my lovely Pristine Princess. Forever yours, Savinien.'" - icon_state = "benjaminfallout_ring" \ No newline at end of file + icon_state = "benjaminfallout_ring" + +/obj/item/clothing/under/fluff/voxbodysuit //Gangelwaefre: Kikeri + name = "Vox Bodysuit" + desc = "A shimmering bodysuit custom-fit to a vox. Has shorts sewn in." + lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi' + righthand_file = 'icons/mob/inhands/fluff_righthand.dmi' + icon = 'icons/mob/inhands/fluff_righthand.dmi' + icon_state = "voxbodysuit" + item_state = "voxbodysuit" + item_color = "voxbodysuit" + body_parts_covered = HEAD|UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + species_fit = list("Vox") \ No newline at end of file diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 6f23bbc5fcd..2c2fdfbab84 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -6,6 +6,7 @@ event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg') /datum/event/blob/start() + processing = FALSE //so it won't fire again in next tick var/turf/T = pick(blobstart) if(!T) return kill() @@ -23,4 +24,5 @@ B.key = M.key to_chat(B, "You are now a mouse, infected with blob spores. Find somewhere isolated... before you burst and become the blob! Use ventcrawl (alt-click on vents) to move around.") var/image/alert_overlay = image('icons/mob/blob.dmi', "blank_blob") - notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B, alert_overlay = alert_overlay) \ No newline at end of file + notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B, alert_overlay = alert_overlay) + processing = TRUE // Let it naturally end, if it runs successfully \ No newline at end of file diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index e937ec25ef9..6be1d3bcf70 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -671,8 +671,8 @@ var/list/non_fakeattack_weapons = list(/obj/item/gun/projectile, /obj/item/ammo_ /obj/item/gun/energy/kinetic_accelerator/crossbow,\ /obj/item/storage/box/syndicate, /obj/item/storage/box/emps,\ /obj/item/cartridge/syndicate, /obj/item/clothing/under/chameleon,\ - /obj/item/clothing/shoes/syndigaloshes, /obj/item/card/id/syndicate,\ - /obj/item/clothing/mask/gas/voice, /obj/item/clothing/glasses/thermal,\ + /obj/item/clothing/shoes/chameleon/noslip, /obj/item/card/id/syndicate,\ + /obj/item/clothing/mask/chameleon, /obj/item/clothing/glasses/thermal,\ /obj/item/chameleon, /obj/item/card/emag,\ /obj/item/storage/toolbox/syndicate, /obj/item/aiModule,\ /obj/item/radio/headset/syndicate, /obj/item/grenade/plastic/c4,\ diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 67979b61dd7..cc6c6115097 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -15,8 +15,8 @@ var/productivity = 0 var/max_items = 40 var/datum/research/files - var/list/show_categories = list("Food", "Botany Chemicals", "Leather and Cloth") - var/list/timesFiveCategories = list("Food", "Botany Chemicals") + var/list/show_categories = list("Food", "Botany Chemicals", "Organic Materials", "Leather and Cloth") + var/list/timesFiveCategories = list("Food", "Botany Chemicals", "Organic Materials") /obj/machinery/biogenerator/New() ..() diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index cf8b897104c..17262ec4a7a 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -69,7 +69,7 @@ visible_message("[src] crackles and buzzes violently!") /mob/living/simple_animal/hostile/mining_drone/sentience_act() - AIStatus = AI_OFF + ..() check_friendly_fire = 0 /mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 0edb81c8321..43bc1b57226 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -83,6 +83,9 @@ obj/structure/ore_box/ex_act(severity, target) O.forceMove(loc) CHECK_TICK +/obj/structure/ore_box/onTransitZ() + return + /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" set category = "Object" diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 5f7d140b174..922f3181c27 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -19,4 +19,5 @@ for(var/datum/light_source/L in light_sources) L.source_atom.update_light() + return 1 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index db59a79ec21..b7c301f7387 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -397,13 +397,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(usr, "Not when you're not dead!") return - usr.verbs -= /mob/dead/observer/proc/dead_tele - spawn(30) - usr.verbs += /mob/dead/observer/proc/dead_tele - var/area/A = input("Area to jump to", "BOOYEA") as null|anything in ghostteleportlocs var/area/thearea = ghostteleportlocs[A] - if(!thearea) return + + if(!thearea) + return var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) @@ -411,6 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!L || !L.len) to_chat(usr, "No area available.") + return usr.forceMove(pick(L)) following = null diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index aa714f0d527..f16d04e3e86 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -315,15 +315,7 @@ msg += "[p_they(TRUE)] [p_have()] a stupid expression on [p_their()] face.\n" if(get_int_organ(/obj/item/organ/internal/brain)) - if(istype(src, /mob/living/carbon/human/interactive)) - var/mob/living/carbon/human/interactive/auto = src - if(auto.showexaminetext) - msg += "[p_they(TRUE)] [p_are()] appears to be some sort of sick automaton, [p_their()] eyes are glazed over and [p_their()] mouth is slightly agape.\n" - if(auto.debugexamine) - var/dodebug = auto.doing2string(auto.doing) - var/interestdebug = auto.interest2string(auto.interest) - msg += "[p_they(TRUE)] [p_are()] appears to be [interestdebug] and [dodebug].\n" - else if(dna.species.show_ssd) + if(dna.species.show_ssd) if(!key) msg += "[p_they(TRUE)] [p_are()] totally catatonic. The stresses of life in deep-space must have been too much for [p_them()]. Any recovery is unlikely.\n" else if(!client) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index bd5817e8867..a5df3916210 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -414,8 +414,22 @@ if(has_breathable_mask && istype(belt, /obj/item/tank)) dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "" - dat += " ↳Pockets:[(l_store && !(l_store.flags&ABSTRACT)) ? "Left (Full)" : "Left (Empty)"]" - dat += " [(r_store && !(r_store.flags&ABSTRACT)) ? "Right (Full)" : "Right (Empty)"]" + // Pockets + dat += " ↳Pockets:" + if(l_store && internal && l_store == internal) + dat += "[l_store]" + else if(l_store && !(l_store.flags&ABSTRACT)) + dat += "Left (Full)" + else + dat += "Left (Empty)" + dat += " " + if(r_store && internal && r_store == internal) + dat += "[r_store]" + else if(r_store && !(r_store.flags&ABSTRACT)) + dat += "Right (Full)" + else + dat += "Right (Empty)" + dat += "" dat += " ↳ID:[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "Empty"]" dat += " ↳PDA:[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? wear_pda : "Empty"]" diff --git a/code/modules/mob/living/carbon/human/interactive/functions.dm b/code/modules/mob/living/carbon/human/interactive/functions.dm deleted file mode 100644 index 06df994df5f..00000000000 --- a/code/modules/mob/living/carbon/human/interactive/functions.dm +++ /dev/null @@ -1,874 +0,0 @@ -/mob/living/carbon/human/interactive/proc/chatter(obj) - var/verbs_use = pick_list(speak_file, "verbs_use") - var/verbs_touch = pick_list(speak_file, "verbs_touch") - var/verbs_move = pick_list(speak_file, "verbs_move") - var/nouns_insult = pick_list(speak_file, "nouns_insult") - var/nouns_generic = pick_list(speak_file, "nouns_generic") - var/nouns_objects = pick_list(speak_file, "nouns_objects") - var/nouns_body = pick_list(speak_file, "nouns_body") - var/adjective_insult = pick_list(speak_file, "adjective_insult") - var/adjective_objects = pick_list(speak_file, "adjective_objects") - var/adjective_generic = pick_list(speak_file, "adjective_generic") - var/curse_words = pick_list(speak_file, "curse_words") - - var/chatmsg = "" - - if(prob(10)) // 10% chance to broadcast it over the radio - chatmsg = ";" - - if(prob(chattyness) || knownStrings.len < 10) // say a generic phrase, otherwise draw from our strings. - if(doing & SNPC_INTERACTING) - if(prob(chattyness)) - chatmsg += pick("This [nouns_objects] is a little [adjective_objects].", - "Well [verbs_use] my [nouns_body], this [nouns_insult] is pretty [adjective_insult].", - "[capitalize(curse_words)], what am I meant to do with this [adjective_insult] [nouns_objects].") - else if(doing & SNPC_TRAVEL) - if(prob(chattyness)) - chatmsg += pick("Oh [curse_words], [verbs_move]!", - "Time to get my [adjective_generic] [adjective_insult] [nouns_body] elsewhere.", - "I wonder if there is anything to [verbs_use] and [verbs_touch] somewhere else..") - else if(doing & SNPC_FIGHTING) - if(prob(chattyness)) - chatmsg += pick("I'm going to [verbs_use] you, you [adjective_insult] [nouns_insult]!", - "Rend and [verbs_touch], Rend and [verbs_use]!", - "You [nouns_insult], I'm going to [verbs_use] you right in the [nouns_body]. JUST YOU WAIT!") - if(prob(chattyness/2)) - chatmsg = ";" - var/what = pick(1,2,3,4,5) - switch(what) - if(1) - chatmsg += "Well [curse_words], this is a [adjective_generic] situation." - if(2) - chatmsg += "Oh [curse_words], that [nouns_insult] was one hell of an [adjective_insult] [nouns_body]." - if(3) - chatmsg += "I want to [verbs_use] that [nouns_insult] when I find them." - if(4) - chatmsg += "[pick("Innocent","Guilty","Traitorous","Honk")] until proven [adjective_generic]!" - if(5) - var/toSay = "" - for(var/i = 0; i < 5; i++) - curse_words = pick_list(speak_file, "curse_words") - toSay += "[curse_words] " - chatmsg += "Hey [nouns_generic], why don't you go [copytext(toSay, 1, length(toSay))], you [nouns_insult]!" - else if(prob(chattyness)) - chatmsg += pick(knownStrings) - if(prob(25)) // cut out some phrases now and then to make sure we're fresh and new - knownStrings -= pick(chatmsg) - - if(chatmsg != ";" && chatmsg != "") - say(chatmsg) - -/mob/living/carbon/human/interactive/proc/traitor(obj) - - if(traitorType == SNPC_PSYCHO && nearby.len) - traitorTarget = pick(nearby) - - if(prob(traitorScale)) - if(!Adjacent(traitorTarget) && !(traitorType == SNPC_PSYCHO)) - tryWalk(get_turf(traitorTarget)) - else - switch(traitorType) - if(SNPC_BRUTE) - retal = 1 - retal_target = traitorTarget - if(SNPC_STEALTH) - if(istype(traitorTarget,/mob)) // it's inside something, lets kick their shit in - var/mob/M = traitorTarget - if(!M.stat) - retal = 1 - retal_target = traitorTarget - else - var/obj/item/I = traitorTarget - I.loc = get_turf(traitorTarget) // pull it outta them - else - take_to_slot(traitorTarget) - if(SNPC_MARTYR) - custom_emote(1, "[src]'s chest opens up, revealing a large mass of explosives and tangled wires!") - if(inactivity_period <= 0) - inactivity_period = 9999 // technically infinite - if(do_after(src, 60, target = traitorTarget)) - custom_emote(1, "A fire bursts from [src]'s eyes, igniting white hot and consuming [p_their()] body in a flaming explosion!") - explosion(src, 6, 6, 6) - else - inactivity_period = 0 - custom_emote(1, "[src]'s chest closes, hiding [p_their()] insides.") - if(SNPC_PSYCHO) - var/choice = pick(typesof(/obj/item/grenade/chem_grenade) - /obj/item/grenade/chem_grenade) - - new choice(src) - - retal = 1 - retal_target = traitorTarget - -/mob/living/carbon/human/interactive/proc/botany(obj) - if(shouldModulePass()) - return - - if(enforceHome()) - return - - var/list/allContents = getAllContents() - - var/obj/item/reagent_containers/glass/beaker/bluespace/internalBeaker = locate(/obj/item/reagent_containers/glass/beaker/bluespace) in allContents - var/obj/item/storage/bag/plants/internalBag = locate(/obj/item/storage/bag/plants) in allContents - - if(!internalBag) - internalBag = new/obj/item/storage/bag/plants(src) - if(!internalBeaker) - internalBeaker = new/obj/item/reagent_containers/glass/beaker/bluespace(src) - internalBeaker.name = "Grow-U-All Super Spray" - - if(internalBeaker && internalBag) - var/obj/machinery/hydroponics/HP - - //consider the appropriate target - var/list/considered = list() - - for(var/obj/machinery/hydroponics/tester in view(12,src)) - considered[tester] = 1 - - if(!tester.myseed) - considered[tester] += 50 - if(tester.weedlevel > 0) - considered[tester] += 5 - if(tester.pestlevel > 0) - considered[tester] += 5 - if(tester.nutrilevel < tester.maxnutri) - considered[tester] += 15 - if(tester.waterlevel < tester.maxwater) - considered[tester] += 15 - if(tester.harvest || tester.dead) - considered[tester] += 100 - considered[tester] = max(1, considered[tester] - get_dist(src,tester)) - - var/index = 0 - for(var/A in considered) - ++index - if(considered[A] > considered[HP] || !HP) - HP = considered[index] - - if(HP) - TARGET = HP - if(!Adjacent(HP)) - tryWalk(get_turf(HP)) - else - if(HP.harvest || HP.dead) - HP.attack_hand(src) - else if(!HP.myseed) - var/obj/item/seeds/SEED = new /obj/item/seeds/random(src) - custom_emote(1, "[pick("gibbers","drools","slobbers","claps wildly","spits")] towards [TARGET], producing a [SEED]!") - HP.attackby(SEED, src) - else - var/change = 0 - if(HP.weedlevel > 0) - change = 1 - if(!internalBeaker.reagents.has_reagent("atrazine", 10)) - internalBeaker.reagents.add_reagent("atrazine", 10) - if(HP.pestlevel > 0) - change = 1 - if(!internalBeaker.reagents.has_reagent("diethylamine", 10)) - internalBeaker.reagents.add_reagent("diethylamine", 10) - if(HP.nutrilevel < HP.maxnutri) - change = 1 - if(!internalBeaker.reagents.has_reagent("eznutriment", 15)) - internalBeaker.reagents.add_reagent("eznutriment", 15) - if(!internalBeaker.reagents.has_reagent("diethylamine", 15)) - internalBeaker.reagents.add_reagent("diethylamine", 15) - if(HP.waterlevel < HP.maxwater) - change = 1 - if(!internalBeaker.reagents.has_reagent("holywater", 50)) - internalBeaker.reagents.add_reagent("holywater", 50) - if(change) - HP.attackby(internalBeaker,src) - - var/obj/item/reagent_containers/food/snacks/grown/GF = locate(/obj/item/reagent_containers/food/snacks/grown) in view(12,src) - if(GF) - if(!Adjacent(GF)) - tryWalk(get_turf(GF)) - else - GF.attackby(internalBag,src) - - if(internalBag.contents.len) - var/obj/machinery/smartfridge/SF = locate(/obj/machinery/smartfridge) in range(12, src) - if(!Adjacent(SF)) - tryWalk(get_turf(SF)) - else - custom_emote(1, "[pick("gibbers","drools","slobbers","claps wildly","spits")], upending the [internalBag]'s contents all over the [SF]!") - //smartfridges call updateUsrDialog when you call attackby, so we're going to have to cheese-magic-space this - for(var/obj/toLoad in internalBag.contents) - if(contents.len >= SF.max_n_of_items) - break - if(SF.accept_check(toLoad)) - SF.load(toLoad, src) - else - qdel(toLoad) // destroy everything we dont need - -/mob/living/carbon/human/interactive/proc/bartend(obj) - if(shouldModulePass()) - return - - if(enforceHome()) - return - - var/list/rangeCheck = oview(6,src) - var/obj/structure/table/RT - - var/mob/living/carbon/human/serveTarget - - for(var/mob/living/carbon/human/H in rangeCheck) - if(!locate(/obj/item/reagent_containers/food/drinks) in orange(1, H)) - serveTarget = H - - - if(serveTarget) - RT = locate(/obj/structure/table) in orange(1, serveTarget) - - if(RT && serveTarget) - if(!Adjacent(RT)) - tryWalk(get_turf(RT)) - else - var/drinkChoice = pick(typesof(/obj/item/reagent_containers/food/drinks) - /obj/item/reagent_containers/food/drinks) - if(drinkChoice) - var/obj/item/reagent_containers/food/drinks/D = new drinkChoice(get_turf(src)) - RT.attackby(D,src) - say("[pick("Something to wet your whistle!","Down the hatch, a tasty beverage!","One drink, coming right up!","Tasty liquid for your oral intake!","Enjoy!")]") - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")], serving up a [D]!") - -/mob/living/carbon/human/interactive/proc/shitcurity(obj) - var/list/allContents = getAllContents() - - if(retal && TARGET) - if(Adjacent(TARGET)) - var/obj/item/restraints/R = locate() in allContents - if(R) - R.attack(TARGET, src) // go go bluespace restraint launcher! - else if(TARGET in oview(7, src)) - var/obj/item/gun/G = locate() in allContents - if(G) - G.afterattack(TARGET, src) - -/mob/living/carbon/human/interactive/proc/clowning(obj) - if(shouldModulePass()) - return - var/list/allContents = getAllContents() - var/list/rangeCheck = oview(12, src) - - var/mob/living/carbon/human/clownTarget - var/list/clownPriority = list() - - var/obj/item/reagent_containers/spray/S - if(!locate(/obj/item/reagent_containers/spray) in allContents) - new/obj/item/reagent_containers/spray(src) - else - S = locate(/obj/item/reagent_containers/spray) in allContents - - for(var/mob/living/carbon/human/C in rangeCheck) - var/pranksNearby = 100 - for(var/turf/simulated/T in orange(1, C)) - for(var/obj/item/A in T) - if(istype(A,/obj/item/soap) || istype(A,/obj/item/reagent_containers/food/snacks/grown/banana) || istype(A,/obj/item/grown/bananapeel)) - pranksNearby-- - if(T.wet) - pranksNearby -= 10 - clownPriority[C] = pranksNearby - - for(var/A in clownPriority) - if(!clownTarget) - clownTarget = A - else - if(clownPriority[A] > clownPriority[clownTarget]) - clownTarget = clownPriority[A] - - if(clownTarget) - if(!Adjacent(clownTarget)) - tryWalk(clownTarget) - else - var/hasPranked = 0 - for(var/A in allContents) - if(prob(smartness/2) && !hasPranked) - if(istype(A,/obj/item/soap)) - npcDrop(A) - hasPranked = 1 - if(istype(A,/obj/item/reagent_containers/food/snacks/grown/banana)) - var/obj/item/reagent_containers/food/snacks/B = A - B.attack(src, src) - if(istype(A,/obj/item/grown/bananapeel)) - npcDrop(A) - hasPranked = 1 - if(!hasPranked) - if(S.reagents.total_volume <= 5) - S.reagents.add_reagent("water", 25) - S.afterattack(get_turf(pick(orange(1, clownTarget))),src) - - -/mob/living/carbon/human/interactive/proc/healpeople(obj) - var/shouldTryHeal = 0 - var/obj/item/stack/medical/M - - var/list/allContents = getAllContents() - - for(var/A in allContents) - if(istype(A,/obj/item/stack/medical)) - shouldTryHeal = 1 - M = A - - var/obj/item/reagent_containers/hypospray/HPS - - if(!locate(/obj/item/reagent_containers/hypospray) in allContents) - new/obj/item/reagent_containers/hypospray(src) - else - HPS = locate(/obj/item/reagent_containers/hypospray) in allContents - if(!shouldTryHeal) - shouldTryHeal = 2 // we have no stackables to use, lets use our internal hypospray instead - - if(shouldTryHeal == 1) - for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) //I haven't the foggiest clue why this is turning up non-carbons but sure here whatever - if(C.health <= 75) - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - M.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) - else if(shouldTryHeal == 2) - if(HPS) - if(HPS.reagents.total_volume <= 0) - HPS.reagents.add_reagent("omnizine",30) - for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) - if(C.health <= 75 && C.reagents.get_reagent_amount("omnizine") <= 0) // make sure they wont be overdosing - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - HPS.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) - - -/mob/living/carbon/human/interactive/proc/dojanitor(obj) - if(shouldModulePass()) - return - var/list/allContents = getAllContents() - //now with bluespace magic! - var/obj/item/reagent_containers/spray/SP = locate() in allContents - if(!SP) - SP = new /obj/item/reagent_containers/spray(src) - var/obj/item/soap/SO = locate() in allContents - if(!SO) - SO = new /obj/item/soap(src) - - if(SP.reagents.total_volume <= 5) - SP.reagents.add_reagent("cleaner", 25) // bluespess water delivery for AI - - var/obj/effect/decal/cleanable/TC - TC = locate(/obj/effect/decal/cleanable) in view(6, src) - - if(TC) - if(!Adjacent(TC)) - tryWalk(TC) - else - var/turf/T = get_turf(TC) - if(T && !T.density) - SP.afterattack(TC, src, 1) - else - SO.afterattack(TC, src, 1) - qdel(TC) - -// START COOKING MODULE -/mob/living/carbon/human/interactive/proc/refundrecipe(list/ingredients) - for(var/obj/I in ingredients) - I.loc = contents - -// Ingredients may be in the rangeCheck or inside the chef's inventory. -// As they are checked off, they are moved to a seperate list as to not be counted twice -// If the recipe fails (eg somebody else took an ingredient before it was picked up) the ingredients are dumped back to inventory -// That way, the chef has a better chance of making a recipe next ptick, if he has more stuff on him -/mob/living/carbon/human/interactive/proc/makerecipe(datum/recipe/R, allContents, rangeCheck) - set background = 1 - - var/list/ingredients[0] - - for(var/P in R.items) - var/obj/item/I = locate(P) in allContents - if(I) - ingredients += I - I.forceMove(null) - continue - - I = locate(P) in rangeCheck - TARGET = I - if(I && !Adjacent(I)) - tryWalk(get_turf(I)) - sleep(get_dist(src, I)) - if(!I || !(I in rangeCheck)) - refundrecipe(ingredients) - return 0 - custom_emote(1, "[pick("gibbers","drools","slobbers","claps wildly","spits")], picking up [I].") - ingredients += I - I.forceMove(null) - - // cheaply cook the ingredients into result - sleep(R.time) - for(var/obj/I in ingredients) - qdel(I) - ingredients.Cut() - var/result = new R.result(get_turf(src)) - custom_emote(1, "[pick("gibbers","drools","slobbers","claps wildly","spits")] and, with a bang, \a [result] is cooked!") - return 1 - -/mob/living/carbon/human/interactive/proc/souschef(obj) - if(shouldModulePass() || enforceHome() || prob(SNPC_FUZZY_CHANCE_HIGH) || prob(SNPC_FUZZY_CHANCE_HIGH)) - return - - if(doing & SNPC_SPECIAL) - return - doing |= SNPC_SPECIAL - - var/static/list/customableTypes = list(/obj/item/reagent_containers/food/snacks/customizable,/obj/item/reagent_containers/food/snacks/breadslice,/obj/item/reagent_containers/food/snacks/bun,/obj/item/reagent_containers/food/snacks/sliceable/flatdough,/obj/item/reagent_containers/food/snacks/boiledspaghetti,/obj/item/trash/plate,/obj/item/trash/bowl) - - var/static/list/rawtypes = list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/reagent_containers/food/snacks/rawcutlet, /obj/item/reagent_containers/food/snacks/rawsticks, /obj/item/reagent_containers/food/snacks/salmonmeat, /obj/item/reagent_containers/food/snacks/carpmeat, /obj/item/reagent_containers/food/snacks/catfishmeat, /obj/item/reagent_containers/food/snacks/spaghetti, /obj/item/reagent_containers/food/snacks/dough, /obj/item/reagent_containers/food/snacks/sliceable/flatdough, /obj/item/reagent_containers/food/snacks/doughslice, /obj/item/reagent_containers/food/snacks/meat, /obj/item/reagent_containers/food/snacks/boiledrice, /obj/item/reagent_containers/food/snacks/cheesewedge, /obj/item/reagent_containers/food/snacks/raw_bacon) - - try - var/list/allContents = getAllContents() - var/list/rangeCheck = view(6, src) - - //Bluespace in some inbuilt tools - var/obj/item/kitchen/rollingpin/RP = locate() in allContents - if(!RP) - RP = new /obj/item/kitchen/rollingpin(src) - - var/obj/item/kitchen/knife/KK = locate() in allContents - if(!KK) - KK = new /obj/item/kitchen/knife(src) - - var/global/list/available_recipes - if(!available_recipes) - available_recipes = list() - for(var/type in subtypesof(/datum/recipe)) - var/datum/recipe/recipe = new type - if(recipe.result) // Ignore recipe subtypes that lack a result - available_recipes += recipe - else - qdel(recipe) - - var/foundCookable = 0 - - //Make some basic custom food - var/foundCustom - for(var/customType in customableTypes) - var/A = locate(customType) in rangeCheck - var/obj/item/reagent_containers/food/snacks/customizable/I = A - if(A && (!istype(I) || I.ingredients.len <= 3)) - foundCustom = A // this will eventually wittle down to 0 - break - - var/obj/machinery/smartfridge/SF = locate(/obj/machinery/smartfridge) in rangeCheck - if(SF) - if(SF.contents.len > 0) - if(!Adjacent(SF)) - tryWalk(get_turf(SF)) - else - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")], grabbing various foodstuffs from [SF] and sticking them in its mouth!") - for(var/obj/item/A in SF.contents) - if(prob(smartness/2)) - var/count = SF.item_quants[A.name] - if(count) - SF.item_quants[A.name] = count - 1 - A.forceMove(src) - - if(foundCustom) - var/obj/item/reagent_containers/food/snacks/FC = foundCustom - for(var/obj/item/reagent_containers/food/snacks/toMake in allContents) - if(prob(smartness)) - if(FC.reagents) - if(toMake.reagents) - var/raw = 0 - for(var/type in rawtypes) - if(istype(toMake, type)) - raw = 1 - break - if(!raw) - npcDrop(toMake) - FC.attackby(toMake, src) - allContents -= toMake - break - else - qdel(FC) // this food is usless, toss it - - // Process tool-based ingredients - var/obj/item/reagent_containers/food/snacks/dough/D = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/sliceable/flatdough/FD = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/rawcutlet/RC = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/sliceable/cheesewheel/CW = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/grown/potato/PO = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/meat/ME = locate() in rangeCheck - var/obj/item/reagent_containers/food/snacks/raw_bacon/RB = locate() in rangeCheck - - if(D) - TARGET = D - if(prob(50)) - tryWalk(get_turf(D)) - sleep(get_dist(src, D)) - D.attackby(RP, src) - foundCookable = 1 - else if(FD) - TARGET = FD - if(prob(50)) - tryWalk(get_turf(FD)) - sleep(get_dist(src, FD)) - FD.attackby(KK, src) - foundCookable = 1 - else if(RC) - TARGET = RC - if(prob(50)) - tryWalk(get_turf(RC)) - sleep(get_dist(src, RC)) - RC.attackby(KK, src) - foundCookable = 1 - else if(CW) - TARGET = CW - if(prob(50)) - tryWalk(get_turf(CW)) - sleep(get_dist(src, CW)) - CW.attackby(KK, src) - foundCookable = 1 - else if(PO) - TARGET = PO - if(prob(50)) - tryWalk(get_turf(PO)) - sleep(get_dist(src, PO)) - PO.attackby(KK, src) - foundCookable = 1 - else if(ME) - TARGET = ME - if(prob(50)) - tryWalk(get_turf(ME)) - sleep(get_dist(src, ME)) - ME.attackby(KK, src) - foundCookable = 1 - else if(RB) - TARGET = RB - if(prob(50)) - tryWalk(get_turf(RB)) - sleep(get_dist(src, RB)) - RB.attackby(KK, src) - foundCookable = 1 - - // refresh - allContents = getAllContents() - rangeCheck = view(6, src) - - // Find most complex recipe we can cook - var/ingredientZone = rangeCheck + allContents - var/highest_count = 0 - var/datum/recipe/winner = null - for(var/datum/recipe/R in available_recipes) - if(R.check_items(ingredientZone) >= 0) - var/count = (R.items ? R.items.len : 0) - if(count > highest_count) - highest_count = count - winner = R - - // make winner - if(winner) - if(makerecipe(winner, allContents, rangeCheck)) - foundCookable = 1 - - // refresh - allContents = getAllContents() - rangeCheck = view(6, src) - - // dont display our ingredients - var/list/finishedList = list() - for(var/obj/item/reagent_containers/food/snacks/toDisplay in allContents) - var/raw = 0 - for(var/type in rawtypes) - if(istype(toDisplay, type)) - raw = 1 - break - if(!raw) - finishedList += toDisplay - - for(var/obj/item/reagent_containers/food/snacks/toGrab in rangeCheck) - if(!(locate(/obj/structure/table/reinforced) in get_turf(toGrab))) //it's not being displayed - var/raw = 0 - for(var/type in rawtypes) - if(istype(toGrab, type)) - raw = 1 - break - if(!raw) - foundCookable = 1 - if(!Adjacent(toGrab)) - tryWalk(toGrab) - else - finishedList += toGrab - toGrab.forceMove(src) - - if(finishedList.len) - var/obj/structure/table/reinforced/RT - - for(var/obj/structure/table/reinforced/toCheck in rangeCheck) - var/counted = 0 - for(var/obj/item/reagent_containers/food/snacks/S in get_turf(toCheck)) - ++counted - if(counted < 12) // make sure theres not too much food here - RT = toCheck - break - - if(RT) - foundCookable = 1 - if(!Adjacent(RT)) - tryWalk(get_turf(RT)) - else - for(var/obj/item/reagent_containers/food/snacks/toPlop in finishedList) - RT.attackby(toPlop,src) - - if(!foundCookable) - var/chosenType = pick(rawtypes) - - var/obj/item/reagent_containers/food/snacks/newSnack = new chosenType(get_turf(src)) - TARGET = newSnack - newSnack.reagents.remove_any((newSnack.reagents.total_volume/2)-1) - newSnack.name = "synthetic [newSnack.name]" - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as [p_they()] vomit[p_s()] [newSnack] from [p_their()] mouth!") - catch(var/exception/e) - log_runtime(e, src, "Caught in SNPC cooking module") - doing &= ~SNPC_SPECIAL -// END COOKING MODULE - -/mob/living/carbon/human/interactive/proc/combat(obj) - set background = 1 - enforce_hands() - if(canmove) - if((graytide || (TRAITS & TRAIT_MEAN)) || retal) - interest += targetInterestShift - a_intent = INTENT_HARM - zone_sel.selecting = pick("chest","r_leg","l_leg","r_arm","l_arm","head") - doing |= SNPC_FIGHTING - if(retal) - TARGET = retal_target - else - var/mob/living/M = locate(/mob/living) in oview(7, src) - if(!M) - doing = doing & ~SNPC_FIGHTING - else if(M != src && !compareFaction(M.faction)) - TARGET = M - - //no infighting - if(retal) - if(retal_target) - if(compareFaction(retal_target.faction)) - retal = 0 - retal_target = null - TARGET = null - doing = 0 - - //ensure we're using the best object possible - - var/obj/item/best - var/foundFav = 0 - var/list/allContents = getAllContents() - for(var/test in allContents) - for(var/a in favoured_types) - if(ispath(test,a) && !(doing & SNPC_FIGHTING)) // if we're not in combat and we find our favourite things, use them (for people like janitor and doctors) - best = test - foundFav = 1 - return - if(!foundFav) - if(istype(test,/obj/item)) - var/obj/item/R = test - if(R.force > 2) // make sure we don't equip any non-weaponlike items, ie bags and stuff - if(!best) - best = R - else - if(best.force < R.force) - best = R - if(istype(R, /obj/item/gun)) - var/obj/item/gun/G = R - if(G.can_shoot()) - best = R - break // gun with ammo? screw the rest - if(best && best != main_hand) - take_to_slot(best,1) - - if(TARGET && (doing & SNPC_FIGHTING)) // this is a redundancy check - var/mob/living/M = TARGET - if(istype(M,/mob/living)) - if(M.health > 1 && (M in oview(src, 6))) - //THROWING OBJECTS - for(var/A in allContents) - if(istype(A,/obj/item/gun)) // guns are for shooting, not throwing. - continue - if(prob(robustness)) - if(istype(A,/obj/item)) - var/obj/item/W = A - if(W.throwforce > 19) // Only throw worthwile stuff, no more lobbing wrenches at wenches - npcDrop(W, 1) - throw_item(TARGET) - if(istype(A,/obj/item/grenade)) // Allahu ackbar! ALLAHU ACKBARR!! - var/obj/item/grenade/G = A - G.attack_self(src) - if(prob(smartness)) - npcDrop(G, 1) - sleep(15) - throw_item(TARGET) - - if(!main_hand && other_hand) - swap_hands() - if(main_hand) - if(main_hand.force != 0) - if(istype(main_hand,/obj/item/gun)) - var/obj/item/gun/G = main_hand - if(G.can_trigger_gun(src)) - var/shouldFire = 1 - if(istype(main_hand, /obj/item/gun/energy)) - var/obj/item/gun/energy/P = main_hand - var/stunning = 0 - for(var/A in P.ammo_type) - if(ispath(A,/obj/item/ammo_casing/energy/electrode)) - stunning = 1 - var/mob/stunCheck = TARGET - if(stunning && stunCheck.stunned) - shouldFire = 0 - if(shouldFire) - if(!G.can_shoot()) - G.shoot_with_empty_chamber(src) - npcDrop(G, 1) - else - G.process_fire(TARGET, src) - else - if(get_dist(src,TARGET) > 6) - if(!walk2derpless(TARGET)) - timeout++ - else - var/obj/item/W = main_hand - W.attack(TARGET, src) - else - npcDrop(G, 1) - else - if(targetRange(TARGET) > 2) - tryWalk(TARGET) - else - if(Adjacent(TARGET)) - a_intent = pick(INTENT_DISARM, INTENT_HARM) - M.attack_hand(src) - timeout++ - else if(timeout >= 10 || !(targetRange(M) > 14)) - doing = doing & ~SNPC_FIGHTING - timeout = 0 - TARGET = null - retal = 0 - retal_target = null - else - timeout++ - -/mob/living/carbon/human/interactive/proc/past_verb(word) - if(copytext(word, length(word)) == "e") - return "[word]d" - else - return "[word]ed" - -/mob/living/carbon/human/interactive/proc/ing_verb(word) - if(copytext(word, length(word)) == "e") - return "[copytext(word, 1, length(word))]ing" - else - return "[word]ing" - -/mob/living/carbon/human/interactive/proc/paperwork_sentence() - var/verbs_use = pick_list(speak_file, "verbs_use") - var/verbs_touch = pick_list(speak_file, "verbs_touch") - var/verbs_move = pick_list(speak_file, "verbs_move") - var/nouns_insult = pick_list(speak_file, "nouns_insult") - var/nouns_generic = pick_list(speak_file, "nouns_generic") - var/nouns_objects = pick_list(speak_file, "nouns_objects") - var/nouns_body = pick_list(speak_file, "nouns_body") - var/adjective_insult = pick_list(speak_file, "adjective_insult") - var/adjective_objects = pick_list(speak_file, "adjective_objects") - var/adjective_generic = pick_list(speak_file, "adjective_generic") - var/curse_words = pick_list(speak_file, "curse_words") - var/result = pick("fired", "promoted", "demoted", "terminated", "incinerated", "sent to CentCom", "borged") - - return pick( - "The [adjective_insult] [pick(command_positions)] [past_verb(verbs_touch)] the [adjective_objects] [nouns_objects] and was [result].", - "The [adjective_generic] [pick(engineering_positions)] [past_verb(verbs_touch)] the [adjective_insult] [nouns_objects]. [capitalize(curse_words)], the [nouns_insult] was [result].", - "The [adjective_insult] [pick(security_positions)] [past_verb(verbs_touch)] the [adjective_generic] [nouns_insult] [pick(support_positions)]'s [nouns_body] and had to be [result].", - "Medical had to [verbs_use] the [adjective_generic] [pick(command_positions)]'s [adjective_objects] [nouns_body] after the incident.", - "I demand that [nouns_generic] respond with a [adjective_generic] update ASAP.", - "Would like an update from [nouns_generic] regarding the [adjective_insult] [pick(command_positions)] being [result].", - "The [pick(medical_positions)] needs to [verbs_move] faster when the crew's [adjective_objects] [nouns_body]s are injured, or they will be [result].", - "[capitalize(curse_words)] [adjective_insult] [curse_words].", - "

") - -/mob/living/carbon/human/interactive/proc/pickStamp(allContents) - var/list/stamps[0] - for(var/obj/item/stamp/S in allContents) - stamps += S - if(stamps.len) - return pick(stamps) - - // just make one, maybe - if(prob(SNPC_FUZZY_CHANCE_LOW / 2)) - for(var/p in favoured_types) - if(ispath(p, /obj/item/stamp)) - return new p(src) - return null - -/mob/living/carbon/human/interactive/proc/paperwork(obj) - set background = 1 - - if(shouldModulePass() || !prob(SNPC_FUZZY_CHANCE_LOW / 4)) - return - - var/list/allContents = getAllContents() - - var/obj/item/paper/P = locate() in allContents - var/obj/item/stamp/S = pickStamp(allContents) - var/mob/living/carbon/human/H = locate() in nearby - - if(!P) - P = new /obj/item/paper(src) - - if(P && S && H) - if(!P.stamped || !P.stamped.len) - // generate form - P.name = pick("Inspection Report", "Re: Crew", "Complaint", "To: CentCom") - P.info = {"

[paperwork_sentence()]
"} - for(var/I in 1 to rand(10, 20)) - P.info += "[paperwork_sentence()] " - P.info += {"

[pick("Signed", "Sincerely", "Regards")], [real_name]"} - P.update_icon() - P.stamp(S) - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] and throws [P] on the ground!") - npcDrop(P) - P.throw_at(H, P.throw_range, P.throw_speed, src) - -/mob/living/carbon/human/interactive/proc/stamping(obj) - if(shouldModulePass()) - return - - var/list/allContents = getAllContents() - var/list/rangeCheck = view(7, src) - - var/obj/item/stamp/S = pickStamp(allContents) - if(!S) - return - - // stamp a paper we're holding, and drop it - var/obj/item/paper/P = locate() in allContents - if(P) - if(!P.stamped || !P.stamped.len) - P.stamp(S) - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as they stamp \the [P] with \a [S]!") - npcDrop(P, 1) - return - - // stamp a paper in the world - for(var/obj/item/paper/A in rangeCheck) - if(!A.stamped || !A.stamped.len) - if(!Adjacent(A)) - tryWalk(A) - else - A.stamp(S) - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as they stamp \the [A] with \a [S]!") - return diff --git a/code/modules/mob/living/carbon/human/interactive/interactive.dm b/code/modules/mob/living/carbon/human/interactive/interactive.dm deleted file mode 100644 index 69dfa740b09..00000000000 --- a/code/modules/mob/living/carbon/human/interactive/interactive.dm +++ /dev/null @@ -1,960 +0,0 @@ -/* - NPC VAR EXPLANATIONS (for modules and other things) - - doing = their current action, SNPC_INTERACTING, SNPC_TRAVEL or SNPC_FIGHTING - interest = how interested the NPC is in the situation, if they are idle, this drops - timeout = this is internal - TARGET = their current target - LAST_TARGET = their last target - nearby = a list of nearby mobs - best_force = the highest force object, used for checking when to swap items - retal = this is internal - retal_target = this is internal - update_hands = this is a bool (1/0) to determine if the NPC should update what is in his hands - - MYID = their ID card - MYPDA = their PDA - main_hand = what is in their "main" hand (chosen from left > right) - TRAITS = the traits assigned to this npc - mymjob = the job assigned to the npc - - robustness = the chance for the npc to hit something - smartness = the inverse chance for an npc to do stupid things - attitude = the chance for an npc to do rude or mean things - slyness = the chance for an npc to do naughty things ie thieving - - functions = the list of procs that the npc will use for modules - - graytide = shitmin var to make them go psycho -*/ -/mob/living/carbon/human/interactive - name = "interactive station member" - var/doing = 0 - var/interest = 10 - var/maxInterest = 10 - var/timeout = 0 - var/inactivity_period = 0 - var/atom/TARGET = null - var/atom/LAST_TARGET = null - var/list/nearby = list() - var/best_force = 0 - var/retal = 0 - var/mob/retal_target = null - var/update_hands = 0 - var/list/blacklistItems = list() // items we should be ignoring - var/maxStepsTick = 6 // step as many times as we can per frame - //Job and mind data - var/obj/item/card/id/MYID - var/obj/item/card/id/RPID // the "real" idea they use - var/obj/item/pda/MYPDA - var/obj/item/main_hand - var/obj/item/other_hand - var/TRAITS = 0 - var/obj/item/card/id/Path_ID - var/default_job = /datum/job/civilian // the type for the default job - var/datum/job/myjob - var/list/myPath = list() - faction = list("synth") - //trait vars - var/robustness = 50 - var/smartness = 50 - var/attitude = 50 - var/slyness = 50 - var/graytide = 0 - var/list/favoured_types = list() // allow a mob to favour a type, and hold onto them - var/chattyness = SNPC_CHANCE_TALK - var/targetInterestShift = 5 // how much a good action should "reward" the npc - //modules - var/list/functions = list("nearbyscan","combat","shitcurity","chatter") - var/restrictedJob = 0 - var/forceProcess = 0 - var/speak_file = "npc_chatter.json" - var/debugexamine = FALSE //If we show debug info in our examine - var/showexaminetext = TRUE //If we show our telltale examine text - - var/voice_saved = FALSE - - var/list/knownStrings = list() - - //snpc traitor variables - - var/isTraitor = 0 - var/traitorTarget - var/traitorScale = 0 // our ability as a traitor - var/traitorType = 0 - - -/// SNPC voice handling - -/mob/living/carbon/human/interactive/proc/loadVoice() - var/savefile/S = new /savefile("data/npc_saves/snpc.sav") - S["knownStrings"] >> knownStrings - - if(isnull(knownStrings)) - knownStrings = list() - -/mob/living/carbon/human/interactive/proc/saveVoice() - if(voice_saved) - return - var/savefile/S = new /savefile("data/npc_saves/snpc.sav") - S["knownStrings"] << knownStrings - -//botPool funcs -/mob/living/carbon/human/interactive/proc/takeDelegate(mob/living/carbon/human/interactive/from,doReset=TRUE) - change_eye_color(255, 0, 0) - if(from == src) - return FALSE - TARGET = from.TARGET - LAST_TARGET = from.LAST_TARGET - retal = from.retal - retal_target = from.retal_target - doing = from.doing - // - timeout = 0 - inactivity_period = 0 - interest = maxInterest - // - update_icons() - if(doReset) - from.TARGET = null - from.LAST_TARGET = null - from.retal = 0 - from.retal_target = null - from.doing = 0 - return TRUE - -//end pool funcs - -/mob/living/carbon/human/interactive/proc/random() - //this is here because this has no client/prefs/brain whatever. - age = rand(AGE_MIN, AGE_MAX) - change_gender(pick("male", "female")) - rename_character(real_name, dna.species.get_random_name(gender)) - //job handling - myjob = new default_job() - job = myjob.title - mind.assigned_role = job - myjob.equip(src) - -/mob/living/carbon/human/interactive/proc/reset() - walk(src, 0) - timeout = 100 - retal = 0 - doing = 0 - inactivity_period = 0 - -/client/proc/resetSNPC(mob/living/carbon/human/interactive/T in SSnpcpool.processing) - set name = "Reset SNPC" - set desc = "Reset the SNPC" - set category = "Debug" - - if(!holder) - return - - if(istype(T)) - T.reset() - -/client/proc/customiseSNPC(mob/living/carbon/human/interactive/T in SSnpcpool.processing) - set name = "Customize SNPC" - set desc = "Customize the SNPC" - set category = "Debug" - - if(!holder) - return - - if(!istype(T)) - return - - var/list/jobs[0] - for(var/datum/job/j in SSjobs.occupations) - if(j.title != "AI" && j.title != "Cyborg") - jobs[j.title] = j - jobs = sortAssoc(jobs) - var/job_name = input("Choose Job") as null|anything in jobs - - if(job_name) - var/datum/job/cjob = jobs[job_name] - var/alt_title = input("Choose Alt Title") in (list(job_name) + cjob.alt_titles) - - T.myjob = cjob - T.job = cjob.title - T.mind.assigned_role = cjob.title - for(var/obj/item/I in T) - if(istype(I, /obj/item/implant)) - continue - if(istype(I, /obj/item/organ)) - continue - qdel(I) - T.myjob.equip(T) - T.doSetup(alt_title) - - var/shouldDoppel = input("Do you want the SNPC to disguise themself as a crewmember?") as anything in list("Yes", "No") - if(shouldDoppel == "Yes") - var/list/validchoices = list() - for(var/mob/living/carbon/human/M in GLOB.mob_list) - validchoices += M - - var/mob/living/carbon/human/chosen = input("Which crewmember?") as null|anything in validchoices - - if(chosen) - var/datum/dna/toDoppel = chosen.dna - - T.real_name = toDoppel.real_name - T.set_species(chosen.dna.species.type) - T.dna = toDoppel.Clone() - T.body_accessory = chosen.body_accessory - T.UpdateAppearance() - domutcheck(T) - - var/doTrait = input("Do you want the SNPC to be a traitor?") as anything in list("Yes", "No") - if(doTrait == "Yes") - var/list/tType = list("Brute" = SNPC_BRUTE, "Stealth" = SNPC_STEALTH, "Martyr" = SNPC_MARTYR, "Psycho" = SNPC_PSYCHO) - var/cType = input("Choose the traitor personality.") as null|anything in tType - if(cType) - var/value = tType[cType] - T.makeTraitor(value) - - var/doTele = input("Place the SNPC in their department?") as anything in list("Yes", "No") - if(doTele == "Yes") - T.loc = pick(get_area_turfs(T.job2area(T.myjob))) - - T.revive() - -/mob/living/carbon/human/interactive/proc/doSetup(alt_title = null) - Path_ID = new /obj/item/card/id(src) - - var/datum/job/captain/C = new/datum/job/captain - Path_ID.access = C.get_access() - - if(!alt_title) - alt_title = job - - MYID = new(src) - MYID.name = "[real_name]'s ID Card ([alt_title])" - MYID.assignment = "[alt_title]" - MYID.rank = job - MYID.sex = capitalize(gender) - MYID.age = age - MYID.registered_name = real_name - MYID.photo = get_id_photo(src) - MYID.access = Path_ID.access.Copy() // Automatons have strange powers... strange indeed - - RPID = new(src) - RPID.name = "[real_name]'s ID Card ([alt_title])" - RPID.assignment = "[alt_title]" - RPID.rank = job - RPID.sex = capitalize(gender) - RPID.age = age - RPID.registered_name = real_name - RPID.photo = get_id_photo(src) - RPID.access = myjob.get_access() - - if(wear_id) - qdel(wear_id) - if(!equip_to_slot_or_del(MYID, slot_wear_id)) - create_attack_log("Deleted ID due to slot contention") - if(wear_pda) - MYPDA = wear_pda - else - MYPDA = new(src) - equip_to_slot_or_del(MYPDA, slot_wear_pda) - MYPDA.owner = real_name - MYPDA.ownjob = alt_title - MYPDA.ownrank = job - MYPDA.name = "PDA-[real_name] ([alt_title])" - zone_sel.selecting = "chest" - //arms - if(prob((SNPC_FUZZY_CHANCE_LOW+SNPC_FUZZY_CHANCE_HIGH)/4)) - var/obj/item/organ/external/R = bodyparts_by_name["r_arm"] - if(R) - R.robotize(make_tough = 1) - else - var/obj/item/organ/external/L = bodyparts_by_name["l_arm"] - if(L) - L.robotize(make_tough = 1) - //legs - if(prob((SNPC_FUZZY_CHANCE_LOW+SNPC_FUZZY_CHANCE_HIGH)/4)) - var/obj/item/organ/external/R = bodyparts_by_name["r_leg"] - if(R) - R.robotize(make_tough = 1) - else - var/obj/item/organ/external/L = bodyparts_by_name["l_leg"] - if(L) - L.robotize(make_tough = 1) - UpdateDamageIcon() - regenerate_icons() - - hand = 0 - functions = list("nearbyscan", "combat", "shitcurity", "chatter") // stop customize adding multiple copies of a function - setup_job(job) - - if(TRAITS & TRAIT_ROBUST) - robustness = 75 - else if(TRAITS & TRAIT_UNROBUST) - robustness = 25 - - //modifiers are prob chances, lower = smarter - if(TRAITS & TRAIT_SMART) - smartness = 75 - else if(TRAITS & TRAIT_DUMB) - disabilities |= CLUMSY - smartness = 25 - - if(TRAITS & TRAIT_MEAN) - attitude = 75 - else if(TRAITS & TRAIT_FRIENDLY) - attitude = 1 - - if(TRAITS & TRAIT_THIEVING) - slyness = 75 - -/mob/living/carbon/human/interactive/proc/InteractiveProcess() - if(ticker.current_state == GAME_STATE_FINISHED) - saveVoice() - voice_saved = TRUE - doProcess() - -/mob/living/carbon/human/interactive/proc/setup_job(thejob) - switch(thejob) - if("Civilian") - favoured_types = list(/obj/item/clothing, /obj/item) - if("Captain", "Head of Personnel") - favoured_types = list(/obj/item/clothing, /obj/item/stamp/captain,/obj/item/disk/nuclear) - if("Nanotrasen Representative") - favoured_types = list(/obj/item/clothing, /obj/item/stamp/centcom, /obj/item/paper, /obj/item/melee/classic_baton/ntcane) - functions += "paperwork" - if("Magistrate", "Internal Affairs Agent") - favoured_types = list(/obj/item/clothing, /obj/item/stamp/law, /obj/item/paper) - functions += "paperwork" - if("Quartermaster", "Cargo Technician") - favoured_types = list(/obj/item/clothing, /obj/item/stamp/granted, /obj/item/stamp/denied, /obj/item/paper, /obj/item/clipboard) - functions += "stamping" - if("Chef") - favoured_types = list(/obj/item/reagent_containers/food, /obj/item/kitchen) - functions += "souschef" - restrictedJob = 1 - if("Bartender") - favoured_types = list(/obj/item/reagent_containers/food, /obj/item/kitchen) - functions += "bartend" - restrictedJob = 1 - if("Station Engineer", "Chief Engineer", "Life Support Specialist", "Mechanic") - favoured_types = list(/obj/item/stack, /obj/item, /obj/item/clothing) - if("Chief Medical Officer", "Medical Doctor", "Chemist", "Virologist", "Geneticist", "Psychiatrist", "Paramedic", "Brig Physician") - favoured_types = list(/obj/item/reagent_containers/glass/beaker, /obj/item/storage/firstaid, /obj/item/stack/medical, /obj/item/reagent_containers/syringe) - functions += "healpeople" - if("Research Director", "Scientist", "Roboticist") - favoured_types = list(/obj/item/reagent_containers/glass/beaker, /obj/item/stack, /obj/item/reagent_containers) - if("Head of Security", "Warden", "Security Officer", "Detective", "Security Pod Pilot", "Blueshield") - favoured_types = list(/obj/item/clothing, /obj/item, /obj/item/restraints) - if("Janitor") - favoured_types = list(/obj/item/mop, /obj/item/reagent_containers/glass/bucket, /obj/item/reagent_containers/spray/cleaner, /obj/effect/decal/cleanable) - functions += "dojanitor" - if("Clown") - favoured_types = list(/obj/item/soap, /obj/item/reagent_containers/food/snacks/grown/banana, /obj/item/grown/bananapeel) - functions += "clowning" - if("Botanist") - favoured_types = list(/obj/machinery/hydroponics, /obj/item/reagent_containers, /obj/item) - functions += "botany" - restrictedJob = 1 - else - favoured_types = list(/obj/item/clothing) - -/mob/living/carbon/human/interactive/proc/makeTraitor(var/inPers) - isTraitor = 1 - traitorScale = (slyness + smartness) + rand(-10,10) - traitorType = inPers - - ticker.mode.traitors += mind - mind.special_role = SPECIAL_ROLE_TRAITOR - var/datum/mindslaves/slaved = new() - slaved.masters += mind - mind.som = slaved - ticker.mode.update_traitor_icons_added(mind) - - switch(traitorType) - if(SNPC_BRUTE) // SMASH KILL RAAARGH - var/datum/objective/assassinate/A = new - A.owner = mind - A.find_target() - mind.objectives += A - traitorTarget = A.target.current - if(SNPC_STEALTH) // Shhh we is sneekies - var/datum/objective/steal/S = new - S.owner = mind - S.find_target() - mind.objectives += S - traitorTarget = locate(S.steal_target.typepath) in world - if(SNPC_MARTYR) // MY LIFE FOR SPESZUL - var/targetType = pick(/obj/structure/particle_accelerator, /obj/machinery/gravity_generator/main, /obj/machinery/power/smes) - traitorTarget = locate(targetType) in world - var/datum/objective/O = new("Destroy \the [traitorTarget].") - O.owner = mind - mind.objectives += O - if(SNPC_PSYCHO) // YOU'RE LIKE A FLESH BICYLE AND I WANT TO DISMANTLE YOU - var/datum/objective/hijack/H = new - H.owner = mind - mind.objectives += H - traitorTarget = null - - functions += "traitor" - faction -= "neutral" - faction += "hostile" - -/mob/living/carbon/human/interactive/create_mob_hud() - if(!hud_used) - hud_used = new /datum/hud/human(src) - -/mob/living/carbon/human/interactive/Initialize() - ..() - return INITIALIZE_HINT_LATELOAD - -/mob/living/carbon/human/interactive/LateInitialize() - . = ..() - GLOB.snpc_list += src - - create_mob_hud() - - sync_mind() - random() - doSetup() - START_PROCESSING(SSnpcpool, src) - loadVoice() - GLOB.hear_radio_list += src - - // a little bit of variation to make individuals more unique - robustness += rand(-10, 10) - smartness += rand(-10, 10) - attitude += rand(-10, 10) - slyness += rand(-10, 10) - - doProcess() - -/mob/living/carbon/human/interactive/Destroy() - SSnpcpool.stop_processing(src) - return ..() - -/mob/living/carbon/human/interactive/proc/retalTarget(mob/living/target) - var/mob/living/M = target - if(istype(M)) - if(health > 0) - if(M.a_intent == INTENT_HELP && !incapacitated()) - chatter() - if(istype(target, /mob/living/carbon) && !retal && prob(SNPC_FUZZY_CHANCE_LOW)) - var/mob/living/carbon/C = target - if(!Adjacent(target)) - tryWalk(target) - else - C.help_shake_act(src) - if(M.a_intent == INTENT_HARM) - retal = 1 - retal_target = target - -//Retaliation clauses - -/mob/living/carbon/human/interactive/attacked_by(obj/item/I, mob/living/user, def_zone) - ..() - retalTarget(user) - -/mob/living/carbon/human/interactive/hitby(atom/movable/AM, skipcatch, hitpush, blocked) - ..() - var/mob/living/carbon/C = locate(/mob/living/carbon) in view(SNPC_MIN_RANGE_FIND, src) - if(C) - retalTarget(C) - -/mob/living/carbon/human/interactive/bullet_act(obj/item/projectile/P) - ..() - retalTarget(P.firer) - -/mob/living/carbon/human/interactive/attack_hand(mob/living/carbon/human/M) - ..() - retalTarget(M) - -/mob/living/carbon/human/interactive/show_inv(mob/user) - ..() - retalTarget(user) - -/mob/living/carbon/human/interactive/can_inject(mob/user, error_msg, target_zone, var/penetrate_thick = 0) - ..() - retalTarget(user) - -//THESE EXIST FOR DEBUGGING OF THE DOING/INTEREST SYSTEM EASILY -/mob/living/carbon/human/interactive/proc/doing2string(doin) - var/toReturn = "" - if(!doin) - toReturn = "not doing anything" - if(doin & SNPC_INTERACTING) - toReturn += "interacting with something, " - if(doin & SNPC_FIGHTING) - toReturn += "engaging in combat, " - if(doin & SNPC_TRAVEL) - toReturn += "and going somewhere" - return toReturn - -/mob/living/carbon/human/interactive/proc/interest2string(inter) - var/toReturn = "Flatlined" - if(inter >= 0 && inter <= 25) - toReturn = "Very Bored" - if(inter >= 26 && inter <= 50) - toReturn = "Bored" - if(inter >= 51 && inter <= 75) - toReturn = "Content" - if(inter >= 76) - toReturn = "Excited" - return toReturn -//END DEBUG - -/mob/living/carbon/human/interactive/proc/IsDeadOrIncap(checkDead = TRUE) - if(!canmove) - return 1 - if(health <= 0 && checkDead) - return 1 - if(restrained()) - return 1 - if(paralysis) - return 1 - if(stunned) - return 1 - if(stat) - return 1 - if(inactivity_period > 0) - return 1 - return 0 - -/mob/living/carbon/human/interactive/proc/enforce_hands() - if(main_hand) - if(main_hand.loc != src) - main_hand = null - if(other_hand) - if(other_hand.loc != src) - other_hand = null - if(hand) - if(!l_hand) - main_hand = null - if(r_hand) - swap_hands() - else - if(!r_hand) - main_hand = null - if(l_hand) - swap_hands() - -/mob/living/carbon/human/interactive/proc/swap_hands() - hand = !hand - var/obj/item/T = other_hand - main_hand = other_hand - other_hand = T - update_hands = 1 - -/mob/living/carbon/human/interactive/proc/take_to_slot(obj/item/G, var/hands=0) - var/list/slots = list("left pocket" = slot_l_store, "right pocket" = slot_r_store, "left hand" = slot_l_hand, "right hand" = slot_r_hand) - if(hands) - slots = list("left hand" = slot_l_hand, "right hand" = slot_r_hand) - G.loc = src - if(G.force && G.force > best_force) - best_force = G.force - equip_in_one_of_slots(G, slots) - update_hands = 1 - -/mob/living/carbon/human/interactive/proc/insert_into_backpack() - var/list/slots = list(slot_l_store, slot_r_store, slot_l_hand, slot_r_hand) - var/obj/item/I = get_item_by_slot(pick(slots)) - var/obj/item/storage/BP = get_item_by_slot(slot_back) - if(back && BP && I) - // hack to allow SNPCs to "sticky grab" items without losing their inventorying - var/oldnodrop = I.flags | NODROP - I.flags &= ~NODROP - if(BP.can_be_inserted(I)) - BP.handle_item_insertion(I) - I.flags |= oldnodrop - else - unEquip(I,TRUE) - update_hands = 1 - -/mob/living/carbon/human/interactive/proc/targetRange(towhere) - return get_dist(get_turf(towhere), get_turf(src)) - -/mob/living/carbon/human/interactive/death() - // Only execute the below if we successfully died - . = ..() - if(!.) - return FALSE - saveVoice() - -/mob/living/carbon/human/interactive/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol) - if(!istype(speaker, /mob/living/carbon/human/interactive)) - knownStrings |= html_decode(multilingual_to_message(message_pieces)) - ..() - -/mob/living/carbon/human/interactive/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, vname = "", atom/follow_target) - if(!istype(speaker, /mob/living/carbon/human/interactive)) - knownStrings |= html_decode(multilingual_to_message(message_pieces)) - ..() - -/mob/living/carbon/human/interactive/proc/doProcess() - set waitfor = FALSE - if(IsDeadOrIncap()) - reset() - return - //--------------------------- - //---- interest flow control - if(interest < 0 || inactivity_period < 0) - if(interest < 0) - interest = 0 - if(inactivity_period < 0) - inactivity_period = 0 - if(interest > maxInterest) - interest = maxInterest - //--------------------------- - //VIEW FUNCTIONS - - //doorscan is now integrated into life and runs before all other procs - var/mistake_chance = (100 - smartness) / 2 - spawn(0) - for(var/dir in alldirs) - var/turf/T = get_step(src, dir) - if(T) - for(var/obj/machinery/door/D in T.contents) - if(!istype(D,/obj/machinery/door/poddoor) && D.density) - spawn(0) - if(istype(D,/obj/machinery/door/airlock)) - var/obj/machinery/door/airlock/AL = D - if(!AL.CanAStarPass(RPID)) // only crack open doors we can't get through - inactivity_period = 20 - AL.panel_open = 1 - AL.update_icon() - AL.shock(src, mistake_chance) - sleep(5) - if(QDELETED(AL)) - return - AL.unlock() - if(prob(mistake_chance)) - if(!AL.wires.IsIndexCut(AIRLOCK_WIRE_DOOR_BOLTS)) - AL.wires.CutWireIndex(AIRLOCK_WIRE_DOOR_BOLTS) - else - if(AL.wires.IsIndexCut(AIRLOCK_WIRE_DOOR_BOLTS)) - AL.wires.CutWireIndex(AIRLOCK_WIRE_DOOR_BOLTS, 1) - if(AL.locked) - AL.wires.UpdatePulsed(AIRLOCK_WIRE_DOOR_BOLTS) - if(!AL.wires.IsIndexCut(AIRLOCK_WIRE_MAIN_POWER1)) - AL.wires.CutWireIndex(AIRLOCK_WIRE_MAIN_POWER1) - if(prob(mistake_chance) && !AL.wires.IsIndexCut(AIRLOCK_WIRE_SAFETY)) - AL.wires.CutWireIndex(AIRLOCK_WIRE_SAFETY) - if(prob(mistake_chance) && !AL.wires.IsIndexCut(AIRLOCK_WIRE_ELECTRIFY)) - AL.wires.CutWireIndex(AIRLOCK_WIRE_ELECTRIFY) - sleep(5) - if(QDELETED(AL)) - return - AL.panel_open = 0 - AL.update_icon() - D.open() - - if(update_hands) - if(l_hand || r_hand) - if(l_hand) - hand = 1 - main_hand = l_hand - if(r_hand) - other_hand = r_hand - else if(r_hand) - hand = 0 - main_hand = r_hand - if(l_hand) //this technically shouldnt occur, but its a redundancy - other_hand = l_hand - update_icons() - update_hands = 0 - - if(grabbed_by.len > 0) - for(var/obj/item/grab/G in grabbed_by) - if(Adjacent(G)) - a_intent = INTENT_DISARM - G.assailant.attack_hand(src) - inactivity_period = 10 - - if(buckled) - resist() - inactivity_period = 10 - - //proc functions - for(var/Proc in functions) - if(!IsDeadOrIncap()) - INVOKE_ASYNC(src, Proc) - - - //target interaction stays hardcoded - - if(TARGET && (TARGET in blacklistItems)) // don't use blacklisted items - TARGET = null - - if(TARGET && Adjacent(TARGET)) - doing |= SNPC_INTERACTING - //--------DOORS - if(istype(TARGET, /obj/machinery/door)) - var/obj/machinery/door/D = TARGET - if(D.check_access(MYID) && !istype(D,/obj/machinery/door/poddoor)) - inactivity_period = 10 - D.open() - var/turf/T = get_step(get_step(D.loc, dir), dir) //recursion yo - tryWalk(T) - //THIEVING SKILLS - insert_into_backpack() // dump random item into backpack to make space - //---------ITEMS - if(istype(TARGET, /obj/item)) - var/obj/item/I = TARGET - if(I.anchored) - TARGET = null - else if(istype(TARGET, /obj/item)) - var/obj/item/W = TARGET - if(W.force >= best_force || prob((SNPC_FUZZY_CHANCE_LOW + SNPC_FUZZY_CHANCE_HIGH) / 2) || favouredObjIn(list(W))) - if(!l_hand || !r_hand) - put_in_hands(W) - else - insert_into_backpack() - else - if(!l_hand || !r_hand) - put_in_hands(TARGET) - else - insert_into_backpack() - //---------FASHION - if(istype(TARGET, /obj/item/clothing)) - drop_item() - dressup(TARGET) - update_hands = 1 - if(MYPDA in loc) - equip_to_appropriate_slot(MYPDA) - if(MYID in loc) - equip_to_appropriate_slot(MYID) - //THIEVING SKILLS END - //-------------TOUCH ME - if(istype(TARGET, /obj/structure)) - var/obj/structure/STR = TARGET - if(main_hand) - var/obj/item/W = main_hand - STR.attackby(W, src) - else - STR.attack_hand(src) - interest += targetInterestShift - doing = doing & ~SNPC_INTERACTING - timeout = 0 - TARGET = null - else - if(TARGET) - tryWalk(TARGET) - timeout++ - - if(doing == 0) - interest-- - else - interest++ - - if(inactivity_period > 0) - inactivity_period-- - - if(interest <= 0 || timeout >= 10) // facilitate boredom functions - TARGET = null - doing = 0 - timeout = 0 - myPath = list() - - //this is boring, lets move - if(!doing && !IsDeadOrIncap() && !TARGET) - doing |= SNPC_TRAVEL - if(!isTraitor || !traitorTarget || get_dist(src, traitorTarget) >= SNPC_MAX_RANGE_FIND || get_dist(src, traitorTarget) <= 1) - var/choice = rand(1,50) - switch(choice) - if(1 to 30) - //chance to chase an item - TARGET = locate(/obj/item) in favouredObjIn(oview(SNPC_MIN_RANGE_FIND, src)) - if(31 to 40) - TARGET = safepick(get_area_turfs(job2area(myjob))) - if(41 to 45) - TARGET = pick(target_filter(favouredObjIn(urange(SNPC_MAX_RANGE_FIND, src, 1)))) - if(46 to 50) - TARGET = pick(target_filter(oview(SNPC_MIN_RANGE_FIND, src))) - else - TARGET = traitorTarget - tryWalk(TARGET) - LAST_TARGET = TARGET - -/mob/living/carbon/human/interactive/proc/dressup(obj/item/clothing/C) - set waitfor = FALSE - inactivity_period = 12 - sleep(5) - if(!QDELETED(C) && !QDELETED(src)) - take_to_slot(C,1) - if(!equip_to_appropriate_slot(C)) - var/obj/item/I = get_item_by_slot(C) - unEquip(I) - sleep(5) - if(!QDELETED(src) && !QDELETED(C)) - equip_to_appropriate_slot(C) - -/mob/living/carbon/human/interactive/proc/favouredObjIn(list/inList) - var/list/outList = list() - for(var/i in inList) - for(var/path in favoured_types) - if(istype(i, path)) - outList += i - if(!outList.len) - outList = inList - return outList - -/mob/living/carbon/human/interactive/proc/tryWalk(turf/inTarget) - if(restrictedJob) // we're a job that has to stay in our home - if(!(get_turf(inTarget) in get_area_turfs(job2area(myjob)))) - TARGET = null - return - - if(!IsDeadOrIncap()) - if(!walk2derpless(inTarget)) - timeout++ - else - timeout++ - -/mob/living/carbon/human/interactive/proc/getGoodPath(target, maxtries=512) - set background = 1 - var/turf/end = get_turf(target) - - var/turf/current = get_turf(src) - - var/list/path = list() - var/tries = 0 - while(current != end && tries < maxtries) - var/turf/shortest = current - for(var/turf/T in view(current,1)) - var/foundDense = 0 - for(var/atom/A in T) - if(A.density) - foundDense = 1 - if(T.density == 0 && !foundDense) - if(get_dist(T, target) < get_dist(shortest,target)) - shortest = T - else - tries++ - else - tries++ - current = shortest - path += shortest - return path - -/mob/living/carbon/human/interactive/proc/walk2derpless(target) - set background = 1 - if(!target) - return 0 - - if(myPath.len <= 0) - myPath = get_path_to(src, get_turf(target), /turf/proc/Distance, SNPC_MAX_RANGE_FIND + 1, 250,1, id=Path_ID, simulated_only = 0) - - if(myPath) - if(myPath.len > 0) - doing = doing & ~SNPC_TRAVEL - for(var/i = 0; i < maxStepsTick; ++i) - if(!IsDeadOrIncap()) - if(myPath.len >= 1) - walk_to(src,myPath[1],0,5) - myPath -= myPath[1] - return 1 - return 0 - -/mob/living/carbon/human/interactive/proc/job2area(target) - var/datum/job/T = target - switch(T.title) - if("Civilian", "Paramedic") - return /area/hallway/primary - if("Captain", "Head of Personnel", "Blueshield") - return /area/bridge - if("Bartender") - return /area/crew_quarters/bar - if("Chef") - return /area/crew_quarters/kitchen - if("Station Engineer", "Chief Engineer", "Mechanic") - return /area/engine - if("Life Support Specialist") - return /area/atmos - if("Chief Medical Officer", "Medical Doctor", "Chemist", "Virologist", "Psychiatrist") - return /area/medical - if("Geneticist") - return /area/medical/genetics - if("Research Director", "Scientist") - return /area/toxins - if("Roboticist") - return /area/assembly/robotics - if("Head of Security", "Warden", "Security Officer", "Detective", "Security Pod Pilot", "Brig Physician", "Magistrate", "Internal Affairs Agent") - return /area/security - if("Botanist") - return /area/hydroponics - else - return pick(/area/hallway, /area/crew_quarters) - -/mob/living/carbon/human/interactive/proc/target_filter(target) - var/list/filtered_targets = list(/area, /turf, /obj/machinery/door, /atom/movable/lighting_overlay, /obj/structure/cable, /obj/machinery/atmospherics, /obj/item/radio/intercom) - var/list/L = target - for(var/atom/A in target) // added a bunch of "junk" that clogs up the general find procs - if(is_type_in_list(A,filtered_targets)) - L -= A - return L - -/mob/living/carbon/human/interactive/proc/shouldModulePass() // returns 1 if the npc is in anything "primary" - if(doing & (SNPC_FIGHTING | SNPC_SPECIAL)) - return 1 - if(retal) - return 1 - return 0 - -/mob/living/carbon/human/interactive/proc/getAllContents() - var/list/allContents = list() - for(var/atom/A in contents) - allContents += A - if(A.contents.len) - for(var/atom/B in A) - allContents += B - return allContents - -/mob/living/carbon/human/interactive/proc/enforceHome() - var/list/validHome = get_area_turfs(job2area(myjob)) - - if(TARGET) - var/atom/tcheck = TARGET - if(tcheck) - if(!(get_turf(tcheck) in validHome)) - TARGET = null - return 1 - - if(!(get_turf(src) in validHome) && validHome.len) - tryWalk(pick(get_area_turfs(job2area(myjob)))) - return 1 - return 0 - -/mob/living/carbon/human/interactive/proc/npcDrop(obj/item/A, blacklist = 0) - if(blacklist) - blacklistItems += A - unEquip(A) - enforce_hands() - update_icons() - -/mob/living/carbon/human/interactive/proc/compareFaction(list/targetFactions) - var/hasSame = 0 - - for(var/A in targetFactions) - if(A in faction) - hasSame = 1 - - return hasSame - -/mob/living/carbon/human/interactive/proc/nearbyscan(obj) - nearby = list() - for(var/mob/living/M in view(4,src)) - if(M != src) - nearby += M - -/mob/living/carbon/human/interactive/rename_character(oldname, newname) - if(!..()) - return 0 - - if(oldname) - if(MYID) - MYID.registered_name = newname - MYID.name = "[newname]'s ID Card ([MYID.assignment])" - if(RPID) - RPID.registered_name = MYID.registered_name - RPID.name = MYID.name - return 1 diff --git a/code/modules/mob/living/carbon/human/interactive/prefabs.dm b/code/modules/mob/living/carbon/human/interactive/prefabs.dm deleted file mode 100644 index cee716b66ec..00000000000 --- a/code/modules/mob/living/carbon/human/interactive/prefabs.dm +++ /dev/null @@ -1,24 +0,0 @@ -/mob/living/carbon/human/interactive/angry/Initialize(mapload) - TRAITS |= TRAIT_ROBUST - TRAITS |= TRAIT_MEAN - faction += "bot_angry" - return ..() - -/mob/living/carbon/human/interactive/friendly/Initialize(mapload) - TRAITS |= TRAIT_FRIENDLY - TRAITS |= TRAIT_UNROBUST - faction += "bot_friendly" - faction += "neutral" - functions -= "combat" - return ..() - -/mob/living/carbon/human/interactive/greytide/Initialize(mapload) - TRAITS |= TRAIT_ROBUST - TRAITS |= TRAIT_MEAN - TRAITS |= TRAIT_THIEVING - TRAITS |= TRAIT_DUMB - maxInterest = 5 // really short attention span - targetInterestShift = 2 // likewise - faction += "bot_grey" - graytide = 1 - return ..() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 903c8ef80d3..d6c667b1b74 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -38,6 +38,7 @@ regenerate_icons() // Make sure the inventory updates handle_ghosted() + handle_ssd() /mob/living/carbon/human/proc/handle_ghosted() if(player_ghosted > 0 && stat == CONSCIOUS && job && !restrained()) @@ -48,6 +49,22 @@ if(player_ghosted % 150 == 0) force_cryo_human(src) +/mob/living/carbon/human/proc/handle_ssd() + if(player_logged > 0 && stat != DEAD && job) + player_logged++ + if(istype(loc, /obj/machinery/cryopod)) + return + if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0) + var/turf/T = get_turf(src) + if(!is_station_level(T.z)) + return + var/area/A = get_area(src) + if(cryo_ssd(src)) + var/obj/effect/portal/P = new /obj/effect/portal(T, null, null, 40) + P.name = "NT SSD Teleportation Portal" + if(A.fast_despawn) + force_cryo_human(src) + /mob/living/carbon/human/calculate_affecting_pressure(var/pressure) ..() var/pressure_difference = abs( pressure - ONE_ATMOSPHERE ) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 1be6fc60a25..2f181d77077 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -62,27 +62,38 @@ return ..() /mob/living/carbon/human/proc/HasVoiceChanger() - if(istype(back,/obj/item/rig)) + if(istype(back, /obj/item/rig)) var/obj/item/rig/rig = back if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice) return rig.speech.voice_holder.voice - for(var/obj/item/gear in list(wear_mask,wear_suit,head)) + for(var/obj/item/gear in list(wear_mask, wear_suit, head)) if(!gear) continue + var/obj/item/voice_changer/changer = locate() in gear - if(changer && changer.active && changer.voice) - return changer.voice - return 0 + if(changer && changer.active) + if(changer.voice) + return changer.voice + else if(wear_id) + var/obj/item/card/id/idcard = wear_id.GetID() + if(istype(idcard)) + return idcard.registered_name + + return FALSE /mob/living/carbon/human/GetVoice() var/has_changer = HasVoiceChanger() + if(has_changer) return has_changer + if(mind && mind.changeling && mind.changeling.mimicing) return mind.changeling.mimicing + if(GetSpecialVoice()) return GetSpecialVoice() + return real_name /mob/living/carbon/human/IsVocal() @@ -124,7 +135,6 @@ span = mind.speech_span if((COMIC in mutations) \ || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs) \ - || istype(get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown) \ || GetComponent(/datum/component/jestosterone)) span = "sans" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index e55eee62dbc..6e540c4cf5a 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -659,6 +659,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_glasses(var/update_icons=1) remove_overlay(GLASSES_LAYER) remove_overlay(GLASSES_OVER_LAYER) + remove_overlay(OVER_MASK_LAYER) if(client && hud_used) var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses] @@ -681,7 +682,12 @@ var/global/list/damage_icon_parts = list() new_glasses = mutable_appearance('icons/mob/eyes.dmi', "[glasses.icon_state]", layer = -GLASSES_LAYER) var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] - if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value. + var/obj/item/clothing/glasses/G = glasses + if(istype(G) && G.over_mask) //If the user's used the 'wear over mask' verb on the glasses. + new_glasses.layer = -OVER_MASK_LAYER + overlays_standing[OVER_MASK_LAYER] = new_glasses + apply_overlay(OVER_MASK_LAYER) + else if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value. new_glasses.layer = -GLASSES_OVER_LAYER overlays_standing[GLASSES_OVER_LAYER] = new_glasses apply_overlay(GLASSES_OVER_LAYER) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index d28e728c82c..d66f3dbf815 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -8,6 +8,15 @@ return 0 var/datum/gas_mixture/environment = loc.return_air() + if(client || registered_z) // This is a temporary error tracker to make sure we've caught everything + var/turf/T = get_turf(src) + if(client && registered_z != T.z) + message_admins("[src] [ADMIN_FLW(src, "FLW")] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z]. If you could ask them how that happened and notify the coders, it would be appreciated.") + log_game("Z-TRACKING: [src] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z].") + update_z(T.z) + else if (!client && registered_z) + log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.") + update_z(null) if(stat != DEAD) //Chemicals in the body handle_chemicals_in_body() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 52fde3d0d9e..3000fd5b085 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -953,6 +953,27 @@ to_chat(src, "You can taste [english_list(final_taste_list)].") +/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister + if(registered_z != new_z) + if(registered_z) + SSmobs.clients_by_zlevel[registered_z] -= src + if(client) + if(new_z) + SSmobs.clients_by_zlevel[new_z] += src + for (var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511 + var/mob/living/simple_animal/SA = SSidlenpcpool.idle_mobs_by_zlevel[new_z][I] + if (SA) + SA.toggle_ai(AI_ON) // Guarantees responsiveness for when appearing right next to mobs + else + SSidlenpcpool.idle_mobs_by_zlevel[new_z] -= SA + registered_z = new_z + else + registered_z = null + +/mob/living/onTransitZ(old_z,new_z) + ..() + update_z(new_z) + /mob/living/proc/owns_soul() if(mind) return mind.soulOwner == mind diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index d1157b662fa..d8e27df91fe 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -5,6 +5,10 @@ update_stat("mob login") update_sight() + var/turf/T = get_turf(src) + if(isturf(T)) + update_z(T.z) + //If they're SSD, remove it so they can wake back up. player_logged = 0 //Vents diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index 87384669a7c..e1c33f89a7e 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -1,4 +1,5 @@ /mob/living/Logout() + update_z(null) if(ranged_ability && client) ranged_ability.remove_mousepointer(client) ..() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ccf319b0884..ae7fcf56a9d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -634,7 +634,7 @@ var/list/ai_verbs_default = list( return if(href_list["trackbot"]) - var/mob/living/simple_animal/bot/target = locate(href_list["trackbot"]) in GLOB.simple_animal_list + var/mob/living/simple_animal/bot/target = locate(href_list["trackbot"]) in GLOB.simple_animals if(target) ai_actual_track(target) else @@ -642,7 +642,7 @@ var/list/ai_verbs_default = list( return if(href_list["callbot"]) //Command a bot to move to a selected location. - Bot = locate(href_list["callbot"]) in GLOB.simple_animal_list + Bot = locate(href_list["callbot"]) in GLOB.simple_animals if(!Bot || Bot.remote_disabled || control_disabled) return //True if there is no bot found, the bot is manually emagged, or the AI is carded with wireless off. waypoint_mode = 1 @@ -650,7 +650,7 @@ var/list/ai_verbs_default = list( return if(href_list["interface"]) //Remotely connect to a bot! - Bot = locate(href_list["interface"]) in GLOB.simple_animal_list + Bot = locate(href_list["interface"]) in GLOB.simple_animals if(!Bot || Bot.remote_disabled || control_disabled) return Bot.attack_ai(src) @@ -746,7 +746,7 @@ var/list/ai_verbs_default = list( d += "Query network status
" d += "" - for(var/mob/living/simple_animal/bot/Bot in GLOB.simple_animal_list) + for(var/mob/living/simple_animal/bot/Bot in GLOB.simple_animals) if(is_ai_allowed(Bot.z) && !Bot.remote_disabled) //Only non-emagged bots on the allowed Z-level are detected! bot_area = get_area(Bot) d += "" diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index 2f662169551..63b206debba 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -42,3 +42,9 @@ animation.icon = 'icons/mob/mob.dmi' animation.master = src QDEL_IN(animation, 15) + +/mob/living/silicon/death(gibbed) + . = ..() + if(!gibbed) + if(death_sound) + playsound(get_turf(src), death_sound, 200, 1) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 989dcba3783..ff859853ea5 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -28,7 +28,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(candidate) if(!istype(candidate)) - message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate is not a pAI)") + message_admins("Warning: possible href exploit by [key_name_admin(usr)] (paiController/Topic, candidate is not a pAI)") log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate is not a pAI)") return @@ -55,7 +55,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates pai_candidates -= candidate usr << browse(null, "window=findPai") - + return if("signup" in href_list) var/mob/dead/observer/O = locate(href_list["signup"]) @@ -71,8 +71,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(candidate) if(candidate.key && usr.key && candidate.key != usr.key) - message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)") - log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)") + message_admins("Warning: possible href exploit by [key_name_admin(usr)] (paiController/Topic, candidate and usr have different keys)") + log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr have different keys)") return if(href_list["new"]) diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index d81b76e2e76..d584d5a50f5 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -22,8 +22,11 @@ /datum/robot_component/proc/install() go_online() + owner.updatehealth("component '[src]' installed") + /datum/robot_component/proc/uninstall() go_offline() + owner.updatehealth("component '[src]' removed") /datum/robot_component/proc/destroy() if(wrapped) @@ -102,12 +105,6 @@ external_type = /obj/item/robot_parts/robot_component/actuator max_damage = 50 -/datum/robot_component/actuator/go_online() - owner.update_stat() - -/datum/robot_component/actuator/go_offline() - owner.update_stat() - /datum/robot_component/cell name = "power cell" max_damage = 50 @@ -115,12 +112,6 @@ /datum/robot_component/cell/is_powered() return ..() && owner.cell -/datum/robot_component/cell/go_online() - owner.update_stat() - -/datum/robot_component/cell/go_offline() - owner.update_stat() - /datum/robot_component/cell/destroy() ..() owner.cell = null @@ -264,19 +255,25 @@ if(M.timeofdeath && M.stat == DEAD) to_chat(user, "Time of Disable: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]") var/mob/living/silicon/robot/H = M - var/list/damaged = H.get_damaged_components(1,1,1) + var/list/damaged = H.get_damaged_components(TRUE, TRUE, TRUE) // Get all except the missing ones + var/list/missing = H.get_missing_components() to_chat(user, "Localized Damage:") - if(length(damaged)>0) - for(var/datum/robot_component/org in damaged) - user.show_message(text("\t []: [][] - [] - [] - []", \ - capitalize(org.name), \ - (org.installed == -1) ? "DESTROYED " :"",\ - (org.electronics_damage > 0) ? "[org.electronics_damage]" :0, \ - (org.brute_damage > 0) ? "[org.brute_damage]" :0, \ - (org.toggled) ? "Toggled ON" : "Toggled OFF",\ - (org.powered) ? "Power ON" : "Power OFF"),1) - else + if(!LAZYLEN(damaged) && !LAZYLEN(missing)) to_chat(user, "\t Components are OK.") + else + if(LAZYLEN(damaged)) + for(var/datum/robot_component/org in damaged) + user.show_message(text("\t []: [][] - [] - [] - []", \ + capitalize(org.name), \ + (org.installed == -1) ? "DESTROYED " :"",\ + (org.electronics_damage > 0) ? "[org.electronics_damage]" :0, \ + (org.brute_damage > 0) ? "[org.brute_damage]" :0, \ + (org.toggled) ? "Toggled ON" : "Toggled OFF",\ + (org.powered) ? "Power ON" : "Power OFF"),1) + if(LAZYLEN(missing)) + for(var/datum/robot_component/org in missing) + user.show_message("\t [capitalize(org.name)]: MISSING") + if(H.emagged && prob(5)) to_chat(user, "\t ERROR: INTERNAL SYSTEMS COMPROMISED") @@ -287,22 +284,22 @@ to_chat(user, "External prosthetics:") var/organ_found - if(H.internal_organs.len) + if(LAZYLEN(H.internal_organs)) for(var/obj/item/organ/external/E in H.bodyparts) if(!E.is_robotic()) continue - organ_found = 1 + organ_found = TRUE to_chat(user, "[E.name]: [E.brute_dam][E.burn_dam]") if(!organ_found) to_chat(user, "No prosthetics located.") to_chat(user, "
") to_chat(user, "Internal prosthetics:") organ_found = null - if(H.internal_organs.len) + if(LAZYLEN(H.internal_organs)) for(var/obj/item/organ/internal/O in H.internal_organs) if(!O.is_robotic()) continue - organ_found = 1 + organ_found = TRUE to_chat(user, "[capitalize(O.name)]: [O.damage]") if(!organ_found) to_chat(user, "No prosthetics located.") diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 80014c44f8b..e94f9e072b4 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -248,9 +248,9 @@ death() /mob/living/silicon/robot/drone/proc/full_law_reset() - clear_supplied_laws() - clear_inherent_laws() - clear_ion_laws() + clear_supplied_laws(TRUE) + clear_inherent_laws(TRUE) + clear_ion_laws(TRUE) laws = new /datum/ai_laws/drone //Reboot procs. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ae6a832f6ac..da793b2f3d3 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -157,6 +157,7 @@ var/list/robot_verbs_default = list( var/datum/robot_component/cell_component = components["power cell"] cell_component.wrapped = cell cell_component.installed = 1 + cell_component.install() diag_hud_set_borgcell() scanner = new(src) @@ -438,8 +439,10 @@ var/list/robot_verbs_default = list( var/dat = "[src.name] Self-Diagnosis Report\n" for(var/V in components) var/datum/robot_component/C = components[V] - dat += "[C.name]

Name

Status

Location

Control

[Bot.hacked ? "(!) [Bot.name]" : Bot.name] ([Bot.model])
Brute Damage:[C.brute_damage]
Electronics Damage:[C.electronics_damage]
Powered:[C.is_powered() ? "Yes" : "No"]
Toggled:[ C.toggled ? "Yes" : "No"]

" - + if(C.installed == 0) + dat += "[C.name]
MISSING
" + else + dat += "[C.name][C.installed == -1 ? "
DESTROYED" : ""]
Brute Damage:[C.brute_damage]
Electronics Damage:[C.electronics_damage]
Powered:[C.is_powered() ? "Yes" : "No"]
Toggled:[ C.toggled ? "Yes" : "No"]

" return dat /mob/living/silicon/robot/verb/self_diagnosis_verb() @@ -591,6 +594,9 @@ var/list/robot_verbs_default = list( if(!getBruteLoss()) to_chat(user, "Nothing to fix!") return + else if(!getBruteLoss(TRUE)) + to_chat(user, "The damaged components are beyond saving!") + return var/obj/item/weldingtool/WT = W user.changeNext_move(CLICK_CD_MELEE) if(WT.remove_fuel(0)) @@ -603,11 +609,14 @@ var/list/robot_verbs_default = list( return - else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) + else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src, /mob/living/silicon/robot/drone))) user.changeNext_move(CLICK_CD_MELEE) if(!getFireLoss()) to_chat(user, "Nothing to fix!") return + else if(!getFireLoss(TRUE)) + to_chat(user, "The damaged components are beyond saving!") + return var/obj/item/stack/cable_coil/coil = W adjustFireLoss(-30) updatehealth() @@ -654,10 +663,10 @@ var/list/robot_verbs_default = list( I.burn = C.electronics_damage I.loc = src.loc - - if(C.installed == 1) - C.uninstall() + var/was_installed = C.installed C.installed = 0 + if(was_installed == 1) + C.uninstall() else if(locked) @@ -1362,7 +1371,7 @@ var/list/robot_verbs_default = list( ..() var/brute = 1000 var/burn = 1000 - var/list/datum/robot_component/borked_parts = get_damaged_components(brute,burn,1) + var/list/datum/robot_component/borked_parts = get_damaged_components(TRUE, TRUE, TRUE, TRUE) for(var/datum/robot_component/borked_part in borked_parts) brute = borked_part.brute_damage burn = borked_part.electronics_damage diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index e2a93fa0167..81700464ac0 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -8,18 +8,20 @@ handle_hud_icons_health() diag_hud_set_health() -/mob/living/silicon/robot/getBruteLoss() +/mob/living/silicon/robot/getBruteLoss(repairable_only = FALSE) var/amount = 0 for(var/V in components) var/datum/robot_component/C = components[V] - if(C.installed != 0) amount += C.brute_damage + if(C.installed != 0 && (!repairable_only || C.installed != -1)) // Installed ones only and if repair only remove the borked ones + amount += C.brute_damage return amount -/mob/living/silicon/robot/getFireLoss() +/mob/living/silicon/robot/getFireLoss(repairable_only = FALSE) var/amount = 0 for(var/V in components) var/datum/robot_component/C = components[V] - if(C.installed != 0) amount += C.electronics_damage + if(C.installed != 0 && (!repairable_only || C.installed != -1)) // Installed ones only and if repair only remove the borked ones + amount += C.electronics_damage return amount /mob/living/silicon/robot/adjustBruteLoss(amount, updating_health = TRUE) @@ -36,11 +38,19 @@ heal_overall_damage(0, -amount, updating_health) return STATUS_UPDATE_HEALTH -/mob/living/silicon/robot/proc/get_damaged_components(var/brute, var/burn, var/get_all) +/mob/living/silicon/robot/proc/get_damaged_components(get_brute, get_burn, get_borked = FALSE, get_missing = FALSE) var/list/datum/robot_component/parts = list() for(var/V in components) var/datum/robot_component/C = components[V] - if(C.installed == 1 || get_all) if((brute && C.brute_damage) || (burn && C.electronics_damage)) + if((C.installed == 1 || (get_borked && C.installed == -1) || (get_missing && C.installed == 0)) && ((get_brute && C.brute_damage) || (get_burn && C.electronics_damage))) + parts += C + return parts + +/mob/living/silicon/robot/proc/get_missing_components() + var/list/datum/robot_component/parts = list() + for(var/V in components) + var/datum/robot_component/C = components[V] + if(C.installed == 0) parts += C return parts @@ -48,41 +58,43 @@ var/list/rval = new for(var/V in components) var/datum/robot_component/C = components[V] - if(C.installed == 1) rval += C + if(C.installed == 1) + rval += C return rval /mob/living/silicon/robot/proc/get_armour() - - if(!components.len) return 0 + if(!LAZYLEN(components)) + return 0 var/datum/robot_component/C = components["armour"] if(C && C.installed == 1) return C return 0 /mob/living/silicon/robot/heal_organ_damage(brute, burn, updating_health = TRUE) - var/list/datum/robot_component/parts = get_damaged_components(brute,burn) - if(!parts.len) return + var/list/datum/robot_component/parts = get_damaged_components(brute, burn) + if(!LAZYLEN(parts)) + return var/datum/robot_component/picked = pick(parts) - picked.heal_damage(brute,burn, updating_health) + picked.heal_damage(brute, burn, updating_health) /mob/living/silicon/robot/take_organ_damage(brute = 0, burn = 0, updating_health = TRUE, sharp = 0, edge = 0) var/list/components = get_damageable_components() - if(!components.len) + if(!LAZYLEN(components)) return //Combat shielding absorbs a percentage of damage directly into the cell. var/obj/item/borg/combat/shield/shield - if(module_state_1 && istype(module_state_1,/obj/item/borg/combat/shield)) + if(module_state_1 && istype(module_state_1, /obj/item/borg/combat/shield)) shield = module_state_1 - else if(module_state_2 && istype(module_state_2,/obj/item/borg/combat/shield)) + else if(module_state_2 && istype(module_state_2, /obj/item/borg/combat/shield)) shield = module_state_2 - else if(module_state_3 && istype(module_state_3,/obj/item/borg/combat/shield)) + else if(module_state_3 && istype(module_state_3, /obj/item/borg/combat/shield)) shield = module_state_3 if(shield) //Shields absorb a certain percentage of damage based on their power setting. - var/absorb_brute = brute*shield.shield_level - var/absorb_burn = burn*shield.shield_level - var/cost = (absorb_brute+absorb_burn)*100 + var/absorb_brute = brute * shield.shield_level + var/absorb_burn = burn * shield.shield_level + var/cost = (absorb_brute+absorb_burn) * 100 cell.charge -= cost if(cell.charge <= 0) @@ -102,9 +114,9 @@ C.take_damage(brute, burn, sharp, updating_health) /mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn, updating_health = TRUE) - var/list/datum/robot_component/parts = get_damaged_components(brute,burn) + var/list/datum/robot_component/parts = get_damaged_components(brute, burn) - while(parts.len && (brute>0 || burn>0) ) + while(LAZYLEN(parts) && (brute > 0 || burn > 0) ) var/datum/robot_component/picked = pick(parts) var/brute_was = picked.brute_damage @@ -112,8 +124,8 @@ picked.heal_damage(brute,burn, updating_health) - brute -= (brute_was-picked.brute_damage) - burn -= (burn_was-picked.electronics_damage) + brute -= (brute_was - picked.brute_damage) + burn -= (burn_was - picked.electronics_damage) parts -= picked @@ -126,17 +138,17 @@ //Combat shielding absorbs a percentage of damage directly into the cell. var/obj/item/borg/combat/shield/shield - if(module_state_1 && istype(module_state_1,/obj/item/borg/combat/shield)) + if(module_state_1 && istype(module_state_1, /obj/item/borg/combat/shield)) shield = module_state_1 - else if(module_state_2 && istype(module_state_2,/obj/item/borg/combat/shield)) + else if(module_state_2 && istype(module_state_2, /obj/item/borg/combat/shield)) shield = module_state_2 - else if(module_state_3 && istype(module_state_3,/obj/item/borg/combat/shield)) + else if(module_state_3 && istype(module_state_3, /obj/item/borg/combat/shield)) shield = module_state_3 if(shield) //Shields absorb a certain percentage of damage based on their power setting. - var/absorb_brute = brute*shield.shield_level - var/absorb_burn = burn*shield.shield_level - var/cost = (absorb_brute+absorb_burn)*100 + var/absorb_brute = brute * shield.shield_level + var/absorb_burn = burn * shield.shield_level + var/cost = (absorb_brute+absorb_burn) * 100 cell.charge -= cost if(cell.charge <= 0) @@ -152,7 +164,7 @@ A.take_damage(brute, burn, sharp) return - while(parts.len && (brute>0 || burn>0) ) + while(LAZYLEN(parts) && (brute > 0 || burn > 0) ) var/datum/robot_component/picked = pick(parts) var/brute_was = picked.brute_damage diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 161b81e3cd2..85cc2ad5786 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -46,7 +46,9 @@ user.put_in_active_hand(cell) to_chat(user, "You remove \the [cell].") cell = null - update_stat() + var/datum/robot_component/C = components["power cell"] + C.installed = 0 + C.uninstall() diag_hud_set_borgcell() if(!opened) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 5c19dcb0d7a..1c82e9e8779 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -19,6 +19,7 @@ var/speak_exclamation = "declares" var/speak_query = "queries" var/pose //Yes, now AIs can pose too. + var/death_sound = 'sound/voice/borg_deathsound.ogg' //var/sensor_mode = 0 //Determines the current HUD. diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 2737781bd08..77eb74e5696 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -210,23 +210,29 @@ var/robot_arm = /obj/item/robot_parts/l_arm throw_range = 5 w_class = WEIGHT_CLASS_NORMAL var/created_name = "Floorbot" + var/toolbox = /obj/item/storage/toolbox/mechanical + var/toolbox_color = "" //Blank for blue, r for red, y for yellow, etc. -/obj/item/toolbox_tiles_sensor +/obj/item/toolbox_tiles/sensor desc = "It's a toolbox with tiles sticking out the top and a sensor attached" name = "tiles, toolbox and sensor arrangement" - icon = 'icons/obj/aibots.dmi' icon_state = "toolbox_tiles_sensor" - force = 3 - throwforce = 10 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_NORMAL - var/created_name = "Floorbot" -/obj/item/storage/toolbox/mechanical/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) +/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) + var/list/allowed_toolbox = list(/obj/item/storage/toolbox/emergency, //which toolboxes can be made into floorbots + /obj/item/storage/toolbox/electrical, + /obj/item/storage/toolbox/mechanical, + /obj/item/storage/toolbox/green, + /obj/item/storage/toolbox/syndicate, + /obj/item/storage/toolbox/fakesyndi) + if(!istype(T, /obj/item/stack/tile/plasteel)) ..() return + if(!is_type_in_list(src, allowed_toolbox)) + return + if(type == /obj/item/storage/toolbox/green/memetic) + return if(contents.len >= 1) to_chat(user, "They won't fit in, as there is already stuff inside.") return @@ -234,6 +240,23 @@ var/robot_arm = /obj/item/robot_parts/l_arm if(user.s_active) user.s_active.close(user) var/obj/item/toolbox_tiles/B = new /obj/item/toolbox_tiles + B.toolbox = type + switch(B.toolbox) + if(/obj/item/storage/toolbox/mechanical/old) + B.toolbox_color = "ob" + if(/obj/item/storage/toolbox/emergency) + B.toolbox_color = "r" + if(/obj/item/storage/toolbox/emergency/old) + B.toolbox_color = "or" + if(/obj/item/storage/toolbox/electrical) + B.toolbox_color = "y" + if(/obj/item/storage/toolbox/green) + B.toolbox_color = "g" + if(/obj/item/storage/toolbox/syndicate) + B.toolbox_color = "s" + if(/obj/item/storage/toolbox/fakesyndi) + B.toolbox_color = "s" + B.icon_state = "[B.toolbox_color]toolbox_tiles" user.put_in_hands(B) to_chat(user, "You add the tiles into the empty toolbox. They protrude from the top.") user.unEquip(src, 1) @@ -246,8 +269,10 @@ var/robot_arm = /obj/item/robot_parts/l_arm ..() if(isprox(W)) qdel(W) - var/obj/item/toolbox_tiles_sensor/B = new /obj/item/toolbox_tiles_sensor() + var/obj/item/toolbox_tiles/sensor/B = new /obj/item/toolbox_tiles/sensor() B.created_name = created_name + B.toolbox_color = src.toolbox_color + B.icon_state = "[B.toolbox_color]toolbox_tiles_sensor" user.put_in_hands(B) to_chat(user, "You add the sensor to the toolbox and tiles.") user.unEquip(src, 1) @@ -263,12 +288,11 @@ var/robot_arm = /obj/item/robot_parts/l_arm created_name = t log_game("[key_name(user)] has renamed a robot to [t]") -/obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) +/obj/item/toolbox_tiles/sensor/attackby(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm)) qdel(W) - var/turf/T = get_turf(user.loc) - var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T) + var/mob/living/simple_animal/bot/floorbot/A = new(drop_location(), toolbox_color) A.name = created_name A.robot_arm = W.type to_chat(user, "You add the robot arm to the odd looking toolbox assembly. Boop beep!") @@ -287,10 +311,9 @@ var/robot_arm = /obj/item/robot_parts/l_arm //Medbot Assembly /obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params) if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm)) - return ..() + return ..() else robot_arm = I.type - //Making a medibot! if(contents.len) @@ -298,7 +321,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm return var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly(loc, med_bot_skin) - + A.req_one_access = req_one_access A.syndicate_aligned = syndicate_aligned A.treatment_oxy = treatment_oxy @@ -492,7 +515,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm //General Griefsky - else if((istype(I, /obj/item/wrench)) && (build_step == 3)) + else if((istype(I, /obj/item/wrench)) && (build_step == 3)) var/obj/item/griefsky_assembly/A = new /obj/item/griefsky_assembly user.put_in_hands(A) to_chat(user, "You adjust the arm slots for extra weapons!.") @@ -516,12 +539,12 @@ var/robot_arm = /obj/item/robot_parts/l_arm build_step++ to_chat(user, "You add an energy sword to [src]!.") qdel(I) - + else if((istype(I, /obj/item/melee/energy/sword)) && (build_step == 3)) if(!user.unEquip(I)) return to_chat(user, "You complete General Griefsky!.") - var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky + var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky S.forceMove(get_turf(src)) qdel(I) qdel(src) @@ -537,7 +560,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm if(!user.unEquip(I)) return to_chat(user, "You complete Genewul Giftskee!.") - var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy + var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy S.forceMove(get_turf(src)) qdel(I) qdel(src) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index c22d37eed19..21967bd202b 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/aibots.dmi' icon_state = "floorbot0" density = 0 - anchored = 0 + anchored = FALSE health = 25 maxHealth = 25 @@ -32,6 +32,7 @@ var/max_targets = 50 var/turf/target var/oldloc = null + var/toolbox_color = "" #define HULL_BREACH 1 #define BRIDGE_MODE 2 @@ -40,12 +41,16 @@ #define REPLACE_TILE 5 #define TILE_EMAG 6 -/mob/living/simple_animal/bot/floorbot/New() +/mob/living/simple_animal/bot/floorbot/New(mapload, new_toolbox_color) ..() + toolbox_color = new_toolbox_color update_icon() var/datum/job/engineer/J = new/datum/job/engineer access_card.access += J.get_access() prev_access = access_card.access + if(toolbox_color == "s") + health = 50 + maxHealth = 50 /mob/living/simple_animal/bot/floorbot/bot_reset() ..() @@ -53,7 +58,7 @@ oldloc = null ignore_list = list() nagged = 0 - anchored = 0 + anchored = FALSE update_icon() /mob/living/simple_animal/bot/floorbot/set_custom_texts() @@ -235,7 +240,7 @@ repair(target) else if(emagged == 2 && istype(target,/turf/simulated/floor)) var/turf/simulated/floor/F = target - anchored = 1 + anchored = TRUE mode = BOT_REPAIRING if(prob(90)) F.break_tile_to_plating() @@ -244,7 +249,7 @@ audible_message("[src] makes an excited booping sound.") spawn(50) amount ++ - anchored = 0 + anchored = FALSE mode = BOT_IDLE target = null path = list() @@ -272,11 +277,11 @@ if(HULL_BREACH) //The most common job, patching breaches in the station's hull. if(is_hull_breach(scan_target)) //Ensure that the targeted space turf is actually part of the station, and not random space. result = scan_target - anchored = 1 //Prevent the floorbot being blown off-course while trying to reach a hull breach. + anchored = TRUE //Prevent the floorbot being blown off-course while trying to reach a hull breach. if(BRIDGE_MODE) //Only space turfs in our chosen direction are considered. if(get_dir(src, scan_target) == targetdirection) result = scan_target - anchored = 1 + anchored = TRUE if(REPLACE_TILE) F = scan_target if(istype(F, /turf/simulated/floor/plating)) //The floor must not already have a tile. @@ -306,9 +311,10 @@ mode = BOT_IDLE target = null return - anchored = 1 - icon_state = "floorbot-c" + anchored = TRUE + icon_state = "[toolbox_color]floorbot-c" if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is + icon_state = "[toolbox_color]floorbot-c" visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") mode = BOT_REPAIRING spawn(50) @@ -320,11 +326,12 @@ mode = BOT_IDLE amount -= 1 update_icon() - anchored = 0 + anchored = FALSE target = null else var/turf/simulated/floor/F = target_turf mode = BOT_REPAIRING + icon_state = "[toolbox_color]floorbot-c" visible_message("[src] begins repairing the floor.") spawn(50) if(mode == BOT_REPAIRING) @@ -334,7 +341,7 @@ mode = BOT_IDLE amount -= 1 update_icon() - anchored = 0 + anchored = FALSE target = null /mob/living/simple_animal/bot/floorbot/proc/eattile(obj/item/stack/tile/plasteel/T) @@ -380,9 +387,9 @@ /mob/living/simple_animal/bot/floorbot/update_icon() if(amount > 0) - icon_state = "floorbot[on]" + icon_state = "[toolbox_color]floorbot[on]" else - icon_state = "floorbot[on]e" + icon_state = "[toolbox_color]floorbot[on]e" /mob/living/simple_animal/bot/floorbot/explode() on = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 3ff26f7850c..970ac596482 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -451,7 +451,7 @@ response_harm = "kicks" gold_core_spawnable = CHEM_MOB_SPAWN_INVALID -/mob/living/simple_animal/pet/corgi/Ian/process_ai() +/mob/living/simple_animal/pet/corgi/Ian/Life() ..() //Feeding, chasing food, FOOOOODDDD @@ -578,7 +578,7 @@ return ..() -/mob/living/simple_animal/pet/corgi/Lisa/process_ai() +/mob/living/simple_animal/pet/corgi/Lisa/Life() ..() make_babies() diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index ae19106e1af..869c663e312 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -54,9 +54,8 @@ else if(prob(5)) emote("snuffles") -/mob/living/simple_animal/mouse/process_ai() +/mob/living/simple_animal/mouse/Life() ..() - if(prob(0.5)) stat = UNCONSCIOUS icon_state = "mouse_[mouse_color]_sleep" diff --git a/code/modules/mob/living/simple_animal/friendly/pug.dm b/code/modules/mob/living/simple_animal/friendly/pug.dm index e1e16ef42b2..36ce34094a0 100644 --- a/code/modules/mob/living/simple_animal/friendly/pug.dm +++ b/code/modules/mob/living/simple_animal/friendly/pug.dm @@ -19,7 +19,7 @@ see_in_dark = 5 gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY -/mob/living/simple_animal/pet/pug/process_ai() +/mob/living/simple_animal/pet/pug/Life() ..() if(!resting && !buckled) diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index 5139f187494..299677804e2 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -1,11 +1,8 @@ - - /mob/living/simple_animal/hostile/carp name = "space carp" desc = "A ferocious, fang-bearing creature that resembles a fish." + icon = 'icons/mob/carp.dmi' icon_state = "carp" - icon_living = "carp" - icon_dead = "carp_dead" icon_gib = "carp_gib" speak_chance = 0 turns_per_move = 5 @@ -16,7 +13,6 @@ speed = 0 maxHealth = 25 health = 25 - harm_intent_damage = 8 obj_damage = 50 melee_damage_lower = 15 @@ -30,12 +26,27 @@ minbodytemp = 0 maxbodytemp = 1500 - - faction = list("carp") flying = 1 gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE + var/carp_color = "carp" //holder for icon set + var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple") + +/mob/living/simple_animal/hostile/carp/Initialize(mapload) + . = ..() + carp_randomify() + update_icons() + +/mob/living/simple_animal/hostile/carp/proc/carp_randomify() + if(prob(1)) + carp_color = pick("white", "black") + else + carp_color = pick(icon_sets) + icon_state = "[carp_color]" + icon_living = "[carp_color]" + icon_dead = "[carp_color]_dead" + /mob/living/simple_animal/hostile/carp/Process_Spacemove(var/movement_dir = 0) return 1 //No drifting in space for space carp! //original comments do not steal @@ -50,7 +61,6 @@ var/mob/living/carbon/human/H = target H.adjustStaminaLoss(8) - /mob/living/simple_animal/hostile/carp/holocarp icon_state = "holocarp" icon_living = "holocarp" @@ -58,6 +68,8 @@ gold_core_spawnable = CHEM_MOB_SPAWN_INVALID del_on_death = 1 +/mob/living/simple_animal/hostile/carp/holocarp/carp_randomify() + return /mob/living/simple_animal/hostile/carp/megacarp icon = 'icons/mob/alienqueen.dmi' @@ -73,4 +85,7 @@ mob_size = MOB_SIZE_LARGE obj_damage = 80 melee_damage_lower = 20 - melee_damage_upper = 20 \ No newline at end of file + melee_damage_upper = 20 + +/mob/living/simple_animal/hostile/carp/megacarp/carp_randomify() + return diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 50568fb37d0..852d7c406d1 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -30,8 +30,6 @@ var/stat_exclusive = 0 //Mobs with this set to 1 will exclusively attack things defined by stat_attack, stat_attack 2 means they will only attack corpses var/attack_same = 0 //Set us to 1 to allow us to attack our own faction, or 2, to only ever attack our own faction - var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever) - //typecache of things this mob will attack in DestroySurroundings() if it has environment_smash var/list/environment_target_typecache = list( /obj/machinery/door/window, @@ -66,12 +64,6 @@ walk(src, 0) return 0 -/mob/living/simple_animal/hostile/process_ai() - ..() - if(!AICanContinue()) - return 0 - return 1 - /mob/living/simple_animal/hostile/handle_automated_action() if(AIStatus == AI_OFF) return 0 @@ -83,7 +75,7 @@ DestroySurroundings() if(!MoveToTarget(possible_targets)) //if we lose our target if(AIShouldSleep(possible_targets)) // we try to acquire a new one - AIStatus = AI_IDLE // otherwise we go idle + toggle_ai(AI_IDLE) // otherwise we go idle return 1 /mob/living/simple_animal/hostile/attacked_by(obj/item/I, mob/living/user) @@ -264,8 +256,8 @@ if(search_objects)//Turn off item searching and ignore whatever item we were looking at, we're more concerned with fight or flight search_objects = 0 target = null - if(AIStatus == AI_IDLE) - AIStatus = AI_ON + if(AIStatus != AI_ON && AIStatus != AI_OFF) + toggle_ai(AI_ON) FindTarget() else if(target != null && prob(40))//No more pulling a mob forever and having a second player attack it, it can switch targets now if it finds a more suitable one FindTarget() @@ -401,9 +393,43 @@ if(AI_IDLE) if(FindTarget(possible_targets, 1)) . = 1 - AIStatus = AI_ON //Wake up for more than one Life() cycle. + toggle_ai(AI_ON) //Wake up for more than one Life() cycle. else . = 0 /mob/living/simple_animal/hostile/proc/AIShouldSleep(var/list/possible_targets) return !FindTarget(possible_targets, 1) + +/mob/living/simple_animal/hostile/consider_wakeup() + ..() + var/list/tlist + var/turf/T = get_turf(src) + + if(!T) + return + + if(!length(SSmobs.clients_by_zlevel[T.z])) // It's fine to use .len here but doesn't compile on 511 + toggle_ai(AI_Z_OFF) + return + + var/cheap_search = isturf(T) && !(T.z == 1) // The original check for SSmapping's station z level trait, unfortunately it isn't here. + if(cheap_search) + tlist = ListTargetsLazy(T.z) + else + tlist = ListTargets() + + if(AIStatus == AI_IDLE && FindTarget(tlist, 1)) + if(cheap_search) //Try again with full effort + FindTarget() + toggle_ai(AI_ON) + +/mob/living/simple_animal/hostile/proc/ListTargetsLazy(var/_Z)//Step 1, find out what we can see + var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/spacepod)) + . = list() + for(var/I in SSmobs.clients_by_zlevel[_Z]) + var/mob/M = I + if(get_dist(M, src) < vision_range) + if(isturf(M.loc)) + . += M + else if(M.loc.type in hostile_machines) + . += M.loc \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 81b384f56b7..60b0f7277c8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -142,7 +142,7 @@ var/pre_attack = 0 loot = list(/obj/item/asteroid/goliath_hide{layer = 4.1}) -/mob/living/simple_animal/hostile/asteroid/goliath/process_ai() +/mob/living/simple_animal/hostile/asteroid/goliath/Life() ..() handle_preattack() diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm index 7b10c0e828a..184cb9eacb1 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm @@ -2,9 +2,8 @@ /mob/living/simple_animal/hostile/retaliate/carp name = "sea carp" desc = "A large fish bearing similarities to a certain space-faring menace." + icon = 'icons/mob/carp.dmi' icon_state = "carp" - icon_living = "carp" - icon_dead = "carp_dead" icon_gib = "carp_gib" speak_chance = 0 turns_per_move = 5 @@ -15,20 +14,33 @@ speed = 0 maxHealth = 25 health = 25 - retreat_distance = 6 vision_range = 5 - harm_intent_damage = 8 melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "bites" attack_sound = 'sound/weapons/bite.ogg' speak_emote = list("gnashes") - faction = list("carp") flying = 1 + var/carp_color = "carp" //holder for icon set + var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple") + +/mob/living/simple_animal/hostile/retaliate/carp/Initialize(mapload) + . = ..() + carp_randomify() + update_icons() + +/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify() + if(prob(1)) + carp_color = pick("white", "black") + else + carp_color = pick(icon_sets) + icon_state = "[carp_color]" + icon_living = "[carp_color]" + icon_dead = "[carp_color]_dead" /mob/living/simple_animal/hostile/retaliate/carp/koi name = "space koi" @@ -50,18 +62,17 @@ gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE -/mob/living/simple_animal/hostile/retaliate/carp/koi/New() - ..() +/mob/living/simple_animal/hostile/retaliate/carp/koi/Initialize(mapload) + . = ..() var/koinum = rand(1, 4) icon_state = "koi[koinum]" icon_living = "koi[koinum]" icon_dead = "koi[koinum]-dead" - /mob/living/simple_animal/hostile/retaliate/carp/koi/Process_Spacemove(var/movement_dir) return TRUE /mob/living/simple_animal/hostile/retaliate/carp/koi/honk icon_state = "koi5" icon_living = "koi5" - icon_dead = "koi5-dead" \ No newline at end of file + icon_dead = "koi5-dead" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index b4019cff988..867b0eb5073 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -80,10 +80,14 @@ var/deathmessage = "" var/death_sound = null //The sound played on death + var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever) + var/can_have_ai = TRUE //once we have become sentient, we can never go back + var/shouldwakeup = FALSE //convenience var for forcibly waking up an idling AI on next check. + /mob/living/simple_animal/Initialize() ..() - GLOB.simple_animal_list += src + GLOB.simple_animals[AIStatus] += src verbs -= /mob/verb/observe if(!can_hide) verbs -= /mob/living/simple_animal/verb/hide @@ -97,7 +101,18 @@ collar.forceMove(loc) collar = null master_commander = null - GLOB.simple_animal_list -= src + GLOB.simple_animals[AIStatus] -= src + if(SSnpcpool.state == SS_PAUSED && LAZYLEN(SSnpcpool.currentrun)) + SSnpcpool.currentrun -= src + + if(nest) + nest.spawned_mobs -= src + nest = null + + var/turf/T = get_turf(src) + if (T && AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src + return ..() /mob/living/simple_animal/Login() @@ -111,12 +126,6 @@ health = Clamp(health, 0, maxHealth) med_hud_set_status() - -/mob/living/simple_animal/proc/process_ai() - handle_automated_movement() - handle_automated_action() - handle_automated_speech() - /mob/living/simple_animal/lay_down() ..() handle_resting_state_icons() @@ -562,6 +571,8 @@ /* End Inventory */ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion + toggle_ai(AI_OFF) + can_have_ai = FALSE return /mob/living/simple_animal/update_sight() @@ -581,4 +592,37 @@ return /mob/living/simple_animal/can_hear() - . = TRUE \ No newline at end of file + . = TRUE + +/mob/living/simple_animal/proc/consider_wakeup() + if(pulledby || shouldwakeup) + toggle_ai(AI_ON) + +/mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE, forced = FALSE) + . = ..() + if(!ckey && !stat)//Not unconscious + if(AIStatus == AI_IDLE) + toggle_ai(AI_ON) + +/mob/living/simple_animal/proc/toggle_ai(togglestatus) + if(!can_have_ai && (togglestatus != AI_OFF)) + return + if(AIStatus != togglestatus) + if(togglestatus > 0 && togglestatus < 5) + if(togglestatus == AI_Z_OFF || AIStatus == AI_Z_OFF) + var/turf/T = get_turf(src) + if(AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src + else + SSidlenpcpool.idle_mobs_by_zlevel[T.z] += src + GLOB.simple_animals[AIStatus] -= src + GLOB.simple_animals[togglestatus] += src + AIStatus = togglestatus + else + stack_trace("Something attempted to set simple animals AI to an invalid state: [togglestatus]") + +/mob/living/simple_animal/onTransitZ(old_z, new_z) + ..() + if(AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src + toggle_ai(initial(AIStatus)) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm index 7a17dfb202b..686a20cee36 100644 --- a/code/modules/mob/living/simple_animal/spawner.dm +++ b/code/modules/mob/living/simple_animal/spawner.dm @@ -29,7 +29,7 @@ spawned_mobs = null return ..() -/mob/living/simple_animal/hostile/spawner/process_ai() +/mob/living/simple_animal/hostile/spawner/Life() ..() spawn_mob() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index fc265722f4a..0a1346fd0ed 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -19,10 +19,10 @@ spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c2281a1b9a9..d57b2437519 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -903,13 +903,18 @@ var/list/slot_equipment_priority = list( \ /mob/MouseDrop(mob/M as mob) ..() if(M != usr) return - if(isliving(M)) // Ewww + if(isliving(M)) var/mob/living/L = M if(L.mob_size <= MOB_SIZE_SMALL) return // Stops pAI drones and small mobs (borers, parrots, crabs) from stripping people. --DZD - if(!M.can_strip) return - if(usr == src) return - if(!Adjacent(usr)) return + if(!M.can_strip) + return + if(usr == src) + return + if(!Adjacent(usr)) + return + if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src)) + return show_inv(usr) /mob/proc/can_use_hands() @@ -978,6 +983,7 @@ var/list/slot_equipment_priority = list( \ stat("CPU:", "[world.cpu]") stat("Instances:", "[num2text(world.contents.len, 10)]") GLOB.stat_entry() + stat("Server Time:", time_stamp()) stat(null) if(Master) Master.stat_entry() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 3e9ff0b7ba6..9f539282749 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -196,9 +196,11 @@ var/list/permanent_huds = list() var/list/actions = list() + var/list/datum/action/chameleon_item_actions var/list/progressbars = null //for stacking do_after bars var/list/tkgrabbed_objects = list() // Assoc list of items to TK grabs var/forced_look = null // This can either be a numerical direction or a soft object reference (UID). It makes the mob always face towards the selected thing. + var/registered_z \ No newline at end of file diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a46b9a94fc7..427bcfcb659 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -193,7 +193,7 @@ close_spawn_windows() var/obj/O = locate("landmark*Observer-Start") to_chat(src, "Now teleporting.") - observer.loc = O.loc + observer.forceMove(O.loc) observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly. client.prefs.update_preview_icon(1) observer.icon = client.prefs.preview_icon @@ -344,27 +344,27 @@ else if(IsSyndicateCommand(rank)) character.loc = pick(syndicateofficer) else - character.loc = pick(aroomwarp) + character.forceMove(pick(aroomwarp)) join_message = "has arrived" else if(spawning_at) S = spawntypes[spawning_at] if(S && istype(S)) if(S.check_job_spawning(rank)) - character.loc = pick(S.turfs) + character.forceMove(pick(S.turfs)) join_message = S.msg else to_chat(character, "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead.") - character.loc = pick(latejoin) + character.forceMove(pick(latejoin)) join_message = "has arrived on the station" else - character.loc = pick(latejoin) + character.forceMove(pick(latejoin)) join_message = "has arrived on the station" character.lastarea = get_area(loc) // Moving wheelchair if they have one if(character.buckled && istype(character.buckled, /obj/structure/chair/wheelchair)) - character.buckled.loc = character.loc + character.buckled.forceMove(character.loc) character.buckled.dir = character.dir character = SSjobs.EquipRank(character, rank, 1) //equips the human @@ -464,8 +464,7 @@ dat += " [a.title].
" - dat += "Choose from the following open positions:

" - + var/num_jobs_available = 0 var/list/activePlayers = list() var/list/categorizedJobs = list( "Command" = list(jobs = list(), titles = command_positions, color = "#aac1ee"), @@ -480,6 +479,7 @@ ) for(var/datum/job/job in SSjobs.occupations) if(job && IsJobAvailable(job.title) && !job.barred_by_disability(client)) + num_jobs_available++ activePlayers[job] = 0 var/categorized = 0 // Only players with the job assigned and AFK for less than 10 minutes count as active @@ -502,23 +502,27 @@ if(!categorized) categorizedJobs["Miscellaneous"]["jobs"] += job - dat += "
" - for(var/jobcat in categorizedJobs) - if(categorizedJobs[jobcat]["colBreak"]) - dat += "" - if(length(categorizedJobs[jobcat]["jobs"]) < 1) - continue - var/color = categorizedJobs[jobcat]["color"] - dat += "
" - dat += "[jobcat]" - for(var/datum/job/job in categorizedJobs[jobcat]["jobs"]) - if(job in SSjobs.prioritized_jobs) - dat += "[job.title] ([job.current_positions]) (Active: [activePlayers[job]])
" - else - dat += "[job.title] ([job.current_positions]) (Active: [activePlayers[job]])
" - dat += "

" + if(num_jobs_available) + dat += "Choose from the following open positions:

" + dat += "
" + for(var/jobcat in categorizedJobs) + if(categorizedJobs[jobcat]["colBreak"]) + dat += "" + if(length(categorizedJobs[jobcat]["jobs"]) < 1) + continue + var/color = categorizedJobs[jobcat]["color"] + dat += "
" + dat += "[jobcat]" + for(var/datum/job/job in categorizedJobs[jobcat]["jobs"]) + if(job in SSjobs.prioritized_jobs) + dat += "[job.title] ([job.current_positions]) (Active: [activePlayers[job]])
" + else + dat += "[job.title] ([job.current_positions]) (Active: [activePlayers[job]])
" + dat += "

" - dat += "
" + dat += "
" + else + dat += "

Unfortunately, there are no job slots free currently.
Wait a few minutes, then try again.
Or, try observing the round.
" // Removing the old window method but leaving it here for reference // src << browse(dat, "window=latechoices;size=300x640;can_close=1") // Added the new browser window method diff --git a/code/modules/modular_computers/computers/item/computer_power.dm b/code/modules/modular_computers/computers/item/computer_power.dm index d43a5f6d00c..0a7955cfe52 100644 --- a/code/modules/modular_computers/computers/item/computer_power.dm +++ b/code/modules/modular_computers/computers/item/computer_power.dm @@ -13,10 +13,10 @@ if(battery_module && battery_module.battery && battery_module.battery.charge) var/obj/item/stock_parts/cell/cell = battery_module.battery - if(cell.use(amount * CELLRATE)) + if(cell.use(amount * GLOB.CELLRATE)) return TRUE else // Discharge the cell anyway. - cell.use(min(amount*CELLRATE, cell.charge)) + cell.use(min(amount*GLOB.CELLRATE, cell.charge)) return FALSE return FALSE diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm index 38a42222c63..81d5fb03823 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -137,18 +137,17 @@ return 1 return -1 -/datum/computer_file/program/card_mod/proc/format_jobs(list/jobs) +/datum/computer_file/program/card_mod/proc/format_jobs(list/jobs, targetrank, list/jobformats) var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD] if(!card_slot || !card_slot.stored_card) return null - var/obj/item/card/id/id_card = card_slot.stored_card var/list/formatted = list() for(var/job in jobs) formatted.Add(list(list( "display_name" = replacetext(job, " ", " "), - "target_rank" = id_card && id_card.assignment ? id_card.assignment : "Unassigned", - "job" = job))) - + "target_rank" = targetrank, + "job" = job, + "jlinkformat" = jobformats[job] ? jobformats[job] : null))) return formatted @@ -225,11 +224,12 @@ var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN)) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) + SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name) modify.assignment = temp_t log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".") else var/list/access = list() - if(is_centcom) + if(is_centcom && islist(get_centcom_access(t1))) access = get_centcom_access(t1) else var/datum/job/jobdatum @@ -249,6 +249,16 @@ if(t1 == "Civilian") message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name) + SSjobs.slot_job_transfer(modify.rank, t1) + + var/mob/living/carbon/human/H = modify.getPlayer() + if(istype(H)) + if(jobban_isbanned(H, t1)) + message_admins("[ADMIN_FULLMONTY(H)] has been assigned the job [t1], in possible violation of their job ban.") + if(H.mind) + H.mind.playtime_role = t1 + modify.access = access modify.assignment = t1 modify.rank = t1 @@ -271,6 +281,18 @@ if("PRG_mode") mode = text2num(href_list["mode_target"]) + if("PRG_wipe_my_logs") + if(is_authenticated(usr) && is_centcom) + var/delcount = SSjobs.delete_log_records(scan.registered_name, FALSE) + if(delcount) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + + if("PRG_wipe_all_logs") + if(is_authenticated(usr)) + var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE) + if(delcount) + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + if("PRG_print") if(!printing && computer) printing = 1 @@ -312,6 +334,7 @@ var/jobnamedata = modify.getRankAndAssignment() log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") + SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name) modify.assignment = "Terminated" modify.access = list() callHook("terminate_employee", list(modify)) @@ -398,6 +421,7 @@ data["target_owner"] = modify && modify.registered_name ? modify.registered_name : "-----" data["target_rank"] = get_target_rank() data["scan_name"] = scan ? scan.name : "-----" + data["scan_owner"] = scan && scan.registered_name ? scan.registered_name : null data["authenticated"] = is_authenticated(user) data["has_modify"] = !!modify data["account_number"] = modify ? modify.associated_account_number : null @@ -405,14 +429,17 @@ data["all_centcom_access"] = null data["regions"] = null - data["engineering_jobs"] = format_jobs(engineering_positions) - data["medical_jobs"] = format_jobs(medical_positions) - data["science_jobs"] = format_jobs(science_positions) - data["security_jobs"] = format_jobs(security_positions) - data["support_jobs"] = format_jobs(support_positions) - data["civilian_jobs"] = format_jobs(civilian_positions) - data["special_jobs"] = format_jobs(whitelisted_positions) - data["centcom_jobs"] = format_jobs(get_all_centcom_jobs()) + var/list/job_formats = SSjobs.format_jobs_for_id_computer(modify) + + data["top_jobs"] = format_jobs(list("Captain", "Custom"), data["target_rank"], job_formats) + data["engineering_jobs"] = format_jobs(engineering_positions, data["target_rank"], job_formats) + data["medical_jobs"] = format_jobs(medical_positions, data["target_rank"], job_formats) + data["science_jobs"] = format_jobs(science_positions, data["target_rank"], job_formats) + data["security_jobs"] = format_jobs(security_positions, data["target_rank"], job_formats) + data["support_jobs"] = format_jobs(support_positions, data["target_rank"], job_formats) + data["civilian_jobs"] = format_jobs(civilian_positions, data["target_rank"], job_formats) + data["special_jobs"] = format_jobs(whitelisted_positions, data["target_rank"], job_formats) + data["centcom_jobs"] = format_jobs(get_all_centcom_jobs(), data["target_rank"], job_formats) data["card_skins"] = format_card_skins(get_station_card_skins()) data["job_slots"] = format_job_slots() @@ -423,6 +450,9 @@ data["cooldown_mins"] = mins data["cooldown_secs"] = (seconds < 10) ? "0[seconds]" : seconds + if(mode == 3 && is_authenticated(user)) + data["id_change_html"] = SSjobs.fetch_transfer_record_html(is_centcom) + if(modify) data["current_skin"] = modify.icon_state diff --git a/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm b/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm index 2efe872a7f5..783ae9fa947 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm @@ -39,7 +39,7 @@ data["powermonitor"] = attached ? TRUE : FALSE if(attached) - var/datum/powernet/powernet = attached.get_powernet() + var/datum/powernet/powernet = attached.powernet data["poweravail"] = powernet.avail data["powerload"] = powernet.viewload data["powerdemand"] = powernet.load diff --git a/code/modules/modular_computers/hardware/recharger.dm b/code/modules/modular_computers/hardware/recharger.dm index 688d689cf67..418a9736528 100644 --- a/code/modules/modular_computers/hardware/recharger.dm +++ b/code/modules/modular_computers/hardware/recharger.dm @@ -20,7 +20,7 @@ return if(use_power(charge_rate, charging=1)) - holder.give_power(charge_rate * CELLRATE) + holder.give_power(charge_rate * GLOB.CELLRATE) /obj/item/computer_hardware/recharger/APC diff --git a/code/modules/ninja/suit/mask.dm b/code/modules/ninja/suit/mask.dm index 910ccbc953c..bfc87e0104c 100644 --- a/code/modules/ninja/suit/mask.dm +++ b/code/modules/ninja/suit/mask.dm @@ -6,7 +6,7 @@ Contents: */ -/obj/item/clothing/mask/gas/voice/space_ninja +/obj/item/clothing/mask/gas/space_ninja name = "ninja mask" desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement." icon_state = "s-ninja(norm)" @@ -19,3 +19,13 @@ Contents: "Tajaran" = 'icons/mob/species/tajaran/mask.dmi', "Vulpkanin" = 'icons/mob/species/vulpkanin/mask.dmi' ) + + var/obj/item/voice_changer/voice_changer + +/obj/item/clothing/mask/gas/space_ninja/Initialize(mapload) + . = ..() + voice_changer = new(src) + +/obj/item/clothing/mask/gas/space_ninja/Destroy() + QDEL_NULL(voice_changer) + return ..() \ No newline at end of file diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index f03a08d237a..dfd430a5754 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -24,7 +24,7 @@ Contents: var/obj/item/clothing/head/helmet/space/space_ninja/suitHood var/obj/item/clothing/gloves/space_ninja/suitGloves var/obj/item/clothing/shoes/space_ninja/suitShoes - var/obj/item/clothing/mask/gas/voice/space_ninja/suitMask + var/obj/item/clothing/mask/gas/space_ninja/suitMask var/mob/living/carbon/human/suitOccupant /obj/item/clothing/suit/space/space_ninja/proc/toggle_suit_lock(mob/living/carbon/human/user) @@ -41,7 +41,7 @@ Contents: if(!istype(user.shoes, /obj/item/clothing/shoes/space_ninja)) to_chat(user, "ERROR: Unable to locate foot gear.\nABORTING...") return 0 - if(!istype(user.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)) + if(!istype(user.wear_mask, /obj/item/clothing/mask/gas/space_ninja)) to_chat(user, "ERROR: Unable to locate mask.\nABORTING...") return 0 diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index e1ae7da26f5..dc16101eac7 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -131,13 +131,13 @@ obj/item/clipboard/proc/penPlacement(mob/user, obj/item/pen/P, placing) else penPlacement(usr, containedpen, FALSE) else if(href_list["remove"]) - var/obj/item/P = locate(href_list["remove"]) + var/obj/item/P = locate(href_list["remove"]) in src if(isPaperwork(P)) usr.put_in_hands(P) to_chat(usr, "You remove [P] from [src].") checkTopPaper() //So we don't accidentally make the top sheet not be on the clipboard else if(href_list["viewOrWrite"]) - var/obj/item/P = locate(href_list["viewOrWrite"]) + var/obj/item/P = locate(href_list["viewOrWrite"]) in src if(!isPaperwork(P)) return if(is_pen(I) && isPaperwork(P) != PHOTO) //Because you can't write on photos that aren't in your hand @@ -148,7 +148,7 @@ obj/item/clipboard/proc/penPlacement(mob/user, obj/item/pen/P, placing) var/obj/item/photo/Ph = P Ph.show(usr) else if(href_list["topPaper"]) - var/obj/item/P = locate(href_list["topPaper"]) + var/obj/item/P = locate(href_list["topPaper"]) in src if(P == toppaper) return to_chat(usr, "You flick the pages so that [P] is on top.") diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index af28e221eb8..de3f2ad52d6 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -325,9 +325,10 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s to_chat(user, "[pictures_left] photos left.") icon_state = icon_off on = 0 - if(user.mind && !(user.mind.assigned_role == "Chaplain")) - if(prob(24)) - handle_haunt(user) + if(istype(src,/obj/item/camera/spooky)) + if(user.mind && user.mind.assigned_role == "Chaplain" && see_ghosts) + if(prob(24)) + handle_haunt(user) spawn(64) icon_state = icon_on on = 1 diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 8e78f0ce230..8c24cc55c9d 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -92,27 +92,3 @@ icon_state = "stamp-syndicate" item_color = "syndicate" -// Syndicate stamp to forge documents. - -/obj/item/stamp/chameleon/attack_self(mob/user as mob) - - var/list/stamp_types = typesof(/obj/item/stamp) - src.type // Get all stamp types except our own - var/list/stamps = list() - - // Generate them into a list - for(var/stamp_type in stamp_types) - var/obj/item/stamp/S = new stamp_type - stamps[capitalize(S.name)] = S - - var/list/show_stamps = list("EXIT" = null) + sortList(stamps) // the list that will be shown to the user to pick from - - var/input_stamp = input(user, "Choose a stamp to disguise as.", "Choose a stamp.") in show_stamps - - if(user && src in user.contents) - - var/obj/item/stamp/chosen_stamp = stamps[capitalize(input_stamp)] - - if(chosen_stamp) - name = chosen_stamp.name - icon_state = chosen_stamp.icon_state - item_color = chosen_stamp.item_color diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index de2414da743..a66e72d17a3 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -392,7 +392,7 @@ BucketData[++BucketData.len] = list("x" = 0, "y" = 0, dir=null, status = null) var/CbotData[0] - for(var/mob/living/simple_animal/bot/cleanbot/B in GLOB.simple_animal_list) + for(var/mob/living/simple_animal/bot/cleanbot/B in GLOB.simple_animals) var/turf/bl = get_turf(B) if(bl) if(bl.z != cl.z) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c7adce7f533..a3186b115a4 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -46,7 +46,6 @@ name = "area power controller" desc = "A control terminal for the area electrical systems." icon_state = "apc0" - anchored = 1 use_power = NO_POWER_USE req_access = list(access_engine_equip) siemens_strength = 1 @@ -55,7 +54,7 @@ var/areastring = null var/obj/item/stock_parts/cell/cell var/start_charge = 90 // initial cell charge % - var/cell_type = 2500 + var/cell_type = 2500 //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs var/opened = 0 //0=closed, 1=opened, 2=cover removed var/shorted = 0 var/lighting = 3 @@ -137,40 +136,35 @@ /obj/machinery/power/apc/connect_to_network() //Override because the APC does not directly connect to the network; it goes through a terminal. //The terminal is what the power computer looks for anyway. - if(!terminal) - make_terminal() if(terminal) terminal.connect_to_network() -/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0) +/obj/machinery/power/apc/New(turf/loc, ndir, building = 0) if(!armor) armor = list(melee = 20, bullet = 20, laser = 10, energy = 100, bomb = 30, bio = 100, rad = 100) ..() GLOB.apcs += src GLOB.apcs = sortAtom(GLOB.apcs) - wires = new(src) + wires = new(src) // offset 24 pixels in direction of dir // this allows the APC to be embedded in a wall, yet still inside an area if(building) - dir = ndir - src.tdir = dir // to fix Vars bug - dir = SOUTH + setDir(ndir) + tdir = dir // to fix Vars bug + setDir(SOUTH) pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24) pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0 - if(building==0) - init() - else + if(building) area = get_area(src) area.apc |= src opened = 1 operating = 0 name = "[area.name] APC" stat |= MAINT - src.update_icon() - spawn(5) - src.update() + update_icon() + addtimer(CALLBACK(src, .proc/update), 5) /obj/machinery/power/apc/Destroy() GLOB.apcs -= src @@ -193,14 +187,17 @@ // create a terminal object at the same position as original turf loc // wires will attach to this terminal = new/obj/machinery/power/terminal(src.loc) - terminal.dir = tdir + terminal.setDir(tdir) terminal.master = src -/obj/machinery/power/apc/proc/init() +/obj/machinery/power/apc/Initialize(mapload) + . = ..() + if(!mapload) + return has_electronics = 2 //installed and secured // is starting with a power cell installed, create it and set its charge level if(cell_type) - src.cell = new/obj/item/stock_parts/cell(src) + cell = new/obj/item/stock_parts/cell(src) cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively) cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value) @@ -219,12 +216,12 @@ area = get_area_name(areastring) name = "\improper [area.name] APC" area.apc |= src + update_icon() make_terminal() - spawn(5) - src.update() + addtimer(CALLBACK(src, .proc/update), 5) /obj/machinery/power/apc/examine(mob/user) if(..(user, 1)) @@ -1084,14 +1081,9 @@ else return 0 -//Returns 1 if the APC should attempt to charge -/obj/machinery/power/apc/proc/attempt_charging() - return (chargemode && charging == 1 && operating) - -/obj/machinery/power/apc/draw_power(var/amount) +/obj/machinery/power/apc/add_load(amount) if(terminal && terminal.powernet) - return terminal.powernet.draw_power(amount) - return 0 + terminal.add_load(amount) /obj/machinery/power/apc/avail() if(terminal) @@ -1100,7 +1092,6 @@ return 0 /obj/machinery/power/apc/process() - if(stat & (BROKEN|MAINT)) return if(!area.requires_power) @@ -1136,18 +1127,21 @@ if(cell && !shorted) // draw power from cell as before to power the area - var/cellused = min(cell.charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell + var/cellused = min(cell.charge, GLOB.CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell cell.use(cellused) if(excess > lastused_total) // if power excess recharge the cell // by the same amount just used - var/draw = draw_power(cellused/CELLRATE) // draw the power needed to charge this cell - cell.give(draw * CELLRATE) + cell.give(cellused) + add_load(cellused/GLOB.CELLRATE) // add the load used to recharge the cell + + else // no excess, and not enough per-apc - if( (cell.charge/CELLRATE + excess) >= lastused_total) // can we draw enough from cell+grid to cover last usage? - var/draw = draw_power(excess) - cell.charge = min(cell.maxcharge, cell.charge + CELLRATE * draw) //recharge with what we can + if((cell.charge/GLOB.CELLRATE + excess) >= lastused_total) // can we draw enough from cell+grid to cover last usage? + cell.charge = min(cell.maxcharge, cell.charge + GLOB.CELLRATE * excess) //recharge with what we can + add_load(excess) // so draw what we can from the grid charging = 0 + else // not enough power available to run the last tick! charging = 0 chargecount = 0 @@ -1200,14 +1194,12 @@ autoflag = 0 // now trickle-charge the cell - - if(src.attempt_charging()) + if(chargemode && charging == 1 && operating) if(excess > 0) // check to make sure we have enough to charge // Max charge is capped to % per second constant - var/ch = min(excess*CELLRATE, cell.maxcharge*CHARGELEVEL) - - ch = draw_power(ch/CELLRATE) // Removes the power we're taking from the grid - cell.give(ch*CELLRATE) // actually recharge the cell + var/ch = min(excess*GLOB.CELLRATE, cell.maxcharge*GLOB.CHARGELEVEL) + add_load(ch/GLOB.CELLRATE) // Removes the power we're taking from the grid + cell.give(ch) // actually recharge the cell else charging = 0 // stop charging @@ -1220,12 +1212,12 @@ if(chargemode) if(!charging) - if(excess > cell.maxcharge*CHARGELEVEL) + if(excess > cell.maxcharge*GLOB.CHARGELEVEL) chargecount++ else chargecount = 0 - if(chargecount >= 10) + if(chargecount == 10) chargecount = 0 charging = 1 @@ -1292,9 +1284,13 @@ lighting = 0 equipment = 0 environ = 0 + update_icon() + update() spawn(600) equipment = 3 environ = 3 + update_icon() + update() ..() /obj/machinery/power/apc/ex_act(severity) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index c71bc3e7c8c..5cf1d5efbe3 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -59,21 +59,18 @@ By design, d1 is the smallest direction and d2 is the highest /obj/structure/cable/white color = COLOR_WHITE -/obj/structure/cable/New() - ..() - +/obj/structure/cable/Initialize(mapload) + . = ..() // ensure d1 & d2 reflect the icon_state for entering and exiting cable var/dash = findtext(icon_state, "-") + d1 = text2num(copytext( icon_state, 1, dash )) + d2 = text2num(copytext( icon_state, dash+1 )) - d1 = text2num( copytext( icon_state, 1, dash ) ) - - d2 = text2num( copytext( icon_state, dash+1 ) ) - - var/turf/T = src.loc // hide if turf is not intact - - if(level==1) hide(T.intact) + var/turf/T = get_turf(src) // hide if turf is not intact + if(level == 1) + hide(T.intact) LAZYADD(GLOB.cable_list, src) //add it to the global cable list @@ -83,14 +80,23 @@ By design, d1 is the smallest direction and d2 is the highest LAZYREMOVE(GLOB.cable_list, src) //remove it from global cable list return ..() // then go ahead and delete the cable + +/obj/structure/cable/deconstruct(disassembled = TRUE) + var/turf/T = get_turf(src) + if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long + new/obj/item/stack/cable_coil(T, 2, paramcolor = color) + else + new/obj/item/stack/cable_coil(T, 1, paramcolor = color) + qdel(src) + /////////////////////////////////// // General procedures /////////////////////////////////// //If underfloor, hide the cable -/obj/structure/cable/hide(var/i) +/obj/structure/cable/hide(i) - if(level == 1 && istype(loc, /turf)) + if(level == 1 && isturf(loc)) invisibility = i ? 101 : 0 updateicon() @@ -101,9 +107,49 @@ By design, d1 is the smallest direction and d2 is the highest icon_state = "[d1]-[d2]" -// returns the powernet this cable belongs to -/obj/structure/cable/proc/get_powernet() //TODO: remove this as it is obsolete - return powernet +//////////////////////////////////////////// +// Power related +/////////////////////////////////////////// + +// All power generation handled in add_avail() +// Machines should use add_load(), surplus(), avail() +// Non-machines should use add_delayedload(), delayed_surplus(), newavail() + +/obj/structure/cable/proc/add_avail(amount) + if(powernet) + powernet.newavail += amount + +/obj/structure/cable/proc/add_load(amount) + if(powernet) + powernet.load += amount + +/obj/structure/cable/proc/surplus() + if(powernet) + return Clamp(powernet.avail-powernet.load, 0, powernet.avail) + else + return 0 + +/obj/structure/cable/proc/avail() + if(powernet) + return powernet.avail + else + return 0 + +/obj/structure/cable/proc/add_delayedload(amount) + if(powernet) + powernet.delayedload += amount + +/obj/structure/cable/proc/delayed_surplus() + if(powernet) + return Clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail) + else + return 0 + +/obj/structure/cable/proc/newavail() + if(powernet) + return powernet.newavail + else + return 0 //Telekinesis has no effect on a cable /obj/structure/cable/attack_tk(mob/user) @@ -120,47 +166,19 @@ By design, d1 is the smallest direction and d2 is the highest if(T.intact) return - if(istype(W, /obj/item/wirecutters)) -///// Z-Level Stuff - /* if(src.d1 == 12 || src.d2 == 12) - to_chat(user, "You must cut this cable from above.") - return */ -///// Z-Level Stuff - /* if(breaker_box) - to_chat(user, "This cable is connected to nearby breaker box. Use breaker box to interact with it.") - return */ - + if(iswirecutter(W)) if(shock(user, 50)) return - - if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long - new/obj/item/stack/cable_coil(T, 2, paramcolor = color) - else - new/obj/item/stack/cable_coil(T, 1, paramcolor = color) - - for(var/mob/O in viewers(src, null)) - O.show_message("[user] cuts the cable.", 1) - -///// Z-Level Stuff - /*if(src.d1 == 11 || src.d2 == 11) - var/turf/controllerlocation = locate(1, 1, z) - for(var/obj/effect/landmark/zcontroller/controller in controllerlocation) - if(controller.down) - var/turf/below = locate(src.x, src.y, controller.down_target) - for(var/obj/structure/cable/c in below) - if(c.d1 == 12 || c.d2 == 12) - c.qdel()*/ -///// Z-Level Stuff + user.visible_message("[user] cuts the cable.", "You cut the cable.") investigate_log("was cut by [key_name(usr, 1)] in [get_area(user)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires") - - qdel(src) // qdel + deconstruct() return else if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/coil = W if(coil.get_amount() < 1) - to_chat(user, "Not enough cable") + to_chat(user, "Not enough cable!") return coil.cable_join(src, user) @@ -173,11 +191,9 @@ By design, d1 is the smallest direction and d2 is the highest else if(istype(W, /obj/item/multitool)) if(powernet && (powernet.avail > 0)) // is it powered? - to_chat(user, "[powernet.avail]W in power network.") - + to_chat(user, "Total power: [DisplayPower(powernet.avail)]\nLoad: [DisplayPower(powernet.load)]\nExcess power: [DisplayPower(surplus())]") else - to_chat(user, "The cable is not powered.") - + to_chat(user, "The cable is not powered.") shock(user, 5, 0.2) else if(istype(W, /obj/item/toy/crayon)) @@ -188,7 +204,7 @@ By design, d1 is the smallest direction and d2 is the highest if(W.flags & CONDUCT) shock(user, 50, 0.7) - src.add_fingerprint(user) + add_fingerprint(user) // shock the user with probability prb /obj/structure/cable/proc/shock(mob/user, prb, siemens_coeff = 1) @@ -200,21 +216,22 @@ By design, d1 is the smallest direction and d2 is the highest else return FALSE +/obj/structure/cable/singularity_pull(S, current_size) + ..() + if(current_size >= STAGE_FIVE) + deconstruct() + //explosion handling /obj/structure/cable/ex_act(severity) switch(severity) - if(1.0) + if(1) qdel(src) // qdel - if(2.0) + if(2) if(prob(50)) - new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color) - qdel(src) // qdel - - if(3.0) + deconstruct() + if(3) if(prob(25)) - new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color) - qdel(src) // qdel - return + deconstruct() obj/structure/cable/proc/cable_color(var/colorC) if(colorC) @@ -235,7 +252,7 @@ obj/structure/cable/proc/cable_color(var/colorC) //handles merging diagonally matching cables //for info : direction^3 is flipping horizontally, direction^12 is flipping vertically -/obj/structure/cable/proc/mergeDiagonalsNetworks(var/direction) +/obj/structure/cable/proc/mergeDiagonalsNetworks(direction) //search for and merge diagonally matching cables from the first direction component (north/south) var/turf/T = get_step(src, direction&3)//go north/south @@ -279,7 +296,7 @@ obj/structure/cable/proc/cable_color(var/colorC) C.powernet.add_cable(src) //else, we simply connect to the matching cable powernet // merge with the powernets of power objects in the given direction -/obj/structure/cable/proc/mergeConnectedNetworks(var/direction) +/obj/structure/cable/proc/mergeConnectedNetworks(direction) var/fdir = (!direction)? 0 : turn(direction, 180) //flip the direction, to match with the source position on its turf @@ -317,25 +334,27 @@ obj/structure/cable/proc/cable_color(var/colorC) //first let's add turf cables to our powernet //then we'll connect machines on turf with a node cable is present for(var/AM in loc) - if(istype(AM,/obj/structure/cable)) + if(istype(AM, /obj/structure/cable)) var/obj/structure/cable/C = AM if(C.d1 == d1 || C.d2 == d1 || C.d1 == d2 || C.d2 == d2) //only connected if they have a common direction - if(C.powernet == powernet) continue + if(C.powernet == powernet) + continue if(C.powernet) merge_powernets(powernet, C.powernet) else powernet.add_cable(C) //the cable was powernetless, let's just add it to our powernet - else if(istype(AM,/obj/machinery/power/apc)) + else if(istype(AM, /obj/machinery/power/apc)) var/obj/machinery/power/apc/N = AM - if(!N.terminal) continue // APC are connected through their terminal + if(!N.terminal) + continue // APC are connected through their terminal if(N.terminal.powernet == powernet) continue to_connect += N.terminal //we'll connect the machines after all cables are merged - else if(istype(AM,/obj/machinery/power)) //other power machines + else if(istype(AM, /obj/machinery/power)) //other power machines var/obj/machinery/power/M = AM if(M.powernet == powernet) @@ -353,23 +372,10 @@ obj/structure/cable/proc/cable_color(var/colorC) ////////////////////////////////////////////// //if powernetless_only = 1, will only get connections without powernet -/obj/structure/cable/proc/get_connections(var/powernetless_only = 0) +/obj/structure/cable/proc/get_connections(powernetless_only = 0) . = list() // this will be a list of all connected power objects var/turf/T -///// Z-Level Stuff - /* if(d1 == 11 || d1 == 12) - var/turf/controllerlocation = locate(1, 1, z) - for(var/obj/effect/landmark/zcontroller/controller in controllerlocation) - if(controller.up && d1 == 12) - T = locate(src.x, src.y, controller.up_target) - if(T) - . += power_list(T, src, 11, 1) - if(controller.down && d1 == 11) - T = locate(src.x, src.y, controller.down_target) - if(T) - . += power_list(T, src, 12, 1) */ -///// Z-Level Stuff //get matching cables from the first direction if(d1) //if not a node cable T = get_step(src, d1) @@ -386,20 +392,6 @@ obj/structure/cable/proc/cable_color(var/colorC) . += power_list(loc, src, d1, powernetless_only) //get on turf matching cables -///// Z-Level Stuff - /*if(d2 == 11 || d2 == 12) - var/turf/controllerlocation = locate(1, 1, z) - for(var/obj/effect/landmark/zcontroller/controller in controllerlocation) - if(controller.up && d2 == 12) - T = locate(src.x, src.y, controller.up_target) - if(T) - . += power_list(T, src, 11, 1) - if(controller.down && d2 == 11) - T = locate(src.x, src.y, controller.down_target) - if(T) - . += power_list(T, src, 12, 1) -///// Z-Level Stuff - else */ //do the same on the second direction (which can't be 0) T = get_step(src, d2) if(T) @@ -420,7 +412,8 @@ obj/structure/cable/proc/cable_color(var/colorC) //needed as this can, unlike other placements, disconnect cables /obj/structure/cable/proc/denode() var/turf/T1 = loc - if(!T1) return + if(!T1) + return var/list/powerlist = power_list(T1,src,0,0) //find the other cables that ended in the centre of the turf, with or without a powernet if(powerlist.len>0) @@ -428,13 +421,19 @@ obj/structure/cable/proc/cable_color(var/colorC) propagate_network(powerlist[1],PN) //propagates the new powernet beginning at the source cable if(PN.is_empty()) //can happen with machines made nodeless when smoothing cables - qdel(PN) // qdel + qdel(PN) + +/obj/structure/cable/proc/auto_propogate_cut_cable(obj/O) + if(O && !QDELETED(O)) + var/datum/powernet/newPN = new()// creates a new powernet... + propagate_network(O, newPN)//... and propagates it to the other side of the cable // cut the cable's powernet at this cable and updates the powergrid -/obj/structure/cable/proc/cut_cable_from_powernet() +/obj/structure/cable/proc/cut_cable_from_powernet(remove=TRUE) var/turf/T1 = loc var/list/P_list - if(!T1) return + if(!T1) + return if(d1) T1 = get_step(T1, d1) P_list = power_list(T1, src, turn(d1,180),0,cable_only = 1) // what adjacently joins on to cut cable... @@ -452,11 +451,13 @@ obj/structure/cable/proc/cable_color(var/colorC) var/obj/O = P_list[1] // remove the cut cable from its turf and powernet, so that it doesn't get count in propagate_network worklist - loc = null + if(remove) + loc = null powernet.remove_cable(src) //remove the cut cable from its powernet // queue it to rebuild SSmachines.deferred_powernet_rebuilds += O +// addtimer(CALLBACK(O, .proc/auto_propogate_cut_cable, O), 0) //so we don't rebuild the network X times when singulo/explosion destroys a line of X cables // Disconnect machines connected to nodes if(d1 == 0) // if we cut a node (O-X) cable @@ -464,6 +465,7 @@ obj/structure/cable/proc/cable_color(var/colorC) if(!P.connect_to_network()) //can't find a node cable on a the turf to connect to P.disconnect_from_network() //remove from current network + /////////////////////////////////////////////// // The cable coil object, used for laying cable /////////////////////////////////////////////// @@ -472,9 +474,7 @@ obj/structure/cable/proc/cable_color(var/colorC) // Definitions //////////////////////////////// -var/global/list/datum/stack_recipe/cable_coil_recipes = list( - new /datum/stack_recipe/cable_restraints("cable restraints", /obj/item/restraints/handcuffs/cable, 15), -) +GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restraints", /obj/item/restraints/handcuffs/cable, 15))) /obj/item/stack/cable_coil name = "cable coil" @@ -514,7 +514,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( pixel_x = rand(-2,2) pixel_y = rand(-2,2) update_icon() - recipes = cable_coil_recipes + recipes = GLOB.cable_coil_recipes update_wclass() /////////////////////////////////// @@ -657,7 +657,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( to_chat(user, "You can't lay cable at a place that far away!") return - var/dirn = null + var/dirn if(!dirnew) //If we weren't given a direction, come up with one! (Called as null from catwalk.dm and floor.dm) if(user.loc == T) dirn = user.dir //If laying on the tile we're on, lay in the direction we're facing @@ -694,7 +694,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(C.shock(user, 50)) if(prob(50)) //fail new /obj/item/stack/cable_coil(get_turf(C), 1, paramcolor = C.color) - qdel(C) // qdel + C.deconstruct() return C @@ -711,7 +711,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( return if(get_dist(C, user) > 1) // make sure it's close enough - to_chat(user, "You can't lay cable at a place that far away.") + to_chat(user, "You can't lay cable at a place that far away!") return @@ -724,13 +724,41 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( // one end of the clicked cable is pointing towards us if(C.d1 == dirn || C.d2 == dirn) if(U.intact) // can't place a cable if the floor is complete - to_chat(user, "You can't lay cable there unless the floor tiles are removed.") + to_chat(user, "You can't lay cable there unless the floor tiles are removed!") return else // cable is pointing at us, we're standing on an open tile // so create a stub pointing at the clicked cable on our tile - place_turf(U, user, turn(dirn, 180)) + var/fdirn = turn(dirn, 180) // the opposite direction + + for(var/obj/structure/cable/LC in U) // check to make sure there's not a cable there already + if(LC.d1 == fdirn || LC.d2 == fdirn) + to_chat(user, "There's already a cable at that position!") + return + + var/obj/structure/cable/NC = get_new_cable (U) + + NC.d1 = 0 + NC.d2 = fdirn + NC.add_fingerprint(user) + NC.update_icon() + + //create a new powernet with the cable, if needed it will be merged later + var/datum/powernet/newPN = new() + newPN.add_cable(NC) + + NC.mergeConnectedNetworks(NC.d2) //merge the powernet with adjacents powernets + NC.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets + + if(NC.d2 & (NC.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions + NC.mergeDiagonalsNetworks(NC.d2) + + use(1) + + if(NC.shock(user, 50)) + if(prob(50)) //fail + NC.deconstruct() return // exisiting cable doesn't point at our position, so see if it's a stub @@ -749,7 +777,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(LC == C) // skip the cable we're interacting with continue if((LC.d1 == nd1 && LC.d2 == nd2) || (LC.d1 == nd2 && LC.d2 == nd1) ) // make sure no cable matches either direction - to_chat(user, "There's already a cable at that position.") + to_chat(user, "There's already a cable at that position!") return @@ -776,8 +804,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(C.shock(user, 50)) if(prob(50)) //fail - new/obj/item/stack/cable_coil(get_turf(C), 2, paramcolor = C.color) - qdel(C) // qdel + C.deconstruct() return C.denode()// this call may have disconnected some cables that terminated on the centre of the turf, if so split the powernets. @@ -790,8 +817,8 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( /obj/item/stack/cable_coil/cut item_state = "coil2" -/obj/item/stack/cable_coil/cut/New(loc) - ..() +/obj/item/stack/cable_coil/cut/Initialize(mapload) + . = ..() src.amount = rand(1,2) pixel_x = rand(-2,2) pixel_y = rand(-2,2) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 33b632df413..388b523518b 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -85,8 +85,8 @@ var/const/GRAV_NEEDS_WRENCH = 3 // Generator which spawns with the station. // -/obj/machinery/gravity_generator/main/station/Initialize() - ..() +/obj/machinery/gravity_generator/main/station/Initialize(mapload) + . = ..() setup_parts() middle.overlays += "activated" update_list() diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 3e5d614896e..33741d1475b 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -9,7 +9,7 @@ /obj/machinery/power name = null icon = 'icons/obj/power.dmi' - anchored = 1.0 + anchored = TRUE on_blueprints = TRUE var/datum/powernet/powernet = null use_power = NO_POWER_USE @@ -25,18 +25,24 @@ ////////////////////////////// // common helper procs for all power machines -/obj/machinery/power/proc/add_avail(var/amount) +// All power generation handled in add_avail() +// Machines should use add_load(), surplus(), avail() +// Non-machines should use add_delayedload(), delayed_surplus(), newavail() + +/obj/machinery/power/proc/add_avail(amount) if(powernet) powernet.newavail += amount + return TRUE + else + return FALSE -/obj/machinery/power/proc/draw_power(var/amount) +/obj/machinery/power/proc/add_load(amount) if(powernet) - return powernet.draw_power(amount) - return 0 + powernet.load += amount /obj/machinery/power/proc/surplus() if(powernet) - return powernet.avail-powernet.load + return Clamp(powernet.avail-powernet.load, 0, powernet.avail) else return 0 @@ -46,9 +52,19 @@ else return 0 -/obj/machinery/power/proc/load() +/obj/machinery/power/proc/add_delayedload(amount) if(powernet) - return powernet.load + powernet.delayedload += amount + +/obj/machinery/power/proc/delayed_surplus() + if(powernet) + return Clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail) + else + return 0 + +/obj/machinery/power/proc/newavail() + if(powernet) + return powernet.newavail else return 0 @@ -58,21 +74,20 @@ // returns true if the area has power on given channel (or doesn't require power). // defaults to power_channel /obj/machinery/proc/powered(var/chan = -1) // defaults to power_channel - if(!loc) - return 0 + return FALSE if(!use_power) - return 1 + return TRUE var/area/A = get_area(src) // make sure it's in an area if(!A) - return 0 // if not, then not powered + return FALSE // if not, then not powered if(chan == -1) chan = power_channel return A.powered(chan) // return power status of the area // increment the power usage stats for an area -/obj/machinery/proc/use_power(var/amount, var/chan = -1) // defaults to power_channel +/obj/machinery/proc/use_power(amount, chan = -1) // defaults to power_channel var/area/A = get_area(src) // make sure it's in an area if(!A) return @@ -103,43 +118,36 @@ /obj/machinery/power/proc/connect_to_network() var/turf/T = src.loc if(!T || !istype(T)) - return 0 + return FALSE var/obj/structure/cable/C = T.get_cable_node() //check if we have a node cable on the machine turf, the first found is picked if(!C || !C.powernet) - return 0 + return FALSE C.powernet.add_machine(src) - return 1 + return TRUE // remove and disconnect the machine from its current powernet /obj/machinery/power/proc/disconnect_from_network() if(!powernet) - return 0 + return FALSE powernet.remove_machine(src) - return 1 + return TRUE // attach a wire to a power machine - leads from the turf you are standing on //almost never called, overwritten by all power machines but terminal and generator -/obj/machinery/power/attackby(obj/item/W, mob/user) - - if(istype(W, /obj/item/stack/cable_coil)) - - var/obj/item/stack/cable_coil/coil = W - +/obj/machinery/power/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/coil = I var/turf/T = user.loc - - if(T.intact || !istype(T, /turf/simulated/floor)) + if(T.intact || !isfloorturf(T)) return - if(get_dist(src, user) > 1) return - coil.place_turf(T, user) - return else - ..() - return + return ..() + /////////////////////////////////////////// // Powernet handling helpers @@ -159,7 +167,8 @@ cdir = get_dir(T,loc) for(var/obj/structure/cable/C in T) - if(C.powernet) continue + if(C.powernet) + continue if(C.d1 == cdir || C.d2 == cdir) . += C return . @@ -186,7 +195,8 @@ /obj/machinery/power/proc/get_indirect_connections() . = list() for(var/obj/structure/cable/C in loc) - if(C.powernet) continue + if(C.powernet) + continue if(C.d1 == 0) // the cable is a node cable . += C return . @@ -199,44 +209,32 @@ // returns a list of all power-related objects (nodes, cable, junctions) in turf, // excluding source, that match the direction d // if unmarked==1, only return those with no powernet -/proc/power_list(var/turf/T, var/source, var/d, var/unmarked=0, var/cable_only = 0) +/proc/power_list(turf/T, source, d, unmarked=0, cable_only = 0) . = list() - var/fdir = (!d)? 0 : turn(d, 180) // the opposite direction to d (or 0 if d==0) -///// Z-Level Stuff - var/Zdir - if(d==11) - Zdir = 11 - else if(d==12) - Zdir = 12 - else - Zdir = 999 -///// Z-Level Stuff - for(var/AM in T) - if(AM == source) continue //we don't want to return source - if(!cable_only && istype(AM,/obj/machinery/power)) + for(var/AM in T) + if(AM == source) + continue //we don't want to return source + + if(!cable_only && istype(AM, /obj/machinery/power)) var/obj/machinery/power/P = AM - if(P.powernet == 0) continue // exclude APCs which have powernet=0 + if(P.powernet == 0) + continue // exclude APCs which have powernet=0 if(!unmarked || !P.powernet) //if unmarked=1 we only return things with no powernet if(d == 0) . += P - else if(istype(AM,/obj/structure/cable)) + else if(istype(AM, /obj/structure/cable)) var/obj/structure/cable/C = AM if(!unmarked || !C.powernet) -///// Z-Level Stuff - if(C.d1 == fdir || C.d2 == fdir || C.d1 == Zdir || C.d2 == Zdir) -///// Z-Level Stuff - . += C - else if(C.d1 == d || C.d2 == d) + if(C.d1 == d || C.d2 == d) . += C return . //remove the old powernet and replace it with a new one throughout the network. -/proc/propagate_network(var/obj/O, var/datum/powernet/PN) - //log_world("propagating new network") +/proc/propagate_network(obj/O, datum/powernet/PN) var/list/worklist = list() var/list/found_machines = list() var/index = 1 @@ -248,13 +246,13 @@ P = worklist[index] //get the next power object found index++ - if( istype(P,/obj/structure/cable)) + if(istype(P, /obj/structure/cable)) var/obj/structure/cable/C = P if(C.powernet != PN) //add it to the powernet, if it isn't already there PN.add_cable(C) worklist |= C.get_connections() //get adjacents power objects, with or without a powernet - else if(P.anchored && istype(P,/obj/machinery/power)) + else if(P.anchored && istype(P, /obj/machinery/power)) var/obj/machinery/power/M = P found_machines |= M //we wait until the powernet is fully propagates to connect the machines @@ -268,7 +266,7 @@ //Merge two powernets, the bigger (in cable length term) absorbing the other -/proc/merge_powernets(var/datum/powernet/net1, var/datum/powernet/net2) +/proc/merge_powernets(datum/powernet/net1, datum/powernet/net2) if(!net1 || !net2) //if one of the powernet doesn't exist, return return @@ -285,8 +283,6 @@ for(var/obj/structure/cable/Cable in net2.cables) //merge cables net1.add_cable(Cable) - if(!net2) return net1 - for(var/obj/machinery/power/Node in net2.nodes) //merge power machines if(!Node.connect_to_network()) Node.disconnect_from_network() //if somehow we can't connect the machine to the new powernet, disconnect it from the old nonetheless @@ -299,14 +295,12 @@ //source is an object caused electrocuting (airlock, grille, etc) //No animations will be performed by this proc. /proc/electrocute_mob(mob/living/M, power_source, obj/source, siemens_coeff = 1, dist_check = FALSE) - if(!istype(M)) - return FALSE - if(istype(M.loc,/obj/mecha)) + if(!M || ismecha(M.loc)) return FALSE //feckin mechs are dumb if(dist_check) if(!in_range(source, M)) return FALSE - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.gloves) var/obj/item/clothing/gloves/G = H.gloves @@ -326,7 +320,7 @@ if(istype(power_source, /datum/powernet)) PN = power_source - else if(istype(power_source,/obj/item/stock_parts/cell)) + else if(istype(power_source, /obj/item/stock_parts/cell)) cell = power_source else if(istype(power_source, /obj/machinery/power/apc)) var/obj/machinery/power/apc/apc = power_source @@ -357,10 +351,30 @@ var/drained_energy = drained_hp*20 if(source_area) - source_area.use_power(drained_energy/CELLRATE) - else if(istype(power_source,/datum/powernet)) - var/drained_power = drained_energy/CELLRATE //convert from "joules" to "watts" - drained_power = PN.draw_power(drained_power) - else if(istype(power_source, /obj/item/stock_parts/cell)) + source_area.use_power(drained_energy/GLOB.CELLRATE) + else if(istype(power_source, /datum/powernet)) + var/drained_power = drained_energy/GLOB.CELLRATE //convert from "joules" to "watts" + PN.delayedload += (min(drained_power, max(PN.newavail - PN.delayedload, 0))) + else if (istype(power_source, /obj/item/stock_parts/cell)) cell.use(drained_energy) return drained_energy + +//////////////////////////////////////////////// +// Misc. +/////////////////////////////////////////////// + + +// return a knot cable (O-X) if one is present in the turf +// null if there's none +/turf/proc/get_cable_node() + if(!can_have_cabling()) + return null + for(var/obj/structure/cable/C in src) + if(C.d1 == 0) + return C + return null + +/area/proc/get_apc() + for(var/obj/machinery/power/apc/APC in GLOB.apcs) + if(APC.area == src) + return APC \ No newline at end of file diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 228b4232968..b64481b1104 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -1,19 +1,19 @@ +//////////////////////////////////////////// +// POWERNET DATUM +// each contiguous network of cables & nodes +///////////////////////////////////// /datum/powernet + var/number // unique id var/list/cables = list() // all cables & junctions var/list/nodes = list() // all connected machines var/load = 0 // the current load on the powernet, increased by each machine at processing var/newavail = 0 // what available power was gathered last tick, then becomes... var/avail = 0 //...the current available power in the powernet + var/viewavail = 0 // the available power as it appears on the power console (gradually updated) var/viewload = 0 // the load as it appears on the power console (gradually updated) - var/number = 0 // Unused //TODEL - - var/perapc = 0 // per-apc avilability - var/perapc_excess = 0 - var/netexcess = 0 // excess power on the powernet (typically avail-load) - - var/problem = 0 // If either of these is set to 1 there is some sort of issue at the powernet. - + var/netexcess = 0 // excess power on the powernet (typically avail-load)/////// + var/delayedload = 0 // load applied to powernet between power ticks. /datum/powernet/New() SSmachines.powernets += src @@ -31,31 +31,21 @@ SSmachines.powernets -= src return ..() -//Returns the amount of excess power (before refunding to SMESs) from last tick. -//This is for machines that might adjust their power consumption using this data. -/datum/powernet/proc/last_surplus() - return max(avail - load, 0) - -/datum/powernet/proc/draw_power(var/amount) - var/draw = between(0, amount, avail - load) - load += draw - return draw - /datum/powernet/proc/is_empty() return !cables.len && !nodes.len //remove a cable from the current powernet //if the powernet is then empty, delete it //Warning : this proc DON'T check if the cable exists -/datum/powernet/proc/remove_cable(var/obj/structure/cable/C) +/datum/powernet/proc/remove_cable(obj/structure/cable/C) cables -= C C.powernet = null if(is_empty())//the powernet is now empty... - qdel(src)///... delete it - qdel + qdel(src)///... delete it //add a cable to the current powernet //Warning : this proc DON'T check if the cable exists -/datum/powernet/proc/add_cable(var/obj/structure/cable/C) +/datum/powernet/proc/add_cable(obj/structure/cable/C) if(C.powernet)// if C already has a powernet... if(C.powernet == src) return @@ -67,16 +57,16 @@ //remove a power machine from the current powernet //if the powernet is then empty, delete it //Warning : this proc DON'T check if the machine exists -/datum/powernet/proc/remove_machine(var/obj/machinery/power/M) +/datum/powernet/proc/remove_machine(obj/machinery/power/M) nodes -=M M.powernet = null if(is_empty())//the powernet is now empty... - qdel(src)///... delete it - qdel + qdel(src)///... delete it //add a power machine to the current powernet //Warning : this proc DON'T check if the machine exists -/datum/powernet/proc/add_machine(var/obj/machinery/power/M) +/datum/powernet/proc/add_machine(obj/machinery/power/M) if(M.powernet)// if M already has a powernet... if(M.powernet == src) return @@ -85,45 +75,23 @@ M.powernet = src nodes[M] = M -// Triggers warning for certain amount of ticks -/datum/powernet/proc/trigger_warning(var/duration_ticks = 20) - problem = max(duration_ticks, problem) - //handles the power changes in the powernet //called every ticks by the powernet controller /datum/powernet/proc/reset() - var/numapc = 0 - - if(problem > 0) - problem = max(problem - 1, 0) - - if(nodes && nodes.len) // Added to fix a bad list bug -- TLE - for(var/obj/machinery/power/terminal/term in nodes) - if( istype( term.master, /obj/machinery/power/apc ) ) - numapc++ - + //see if there's a surplus of power remaining in the powernet and stores unused power in the SMES netexcess = avail - load - if(numapc) - //very simple load balancing. If there was a net excess this tick then it must have been that some APCs used less than perapc, since perapc*numapc = avail - //Therefore we can raise the amount of power rationed out to APCs on the assumption that those APCs that used less than perapc will continue to do so. - //If that assumption fails, then some APCs will miss out on power next tick, however it will be rebalanced for the tick after. - if(netexcess >= 0) - perapc_excess += min(netexcess/numapc, (avail - perapc) - perapc_excess) - else - perapc_excess = 0 - - perapc = avail/numapc + perapc_excess - if(netexcess > 100 && nodes && nodes.len) // if there was excess power last cycle for(var/obj/machinery/power/smes/S in nodes) // find the SMESes in the network S.restore() // and restore some of the power that was used - //updates the viewed load (as seen on power computers) - viewload = round(load) + // update power consoles + viewavail = round(0.8 * viewavail + 0.2 * avail) + viewload = round(0.8 * viewload + 0.2 * load) - //reset the powernet - load = 0 + // reset the powernet + load = delayedload + delayedload = 0 avail = newavail newavail = 0 @@ -131,27 +99,4 @@ if(avail >= 1000) return Clamp(20 + round(avail / 25000), 20, 195) + rand(-5, 5) else - return 0 - -//////////////////////////////////////////////// -// Misc. -/////////////////////////////////////////////// - - -// return a knot cable (O-X) if one is present in the turf -// null if there's none -/turf/proc/get_cable_node() - if(!istype(src, /turf/simulated/floor)) - return null - for(var/obj/structure/cable/C in src) - if(C.d1 == 0) - return C - return null - -/area/proc/get_apc() - // This was a simple locate() in src, but an unresolved BYOND bug causes trying to locate() in an - // area to take an inconceivably long time, especially for large areas. - // See: http://www.byond.com/forum/?post=1860571 - var/obj/machinery/power/apc/FINDME - for(FINDME in src) - return FINDME \ No newline at end of file + return 0 \ No newline at end of file diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index a85d9e880bd..3e910a613b0 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -15,8 +15,8 @@ var/global/list/rad_collectors = list() var/locked = 0 var/drainratio = 1 -/obj/machinery/power/rad_collector/New() - ..() +/obj/machinery/power/rad_collector/Initialize(mapload) + . = ..() rad_collectors += src /obj/machinery/power/rad_collector/Destroy() diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 7e031755e22..9ba302ab19b 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -23,18 +23,25 @@ var/frequency = 0 var/id_tag = null + var/projectile_type = /obj/item/projectile/beam/emitter + var/projectile_sound = 'sound/weapons/emitter.ogg' var/datum/radio_frequency/radio_connection var/datum/effect_system/spark_spread/sparks -/obj/machinery/power/emitter/New() - ..() +/obj/machinery/power/emitter/Initialize(mapload) + . = ..() component_parts = list() component_parts += new /obj/item/circuitboard/emitter(null) component_parts += new /obj/item/stock_parts/micro_laser(null) component_parts += new /obj/item/stock_parts/manipulator(null) RefreshParts() + if(state == 2 && anchored) + connect_to_network() sparks = new + sparks.attach(src) sparks.set_up(5, 1, src) + if(frequency) + set_frequency(frequency) /obj/machinery/power/emitter/RefreshParts() var/max_firedelay = 120 @@ -79,13 +86,6 @@ return rotate() -/obj/machinery/power/emitter/Initialize() - ..() - if(state == 2 && anchored) - connect_to_network() - if(frequency) - set_frequency(frequency) - /obj/machinery/power/emitter/multitool_menu(var/mob/user,var/obj/item/multitool/P) return {"