From 7e8441986637e06322be51775c2409d4307673b6 Mon Sep 17 00:00:00 2001 From: Spades Date: Sun, 11 Sep 2016 19:52:40 -0400 Subject: [PATCH] September Polaris Sync (#545) * Removes Captain as a title, sets default to Station Administrator, and adds a new title, Site Manager * Fix atmo_control interface temperature reading * Adds Multiple Alternative Titles * Removed Supply Assistant * Removed Sergeant * Removed Computer Scientist * Revert "Revert "Frame Cleanup"" This reverts commit 82722ba42f40ff77383f254bcb6f167633d55e9d. * Changed Supply Officer to Requisitions Officer * Changed Requisitions Officer to Supply Chief and Removed Courier * Removed Life Support Technician * Removed Brig Officer * Tweaks the lowest level of heat damage to be less insane * Corrects damage amount for heat_damage_level_1 * Maybe Perhaps Last Major Technomancer PR Adds ability to sort the spells section of the catalog into categories. The categories available are 'All', 'Offensive', 'Defensive', 'Utility', and 'Support'. Removes preset section on catalog as it was unused. Projectile spells now have a sound when fired. Haste lasts five seconds instead of three. Repel Missiles lasts for five minutes instead of two. All healing spells work five times as fast, healing in five seconds instead of twenty five seconds. The amount of instability and healing done has been multiplied to remain consistent. Passwall can now be used on more than just walls, if there's something dense on the same tile. Force Missile is now 25% cheaper to cast, and has a cooldown of .5 seconds instead of one second, and does 5 more damage. Beam's damage is increased by 10, and energy cost decreased by 25%. Lightning's warm-up time is now one second instead of two. Overload now costs 10% of total energy instead of 15%, and damage scaled with 4% of their current energy reserves, and 5% with the Scepter, instead of 3%/4%. Additionally, instability per shot is lowered to 12 from 15. Track now costs 25 points instead of 30 in the catalog, because roundness. Fire Aura should look more impressive without a Scepter. Fixes bug where shooting Lightning made you motionless for twenty seconds. * Adds Multiple New Clothing Items * Makes Loincloths only Availiable to Taj and Unathi * Tweaks the contents of the captain's closet * Smokables now give an approximation of how much longer they'll burn once lit * make teshari not bad to play * Tea Tweaks - Minor changes to the color of some of the drinks such as tea and iced tea. Still not happy with the colors, but they seem better than before. - Modification to the British cup sprite. - Addition of a tea sprite for the coffee cups. * fixes exception handling runtiming * Adds missing error handler that made it difficult to debug runtimes. * Corrects error handling proc * Adds missing runtime viewer Topic calls. Relocates them to the datum itself rather than it being an admin topic for maximum self-containment. Also adds 'adminplayerobservefollow', making it possible for admins to not only jump to mobs but also follow them with a single click. Misc tweaks from Paradise. * gib population * Adds the ash() mob proc, preps ninja suit * Fixes #2352 * Changelog * alt title * Rigs now have suit coolers * Map edit - Fixes lighting in Security. Again. - Fixes lighting in Library. - Adds a new maint tunnel between engineering solars and atmos, now outside the blast radius of SME explosions. * Almost forgot emergency shutters. * Examine Cigarette Lore * Fixes Capitalization * Eliminates colon * Should clear up the usr issue * Fixes cryopods of all types not setting occupant correctly. * updates changelog * Fixes runtime that occured if someone touched a blast door with an empty hand. * Fixes check_rights() runtime. * Adds magboots to ling spacesuits * Adds Changelog * Turret Fix Turrets can now deploy properly and not be stuck in a state of deploying forever if a target is in range. * Revert "Adds hub passwordu" * Makes changeling recursive enhancement a passive power * Corrects a description * Adss changelog * Add files via upload * Changeling/Wizard/Future Stuff Hud Button Fix Hopefully this stops the roundstop changeling hud wonkiness. * Changes Mining Hardsuit slowdown to 1, from 3 * Widened hallway * Speeds up arm_guard and leg_guard wearers slightly * Forgot to use map cleanup tool. * Adds changelog * Adds changelog * Minor Emitter Tweaks Emitters no longer die by shooting a taser or laser tag gun at it. Emitters don't explode if they are not on a powered wire with sufficient electricity in it. They will just crumple away instead if integrity is reduced to zero. Taking any damage to the emitter no longer results in instant death due to me being an idiot awhile ago. Emitters can be examined to see if they are damaged, and can be repaired by applying metal sheets to it. * Github, stop being stupid! * Tweaks Sec Voidsuit values * Fixes external airlocks * Elevator-MMI fix * Shoveling Snow * Laptop ID Computer Fix The manifest should now be updated correctly when using laptops. * do_after is more immersive * Fixes second bug involving inability to change title to station admin. * Adds more unathi hair and facial options * Adds the changelog * Retweaks secret player requirements * Updates changelog * Fixes sprite not updating to not be floating when leaving non-gravity * Adds changelog * Fixes changeling revive not working when you're missing a limb * Fixes #860 * Adds changelog * Makes flash confused duration the same length as the flash blurry eyes * Increases the change of lung rupturing * Adds vomit as an emote * Adds changelog * Removes revolution shuttle delay * Adds changelog * Projectile flash rounds will now do the same as a flash when hitting a target * Adds changelog * Fixes dna-lockable gun explosion security level * Drink Container Lore * Decapitalizes 'Sleeper' Because Why * Fixes Grammatical/Flow/Sarcasm Errors * Completes dna lockable guns implementation by adding a dna chip that can be added to guns * Fixes + forgotten file * Moves DNA locking stuff down to the item level rather than gun, also adds the ability to emag to remove the lock * Adds changelog * Adds the ability to wear ponchos as an accessory, also adds the ability to have ponchos as a suit accessory * Adds changelog * Closes 2 missing spans * Adds secure briefcase to custom loadout * Adds changelog * Headgear Additions, and an Undershirt * Medical splint buff and new ghetto splints. Adds hands and feet to splint-splintable organs. Also adds ghetto splints that can't do hands and feet. * Fixed Sleeper... Again * Renames "poncho" slot to "over" * Speeds Hyperzine metabolism * 1.5.8 Map bug fixes -Fixed brit cup sprite. - Replaced a maintenance door leading into atmospherics with one with the proper access. - Fixed Missing Disposals pipe next to atmos. - Tweaked some light placement in the main hallways. - AI core redesign. - Turned off medbay lobby intercom. - Cyborg charging station added to prison wing. - Cyborg charging station added to the research outpost. - Medical rig suit added to medical. - EVA rig suit for engineering added to EVA. - Second residential elevator installed. Due to budget cuts the size of the elevators has been reduced. * Updates changelog * Sombrero Code * Fixes #2365 * Adds changelog * Sleeper is evil. * no message * Changelog * Stops observers from leaving prints on the ground. No more spooking the mortals, ghosts. * Allows autotraitor in secret to start with 0 players * Adds changelog * Makes diona slightly less slow * Adds changelog * Bowling Shirts * Updates changelog * Adds a missing description * Flat Cap Changes and Hair Bow * Fixed Error * Adds an in-hand * Lower Torso cannot be amputated * Smoke works, adds changelog * Updates changelog * Makes Unathi Voidsuits Less Fat * Medical related fixes * Fuzzy Cuffs * Tube Top * Made Icons for Security Suit Less Gaunt * Revert "Medical related fixes" This reverts commit d7c59520e626dc2cebd6ec8dbd89d6ca94ad661f. * Just the fix to random med item now * Fixes Evening Glove Coloring * HAZMAT Suits * Changes Unathi sprite slightly * Tweaks skirt pathing * Corrects changelog * Adds changelog * Construction Voidsuits * makes people bleed real good * adderino changeling * Revert "Revert "Adds hub passwordu"" * Explosive implants should no longer gib on limbs. * I still have no idea what I am doing. * Resolves #331 --- .../components/unary/cold_sink.dm | 1 - .../components/unary/heat_source.dm | 1 - code/_helpers/logging.dm | 21 + code/_onclick/hud/spell_screen_objects.dm | 2 +- .../ProcessScheduler/core/process.dm | 4 +- code/datums/datacore.dm | 2 +- code/datums/underwear/top.dm | 5 + code/datums/underwear/undershirts.dm | 23 +- code/datums/wires/alarm.dm | 2 +- code/defines/obj.dm | 2 +- code/game/antagonist/mutiny/mutineer.dm | 6 +- code/game/antagonist/outsider/ert.dm | 2 +- code/game/antagonist/outsider/raider.dm | 2 +- code/game/antagonist/station/changeling.dm | 2 +- code/game/antagonist/station/cultist.dm | 2 +- code/game/antagonist/station/revolutionary.dm | 2 +- code/game/antagonist/station/traitor.dm | 2 +- code/game/area/Space Station 13 areas.dm | 2 +- code/game/gamemodes/changeling/changeling.dm | 2 +- .../changeling/generic_equip_procs.dm | 30 +- .../gamemodes/changeling/powers/armblade.dm | 5 +- .../game/gamemodes/changeling/powers/armor.dm | 48 +- .../changeling/powers/bioelectrogenesis.dm | 1 - .../changeling/powers/blind_sting.dm | 1 - .../changeling/powers/boost_range.dm | 1 - .../gamemodes/changeling/powers/cryo_sting.dm | 1 - .../gamemodes/changeling/powers/deaf_sting.dm | 1 - .../changeling/powers/delayed_toxin_sting.dm | 1 - .../changeling/powers/enfeebling_string.dm | 1 - .../changeling/powers/epinephrine_overdose.dm | 1 - .../gamemodes/changeling/powers/fleshmend.dm | 1 - .../gamemodes/changeling/powers/panacea.dm | 1 - .../changeling/powers/rapid_regen.dm | 2 +- .../powers/recursive_enhancement.dm | 14 +- .../gamemodes/changeling/powers/respec.dm | 2 + .../gamemodes/changeling/powers/revive.dm | 8 +- .../gamemodes/changeling/powers/shriek.dm | 1 - .../changeling/powers/silence_sting.dm | 1 - .../changeling/powers/visible_camouflage.dm | 1 - code/game/gamemodes/events.dm | 4 +- code/game/gamemodes/gameticker.dm | 4 +- code/game/gamemodes/ninja/ninja.dm | 2 +- code/game/gamemodes/revolution/revolution.dm | 1 - code/game/gamemodes/technomancer/catalog.dm | 67 +- .../gamemodes/technomancer/instability.dm | 2 +- .../technomancer/spells/abjuration.dm | 1 + .../technomancer/spells/apportation.dm | 1 + .../technomancer/spells/audible_deception.dm | 1 + .../technomancer/spells/aura/biomed_aura.dm | 1 + .../technomancer/spells/aura/fire_aura.dm | 10 +- .../technomancer/spells/aura/frost_aura.dm | 5 +- .../technomancer/spells/aura/shock_aura.dm | 1 + .../technomancer/spells/aura/unstable_aura.dm | 1 + .../gamemodes/technomancer/spells/blink.dm | 1 + .../gamemodes/technomancer/spells/chroma.dm | 1 + .../technomancer/spells/condensation.dm | 1 + .../gamemodes/technomancer/spells/control.dm | 1 + .../gamemodes/technomancer/spells/dispel.dm | 1 + .../technomancer/spells/energy_siphon.dm | 1 + .../technomancer/spells/flame_tongue.dm | 1 + .../gamemodes/technomancer/spells/gambit.dm | 1 + .../gamemodes/technomancer/spells/illusion.dm | 1 + .../technomancer/spells/insert/corona.dm | 1 + .../technomancer/spells/insert/haste.dm | 5 +- .../technomancer/spells/insert/mend_burns.dm | 9 +- .../technomancer/spells/insert/mend_metal.dm | 11 +- .../technomancer/spells/insert/mend_organs.dm | 11 +- .../technomancer/spells/insert/mend_wires.dm | 9 +- .../technomancer/spells/insert/mend_wounds.dm | 11 +- .../technomancer/spells/insert/purify.dm | 17 +- .../spells/insert/repel_missiles.dm | 5 +- .../technomancer/spells/instability_tap.dm | 1 + .../technomancer/spells/mark_recall.dm | 2 + .../technomancer/spells/oxygenate.dm | 1 + .../gamemodes/technomancer/spells/passwall.dm | 87 +- .../technomancer/spells/phase_shift.dm | 1 + .../technomancer/spells/projectile/beam.dm | 6 +- .../spells/projectile/chain_lightning.dm | 2 + .../spells/projectile/force_missile.dm | 8 +- .../spells/projectile/lightning.dm | 4 +- .../spells/projectile/overload.dm | 10 +- .../spells/projectile/projectile.dm | 5 +- .../gamemodes/technomancer/spells/radiance.dm | 1 + .../gamemodes/technomancer/spells/reflect.dm | 1 + .../technomancer/spells/resurrect.dm | 1 + .../technomancer/spells/shared_burden.dm | 1 + .../gamemodes/technomancer/spells/shield.dm | 1 + .../technomancer/spells/spawner/darkness.dm | 1 + .../technomancer/spells/spawner/fire_blast.dm | 1 + .../technomancer/spells/spawner/pulsar.dm | 1 + .../spells/summon/summon_creature.dm | 1 + .../technomancer/spells/summon/summon_ward.dm | 1 + .../technomancer/spells/targeting_matrix.dm | 1 + .../gamemodes/technomancer/spells/track.dm | 3 +- .../technomancer/spells/warp_strike.dm | 1 + code/game/gamemodes/traitor/traitor.dm | 3 +- code/game/gamemodes/wizard/wizard.dm | 2 +- code/game/jobs/job/captain.dm | 6 +- code/game/jobs/job/captain_vr.dm | 3 - code/game/jobs/job/civilian.dm | 6 +- code/game/jobs/job/engineering.dm | 2 +- code/game/jobs/job/medical.dm | 2 +- code/game/jobs/job/science.dm | 3 +- code/game/jobs/job/security.dm | 3 +- code/game/jobs/job_controller.dm | 4 +- code/game/jobs/jobs.dm | 2 +- code/game/machinery/Beacon.dm | 74 +- code/game/machinery/CableLayer.dm | 3 +- code/game/machinery/OpTable.dm | 37 +- code/game/machinery/Sleeper.dm | 91 +- code/game/machinery/adv_med.dm | 118 +- code/game/machinery/ai_slipper.dm | 57 +- code/game/machinery/alarm.dm | 343 +- code/game/machinery/atmo_control.dm | 35 +- code/game/machinery/autolathe.dm | 7 +- code/game/machinery/biogenerator.dm | 13 +- code/game/machinery/buttons.dm | 5 +- code/game/machinery/cell_charger.dm | 8 +- code/game/machinery/cloning.dm | 19 +- code/game/machinery/computer/computer.dm | 38 +- code/game/machinery/computer/guestpass.dm | 19 - code/game/machinery/computer/security.dm | 2 +- code/game/machinery/computer/skills.dm | 2 +- .../machinery/computer3/computers/card.dm | 8 +- .../machinery/computer3/computers/security.dm | 2 +- code/game/machinery/constructable_frame.dm | 1 - code/game/machinery/cryo.dm | 44 +- code/game/machinery/cryopod.dm | 52 +- code/game/machinery/deployable.dm | 197 +- code/game/machinery/door_control.dm | 24 +- code/game/machinery/doors/airlock.dm | 1 + code/game/machinery/doors/blast_door.dm | 53 +- code/game/machinery/doppler_array.dm | 4 +- code/game/machinery/flasher.dm | 51 +- code/game/machinery/floodlight.dm | 18 +- code/game/machinery/floor_light.dm | 4 +- code/game/machinery/floorlayer.dm | 6 +- code/game/machinery/frame.dm | 522 +- code/game/machinery/hologram.dm | 40 +- code/game/machinery/holosign.dm | 10 +- code/game/machinery/igniter.dm | 54 +- code/game/machinery/iv_drip.dm | 60 +- code/game/machinery/jukebox.dm | 1 - code/game/machinery/kitchen/microwave.dm | 1 - code/game/machinery/lightswitch.dm | 10 +- code/game/machinery/machinery.dm | 110 +- code/game/machinery/magnet.dm | 572 +- code/game/machinery/mass_driver.dm | 3 +- code/game/machinery/navbeacon.dm | 360 +- code/game/machinery/newscaster.dm | 455 +- code/game/machinery/nuclear_bomb.dm | 291 +- code/game/machinery/overview.dm | 41 +- code/game/machinery/portable_turret.dm | 40 +- code/game/machinery/recharger.dm | 25 +- code/game/machinery/rechargestation.dm | 8 +- code/game/machinery/records_scanner.dm | 6 +- code/game/machinery/requests_console.dm | 36 +- code/game/machinery/robot_fabricator.dm | 72 +- code/game/machinery/seed_extractor.dm | 2 +- code/game/machinery/spaceheater.dm | 15 +- code/game/machinery/status_display.dm | 26 +- code/game/machinery/status_display_ai.dm | 23 +- code/game/machinery/suit_storage_unit.dm | 489 +- code/game/machinery/supply_display.dm | 6 +- code/game/machinery/supplybeacon.dm | 6 +- code/game/machinery/syndicatebeacon.dm | 20 +- code/game/machinery/teleporter.dm | 108 +- code/game/machinery/turret_control.dm | 8 +- code/game/machinery/vending.dm | 230 +- code/game/machinery/wall_frames.dm | 138 +- code/game/machinery/washing_machine.dm | 17 +- code/game/machinery/wishgranter.dm | 14 +- code/game/mecha/mech_bay.dm | 7 +- code/game/mecha/mech_fabricator.dm | 1 - code/game/mecha/mech_prosthetics.dm | 1 - code/game/objects/effects/overlays.dm | 9 + code/game/objects/items/devices/flash.dm | 2 +- code/game/objects/items/devices/multitool.dm | 4 +- .../items/devices/radio/encryptionkey.dm | 2 +- .../objects/items/devices/radio/headset.dm | 8 +- .../objects/items/devices/radio/intercom.dm | 17 +- code/game/objects/items/stacks/medical.dm | 19 +- code/game/objects/items/stacks/rods.dm | 12 +- code/game/objects/items/toys.dm | 4 +- code/game/objects/items/weapons/cards_ids.dm | 6 +- .../objects/items/weapons/cigs_lighters.dm | 19 +- .../weapons/circuitboards/circuitboard.dm | 6 +- .../circuitboards/computer/camera_monitor.dm | 2 +- .../circuitboards/computer/research.dm | 14 +- .../items/weapons/circuitboards/frame.dm | 146 +- .../circuitboards/machinery/biogenerator.dm | 4 +- .../circuitboards/machinery/cloning.dm | 8 +- .../circuitboards/machinery/jukebox.dm | 4 +- .../circuitboards/machinery/mech_recharger.dm | 4 +- .../circuitboards/machinery/mining_drill.dm | 8 +- .../weapons/circuitboards/machinery/pacman.dm | 8 +- .../weapons/circuitboards/machinery/power.dm | 12 +- .../machinery/recharge_station.dm | 4 +- .../circuitboards/machinery/research.dm | 41 +- .../circuitboards/machinery/shieldgen.dm | 12 +- .../circuitboards/machinery/telecomms.dm | 22 +- .../circuitboards/machinery/unary_atmos.dm | 6 +- .../items/weapons/circuitboards/mecha.dm | 4 - .../objects/items/weapons/dna_injector.dm | 2 +- .../items/weapons/grenades/flashbang.dm | 2 +- code/game/objects/items/weapons/handcuffs.dm | 5 + .../objects/items/weapons/implants/implant.dm | 15 +- code/game/objects/items/weapons/manuals.dm | 2 +- .../objects/items/weapons/storage/backpack.dm | 6 +- .../objects/items/weapons/storage/fancy.dm | 8 +- code/game/objects/random/random.dm | 4 +- .../crates_lockers/closets/secure/security.dm | 6 +- .../crates_lockers/closets/wardrobe.dm | 8 +- code/game/turfs/turf.dm | 2 +- code/hub.dm | 4 +- code/modules/admin/admin_verbs.dm | 5 +- code/modules/admin/holder2.dm | 2 + code/modules/admin/newbanjob.dm | 2 +- code/modules/admin/topic.dm | 12 + code/modules/admin/verbs/debug.dm | 12 +- .../loadout/loadout_accessories.dm | 12 +- .../preference_setup/loadout/loadout_eyes.dm | 2 +- .../preference_setup/loadout/loadout_head.dm | 44 + .../preference_setup/loadout/loadout_shoes.dm | 10 +- .../preference_setup/loadout/loadout_suit.dm | 20 +- .../loadout/loadout_uniform.dm | 4 +- .../loadout/loadout_utility.dm | 5 + .../preference_setup/loadout/loadout_xeno.dm | 6 + code/modules/clothing/clothing.dm | 4 +- code/modules/clothing/gloves/arm_guards.dm | 2 +- code/modules/clothing/gloves/miscellaneous.dm | 2 +- code/modules/clothing/head/collectable.dm | 2 +- code/modules/clothing/head/jobs.dm | 4 +- code/modules/clothing/head/misc.dm | 34 + code/modules/clothing/shoes/leg_guards.dm | 2 +- code/modules/clothing/shoes/miscellaneous.dm | 7 +- .../clothing/spacesuits/miscellaneous.dm | 2 +- .../clothing/spacesuits/rig/modules/ninja.dm | 28 +- code/modules/clothing/spacesuits/rig/rig.dm | 101 +- .../clothing/spacesuits/rig/suits/station.dm | 2 +- .../clothing/spacesuits/void/station.dm | 40 +- code/modules/clothing/suits/jobs.dm | 8 +- code/modules/clothing/suits/miscellaneous.dm | 55 +- .../clothing/under/accessories/clothing.dm | 88 +- code/modules/clothing/under/jobs/civilian.dm | 4 +- code/modules/clothing/under/miscellaneous.dm | 11 +- code/modules/clothing/under/pants.dm | 10 + code/modules/clothing/under/shorts.dm | 46 +- .../detectivework/microscope/dnascanner.dm | 1 - code/modules/economy/ATM.dm | 19 +- code/modules/error_handler/_defines.dm | 9 + code/modules/error_handler/error_handler.dm | 118 + code/modules/error_handler/error_viewer.dm | 206 + code/modules/error_handler/~defines.dm | 6 + .../examine/descriptions/containers.dm | 35 + .../examine/descriptions/smokeables.dm | 39 + code/modules/flufftext/Dreaming.dm | 2 +- code/modules/flufftext/Hallucination.dm | 2 +- code/modules/games/cah_black_cards.dm | 4 +- code/modules/games/cah_white_cards.dm | 4 +- code/modules/mining/drilling/drill.dm | 1 - code/modules/mob/dead/death.dm | 3 + code/modules/mob/death.dm | 19 + code/modules/mob/living/carbon/human/death.dm | 6 + code/modules/mob/living/carbon/human/emote.dm | 13 +- .../mob/living/carbon/human/examine.dm | 8 +- code/modules/mob/living/carbon/human/life.dm | 4 +- .../carbon/human/species/station/seromi.dm | 9 +- .../carbon/human/species/station/station.dm | 2 +- .../mob/living/carbon/human/stripping.dm | 3 +- code/modules/mob/living/silicon/death.dm | 3 + .../modules/mob/living/silicon/robot/death.dm | 5 + code/modules/mob/living/simple_animal/head.dm | 2 +- code/modules/mob/new_player/skill.dm | 2 +- .../mob/new_player/sprite_accessories.dm | 45 + code/modules/organs/blood.dm | 2 +- code/modules/organs/subtypes/standard.dm | 1 + code/modules/paperwork/filingcabinet.dm | 3 - code/modules/paperwork/folders.dm | 2 +- code/modules/paperwork/paper.dm | 4 +- code/modules/paperwork/photocopier.dm | 1 - code/modules/paperwork/stamps.dm | 2 +- code/modules/power/singularity/emitter.dm | 40 +- code/modules/projectiles/dnalocking.dm | 88 + code/modules/projectiles/gun.dm | 136 +- code/modules/projectiles/guns/energy.dm | 3 + code/modules/projectiles/guns/projectile.dm | 1 + code/modules/projectiles/projectile/energy.dm | 12 + .../Chemistry-Reagents-Food-Drinks.dm | 12 +- .../Chemistry-Reagents-Medicine.dm | 2 +- .../reagent_containers/food/drinks.dm | 4 +- code/modules/recycling/conveyor2.dm | 1 - code/modules/research/circuitprinter.dm | 1 - code/modules/research/destructive_analyzer.dm | 1 - code/modules/research/protolathe.dm | 1 - code/modules/research/server.dm | 1 - .../security levels/keycard authentication.dm | 37 +- .../tools/geosample_scanner.dm | 19 +- .../xenobio2/machinery/core_extractor.dm | 44 +- .../xenobio2/machinery/gene_manipulators.dm | 59 +- code/modules/xenobio2/machinery/injector.dm | 7 +- .../xenobio2/machinery/injector_computer.dm | 5 +- .../xenobio2/machinery/slime_replicator.dm | 30 +- code/world.dm | 2 + html/changelog.html | 93 + html/changelogs/.all_changelog.yml | 85 + ...ht.yml => Anewbe - Explosive Implants.yml} | 4 +- ...ottles.yml => Anewbe - Lizard Sprites.yml} | 4 +- html/changelogs/Anewbe - Skirts.yml | 36 + ...rupturelungs.yml => Anewbe -Ninjapoof.yml} | 4 +- html/changelogs/Kasuobes-ShowMeTheModules.yml | 6 - html/changelogs/Sin4 - bugfixbugaloo.yml | 42 - ...Yoshax - IDs.yml => Yoshax - Bleeding.yml} | 2 +- icons/atmos/tank.dmi | Bin 12791 -> 15034 bytes icons/mob/feet.dmi | Bin 32866 -> 32912 bytes icons/mob/hands.dmi | Bin 23212 -> 23208 bytes icons/mob/head.dmi | Bin 148909 -> 152857 bytes icons/mob/hud.dmi | Bin 3512 -> 3514 bytes icons/mob/human.dmi | Bin 28760 -> 31215 bytes icons/mob/human_face.dmi | Bin 60051 -> 63599 bytes icons/mob/human_races/r_lizard.dmi | Bin 2311 -> 2401 bytes icons/mob/items/lefthand_hats.dmi | Bin 25950 -> 26818 bytes icons/mob/items/lefthand_suits.dmi | Bin 51654 -> 53380 bytes icons/mob/items/righthand_hats.dmi | Bin 25711 -> 26599 bytes icons/mob/items/righthand_suits.dmi | Bin 51208 -> 52937 bytes icons/mob/species/seromi/head.dmi | Bin 46717 -> 48072 bytes icons/mob/species/seromi/suit.dmi | Bin 64925 -> 68244 bytes icons/mob/species/skrell/helmet.dmi | Bin 32940 -> 35383 bytes icons/mob/species/skrell/suit.dmi | Bin 21762 -> 26651 bytes icons/mob/species/tajaran/helmet.dmi | Bin 26686 -> 28795 bytes icons/mob/species/tajaran/suit.dmi | Bin 55588 -> 61921 bytes icons/mob/species/unathi/helmet.dmi | Bin 26377 -> 28365 bytes icons/mob/species/unathi/suit.dmi | Bin 52707 -> 56907 bytes icons/mob/suit.dmi | Bin 401876 -> 396887 bytes icons/mob/ties.dmi | Bin 20459 -> 30714 bytes icons/mob/uniform.dmi | Bin 371739 -> 374362 bytes icons/obj/ammo.dmi | Bin 22096 -> 24287 bytes icons/obj/clothing/gloves.dmi | Bin 21431 -> 21386 bytes icons/obj/clothing/hats.dmi | Bin 69125 -> 71194 bytes icons/obj/clothing/shoes.dmi | Bin 20600 -> 21234 bytes icons/obj/clothing/species/seromi/hats.dmi | Bin 4161 -> 5420 bytes icons/obj/clothing/species/seromi/suits.dmi | Bin 1512 -> 2027 bytes icons/obj/clothing/species/skrell/hats.dmi | Bin 7671 -> 9931 bytes icons/obj/clothing/species/skrell/suits.dmi | Bin 2282 -> 2840 bytes icons/obj/clothing/species/tajaran/hats.dmi | Bin 13192 -> 15171 bytes icons/obj/clothing/species/tajaran/suits.dmi | Bin 16254 -> 18602 bytes icons/obj/clothing/species/unathi/hats.dmi | Bin 13819 -> 15649 bytes icons/obj/clothing/species/unathi/suits.dmi | Bin 17070 -> 19240 bytes icons/obj/clothing/suits.dmi | Bin 143436 -> 138105 bytes icons/obj/clothing/ties.dmi | Bin 19702 -> 24853 bytes icons/obj/clothing/uniforms.dmi | Bin 82291 -> 84331 bytes icons/obj/doors/Doorext.dmi | Bin 17226 -> 17273 bytes icons/obj/drinks.dmi | Bin 74799 -> 73435 bytes icons/obj/items.dmi | Bin 80125 -> 79464 bytes icons/obj/stock_parts.dmi | Bin 66434 -> 66472 bytes maps/polaris-1.dmm | 388 +- maps/polaris-2.dmm | 8 +- maps/polaris-3.dmm | 8 +- maps/polaris-4.dmm | 17 +- maps/polaris-5.dmm | 5 +- maps/virgo-1.dmm | 20038 ++++++++-------- maps/virgo-2.dmm | 2373 +- maps/virgo-3.dmm | 8 +- maps/virgo-4.dmm | 17 +- maps/virgo-5.dmm | 5 +- nano/templates/atmo_control.tmpl | 4 +- nano/templates/identification_computer.tmpl | 2 +- vorestation.dme | 9 +- 368 files changed, 16006 insertions(+), 15040 deletions(-) delete mode 100644 code/game/jobs/job/captain_vr.dm create mode 100644 code/modules/error_handler/_defines.dm create mode 100644 code/modules/error_handler/error_handler.dm create mode 100644 code/modules/error_handler/error_viewer.dm create mode 100644 code/modules/error_handler/~defines.dm create mode 100644 code/modules/examine/descriptions/containers.dm create mode 100644 code/modules/examine/descriptions/smokeables.dm create mode 100644 code/modules/projectiles/dnalocking.dm rename html/changelogs/{Hubblenaut - penlight.yml => Anewbe - Explosive Implants.yml} (90%) rename html/changelogs/{Hubblenaut - bottles.yml => Anewbe - Lizard Sprites.yml} (93%) create mode 100644 html/changelogs/Anewbe - Skirts.yml rename html/changelogs/{Yoshax - rupturelungs.yml => Anewbe -Ninjapoof.yml} (89%) delete mode 100644 html/changelogs/Kasuobes-ShowMeTheModules.yml delete mode 100644 html/changelogs/Sin4 - bugfixbugaloo.yml rename html/changelogs/{Yoshax - IDs.yml => Yoshax - Bleeding.yml} (95%) diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 11777e51d2..faefa64883 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -24,7 +24,6 @@ /obj/machinery/atmospherics/unary/freezer/New() ..() initialize_directions = dir - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 8ee9600606..c2daa2b6d1 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -24,7 +24,6 @@ /obj/machinery/atmospherics/unary/heater/New() ..() initialize_directions = dir - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 35618c9b66..57813b0113 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -162,3 +162,24 @@ /proc/key_name_admin(var/whom, var/include_name = 1) return key_name(whom, 1, include_name) + +// Helper procs for building detailed log lines +/datum/proc/log_info_line() + return "[src] ([type])" + +/atom/log_info_line() + var/turf/t = get_turf(src) + if(istype(t)) + return "([t]) ([t.x],[t.y],[t.z]) ([t.type])" + else if(loc) + return "([loc]) (0,0,0) ([loc.type])" + else + return "(NULL) (0,0,0) (NULL)" + +/mob/log_info_line() + return "[..()] ([ckey])" + +/proc/log_info_line(var/datum/d) + if(!istype(d)) + return + return d.log_info_line() diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm index 3365a4384d..262ece09e4 100644 --- a/code/_onclick/hud/spell_screen_objects.dm +++ b/code/_onclick/hud/spell_screen_objects.dm @@ -73,8 +73,8 @@ var/obj/screen/spell/S = spell_objects[i] var/xpos = x_position + (x_position < 8 ? 1 : -1)*(i%7) var/ypos = y_position + (y_position < 8 ? round(i/7) : -round(i/7)) - S.screen_loc = "[encode_screen_X(xpos)]:[x_pix],[encode_screen_Y(ypos)]:[y_pix]" if(spell_holder && spell_holder.client) + S.screen_loc = "[encode_screen_X(xpos)]:[x_pix],[encode_screen_Y(ypos)]:[y_pix]" spell_holder.client.screen += S S.handle_icon_updates = 1 diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm index 836d2124bd..2d5b8b1b7d 100644 --- a/code/controllers/ProcessScheduler/core/process.dm +++ b/code/controllers/ProcessScheduler/core/process.dm @@ -327,9 +327,7 @@ /datum/controller/process/proc/catchException(var/exception/e, var/thrower) if(istype(e)) // Real runtimes go to the real error handler - // There are two newlines here, because handling desc sucks - e.desc = " Caught by process: [name]\n\n" + e.desc - world.Error(e, e_src = thrower) + log_runtime(e, thrower, "Caught by process: [name]") return var/etext = "[e]" var/eid = "[e]" // Exception ID, for tracking repeated exceptions diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 2043febdb6..1a736cd74f 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -361,7 +361,7 @@ clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY) - if("Captain") + if("Station Administrator") clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) if("Head of Security") diff --git a/code/datums/underwear/top.dm b/code/datums/underwear/top.dm index 044f10e7cb..4226799370 100644 --- a/code/datums/underwear/top.dm +++ b/code/datums/underwear/top.dm @@ -42,6 +42,11 @@ icon_state = "halterneck_bra" has_color = TRUE +/datum/category_item/underwear/top/tubetop + name = "Tube Top" + icon_state = "tubetop" + has_color = TRUE + /datum/category_item/underwear/top/fishnet_base name = "Fishnet top" icon_state = "fishnet_body" diff --git a/code/datums/underwear/undershirts.dm b/code/datums/underwear/undershirts.dm index 33886f997d..4eba1c9378 100644 --- a/code/datums/underwear/undershirts.dm +++ b/code/datums/underwear/undershirts.dm @@ -8,6 +8,11 @@ icon_state = "undershirt" has_color = TRUE +/datum/category_item/underwear/undershirt/shirt_long + name = "Longsleeve Shirt" + icon_state = "undershirt_long" + has_color = TRUE + /datum/category_item/underwear/undershirt/tank_top name = "Tank top" icon_state = "tanktop" @@ -62,4 +67,20 @@ /datum/category_item/underwear/undershirt/shirt_blue_striped name = "Shirt, blue stripes" - icon_state = "shirt_stripes_s" \ No newline at end of file + icon_state = "shirt_stripes_s" + +/datum/category_item/underwear/undershirt/bowling + name = "Bowling Shirt, Red" + icon_state = "bowling" + +/datum/category_item/underwear/undershirt/bowlingp + name = "Bowling Shirt, Pink" + icon_state = "bowlingp" + +/datum/category_item/underwear/undershirt/bowlinga + name = "Bowling Shirt, Aqua" + icon_state = "bowlinga" + +/datum/category_item/underwear/undershirt/bowlingw + name = "Bowling Shirt, White" + icon_state = "bowlingw" \ No newline at end of file diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm index ace1ba9ec3..a665fd75a5 100644 --- a/code/datums/wires/alarm.dm +++ b/code/datums/wires/alarm.dm @@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16 /datum/wires/alarm/CanUse(var/mob/living/L) var/obj/machinery/alarm/A = holder - if(A.wiresexposed) + if(A.panel_open) return 1 return 0 diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 291cef4682..ddf88533e1 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -87,7 +87,7 @@ var/global/list/PDA_Manifest = list() heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive) department = 1 depthead = 1 - if(rank=="Captain" && heads.len != 1) + if(rank=="Station Administrator" && heads.len != 1) heads.Swap(1,heads.len) if(real_rank in security_positions) diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm index c0d764b3be..eb341e36cf 100644 --- a/code/game/antagonist/mutiny/mutineer.dm +++ b/code/game/antagonist/mutiny/mutineer.dm @@ -6,7 +6,7 @@ var/datum/antagonist/mutineer/mutineers role_text_plural = "Mutineers" id = MODE_MUTINEER antag_indicator = "mutineer" - restricted_jobs = list("Captain") + restricted_jobs = list("Station Administrator") /datum/antagonist/mutineer/New(var/no_reference) ..() @@ -39,7 +39,7 @@ var/datum/antagonist/mutineer/mutineers proc/get_head_loyalist_candidates() var/list/candidates[0] for(var/mob/loyalist in player_list) - if(loyalist.mind && loyalist.mind.assigned_role == "Captain") + if(loyalist.mind && loyalist.mind.assigned_role == "Station Administrator") candidates.Add(loyalist.mind) return candidates @@ -47,7 +47,7 @@ var/datum/antagonist/mutineer/mutineers var/list/candidates[0] for(var/mob/mutineer in player_list) if(mutineer.client.prefs.be_special & BE_MUTINEER) - for(var/job in command_positions - "Captain") + for(var/job in command_positions - "Station Administrator") if(mutineer.mind && mutineer.mind.assigned_role == job) candidates.Add(mutineer.mind) return candidates diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm index 29ea3d27c1..658e32e4aa 100644 --- a/code/game/antagonist/outsider/ert.dm +++ b/code/game/antagonist/outsider/ert.dm @@ -13,7 +13,7 @@ var/datum/antagonist/ert/ert and before taking extreme actions, please try to also contact the administration! \ Think through your actions and make the roleplay immersive! Please remember all \ rules aside from those without explicit exceptions apply to the ERT." - leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." + leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the Station Administrator where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the Station Administrator where possible, however." landmark_id = "Response Team" id_type = /obj/item/weapon/card/id/centcom/ERT diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index b420b3d59e..8ce55ca8e4 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -60,7 +60,7 @@ var/datum/antagonist/raider/raiders /obj/item/clothing/suit/storage/toggle/hoodie, /obj/item/clothing/suit/storage/toggle/hoodie/black, /obj/item/clothing/suit/unathi/mantle, - /obj/item/clothing/suit/poncho, + /obj/item/clothing/accessory/poncho, ) var/list/raider_guns = list( diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm index 044e968f49..686de4d818 100644 --- a/code/game/antagonist/station/changeling.dm +++ b/code/game/antagonist/station/changeling.dm @@ -6,7 +6,7 @@ bantype = "changeling" feedback_tag = "changeling_objective" restricted_jobs = list("AI", "Cyborg") - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Station Administrator") welcome_text = "Use say \"#g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them." flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE antaghud_indicator = "hudchangeling" diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index 6bb049dcb0..d3ba6c1ad7 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -11,7 +11,7 @@ var/datum/antagonist/cultist/cult role_text = "Cultist" role_text_plural = "Cultists" bantype = "cultist" - restricted_jobs = list("Chaplain","AI", "Cyborg", "Internal Affairs Agent", "Head of Security", "Captain") + restricted_jobs = list("Chaplain","AI", "Cyborg", "Internal Affairs Agent", "Head of Security", "Station Administrator") protected_jobs = list("Security Officer", "Warden", "Detective") role_type = BE_CULTIST feedback_tag = "cult_objective" diff --git a/code/game/antagonist/station/revolutionary.dm b/code/game/antagonist/station/revolutionary.dm index 96e3752991..d2efe7262b 100644 --- a/code/game/antagonist/station/revolutionary.dm +++ b/code/game/antagonist/station/revolutionary.dm @@ -29,7 +29,7 @@ var/datum/antagonist/revolutionary/revs faction_indicator = "rev" faction_invisible = 1 - restricted_jobs = list("Internal Affairs Agent", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") + restricted_jobs = list("Internal Affairs Agent", "AI", "Cyborg", "Station Administrator", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") protected_jobs = list("Security Officer", "Warden", "Detective") /datum/antagonist/revolutionary/New() diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm index acc0bd3d8d..ae8925be47 100644 --- a/code/game/antagonist/station/traitor.dm +++ b/code/game/antagonist/station/traitor.dm @@ -3,7 +3,7 @@ var/datum/antagonist/traitor/traitors // Inherits most of its vars from the base datum. /datum/antagonist/traitor id = MODE_TRAITOR - protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Captain") + protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Station Administrator") flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE /datum/antagonist/traitor/auto diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 8a99da8d41..94cf5f3653 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1137,7 +1137,7 @@ area/space/atmosalert() sound_env = MEDIUM_SOFTFLOOR /area/crew_quarters/captain - name = "\improper Command - Captain's Office" + name = "\improper Command - Station Administrator's Office" icon_state = "captain" sound_env = MEDIUM_SOFTFLOOR diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 0275f70b28..13b8db962d 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -12,7 +12,7 @@ certain though... there is never just one of them. Good luck." config_tag = "changeling" required_players = 2 - required_players_secret = 2 + required_players_secret = 3 required_enemies = 1 end_on_antag_death = 0 antag_scaling_coeff = 10 diff --git a/code/game/gamemodes/changeling/generic_equip_procs.dm b/code/game/gamemodes/changeling/generic_equip_procs.dm index 930e50c9c8..e8ed12a446 100644 --- a/code/game/gamemodes/changeling/generic_equip_procs.dm +++ b/code/game/gamemodes/changeling/generic_equip_procs.dm @@ -1,24 +1,34 @@ //This is a generic proc that should be called by other ling armor procs to equip them. -/mob/proc/changeling_generic_armor(var/armor_type, var/helmet_type) - var/datum/changeling/changeling = changeling_power(20,1,100,CONSCIOUS) - if(!changeling) - return +/mob/proc/changeling_generic_armor(var/armor_type, var/helmet_type, var/boot_type, var/chem_cost) if(!ishuman(src)) return 0 var/mob/living/carbon/human/M = src + if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type)) + chem_cost = 0 + + var/datum/changeling/changeling = changeling_power(chem_cost, 1, 100, CONSCIOUS) + + if(!changeling) + return + //First, check if we're already wearing the armor, and if so, take it off. - if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type)) + if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type)) M.visible_message("[M] casts off their [M.wear_suit.name]!", "We cast off our [M.wear_suit.name]", "You hear the organic matter ripping and tearing!") - qdel(M.wear_suit) - qdel(M.head) + if(istype(M.wear_suit, armor_type)) + qdel(M.wear_suit) + if(istype(M.head, helmet_type)) + qdel(M.head) + if(istype(M.shoes, boot_type)) + qdel(M.shoes) M.update_inv_wear_suit() M.update_inv_head() M.update_hair() + M.update_inv_shoes() return 1 if(M.head || M.wear_suit) //Make sure our slots aren't full @@ -31,11 +41,15 @@ var/obj/item/clothing/suit/H = new helmet_type(src) src.equip_to_slot_or_del(H, slot_head) - src.mind.changeling.chem_charges -= 20 + var/obj/item/clothing/shoes/B = new boot_type(src) + src.equip_to_slot_or_del(B, slot_shoes) + + src.mind.changeling.chem_charges -= chem_cost playsound(src, 'sound/effects/blobattack.ogg', 30, 1) M.update_inv_wear_suit() M.update_inv_head() M.update_hair() + M.update_inv_shoes() return 1 /mob/proc/changeling_generic_equip_all_slots(var/list/stuff_to_equip, var/cost) diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm index d50f4a967a..26b8283a36 100644 --- a/code/game/gamemodes/changeling/powers/armblade.dm +++ b/code/game/gamemodes/changeling/powers/armblade.dm @@ -15,7 +15,6 @@ if(src.mind.changeling.recursive_enhancement) if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade/greater)) src << "We prepare an extra sharp blade." - src.mind.changeling.recursive_enhancement = 0 return 1 else @@ -68,6 +67,10 @@ creator = null ..() +/obj/item/weapon/melee/arm_blade/suicide_act(mob/user) + viewers(user) << "[user] is impaling \himself the [src.name]! It looks like \he's trying to commit suicide." + return(BRUTELOSS) + /obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords. if(!creator || loc != creator || !creator.item_is_in_hands(src)) // Tidy up a bit. diff --git a/code/game/gamemodes/changeling/powers/armor.dm b/code/game/gamemodes/changeling/powers/armor.dm index 87a3eee449..ac98f15c40 100644 --- a/code/game/gamemodes/changeling/powers/armor.dm +++ b/code/game/gamemodes/changeling/powers/armor.dm @@ -2,14 +2,14 @@ name = "Organic Space Suit" desc = "We grow an organic suit to protect ourselves from space exposure." helptext = "To remove the suit, use the ability again." - ability_icon_state = "lingspacesuit" + ability_icon_state = "ling_space_suit" genomecost = 1 verbpath = /mob/proc/changeling_spacesuit /mob/proc/changeling_spacesuit() set category = "Changeling" set name = "Organic Space Suit (20)" - if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling,/obj/item/clothing/head/helmet/space/changeling)) + if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling,/obj/item/clothing/head/helmet/space/changeling,/obj/item/clothing/shoes/magboots/changeling, 20)) return 1 return 0 @@ -17,7 +17,7 @@ name = "Chitinous Spacearmor" desc = "We turn our skin into tough chitin to protect us from damage and space exposure." helptext = "To remove the armor, use the ability again." - ability_icon_state = "lingarmor" + ability_icon_state = "ling_armor" genomecost = 3 verbpath = /mob/proc/changeling_spacearmor @@ -25,7 +25,7 @@ set category = "Changeling" set name = "Organic Spacearmor (20)" - if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling/armored,/obj/item/clothing/head/helmet/space/changeling/armored)) + if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling/armored,/obj/item/clothing/head/helmet/space/changeling/armored,/obj/item/clothing/shoes/magboots/changeling/armored, 20)) return 1 return 0 @@ -63,6 +63,36 @@ /obj/item/clothing/head/helmet/space/changeling/dropped() qdel(src) +/obj/item/clothing/shoes/magboots/changeling + desc = "A suction cupped mass of flesh, shaped like a foot." + name = "fleshy grippers" + icon_state = "lingspacesuit" + action_button_name = "Toggle Grippers" + canremove = 0 + +/obj/item/clothing/shoes/magboots/changeling/set_slowdown() + slowdown = shoes? max(SHOES_SLOWDOWN, shoes.slowdown): SHOES_SLOWDOWN //So you can't put on magboots to make you walk faster. + if (magpulse) + slowdown += 1 //It's already tied to a slowdown suit, 6 slowdown is huge. + +/obj/item/clothing/shoes/magboots/changeling/attack_self(mob/user) + if(magpulse) + item_flags &= ~NOSLIP + magpulse = 0 + set_slowdown() + force = 3 + user << "We release our grip on the floor." + else + item_flags |= NOSLIP + magpulse = 1 + set_slowdown() + force = 5 + user << "We cling to the terrain below us." + +/obj/item/clothing/shoes/magboots/changeling/dropped() + ..() + qdel(src) + //Armor /obj/item/clothing/suit/space/changeling/armored @@ -96,6 +126,16 @@ /obj/item/clothing/head/helmet/space/changeling/armored/dropped() qdel(src) +/obj/item/clothing/shoes/magboots/changeling/armored + desc = "A tough, hard mass of chitin, with long talons for digging into terrain." + name = "chitinous talons" + icon_state = "lingarmor" + action_button_name = "Toggle Talons" + +/obj/item/clothing/shoes/magboots/changeling/armored/dropped() + ..() + qdel(src) + /obj/item/clothing/gloves/combat/changeling //Combined insulated/fireproof gloves name = "chitinous gauntlets" desc = "Very resilient gauntlets made out of black chitin. It looks very durable, and can probably resist electrical shock in addition to the elements." diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm index bfe97bf19e..8a595f8d9e 100644 --- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm +++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm @@ -26,7 +26,6 @@ if(src.mind.changeling.recursive_enhancement) if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent)) src << "We will shock others more efficently." - src.mind.changeling.recursive_enhancement = 0 return 1 else if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc. diff --git a/code/game/gamemodes/changeling/powers/blind_sting.dm b/code/game/gamemodes/changeling/powers/blind_sting.dm index ceb6e00ae1..a9f9d2346e 100644 --- a/code/game/gamemodes/changeling/powers/blind_sting.dm +++ b/code/game/gamemodes/changeling/powers/blind_sting.dm @@ -21,7 +21,6 @@ if(src.mind.changeling.recursive_enhancement) duration = duration + 150 src << "They will be deprived of sight for longer." - src.mind.changeling.recursive_enhancement = 0 spawn(duration) T.disabilities &= ~NEARSIGHTED T.eye_blind = 10 diff --git a/code/game/gamemodes/changeling/powers/boost_range.dm b/code/game/gamemodes/changeling/powers/boost_range.dm index 65cdc00ca2..fd15d94dae 100644 --- a/code/game/gamemodes/changeling/powers/boost_range.dm +++ b/code/game/gamemodes/changeling/powers/boost_range.dm @@ -23,7 +23,6 @@ if(src.mind.changeling.recursive_enhancement) range = range + 3 src << "We can fire our next sting from five squares away." - src.mind.changeling.recursive_enhancement = 0 changeling.sting_range = range src.verbs -= /mob/proc/changeling_boost_range spawn(5) diff --git a/code/game/gamemodes/changeling/powers/cryo_sting.dm b/code/game/gamemodes/changeling/powers/cryo_sting.dm index ee11371dac..681e46e737 100644 --- a/code/game/gamemodes/changeling/powers/cryo_sting.dm +++ b/code/game/gamemodes/changeling/powers/cryo_sting.dm @@ -20,7 +20,6 @@ if(src.mind.changeling.recursive_enhancement) inject_amount = inject_amount * 1.5 src << "We inject extra chemicals." - src.mind.changeling.recursive_enhancement = 0 if(T.reagents) T.reagents.add_reagent("cryotoxin", inject_amount) feedback_add_details("changeling_powers","CS") diff --git a/code/game/gamemodes/changeling/powers/deaf_sting.dm b/code/game/gamemodes/changeling/powers/deaf_sting.dm index 0bf5d0f326..fcf5bfab7d 100644 --- a/code/game/gamemodes/changeling/powers/deaf_sting.dm +++ b/code/game/gamemodes/changeling/powers/deaf_sting.dm @@ -19,7 +19,6 @@ if(src.mind.changeling.recursive_enhancement) duration = duration + 100 src << "They will be unable to hear for a little longer." - src.mind.changeling.recursive_enhancement = 0 T << "Your ears pop and begin ringing loudly!" T.sdisabilities |= DEAF spawn(duration) T.sdisabilities &= ~DEAF diff --git a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm index c1152e8364..4a50140003 100644 --- a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm +++ b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm @@ -20,7 +20,6 @@ if(src.mind.changeling.recursive_enhancement) i = i * 2 src << "Our toxin will be extra potent, when it strikes." - src.mind.changeling.recursive_enhancement = 0 spawn(2 MINUTES) if(T) //We might not exist in two minutes, for whatever reason. T << "You feel a burning sensation flowing through your veins!" diff --git a/code/game/gamemodes/changeling/powers/enfeebling_string.dm b/code/game/gamemodes/changeling/powers/enfeebling_string.dm index 240cac473d..9584da1e55 100644 --- a/code/game/gamemodes/changeling/powers/enfeebling_string.dm +++ b/code/game/gamemodes/changeling/powers/enfeebling_string.dm @@ -23,7 +23,6 @@ if(src.mind.changeling.recursive_enhancement) effect = effect + 20 src << "We make them extremely weak." - src.mind.changeling.recursive_enhancement = 0 var/health_to_take_away = H.maxHealth * (effect / 100) H.maxHealth -= health_to_take_away diff --git a/code/game/gamemodes/changeling/powers/epinephrine_overdose.dm b/code/game/gamemodes/changeling/powers/epinephrine_overdose.dm index 9c28fcadc4..3875a4b4fa 100644 --- a/code/game/gamemodes/changeling/powers/epinephrine_overdose.dm +++ b/code/game/gamemodes/changeling/powers/epinephrine_overdose.dm @@ -31,7 +31,6 @@ if(src.mind.changeling.recursive_enhancement) src << "We feel unstoppable." - src.mind.changeling.recursive_enhancement = 0 spawn(1) var/i = 30 while(i) diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm index 0502a35f28..f7760e9ce6 100644 --- a/code/game/gamemodes/changeling/powers/fleshmend.dm +++ b/code/game/gamemodes/changeling/powers/fleshmend.dm @@ -23,7 +23,6 @@ if(src.mind.changeling.recursive_enhancement) heal_amount = heal_amount * 2 src << "We will heal much faster." - src.mind.changeling.recursive_enhancement = 0 spawn(0) src << "We begin to heal ourselves." diff --git a/code/game/gamemodes/changeling/powers/panacea.dm b/code/game/gamemodes/changeling/powers/panacea.dm index 09c026aadb..055cf3e28b 100644 --- a/code/game/gamemodes/changeling/powers/panacea.dm +++ b/code/game/gamemodes/changeling/powers/panacea.dm @@ -32,7 +32,6 @@ if(src.mind.changeling.recursive_enhancement) heal_amount = heal_amount * 2 src << "We will heal much faster." - src.mind.changeling.recursive_enhancement = 0 for(var/i = 0, i<10,i++) if(C) diff --git a/code/game/gamemodes/changeling/powers/rapid_regen.dm b/code/game/gamemodes/changeling/powers/rapid_regen.dm index 1688c81f31..eddf83292e 100644 --- a/code/game/gamemodes/changeling/powers/rapid_regen.dm +++ b/code/game/gamemodes/changeling/powers/rapid_regen.dm @@ -25,7 +25,6 @@ if(src.mind.changeling.recursive_enhancement) healing_amount = C.maxHealth src << "We completely heal ourselves." - src.mind.changeling.recursive_enhancement = 0 spawn(0) C.adjustBruteLoss(-healing_amount) C.adjustFireLoss(-healing_amount) @@ -33,6 +32,7 @@ C.adjustCloneLoss(-healing_amount) C.adjustBrainLoss(-healing_amount) C.restore_blood() + C.species.create_organs(C) C.restore_all_organs() C.blinded = 0 C.eye_blind = 0 diff --git a/code/game/gamemodes/changeling/powers/recursive_enhancement.dm b/code/game/gamemodes/changeling/powers/recursive_enhancement.dm index 9b42ee68e0..9362333c57 100644 --- a/code/game/gamemodes/changeling/powers/recursive_enhancement.dm +++ b/code/game/gamemodes/changeling/powers/recursive_enhancement.dm @@ -1,6 +1,6 @@ /datum/power/changeling/recursive_enhancement name = "Recursive Enhancement" - desc = "We cause our next ability use to have increased or additional effects." + desc = "We cause our abilities to have increased or additional effects." helptext = "To check the effects for each ability, check the blue text underneath the ability in the evolution menu." ability_icon_state = "ling_recursive_enhancement" genomecost = 3 @@ -9,16 +9,16 @@ //Increases macimum chemical storage /mob/proc/changeling_recursive_enhancement() set category = "Changeling" - set name = "Recursive Enhancement (10)" - set desc = "Empowers our next ability." - var/datum/changeling/changeling = changeling_power(10,0,100,UNCONSCIOUS) + set name = "Recursive Enhancement" + set desc = "Empowers our abilities." + var/datum/changeling/changeling = changeling_power(0,0,100,UNCONSCIOUS) if(!changeling) return 0 if(src.mind.changeling.recursive_enhancement) - src << "We have already prepared to enhance our next ability." + src << "We will no longer empower our abilities." + src.mind.changeling.recursive_enhancement = 0 return 0 - src << "We empower ourselves. Our next ability will be extra potent." + src << "We empower ourselves. Our abilities will now be extra potent." src.mind.changeling.recursive_enhancement = 1 - src.mind.changeling.chem_charges -= 10 feedback_add_details("changeling_powers","RE") return 1 \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/respec.dm b/code/game/gamemodes/changeling/powers/respec.dm index 661a761d8c..7910ceaf7c 100644 --- a/code/game/gamemodes/changeling/powers/respec.dm +++ b/code/game/gamemodes/changeling/powers/respec.dm @@ -12,6 +12,8 @@ ling_datum.purchased_powers = list() //Then wipe all the powers we bought. ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum. ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade. + src.mind.changeling.recursive_enhancement = 0 //Ensures this is cleared + ling_datum.chem_storage = 50 if(ishuman(src)) var/mob/living/carbon/human/H = src diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 3953caa525..2f0b9c57e7 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -27,17 +27,19 @@ C.radiation = 0 C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss()) C.reagents.clear_reagents() - C.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above. if(ishuman(C)) var/mob/living/carbon/human/H = src + H.species.create_organs(H) + H.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above. H.restore_blood() H.mutations.Remove(HUSK) H.status_flags -= DISFIGURED H.update_body(1) for(var/limb in H.organs_by_name) var/obj/item/organ/external/current_limb = H.organs_by_name[limb] - current_limb.undislocate() - current_limb.open = 0 + if(current_limb) + current_limb.undislocate() + current_limb.open = 0 C.halloss = 0 C.shock_stage = 0 //Pain diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 24d024467a..b9303a3a81 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -40,7 +40,6 @@ if(src.mind.changeling.recursive_enhancement) range = range * 2 src << "We are extra loud." - src.mind.changeling.recursive_enhancement = 0 for(var/mob/living/M in range(range, src)) if(iscarbon(M)) diff --git a/code/game/gamemodes/changeling/powers/silence_sting.dm b/code/game/gamemodes/changeling/powers/silence_sting.dm index c16d74ff59..9ebe8adf7c 100644 --- a/code/game/gamemodes/changeling/powers/silence_sting.dm +++ b/code/game/gamemodes/changeling/powers/silence_sting.dm @@ -19,7 +19,6 @@ if(src.mind.changeling.recursive_enhancement) duration = duration + 10 src << "They will be unable to cry out in fear for a little longer." - src.mind.changeling.recursive_enhancement = 0 T.silent += duration feedback_add_details("changeling_powers","SS") return 1 \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/visible_camouflage.dm b/code/game/gamemodes/changeling/powers/visible_camouflage.dm index 99bb7762fa..00e31cc932 100644 --- a/code/game/gamemodes/changeling/powers/visible_camouflage.dm +++ b/code/game/gamemodes/changeling/powers/visible_camouflage.dm @@ -39,7 +39,6 @@ if(src.mind.changeling.recursive_enhancement) H.invisibility = INVISIBILITY_OBSERVER src << "We are now truly invisible." - src.mind.changeling.recursive_enhancement = 0 while(H.m_intent == "walk" && H.mind.changeling.cloaked && !H.stat) //This loop will keep going until the player uncloaks. if(mind.changeling.chem_recharge_rate != 0) //Without this, there is an exploit that can be done, if one buys engorged chem sacks while cloaked. diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index bdc4052589..9099236e2c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -301,9 +301,9 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE") if(5) M << "
" - M << "THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED" + M << "THE STATION ADMINISTRATOR, HOP AND HOS ARE [who2]...LAWS UPDATED" M << "
" - M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]") + M.add_ion_law("THE STATION ADMINISTRATOR, HOP AND HOS ARE [who2]") if(6) M << "
" M << "THE STATION IS BUILT FOR [who2]...LAWS UPDATED" diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 4c390e7c69..7c1f422987 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -288,7 +288,7 @@ var/global/datum/controller/gameticker/ticker var/captainless=1 for(var/mob/living/carbon/human/player in player_list) if(player && player.mind && player.mind.assigned_role) - if(player.mind.assigned_role == "Captain") + if(player.mind.assigned_role == "Station Administrator") captainless=0 if(!player_is_antag(player.mind, only_offstation_roles = 1)) job_master.EquipRank(player, player.mind.assigned_role, 0) @@ -297,7 +297,7 @@ var/global/datum/controller/gameticker/ticker if(captainless) for(var/mob/M in player_list) if(!istype(M,/mob/new_player)) - M << "Captainship not forced on anyone." + M << "Station Administratorship not forced on anyone." proc/process() diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 7b0379cbc2..9109d9297b 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -10,7 +10,7 @@ only hope this unknown assassin isn't here for you." config_tag = "ninja" required_players = 1 - required_players_secret = 1 + required_players_secret = 3 required_enemies = 1 end_on_antag_death = 0 antag_tags = list(MODE_NINJA) \ No newline at end of file diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 98fc360160..54f75a0032 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -8,6 +8,5 @@ required_enemies = 3 auto_recall_shuttle = 0 //un-wanted on polaris end_on_antag_death = 0 - shuttle_delay = 3 antag_tags = list(MODE_REVOLUTIONARY, MODE_LOYALIST) require_all_templates = 1 diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm index 891ca926de..c253d44199 100644 --- a/code/game/gamemodes/technomancer/catalog.dm +++ b/code/game/gamemodes/technomancer/catalog.dm @@ -1,8 +1,13 @@ +#define ALL_SPELLS "All" +#define OFFENSIVE_SPELLS "Offensive" +#define DEFENSIVE_SPELLS "Defensive" +#define UTILITY_SPELLS "Utility" +#define SUPPORT_SPELLS "Support" + var/list/all_technomancer_spells = typesof(/datum/technomancer/spell) - /datum/technomancer/spell var/list/all_technomancer_equipment = typesof(/datum/technomancer/equipment) - /datum/technomancer/equipment var/list/all_technomancer_consumables = typesof(/datum/technomancer/consumable) - /datum/technomancer/consumable var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - /datum/technomancer/assistance -var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datum/technomancer/presets /datum/technomancer var/name = "technomancer thing" @@ -13,6 +18,9 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu var/obj_path = null var/ability_icon_state = null +/datum/technomancer/spell + var/category = ALL_SPELLS + /obj/item/weapon/technomancer_catalog name = "catalog" desc = "A \"book\" featuring a holographic display, metal cover, and miniaturized teleportation device, allowing the user to \ @@ -27,8 +35,8 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu var/list/equipment_instances = list() var/list/consumable_instances = list() var/list/assistance_instances = list() - var/list/preset_instances = list() var/tab = 0 + var/spell_tab = ALL_SPELLS var/show_scepter_text = 0 /obj/item/weapon/technomancer_catalog/apprentice @@ -72,15 +80,23 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu if(!assistance_instances.len) for(var/A in all_technomancer_assistance) assistance_instances += new A() - if(!preset_instances.len) - for(var/P in all_technomancer_presets) - preset_instances += new P() /obj/item/weapon/technomancer_catalog/apprentice/set_up() ..() for(var/datum/technomancer/assistance/apprentice/A in assistance_instances) assistance_instances.Remove(A) +// Proc: show_categories() +// Parameters: 1 (category - the category link to display) +// Description: Shows an href link to go to a spell subcategory if the category is not already selected, otherwise is bold, to reduce +// code duplicating. +/obj/item/weapon/technomancer_catalog/proc/show_categories(var/category) + if(category) + if(spell_tab != category) + return "[category]" + else + return "[category]" + // Proc: attack_self() // Parameters: 1 (user - the mob clicking on the catelog) // Description: Shows an HTML window, to buy equipment and spells, if the user is the legitimate owner. Otherwise it cannot be used. @@ -100,13 +116,17 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu dat += "Functions | " dat += "Equipment | " dat += "Consumables | " - dat += "Assistance | " - dat += "Presets
" + dat += "Assistance
" dat += "You currently have a budget of [budget]/[max_budget].

" dat += "Refund Functions

" - for(var/datum/technomancer/spell in spell_instances) + + dat += "[show_categories(ALL_SPELLS)] | [show_categories(OFFENSIVE_SPELLS)] | [show_categories(DEFENSIVE_SPELLS)] | \ + [show_categories(UTILITY_SPELLS)] | [show_categories(SUPPORT_SPELLS)]
" + for(var/datum/technomancer/spell/spell in spell_instances) if(spell.hidden) continue + if(spell_tab != ALL_SPELLS && spell.category != spell_tab) + continue dat += "[spell.name]
" dat += "[spell.desc]
" if(show_scepter_text) @@ -123,8 +143,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu dat += "Functions | " dat += "Equipment | " dat += "Consumables | " - dat += "Assistance | " - dat += "Presets
" + dat += "Assistance
" dat += "You currently have a budget of [budget]/[max_budget].

" for(var/datum/technomancer/equipment/E in equipment_instances) dat += "[E.name]
" @@ -141,8 +160,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu dat += "Functions | " dat += "Equipment | " dat += "Consumables | " - dat += "Assistance | " - dat += "Presets
" + dat += "Assistance
" dat += "You currently have a budget of [budget]/[max_budget].

" for(var/datum/technomancer/consumable/C in consumable_instances) dat += "[C.name]
" @@ -159,8 +177,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu dat += "Functions | " dat += "Equipment | " dat += "Consumables | " - dat += "Assistance | " - dat += "Presets
" + dat += "Assistance
" dat += "You currently have a budget of [budget]/[max_budget].

" for(var/datum/technomancer/assistance/A in assistance_instances) dat += "[A.name]
" @@ -171,24 +188,6 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu dat += "Cannot afford!

" user << browse(dat, "window=radio") onclose(user, "radio") - if(4) //Presets - var/dat = "" - user.set_machine(src) - dat += "Functions | " - dat += "Equipment | " - dat += "Consumables | " - dat += "Assistance | " - dat += "Presets
" - dat += "You currently have a budget of [budget]/[max_budget].

" - for(var/datum/technomancer/presets/P in preset_instances) - dat += "[P.name]
" - dat += "[P.desc]
" - if(P.cost <= budget) - dat += "Purchase ([P.cost])

" - else - dat += "Cannot afford!

" - user << browse(dat, "window=radio") - onclose(user, "radio") // Proc: Topic() // Parameters: 2 (href - don't know, href_list - the choice that the person using the interface above clicked on.) @@ -210,6 +209,8 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu H.set_machine(src) if(href_list["tab_choice"]) tab = text2num(href_list["tab_choice"]) + if(href_list["spell_category"]) + spell_tab = href_list["spell_category"] if(href_list["spell_choice"]) var/datum/technomancer/new_spell = null //Locate the spell. @@ -269,4 +270,4 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu budget += spell_datum.cost core.remove_spell(spell) break - attack_self(H) \ No newline at end of file + attack_self(H) diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 5d5432fa4e..6be83aef7b 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -212,4 +212,4 @@ outgoing_instability = outgoing_instability * armor_factor H.adjust_instability(outgoing_instability) - set_light(distance, distance, l_color = "#C26DDE") + set_light(distance, distance * 2, l_color = "#C26DDE") diff --git a/code/game/gamemodes/technomancer/spells/abjuration.dm b/code/game/gamemodes/technomancer/spells/abjuration.dm index 6e4f7d73b3..2422ef00bf 100644 --- a/code/game/gamemodes/technomancer/spells/abjuration.dm +++ b/code/game/gamemodes/technomancer/spells/abjuration.dm @@ -4,6 +4,7 @@ far away from the caster. Failing that, it may inhibit those entities in some form." cost = 40 obj_path = /obj/item/weapon/spell/abjuration + category = UTILITY_SPELLS /obj/item/weapon/spell/abjuration name = "abjuration" diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm index ad4fcdc9ef..150559b9cd 100644 --- a/code/game/gamemodes/technomancer/spells/apportation.dm +++ b/code/game/gamemodes/technomancer/spells/apportation.dm @@ -4,6 +4,7 @@ will grab them automatically." cost = 50 obj_path = /obj/item/weapon/spell/apportation + category = UTILITY_SPELLS /obj/item/weapon/spell/apportation name = "apportation" diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm index 38b55c1342..06930828af 100644 --- a/code/game/gamemodes/technomancer/spells/audible_deception.dm +++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm @@ -6,6 +6,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/audible_deception ability_icon_state = "tech_audibledeception" + category = UTILITY_SPELLS /obj/item/weapon/spell/audible_deception name = "audible deception" diff --git a/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm b/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm index a1c0940f14..52cbdfbfdf 100644 --- a/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm @@ -4,6 +4,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/aura/biomed ability_icon_state = "tech_biomedaura" + category = SUPPORT_SPELLS /obj/item/weapon/spell/aura/biomed name = "restoration aura" diff --git a/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm b/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm index 83ab173762..0c28f31577 100644 --- a/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm @@ -7,6 +7,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/aura/fire ability_icon_state = "tech_fireaura" + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/aura/fire name = "Fire Storm" @@ -20,7 +21,6 @@ qdel(src) var/list/nearby_things = range(4,owner) - var/fire_prob = 10 var/temp_change = 25 var/temp_cap = 500 var/fire_power = 2 @@ -28,7 +28,6 @@ if(check_for_scepter()) temp_change = 50 temp_cap = 700 - fire_prob = 25 fire_power = 4 for(var/mob/living/carbon/human/H in nearby_things) if(is_ally(H)) @@ -41,16 +40,11 @@ turf_check: for(var/turf/simulated/T in nearby_things) - if(prob(fire_prob)) + if(prob(30)) for(var/mob/living/carbon/human/H in T) if(is_ally(H)) continue turf_check T.hotspot_expose(1000, 50, 1) T.create_fire(fire_power) - -// //We use hotspot_expose() to allow firesuits to protect from this aura. -// var/turf/location = get_turf(H) -// location.hotspot_expose(1000, 50, 1) - owner.adjust_instability(1) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm index 44bd8feea0..d5dd78b793 100644 --- a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm @@ -6,6 +6,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/aura/frost ability_icon_state = "tech_frostaura" + category = DEFENSIVE_SPELLS // Scepter-less frost aura is nonlethal. /obj/item/weapon/spell/aura/frost name = "chilling aura" @@ -35,8 +36,4 @@ var/cold_factor = abs(protection - 1) H.bodytemperature = max( (H.bodytemperature - temp_change) * cold_factor, temp_cap) -// //We use hotspot_expose() to allow firesuits to protect from this aura. -// var/turf/location = get_turf(H) -// location.hotspot_expose(1, 50, 1) - owner.adjust_instability(1) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm b/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm index a270ef16e3..a9e50b2fa3 100644 --- a/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm @@ -4,6 +4,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/aura/shock ability_icon_state = "tech_shockaura" + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/aura/shock name = "electric aura" diff --git a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm index 6307d2f4ca..15aae46ad3 100644 --- a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm @@ -5,6 +5,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/aura/unstable ability_icon_state = "tech_unstableaura" + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/aura/unstable name = "degen aura" diff --git a/code/game/gamemodes/technomancer/spells/blink.dm b/code/game/gamemodes/technomancer/spells/blink.dm index 43ca683fd5..9dae12e39e 100644 --- a/code/game/gamemodes/technomancer/spells/blink.dm +++ b/code/game/gamemodes/technomancer/spells/blink.dm @@ -5,6 +5,7 @@ enhancement_desc = "Blink distance is increased greatly." cost = 100 obj_path = /obj/item/weapon/spell/blink + category = UTILITY_SPELLS /obj/item/weapon/spell/blink name = "blink" diff --git a/code/game/gamemodes/technomancer/spells/chroma.dm b/code/game/gamemodes/technomancer/spells/chroma.dm index fb459620c0..18c4afcf65 100644 --- a/code/game/gamemodes/technomancer/spells/chroma.dm +++ b/code/game/gamemodes/technomancer/spells/chroma.dm @@ -4,6 +4,7 @@ useful to trick someone into believing you're casting a different spell, or perhaps just for fun." cost = 25 obj_path = /obj/item/weapon/spell/chroma + category = UTILITY_SPELLS /obj/item/weapon/spell/chroma name = "chroma" diff --git a/code/game/gamemodes/technomancer/spells/condensation.dm b/code/game/gamemodes/technomancer/spells/condensation.dm index 9425b920a5..285f414f15 100644 --- a/code/game/gamemodes/technomancer/spells/condensation.dm +++ b/code/game/gamemodes/technomancer/spells/condensation.dm @@ -5,6 +5,7 @@ ability_icon_state = "tech_condensation" cost = 50 obj_path = /obj/item/weapon/spell/condensation + category = UTILITY_SPELLS /obj/item/weapon/spell/condensation name = "condensation" diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm index 566f3d7ceb..b5eaad8f44 100644 --- a/code/game/gamemodes/technomancer/spells/control.dm +++ b/code/game/gamemodes/technomancer/spells/control.dm @@ -7,6 +7,7 @@ around the entity is merely a hologram used to allow the user to know if the creature is safe or not." cost = 200 obj_path = /obj/item/weapon/spell/control + category = UTILITY_SPELLS /mob/living/carbon/human/proc/technomancer_control() place_spell_in_hand(/obj/item/weapon/spell/control) diff --git a/code/game/gamemodes/technomancer/spells/dispel.dm b/code/game/gamemodes/technomancer/spells/dispel.dm index e0de7920c1..771bc6b625 100644 --- a/code/game/gamemodes/technomancer/spells/dispel.dm +++ b/code/game/gamemodes/technomancer/spells/dispel.dm @@ -6,6 +6,7 @@ cost = 25 obj_path = /obj/item/weapon/spell/dispel ability_icon_state = "tech_dispel" + category = SUPPORT_SPELLS /obj/item/weapon/spell/dispel name = "dispel" diff --git a/code/game/gamemodes/technomancer/spells/energy_siphon.dm b/code/game/gamemodes/technomancer/spells/energy_siphon.dm index 0657111f15..0e8e23ffd8 100644 --- a/code/game/gamemodes/technomancer/spells/energy_siphon.dm +++ b/code/game/gamemodes/technomancer/spells/energy_siphon.dm @@ -7,6 +7,7 @@ cost = 150 obj_path = /obj/item/weapon/spell/energy_siphon ability_icon_state = "tech_energysiphon" + category = UTILITY_SPELLS /obj/item/weapon/spell/energy_siphon name = "energy siphon" diff --git a/code/game/gamemodes/technomancer/spells/flame_tongue.dm b/code/game/gamemodes/technomancer/spells/flame_tongue.dm index 772ee579cc..5afa25ae90 100644 --- a/code/game/gamemodes/technomancer/spells/flame_tongue.dm +++ b/code/game/gamemodes/technomancer/spells/flame_tongue.dm @@ -4,6 +4,7 @@ cost = 100 obj_path = /obj/item/weapon/spell/flame_tongue ability_icon_state = "tech_flametongue" + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/flame_tongue name = "flame tongue" diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm index 797536cc45..0541e5473e 100644 --- a/code/game/gamemodes/technomancer/spells/gambit.dm +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -4,6 +4,7 @@ ability_icon_state = "tech_gambit" cost = 50 obj_path = /obj/item/weapon/spell/gambit + category = UTILITY_SPELLS /var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/weapon/spell) - list( /obj/item/weapon/spell, diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm index 3c72506320..e450e4480f 100644 --- a/code/game/gamemodes/technomancer/spells/illusion.dm +++ b/code/game/gamemodes/technomancer/spells/illusion.dm @@ -5,6 +5,7 @@ cost = 100 obj_path = /obj/item/weapon/spell/illusion ability_icon_state = "tech_illusion" + category = UTILITY_SPELLS /obj/item/weapon/spell/illusion name = "illusion" diff --git a/code/game/gamemodes/technomancer/spells/insert/corona.dm b/code/game/gamemodes/technomancer/spells/insert/corona.dm index fbeb255517..bde3ee9984 100644 --- a/code/game/gamemodes/technomancer/spells/insert/corona.dm +++ b/code/game/gamemodes/technomancer/spells/insert/corona.dm @@ -5,6 +5,7 @@ cost = 100 obj_path = /obj/item/weapon/spell/insert/corona ability_icon_state = "tech_corona" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/corona name = "corona" diff --git a/code/game/gamemodes/technomancer/spells/insert/haste.dm b/code/game/gamemodes/technomancer/spells/insert/haste.dm index a378d98b87..8a3455701a 100644 --- a/code/game/gamemodes/technomancer/spells/insert/haste.dm +++ b/code/game/gamemodes/technomancer/spells/insert/haste.dm @@ -1,10 +1,11 @@ /datum/technomancer/spell/haste name = "Haste" - desc = "Allows the target to run at speeds that should not be possible for an ordinary being. For three seconds, the target \ + desc = "Allows the target to run at speeds that should not be possible for an ordinary being. For five seconds, the target \ runs extremly fast, and cannot be slowed by any means." cost = 100 obj_path = /obj/item/weapon/spell/insert/haste ability_icon_state = "tech_haste" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/haste name = "haste" @@ -22,7 +23,7 @@ L.force_max_speed = 1 L << "You suddenly find it much easier to move." L.adjust_instability(10) - spawn(3 SECONDS) + spawn(5 SECONDS) if(src) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm index 37a9be3b18..6588f1617f 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm @@ -5,6 +5,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_burns ability_icon_state = "tech_mendburns" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_burns name = "mend burns" @@ -19,10 +20,10 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) - H.adjustFireLoss(-1) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) + H.adjustFireLoss(-5) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) sleep(10) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm index 3d621dc5ed..7ad6976b54 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm @@ -4,6 +4,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_metal ability_icon_state = "tech_mendwounds" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_metal name = "mend metal" @@ -18,14 +19,14 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/external/O in H.organs) if(O.robotic < ORGAN_ROBOT) // Robot parts only. continue - O.heal_damage(1, 0, internal = 1, robo_repair = 1) + O.heal_damage(5, 0, internal = 1, robo_repair = 1) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) - sleep(10) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) + sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm index cdc319dd73..e9450b9586 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm @@ -5,6 +5,7 @@ cost = 75 obj_path = /obj/item/weapon/spell/insert/mend_organs ability_icon_state = "tech_mendwounds" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_organs name = "mend organs" @@ -19,13 +20,13 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/O in H.internal_organs) if(O.damage > 0) - O.damage = max(O.damage - 0.2, 0) + O.damage = max(O.damage - 1, 0) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) - sleep(10) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) + sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm index 6f24704d4a..fbafb7c044 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm @@ -5,6 +5,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_wires ability_icon_state = "tech_mendwounds" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_wires name = "mend wires" @@ -19,14 +20,14 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/external/O in H.organs) if(O.robotic < ORGAN_ROBOT) // Robot parts only. continue - O.heal_damage(0, 1, internal = 1, robo_repair = 1) + O.heal_damage(0, 5, internal = 1, robo_repair = 1) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) sleep(10) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm b/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm index 5ae40915d0..c1c507b552 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm @@ -5,6 +5,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_wounds ability_icon_state = "tech_mendwounds" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_wounds name = "mend wounds" @@ -19,10 +20,10 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) - H.adjustBruteLoss(-1) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) - sleep(10) + H.adjustBruteLoss(-5) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) + sleep(1 SECOND) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/insert/purify.dm b/code/game/gamemodes/technomancer/spells/insert/purify.dm index 0f5d404c4e..7ca94f78e6 100644 --- a/code/game/gamemodes/technomancer/spells/insert/purify.dm +++ b/code/game/gamemodes/technomancer/spells/insert/purify.dm @@ -1,10 +1,11 @@ /datum/technomancer/spell/purify name = "Purify" - desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, and such. \ + desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, genetic damage, and such. \ Instability is split between the target and technomancer, if seperate." cost = 25 obj_path = /obj/item/weapon/spell/insert/purify ability_icon_state = "tech_purify" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/purify name = "purify" @@ -23,12 +24,12 @@ H.disabilities = 0 // for(var/datum/disease/D in H.viruses) // D.cure() - for(var/i = 0, i<25,i++) + for(var/i = 0, i<5,i++) if(H) - H.adjustToxLoss(-1) - H.adjustCloneLoss(-1) - H.radiation = max(host.radiation - 2, 0) - H.adjust_instability(0.5) - origin.adjust_instability(0.5) - sleep(10) + H.adjustToxLoss(-5) + H.adjustCloneLoss(-5) + H.radiation = max(host.radiation - 10, 0) + H.adjust_instability(2.5) + origin.adjust_instability(2.5) + sleep(1 SECOND) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/insert/repel_missiles.dm b/code/game/gamemodes/technomancer/spells/insert/repel_missiles.dm index 9ebeda9676..8fb549039f 100644 --- a/code/game/gamemodes/technomancer/spells/insert/repel_missiles.dm +++ b/code/game/gamemodes/technomancer/spells/insert/repel_missiles.dm @@ -1,10 +1,11 @@ /datum/technomancer/spell/repel_missiles name = "Repel Missiles" desc = "Places a repulsion field around you, which attempts to deflect incoming bullets and lasers, making them 30% less likely \ - to hit you. The field lasts for two minutes and can be granted to yourself or an ally." + to hit you. The field lasts for five minutes and can be granted to yourself or an ally." cost = 60 obj_path = /obj/item/weapon/spell/insert/repel_missiles ability_icon_state = "tech_repelmissiles" + category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/repel_missiles name = "repel missiles" @@ -21,7 +22,7 @@ var/mob/living/L = host L.evasion += 2 L << "You have a repulsion field around you, which will attempt to deflect projectiles." - spawn(2 MINUTES) + spawn(5 MINUTES) if(src) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/instability_tap.dm b/code/game/gamemodes/technomancer/spells/instability_tap.dm index 07f7db42fe..ada2989444 100644 --- a/code/game/gamemodes/technomancer/spells/instability_tap.dm +++ b/code/game/gamemodes/technomancer/spells/instability_tap.dm @@ -5,6 +5,7 @@ cost = 120 obj_path = /obj/item/weapon/spell/instability_tap ability_icon_state = "tech_instabilitytap" + category = UTILITY_SPELLS /obj/item/weapon/spell/instability_tap name = "instability tap" diff --git a/code/game/gamemodes/technomancer/spells/mark_recall.dm b/code/game/gamemodes/technomancer/spells/mark_recall.dm index 0fe6be7808..63e6d67fad 100644 --- a/code/game/gamemodes/technomancer/spells/mark_recall.dm +++ b/code/game/gamemodes/technomancer/spells/mark_recall.dm @@ -6,6 +6,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/mark ability_icon_state = "tech_mark" + category = UTILITY_SPELLS //The object to teleport to when Recall is used. /obj/effect/mark_spell @@ -52,6 +53,7 @@ cost = 50 obj_path = /obj/item/weapon/spell/recall ability_icon_state = "tech_recall" + category = UTILITY_SPELLS /obj/item/weapon/spell/recall name = "recall" diff --git a/code/game/gamemodes/technomancer/spells/oxygenate.dm b/code/game/gamemodes/technomancer/spells/oxygenate.dm index 9acda5227a..3f9bb6f9e5 100644 --- a/code/game/gamemodes/technomancer/spells/oxygenate.dm +++ b/code/game/gamemodes/technomancer/spells/oxygenate.dm @@ -5,6 +5,7 @@ cost = 70 obj_path = /obj/item/weapon/spell/oxygenate ability_icon_state = "oxygenate" + category = SUPPORT_SPELLS /obj/item/weapon/spell/oxygenate name = "oxygenate" diff --git a/code/game/gamemodes/technomancer/spells/passwall.dm b/code/game/gamemodes/technomancer/spells/passwall.dm index faffe94972..aa16a8a4fc 100644 --- a/code/game/gamemodes/technomancer/spells/passwall.dm +++ b/code/game/gamemodes/technomancer/spells/passwall.dm @@ -6,6 +6,7 @@ cost = 100 obj_path = /obj/item/weapon/spell/passwall ability_icon_state = "tech_passwall" + category = UTILITY_SPELLS /obj/item/weapon/spell/passwall name = "passwall" @@ -21,53 +22,55 @@ if(!allowed_to_teleport()) user << "You can't teleport here!" return 0 - if(isturf(hit_atom)) - var/turf/T = hit_atom //Turf we touched. - var/turf/our_turf = get_turf(user) //Where we are. - if(!T.density) - user << "Perhaps you should try using passWALL on a wall." +// if(isturf(hit_atom)) + + var/turf/T = get_turf(hit_atom) //Turf we touched. + var/turf/our_turf = get_turf(user) //Where we are. + if(!T.density) + if(!T.check_density()) + user << "Perhaps you should try using passWALL on a wall, or other solid object." return 0 - var/direction = get_dir(our_turf, T) - var/total_cost = 0 - var/turf/checked_turf = T //Turf we're currently checking for density in the loop below. - var/turf/found_turf = null //Our destination, if one is found. - var/i = maximum_distance + var/direction = get_dir(our_turf, T) + var/total_cost = 0 + var/turf/checked_turf = T //Turf we're currently checking for density in the loop below. + var/turf/found_turf = null //Our destination, if one is found. + var/i = maximum_distance - visible_message("[user] rests a hand on \the [T].") - busy = 1 + visible_message("[user] rests a hand on \the [hit_atom].") + busy = 1 - var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread) - spark_system.set_up(5, 0, our_turf) + var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread) + spark_system.set_up(5, 0, our_turf) - while(i) - checked_turf = get_step(checked_turf, direction) //Advance in the given direction - total_cost += check_for_scepter() ? 400 : 800 //Phasing through matter's expensive, you know. - i-- - if(!checked_turf.density) //If we found a destination (a non-dense turf), then we can stop. - var/dense_objs_on_turf = 0 - for(var/atom/movable/stuff in checked_turf.contents) //Make sure nothing dense is where we want to go, like an airlock or window. - if(stuff.density) - dense_objs_on_turf = 1 + while(i) + checked_turf = get_step(checked_turf, direction) //Advance in the given direction + total_cost += check_for_scepter() ? 400 : 800 //Phasing through matter's expensive, you know. + i-- + if(!checked_turf.density) //If we found a destination (a non-dense turf), then we can stop. + var/dense_objs_on_turf = 0 + for(var/atom/movable/stuff in checked_turf.contents) //Make sure nothing dense is where we want to go, like an airlock or window. + if(stuff.density) + dense_objs_on_turf = 1 - if(!dense_objs_on_turf) //If we found a non-dense turf with nothing dense on it, then that's our destination. - found_turf = checked_turf - break - sleep(10) + if(!dense_objs_on_turf) //If we found a non-dense turf with nothing dense on it, then that's our destination. + found_turf = checked_turf + break + sleep(10) - if(found_turf) - if(user.loc != our_turf) - user << "You need to stand still in order to phase through the wall." - return 0 - if(pay_energy(total_cost) && !user.incapacitated() ) - visible_message("[user] appears to phase through \the [T]!") - user << "You find a destination on the other side of \the [T], and phase through it." - spark_system.start() - user.forceMove(found_turf) - qdel(src) - return 1 - else - user << "You don't have enough energy to phase through these walls!" - busy = 0 + if(found_turf) + if(user.loc != our_turf) + user << "You need to stand still in order to phase through \the [hit_atom]." + return 0 + if(pay_energy(total_cost) && !user.incapacitated() ) + visible_message("[user] appears to phase through \the [hit_atom]!") + user << "You find a destination on the other side of \the [hit_atom], and phase through it." + spark_system.start() + user.forceMove(found_turf) + qdel(src) + return 1 else - user << "You weren't able to find an open space to go to." + user << "You don't have enough energy to phase through these walls!" busy = 0 + else + user << "You weren't able to find an open space to go to." + busy = 0 diff --git a/code/game/gamemodes/technomancer/spells/phase_shift.dm b/code/game/gamemodes/technomancer/spells/phase_shift.dm index 142134abc9..20fb033872 100644 --- a/code/game/gamemodes/technomancer/spells/phase_shift.dm +++ b/code/game/gamemodes/technomancer/spells/phase_shift.dm @@ -4,6 +4,7 @@ draining your powercell." cost = 80 obj_path = /obj/item/weapon/spell/phase_shift + category = DEFENSIVE_SPELLS /obj/item/weapon/spell/phase_shift name = "phase shift" diff --git a/code/game/gamemodes/technomancer/spells/projectile/beam.dm b/code/game/gamemodes/technomancer/spells/projectile/beam.dm index bfee4ec3f1..429a83dd9b 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/beam.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/beam.dm @@ -4,6 +4,7 @@ cost = 150 ability_icon_state = "tech_beam" obj_path = /obj/item/weapon/spell/projectile/beam + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/projectile/beam name = "beam" @@ -12,12 +13,13 @@ cast_methods = CAST_RANGED aspect = ASPECT_LIGHT spell_projectile = /obj/item/projectile/beam/blue - energy_cost_per_shot = 500 + energy_cost_per_shot = 400 instability_per_shot = 3 cooldown = 10 + fire_sound = 'sound/weapons/Laser.ogg' /obj/item/projectile/beam/blue - damage = 20 + damage = 30 muzzle_type = /obj/effect/projectile/laser_blue/muzzle tracer_type = /obj/effect/projectile/laser_blue/tracer diff --git a/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm b/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm index 5d4da458a0..7cdd4565e2 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm @@ -5,6 +5,7 @@ strike up to four targets, including yourself if conditions allow it to occur." cost = 150 obj_path = /obj/item/weapon/spell/projectile/chain_lightning + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/projectile/chain_lightning name = "chain lightning" @@ -16,6 +17,7 @@ energy_cost_per_shot = 3000 instability_per_shot = 10 cooldown = 20 + fire_sound = 'sound/weapons/gauss_shoot.ogg' /obj/item/projectile/beam/chain_lightning name = "lightning" diff --git a/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm b/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm index c13d2363d8..dad3c88f45 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm @@ -4,6 +4,7 @@ that armor designed to protect from blunt force will mitigate this function as well." cost = 100 obj_path = /obj/item/weapon/spell/projectile/force_missile + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/projectile/force_missile name = "force missile" @@ -12,13 +13,14 @@ cast_methods = CAST_RANGED aspect = ASPECT_FORCE spell_projectile = /obj/item/projectile/force_missile - energy_cost_per_shot = 400 + energy_cost_per_shot = 300 instability_per_shot = 2 - cooldown = 10 + cooldown = 5 + fire_sound = 'sound/weapons/wave.ogg' /obj/item/projectile/force_missile name = "force missile" icon_state = "force_missile" - damage = 20 + damage = 25 damage_type = BRUTE check_armour = "melee" \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/projectile/lightning.dm b/code/game/gamemodes/technomancer/spells/projectile/lightning.dm index 3c77f89b0f..c4b69a923a 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/lightning.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/lightning.dm @@ -5,6 +5,7 @@ strike." cost = 150 obj_path = /obj/item/weapon/spell/projectile/lightning + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/projectile/lightning name = "lightning strike" @@ -16,7 +17,8 @@ energy_cost_per_shot = 2500 instability_per_shot = 10 cooldown = 20 - pre_shot_delay = 20 + pre_shot_delay = 10 + fire_sound = 'sound/weapons/gauss_shoot.ogg' /obj/item/projectile/beam/lightning name = "lightning" diff --git a/code/game/gamemodes/technomancer/spells/projectile/overload.dm b/code/game/gamemodes/technomancer/spells/projectile/overload.dm index 9b3964503a..e6f0c898e2 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/overload.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/overload.dm @@ -4,6 +4,7 @@ This energy pierces all known armor." cost = 150 obj_path = /obj/item/weapon/spell/projectile/overload + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/projectile/overload name = "overload" @@ -13,9 +14,10 @@ aspect = ASPECT_UNSTABLE spell_projectile = /obj/item/projectile/overload energy_cost_per_shot = 0 // Handled later - instability_per_shot = 15 + instability_per_shot = 12 cooldown = 10 pre_shot_delay = 4 + fire_sound = 'sound/effects/supermatter.ogg' /obj/item/projectile/overload name = "overloaded bolt" @@ -25,15 +27,15 @@ armor_penetration = 100 /obj/item/weapon/spell/projectile/overload/on_ranged_cast(atom/hit_atom, mob/living/user) - energy_cost_per_shot = round(core.max_energy * 0.15) + energy_cost_per_shot = round(core.max_energy * 0.10) var/energy_before_firing = core.energy if(set_up(hit_atom, user)) var/obj/item/projectile/overload/P = new spell_projectile(get_turf(user)) P.launch(hit_atom) if(check_for_scepter()) - P.damage = round(energy_before_firing * 0.003) // 3% of their current energy pool. + P.damage = round(energy_before_firing * 0.004) // 4% of their current energy pool. else - P.damage = round(energy_before_firing * 0.002) // 2% of their current energy pool. + P.damage = round(energy_before_firing * 0.003) // 3% of their current energy pool. owner.adjust_instability(instability_per_shot) return 1 diff --git a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm index d4e8474aed..69e1efc92f 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm @@ -7,12 +7,15 @@ var/energy_cost_per_shot = 0 var/instability_per_shot = 0 var/pre_shot_delay = 0 + var/fire_sound = null /obj/item/weapon/spell/projectile/on_ranged_cast(atom/hit_atom, mob/living/user) var/turf/T = get_turf(hit_atom) if(set_up(hit_atom, user)) var/obj/item/projectile/new_projectile = new spell_projectile(get_turf(user)) new_projectile.launch(T) + if(fire_sound) + playsound(get_turf(src), fire_sound, 75, 1) owner.adjust_instability(instability_per_shot) return 1 return 0 @@ -23,7 +26,7 @@ if(pre_shot_delay) var/image/target_image = image(icon = 'icons/obj/spells.dmi', loc = get_turf(hit_atom), icon_state = "target") user << target_image - user.Stun(pre_shot_delay) + user.Stun(pre_shot_delay / 10) sleep(pre_shot_delay) qdel(target_image) return 1 diff --git a/code/game/gamemodes/technomancer/spells/radiance.dm b/code/game/gamemodes/technomancer/spells/radiance.dm index b8eb1401f1..9d484ddc5c 100644 --- a/code/game/gamemodes/technomancer/spells/radiance.dm +++ b/code/game/gamemodes/technomancer/spells/radiance.dm @@ -3,6 +3,7 @@ desc = "Causes you to be very radiant, glowing brightly in visible light, thermal energy, and deadly ionizing radiation." cost = 180 obj_path = /obj/item/weapon/spell/radiance + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/radiance name = "radiance" diff --git a/code/game/gamemodes/technomancer/spells/reflect.dm b/code/game/gamemodes/technomancer/spells/reflect.dm index 6944bd49bc..7a8fa0a4de 100644 --- a/code/game/gamemodes/technomancer/spells/reflect.dm +++ b/code/game/gamemodes/technomancer/spells/reflect.dm @@ -4,6 +4,7 @@ cost = 120 obj_path = /obj/item/weapon/spell/reflect ability_icon_state = "tech_reflect" + category = DEFENSIVE_SPELLS /obj/item/weapon/spell/reflect name = "\proper reflect shield" diff --git a/code/game/gamemodes/technomancer/spells/resurrect.dm b/code/game/gamemodes/technomancer/spells/resurrect.dm index 2aee98bc1e..dcdcbb1f18 100644 --- a/code/game/gamemodes/technomancer/spells/resurrect.dm +++ b/code/game/gamemodes/technomancer/spells/resurrect.dm @@ -6,6 +6,7 @@ cost = 100 obj_path = /obj/item/weapon/spell/resurrect ability_icon_state = "tech_resurrect" + category = SUPPORT_SPELLS /obj/item/weapon/spell/resurrect name = "resurrect" diff --git a/code/game/gamemodes/technomancer/spells/shared_burden.dm b/code/game/gamemodes/technomancer/spells/shared_burden.dm index c7e8e35107..95523d99ff 100644 --- a/code/game/gamemodes/technomancer/spells/shared_burden.dm +++ b/code/game/gamemodes/technomancer/spells/shared_burden.dm @@ -3,6 +3,7 @@ desc = "One of the few functions able to adjust instability, this allows you to take someone else's instability." cost = 50 obj_path = /obj/item/weapon/spell/shared_burden + category = SUPPORT_SPELLS /obj/item/weapon/spell/shared_burden name = "shared burden" diff --git a/code/game/gamemodes/technomancer/spells/shield.dm b/code/game/gamemodes/technomancer/spells/shield.dm index 807ea698a2..330de0ff26 100644 --- a/code/game/gamemodes/technomancer/spells/shield.dm +++ b/code/game/gamemodes/technomancer/spells/shield.dm @@ -5,6 +5,7 @@ cost = 120 obj_path = /obj/item/weapon/spell/shield ability_icon_state = "tech_shield" + category = DEFENSIVE_SPELLS /obj/item/weapon/spell/shield name = "\proper energy shield" diff --git a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm index 627be97e36..ac5e799d72 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm @@ -3,6 +3,7 @@ desc = "Disrupts photons moving in a local area, causing darkness to shroud yourself or a position of your choosing." cost = 30 obj_path = /obj/item/weapon/spell/spawner/darkness + category = UTILITY_SPELLS /obj/item/weapon/spell/spawner/darkness name = "darkness" diff --git a/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm b/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm index 7cf519ddbd..50ed504b40 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm @@ -4,6 +4,7 @@ sure to not be close to the disturbance yourself." cost = 175 obj_path = /obj/item/weapon/spell/spawner/fire_blast + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/spawner/fire_blast name = "fire blast" diff --git a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm index 4704cda8b9..a2c22b0f76 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm @@ -3,6 +3,7 @@ desc = "Emits electronic pulses to destroy, disable, or otherwise harm devices and machines. Be sure to not hit yourself with this." cost = 150 obj_path = /obj/item/weapon/spell/spawner/pulsar + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/spawner/pulsar name = "pulsar" diff --git a/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm b/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm index eac1c67b40..497a8422bd 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm @@ -8,6 +8,7 @@ enhancement_desc = "Summoned entities will never harm their summoner." cost = 200 obj_path = /obj/item/weapon/spell/summon/summon_creature + category = UTILITY_SPELLS /obj/item/weapon/spell/summon/summon_creature name = "summon creature" diff --git a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm index 1bbab4d299..5323c5beda 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm @@ -5,6 +5,7 @@ enhancement_desc = "Wards can detect invisibile entities, and are more specific in relaying information about what it sees." cost = 100 obj_path = /obj/item/weapon/spell/summon/summon_ward + category = UTILITY_SPELLS /obj/item/weapon/spell/summon/summon_ward name = "summon ward" diff --git a/code/game/gamemodes/technomancer/spells/targeting_matrix.dm b/code/game/gamemodes/technomancer/spells/targeting_matrix.dm index a74aab2ff5..aff00f0197 100644 --- a/code/game/gamemodes/technomancer/spells/targeting_matrix.dm +++ b/code/game/gamemodes/technomancer/spells/targeting_matrix.dm @@ -5,6 +5,7 @@ cost = 150 ability_icon_state = "tech_targetingmatrix" obj_path = /obj/item/weapon/spell/targeting_matrix + category = UTILITY_SPELLS /obj/item/weapon/spell/targeting_matrix name = "targeting matrix" diff --git a/code/game/gamemodes/technomancer/spells/track.dm b/code/game/gamemodes/technomancer/spells/track.dm index 90e6518200..166f3f5b43 100644 --- a/code/game/gamemodes/technomancer/spells/track.dm +++ b/code/game/gamemodes/technomancer/spells/track.dm @@ -3,9 +3,10 @@ desc = "Acts as directional guidance towards an object that belongs to you or your team. It can also point towards your allies. \ Wonderful if you're worried someone will steal your valuables, like a certain shiny Scepter..." enhancement_desc = "You will be able to track most other entities in addition to your belongings and allies." - cost = 30 + cost = 25 obj_path = /obj/item/weapon/spell/track ability_icon_state = "tech_track" + category = UTILITY_SPELLS // This stores a ref to all important items that belong to a Technomancer, in case of theft. Used by the spell below. // I feel dirty for adding yet another global list used by one thing, but the only alternative is to loop through world, and yeahhh. diff --git a/code/game/gamemodes/technomancer/spells/warp_strike.dm b/code/game/gamemodes/technomancer/spells/warp_strike.dm index ffb9749899..a308066ae5 100644 --- a/code/game/gamemodes/technomancer/spells/warp_strike.dm +++ b/code/game/gamemodes/technomancer/spells/warp_strike.dm @@ -4,6 +4,7 @@ cost = 200 obj_path = /obj/item/weapon/spell/warp_strike ability_icon_state = "tech_warpstrike" + category = OFFENSIVE_SPELLS /obj/item/weapon/spell/warp_strike name = "warp strike" diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 13b03e00e6..9abb9dee07 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -23,5 +23,6 @@ config_tag = "autotraitor" antag_tags = list(MODE_AUTOTRAITOR) round_autoantag = 1 - required_players_secret = 1 + required_players_secret = 0 + required_enemies = 0 antag_scaling_coeff = 5 diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 5c2cfed4dd..349f0edb14 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -5,7 +5,7 @@ config_tag = "wizard" votable = 0 required_players = 1 - required_players_secret = 1 + required_players_secret = 3 required_enemies = 1 end_on_antag_death = 0 antag_tags = list(MODE_WIZARD) diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 514d3cf047..c091a599c3 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -1,7 +1,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) /datum/job/captain - title = "Captain" + title = "Station Administrator" flag = CAPTAIN department = "Command" head_position = 1 @@ -11,7 +11,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) spawn_positions = 1 supervisors = "company officials and Corporate Regulations" selection_color = "#1D1D4F" - alt_titles = list("Station Administrator") + alt_titles = list("Site Manager") idtype = /obj/item/weapon/card/id/gold req_admin_notify = 1 access = list() //See get_access() @@ -69,7 +69,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "the captain" + supervisors = "the station administrator" selection_color = "#2F2F7F" idtype = /obj/item/weapon/card/id/silver alt_titles = list("Crew Resources Officer") diff --git a/code/game/jobs/job/captain_vr.dm b/code/game/jobs/job/captain_vr.dm deleted file mode 100644 index 4840f04ecb..0000000000 --- a/code/game/jobs/job/captain_vr.dm +++ /dev/null @@ -1,3 +0,0 @@ -/datum/job/captain // Because Polaris's change of the title "Captain" to "Station Administrator" is stupid. - title = "Captain" - alt_titles = list("Overseer") \ No newline at end of file diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 6b2a40a8aa..b617c65da9 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -105,6 +105,7 @@ economic_modifier = 5 access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) + alt_titles = list("Supply Chief") ideal_character_age = 40 @@ -136,7 +137,6 @@ access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station) minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) - equip(var/mob/living/carbon/human/H) if(!H) return 0 H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear) @@ -201,7 +201,7 @@ idtype = /obj/item/weapon/card/id/civilian access = list(access_janitor, access_maint_tunnels) minimal_access = list(access_janitor, access_maint_tunnels) - alt_titles = list("Custodian") + alt_titles = list("Custodian", "Sanitation Technician") equip(var/mob/living/carbon/human/H) @@ -228,7 +228,7 @@ idtype = /obj/item/weapon/card/id/civilian access = list(access_library, access_maint_tunnels) minimal_access = list(access_library) - alt_titles = list("Journalist") + alt_titles = list("Journalist", "Professor", "Historian") equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 1a9351496e..53c642b816 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -7,7 +7,7 @@ faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "the captain" + supervisors = "the station administrator" selection_color = "#7F6E2C" idtype = /obj/item/weapon/card/id/engineering/head req_admin_notify = 1 diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 4a58377fc7..69a94f0ade 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -7,7 +7,7 @@ faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "the captain" + supervisors = "the station administrator" selection_color = "#026865" idtype = /obj/item/weapon/card/id/medical/head req_admin_notify = 1 diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 7055aa7cb3..891ecc2715 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -7,7 +7,7 @@ faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "the captain" + supervisors = "the station administrator" selection_color = "#AD6BAD" idtype = /obj/item/weapon/card/id/science/head req_admin_notify = 1 @@ -20,6 +20,7 @@ access_tox_storage, access_teleporter, access_sec_doors, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch) + alt_titles = list("Research Supervisor") minimum_character_age = 25 minimal_player_age = 14 diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 04adecc322..071c1cbf1b 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -7,7 +7,7 @@ faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "the captain" + supervisors = "the station administrator" selection_color = "#8E2929" idtype = /obj/item/weapon/card/id/security/head req_admin_notify = 1 @@ -20,6 +20,7 @@ access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting, access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) + alt_titles = list("Commander") minimum_character_age = 25 minimal_player_age = 14 diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index b6c6ad3ce9..85d4c2695a 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -442,9 +442,9 @@ var/global/datum/controller/occupations/job_master return H.Robotize() if("AI") return H - if("Captain") + if("Station Administrator") var/sound/announce_sound = (ticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20) - captain_announcement.Announce("All hands, Captain [H.real_name] on deck!", new_sound=announce_sound) + captain_announcement.Announce("All hands, [alt_title ? alt_title : "Station Administrator"] [H.real_name] on deck!", new_sound=announce_sound) //Deferred item spawning. if(spawn_in_storage && spawn_in_storage.len) diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index 35026659dd..61324580ff 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -51,7 +51,7 @@ var/list/assistant_occupations = list( var/list/command_positions = list( - "Captain", + "Station Administrator", "Head of Personnel", "Head of Security", "Chief Engineer", diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index ac736ddfe2..c59c67c300 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -1,5 +1,4 @@ /obj/machinery/bluespace_beacon - icon = 'icons/obj/objects.dmi' icon_state = "floor_beaconf" name = "Bluespace Gigabeacon" @@ -11,45 +10,42 @@ idle_power_usage = 0 var/obj/item/device/radio/beacon/Beacon - New() - ..() - var/turf/T = loc +/obj/machinery/bluespace_beacon/New() + ..() + var/turf/T = src.loc + Beacon = new /obj/item/device/radio/beacon + Beacon.invisibility = INVISIBILITY_MAXIMUM + Beacon.loc = T + + hide(!T.is_plating()) + +/obj/machinery/bluespace_beacon/Destroy() + if(Beacon) + qdel(Beacon) + ..() + +// update the invisibility and icon +/obj/machinery/bluespace_beacon/hide(var/intact) + invisibility = intact ? 101 : 0 + updateicon() + +// update the icon_state +/obj/machinery/bluespace_beacon/proc/updateicon() + var/state="floor_beacon" + + if(invisibility) + icon_state = "[state]f" + else + icon_state = "[state]" + +/obj/machinery/bluespace_beacon/process() + if(!Beacon) + var/turf/T = src.loc Beacon = new /obj/item/device/radio/beacon Beacon.invisibility = INVISIBILITY_MAXIMUM Beacon.loc = T + if(Beacon) + if(Beacon.loc != src.loc) + Beacon.loc = src.loc - hide(!T.is_plating()) - - Destroy() - if(Beacon) - qdel(Beacon) - ..() - - // update the invisibility and icon - hide(var/intact) - invisibility = intact ? 101 : 0 - updateicon() - - // update the icon_state - proc/updateicon() - var/state="floor_beacon" - - if(invisibility) - icon_state = "[state]f" - - else - icon_state = "[state]" - - process() - if(!Beacon) - var/turf/T = loc - Beacon = new /obj/item/device/radio/beacon - Beacon.invisibility = INVISIBILITY_MAXIMUM - Beacon.loc = T - if(Beacon) - if(Beacon.loc != loc) - Beacon.loc = loc - - updateicon() - - + updateicon() \ No newline at end of file diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index 277742a22b..a5625e9253 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -1,6 +1,5 @@ /obj/machinery/cablelayer name = "automatic cable layer" - icon = 'icons/obj/stationobjs.dmi' icon_state = "pipe_d" density = 1 @@ -42,7 +41,7 @@ m = min(m, cable.amount) m = min(m, 30) if(m) - playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) use_cable(m) var/obj/item/stack/cable_coil/CC = new (get_turf(src)) CC.amount = m diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 8f0a0535b1..ba083031e7 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -10,41 +10,39 @@ active_power_usage = 5 var/mob/living/carbon/human/victim = null var/strapped = 0.0 - var/obj/machinery/computer/operating/computer = null /obj/machinery/optable/New() ..() for(dir in list(NORTH,EAST,SOUTH,WEST)) computer = locate(/obj/machinery/computer/operating, get_step(src, dir)) - if (computer) + if(computer) computer.table = src break // spawn(100) //Wont the MC just call this process() before and at the 10 second mark anyway? // process() /obj/machinery/optable/ex_act(severity) - switch(severity) if(1.0) //SN src = null qdel(src) return if(2.0) - if (prob(50)) + if(prob(50)) //SN src = null qdel(src) return if(3.0) - if (prob(25)) - src.density = 0 + if(prob(25)) + density = 0 else return /obj/machinery/optable/attack_hand(mob/user as mob) - if (HULK in usr.mutations) + if(HULK in usr.mutations) visible_message("\The [usr] destroys \the [src]!") - src.density = 0 + density = 0 qdel(src) return @@ -56,13 +54,12 @@ else return 0 - /obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob) - if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O)) + if((!(istype(O, /obj/item/weapon)) || user.get_active_hand() != O)) return user.drop_item() - if (O.loc != src.loc) + if(O.loc != src.loc) step(O, get_dir(O, src)) return @@ -70,10 +67,10 @@ if(locate(/mob/living/carbon/human, src.loc)) var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, src.loc) if(M.lying) - src.victim = M + victim = M icon_state = M.pulse ? "table2-active" : "table2-idle" return 1 - src.victim = null + victim = null icon_state = "table2-idle" return 0 @@ -81,21 +78,21 @@ check_victim() /obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob) - if (C == user) + if(C == user) user.visible_message("[user] climbs on \the [src].","You climb on \the [src].") else visible_message("\The [C] has been laid on \the [src] by [user].", 3) - if (C.client) + if(C.client) C.client.perspective = EYE_PERSPECTIVE C.client.eye = src C.resting = 1 C.loc = src.loc for(var/obj/O in src) O.loc = src.loc - src.add_fingerprint(user) + add_fingerprint(user) if(ishuman(C)) var/mob/living/carbon/human/H = C - src.victim = H + victim = H icon_state = H.pulse ? "table2-active" : "table2-idle" else icon_state = "table2-idle" @@ -121,7 +118,7 @@ take_victim(usr,usr) /obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob) - if (istype(W, /obj/item/weapon/grab)) + if(istype(W, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = W if(iscarbon(G.affecting) && check_table(G.affecting)) take_victim(G.affecting,usr) @@ -130,10 +127,10 @@ /obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob) check_victim() - if(src.victim && get_turf(victim) == get_turf(src) && victim.lying) + if(victim && get_turf(victim) == get_turf(src) && victim.lying) usr << "\The [src] is already occupied!" return 0 if(patient.buckled) usr << "Unbuckle \the [patient] first!" return 0 - return 1 + return 1 \ No newline at end of file diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index c0ef428f99..7193a7907b 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -2,7 +2,7 @@ name = "Sleeper Console" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "sleeperconsole" - var/obj/machinery/sleeper/connected = null + var/obj/machinery/sleeper/sleeper anchored = 1 //About time someone fixed this. density = 0 dir = 8 @@ -11,21 +11,19 @@ interact_offline = 1 circuit = /obj/item/weapon/circuitboard/sleeper_console -//obj/machinery/sleep_console/New() - //..() - //spawn( 5 ) - //src.connected = locate(/obj/machinery/sleeper, get_step(src, WEST)) //We assume dir = 8 so sleeper is WEST. Other sprites do exist. - //return - //return - /obj/machinery/sleep_console/New() ..() - spawn(5) - //src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir)) - src.connected = locate(/obj/machinery/sleeper) in range(2,src) - return - return + findsleeper() +/obj/machinery/sleep_console/proc/findsleeper() + spawn(5) + var/obj/machinery/sleeper/sleepernew = null + for(dir in list(NORTH, EAST, SOUTH, WEST)) // Loop through every direction + sleepernew = locate(/obj/machinery/sleeper, get_step(src, dir)) // Try to find a scanner in that direction + if(sleepernew) + sleeper = sleepernew + sleepernew.console = src + return /obj/machinery/sleep_console/attack_ai(var/mob/user) return attack_hand(user) @@ -33,39 +31,25 @@ /obj/machinery/sleep_console/attack_hand(var/mob/user) if(..()) return 1 - if(connected) - connected.ui_interact(user) + + if(sleeper.panel_open) + user << "Close the maintenance panel first." + return + + if(!sleeper) + findsleeper() + if(sleeper) + return sleeper.ui_interact(user) + else if(sleeper) + return sleeper.ui_interact(user) + else + user << "Sleeper not found!" /obj/machinery/sleep_console/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/screwdriver) && circuit) - user << "You start disconnecting the monitor." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.circuit = M - A.anchored = 1 - A.density = 1 - A.frame_type = M.board_type - for (var/obj/C in src) - C.forceMove(loc) - if (src.stat & BROKEN) - user << "The broken glass falls out." - new /obj/item/weapon/material/shard( src.loc ) - A.state = 3 - A.icon_state = "[A.frame_type]_3" - else - user << "You disconnect the monitor." - A.state = 4 - A.icon_state = "[A.frame_type]_4" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - A.dir = dir - M.deconstruct(src) - qdel(src) + if(computer_deconstruction_screwdriver(user, I)) + return else - src.attack_hand(user) - return + return attack_hand(user) /obj/machinery/sleep_console/power_change() ..() @@ -86,6 +70,7 @@ var/list/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin") var/obj/item/weapon/reagent_containers/glass/beaker = null var/filtering = 0 + var/obj/machinery/sleep_console/console use_power = 1 idle_power_usage = 15 @@ -94,7 +79,6 @@ /obj/machinery/sleeper/New() ..() beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) @@ -105,13 +89,6 @@ component_parts += new /obj/item/weapon/reagent_containers/syringe(src) component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) - spawn(5) - //src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir)) - var/obj/machinery/sleep_console/C = locate(/obj/machinery/sleep_console) in range(2,src) - if(C) - C.connected = src - return - RefreshParts() /obj/machinery/sleeper/initialize() @@ -208,12 +185,12 @@ return 1 /obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user) + add_fingerprint(user) if(default_deconstruction_screwdriver(user, I)) return - if(default_deconstruction_crowbar(user, I)) + else if(default_deconstruction_crowbar(user, I)) return - add_fingerprint(user) - if(istype(I, /obj/item/weapon/reagent_containers/glass)) + else if(istype(I, /obj/item/weapon/reagent_containers/glass)) if(!beaker) beaker = I user.drop_item() @@ -283,21 +260,21 @@ if(occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE - occupant.loc = loc + occupant.loc = src.loc occupant = null for(var/atom/movable/A in src) // In case an object was dropped inside or something if(A == beaker || A == circuit) continue if(A in component_parts) continue - A.loc = loc + A.loc = src.loc update_use_power(1) update_icon() toggle_filter() /obj/machinery/sleeper/proc/remove_beaker() if(beaker) - beaker.loc = loc + beaker.loc = src.loc beaker = null toggle_filter() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 684589fabc..2e7224169f 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -1,6 +1,5 @@ // Pretty much everything here is stolen from the dna scanner FYI - /obj/machinery/bodyscanner var/mob/living/carbon/occupant var/locked @@ -9,25 +8,15 @@ icon_state = "body_scanner_0" density = 1 anchored = 1 - circuit = /obj/item/weapon/circuitboard/body_scanner - use_power = 1 idle_power_usage = 60 active_power_usage = 10000 //10 kW. It's a big all-body scanner. - light_color = "#00FF00" + var/obj/machinery/body_scanconsole/console /obj/machinery/bodyscanner/New() ..() - spawn( 5 ) - var/obj/machinery/body_scanconsole/C = locate(/obj/machinery/body_scanconsole) in range(2,src) - if(C) - C.connected = src - -/obj/machinery/bodyscanner/map/New() - ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) @@ -45,10 +34,9 @@ /obj/machinery/bodyscanner/attackby(var/obj/item/G, user as mob) if(default_deconstruction_screwdriver(user, G)) return - if(default_deconstruction_crowbar(user, G)) + else if(default_deconstruction_crowbar(user, G)) return - - if(istype(G, /obj/item/weapon/grab)) + else if(istype(G, /obj/item/weapon/grab)) var/obj/item/weapon/grab/H = G if(panel_open) user << "Close the maintenance panel first." @@ -126,14 +114,14 @@ add_fingerprint(usr) /obj/machinery/bodyscanner/proc/go_out() - if ((!( src.occupant ) || src.locked)) + if ((!(occupant) || src.locked)) return - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "body_scanner_0" + if (occupant.client) + occupant.client.eye = occupant.client.mob + occupant.client.perspective = MOB_PERSPECTIVE + occupant.loc = src.loc + occupant = null + icon_state = "body_scanner_0" return /obj/machinery/bodyscanner/ex_act(severity) @@ -169,7 +157,7 @@ //Body Scan Console /obj/machinery/body_scanconsole - var/obj/machinery/bodyscanner/connected + var/obj/machinery/bodyscanner/scanner var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking) var/delete var/temphtml @@ -188,35 +176,22 @@ findscanner() /obj/machinery/body_scanconsole/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/screwdriver) && circuit) - user << "You start disconnecting the monitor." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.circuit = M - A.anchored = 1 - A.density = 1 - A.frame_type = M.board_type - for (var/obj/C in src) - C.forceMove(loc) - if (src.stat & BROKEN) - user << "The broken glass falls out." - new /obj/item/weapon/material/shard( src.loc ) - A.state = 3 - A.icon_state = "[A.frame_type]_3" - else - user << "You disconnect the monitor." - A.state = 4 - A.icon_state = "[A.frame_type]_4" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - A.dir = dir - M.deconstruct(src) - qdel(src) + if(computer_deconstruction_screwdriver(user, I)) + return + else if(istype(I, /obj/item/device/multitool)) //Did you want to link it? + var/obj/item/device/multitool/P = I + if(P.connectable) + if(istype(P.connectable, /obj/machinery/bodyscanner)) + var/obj/machinery/bodyscanner/C = P.connectable + scanner = C + C.console = src + user << " You link the [src] to the [P.connectable]!" + else + user << " You store the [src] in the [P]'s buffer!" + P.connectable = src + return else - src.attack_hand(user) - return + return attack_hand(user) /obj/machinery/body_scanconsole/power_change() if(stat & BROKEN) @@ -226,7 +201,7 @@ stat &= ~NOPOWER else spawn(rand(0, 15)) - src.icon_state = "body_scannerconsole-p" + icon_state = "body_scannerconsole-p" stat |= NOPOWER /obj/machinery/body_scanconsole/ex_act(severity) @@ -244,13 +219,14 @@ return /obj/machinery/body_scanconsole/proc/findscanner() - spawn( 5 ) + spawn(5) var/obj/machinery/bodyscanner/bodyscannernew = null // Loop through every direction - for(dir in list(NORTH,EAST,SOUTH,WEST)) - // Try to find a scanner in that direction - bodyscannernew = locate(/obj/machinery/bodyscanner, get_step(src, dir)) - src.connected = bodyscannernew + for(dir in list(NORTH, EAST, SOUTH, WEST)) // Loop through every direction + bodyscannernew = locate(/obj/machinery/bodyscanner, get_step(src, dir)) // Try to find a scanner in that direction + if(bodyscannernew) + scanner = bodyscannernew + bodyscannernew.console = src return /obj/machinery/body_scanconsole/attack_ai(user as mob) @@ -263,26 +239,30 @@ if(stat & (NOPOWER|BROKEN)) return - if (panel_open) + if (scanner.panel_open) user << "Close the maintenance panel first." return - if(!src.connected) + if(!scanner) findscanner() - - ui_interact(user) + if(scanner) + return ui_interact(user) + else if(scanner) + return ui_interact(user) + else + user << "Scanner not found!" /obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] - data["connected"] = connected ? 1 : 0 + data["connected"] = scanner ? 1 : 0 - if(connected) - data["occupied"] = connected.occupant ? 1 : 0 + if(scanner) + data["occupied"] = scanner.occupant ? 1 : 0 var/occupantData[0] - if(connected.occupant && ishuman(connected.occupant)) - var/mob/living/carbon/human/H = connected.occupant + if(scanner.occupant && ishuman(scanner.occupant)) + var/mob/living/carbon/human/H = scanner.occupant occupantData["name"] = H.name occupantData["stat"] = H.stat occupantData["health"] = H.health @@ -387,7 +367,7 @@ occupantData["blind"] = (H.sdisabilities & BLIND) occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED) - occupantData = attempt_vr(connected,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert + occupantData = attempt_vr(scanner,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert data["occupant"] = occupantData ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) @@ -420,8 +400,8 @@ /obj/machinery/body_scanconsole/proc/generate_printing_text() var/dat = "" - if(connected) - var/mob/living/carbon/human/occupant = connected.occupant + if(scanner) + var/mob/living/carbon/human/occupant = scanner.occupant dat = "Occupant Statistics:
" //Blah obvious if(istype(occupant)) //is there REALLY someone in there? var/t1 diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 9d45b14414..0ea5527df2 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -15,7 +15,6 @@ var/cooldown_on = 0 req_access = list(access_ai_upload) - /obj/machinery/ai_slipper/New() ..() update_icon() @@ -25,32 +24,32 @@ update_icon() /obj/machinery/ai_slipper/update_icon() - if (stat & NOPOWER || stat & BROKEN) + if(stat & NOPOWER || stat & BROKEN) icon_state = "motion0" else icon_state = disabled ? "motion0" : "motion3" /obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses) - src.disabled = disabled - src.uses = uses - src.power_change() + disabled = disabled + uses = uses + power_change() /obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user) if(stat & (NOPOWER|BROKEN)) return - if (istype(user, /mob/living/silicon)) - return src.attack_hand(user) + if(istype(user, /mob/living/silicon)) + return attack_hand(user) else // trying to unlock the interface - if (src.allowed(usr)) + if(allowed(usr)) locked = !locked user << "You [ locked ? "lock" : "unlock"] the device." - if (locked) - if (user.machine==src) + if(locked) + if(user.machine==src) user.unset_machine() user << browse(null, "window=ai_slipper") else - if (user.machine==src) - src.attack_hand(usr) + if(user.machine==src) + attack_hand(usr) else user << "Access denied." return @@ -62,8 +61,8 @@ /obj/machinery/ai_slipper/attack_hand(mob/user as mob) if(stat & (NOPOWER|BROKEN)) return - if ( (get_dist(src, user) > 1 )) - if (!istype(user, /mob/living/silicon)) + if((get_dist(src, user) > 1)) + if(!istype(user, /mob/living/silicon)) user << text("Too far away.") user.unset_machine() user << browse(null, "window=ai_slipper") @@ -71,18 +70,18 @@ user.set_machine(src) var/loc = src.loc - if (istype(loc, /turf)) + if(istype(loc, /turf)) loc = loc:loc - if (!istype(loc, /area)) + if(!istype(loc, /area)) user << text("Turret badly positioned - loc.loc is [].", loc) return var/area/area = loc var/t = "AI Liquid Dispenser ([area.name])
" - if(src.locked && (!istype(user, /mob/living/silicon))) + if(locked && (!istype(user, /mob/living/silicon))) t += "(Swipe ID card to unlock control panel.)
" else - t += text("Dispenser [] - []?
\n", src.disabled?"deactivated":"activated", src, src.disabled?"Enable":"Disable") + t += text("Dispenser [] - []?
\n", disabled?"deactivated":"activated", src, disabled?"Enable":"Disable") t += text("Uses Left: [uses]. Activate the dispenser?
\n") user << browse(t, "window=computer;size=575x450") @@ -91,25 +90,25 @@ /obj/machinery/ai_slipper/Topic(href, href_list) ..() - if (src.locked) - if (!istype(usr, /mob/living/silicon)) + if(locked) + if(!istype(usr, /mob/living/silicon)) usr << "Control panel is locked!" return - if (href_list["toggleOn"]) - src.disabled = !src.disabled + if(href_list["toggleOn"]) + disabled = !disabled update_icon() - if (href_list["toggleUse"]) + if(href_list["toggleUse"]) if(cooldown_on || disabled) return else new /obj/effect/effect/foam(src.loc) - src.uses-- + uses-- cooldown_on = 1 cooldown_time = world.timeofday + 100 slip_process() return - src.attack_hand(usr) + attack_hand(usr) return /obj/machinery/ai_slipper/proc/slip_process() @@ -122,9 +121,9 @@ cooldown_timeleft = (ticksleft / 10) sleep(5) - if (uses <= 0) + if(uses <= 0) return - if (uses >= 0) + if(uses >= 0) cooldown_on = 0 - src.power_change() - return + power_change() + return \ No newline at end of file diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 699898fde0..398bac9c54 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -51,10 +51,10 @@ var/rcon_setting = 2 var/rcon_time = 0 var/locked = 1 - var/wiresexposed = 0 // If it's been screwdrivered open. + panel_open = 0 // If it's been screwdrivered open. var/aidisabled = 0 var/shorted = 0 - circuit = /obj/item/weapon/circuitboard/airalarm + circuit = /obj/item/weapon/circuitboard/airalarm var/datum/wires/alarm/wires @@ -112,7 +112,7 @@ /obj/machinery/alarm/proc/first_run() alarm_area = get_area(src) area_uid = alarm_area.uid - if (name == "alarm") + if(name == "alarm") name = "[alarm_area.name] Air Alarm" if(!wires) @@ -123,20 +123,20 @@ TLV["carbon dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa TLV["phoron"] = list(-1.0, -1.0, 0.2, 0.5) // Partial pressure, kpa TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa - TLV["pressure"] = list(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20) /* kpa */ - TLV["temperature"] = list(T0C-26, T0C, T0C+40, T0C+66) // K + TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */ + TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K /obj/machinery/alarm/initialize() set_frequency(frequency) - if (!master_is_operating()) + if(!master_is_operating()) elect_master() /obj/machinery/alarm/process() if((stat & (NOPOWER|BROKEN)) || shorted) return - var/turf/simulated/location = loc + var/turf/simulated/location = src.loc if(!istype(location)) return//returns if loc is not simulated var/datum/gas_mixture/environment = location.return_air() @@ -148,16 +148,16 @@ var/old_pressurelevel = pressure_dangerlevel danger_level = overall_danger_level(environment) - if (old_level != danger_level) + if(old_level != danger_level) apply_danger_level(danger_level) - if (old_pressurelevel != pressure_dangerlevel) - if (breach_detected()) + if(old_pressurelevel != pressure_dangerlevel) + if(breach_detected()) mode = AALARM_MODE_OFF apply_mode() - if (mode==AALARM_MODE_CYCLE && environment.return_pressure() 2.0) update_use_power(2) @@ -184,13 +184,13 @@ "You hear a click and a faint electronic hum.") else //check for when we should stop adjusting temperature - if (get_danger_level(target_temperature, TLV["temperature"]) || abs(environment.temperature - target_temperature) <= 0.5) + if(get_danger_level(target_temperature, TLV["temperature"]) || abs(environment.temperature - target_temperature) <= 0.5) update_use_power(1) regulating_temperature = 0 visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ "You hear a click as a faint electronic humming stops.") - if (regulating_temperature) + if(regulating_temperature) if(target_temperature > T0C + MAX_TEMPERATURE) target_temperature = T0C + MAX_TEMPERATURE @@ -198,11 +198,11 @@ target_temperature = T0C + MIN_TEMPERATURE var/datum/gas_mixture/gas - gas = environment.remove(0.25*environment.total_moles) + gas = environment.remove(0.25 * environment.total_moles) if(gas) - if (gas.temperature <= target_temperature) //gas heating - var/energy_used = min( gas.get_thermal_energy_change(target_temperature) , active_power_usage) + if(gas.temperature <= target_temperature) //gas heating + var/energy_used = min(gas.get_thermal_energy_change(target_temperature) , active_power_usage) gas.add_thermal_energy(energy_used) //use_power(energy_used, ENVIRON) //handle by update_use_power instead @@ -212,7 +212,7 @@ //Assume the heat is being pumped into the hull which is fixed at 20 C //none of this is really proper thermodynamics but whatever - var/cop = gas.temperature/T20C //coefficient of performance -> power used = heat_transfer/cop + var/cop = gas.temperature / T20C //coefficient of performance -> power used = heat_transfer/cop heat_transfer = min(heat_transfer, cop * active_power_usage) //this ensures that we don't use more than active_power_usage amount of power @@ -223,7 +223,7 @@ environment.merge(gas) /obj/machinery/alarm/proc/overall_danger_level(var/datum/gas_mixture/environment) - var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume + var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature/environment.volume var/environment_pressure = environment.return_pressure() var/other_moles = 0 @@ -248,7 +248,7 @@ // Returns whether this air alarm thinks there is a breach, given the sensors that are available to it. /obj/machinery/alarm/proc/breach_detected() - var/turf/simulated/location = loc + var/turf/simulated/location = src.loc if(!istype(location)) return 0 @@ -260,20 +260,18 @@ var/environment_pressure = environment.return_pressure() var/pressure_levels = TLV["pressure"] - if (environment_pressure <= pressure_levels[1]) //low pressures - if (!(mode == AALARM_MODE_PANIC || mode == AALARM_MODE_CYCLE)) + if(environment_pressure <= pressure_levels[1]) //low pressures + if(!(mode == AALARM_MODE_PANIC || mode == AALARM_MODE_CYCLE)) return 1 return 0 - /obj/machinery/alarm/proc/master_is_operating() - return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN)) - + return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER | BROKEN)) /obj/machinery/alarm/proc/elect_master() - for (var/obj/machinery/alarm/AA in alarm_area) - if (!(AA.stat & (NOPOWER|BROKEN))) + for(var/obj/machinery/alarm/AA in alarm_area) + if(!(AA.stat & (NOPOWER|BROKEN))) alarm_area.master_air_alarm = AA return 1 return 0 @@ -286,7 +284,7 @@ return 0 /obj/machinery/alarm/update_icon() - if(wiresexposed) + if(panel_open) icon_state = "alarmx" set_light(0) return @@ -296,18 +294,18 @@ return var/icon_level = danger_level - if (alarm_area.atmosalm) + if(alarm_area.atmosalm) icon_level = max(icon_level, 1) //if there's an atmos alarm but everything is okay locally, no need to go past yellow var/new_color = null switch(icon_level) - if (0) + if(0) icon_state = "alarm0" new_color = "#03A728" - if (1) + if(1) icon_state = "alarm2" //yes, alarm2 is yellow alarm new_color = "#EC8B2F" - if (2) + if(2) icon_state = "alarm1" new_color = "#DA0205" @@ -316,20 +314,20 @@ /obj/machinery/alarm/receive_signal(datum/signal/signal) if(stat & (NOPOWER|BROKEN)) return - if (alarm_area.master_air_alarm != src) - if (master_is_operating()) + if(alarm_area.master_air_alarm != src) + if(master_is_operating()) return elect_master() - if (alarm_area.master_air_alarm != src) + if(alarm_area.master_air_alarm != src) return if(!signal || signal.encryption) return var/id_tag = signal.data["tag"] - if (!id_tag) + if(!id_tag) return - if (signal.data["area"] != area_uid) + if(signal.data["area"] != area_uid) return - if (signal.data["sigtype"] != "status") + if(signal.data["sigtype"] != "status") return var/dev_type = signal.data["device"] @@ -342,28 +340,28 @@ /obj/machinery/alarm/proc/register_env_machine(var/m_id, var/device_type) var/new_name - if (device_type=="AVP") + if(device_type == "AVP") new_name = "[alarm_area.name] Vent Pump #[alarm_area.air_vent_names.len+1]" alarm_area.air_vent_names[m_id] = new_name - else if (device_type=="AScr") + else if(device_type == "AScr") new_name = "[alarm_area.name] Air Scrubber #[alarm_area.air_scrub_names.len+1]" alarm_area.air_scrub_names[m_id] = new_name else return - spawn (10) - send_signal(m_id, list("init" = new_name) ) + spawn(10) + send_signal(m_id, list("init" = new_name)) /obj/machinery/alarm/proc/refresh_all() for(var/id_tag in alarm_area.air_vent_names) var/list/I = alarm_area.air_vent_info[id_tag] - if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time) + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) continue - send_signal(id_tag, list("status") ) + send_signal(id_tag, list("status")) for(var/id_tag in alarm_area.air_scrub_names) var/list/I = alarm_area.air_scrub_info[id_tag] - if (I && I["timestamp"]+AALARM_REPORT_TIMEOUT/2 > world.time) + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) continue - send_signal(id_tag, list("status") ) + send_signal(id_tag, list("status")) /obj/machinery/alarm/proc/set_frequency(new_frequency) radio_controller.remove_object(src, frequency) @@ -390,42 +388,42 @@ /obj/machinery/alarm/proc/apply_mode() //propagate mode to other air alarms in the area //TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area - for (var/obj/machinery/alarm/AA in alarm_area) + for(var/obj/machinery/alarm/AA in alarm_area) AA.mode = mode switch(mode) if(AALARM_MODE_SCRUBBING) for(var/device_id in alarm_area.air_scrub_names) - send_signal(device_id, list("power"= 1, "co2_scrub"= 1, "scrubbing"= 1, "panic_siphon"= 0) ) + send_signal(device_id, list("power"= 1, "co2_scrub"= 1, "scrubbing"= 1, "panic_siphon"= 0)) for(var/device_id in alarm_area.air_vent_names) - send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default") ) + send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default")) if(AALARM_MODE_PANIC, AALARM_MODE_CYCLE) for(var/device_id in alarm_area.air_scrub_names) - send_signal(device_id, list("power"= 1, "panic_siphon"= 1) ) + send_signal(device_id, list("power"= 1, "panic_siphon"= 1)) for(var/device_id in alarm_area.air_vent_names) - send_signal(device_id, list("power"= 0) ) + send_signal(device_id, list("power"= 0)) if(AALARM_MODE_REPLACEMENT) for(var/device_id in alarm_area.air_scrub_names) - send_signal(device_id, list("power"= 1, "panic_siphon"= 1) ) + send_signal(device_id, list("power"= 1, "panic_siphon"= 1)) for(var/device_id in alarm_area.air_vent_names) - send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default") ) + send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default")) if(AALARM_MODE_FILL) for(var/device_id in alarm_area.air_scrub_names) - send_signal(device_id, list("power"= 0) ) + send_signal(device_id, list("power"= 0)) for(var/device_id in alarm_area.air_vent_names) - send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default") ) + send_signal(device_id, list("power"= 1, "checks"= "default", "set_external_pressure"= "default")) if(AALARM_MODE_OFF) for(var/device_id in alarm_area.air_scrub_names) - send_signal(device_id, list("power"= 0) ) + send_signal(device_id, list("power"= 0)) for(var/device_id in alarm_area.air_vent_names) - send_signal(device_id, list("power"= 0) ) + send_signal(device_id, list("power"= 0)) /obj/machinery/alarm/proc/apply_danger_level(var/new_danger_level) - if (report_danger_level && alarm_area.atmosalert(new_danger_level, src)) + if(report_danger_level && alarm_area.atmosalert(new_danger_level, src)) post_alert(new_danger_level) update_icon() @@ -443,9 +441,9 @@ if(alert_level==2) alert_signal.data["alert"] = "severe" - else if (alert_level==1) + else if(alert_level==1) alert_signal.data["alert"] = "minor" - else if (alert_level==0) + else if(alert_level==0) alert_signal.data["alert"] = "clear" frequency.post_signal(src, alert_signal) @@ -455,7 +453,7 @@ /obj/machinery/alarm/attack_hand(mob/user) . = ..() - if (.) + if(.) return return interact(user) @@ -485,7 +483,7 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) - ui = new(user, src, ui_key, "air_alarm.tmpl", src.name, 325, 625, master_ui = master_ui, state = state) + ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state) ui.set_initial_data(data) ui.open() ui.set_auto_update(1) @@ -570,7 +568,7 @@ "carbon dioxide" = "CO2", "phoron" = "Toxin", "other" = "Other") - for (var/g in gas_names) + for(var/g in gas_names) thresholds[++thresholds.len] = list("name" = gas_names[g], "settings" = list()) selected = TLV[g] for(var/i = 1, i <= 4, i++) @@ -586,7 +584,6 @@ for(var/i = 1, i <= 4, i++) thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = i, "selected" = selected[i])) - data["thresholds"] = thresholds /obj/machinery/alarm/CanUseTopic(var/mob/user, var/datum/topic_state/state, var/href_list = list()) @@ -660,7 +657,7 @@ "panic_siphon", "scrubbing") - send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) ) + send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]))) return 1 if("set_threshold") @@ -668,16 +665,16 @@ var/threshold = text2num(href_list["var"]) var/list/selected = TLV[env] var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound") - var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num - if (isnull(newval)) + var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null | num + if(isnull(newval)) return 1 - if (newval<0) + if(newval<0) selected[threshold] = -1.0 - else if (env=="temperature" && newval>5000) + else if(env=="temperature" && newval>5000) selected[threshold] = 5000 - else if (env=="pressure" && newval>50*ONE_ATMOSPHERE) + else if(env=="pressure" && newval>50*ONE_ATMOSPHERE) selected[threshold] = 50*ONE_ATMOSPHERE - else if (env!="temperature" && env!="pressure" && newval>200) + else if(env!="temperature" && env!="pressure" && newval>200) selected[threshold] = 200 else newval = round(newval,0.01) @@ -727,13 +724,13 @@ return 1 if(href_list["atmos_alarm"]) - if (alarm_area.atmosalert(2, src)) + if(alarm_area.atmosalert(2, src)) apply_danger_level(2) update_icon() return 1 if(href_list["atmos_reset"]) - if (alarm_area.atmosalert(0, src)) + if(alarm_area.atmosalert(0, src)) apply_danger_level(0) update_icon() return 1 @@ -744,35 +741,13 @@ return 1 /obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob) - src.add_fingerprint(user) - if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up. - //user << "You pop the Air Alarm's maintence panel open." - wiresexposed = !wiresexposed - user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]" - update_icon() + add_fingerprint(user) + if(alarm_deconstruction_screwdriver(user, W)) + return + if(alarm_deconstruction_wirecutters(user, W)) return - if (wiresexposed && istype(W, /obj/item/weapon/wirecutters)) - user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - new/obj/item/stack/cable_coil(get_turf(src), 5) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.frame_type = "airalarm" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - A.set_dir(dir) - A.circuit = M - A.anchored = 1 - for (var/obj/C in src) - C.forceMove(loc) - A.state = 2 - A.icon_state = "airalarm_2" - M.deconstruct(src) - qdel(src) - return - - if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card + if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card if(stat & (NOPOWER|BROKEN)) user << "It does nothing" return @@ -822,14 +797,14 @@ FIRE ALARM active_power_usage = 6 power_channel = ENVIRON var/last_process = 0 - var/wiresexposed = 0 + panel_open = 0 var/seclevel - circuit = /obj/item/weapon/circuitboard/firealarm + circuit = /obj/item/weapon/circuitboard/firealarm /obj/machinery/firealarm/update_icon() overlays.Cut() - if(wiresexposed) + if(panel_open) set_light(0) return @@ -840,7 +815,7 @@ FIRE ALARM icon_state = "firep" set_light(0) else - if(!src.detecting) + if(!detecting) icon_state = "fire1" set_light(l_range = 4, l_power = 2, l_color = "#ff0000") else @@ -851,79 +826,56 @@ FIRE ALARM if("red") set_light(l_range = 4, l_power = 2, l_color = "#ff0000") if("delta") set_light(l_range = 4, l_power = 2, l_color = "#FF6633") - src.overlays += image('icons/obj/monitors.dmi', "overlay_[seclevel]") + overlays += image('icons/obj/monitors.dmi', "overlay_[seclevel]") /obj/machinery/firealarm/fire_act(datum/gas_mixture/air, temperature, volume) - if(src.detecting) - if(temperature > T0C+200) - src.alarm() // added check of detector status here + if(detecting) + if(temperature > T0C + 200) + alarm() // added check of detector status here return /obj/machinery/firealarm/attack_ai(mob/user as mob) - return src.attack_hand(user) + return attack_hand(user) /obj/machinery/firealarm/bullet_act() - return src.alarm() + return alarm() /obj/machinery/firealarm/emp_act(severity) - if(prob(50/severity)) - alarm(rand(30/severity, 60/severity)) + if(prob(50 / severity)) + alarm(rand(30 / severity, 60 / severity)) ..() /obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob) - src.add_fingerprint(user) + add_fingerprint(user) - if (istype(W, /obj/item/weapon/screwdriver)) - wiresexposed = !wiresexposed - update_icon() - return - - if(wiresexposed) - if (istype(W, /obj/item/device/multitool)) - src.detecting = !( src.detecting ) - if (src.detecting) + if(panel_open) + if(istype(W, /obj/item/device/multitool)) + detecting = !(detecting) + if(detecting) user.visible_message("\The [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.") else user.visible_message("\The [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.") - else if (istype(W, /obj/item/weapon/wirecutters)) - user.visible_message("\The [user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") - new/obj/item/stack/cable_coil(get_turf(src), 5) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.frame_type = "firealarm" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - A.set_dir(dir) - A.circuit = M - A.anchored = 1 - for (var/obj/C in src) - C.forceMove(loc) - A.state = 2 - A.icon_state = "firealarm_2" - M.deconstruct(src) - qdel(src) return - src.alarm() + alarm() return /obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed if(stat & (NOPOWER|BROKEN)) return - if(src.timing) - if(src.time > 0) - src.time = src.time - ((world.timeofday - last_process)/10) + if(timing) + if(time > 0) + time = time - ((world.timeofday - last_process) / 10) else - src.alarm() - src.time = 0 - src.timing = 0 + alarm() + time = 0 + timing = 0 processing_objects.Remove(src) - src.updateDialog() + updateDialog() last_process = world.timeofday - if(locate(/obj/fire) in loc) + if(locate(/obj/fire) in src.loc) alarm() return @@ -934,41 +886,41 @@ FIRE ALARM update_icon() /obj/machinery/firealarm/attack_hand(mob/user as mob) - if(user.stat || stat & (NOPOWER|BROKEN)) + if(user.stat || stat & (NOPOWER | BROKEN)) return user.set_machine(src) var/area/A = src.loc var/d1 var/d2 - if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon)) + if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon)) A = A.loc - if (A.fire) + if(A.fire) d1 = text("Reset - Lockdown", src) else d1 = text("Alarm - Lockdown", src) - if (src.timing) + if(timing) d2 = text("Stop Time Lock", src) else d2 = text("Initiate Time Lock", src) - var/second = round(src.time) % 60 - var/minute = (round(src.time) - second) / 60 + var/second = round(time) % 60 + var/minute = (round(time) - second) / 60 var/dat = "Fire alarm [d1]\n
The current alert level is: [get_security_level()]

\nTimer System: [d2]
\nTime Left: [(minute ? "[minute]:" : null)][second] - - + +\n
" user << browse(dat, "window=firealarm") onclose(user, "firealarm") else A = A.loc - if (A.fire) + if(A.fire) d1 = text("[]", src, stars("Reset - Lockdown")) else d1 = text("[]", src, stars("Alarm - Lockdown")) - if (src.timing) + if(timing) d2 = text("[]", src, stars("Stop Time Lock")) else d2 = text("[]", src, stars("Initiate Time Lock")) - var/second = round(src.time) % 60 - var/minute = (round(src.time) - second) / 60 + var/second = round(time) % 60 + var/minute = (round(time) - second) / 60 var/dat = "[stars("Fire alarm")] [d1]\n
The current alert level is: [stars(get_security_level())]

\nTimer System: [d2]
\nTime Left: [(minute ? text("[]:", minute) : null)][second] - - + +\n
" user << browse(dat, "window=firealarm") onclose(user, "firealarm") @@ -976,43 +928,43 @@ FIRE ALARM /obj/machinery/firealarm/Topic(href, href_list) ..() - if (usr.stat || stat & (BROKEN|NOPOWER)) + if(usr.stat || stat & (BROKEN | NOPOWER)) return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) usr.set_machine(src) - if (href_list["reset"]) - src.reset() - else if (href_list["alarm"]) - src.alarm() - else if (href_list["time"]) - src.timing = text2num(href_list["time"]) + if(href_list["reset"]) + reset() + else if(href_list["alarm"]) + alarm() + else if(href_list["time"]) + timing = text2num(href_list["time"]) last_process = world.timeofday processing_objects.Add(src) - else if (href_list["tp"]) + else if(href_list["tp"]) var/tp = text2num(href_list["tp"]) - src.time += tp - src.time = min(max(round(src.time), 0), 120) + time += tp + time = min(max(round(time), 0), 120) - src.updateUsrDialog() + updateUsrDialog() - src.add_fingerprint(usr) + add_fingerprint(usr) else usr << browse(null, "window=firealarm") return return /obj/machinery/firealarm/proc/reset() - if (!( src.working )) + if(!(working)) return var/area/area = get_area(src) for(var/obj/machinery/firealarm/FA in area) - fire_alarm.clearAlarm(loc, FA) + fire_alarm.clearAlarm(src.loc, FA) update_icon() return /obj/machinery/firealarm/proc/alarm(var/duration = 0) - if (!( src.working)) + if(!(working)) return var/area/area = get_area(src) for(var/obj/machinery/firealarm/FA in area) @@ -1066,13 +1018,13 @@ Just a object used in constructing fire alarms ASSERT(isarea(A)) var/d1 var/d2 - if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) + if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) - if (A.party) + if(A.party) d1 = text("No Party :(", src) else d1 = text("PARTY!!!", src) - if (timing) + if(timing) d2 = text("Stop Time Lock", src) else d2 = text("Initiate Time Lock", src) @@ -1082,11 +1034,11 @@ Just a object used in constructing fire alarms user << browse(dat, "window=partyalarm") onclose(user, "partyalarm") else - if (A.fire) + if(A.fire) d1 = text("[]", src, stars("No Party :(")) else d1 = text("[]", src, stars("PARTY!!!")) - if (timing) + if(timing) d2 = text("[]", src, stars("Stop Time Lock")) else d2 = text("[]", src, stars("Initiate Time Lock")) @@ -1098,7 +1050,7 @@ Just a object used in constructing fire alarms return /obj/machinery/partyalarm/proc/reset() - if (!( working )) + if(!(working)) return var/area/A = get_area(src) ASSERT(isarea(A)) @@ -1106,7 +1058,7 @@ Just a object used in constructing fire alarms return /obj/machinery/partyalarm/proc/alarm() - if (!( working )) + if(!(working)) return var/area/A = get_area(src) ASSERT(isarea(A)) @@ -1115,23 +1067,20 @@ Just a object used in constructing fire alarms /obj/machinery/partyalarm/Topic(href, href_list) ..() - if (usr.stat || stat & (BROKEN|NOPOWER)) + if(usr.stat || stat & (BROKEN|NOPOWER)) return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) + if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) usr.machine = src - if (href_list["reset"]) + if(href_list["reset"]) reset() - else - if (href_list["alarm"]) - alarm() - else - if (href_list["time"]) - timing = text2num(href_list["time"]) - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - time += tp - time = min(max(round(time), 0), 120) + else if(href_list["alarm"]) + alarm() + else if(href_list["time"]) + timing = text2num(href_list["time"]) + else if(href_list["tp"]) + var/tp = text2num(href_list["tp"]) + time += tp + time = min(max(round(time), 0), 120) updateUsrDialog() add_fingerprint(usr) diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 19d1ee1253..83c6f81e30 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -58,7 +58,6 @@ signal.data["sigtype"]="status" radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) - /obj/machinery/air_sensor/proc/set_frequency(new_frequency) radio_controller.remove_object(src, frequency) frequency = new_frequency @@ -76,12 +75,9 @@ obj/machinery/air_sensor/Destroy() icon = 'icons/obj/computer.dmi' icon_keyboard = "atmos_key" icon_screen = "tank" - name = "Computer" - var/frequency = 1439 var/list/sensors = list() - var/list/sensor_information = list() var/datum/radio_frequency/radio_connection circuit = /obj/item/weapon/circuitboard/air_management @@ -121,8 +117,8 @@ obj/machinery/computer/general_air_control/Destroy() data["sensors"] = sensors_ui ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 525, 600) + if(!ui) + ui = new(user, src, ui_key, "atmo_control.tmpl", name, 525, 600) ui.set_initial_data(data) ui.open() ui.set_auto_update(5) @@ -137,14 +133,11 @@ obj/machinery/computer/general_air_control/Destroy() /obj/machinery/computer/general_air_control/large_tank_control icon = 'icons/obj/computer.dmi' - frequency = 1441 var/input_tag var/output_tag - var/list/input_info var/list/output_info - var/input_flow_setting = 200 var/pressure_setting = ONE_ATMOSPHERE * 45 circuit = /obj/item/weapon/circuitboard/air_management/tank_control @@ -179,8 +172,8 @@ obj/machinery/computer/general_air_control/Destroy() data["pressure_setting"] = pressure_setting ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 660, 500) + if(!ui) + ui = new(user, src, ui_key, "atmo_control.tmpl", name, 660, 500) ui.set_initial_data(data) ui.open() ui.set_auto_update(5) @@ -251,14 +244,11 @@ obj/machinery/computer/general_air_control/Destroy() /obj/machinery/computer/general_air_control/supermatter_core icon = 'icons/obj/computer.dmi' - frequency = 1438 var/input_tag var/output_tag - var/list/input_info var/list/output_info - var/input_flow_setting = 700 var/pressure_setting = 100 circuit = /obj/item/weapon/circuitboard/air_management/supermatter_core @@ -292,8 +282,8 @@ obj/machinery/computer/general_air_control/Destroy() data["pressure_setting"] = pressure_setting ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 650, 500) + if(!ui) + ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500) ui.set_initial_data(data) ui.open() ui.set_auto_update(5) @@ -365,12 +355,9 @@ obj/machinery/computer/general_air_control/Destroy() /obj/machinery/computer/general_air_control/fuel_injection icon = 'icons/obj/computer.dmi' icon_screen = "alert:0" - var/device_tag var/list/device_info - var/automation = 0 - var/cutoff_temperature = 2000 var/on_temperature = 1200 circuit = /obj/item/weapon/circuitboard/air_management/injector_control @@ -427,8 +414,8 @@ obj/machinery/computer/general_air_control/Destroy() data["device_info"] = null ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 650, 500) + if(!ui) + ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500) ui.set_initial_data(data) ui.open() ui.set_auto_update(5) @@ -494,8 +481,4 @@ obj/machinery/computer/general_air_control/Destroy() "sigtype"="command" ) - radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) - - - - + radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) \ No newline at end of file diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 236079f8e3..e9c7df22b2 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -26,7 +26,6 @@ /obj/machinery/autolathe/New() ..() wires = new(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) @@ -48,7 +47,6 @@ current_category = machine_recipes.categories[1] /obj/machinery/autolathe/interact(mob/user as mob) - update_recipe_list() if(..() || (disabled && !panel_open)) @@ -119,7 +117,6 @@ onclose(user, "autolathe") /obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(busy) user << "\The [src] is busy. Please wait for completion of previous operation." return @@ -223,7 +220,6 @@ interact(user) /obj/machinery/autolathe/Topic(href, href_list) - if(..()) return @@ -277,7 +273,7 @@ if(!making || !src) return //Create the desired item. - var/obj/item/I = new making.path(loc) + var/obj/item/I = new making.path(src.loc) if(multiplier > 1 && istype(I, /obj/item/stack)) var/obj/item/stack/S = I S.amount = multiplier @@ -303,7 +299,6 @@ mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3 /obj/machinery/autolathe/dismantle() - for(var/mat in stored_material) var/material/M = get_material_by_name(mat) if(!istype(M)) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 986d20e3b9..07f0b8f9bd 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -15,7 +15,6 @@ var/build_eff = 1 var/eat_eff = 1 - /obj/machinery/biogenerator/New() ..() var/datum/reagents/R = new/datum/reagents(1000) @@ -23,11 +22,9 @@ R.my_atom = src beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) - RefreshParts() /obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well. @@ -96,13 +93,13 @@ return user.set_machine(src) var/dat = "BiogeneratorBiogenerator:
" - if (processing) + if(processing) dat += "Biogenerator is processing! Please wait..." else dat += "Biomass: [points] points.
" switch(menustat) if("menu") - if (beaker) + if(beaker) dat += "Activate Biogenerator!
" dat += "Detach Container

" dat += "Food
" @@ -139,9 +136,9 @@ interact(user) /obj/machinery/biogenerator/proc/activate() - if (usr.stat) + if(usr.stat) return - if (stat) //NOPOWER etc + if(stat) //NOPOWER etc return if(processing) usr << "The biogenerator is in the process of working." @@ -255,4 +252,4 @@ man_rating += P.rating build_eff = man_rating - eat_eff = bin_rating + eat_eff = bin_rating \ No newline at end of file diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 70557a2e18..b072a7e488 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -10,9 +10,8 @@ idle_power_usage = 2 active_power_usage = 4 - /obj/machinery/button/attack_ai(mob/user as mob) - return src.attack_hand(user) + return attack_hand(user) /obj/machinery/button/attackby(obj/item/weapon/W, mob/user as mob) - return src.attack_hand(user) \ No newline at end of file + return attack_hand(user) \ No newline at end of file diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 9ff0b2f894..1e5c6ec73b 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -14,7 +14,7 @@ /obj/machinery/cell_charger/update_icon() icon_state = "ccharger[charging ? 1 : 0]" - if(charging && !(stat & (BROKEN|NOPOWER)) ) + if(charging && !(stat & (BROKEN|NOPOWER))) var/newlevel = round(charging.percent() * 4.0 / 99) //world << "nl: [newlevel]" @@ -73,14 +73,14 @@ charging.add_fingerprint(user) charging.update_icon() - src.charging = null + charging = null user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") chargelevel = -1 update_icon() /obj/machinery/cell_charger/attack_ai(mob/user) if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough - if(!src.charging) + if(!charging) return charging.loc = src.loc @@ -104,7 +104,7 @@ update_use_power(0) return - if (charging && !charging.fully_charged()) + if(charging && !charging.fully_charged()) charging.give(active_power_usage*CELLRATE) update_use_power(2) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 19d187ade4..88bafe5cd3 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -47,7 +47,6 @@ /obj/machinery/clonepod/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) @@ -184,7 +183,7 @@ else if((occupant.health >= heal_level) && (!eject_wait)) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.audible_message("\The [src] signals that the cloning process is complete.") + audible_message("\The [src] signals that the cloning process is complete.") connected_message("Cloning Process Complete.") locked = 0 go_out() @@ -235,7 +234,7 @@ connected = null else anchored = 1 - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) if(anchored) user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.") else @@ -298,7 +297,7 @@ if(mess) //Clean that mess and dump those gibs! mess = 0 - gibs(loc) + gibs(src.loc) update_icon() return @@ -308,7 +307,7 @@ if(occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE - occupant.loc = loc + occupant.loc = src.loc eject_wait = 0 //If it's still set somehow. domutcheck(occupant) //Waiting until they're out before possible transforming. occupant = null @@ -342,21 +341,21 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.loc = loc + A.loc = src.loc ex_act(severity) qdel(src) return if(2.0) if(prob(50)) for(var/atom/movable/A as mob|obj in src) - A.loc = loc + A.loc = src.loc ex_act(severity) qdel(src) return if(3.0) if(prob(25)) for(var/atom/movable/A as mob|obj in src) - A.loc = loc + A.loc = src.loc ex_act(severity) qdel(src) return @@ -366,9 +365,9 @@ /obj/machinery/clonepod/update_icon() ..() icon_state = "pod_0" - if (occupant && !(stat & NOPOWER)) + if(occupant && !(stat & NOPOWER)) icon_state = "pod_1" - else if (mess) + else if(mess) icon_state = "pod_g" //Health Tracker Implant diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 6f380739cc..5cdbdeab9c 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -7,7 +7,6 @@ use_power = 1 idle_power_usage = 300 active_power_usage = 300 - frame_type = "computer" var/processing = 0 var/icon_keyboard = "generic_key" @@ -97,37 +96,8 @@ return text /obj/machinery/computer/attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/screwdriver) && circuit) - user << "You start disconnecting the monitor." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.circuit = M - A.anchored = 1 - A.density = 1 - A.frame_type = M.board_type - for (var/obj/C in src) - C.forceMove(loc) - if (src.stat & BROKEN) - user << "The broken glass falls out." - new /obj/item/weapon/material/shard( src.loc ) - A.state = 3 - A.icon_state = "[A.frame_type]_3" - else - user << "You disconnect the monitor." - A.state = 4 - A.icon_state = "[A.frame_type]_4" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - M.deconstruct(src) - qdel(src) + if(computer_deconstruction_screwdriver(user, I)) + return else - src.attack_hand(user) - return - - - - - - + attack_hand(user) + return \ No newline at end of file diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 4c0f0591b2..3fced68e65 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -65,25 +65,6 @@ /obj/machinery/computer/guestpass/attackby(obj/I, mob/user) - if(istype(I, /obj/item/weapon/screwdriver) && circuit) - user << "You start disconnecting the monitor." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.frame_type = "guestpass" - A.pixel_x = pixel_x - A.pixel_y = pixel_y - A.circuit = M - A.anchored = 1 - for (var/obj/C in src) - C.forceMove(loc) - user << "You disconnect the monitor." - A.state = 4 - A.icon_state = "guestpass_4" - M.deconstruct(src) - qdel(src) - return if(istype(I, /obj/item/weapon/card/id)) if(!giver && user.unEquip(I)) I.forceMove(src) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 6868f23343..eda3a3b799 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -496,7 +496,7 @@ What a mess.*/ temp += "
  • Released
  • " temp += "" if("rank") - var/list/L = list( "Head of Personnel", "Captain", "AI" ) + var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
    Rank:
    " diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 1fa38c4a71..2b4d898cfc 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -343,7 +343,7 @@ What a mess.*/ return active1.fields["age"] = t1 if("rank") - var/list/L = list( "Head of Personnel", "Captain", "AI" ) + var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
    Rank:
    " diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index c57e9d0fe7..3a510ac836 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -35,8 +35,8 @@ var jobs_all = "" jobs_all += "" - jobs_all += ""//Captain in special because he is head of heads ~Intercross21 - jobs_all += "" + jobs_all += ""//Station Administrator in special because he is head of heads ~Intercross21 + jobs_all += "" jobs_all += "" counter = 0 @@ -311,11 +311,15 @@ writer.assignment = t1 writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])") + data_core.manifest_modify(writer.registered_name, writer.assignment) + callHook("reassign_employee", list(writer)) if("reg" in href_list) if(auth) writer.registered_name = href_list["reg"] writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])") + data_core.manifest_modify(writer.registered_name, writer.assignment) + callHook("reassign_employee", list(writer)) computer.updateUsrDialog() return diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index e6f19b8588..a335cf1c73 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -513,7 +513,7 @@ What a mess.*/ temp += "
  • Released
  • " temp += "" if("rank") - var/list/L = list( "Head of Personnel", "Captain", "AI" ) + var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
    Rank:
    " diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 665f74d926..1236ae0e5b 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -1,5 +1,4 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - //Circuit boards are in /code/game/objects/items/weapons/circuitboards/machinery/ /obj/machinery/constructable_frame //Made into a seperate type to make future revisions easier. diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6c4c6160cd..7a1b12509c 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -27,10 +27,10 @@ initialize_directions = dir /obj/machinery/atmospherics/unary/cryo_cell/Destroy() - var/turf/T = loc + var/turf/T = src.loc T.contents += contents if(beaker) - beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube + beaker.loc = get_step(src.loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube ..() /obj/machinery/atmospherics/unary/cryo_cell/initialize() @@ -64,7 +64,7 @@ /obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob) // note that relaymove will also be called for mobs outside the cell with UI open - if(src.occupant == user && !user.stat) + if(occupant == user && !user.stat) go_out() /obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user) @@ -92,7 +92,7 @@ data["hasOccupant"] = occupant ? 1 : 0 var/occupantData[0] - if (occupant) + if(occupant) occupantData["name"] = occupant.name occupantData["stat"] = occupant.stat occupantData["health"] = occupant.health @@ -124,13 +124,13 @@ data["beakerVolume"] = 0 if(beaker) data["beakerLabel"] = beaker.label_text ? beaker.label_text : null - if (beaker.reagents && beaker.reagents.reagent_list.len) + if(beaker.reagents && beaker.reagents.reagent_list.len) for(var/datum/reagent/R in beaker.reagents.reagent_list) data["beakerVolume"] += R.volume // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) + if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410) @@ -158,7 +158,7 @@ if(href_list["ejectBeaker"]) if(beaker) - beaker.loc = get_step(loc, SOUTH) + beaker.loc = get_step(src.loc, SOUTH) beaker = null if(href_list["ejectOccupant"]) @@ -235,7 +235,7 @@ occupant.adjustOxyLoss(-1) //severe damage should heal waaay slower without proper chemicals if(occupant.bodytemperature < 225) - if (occupant.getToxLoss()) + if(occupant.getToxLoss()) occupant.adjustToxLoss(max(-1, -20/occupant.getToxLoss())) var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0 var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0 @@ -267,15 +267,15 @@ //loc.assume_air(expel_gas) /obj/machinery/atmospherics/unary/cryo_cell/proc/go_out() - if(!( occupant )) + if(!(occupant)) return //for(var/obj/O in src) - // O.loc = loc - if (occupant.client) + // O.loc = src.loc + if(occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE - occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem. - if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected + occupant.loc = get_step(src.loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem. + if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug. // occupant.metabslow = 0 occupant = null @@ -284,22 +284,22 @@ update_icon() return /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob) - if (stat & (NOPOWER|BROKEN)) + if(stat & (NOPOWER|BROKEN)) usr << "The cryo cell is not functioning." return - if (!istype(M)) + if(!istype(M)) usr << "The cryo cell cannot handle such a lifeform!" return - if (occupant) + if(occupant) usr << "The cryo cell is already occupied!" return - if (M.abiotic()) + if(M.abiotic()) usr << "Subject may not have abiotic items on." return if(!node) usr << "The cell is not correctly connected to its pipe network!" return - if (M.client) + if(M.client) M.client.perspective = EYE_PERSPECTIVE M.client.eye = src M.stop_pulling() @@ -320,7 +320,7 @@ set category = "Object" set src in oview(1) if(usr == occupant)//If the user is inside the tube... - if (usr.stat == 2)//and he's not dead.... + if(usr.stat == 2)//and he's not dead.... return usr << "Release sequence activated. This will take two minutes." sleep(1200) @@ -328,7 +328,7 @@ return go_out()//and release him from the eternal prison. else - if (usr.stat != 0) + if(usr.stat != 0) return go_out() add_fingerprint(usr) @@ -342,7 +342,7 @@ if(M.Victim == usr) usr << "You're too busy getting your life sucked out of you." return - if (usr.stat != 0) + if(usr.stat != 0) return put_mob(usr) return @@ -353,7 +353,7 @@ /obj/machinery/atmospherics/unary/cryo_cell/return_air_for_internal_lifeform() //assume that the cryo cell has some kind of breath mask or something that //draws from the cryo tube's environment, instead of the cold internal air. - if(loc) + if(src.loc) return loc.return_air() else return null diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 6a4353702e..8342fb757c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -6,7 +6,6 @@ * ~ Zuhayr */ - //Main cryopod console. /obj/machinery/computer/cryopod @@ -73,18 +72,18 @@ allow_items = 1 /obj/machinery/computer/cryopod/attack_ai() - src.attack_hand() + attack_hand() /obj/machinery/computer/cryopod/attack_hand(mob/user = usr) if(stat & (NOPOWER|BROKEN)) return user.set_machine(src) - src.add_fingerprint(usr) + add_fingerprint(usr) var/dat - if (!( ticker )) + if(!(ticker)) return dat += "

    [storage_name]
    " @@ -105,7 +104,7 @@ var/mob/user = usr - src.add_fingerprint(user) + add_fingerprint(user) if(href_list["log"]) @@ -159,7 +158,7 @@ I.forceMove(get_turf(src)) frozen_items -= I - src.updateUsrDialog() + updateUsrDialog() return /obj/item/weapon/circuitboard/cryopodcontrol @@ -395,25 +394,18 @@ O.forceMove(src) //Delete all items not on the preservation list. - var/list/items = src.contents.Copy() + var/list/items = contents.Copy() items -= occupant // Don't delete the occupant items -= announce // or the autosay radio. for(var/obj/item/W in items) var/preserve = null - // Snowflaaaake. - if(istype(W, /obj/item/device/mmi)) - var/obj/item/device/mmi/brain = W - if(brain.brainmob && brain.brainmob.client && brain.brainmob.key) + + for(var/T in preserve_items) + if(istype(W,T)) preserve = 1 - else - continue - else - for(var/T in preserve_items) - if(istype(W,T)) - preserve = 1 - break + break if(!preserve) qdel(W) @@ -451,13 +443,13 @@ if(PDA_Manifest.len) PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.medical) - if ((R.fields["name"] == occupant.real_name)) + if((R.fields["name"] == occupant.real_name)) qdel(R) for(var/datum/data/record/T in data_core.security) - if ((T.fields["name"] == occupant.real_name)) + if((T.fields["name"] == occupant.real_name)) qdel(T) for(var/datum/data/record/G in data_core.general) - if ((G.fields["name"] == occupant.real_name)) + if((G.fields["name"] == occupant.real_name)) qdel(G) icon_state = base_icon_state @@ -536,7 +528,7 @@ message_admins("[key_name_admin(M)] has entered a stasis pod.") //Despawning occurs when process() is called with an occupant without a client. - src.add_fingerprint(M) + add_fingerprint(M) /obj/machinery/cryopod/verb/eject() set name = "Eject Pod" @@ -548,14 +540,14 @@ icon_state = base_icon_state //Eject any items that aren't meant to be in the pod. - var/list/items = src.contents + var/list/items = contents if(occupant) items -= occupant if(announce) items -= announce for(var/obj/item/W in items) W.forceMove(get_turf(src)) - src.go_out() + go_out() add_fingerprint(usr) name = initial(name) @@ -569,7 +561,7 @@ if(usr.stat != 0 || !check_occupant_allowed(usr)) return - if(src.occupant) + if(occupant) usr << "\The [src] is in use." return @@ -585,7 +577,7 @@ if(!usr || !usr.client) return - if(src.occupant) + if(occupant) usr << "\The [src] is in use." return @@ -605,7 +597,7 @@ time_entered = world.time - src.add_fingerprint(usr) + add_fingerprint(usr) return @@ -626,7 +618,7 @@ return if(occupant.client) - occupant.client.eye = src.occupant.client.mob + occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(get_turf(src)) @@ -639,8 +631,8 @@ return -/obj/machinery/cryopod/proc/set_occupant(var/occupant) - src.occupant = occupant +/obj/machinery/cryopod/proc/set_occupant(var/new_occupant) + occupant = new_occupant name = initial(name) if(occupant) name = "[name] ([occupant])" diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 0140a33fe3..fa4b601e91 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -1,11 +1,9 @@ /* CONTAINS: - Deployable items Barricades for reference: - access_security = 1 access_brig = 2 access_armory = 3 @@ -50,7 +48,6 @@ for reference: access_court = 42 access_clown = 43 access_mime = 44 - */ //Barricades! @@ -83,17 +80,17 @@ for reference: return material /obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/stack)) + if(istype(W, /obj/item/stack)) var/obj/item/stack/D = W if(D.get_material_name() != material.name) return //hitting things with the wrong type of stack usually doesn't produce messages, and probably doesn't need to. - if (health < maxhealth) - if (D.get_amount() < 1) + if(health < maxhealth) + if(D.get_amount() < 1) user << "You need one sheet of [material.display_name] to repair \the [src]." return visible_message("[user] begins to repair \the [src].") if(do_after(user,20) && health < maxhealth) - if (D.use(1)) + if(D.use(1)) health = maxhealth visible_message("[user] repairs \the [src].") return @@ -102,11 +99,11 @@ for reference: user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) switch(W.damtype) if("fire") - src.health -= W.force * 1 + health -= W.force * 1 if("brute") - src.health -= W.force * 0.75 + health -= W.force * 0.75 else - if (src.health <= 0) + if(health <= 0) visible_message("The barricade is smashed apart!") dismantle() qdel(src) @@ -125,8 +122,8 @@ for reference: qdel(src) return if(2.0) - src.health -= 25 - if (src.health <= 0) + health -= 25 + if(health <= 0) visible_message("\The [src] is blown apart!") dismantle() return @@ -158,114 +155,114 @@ for reference: var/locked = 0.0 // req_access = list(access_maint_tunnels) - New() +/obj/machinery/deployable/barrier/New() + ..() + + icon_state = "barrier[locked]" + +/obj/machinery/deployable/barrier/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/card/id/)) + if(allowed(user)) + if (emagged < 2.0) + locked = !locked + anchored = !anchored + icon_state = "barrier[locked]" + if((locked == 1.0) && (emagged < 2.0)) + user << "Barrier lock toggled on." + return + else if((locked == 0.0) && (emagged < 2.0)) + user << "Barrier lock toggled off." + return + else + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, src) + s.start() + visible_message("BZZzZZzZZzZT") + return + return + else if(istype(W, /obj/item/weapon/wrench)) + if(health < maxhealth) + health = maxhealth + emagged = 0 + req_access = list(access_security) + visible_message("[user] repairs \the [src]!") + return + else if(emagged > 0) + emagged = 0 + req_access = list(access_security) + visible_message("[user] repairs \the [src]!") + return + return + else + switch(W.damtype) + if("fire") + health -= W.force * 0.75 + if("brute") + health -= W.force * 0.5 + else + if(health <= 0) + explode() ..() - src.icon_state = "barrier[src.locked]" - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/card/id/)) - if (src.allowed(user)) - if (src.emagged < 2.0) - src.locked = !src.locked - src.anchored = !src.anchored - src.icon_state = "barrier[src.locked]" - if ((src.locked == 1.0) && (src.emagged < 2.0)) - user << "Barrier lock toggled on." - return - else if ((src.locked == 0.0) && (src.emagged < 2.0)) - user << "Barrier lock toggled off." - return - else - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(2, 1, src) - s.start() - visible_message("BZZzZZzZZzZT") - return +/obj/machinery/deployable/barrier/ex_act(severity) + switch(severity) + if(1.0) + explode() return - else if (istype(W, /obj/item/weapon/wrench)) - if (src.health < src.maxhealth) - src.health = src.maxhealth - src.emagged = 0 - src.req_access = list(access_security) - visible_message("[user] repairs \the [src]!") - return - else if (src.emagged > 0) - src.emagged = 0 - src.req_access = list(access_security) - visible_message("[user] repairs \the [src]!") - return + if(2.0) + health -= 25 + if(health <= 0) + explode() return - else - switch(W.damtype) - if("fire") - src.health -= W.force * 0.75 - if("brute") - src.health -= W.force * 0.5 - else - if (src.health <= 0) - src.explode() - ..() + +/obj/machinery/deployable/barrier/emp_act(severity) + if(stat & (BROKEN|NOPOWER)) + return + if(prob(50/severity)) + locked = !locked + anchored = !anchored + icon_state = "barrier[locked]" - ex_act(severity) - switch(severity) - if(1.0) - src.explode() - return - if(2.0) - src.health -= 25 - if (src.health <= 0) - src.explode() - return - emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - return - if(prob(50/severity)) - locked = !locked - anchored = !anchored - icon_state = "barrier[src.locked]" +/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. + if(air_group || (height==0)) + return 1 + if(istype(mover) && mover.checkpass(PASSTABLE)) + return 1 + else + return 0 - CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. - if(air_group || (height==0)) - return 1 - if(istype(mover) && mover.checkpass(PASSTABLE)) - return 1 - else - return 0 +/obj/machinery/deployable/barrier/proc/explode() - proc/explode() + visible_message("[src] blows apart!") + var/turf/Tsec = get_turf(src) - visible_message("[src] blows apart!") - var/turf/Tsec = get_turf(src) +/* var/obj/item/stack/rods/ =*/ + PoolOrNew(/obj/item/stack/rods, Tsec) - /* var/obj/item/stack/rods/ =*/ - PoolOrNew(/obj/item/stack/rods, Tsec) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(3, 1, src) + s.start() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() + explosion(src.loc,-1,-1,0) + if(src) + qdel(src) - explosion(src.loc,-1,-1,0) - if(src) - qdel(src) - - /obj/machinery/deployable/barrier/emag_act(var/remaining_charges, var/mob/user) - if (src.emagged == 0) - src.emagged = 1 - src.req_access.Cut() - src.req_one_access.Cut() + if(emagged == 0) + emagged = 1 + req_access.Cut() + req_one_access.Cut() user << "You break the ID authentication lock on \the [src]." var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") return 1 - else if (src.emagged == 1) - src.emagged = 2 + else if(emagged == 1) + emagged = 2 user << "You short out the anchoring mechanism on \the [src]." var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) s.start() visible_message("BZZzZZzZZzZT") - return 1 + return 1 \ No newline at end of file diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index b51d72ccd8..7f7ce32e03 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -19,12 +19,12 @@ /obj/machinery/button/remote/attack_ai(mob/user as mob) if(wires & 2) - return src.attack_hand(user) + return attack_hand(user) else user << "Error, no route to host." /obj/machinery/button/remote/attackby(obj/item/weapon/W, mob/user as mob) - return src.attack_hand(user) + return attack_hand(user) /obj/machinery/button/remote/emag_act(var/remaining_charges, var/mob/user) if(req_access.len || req_one_access.len) @@ -37,7 +37,7 @@ if(..()) return - src.add_fingerprint(user) + add_fingerprint(user) if(stat & (NOPOWER|BROKEN)) return @@ -92,9 +92,9 @@ /obj/machinery/button/remote/airlock/trigger() for(var/obj/machinery/door/airlock/D in world) - if(D.id_tag == src.id) + if(D.id_tag == id) if(specialfunctions & OPEN) - if (D.density) + if(D.density) spawn(0) D.open() return @@ -136,7 +136,7 @@ /obj/machinery/button/remote/blast_door/trigger() for(var/obj/machinery/door/blast/M in world) - if(M.id == src.id) + if(M.id == id) if(M.density) spawn(0) M.open() @@ -155,7 +155,7 @@ /obj/machinery/button/remote/emitter/trigger(mob/user as mob) for(var/obj/machinery/power/emitter/E in world) - if(E.id == src.id) + if(E.id == id) spawn(0) E.activate(user) return @@ -174,21 +174,21 @@ update_icon() for(var/obj/machinery/door/blast/M in machines) - if (M.id == src.id) - spawn( 0 ) + if(M.id == id) + spawn(0) M.open() return sleep(20) for(var/obj/machinery/mass_driver/M in machines) - if(M.id == src.id) + if(M.id == id) M.drive() sleep(50) for(var/obj/machinery/door/blast/M in machines) - if (M.id == src.id) + if(M.id == id) spawn(0) M.close() return @@ -202,4 +202,4 @@ if(!active || (stat & NOPOWER)) icon_state = "launcherbtt" else - icon_state = "launcheract" + icon_state = "launcheract" \ No newline at end of file diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 744e412240..645ccc1fd0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -88,6 +88,7 @@ icon = 'icons/obj/doors/Doorext.dmi' assembly_type = /obj/structure/door_assembly/door_assembly_ext opacity = 0 + glass = 1 /obj/machinery/door/airlock/glass name = "Glass Airlock" diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 72b878a49a..209e3bb228 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -90,34 +90,37 @@ // This only works on broken doors or doors without power. Also allows repair with Plasteel. /obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob) src.add_fingerprint(user) - if(C.pry == 1) - if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) - var/obj/item/weapon/material/twohanded/fireaxe/F = C - if(!F.wielded) - user << "You need to be wielding \the [F] to do that." - return + if(istype(C, /obj/item/weapon)) // For reasons unknown, sometimes C is actually not what it is advertised as, like a mob. + if(C.pry == 1) // Can we pry it open with something, like a crowbar/fireaxe/lingblade? + if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry. + var/obj/item/weapon/material/twohanded/fireaxe/F = C + if(!F.wielded) + user << "You need to be wielding \the [F] to do that." + return - if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating )) - force_toggle() - else - usr << "[src]'s motors resist your effort." - return - if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel") - var/amt = Ceiling((maxhealth - health)/150) - if(!amt) - usr << "\The [src] is already fully repaired." - return - var/obj/item/stack/P = C - if(P.amount < amt) - usr << "You don't have enough sheets to repair this! You need at least [amt] sheets." - return - usr << "You begin repairing [src]..." - if(do_after(usr, 30)) - if(P.use(amt)) - usr << "You have repaired \The [src]" - src.repair() + // If we're at this point, it's a fireaxe in both hands or something else that doesn't care for twohanding. + if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating )) + force_toggle() else + usr << "[src]'s motors resist your effort." + return + + if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel") // Repairing. + var/amt = Ceiling((maxhealth - health)/150) + if(!amt) + usr << "\The [src] is already fully repaired." + return + var/obj/item/stack/P = C + if(P.amount < amt) usr << "You don't have enough sheets to repair this! You need at least [amt] sheets." + return + usr << "You begin repairing [src]..." + if(do_after(usr, 30)) + if(P.use(amt)) + usr << "You have repaired \The [src]" + src.repair() + else + usr << "You don't have enough sheets to repair this! You need at least [amt] sheets." diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 6661468f59..7a4087e2c4 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -4,7 +4,6 @@ var/list/doppler_arrays = list() name = "tachyon-doppler array" desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array." - /obj/machinery/doppler_array/New() ..() doppler_arrays += src @@ -39,13 +38,12 @@ var/list/doppler_arrays = list() for(var/mob/O in hearers(src, null)) O.show_message("[src] states coldly, \"[message]\"",2) - /obj/machinery/doppler_array/power_change() ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else - if( !(stat & NOPOWER) ) + if(!(stat & NOPOWER)) icon_state = initial(icon_state) else icon_state = "[initial(icon_state)]-off" \ No newline at end of file diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 7532cb1407..18844dcd73 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -1,5 +1,4 @@ // It is a gizmo that flashes a small area - /obj/machinery/flasher name = "Mounted flash" desc = "A wall-mounted flashbulb device." @@ -27,48 +26,48 @@ /obj/machinery/flasher/power_change() ..() - if ( !(stat & NOPOWER) ) + if(!(stat & NOPOWER)) icon_state = "[base_state]1" -// src.sd_SetLuminosity(2) +// sd_SetLuminosity(2) else icon_state = "[base_state]1-p" -// src.sd_SetLuminosity(0) +// sd_SetLuminosity(0) //Don't want to render prison breaks impossible /obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/wirecutters)) + if(istype(W, /obj/item/weapon/wirecutters)) add_fingerprint(user) - src.disable = !src.disable - if (src.disable) + disable = !disable + if(disable) user.visible_message("[user] has disconnected the [src]'s flashbulb!", "You disconnect the [src]'s flashbulb!") - if (!src.disable) + if(!disable) user.visible_message("[user] has connected the [src]'s flashbulb!", "You connect the [src]'s flashbulb!") //Let the AI trigger them directly. /obj/machinery/flasher/attack_ai() - if (src.anchored) - return src.flash() + if(anchored) + return flash() else return /obj/machinery/flasher/proc/flash() - if (!(powered())) + if(!(powered())) return - if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150)) + if((disable) || (last_flash && world.time < last_flash + 150)) return playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) flick("[base_state]_flash", src) - src.last_flash = world.time + last_flash = world.time use_power(1500) for (var/mob/O in viewers(src, null)) - if (get_dist(src, O) > src.range) + if(get_dist(src, O) > range) continue var/flash_time = strength - if (istype(O, /mob/living/carbon/human)) + if(istype(O, /mob/living/carbon/human)) var/mob/living/carbon/human/H = O if(!H.eyecheck() <= 0) continue @@ -94,26 +93,26 @@ ..(severity) /obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj) - if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150)) + if((disable) || (last_flash && world.time < last_flash + 150)) return if(istype(AM, /mob/living/carbon)) var/mob/living/carbon/M = AM - if ((M.m_intent != "walk") && (src.anchored)) - src.flash() + if((M.m_intent != "walk") && (anchored)) + flash() /obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/wrench)) + if(istype(W, /obj/item/weapon/wrench)) add_fingerprint(user) - src.anchored = !src.anchored + anchored = !anchored - if (!src.anchored) + if(!anchored) user.show_message(text("[src] can now be moved.")) - src.overlays.Cut() + overlays.Cut() - else if (src.anchored) + else if(anchored) user.show_message(text("[src] is now secured.")) - src.overlays += "[base_state]-s" + overlays += "[base_state]-s" /obj/machinery/button/flasher name = "flasher button" @@ -130,7 +129,7 @@ icon_state = "launcheract" for(var/obj/machinery/flasher/M in machines) - if(M.id == src.id) + if(M.id == id) spawn() M.flash() @@ -139,4 +138,4 @@ icon_state = "launcherbtt" active = 0 - return + return \ No newline at end of file diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index e31a19b265..9f594e4178 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -1,5 +1,3 @@ -//these are probably broken - /obj/machinery/floodlight name = "Emergency Floodlight" icon = 'icons/obj/machines/floodlight.dmi' @@ -13,7 +11,7 @@ var/brightness_on = 8 //can't remember what the maxed out value is /obj/machinery/floodlight/New() - src.cell = new(src) + cell = new(src) cell.maxcharge = 1000 cell.charge = 1000 // 41minutes @ 200W ..() @@ -71,7 +69,6 @@ if(!turn_on(1)) user << "You try to turn on \the [src] but it does not work." - /obj/machinery/floodlight/attack_hand(mob/user as mob) if(open && cell) if(ishuman(user)) @@ -79,12 +76,12 @@ user.put_in_hands(cell) cell.loc = user.loc else - cell.loc = loc + cell.loc = src.loc cell.add_fingerprint(user) cell.update_icon() - src.cell = null + cell = null on = 0 set_light(0) user << "You remove the power cell" @@ -99,10 +96,9 @@ update_icon() - /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/screwdriver)) - if (!open) + if(istype(W, /obj/item/weapon/screwdriver)) + if(!open) if(unlocked) unlocked = 0 user << "You screw the battery panel in place." @@ -110,7 +106,7 @@ unlocked = 1 user << "You unscrew the battery panel." - if (istype(W, /obj/item/weapon/crowbar)) + if(istype(W, /obj/item/weapon/crowbar)) if(unlocked) if(open) open = 0 @@ -121,7 +117,7 @@ open = 1 user << "You remove the battery panel." - if (istype(W, /obj/item/weapon/cell)) + if(istype(W, /obj/item/weapon/cell)) if(open) if(cell) user << "There is a power cell already installed." diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 7298b62abf..a134e68e3f 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -132,7 +132,7 @@ var/list/floor_light_cache = list() if(1) qdel(src) if(2) - if (prob(50)) + if(prob(50)) qdel(src) else if(prob(20)) stat |= BROKEN @@ -140,7 +140,7 @@ var/list/floor_light_cache = list() if(isnull(damaged)) damaged = 0 if(3) - if (prob(5)) + if(prob(5)) qdel(src) else if(isnull(damaged)) damaged = 0 diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index c682a2b228..1cbccc195c 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -1,5 +1,4 @@ /obj/machinery/floorlayer - name = "automatic floor layer" icon = 'icons/obj/stationobjs.dmi' icon_state = "pipe_d" @@ -35,8 +34,7 @@ return /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) - - if (istype(W, /obj/item/weapon/wrench)) + if(istype(W, /obj/item/weapon/wrench)) var/m = input("Choose work mode", "Mode") as null|anything in mode mode[m] = !mode[m] var/O = mode[m] @@ -109,4 +107,4 @@ /obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf) for(var/obj/item/stack/tile/tile in w_turf) - TakeTile(tile) + TakeTile(tile) \ No newline at end of file diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 1dddcedea0..3005996f0b 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -1,3 +1,177 @@ +/var/global/list/construction_frame_wall +/var/global/list/construction_frame_floor + +/proc/populate_frame_types() + //Create global frame type list if it hasn't been made already. + construction_frame_wall = list() + construction_frame_floor = list() + for(var/R in typesof(/datum/frame/frame_types) - /datum/frame/frame_types) + var/datum/frame/frame_types/type = new R + if(type.frame_style == "wall") + construction_frame_wall += type + else + construction_frame_floor += type + + var/datum/frame/frame_types/cancel/cancel = new /datum/frame/frame_types/cancel + construction_frame_wall += cancel + construction_frame_floor += cancel + +/datum/frame/frame_types + var/name + var/frame_size = 5 + var/frame_class + var/circuit + var/frame_style = "floor" + var/x_offset + var/y_offset + +/datum/frame/frame_types/computer + name = "Computer" + frame_class = "computer" + +/datum/frame/frame_types/machine + name = "Machine" + frame_class = "machine" + +/datum/frame/frame_types/conveyor + name = "Conveyor" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/conveyor + +/datum/frame/frame_types/photocopier + name = "Photocopier" + frame_class = "machine" + +/datum/frame/frame_types/washing_machine + name = "Washing Machine" + frame_class = "machine" + +/datum/frame/frame_types/medical_console + name = "Medical Console" + frame_class = "computer" + +/datum/frame/frame_types/medical_pod + name = "Medical Pod" + frame_class = "machine" + +/datum/frame/frame_types/dna_analyzer + name = "DNA Analyzer" + frame_class = "machine" + +/datum/frame/frame_types/mass_driver + name = "Mass Driver" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/mass_driver + +/datum/frame/frame_types/holopad + name = "Holopad" + frame_class = "computer" + frame_size = 4 + +/datum/frame/frame_types/microwave + name = "Microwave" + frame_class = "machine" + frame_size = 4 + +/datum/frame/frame_types/fax + name = "Fax" + frame_class = "machine" + frame_size = 3 + +/datum/frame/frame_types/recharger + name = "Recharger" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/recharger + frame_size = 3 + +/datum/frame/frame_types/grinder + name = "Grinder" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/grinder + frame_size = 3 + +/datum/frame/frame_types/display + name = "Display" + frame_class = "display" + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/supply_request_console + name = "Supply Request Console" + frame_class = "display" + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/atm + name = "ATM" + frame_class = "display" + frame_size = 3 + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/newscaster + name = "Newscaster" + frame_class = "display" + frame_size = 3 + frame_style = "wall" + x_offset = 28 + y_offset = 30 + +/datum/frame/frame_types/wall_charger + name = "Wall Charger" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/recharger/wrecharger + frame_size = 3 + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/fire_alarm + name = "Fire Alarm" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/air_alarm + name = "Air Alarm" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/guest_pass_console + name = "Guest Pass Console" + frame_class = "display" + frame_size = 2 + frame_style = "wall" + x_offset = 30 + y_offset = 30 + +/datum/frame/frame_types/intercom + name = "Intercom" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 28 + y_offset = 28 + +/datum/frame/frame_types/keycard_authenticator + name = "Keycard Authenticator" + frame_class = "alarm" + frame_size = 1 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/cancel //used to get out of input dialogue + name = "Cancel" + /obj/structure/frame anchored = 0 name = "frame" @@ -6,20 +180,16 @@ var/state = 0 var/obj/item/weapon/circuitboard/circuit = null var/need_circuit = 1 - var/frame_type = "machine" + var/datum/frame/frame_types/frame_type = new /datum/frame/frame_types/machine var/list/components = null var/list/req_components = null var/list/req_component_names = null - var/list/alarms = list("firealarm", "airalarm", "intercom", "keycard") - var/list/machines = list( - "machine", "photocopier", "fax", "microwave", "conveyor", "recharger", "wrecharger", - "washing", "grinder", "teleporter_hub", "teleporter_station", "medpod", "dna_analyzer", - "massdriver") - var/list/computers = list("computer", "holopad", "console") - var/list/displays = list("display", "guestpass", "newscaster", "atm", "request") - var/list/no_circuit = list("wrecharger", "recharger", "grinder", "conveyor", "massdriver") +/obj/structure/frame/computer //used for maps + frame_type = new /datum/frame/frame_types/computer + anchored = 1 + density = 1 /obj/structure/frame/proc/update_desc() var/D @@ -31,6 +201,12 @@ D = "Requires [english_list(component_list)]." desc = D +/obj/structure/frame/update_icon() + ..() + var/type = lowertext(frame_type.name) + type = replacetext(type, " ", "_") + icon_state = "[type]_[state]" + /obj/structure/frame/proc/check_components(mob/user as mob) components = list() req_components = circuit.req_components.Copy() @@ -41,175 +217,110 @@ var/obj/ct = A req_component_names[A] = initial(ct.name) -/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/obj/item/frame/frame_type, mob/user as mob) +/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob) ..() if(building) - src.frame_type = frame_type - icon_state = "[frame_type]_0" + frame_type = type + state = 0 + if(dir) - src.set_dir(dir) + set_dir(dir) - if(frame_type in alarms) - if(loc) - src.loc = loc + if(loc) + src.loc = loc - state = 0 - if(frame_type == "airalarm" || frame_type == "firealarm" || frame_type == "keycard") - if(dir) - src.set_dir(dir) - pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) - pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 + if(frame_type.x_offset) + pixel_x = (dir & 3)? 0 : (dir == 4 ? -frame_type.x_offset : frame_type.x_offset) - if(frame_type == "intercom") - if(dir) - src.set_dir(dir) - pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28) - pixel_y = (dir & 3)? (dir == 1 ? -28 : 28) : 0 + if(frame_type.y_offset) + pixel_y = (dir & 3)? (dir == 1 ? -frame_type.y_offset : frame_type.y_offset) : 0 - update_icon() - return - - if(frame_type in displays) - if(loc) - src.loc = loc - - if(frame_type == "display" || frame_type == "atm" || frame_type == "request") - pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) - pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0 - - if(frame_type == "newscaster") - pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28) - pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0 - - if(frame_type == "guestpass") - pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30) - pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0 - - update_icon() - return - - if(frame_type in no_circuit) + if(frame_type.circuit) need_circuit = 0 - if(frame_type == "wrecharger") - circuit = new /obj/item/weapon/circuitboard/recharger/wrecharger(src) - if(loc) - src.loc = loc + circuit = new frame_type.circuit(src) - state = 0 - - pixel_x = (dir & 3)? 0 : (dir == 4 ? -26 : 32) - pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0 - - update_icon() - return - if(frame_type == "recharger") - circuit = new /obj/item/weapon/circuitboard/recharger(src) - if(frame_type == "grinder") - circuit = new /obj/item/weapon/circuitboard/grinder(src) - if(frame_type == "conveyor") - circuit = new /obj/item/weapon/circuitboard/conveyor(src) - if(frame_type == "massdriver") - circuit = new /obj/item/weapon/circuitboard/mass_driver(src) - - if(frame_type == "computer") + if(frame_type.name == "Computer") density = 1 - if(frame_type in machines) + + if(frame_type.frame_class == "machine") density = 1 - return + + update_icon() /obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/weapon/wrench)) - if(state == 0) + if(state == 0 && !anchored) user << "You start to wrench the frame into place." playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) - src.anchored = 1 + anchored = 1 if(!need_circuit && circuit) - src.state = 2 + state = 2 check_components() update_desc() - src.icon_state = "[frame_type]_2" user << "You wrench the frame into place and set the outer cover." else - src.state = 1 user << "You wrench the frame into place." - return - if(state == 1) + else if(state == 0 && anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) user << "You unfasten the frame." - src.anchored = 0 - src.state = 0 - return + anchored = 0 - if(istype(P, /obj/item/weapon/weldingtool)) + else if(istype(P, /obj/item/weapon/weldingtool)) if(state == 0) var/obj/item/weapon/weldingtool/WT = P - if(!WT.remove_fuel(0, user)) + if(WT.remove_fuel(0, user)) + playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + if(do_after(user, 20)) + if(src && WT.isOn()) + user << "You deconstruct the frame." + new /obj/item/stack/material/steel(src.loc, frame_type.frame_size) + qdel(src) + return + else if(!WT.remove_fuel(0, user)) user << "The welding tool must be on to complete this task." return - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20)) - if(!src || !WT.isOn()) return - user << "You deconstruct the frame." - if(frame_type == "holopad" || frame_type == "microwave") - new /obj/item/stack/material/steel( src.loc, 4 ) - else if(frame_type == "fax" || frame_type == "newscaster" || frame_type == "recharger" || frame_type == "wrecharger" || frame_type == "grinder") - new /obj/item/stack/material/steel( src.loc, 3 ) - else if(frame_type == "firealarm" || frame_type == "airalarm" || frame_type == "intercom" || frame_type == "guestpass") - new /obj/item/stack/material/steel( src.loc, 2 ) - else if(frame_type == "keycard") - new /obj/item/stack/material/steel( src.loc, 1 ) - else - new /obj/item/stack/material/steel( src.loc, 5 ) - qdel(src) - return - if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit) - if(state == 1) + else if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit) + if(state == 0 && anchored) var/obj/item/weapon/circuitboard/B = P - if(B.board_type == frame_type) + var/datum/frame/frame_types/board_type = B.board_type + if(board_type.name == frame_type.name) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You place the circuit board inside the frame." - src.icon_state = "[frame_type]_1" - src.circuit = P + circuit = P user.drop_item() P.loc = src - if(frame_type in machines) //because machines are assholes + state = 1 + if(frame_type.frame_class == "machine") check_components() update_desc() - return else user << "This frame does not accept circuit boards of this type!" - return + return - if(istype(P, /obj/item/weapon/screwdriver)) + else if(istype(P, /obj/item/weapon/screwdriver)) if(state == 1) if(need_circuit && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You screw the circuit board into place." - src.state = 2 - src.icon_state = "[frame_type]_2" - return + state = 2 - if(state == 2) + else if(state == 2) if(need_circuit && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You unfasten the circuit board." - src.state = 1 - src.icon_state = "[frame_type]_1" - return + state = 1 - if(!need_circuit && circuit) + else if(!need_circuit && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You unfasten the outer cover." - src.state = 1 - src.icon_state = "[frame_type]_0" - return + state = 0 - if(state == 3) - if(frame_type in machines) + else if(state == 3) + if(frame_type.frame_class == "machine") var/component_check = 1 for(var/R in req_components) if(req_components[R] > 0) @@ -217,7 +328,7 @@ break if(component_check) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir) + var/obj/machinery/new_machine = new circuit.build_path(src.loc, dir) // Handle machines that have allocated default parts in thier constructor. if(new_machine.component_parts) for(var/CP in new_machine.component_parts) @@ -226,9 +337,9 @@ else new_machine.component_parts = list() - src.circuit.construct(new_machine) + circuit.construct(new_machine) - for(var/obj/O in src.components) + for(var/obj/O in components) if(circuit.contain_parts) O.loc = new_machine else @@ -240,173 +351,158 @@ new_machine.RefreshParts() - new_machine.pixel_x = src.pixel_x - new_machine.pixel_y = src.pixel_y + new_machine.pixel_x = pixel_x + new_machine.pixel_y = pixel_y qdel(src) - return + return - if(frame_type in alarms) + else if(frame_type.frame_class == "alarm") playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You fasten the cover." - var/obj/machinery/B = new src.circuit.build_path ( src.loc ) - B.pixel_x = src.pixel_x - B.pixel_y = src.pixel_y + var/obj/machinery/B = new circuit.build_path(src.loc) + B.pixel_x = pixel_x + B.pixel_y = pixel_y B.set_dir(dir) - src.circuit.construct(B) + circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return - if(state == 4) - if(frame_type in computers) + else if(state == 4) + if(frame_type.frame_class == "computer") playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You connect the monitor." - var/obj/machinery/B = new src.circuit.build_path ( src.loc ) - B.pixel_x = src.pixel_x - B.pixel_y = src.pixel_y + var/obj/machinery/B = new circuit.build_path(src.loc) + B.pixel_x = pixel_x + B.pixel_y = pixel_y B.set_dir(dir) - src.circuit.construct(B) + circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return - if(frame_type in displays) + else if(frame_type.frame_class == "display") playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You connect the monitor." - var/obj/machinery/B = new src.circuit.build_path ( src.loc ) - B.pixel_x = src.pixel_x - B.pixel_y = src.pixel_y + var/obj/machinery/B = new circuit.build_path(src.loc) + B.pixel_x = pixel_x + B.pixel_y = pixel_y B.set_dir(dir) - src.circuit.construct(B) + circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return - if(istype(P, /obj/item/weapon/crowbar)) + else if(istype(P, /obj/item/weapon/crowbar)) if(state == 1) if(need_circuit && circuit) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the circuit board." - src.state = 1 - src.icon_state = "[frame_type]_0" - circuit.loc = src.loc - src.circuit = null - if(frame_type in machines) //becuase machines are assholes + state = 0 + circuit.forceMove(src.loc) + circuit = null + if(frame_type.frame_class == "machine") req_components = null - return - if(state == 3) - if(frame_type in machines) + else if(state == 3) + if(frame_type.frame_class == "machine") playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) if(components.len == 0) user << "There are no components to remove." else user << "You remove the components." for(var/obj/item/weapon/W in components) - W.forceMove(loc) + W.forceMove(src.loc) check_components() update_desc() user << desc - return - if(state == 4) - if(frame_type in computers) + else if(state == 4) + if(frame_type.frame_class == "computer") playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the glass panel." - src.state = 3 - src.icon_state = "[frame_type]_3" - new /obj/item/stack/material/glass( src.loc, 2 ) - return + state = 3 + new /obj/item/stack/material/glass(src.loc, 2) - if(frame_type in displays) + else if(frame_type.frame_class == "display") playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the glass panel." - src.state = 3 - src.icon_state = "[frame_type]_3" - new /obj/item/stack/material/glass( src.loc, 2 ) - return + state = 3 + new /obj/item/stack/material/glass(src.loc, 2) - if(istype(P, /obj/item/stack/cable_coil)) + else if(istype(P, /obj/item/stack/cable_coil)) if(state == 2) var/obj/item/stack/cable_coil/C = P - if (C.get_amount() < 5) + if(C.get_amount() < 5) user << "You need five coils of wire to add them to the frame." return user << "You start to add cables to the frame." playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 20) && state == 2) - if (C.use(5)) + if(C.use(5)) user << "You add cables to the frame." state = 3 - icon_state = "[frame_type]_3" - if(frame_type in machines) + if(frame_type.frame_class == "machine") user << desc - return - if(istype(P, /obj/item/weapon/wirecutters)) + else if(istype(P, /obj/item/weapon/wirecutters)) if(state == 3) - if(frame_type in computers) + if(frame_type.frame_class == "computer") playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." - src.state = 2 - src.icon_state = "[frame_type]_2" - new /obj/item/stack/cable_coil( src.loc, 5 ) - return + state = 2 + new /obj/item/stack/cable_coil(src.loc, 5) - if(frame_type in displays) + else if(frame_type.frame_class == "display") playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." - src.state = 2 - src.icon_state = "[frame_type]_2" - new /obj/item/stack/cable_coil( src.loc, 5 ) - return + state = 2 + new /obj/item/stack/cable_coil(src.loc, 5) - if(frame_type in alarms) + else if(frame_type.frame_class == "alarm") playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." - src.state = 2 - src.icon_state = "[frame_type]_2" - new /obj/item/stack/cable_coil( src.loc, 5 ) - return + state = 2 + new /obj/item/stack/cable_coil(src.loc, 5) - if(frame_type in machines) + else if(frame_type.frame_class == "machine") playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." - src.state = 2 - src.icon_state = "[frame_type]_2" - new /obj/item/stack/cable_coil( src.loc, 5 ) - return + state = 2 + new /obj/item/stack/cable_coil(src.loc, 5) - if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass") + else if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass") if(state == 3) - if(frame_type in computers) + if(frame_type.frame_class == "computer") var/obj/item/stack/G = P - if (G.get_amount() < 2) + if(G.get_amount() < 2) user << "You need two sheets of glass to put in the glass panel." return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start to put in the glass panel." if(do_after(user, 20) && state == 3) - if (G.use(2)) + if(G.use(2)) user << "You put in the glass panel." - src.state = 4 - src.icon_state = "[frame_type]_4" - return + state = 4 - if(frame_type in displays) + else if(frame_type.frame_class == "display") var/obj/item/stack/G = P - if (G.get_amount() < 2) + if(G.get_amount() < 2) user << "You need two sheets of glass to put in the glass panel." return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You start to put in the glass panel." if(do_after(user, 20) && state == 3) - if (G.use(2)) + if(G.use(2)) user << "You put in the glass panel." - src.state = 4 - src.icon_state = "[frame_type]_4" - return + state = 4 - if(istype(P, /obj/item)) + else if(istype(P, /obj/item)) if(state == 3) - if(frame_type in machines) + if(frame_type.frame_class == "machine") for(var/I in req_components) if(istype(P, I) && (req_components[I] > 0)) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) @@ -423,10 +519,10 @@ update_desc() break - if(istype(P, /obj/item/stack/material/glass/reinforced)) + else if(istype(P, /obj/item/stack/material/glass/reinforced)) var/obj/item/stack/material/glass/reinforced/CP = P if(CP.get_amount() > 1) - var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided + var/camt = min(CP.amount, req_components[I]) // amount of glass to take, idealy amount required, but limited by amount provided var/obj/item/stack/material/glass/reinforced/CC = new /obj/item/stack/material/glass/reinforced(src) CC.amount = camt CC.update_icon() @@ -445,4 +541,6 @@ user << desc if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil) && !istype(P, /obj/item/stack/material)) user << "You cannot add that component to the machine!" - return \ No newline at end of file + return + + update_icon() \ No newline at end of file diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 58c8423a23..158b718e83 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -19,11 +19,9 @@ Possible to do for anyone motivated enough: Itegrate EMP effect to disable the unit. */ - /* * Holopad */ - #define HOLOPAD_PASSIVE_POWER_USAGE 1 #define HOLOGRAM_POWER_USAGE 2 #define RANGE_BASED 4 @@ -37,39 +35,19 @@ var/const/HOLOPAD_MODE = RANGE_BASED icon_state = "holopad0" show_messages = 1 circuit = /obj/item/weapon/circuitboard/holopad - layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. - var/power_per_hologram = 500 //per usage per hologram idle_power_usage = 5 use_power = 1 - var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad var/last_request = 0 //to prevent request spam. ~Carn var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. /obj/machinery/hologram/holopad/attackby(obj/item/I as obj, user as mob) - if(istype(I, /obj/item/weapon/screwdriver) && circuit) - user << "You start removing the glass." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) - A.circuit = M - A.anchored = 1 - A.density = 1 - A.frame_type = "holopad" - for (var/obj/C in src) - C.forceMove(loc) - user << "You remove the glass." - A.state = 4 - A.icon_state = "holopad_4" - M.deconstruct(src) - for (var/mob/living/silicon/ai/master in masters) - clear_holo(master) - qdel(src) + if(computer_deconstruction_screwdriver(user, I)) + return else - src.attack_hand(user) + attack_hand(user) return /obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests. @@ -87,7 +65,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED user << "A request for AI presence was already sent recently." /obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user) - if (!istype(user)) + if(!istype(user)) return /*There are pretty much only three ways to interact here. I don't need to check for client since they're clicking on an object. @@ -102,11 +80,11 @@ var/const/HOLOPAD_MODE = RANGE_BASED /obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user) if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it - if (user.holo) + if(user.holo) user << "ERROR: Image feed in progress." return create_holo(user)//Create one. - src.visible_message("A holographic image of [user] flicks to life right before your eyes!") + visible_message("A holographic image of [user] flicks to life right before your eyes!") else user << "ERROR: Unable to project hologram." return @@ -165,7 +143,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ user.holo = null qdel(masters[user])//Get rid of user's hologram masters -= user //Discard AI from the list of those who use holopad - if (!masters.len)//If no users left + if(!masters.len)//If no users left set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted) icon_state = "holopad0" return 1 @@ -214,10 +192,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ if(1.0) qdel(src) if(2.0) - if (prob(50)) + if(prob(50)) qdel(src) if(3.0) - if (prob(5)) + if(prob(5)) qdel(src) return diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 6319871022..7e465db189 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -14,20 +14,20 @@ var/on_icon = "sign_on" /obj/machinery/holosign/proc/toggle() - if (stat & (BROKEN|NOPOWER)) + if(stat & (BROKEN|NOPOWER)) return lit = !lit use_power = lit ? 2 : 1 update_icon() /obj/machinery/holosign/update_icon() - if (!lit) + if(!lit) icon_state = "sign_off" else icon_state = on_icon /obj/machinery/holosign/power_change() - if (stat & NOPOWER) + if(stat & NOPOWER) lit = 0 use_power = 0 update_icon() @@ -55,8 +55,8 @@ icon_state = "light[active]" for(var/obj/machinery/holosign/M in machines) - if (M.id == src.id) - spawn( 0 ) + if(M.id == id) + spawn(0) M.toggle() return diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 5fd791843d..97c430f9d0 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -11,7 +11,7 @@ active_power_usage = 4 /obj/machinery/igniter/attack_ai(mob/user as mob) - return src.attack_hand(user) + return attack_hand(user) /obj/machinery/igniter/attack_hand(mob/user as mob) if(..()) @@ -19,14 +19,14 @@ add_fingerprint(user) use_power(50) - src.on = !( src.on ) - src.icon_state = text("igniter[]", src.on) + on = !(on) + icon_state = text("igniter[]", on) return /obj/machinery/igniter/process() //ugh why is this even in process()? - if (src.on && !(stat & NOPOWER) ) + if(on && !(stat & NOPOWER)) var/turf/location = src.loc - if (isturf(location)) + if(isturf(location)) location.hotspot_expose(1000,500,1) return 1 @@ -36,8 +36,8 @@ /obj/machinery/igniter/power_change() ..() - if(!( stat & NOPOWER) ) - icon_state = "igniter[src.on]" + if(!(stat & NOPOWER)) + icon_state = "igniter[on]" else icon_state = "igniter0" @@ -57,56 +57,54 @@ idle_power_usage = 2 active_power_usage = 4 - /obj/machinery/sparker/New() ..() /obj/machinery/sparker/power_change() ..() - if ( !(stat & NOPOWER) && disable == 0 ) + if(!(stat & NOPOWER) && disable == 0) icon_state = "[base_state]" -// src.sd_SetLuminosity(2) +// sd_SetLuminosity(2) else icon_state = "[base_state]-p" -// src.sd_SetLuminosity(0) +// sd_SetLuminosity(0) /obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/screwdriver)) + if(istype(W, /obj/item/weapon/screwdriver)) add_fingerprint(user) - src.disable = !src.disable - if (src.disable) + disable = !disable + if(disable) user.visible_message("[user] has disabled the [src]!", "You disable the connection to the [src].") icon_state = "[base_state]-d" - if (!src.disable) + if(!disable) user.visible_message("[user] has reconnected the [src]!", "You fix the connection to the [src].") - if(src.powered()) + if(powered()) icon_state = "[base_state]" else icon_state = "[base_state]-p" /obj/machinery/sparker/attack_ai() - if (src.anchored) - return src.ignite() + if(anchored) + return ignite() else return /obj/machinery/sparker/proc/ignite() - if (!(powered())) + if(!(powered())) return - if ((src.disable) || (src.last_spark && world.time < src.last_spark + 50)) + if((disable) || (last_spark && world.time < last_spark + 50)) return - flick("[base_state]-spark", src) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) s.start() - src.last_spark = world.time + last_spark = world.time use_power(1000) var/turf/location = src.loc - if (isturf(location)) + if(isturf(location)) location.hotspot_expose(1000,500,1) return 1 @@ -132,14 +130,14 @@ icon_state = "launcheract" for(var/obj/machinery/sparker/M in machines) - if (M.id == src.id) - spawn( 0 ) + if(M.id == id) + spawn(0) M.ignite() for(var/obj/machinery/igniter/M in machines) - if(M.id == src.id) + if(M.id == id) use_power(50) - M.on = !( M.on ) + M.on = !(M.on) M.icon_state = text("igniter[]", M.on) sleep(50) @@ -147,4 +145,4 @@ icon_state = "launcherbtt" active = 0 - return + return \ No newline at end of file diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 4ae639c039..c0f2a284f4 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -10,7 +10,7 @@ /obj/machinery/iv_drip/var/obj/item/weapon/reagent_containers/beaker = null /obj/machinery/iv_drip/update_icon() - if(src.attached) + if(attached) icon_state = "hooked" else icon_state = "" @@ -41,28 +41,28 @@ return if(attached) - visible_message("[src.attached] is detached from \the [src]") - src.attached = null - src.update_icon() + visible_message("[attached] is detached from \the [src]") + attached = null + update_icon() return if(in_range(src, usr) && ishuman(over_object) && get_dist(over_object, src) <= 1) visible_message("[usr] attaches \the [src] to \the [over_object].") - src.attached = over_object - src.update_icon() + attached = over_object + update_icon() /obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/reagent_containers)) - if(!isnull(src.beaker)) + if(istype(W, /obj/item/weapon/reagent_containers)) + if(!isnull(beaker)) user << "There is already a reagent container loaded!" return user.drop_item() W.loc = src - src.beaker = W + beaker = W user << "You attach \the [W] to \the [src]." - src.update_icon() + update_icon() return if(istype(W, /obj/item/weapon/screwdriver)) @@ -70,11 +70,11 @@ user << "You start to dismantle the IV drip." if(do_after(user, 15)) user << "You dismantle the IV drip." - var/obj/item/stack/rods/A = new /obj/item/stack/rods( src.loc ) + var/obj/item/stack/rods/A = new /obj/item/stack/rods(src.loc) A.amount = 6 - if(src.beaker) - src.beaker.loc = get_turf(src) - src.beaker = null + if(beaker) + beaker.loc = get_turf(src) + beaker = null qdel(src) return else @@ -84,24 +84,24 @@ /obj/machinery/iv_drip/process() set background = 1 - if(src.attached) + if(attached) - if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc))) - visible_message("The needle is ripped out of [src.attached], doesn't that hurt?") - src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm")) - src.attached = null - src.update_icon() + if(!(get_dist(src, attached) <= 1 && isturf(attached.loc))) + visible_message("The needle is ripped out of [attached], doesn't that hurt?") + attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm")) + attached = null + update_icon() return - if(src.attached && src.beaker) + if(attached && beaker) // Give blood if(mode) - if(src.beaker.volume > 0) + if(beaker.volume > 0) var/transfer_amount = REM - if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood)) + if(istype(beaker, /obj/item/weapon/reagent_containers/blood)) // speed up transfer on blood packs transfer_amount = 4 - src.beaker.reagents.trans_to_mob(src.attached, transfer_amount, CHEM_BLOOD) + beaker.reagents.trans_to_mob(attached, transfer_amount, CHEM_BLOOD) update_icon() // Take blood @@ -130,7 +130,7 @@ var/datum/reagent/B = T.take_blood(beaker,amount) - if (B) + if(B) beaker.reagents.reagent_list |= B beaker.reagents.update_total() beaker.on_reagent_change() @@ -138,9 +138,9 @@ update_icon() /obj/machinery/iv_drip/attack_hand(mob/user as mob) - if(src.beaker) - src.beaker.loc = get_turf(src) - src.beaker = null + if(beaker) + beaker.loc = get_turf(src) + beaker = null update_icon() else return ..() @@ -163,7 +163,7 @@ /obj/machinery/iv_drip/examine(mob/user) ..(user) - if (!(user in view(2)) && user!=src.loc) return + if(!(user in view(2)) && user != src.loc) return user << "The IV drip is [mode ? "injecting" : "taking blood"]." @@ -177,7 +177,7 @@ usr << "[attached ? attached : "No one"] is attached." -/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) +/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0) if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through. return 1 return ..() diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 3cc537be49..57e0e1b55a 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -38,7 +38,6 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/capacitor(src) component_parts += new /obj/item/weapon/stock_parts/console_screen(src) diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 1be387f35f..a3b0f9fdd4 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -30,7 +30,6 @@ reagents = new/datum/reagents(100) reagents.my_atom = src - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 7d8e75764c..180471f070 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -18,19 +18,17 @@ /obj/machinery/light_switch/New() ..() spawn(5) - src.area = get_area(src) + area = get_area(src) if(otherarea) - src.area = locate(text2path("/area/[otherarea]")) + area = locate(text2path("/area/[otherarea]")) if(!name) name = "light switch ([area.name])" - src.on = src.area.lightswitch + on = area.lightswitch updateicon() - - /obj/machinery/light_switch/proc/updateicon() if(!overlay) overlay = image(icon, "light1-overlay", LIGHTING_LAYER+0.1) @@ -77,4 +75,4 @@ ..(severity) return power_change() - ..(severity) + ..(severity) \ No newline at end of file diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 30a9b8548b..9b7760a12e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -113,7 +113,6 @@ Class Procs: var/global/gl_uid = 1 var/interact_offline = 0 // Can the machine be interacted with while de-powered. var/circuit = null - var/frame_type = "machine" /obj/machinery/New(l, d=0) ..(l) @@ -124,6 +123,8 @@ Class Procs: else machines += src machinery_sort_required = 1 + if(circuit) + circuit = new circuit(src) /obj/machinery/Destroy() machines -= src @@ -165,11 +166,11 @@ Class Procs: qdel(src) return if(2.0) - if (prob(50)) + if(prob(50)) qdel(src) return if(3.0) - if (prob(25)) + if(prob(25)) qdel(src) return else @@ -182,20 +183,20 @@ Class Procs: /obj/machinery/proc/auto_use_power() if(!powered(power_channel)) return 0 - if(src.use_power == 1) - use_power(idle_power_usage,power_channel, 1) - else if(src.use_power >= 2) - use_power(active_power_usage,power_channel, 1) + if(use_power == 1) + use_power(idle_power_usage, power_channel, 1) + else if(use_power >= 2) + use_power(active_power_usage, power_channel, 1) return 1 /obj/machinery/proc/operable(var/additional_flags = 0) return !inoperable(additional_flags) /obj/machinery/proc/inoperable(var/additional_flags = 0) - return (stat & (NOPOWER|BROKEN|additional_flags)) + return (stat & (NOPOWER | BROKEN | additional_flags)) /obj/machinery/CanUseTopic(var/mob/user) - if(!interact_offline && (stat & (NOPOWER|BROKEN))) + if(!interact_offline && (stat & (NOPOWER | BROKEN))) return STATUS_CLOSE return ..() @@ -214,20 +215,19 @@ Class Procs: // For some reason attack_robot doesn't work // This is to stop robots from using cameras to remotely control machines. if(user.client && user.client.eye == user) - return src.attack_hand(user) + return attack_hand(user) else - return src.attack_hand(user) + return attack_hand(user) /obj/machinery/attack_hand(mob/user as mob) if(inoperable(MAINT)) return 1 if(user.lying || user.stat) return 1 - if ( ! (istype(usr, /mob/living/carbon/human) || \ - istype(usr, /mob/living/silicon))) + if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/living/silicon))) usr << "You don't have the dexterity to do this!" return 1 - if (ishuman(user)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.getBrainLoss() >= 55) visible_message("[H] stares cluelessly at [src].") @@ -236,7 +236,7 @@ Class Procs: user << "You momentarily forget how to use [src]." return 1 - src.add_fingerprint(user) + add_fingerprint(user) return ..() @@ -252,7 +252,7 @@ Class Procs: O.show_message("\icon[src] [msg]", 2) /obj/machinery/proc/ping(text=null) - if (!text) + if(!text) text = "\The [src] pings." state(text, "blue") @@ -266,7 +266,7 @@ Class Procs: var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - if (electrocute_mob(user, get_area(src), src, 0.7)) + if(electrocute_mob(user, get_area(src), src, 0.7)) var/area/temp_area = get_area(src) if(temp_area) var/obj/machinery/power/apc/temp_apc = temp_area.get_apc() @@ -304,7 +304,7 @@ Class Procs: RefreshParts() else user << "Following parts detected in the machine:" - for(var/var/obj/item/C in component_parts) + for(var/var/obj/item/C in component_parts) //var/var/obj/item/C? user << " [C.name]" return 1 @@ -324,31 +324,77 @@ Class Procs: update_icon() return 1 +/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S) + if(!istype(S)) + return 0 + if(!circuit) + return 0 + user << "You start disconnecting the monitor." + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + if(stat & BROKEN) + user << "The broken glass falls out." + new /obj/item/weapon/material/shard(src.loc) + else + user << "You disconnect the monitor." + . = dismantle() + +/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S) + if(!istype(S)) + return 0 + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + panel_open = !panel_open + user << "The wires have been [panel_open ? "exposed" : "unexposed"]" + update_icon() + return 1 + +/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/weapon/wirecutters/W) + if(!istype(W)) + return 0 + if(!panel_open) + return 0 + user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") + playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + new/obj/item/stack/cable_coil(get_turf(src), 5) + . = dismantle() + /obj/machinery/proc/dismantle() - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) + playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + var/obj/structure/frame/A = new /obj/structure/frame(src.loc) var/obj/item/weapon/circuitboard/M = circuit A.circuit = M A.anchored = 1 A.density = 1 A.frame_type = M.board_type - if(A.frame_type in A.no_circuit) + if(A.frame_type.circuit) A.need_circuit = 0 - for (var/obj/D in src.component_parts) - D.forceMove(loc) - if(A.components) - A.components.Cut() + + if(A.frame_type.frame_class == "machine") + for(var/obj/D in component_parts) + D.forceMove(src.loc) + if(A.components) + A.components.Cut() + else + A.components = list() + component_parts = list() + A.check_components() + + if(A.frame_type.frame_class == "alarm") + A.state = 2 + else if(A.frame_type.frame_class == "computer" || A.frame_type.frame_class == "display") + if(stat & BROKEN) + A.state = 3 + else + A.state = 4 else - A.components = list() - component_parts = list() - A.icon_state = "[A.frame_type]_3" - A.state = 3 - A.dir = dir + A.state = 3 + + A.set_dir(dir) A.pixel_x = pixel_x A.pixel_y = pixel_y - A.check_components() A.update_desc() + A.update_icon() M.loc = null M.deconstruct(src) qdel(src) - return 1 + return 1 \ No newline at end of file diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index ca044a5a48..af61e93424 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -5,7 +5,6 @@ // This was created for firing ranges, but I suppose this could have other applications - Doohl /obj/machinery/magnetic_module - icon = 'icons/obj/objects.dmi' icon_state = "floor_magnet-f" name = "Electromagnetic Generator" @@ -29,166 +28,157 @@ var/center_y = 0 var/max_dist = 20 // absolute value of center_x,y cannot exceed this integer - New() - ..() - var/turf/T = loc - hide(!T.is_plating()) - center = T +/obj/machinery/magnetic_module/New() + ..() + var/turf/T = loc + hide(!T.is_plating()) + center = T - spawn(10) // must wait for map loading to finish - if(radio_controller) - radio_controller.add_object(src, freq, RADIO_MAGNETS) + spawn(10) // must wait for map loading to finish + if(radio_controller) + radio_controller.add_object(src, freq, RADIO_MAGNETS) - spawn() - magnetic_process() + spawn() + magnetic_process() - // update the invisibility and icon - hide(var/intact) - invisibility = intact ? 101 : 0 - updateicon() +// update the invisibility and icon +/obj/machinery/magnetic_module/hide(var/intact) + invisibility = intact ? 101 : 0 + updateicon() - // update the icon_state - proc/updateicon() - var/state="floor_magnet" - var/onstate="" - if(!on) - onstate="0" +// update the icon_state +/obj/machinery/magnetic_module/proc/updateicon() + var/state="floor_magnet" + var/onstate="" + if(!on) + onstate="0" - if(invisibility) - icon_state = "[state][onstate]-f" // if invisible, set icon to faded version - // in case of being revealed by T-scanner - else - icon_state = "[state][onstate]" + if(invisibility) + icon_state = "[state][onstate]-f" // if invisible, set icon to faded version + // in case of being revealed by T-scanner + else + icon_state = "[state][onstate]" - receive_signal(datum/signal/signal) +/obj/machinery/magnetic_module/receive_signal(datum/signal/signal) + var/command = signal.data["command"] + var/modifier = signal.data["modifier"] + var/signal_code = signal.data["code"] + if(command && (signal_code == code)) - var/command = signal.data["command"] - var/modifier = signal.data["modifier"] - var/signal_code = signal.data["code"] - if(command && (signal_code == code)) + Cmd(command, modifier) - Cmd(command, modifier) +/obj/machinery/magnetic_module/proc/Cmd(var/command, var/modifier) + if(command) + switch(command) + if("set-electriclevel") + if(modifier) electricity_level = modifier + if("set-magneticfield") + if(modifier) magnetic_field = modifier + if("add-elec") + electricity_level++ + if(electricity_level > 12) + electricity_level = 12 + if("sub-elec") + electricity_level-- + if(electricity_level <= 0) + electricity_level = 1 + if("add-mag") + magnetic_field++ + if(magnetic_field > 4) + magnetic_field = 4 + if("sub-mag") + magnetic_field-- + if(magnetic_field <= 0) + magnetic_field = 1 + if("set-x") + if(modifier) center_x = modifier + if("set-y") + if(modifier) center_y = modifier - proc/Cmd(var/command, var/modifier) + if("N") // NORTH + center_y++ + if("S") // SOUTH + center_y-- + if("E") // EAST + center_x++ + if("W") // WEST + center_x-- + if("C") // CENTER + center_x = 0 + center_y = 0 + if("R") // RANDOM + center_x = rand(-max_dist, max_dist) + center_y = rand(-max_dist, max_dist) - if(command) - switch(command) - if("set-electriclevel") - if(modifier) electricity_level = modifier - if("set-magneticfield") - if(modifier) magnetic_field = modifier + if("set-code") + if(modifier) code = modifier + if("toggle-power") + on = !on - if("add-elec") - electricity_level++ - if(electricity_level > 12) - electricity_level = 12 - if("sub-elec") - electricity_level-- - if(electricity_level <= 0) - electricity_level = 1 - if("add-mag") - magnetic_field++ - if(magnetic_field > 4) - magnetic_field = 4 - if("sub-mag") - magnetic_field-- - if(magnetic_field <= 0) - magnetic_field = 1 + if(on) + spawn() + magnetic_process() - if("set-x") - if(modifier) center_x = modifier - if("set-y") - if(modifier) center_y = modifier +/obj/machinery/magnetic_module/process() + if(stat & NOPOWER) + on = 0 - if("N") // NORTH - center_y++ - if("S") // SOUTH - center_y-- - if("E") // EAST - center_x++ - if("W") // WEST - center_x-- - if("C") // CENTER - center_x = 0 - center_y = 0 - if("R") // RANDOM - center_x = rand(-max_dist, max_dist) - center_y = rand(-max_dist, max_dist) + // Sanity checks: + if(electricity_level <= 0) + electricity_level = 1 + if(magnetic_field <= 0) + magnetic_field = 1 - if("set-code") - if(modifier) code = modifier - if("toggle-power") - on = !on + // Limitations: + if(abs(center_x) > max_dist) + center_x = max_dist + if(abs(center_y) > max_dist) + center_y = max_dist + if(magnetic_field > 4) + magnetic_field = 4 + if(electricity_level > 12) + electricity_level = 12 - if(on) - spawn() - magnetic_process() + // Update power usage: + if(on) + use_power = 2 + active_power_usage = electricity_level*15 + else + use_power = 0 + // Overload conditions: + /* // Eeeehhh kinda stupid + if(on) + if(electricity_level > 11) + if(prob(electricity_level)) + explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son + spawn(2) + qdel(src) + */ + updateicon() - process() - if(stat & NOPOWER) - on = 0 +/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling + if(pulling) return + while(on) - // Sanity checks: - if(electricity_level <= 0) - electricity_level = 1 - if(magnetic_field <= 0) - magnetic_field = 1 + pulling = 1 + center = locate(x+center_x, y+center_y, z) + if(center) + for(var/obj/M in orange(magnetic_field, center)) + if(!M.anchored && (M.flags & CONDUCT)) + step_towards(M, center) + for(var/mob/living/silicon/S in orange(magnetic_field, center)) + if(istype(S, /mob/living/silicon/ai)) continue + step_towards(S, center) - // Limitations: - if(abs(center_x) > max_dist) - center_x = max_dist - if(abs(center_y) > max_dist) - center_y = max_dist - if(magnetic_field > 4) - magnetic_field = 4 - if(electricity_level > 12) - electricity_level = 12 + use_power(electricity_level * 5) + sleep(13 - electricity_level) - // Update power usage: - if(on) - use_power = 2 - active_power_usage = electricity_level*15 - else - use_power = 0 - - - // Overload conditions: - /* // Eeeehhh kinda stupid - if(on) - if(electricity_level > 11) - if(prob(electricity_level)) - explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son - spawn(2) - qdel(src) - */ - - updateicon() - - - proc/magnetic_process() // proc that actually does the pulling - if(pulling) return - while(on) - - pulling = 1 - center = locate(x+center_x, y+center_y, z) - if(center) - for(var/obj/M in orange(magnetic_field, center)) - if(!M.anchored && (M.flags & CONDUCT)) - step_towards(M, center) - - for(var/mob/living/silicon/S in orange(magnetic_field, center)) - if(istype(S, /mob/living/silicon/ai)) continue - step_towards(S, center) - - use_power(electricity_level * 5) - sleep(13 - electricity_level) - - pulling = 0 + pulling = 0 /obj/machinery/magnetic_module/Destroy() if(radio_controller) @@ -220,186 +210,186 @@ var/datum/radio_frequency/radio_connection - New() - ..() +/obj/machinery/magnetic_controller/New() + ..() - if(autolink) - for(var/obj/machinery/magnetic_module/M in world) - if(M.freq == frequency && M.code == code) - magnets.Add(M) + if(autolink) + for(var/obj/machinery/magnetic_module/M in world) + if(M.freq == frequency && M.code == code) + magnets.Add(M) - spawn(45) // must wait for map loading to finish - if(radio_controller) - radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS) + spawn(45) // must wait for map loading to finish + if(radio_controller) + radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS) - if(path) // check for default path - filter_path() // renders rpath + if(path) // check for default path + filter_path() // renders rpath - process() - if(magnets.len == 0 && autolink) - for(var/obj/machinery/magnetic_module/M in world) - if(M.freq == frequency && M.code == code) - magnets.Add(M) +/obj/machinery/magnetic_controller/process() + if(magnets.len == 0 && autolink) + for(var/obj/machinery/magnetic_module/M in world) + if(M.freq == frequency && M.code == code) + magnets.Add(M) - attack_ai(mob/user as mob) - return src.attack_hand(user) +/obj/machinery/magnetic_controller/attack_ai(mob/user as mob) + return attack_hand(user) + +/obj/machinery/magnetic_controller/attack_hand(mob/user as mob) + if(stat & (BROKEN|NOPOWER)) + return + user.set_machine(src) + var/dat = "Magnetic Control Console

    " + if(!autolink) + dat += {" + Frequency: [frequency]
    + Code: [code]
    + Probe Generators
    + "} + + if(magnets.len >= 1) + + dat += "Magnets confirmed:
    " + var/i = 0 + for(var/obj/machinery/magnetic_module/M in magnets) + i++ + dat += "     < \[[i]\] ([M.on ? "On":"Off"]) | Electricity level: - [M.electricity_level] +; Magnetic field: - [M.magnetic_field] +
    " + + dat += "
    Speed: - [speed] +
    " + dat += "Path: {[path]}
    " + dat += "Moving: [moving ? "Enabled":"Disabled"]" + + + user << browse(dat, "window=magnet;size=400x500") + onclose(user, "magnet") + +/obj/machinery/magnetic_controller/Topic(href, href_list) + if(stat & (BROKEN|NOPOWER)) + return + usr.set_machine(src) + add_fingerprint(usr) + + if(href_list["radio-op"]) + + // Prepare signal beforehand, because this is a radio operation + var/datum/signal/signal = new + signal.transmission_method = 1 // radio transmission + signal.source = src + signal.frequency = frequency + signal.data["code"] = code + + // Apply any necessary commands + switch(href_list["radio-op"]) + if("togglepower") + signal.data["command"] = "toggle-power" + + if("minuselec") + signal.data["command"] = "sub-elec" + if("pluselec") + signal.data["command"] = "add-elec" + + if("minusmag") + signal.data["command"] = "sub-mag" + if("plusmag") + signal.data["command"] = "add-mag" + + + // Broadcast the signal + + radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS) + + spawn(1) + updateUsrDialog() // pretty sure this increases responsiveness + + if(href_list["operation"]) + switch(href_list["operation"]) + if("plusspeed") + speed ++ + if(speed > 10) + speed = 10 + if("minusspeed") + speed -- + if(speed <= 0) + speed = 1 + if("setpath") + var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null) + if(newpath && newpath != "") + moving = 0 // stop moving + path = newpath + pathpos = 1 // reset position + filter_path() // renders rpath + + if("togglemoving") + moving = !moving + if(moving) + spawn() MagnetMove() + + + updateUsrDialog() + +/obj/machinery/magnetic_controller/proc/MagnetMove() + if(looping) return + + while(moving && rpath.len >= 1) - attack_hand(mob/user as mob) if(stat & (BROKEN|NOPOWER)) - return - user.set_machine(src) - var/dat = "Magnetic Control Console

    " - if(!autolink) - dat += {" - Frequency: [frequency]
    - Code: [code]
    - Probe Generators
    - "} + break - if(magnets.len >= 1) + looping = 1 - dat += "Magnets confirmed:
    " - var/i = 0 - for(var/obj/machinery/magnetic_module/M in magnets) - i++ - dat += "     < \[[i]\] ([M.on ? "On":"Off"]) | Electricity level: - [M.electricity_level] +; Magnetic field: - [M.magnetic_field] +
    " + // Prepare the radio signal + var/datum/signal/signal = new + signal.transmission_method = 1 // radio transmission + signal.source = src + signal.frequency = frequency + signal.data["code"] = code - dat += "
    Speed: - [speed] +
    " - dat += "Path: {[path]}
    " - dat += "Moving: [moving ? "Enabled":"Disabled"]" + if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list! + pathpos = 1 + + var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive + + if(!(nextmove in list("N","S","E","W","C","R"))) + // N, S, E, W are directional + // C is center + // R is random (in magnetic field's bounds) + qdel(signal) + break // break the loop if the character located is invalid + + signal.data["command"] = nextmove - user << browse(dat, "window=magnet;size=400x500") - onclose(user, "magnet") - - Topic(href, href_list) - if(stat & (BROKEN|NOPOWER)) - return - usr.set_machine(src) - src.add_fingerprint(usr) - - if(href_list["radio-op"]) - - // Prepare signal beforehand, because this is a radio operation - var/datum/signal/signal = new - signal.transmission_method = 1 // radio transmission - signal.source = src - signal.frequency = frequency - signal.data["code"] = code - - // Apply any necessary commands - switch(href_list["radio-op"]) - if("togglepower") - signal.data["command"] = "toggle-power" - - if("minuselec") - signal.data["command"] = "sub-elec" - if("pluselec") - signal.data["command"] = "add-elec" - - if("minusmag") - signal.data["command"] = "sub-mag" - if("plusmag") - signal.data["command"] = "add-mag" - - - // Broadcast the signal + pathpos++ // increase iterator + // Broadcast the signal + spawn() radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS) - spawn(1) - updateUsrDialog() // pretty sure this increases responsiveness + if(speed == 10) + sleep(1) + else + sleep(12-speed) - if(href_list["operation"]) - switch(href_list["operation"]) - if("plusspeed") - speed ++ - if(speed > 10) - speed = 10 - if("minusspeed") - speed -- - if(speed <= 0) - speed = 1 - if("setpath") - var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null) - if(newpath && newpath != "") - moving = 0 // stop moving - path = newpath - pathpos = 1 // reset position - filter_path() // renders rpath - - if("togglemoving") - moving = !moving - if(moving) - spawn() MagnetMove() + looping = 0 - updateUsrDialog() +/obj/machinery/magnetic_controller/proc/filter_path() + // Generates the rpath variable using the path string, think of this as "string2list" + // Doesn't use params2list() because of the akward way it stacks entities + rpath = list() // clear rpath + var/maximum_character = min(50, length(path)) // chooses the maximum length of the iterator. 50 max length - proc/MagnetMove() - if(looping) return + for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path - while(moving && rpath.len >= 1) + var/nextchar = copytext(path, i, i+1) // find next character - if(stat & (BROKEN|NOPOWER)) - break + if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore + rpath += copytext(path, i, i+1) // else, add to list - looping = 1 - - // Prepare the radio signal - var/datum/signal/signal = new - signal.transmission_method = 1 // radio transmission - signal.source = src - signal.frequency = frequency - signal.data["code"] = code - - if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list! - pathpos = 1 - - var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive - - if(!(nextmove in list("N","S","E","W","C","R"))) - // N, S, E, W are directional - // C is center - // R is random (in magnetic field's bounds) - qdel(signal) - break // break the loop if the character located is invalid - - signal.data["command"] = nextmove - - - pathpos++ // increase iterator - - // Broadcast the signal - spawn() - radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS) - - if(speed == 10) - sleep(1) - else - sleep(12-speed) - - looping = 0 - - - proc/filter_path() - // Generates the rpath variable using the path string, think of this as "string2list" - // Doesn't use params2list() because of the akward way it stacks entities - rpath = list() // clear rpath - var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length - - for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path - - var/nextchar = copytext(path, i, i+1) // find next character - - if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore - rpath += copytext(path, i, i+1) // else, add to list - - // there doesn't HAVE to be separators but it makes paths syntatically visible + // there doesn't HAVE to be separators but it makes paths syntatically visible /obj/machinery/magnetic_controller/Destroy() if(radio_controller) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index f563d9ef39..4d1affb3a0 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -18,7 +18,6 @@ /obj/machinery/mass_driver/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/motor(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) @@ -59,7 +58,7 @@ M << "The mass driver lets out a screech, it mustn't be able to handle any more items." break use_power(500) - spawn( 0 ) + spawn(0) O.throw_at(target, drive_range * power, power) flick("mass_driver1", src) return diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 0c14c66990..fe5cac9c44 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -1,11 +1,9 @@ // Navigation beacon for AI robots // Functions as a transponder: looks for incoming signal matching - var/global/list/navbeacons // no I don't like putting this in, but it will do for now /obj/machinery/navbeacon - icon = 'icons/obj/objects.dmi' icon_state = "navbeacon0-f" name = "navigation beacon" @@ -13,162 +11,160 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do level = 1 // underfloor layer = 2.5 anchored = 1 - var/open = 0 // true if cover is open var/locked = 1 // true if controls are locked var/freq = 1445 // radio frequency var/location = "" // location response text var/list/codes // assoc. list of transponder codes var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value" - req_access = list(access_engine) - New() - ..() +/obj/machinery/navbeacon/New() + ..() - set_codes() + set_codes() - var/turf/T = loc - hide(!T.is_plating()) + var/turf/T = loc + hide(!T.is_plating()) - // add beacon to MULE bot beacon list - if(freq == 1400) - if(!navbeacons) - navbeacons = new() - navbeacons += src + // add beacon to MULE bot beacon list + if(freq == 1400) + if(!navbeacons) + navbeacons = new() + navbeacons += src - spawn(5) // must wait for map loading to finish - if(radio_controller) - radio_controller.add_object(src, freq, RADIO_NAVBEACONS) + spawn(5) // must wait for map loading to finish + if(radio_controller) + radio_controller.add_object(src, freq, RADIO_NAVBEACONS) - // set the transponder codes assoc list from codes_txt - proc/set_codes() - if(!codes_txt) - return - - codes = new() - - var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons - - for(var/e in entries) - var/index = findtext(e, "=") // format is "key=value" - if(index) - var/key = copytext(e, 1, index) - var/val = copytext(e, index+1) - codes[key] = val - else - codes[e] = "1" - - - // called when turf state changes - // hide the object if turf is intact - hide(var/intact) - invisibility = intact ? 101 : 0 - updateicon() - - // update the icon_state - proc/updateicon() - var/state="navbeacon[open]" - - if(invisibility) - icon_state = "[state]-f" // if invisible, set icon to faded version - // in case revealed by T-scanner - else - icon_state = "[state]" - - - // look for a signal of the form "findbeacon=X" - // where X is any - // or the location - // or one of the set transponder keys - // if found, return a signal - receive_signal(datum/signal/signal) - - var/request = signal.data["findbeacon"] - if(request && ((request in codes) || request == "any" || request == location)) - spawn(1) - post_signal() - - // return a signal giving location and transponder codes - - proc/post_signal() - - var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq) - - if(!frequency) return - - var/datum/signal/signal = new() - signal.source = src - signal.transmission_method = 1 - signal.data["beacon"] = location - - for(var/key in codes) - signal.data[key] = codes[key] - - frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS) - - - attackby(var/obj/item/I, var/mob/user) - var/turf/T = loc - if(!T.is_plating()) - return // prevent intraction when T-scanner revealed - - if(istype(I, /obj/item/weapon/screwdriver)) - open = !open - - user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") - - updateicon() - - else if (istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda)) - if(open) - if (src.allowed(user)) - src.locked = !src.locked - user << "Controls are now [src.locked ? "locked." : "unlocked."]" - else - user << "Access denied." - updateDialog() - else - user << "You must open the cover first!" +// set the transponder codes assoc list from codes_txt +/obj/machinery/navbeacon/proc/set_codes() + if(!codes_txt) return - attack_ai(var/mob/user) - interact(user, 1) + codes = new() - attack_hand(var/mob/user) + var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons - if(!user.IsAdvancedToolUser()) - return 0 - - interact(user, 0) - - interact(var/mob/user, var/ai = 0) - var/turf/T = loc - if(!T.is_plating()) - return // prevent intraction when T-scanner revealed - - if(!open && !ai) // can't alter controls if not open, unless you're an AI - user << "The beacon's control cover is closed." - return + for(var/e in entries) + var/index = findtext(e, "=") // format is "key=value" + if(index) + var/key = copytext(e, 1, index) + var/val = copytext(e, index+1) + codes[key] = val + else + codes[e] = "1" - var/t +// called when turf state changes +// hide the object if turf is intact +/obj/machinery/navbeacon/hide(var/intact) + invisibility = intact ? 101 : 0 + updateicon() - if(locked && !ai) - t = {"Navigation Beacon

    +// update the icon_state +/obj/machinery/navbeacon/proc/updateicon() + var/state="navbeacon[open]" + + if(invisibility) + icon_state = "[state]-f" // if invisible, set icon to faded version + // in case revealed by T-scanner + else + icon_state = "[state]" + + +// look for a signal of the form "findbeacon=X" +// where X is any +// or the location +// or one of the set transponder keys +// if found, return a signal +/obj/machinery/navbeacon/receive_signal(datum/signal/signal) + + var/request = signal.data["findbeacon"] + if(request && ((request in codes) || request == "any" || request == location)) + spawn(1) + post_signal() + +// return a signal giving location and transponder codes + +/obj/machinery/navbeacon/proc/post_signal() + + var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq) + + if(!frequency) return + + var/datum/signal/signal = new() + signal.source = src + signal.transmission_method = 1 + signal.data["beacon"] = location + + for(var/key in codes) + signal.data[key] = codes[key] + + frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS) + + +/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user) + var/turf/T = loc + if(!T.is_plating()) + return // prevent intraction when T-scanner revealed + + if(istype(I, /obj/item/weapon/screwdriver)) + open = !open + + user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") + + updateicon() + + else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda)) + if(open) + if(allowed(user)) + locked = !locked + user << "Controls are now [locked ? "locked." : "unlocked."]" + else + user << "Access denied." + updateDialog() + else + user << "You must open the cover first!" + return + +/obj/machinery/navbeacon/attack_ai(var/mob/user) + interact(user, 1) + +/obj/machinery/navbeacon/attack_hand(var/mob/user) + + if(!user.IsAdvancedToolUser()) + return 0 + + interact(user, 0) + +/obj/machinery/navbeacon/interact(var/mob/user, var/ai = 0) + var/turf/T = loc + if(!T.is_plating()) + return // prevent intraction when T-scanner revealed + + if(!open && !ai) // can't alter controls if not open, unless you're an AI + user << "The beacon's control cover is closed." + return + + + var/t + + if(locked && !ai) + t = {"Navigation Beacon

    (swipe card to unlock controls)
    Frequency: [format_frequency(freq)]

    Location: [location ? location : "(none)"]
    Transponder Codes:
    diff --git a/vorestation.dme b/vorestation.dme index a05f9b4733..9720c7bf50 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -430,7 +430,6 @@ #include "code\game\gamemodes\technomancer\core_obj.dm" #include "code\game\gamemodes\technomancer\equipment.dm" #include "code\game\gamemodes\technomancer\instability.dm" -#include "code\game\gamemodes\technomancer\presets.dm" #include "code\game\gamemodes\technomancer\spell_objs.dm" #include "code\game\gamemodes\technomancer\spell_objs_helpers.dm" #include "code\game\gamemodes\technomancer\technomancer.dm" @@ -508,7 +507,6 @@ #include "code\game\jobs\whitelist_vr.dm" #include "code\game\jobs\job\assistant.dm" #include "code\game\jobs\job\captain.dm" -#include "code\game\jobs\job\captain_vr.dm" #include "code\game\jobs\job\civilian.dm" #include "code\game\jobs\job\civilian_chaplain.dm" #include "code\game\jobs\job\engineering.dm" @@ -1323,6 +1321,10 @@ #include "code\modules\economy\price_list.dm" #include "code\modules\economy\retail_scanner.dm" #include "code\modules\economy\TradeDestinations.dm" +#include "code\modules\error_handler\_defines.dm" +#include "code\modules\error_handler\error_handler.dm" +#include "code\modules\error_handler\error_viewer.dm" +#include "code\modules\error_handler\~defines.dm" #include "code\modules\events\apc_damage.dm" #include "code\modules\events\blob.dm" #include "code\modules\events\brand_intelligence.dm" @@ -1359,12 +1361,14 @@ #include "code\modules\examine\stat_icons.dm" #include "code\modules\examine\descriptions\armor.dm" #include "code\modules\examine\descriptions\atmospherics.dm" +#include "code\modules\examine\descriptions\containers.dm" #include "code\modules\examine\descriptions\devices.dm" #include "code\modules\examine\descriptions\engineering.dm" #include "code\modules\examine\descriptions\machines.dm" #include "code\modules\examine\descriptions\medical.dm" #include "code\modules\examine\descriptions\mobs.dm" #include "code\modules\examine\descriptions\paperwork.dm" +#include "code\modules\examine\descriptions\smokeables.dm" #include "code\modules\examine\descriptions\stacks.dm" #include "code\modules\examine\descriptions\structures.dm" #include "code\modules\examine\descriptions\telecomms.dm" @@ -1842,6 +1846,7 @@ #include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm" #include "code\modules\power\singularity\particle_accelerator\particle_power.dm" #include "code\modules\projectiles\ammunition.dm" +#include "code\modules\projectiles\dnalocking.dm" #include "code\modules\projectiles\effects.dm" #include "code\modules\projectiles\gun.dm" #include "code\modules\projectiles\projectile.dm"
    Command
    SpecialCaptain
    SpecialStation AdministratorCustom
    Special - {{:helper.link("Captain", '', {'choice' : 'assign', 'assign_target' : 'Captain'}, data.target_rank == 'Captain' ? 'disabled' : null)}} + {{:helper.link("Station Administrator", '', {'choice' : 'assign', 'assign_target' : 'Station Administrator'}, data.target_rank == 'Station Administrator' ? 'disabled' : null)}} {{:helper.link("Custom", '', {'choice' : 'assign', 'assign_target' : 'Custom'})}}