From 72ac0631a59ac1dadded8b1d0800dfa34879edf0 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 15 Jun 2023 21:50:52 -0300 Subject: [PATCH 01/18] e1 --- .../AsteroidStation/AsteroidStation.dmm | 6 +- _maps/map_files/YogStation/YogStation.dmm | 4 +- code/__DEFINES/atmospherics.dm | 2 +- .../signals/signals_atom/signals_atom_main.dm | 2 + code/__DEFINES/flags.dm | 16 +++ code/__DEFINES/layers.dm | 4 +- code/_globalvars/lists/objects.dm | 3 + code/_onclick/click.dm | 2 +- code/_onclick/hud/action_button.dm | 7 +- code/_onclick/hud/alert.dm | 34 +++++ code/_onclick/hud/alien.dm | 2 +- code/_onclick/hud/drones.dm | 2 +- code/_onclick/hud/generic_dextrous.dm | 2 +- code/_onclick/hud/guardian.dm | 2 +- code/_onclick/hud/hud.dm | 2 +- code/_onclick/hud/human.dm | 2 +- code/_onclick/hud/lavaland_elite.dm | 2 +- code/_onclick/hud/living.dm | 2 +- code/_onclick/hud/monkey.dm | 2 +- code/_onclick/hud/revenanthud.dm | 2 +- code/_onclick/hud/robot.dm | 4 +- code/_onclick/hud/screen_objects.dm | 9 +- code/_onclick/hud/slime.dm | 2 +- code/_onclick/other_mobs.dm | 2 +- code/_onclick/telekinesis.dm | 12 +- code/controllers/subsystem/communications.dm | 2 +- code/controllers/subsystem/mapping.dm | 2 +- code/controllers/subsystem/persistence.dm | 2 +- code/datums/actions/action.dm | 16 +-- code/datums/components/acid.dm | 4 +- code/datums/components/armor_plate.dm | 2 +- code/datums/components/crafting/crafting.dm | 2 + code/datums/components/grillable.dm | 4 +- .../components/storage/concrete/_concrete.dm | 10 +- code/datums/components/storage/storage.dm | 4 +- code/datums/diseases/appendicitis.dm | 2 +- code/datums/elements/update_icon_blocker.dm | 18 +++ code/datums/martial/sleeping_carp.dm | 2 +- code/datums/status_effects/debuffs/debuffs.dm | 6 +- code/datums/wires/airalarm.dm | 8 +- code/datums/wires/airlock.dm | 8 +- code/datums/wires/airlock_cycle.dm | 4 +- code/datums/wires/igniter.dm | 8 +- code/datums/wires/syndicatebomb.dm | 4 +- code/game/area/areas.dm | 10 +- code/game/atoms.dm | 98 +++++++++++++++ code/game/gamemodes/clock_cult/clock_cult.dm | 2 +- .../game/gamemodes/clown_ops/bananium_bomb.dm | 2 +- code/game/gamemodes/cult/cult.dm | 2 +- code/game/gamemodes/events.dm | 6 +- code/game/golf/golf.dm | 2 +- code/game/machinery/PDApainter.dm | 30 ++--- code/game/machinery/Sleeper.dm | 4 +- code/game/machinery/_machinery.dm | 8 +- code/game/machinery/ai_slipper.dm | 2 +- code/game/machinery/airlock_control.dm | 14 +-- code/game/machinery/airlock_cycle_control.dm | 46 +++---- code/game/machinery/announcement_system.dm | 12 +- code/game/machinery/aug_manipulator.dm | 10 +- code/game/machinery/autolathe.dm | 4 +- code/game/machinery/bounty_board.dm | 2 +- code/game/machinery/buttons.dm | 12 +- code/game/machinery/camera/camera.dm | 14 +-- code/game/machinery/camera/camera_assembly.dm | 8 +- code/game/machinery/camera/presets.dm | 4 +- code/game/machinery/cell_charger.dm | 10 +- code/game/machinery/cloning.dm | 4 +- code/game/machinery/computer/_computer.dm | 8 +- code/game/machinery/computer/aifixer.dm | 8 +- code/game/machinery/computer/apc_control.dm | 8 +- code/game/machinery/computer/arcade.dm | 4 +- code/game/machinery/computer/atmos_alert.dm | 8 +- code/game/machinery/computer/atmos_control.dm | 4 +- code/game/machinery/computer/camera.dm | 2 +- code/game/machinery/computer/medical.dm | 2 +- code/game/machinery/computer/security.dm | 2 +- code/game/machinery/computer/station_alert.dm | 2 +- code/game/machinery/computer/teleporter.dm | 12 +- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/dance_machine.dm | 6 +- code/game/machinery/decontamination.dm | 14 +-- code/game/machinery/defibrillator_mount.dm | 12 +- code/game/machinery/dish_drive.dm | 2 +- code/game/machinery/dna_scanner.dm | 4 +- code/game/machinery/doors/airlock.dm | 54 ++++---- code/game/machinery/doors/airlock_types.dm | 6 +- code/game/machinery/doors/brigdoors.dm | 12 +- code/game/machinery/doors/door.dm | 13 +- code/game/machinery/doors/firedoor.dm | 49 ++++---- code/game/machinery/doors/passworddoor.dm | 4 +- code/game/machinery/doors/poddoor.dm | 2 +- code/game/machinery/doors/windowdoor.dm | 46 ++++++- code/game/machinery/doppler_array.dm | 2 +- code/game/machinery/droneDispenser.dm | 10 +- code/game/machinery/electrolyzer.dm | 18 +-- .../embedded_controller/access_controller.dm | 16 +-- .../embedded_controller/airlock_controller.dm | 2 +- .../embedded_controller_base.dm | 4 +- .../simple_vent_controller.dm | 2 +- code/game/machinery/fat_sucker.dm | 10 +- code/game/machinery/firealarm.dm | 48 ++++---- code/game/machinery/flasher.dm | 2 +- code/game/machinery/gulag_processor.dm | 6 +- code/game/machinery/gulag_teleporter.dm | 4 +- code/game/machinery/harvester.dm | 2 +- code/game/machinery/hologram.dm | 19 +-- code/game/machinery/holosign.dm | 6 +- code/game/machinery/igniter.dm | 10 +- code/game/machinery/iv_drip.dm | 87 ++++++------- code/game/machinery/lightswitch.dm | 32 +++-- code/game/machinery/magnet.dm | 6 +- code/game/machinery/medical_kiosk.dm | 2 +- code/game/machinery/navbeacon.dm | 6 +- code/game/machinery/newscaster.dm | 55 +++++---- code/game/machinery/pipe/pipe_dispenser.dm | 2 +- .../machinery/porta_turret/portable_turret.dm | 22 ++-- .../porta_turret/portable_turret_cover.dm | 4 +- code/game/machinery/prisonlabor.dm | 10 +- code/game/machinery/recharger.dm | 30 +++-- code/game/machinery/rechargestation.dm | 12 +- code/game/machinery/recycler.dm | 14 +-- code/game/machinery/requests_console.dm | 62 ++++++---- code/game/machinery/sci_bombardment.dm | 14 +-- code/game/machinery/shieldgen.dm | 8 +- code/game/machinery/slotmachine.dm | 6 +- code/game/machinery/spaceheater.dm | 20 +-- code/game/machinery/stasis.dm | 10 +- code/game/machinery/status_display.dm | 42 +++++++ code/game/machinery/suit_storage_unit.dm | 14 +-- code/game/machinery/syndicatebomb.dm | 12 +- .../telecomms/machine_interactions.dm | 4 +- .../telecomms/machines/broadcaster.dm | 2 +- .../telecomms/machines/message_server.dm | 8 +- .../machinery/telecomms/telecomunications.dm | 4 +- code/game/machinery/teleporter.dm | 14 +-- code/game/machinery/transformer.dm | 6 +- code/game/machinery/washing_machine.dm | 16 +-- .../mecha/equipment/tools/medical_tools.dm | 4 +- code/game/mecha/equipment/tools/work_tools.dm | 4 +- .../mecha/equipment/weapons/mecha_ammo.dm | 2 +- code/game/mecha/mech_bay.dm | 15 ++- code/game/mecha/mecha.dm | 16 +-- code/game/mecha/working/ripley.dm | 6 +- code/game/objects/effects/decals/cleanable.dm | 2 +- .../effects/decals/cleanable/humans.dm | 6 +- .../fluid_spread/effects_foam.dm | 2 +- .../fluid_spread/effects_smoke.dm | 2 +- code/game/objects/effects/glowshroom.dm | 2 +- code/game/objects/effects/mines.dm | 11 ++ .../objects/effects/spawners/bombspawner.dm | 2 +- .../temporary_visuals/miscellaneous.dm | 10 +- code/game/objects/items.dm | 2 +- code/game/objects/items/RCD.dm | 10 +- code/game/objects/items/RCL.dm | 22 ++-- code/game/objects/items/RPD.dm | 2 +- code/game/objects/items/ashtray.dm | 6 +- code/game/objects/items/bodybag.dm | 2 +- code/game/objects/items/candle.dm | 11 +- code/game/objects/items/cards_ids.dm | 20 +-- code/game/objects/items/chrono_eraser.dm | 10 +- code/game/objects/items/cigs_lighters.dm | 16 +-- code/game/objects/items/clown_items.dm | 2 +- code/game/objects/items/cosmetics.dm | 32 +++-- code/game/objects/items/crayons.dm | 14 +-- code/game/objects/items/credit_holochip.dm | 8 +- code/game/objects/items/defib.dm | 74 +++++------ code/game/objects/items/devices/PDA/PDA.dm | 26 ++-- code/game/objects/items/devices/aicard.dm | 6 +- code/game/objects/items/devices/flashlight.dm | 33 ++--- .../objects/items/devices/geiger_counter.dm | 22 ++-- .../objects/items/devices/lightreplacer.dm | 6 +- code/game/objects/items/devices/megaphone.dm | 8 +- code/game/objects/items/devices/multitool.dm | 4 +- code/game/objects/items/devices/powersink.dm | 4 +- .../objects/items/devices/quantum_keycard.dm | 2 +- .../objects/items/devices/taperecorder.dm | 18 +-- .../objects/items/devices/traitordevices.dm | 2 +- .../objects/items/devices/transfer_valve.dm | 12 +- code/game/objects/items/dice.dm | 21 ++-- code/game/objects/items/discoball.dm | 8 +- code/game/objects/items/documents.dm | 2 +- code/game/objects/items/etherealdiscoball.dm | 8 +- code/game/objects/items/flamethrower.dm | 20 +-- .../granters/martial_arts/plasma_fist.dm | 4 +- .../granters/martial_arts/sleeping_carp.dm | 4 +- code/game/objects/items/grenades/plastic.dm | 6 +- code/game/objects/items/handcuffs.dm | 8 +- code/game/objects/items/holy_weapons.dm | 8 +- code/game/objects/items/hot_potato.dm | 6 +- code/game/objects/items/hourglass.dm | 6 +- .../objects/items/implants/implantcase.dm | 12 +- .../objects/items/implants/implantchair.dm | 8 +- code/game/objects/items/implants/implanter.dm | 6 +- .../game/objects/items/implants/implantpad.dm | 8 +- code/game/objects/items/inducer.dm | 22 ++-- code/game/objects/items/laser_level.dm | 6 +- code/game/objects/items/latexballoon.dm | 116 +++++++++++++----- code/game/objects/items/mail.dm | 8 +- code/game/objects/items/melee/energy.dm | 2 +- code/game/objects/items/melee/misc.dm | 10 +- code/game/objects/items/mop.dm | 2 +- code/game/objects/items/pet_carrier.dm | 12 +- code/game/objects/items/pinpointer.dm | 6 +- code/game/objects/items/plushes.dm | 19 +-- code/game/objects/items/pneumaticCannon.dm | 6 +- code/game/objects/items/robot/robot_items.dm | 12 +- code/game/objects/items/robot/robot_parts.dm | 18 +-- .../objects/items/robot/robot_upgrades.dm | 6 +- code/game/objects/items/sharpener.dm | 2 +- code/game/objects/items/shields.dm | 20 +-- code/game/objects/items/singularityhammer.dm | 4 +- code/game/objects/items/stacks/cash.dm | 9 +- .../objects/items/stacks/license_plates.dm | 2 +- code/game/objects/items/stacks/medical.dm | 8 +- code/game/objects/items/stacks/rods.dm | 11 +- code/game/objects/items/stacks/stack.dm | 8 +- code/game/objects/items/stacks/tickets.dm | 4 +- code/game/objects/items/storage/bags.dm | 12 +- code/game/objects/items/storage/belt.dm | 18 +-- code/game/objects/items/storage/boxes.dm | 6 +- code/game/objects/items/storage/fancy.dm | 16 +-- code/game/objects/items/storage/lockbox.dm | 16 +-- code/game/objects/items/storage/toolbox.dm | 6 +- code/game/objects/items/storage/wallets.dm | 6 +- code/game/objects/items/stunbaton.dm | 16 +-- .../objects/items/supermatter_delaminator.dm | 22 ++-- .../objects/items/syndicateReverseCard.dm | 4 +- code/game/objects/items/tanks/jetpack.dm | 6 +- code/game/objects/items/tanks/tank_types.dm | 2 +- code/game/objects/items/theft_tools.dm | 8 +- code/game/objects/items/tools/screwdriver.dm | 4 +- code/game/objects/items/tools/weldingtool.dm | 20 +-- code/game/objects/items/tools/wirecutters.dm | 4 +- code/game/objects/items/toys.dm | 44 +++---- code/game/objects/items/twohanded.dm | 57 ++++----- code/game/objects/objs.dm | 3 - code/game/objects/structures/aliens.dm | 8 +- code/game/objects/structures/artstuff.dm | 14 +-- code/game/objects/structures/barsigns.dm | 54 ++++++-- code/game/objects/structures/bedsheet_bin.dm | 10 +- .../structures/crates_lockers/closets.dm | 79 +++++++----- .../closets/bluespace_locker.dm | 2 +- .../crates_lockers/closets/bodybag.dm | 14 +-- .../crates_lockers/closets/secure/personal.dm | 2 +- .../structures/crates_lockers/crates.dm | 8 +- .../structures/crates_lockers/crates/bins.dm | 8 +- .../crates_lockers/crates/critter.dm | 2 +- .../crates_lockers/crates/secure.dm | 4 +- code/game/objects/structures/displaycase.dm | 18 +-- code/game/objects/structures/divine.dm | 6 +- code/game/objects/structures/door_assembly.dm | 12 +- code/game/objects/structures/extinguisher.dm | 14 +-- code/game/objects/structures/false_walls.dm | 6 +- code/game/objects/structures/fireaxe.dm | 28 ++--- code/game/objects/structures/fireplace.dm | 8 +- code/game/objects/structures/grille.dm | 9 +- code/game/objects/structures/guncase.dm | 14 +-- code/game/objects/structures/headpike.dm | 4 +- code/game/objects/structures/holosign.dm | 4 +- code/game/objects/structures/janicart.dm | 14 +-- code/game/objects/structures/ladders.dm | 24 ++-- code/game/objects/structures/life_candle.dm | 4 +- code/game/objects/structures/mineral_doors.dm | 6 +- code/game/objects/structures/mop_bucket.dm | 10 +- code/game/objects/structures/morgue.dm | 22 ++-- code/game/objects/structures/safe.dm | 4 +- code/game/objects/structures/shower.dm | 4 +- code/game/objects/structures/stairs.dm | 6 +- code/game/objects/structures/tables_racks.dm | 2 +- .../game/objects/structures/tank_dispenser.dm | 8 +- .../structures/transit_tubes/station.dm | 4 +- .../transit_tubes/transit_tube_cargo_pod.dm | 2 +- .../transit_tubes/transit_tube_pod.dm | 6 +- code/game/objects/structures/watercloset.dm | 12 +- .../objects/structures/windoor_assembly.dm | 8 +- code/game/objects/structures/window.dm | 36 +++--- code/game/turfs/open.dm | 2 +- code/game/turfs/simulated/floor.dm | 8 +- .../game/turfs/simulated/floor/fancy_floor.dm | 10 +- .../game/turfs/simulated/floor/light_floor.dm | 10 +- .../turfs/simulated/floor/mineral_floor.dm | 2 +- code/game/turfs/simulated/floor/misc_floor.dm | 4 +- .../turfs/simulated/floor/plasteel_floor.dm | 2 +- code/game/turfs/simulated/floor/plating.dm | 2 +- code/game/turfs/simulated/minerals.dm | 4 +- code/game/turfs/simulated/wall/reinf_walls.dm | 26 ++-- code/game/turfs/space/transit.dm | 4 +- code/modules/NTNet/relays.dm | 12 +- code/modules/VR/vr_sleeper.dm | 4 +- code/modules/admin/topic.dm | 2 +- code/modules/admin/verbs/debug.dm | 4 +- code/modules/admin/verbs/manipulate_organs.dm | 2 +- code/modules/antagonists/_common/antag_hud.dm | 6 +- .../abductor/equipment/abduction_gear.dm | 11 +- .../antagonists/abductor/equipment/gland.dm | 4 +- .../abductor/machinery/experiment.dm | 2 +- .../blob/blobstrains/_blobstrain.dm | 2 +- .../blob/blobstrains/replicating_foam.dm | 2 +- code/modules/antagonists/blob/overmind.dm | 4 +- code/modules/antagonists/blob/powers.dm | 4 +- .../antagonists/blob/structures/_blob.dm | 16 +-- .../antagonists/blob/structures/core.dm | 6 +- .../antagonists/blob/structures/node.dm | 2 +- .../antagonists/blob/structures/shield.dm | 2 +- .../bloodsuckers/powers/targeted/lasombra.dm | 2 +- .../structures/bloodsucker_coffin.dm | 2 +- .../structures/bloodsucker_crypt.dm | 30 ++--- .../changeling/powers/mutations.dm | 2 +- .../changeling/powers/tiny_prick.dm | 2 +- .../clockcult/clock_effects/clock_sigils.dm | 4 +- .../clock_helpers/clock_powerdrain.dm | 6 +- .../clockcult/clock_helpers/power_helpers.dm | 2 +- .../antagonists/clockcult/clock_scripture.dm | 4 +- .../ark_of_the_clockwork_justicar.dm | 2 +- code/modules/antagonists/cult/cult_items.dm | 4 +- .../antagonists/cult/cult_structures.dm | 13 +- .../antagonists/devil/true_devil/inventory.dm | 4 +- .../eldritch_cult/eldritch_book.dm | 2 +- .../eldritch_cult/eldritch_magic.dm | 2 +- .../nukeop/equipment/nuclearbomb.dm | 24 ++-- code/modules/antagonists/nukeop/nukeop.dm | 2 +- code/modules/antagonists/official/official.dm | 2 +- .../antagonists/revolution/revolution.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 5 +- .../traitor/equipment/Malf_Modules.dm | 2 +- .../antagonists/zombie/abilities/spit.dm | 2 +- code/modules/assembly/assembly.dm | 4 +- code/modules/assembly/bomb.dm | 4 +- code/modules/assembly/doorcontrol.dm | 2 +- code/modules/assembly/flash.dm | 6 +- code/modules/assembly/health.dm | 2 +- code/modules/assembly/holder.dm | 7 +- code/modules/assembly/infrared.dm | 31 ++--- code/modules/assembly/mousetrap.dm | 12 +- code/modules/assembly/proximity.dm | 12 +- code/modules/assembly/signaler.dm | 10 +- code/modules/assembly/timer.dm | 12 +- .../atmospherics/machinery/airalarm.dm | 24 ++-- .../atmospherics/machinery/atmosmachinery.dm | 8 +- .../binary_devices/binary_devices.dm | 2 +- .../components/binary_devices/circulator.dm | 10 +- .../components/binary_devices/dp_vent_pump.dm | 2 +- .../components/binary_devices/passive_gate.dm | 8 +- .../binary_devices/pressure_valve.dm | 8 +- .../components/binary_devices/pump.dm | 8 +- .../binary_devices/temperature_gate.dm | 6 +- .../binary_devices/temperature_pump.dm | 6 +- .../components/binary_devices/volume_pump.dm | 8 +- .../machinery/components/components_base.dm | 2 +- .../machinery/components/fusion/hfr_parts.dm | 9 +- .../machinery/components/fusion/hfr_procs.dm | 26 ++-- .../gas_recipe_machines/crystallizer.dm | 14 ++- .../components/trinary_devices/filter.dm | 8 +- .../components/trinary_devices/mixer.dm | 8 +- .../components/unary_devices/cryo.dm | 22 ++-- .../unary_devices/heat_exchanger.dm | 2 +- .../unary_devices/outlet_injector.dm | 10 +- .../components/unary_devices/thermomachine.dm | 6 +- .../components/unary_devices/unary_devices.dm | 4 +- .../components/unary_devices/vent_pump.dm | 10 +- .../components/unary_devices/vent_scrubber.dm | 6 +- .../atmospherics/machinery/other/miner.dm | 6 +- .../machinery/pipes/heat_exchange/junction.dm | 2 +- .../machinery/pipes/heat_exchange/manifold.dm | 2 +- .../pipes/heat_exchange/manifold4w.dm | 2 +- .../machinery/pipes/heat_exchange/simple.dm | 2 +- .../machinery/pipes/layermanifold.dm | 6 +- .../atmospherics/machinery/pipes/manifold.dm | 4 +- .../machinery/pipes/manifold4w.dm | 2 +- .../atmospherics/machinery/pipes/pipes.dm | 6 +- .../atmospherics/machinery/pipes/simple.dm | 2 +- .../machinery/portable/canister.dm | 12 +- .../portable/portable_atmospherics.dm | 12 +- .../atmospherics/machinery/portable/pump.dm | 10 +- .../machinery/portable/scrubber.dm | 14 +-- code/modules/awaymissions/gateway.dm | 26 ++-- .../awaymissions/mission_code/Academy.dm | 5 +- code/modules/awaymissions/pamphlet.dm | 5 +- code/modules/buildmode/buildmode.dm | 4 +- code/modules/buildmode/buttons.dm | 8 +- code/modules/cargo/bounty_console.dm | 2 +- code/modules/cargo/centcom_podlauncher.dm | 2 +- code/modules/cargo/expressconsole.dm | 4 +- code/modules/cargo/gondolapod.dm | 6 +- code/modules/cargo/order.dm | 8 +- code/modules/cargo/supplypod.dm | 24 ++-- code/modules/cargo/supplypod_beacon.dm | 4 +- code/modules/client/preferences/ghost.dm | 2 +- code/modules/clothing/chameleon.dm | 2 +- code/modules/clothing/ears/_ears.dm | 6 +- .../clothing/glasses/engine_goggles.dm | 8 +- code/modules/clothing/head/hardhat.dm | 10 +- code/modules/clothing/head/helmet.dm | 10 +- code/modules/clothing/head/misc_special.dm | 8 +- code/modules/clothing/neck/bodycamera.dm | 10 +- code/modules/clothing/shoes/bananashoes.dm | 6 +- code/modules/clothing/spacesuits/hardsuit.dm | 6 +- code/modules/detectivework/scanner.dm | 2 +- code/modules/events/pirates.dm | 6 +- code/modules/events/prison_break.dm | 2 +- code/modules/events/shuttle_loan.dm | 2 +- code/modules/events/stray_cargo.dm | 2 +- .../food_and_drinks/drinks/drinks/bottle.dm | 4 +- .../food_and_drinks/food/customizables.dm | 6 +- code/modules/food_and_drinks/food/snacks.dm | 2 +- .../food_and_drinks/food/snacks_pastry.dm | 8 +- .../kitchen_machinery/gibber.dm | 10 +- .../kitchen_machinery/griddle.dm | 8 +- .../kitchen_machinery/grill.dm | 12 +- .../kitchen_machinery/microwave.dm | 16 +-- .../food_and_drinks/kitchen_machinery/oven.dm | 12 +- .../kitchen_machinery/smartfridge.dm | 24 ++-- code/modules/food_and_drinks/pizzabox.dm | 32 ++--- code/modules/food_and_drinks/plate.dm | 2 +- code/modules/games/cas.dm | 10 +- code/modules/goals/station_goals/bsa.dm | 2 +- code/modules/goals/station_goals/shield.dm | 4 +- code/modules/holodeck/area_copy.dm | 2 +- code/modules/holodeck/items.dm | 4 +- code/modules/holodeck/turfs.dm | 6 +- .../hydroponics/beekeeping/honeycomb.dm | 6 +- code/modules/hydroponics/biogenerator.dm | 20 +-- code/modules/hydroponics/fermenting_barrel.dm | 4 +- code/modules/hydroponics/gene_modder.dm | 24 ++-- code/modules/hydroponics/hydroponics.dm | 34 ++--- code/modules/hydroponics/plant_genes.dm | 4 +- code/modules/instruments/items.dm | 4 +- code/modules/jobs/job_types/_job.dm | 2 +- code/modules/library/lib_items.dm | 16 +-- code/modules/library/random_books.dm | 6 +- code/modules/library/soapstone.dm | 6 +- code/modules/mapping/mapping_helpers.dm | 2 +- code/modules/mapping/minimap.dm | 4 +- .../modules/mining/equipment/explorer_gear.dm | 4 +- .../mining/equipment/kinetic_crusher.dm | 4 +- .../mining/equipment/marker_beacons.dm | 16 +-- .../mining/equipment/regenerative_core.dm | 8 +- code/modules/mining/equipment/survival_pod.dm | 12 +- code/modules/mining/lavaland/ash_flora.dm | 2 +- .../mining/lavaland/necropolis_chests.dm | 12 +- code/modules/mining/lavaland/world_anvil.dm | 6 +- code/modules/mining/machine_redemption.dm | 2 +- code/modules/mining/machine_silo.dm | 2 +- code/modules/mining/machine_vending.dm | 2 +- code/modules/mining/ores_coins.dm | 10 +- .../modules/mob/dead/new_player/new_player.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 8 +- code/modules/mob/inventory.dm | 6 +- code/modules/mob/living/brain/MMI.dm | 8 +- code/modules/mob/living/brain/death.dm | 2 +- code/modules/mob/living/brain/posibrain.dm | 8 +- .../carbon/alien/humanoid/update_icons.dm | 4 +- code/modules/mob/living/carbon/carbon.dm | 4 +- .../mob/living/carbon/carbon_defense.dm | 2 +- .../mob/living/carbon/human/human_movement.dm | 2 +- .../mob/living/carbon/human/inventory.dm | 6 +- .../human/species_types/shadowpeople.dm | 8 +- .../mob/living/carbon/human/update_icons.dm | 28 ++--- code/modules/mob/living/carbon/inventory.dm | 2 +- .../modules/mob/living/carbon/update_icons.dm | 14 +-- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../silicon/ai/decentralized/ai_data_core.dm | 8 +- .../management/ai_controlpanel.dm | 4 +- .../ai/decentralized/server_cabinet.dm | 10 +- .../modules/mob/living/silicon/ai/multicam.dm | 6 +- .../modules/mob/living/silicon/robot/robot.dm | 8 +- .../mob/living/silicon/robot/robot_defense.dm | 2 +- .../mob/living/silicon/robot/robot_modules.dm | 4 +- .../living/simple_animal/bot/SuperBeepsky.dm | 6 +- .../mob/living/simple_animal/bot/atmosbot.dm | 10 +- .../mob/living/simple_animal/bot/bot.dm | 12 +- .../living/simple_animal/bot/construction.dm | 6 +- .../mob/living/simple_animal/bot/ed209bot.dm | 6 +- .../mob/living/simple_animal/bot/firebot.dm | 14 +-- .../mob/living/simple_animal/bot/floorbot.dm | 12 +- .../mob/living/simple_animal/bot/honkbot.dm | 8 +- .../mob/living/simple_animal/bot/medbot.dm | 20 +-- .../mob/living/simple_animal/bot/mulebot.dm | 16 +-- .../mob/living/simple_animal/bot/secbot.dm | 8 +- .../living/simple_animal/eldritch_demons.dm | 2 +- .../simple_animal/friendly/drone/inventory.dm | 4 +- .../friendly/drone/visuals_icons.dm | 4 +- .../simple_animal/friendly/spiderbot.dm | 8 +- .../living/simple_animal/guardian/guardian.dm | 11 +- .../simple_animal/guardian/types/dextrous.dm | 2 +- .../hostile/gorilla/visuals_icons.dm | 4 +- .../hostile/megafauna/colossus.dm | 5 +- .../mob/living/simple_animal/hostile/mimic.dm | 8 +- .../mob/living/simple_animal/simple_animal.dm | 8 +- .../mob/living/simple_animal/slime/slime.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/update_icons.dm | 5 +- .../computers/item/computer.dm | 16 +-- .../computers/item/computer_components.dm | 2 +- .../computers/item/computer_ui.dm | 6 +- .../computers/item/laptop/laptop.dm | 4 +- .../computers/item/processor.dm | 2 +- .../computers/item/tablet/tablet.dm | 4 +- .../machinery/console/modular_console.dm | 4 +- .../computers/machinery/modular_computer.dm | 8 +- .../modular_computers/file_system/program.dm | 4 +- .../programs/antagonist/revelation.dm | 2 +- .../file_system/programs/arcade.dm | 6 +- .../programs/engineering/sm_monitor.dm | 2 +- .../programs/medical/crew_monitor.dm | 2 +- .../file_system/programs/portrait_printer.dm | 2 +- .../file_system/programs/radar.dm | 6 +- .../programs/science/airestorer.dm | 2 +- .../modular_computers/hardware/printer.dm | 4 +- code/modules/ninja/suit/ninjaDrainAct.dm | 4 +- code/modules/ninja/suit/suit_attackby.dm | 2 +- code/modules/pai/card.dm | 10 +- code/modules/pai/death.dm | 2 +- code/modules/pai/door_jack.dm | 2 +- code/modules/pai/pai.dm | 2 +- code/modules/pai/software.dm | 2 +- code/modules/paperwork/carbonpaper.dm | 6 +- code/modules/paperwork/clipboard.dm | 10 +- code/modules/paperwork/contract.dm | 9 +- code/modules/paperwork/faxmachine.dm | 2 +- code/modules/paperwork/filingcabinet.dm | 6 +- code/modules/paperwork/folders.dm | 14 +-- code/modules/paperwork/inspector_booth.dm | 4 +- code/modules/paperwork/paper.dm | 17 +-- code/modules/paperwork/paper_bundle.dm | 8 +- code/modules/paperwork/paper_cutter.dm | 12 +- code/modules/paperwork/paperbin.dm | 14 +-- code/modules/paperwork/paperplane.dm | 6 +- code/modules/paperwork/papershredder.dm | 12 +- code/modules/paperwork/pen.dm | 4 +- code/modules/paperwork/photocopier.dm | 4 +- code/modules/paperwork/ticketmachine.dm | 16 +-- code/modules/photography/photos/frame.dm | 14 +-- code/modules/photography/photos/photo.dm | 4 +- code/modules/plumbing/ducts.dm | 12 +- code/modules/power/apc.dm | 66 +++++----- code/modules/power/cable.dm | 30 ++--- code/modules/power/cell.dm | 23 ++-- code/modules/power/generator.dm | 16 +-- code/modules/power/gravitygenerator.dm | 20 +-- code/modules/power/lighting.dm | 8 +- code/modules/power/port_gen.dm | 6 +- code/modules/power/power.dm | 2 +- code/modules/power/singularity/collector.dm | 8 +- code/modules/power/singularity/emitter.dm | 10 +- .../power/singularity/field_generator.dm | 12 +- .../particle_accelerator.dm | 4 +- .../particle_accelerator/particle_control.dm | 18 +-- code/modules/power/smes.dm | 20 +-- code/modules/power/solar.dm | 10 +- .../projectiles/ammunition/_ammunition.dm | 8 +- .../modules/projectiles/ammunition/_firing.dm | 2 +- .../ammunition/reusable/_reusable.dm | 2 +- .../projectiles/ammunition/reusable/arrow.dm | 12 +- .../projectiles/ammunition/reusable/foam.dm | 4 +- .../projectiles/attachments/_attachment.dm | 2 +- .../projectiles/attachments/laser_sight.dm | 2 +- .../modules/projectiles/attachments/scopes.dm | 2 +- .../boxes_magazines/_box_magazine.dm | 16 +-- .../boxes_magazines/external/grenade.dm | 2 +- .../boxes_magazines/external/lmg.dm | 2 +- .../boxes_magazines/external/pistol.dm | 8 +- .../boxes_magazines/external/rechargable.dm | 10 +- .../boxes_magazines/external/rifle.dm | 10 +- .../boxes_magazines/external/shotgun.dm | 2 +- .../boxes_magazines/external/smg.dm | 10 +- .../boxes_magazines/external/sniper.dm | 2 +- .../boxes_magazines/external/toy.dm | 6 +- .../boxes_magazines/internal/_cylinder.dm | 2 +- code/modules/projectiles/gun.dm | 14 +-- code/modules/projectiles/guns/ballistic.dm | 42 +++---- .../projectiles/guns/ballistic/automatic.dm | 20 +-- .../modules/projectiles/guns/ballistic/bow.dm | 26 ++-- .../guns/ballistic/laser_gatling.dm | 6 +- .../projectiles/guns/ballistic/minigun.dm | 6 +- .../projectiles/guns/ballistic/revolver.dm | 4 +- .../projectiles/guns/ballistic/rifle.dm | 4 +- .../projectiles/guns/ballistic/shotgun.dm | 6 +- .../modules/projectiles/guns/ballistic/toy.dm | 8 +- code/modules/projectiles/guns/energy.dm | 12 +- .../projectiles/guns/energy/dueling.dm | 14 +-- .../projectiles/guns/energy/energy_gun.dm | 2 +- .../guns/energy/kinetic_accelerator.dm | 6 +- .../projectiles/guns/energy/special.dm | 13 +- code/modules/projectiles/guns/magic.dm | 5 +- code/modules/projectiles/guns/magic/wand.dm | 4 +- .../projectiles/guns/misc/beam_rifle.dm | 2 +- .../projectiles/guns/misc/blastcannon.dm | 8 +- .../projectiles/guns/misc/syringe_gun.dm | 10 +- code/modules/projectiles/projectile/magic.dm | 6 +- .../projectiles/projectile/reusable/arrow.dm | 2 +- .../chemistry/machinery/chem_dispenser.dm | 12 +- .../chemistry/machinery/chem_heater.dm | 12 +- .../chemistry/machinery/chem_master.dm | 8 +- .../chemistry/machinery/chem_synthesizer.dm | 2 +- .../reagents/chemistry/machinery/pandemic.dm | 16 +-- .../chemistry/machinery/reagentgrinder.dm | 10 +- .../chemistry/machinery/smoke_machine.dm | 10 +- .../reagents/chemistry/recipes/special.dm | 2 +- .../reagents/reagent_containers/blood_pack.dm | 8 +- .../reagents/reagent_containers/borghypo.dm | 2 +- .../reagents/reagent_containers/bottle.dm | 8 +- .../reagents/reagent_containers/dropper.dm | 8 +- .../reagents/reagent_containers/glass.dm | 12 +- .../reagents/reagent_containers/hypospray.dm | 18 +-- .../reagents/reagent_containers/syringes.dm | 20 +-- code/modules/reagents/reagent_dispenser.dm | 2 +- code/modules/recycling/conveyor2.dm | 16 +-- code/modules/recycling/disposal/bin.dm | 41 ++++--- .../recycling/disposal/construction.dm | 10 +- code/modules/religion/religion_structures.dm | 6 +- code/modules/research/destructive_analyzer.dm | 8 +- code/modules/research/experimentor.dm | 4 +- .../research/nanites/nanite_chamber.dm | 6 +- .../nanites/nanite_chamber_computer.dm | 2 +- .../modules/research/nanites/nanite_remote.dm | 8 +- .../research/nanites/public_chamber.dm | 6 +- code/modules/research/server.dm | 8 +- .../security_levels/security_levels.dm | 2 +- code/modules/shuttle/emergency.dm | 5 +- code/modules/shuttle/manipulator.dm | 4 +- code/modules/shuttle/on_move.dm | 4 +- code/modules/shuttle/shuttle_rotate.dm | 4 +- .../shuttle/spaceship_navigation_beacon.dm | 4 +- code/modules/shuttle/special.dm | 6 +- .../spells/spell_types/self/disguise.dm | 2 +- .../spells/spell_types/self/summonitem.dm | 2 +- code/modules/surgery/anesthesia_machine.dm | 12 +- .../surgery/bodyparts/dismemberment.dm | 6 +- code/modules/surgery/bodyparts/parts.dm | 4 +- code/modules/surgery/implant_removal.dm | 4 +- code/modules/surgery/organs/appendix.dm | 6 +- code/modules/surgery/organs/augment_legs.dm | 6 +- code/modules/surgery/organs/augments_arms.dm | 8 +- code/modules/surgery/organs/augments_chest.dm | 8 +- code/modules/surgery/organs/autosurgeon.dm | 6 +- code/modules/surgery/organs/heart.dm | 8 +- code/modules/surgery/organs/tongue.dm | 4 +- code/modules/vehicles/motorized_wheelchair.dm | 4 +- code/modules/vehicles/pimpin_ride.dm | 10 +- code/modules/vending/_vending.dm | 4 +- icons/obj/doors/doorfire.dmi | Bin 7717 -> 10590 bytes icons/obj/mining.dmi | Bin 71302 -> 71563 bytes icons/obj/toy.dmi | Bin 52573 -> 52570 bytes tgui/docs/tutorial-and-examples.md | 4 +- yogstation.dme | 1 + .../_globalvars/lists/maintenance_loot.dm | 2 +- .../controllers/subsystem/bluespace_locker.dm | 4 +- yogstation/code/controllers/subsystem/yogs.dm | 4 +- .../code/game/gamemodes/gangs/dominator.dm | 10 +- .../code/game/gamemodes/gangs/gangtool.dm | 6 +- .../code/game/mecha/makeshift/lockermech.dm | 4 +- yogstation/code/game/objects/items/brace.dm | 4 +- yogstation/code/game/objects/items/crayons.dm | 2 +- .../code/game/objects/items/fishing/rods.dm | 4 +- .../game/objects/items/holotool/holotool.dm | 6 +- .../code/game/objects/items/melee/energy.dm | 2 +- .../code/game/objects/items/premadepapers.dm | 48 ++++---- .../code/game/objects/items/sharpener.dm | 2 +- .../code/game/objects/items/tool_switcher.dm | 2 +- yogstation/code/game/objects/items/tools.dm | 8 +- .../code/game/objects/structures/fireaxe.dm | 6 +- .../game/objects/structures/toilet_bong.dm | 8 +- .../darkspawn_objects/umbral_tendrils.dm | 2 +- .../shadowling/shadowling_abilities.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 3 - yogstation/code/modules/assembly/signaler.dm | 4 +- .../atmospherics/machinery/pipes/bluespace.dm | 4 +- .../code/modules/clothing/head/helmet.dm | 2 +- .../code/modules/clothing/suits/nerd.dm | 2 +- .../modules/donor/unique_donator_items.dm | 2 +- .../guardian/abilities/major/healing.dm | 2 +- .../code/modules/jobs/job_types/_job.dm | 6 +- .../code/modules/mob/living/brain/MMI.dm | 2 +- .../living/simple_animal/friendly/chocobo.dm | 8 +- .../hostile/retaliate/king_of_goats.dm | 6 +- .../particle_accelerator/particle_control.dm | 2 +- yogstation/code/modules/power/validhunter.dm | 8 +- .../projectiles/guns/ballistic/launchers.dm | 5 +- .../reagents/reagent_containers/hypospray.dm | 4 +- .../recycling/disposal/pipe_sorting.dm | 4 +- .../code/modules/spacepods/construction.dm | 2 +- .../code/modules/spacepods/equipment.dm | 2 +- yogstation/code/modules/spacepods/physics.dm | 2 +- yogstation/code/modules/spacepods/spacepod.dm | 12 +- .../code/modules/xenoarch/loot/gigadrill.dm | 6 +- 686 files changed, 3333 insertions(+), 2882 deletions(-) create mode 100644 code/datums/elements/update_icon_blocker.dm diff --git a/_maps/map_files/AsteroidStation/AsteroidStation.dmm b/_maps/map_files/AsteroidStation/AsteroidStation.dmm index d2dbd13f9eb3..563ca26c6fde 100644 --- a/_maps/map_files/AsteroidStation/AsteroidStation.dmm +++ b/_maps/map_files/AsteroidStation/AsteroidStation.dmm @@ -33915,7 +33915,7 @@ "kns" = ( /obj/structure/closet/crate, /obj/effect/spawner/lootdrop/maintenance/two, -/obj/item/latexballon, +/obj/item/latexballoon, /turf/open/floor/plating, /area/maintenance/port/aft) "knA" = ( @@ -59647,7 +59647,7 @@ "sCb" = ( /obj/structure/rack, /obj/item/storage/box/lights/mixed, -/obj/item/latexballon, +/obj/item/latexballoon, /obj/effect/spawner/lootdrop/maintenance, /turf/open/floor/plating, /area/maintenance/port) @@ -66362,7 +66362,7 @@ /area/engine/engineering) "uMm" = ( /obj/structure/rack, -/obj/item/latexballon, +/obj/item/latexballoon, /obj/effect/spawner/lootdrop/maintenance/two, /turf/open/floor/plating, /area/maintenance/port/fore) diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm index f6c22eee3abb..d7ba88daece3 100644 --- a/_maps/map_files/YogStation/YogStation.dmm +++ b/_maps/map_files/YogStation/YogStation.dmm @@ -26900,7 +26900,7 @@ /obj/structure/rack, /obj/effect/spawner/lootdrop/maintenance, /obj/item/storage/box/lights/mixed, -/obj/item/latexballon, +/obj/item/latexballoon, /turf/open/floor/plating, /area/maintenance/port) "gDs" = ( @@ -60174,7 +60174,7 @@ lootcount = 2; name = "2maintenance loot spawner" }, -/obj/item/latexballon, +/obj/item/latexballoon, /obj/structure/disposalpipe/segment{ dir = 4 }, diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index ea7c98d075c9..56188d3ee8f0 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -420,7 +420,7 @@ //MULTIPIPES //IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH. -//layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap +//layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap #define PIPING_LAYER_MIN 1 #define PIPING_LAYER_MAX 5 #define PIPING_LAYER_DEFAULT 3 diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm index 6755c0e9dff6..5daef490be31 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm @@ -35,6 +35,8 @@ #define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE /// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays. #define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS +///from base of [atom/update_inhand_icon]: (/mob) +#define COMSIG_ATOM_UPDATE_INHAND_ICON "atom_update_inhand_icon" ///from base of [atom/update_icon_state]: () #define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state" ///from base of [/atom/update_overlays]: (list/new_overlays) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 57cd7e418873..83c4d0e31e65 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -58,6 +58,22 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /// Blocks ruins spawning on the turf #define NO_RUINS_1 (1<<10) +// Update flags for [/atom/proc/update_appearance] +/// Update the atom's name +#define UPDATE_NAME (1<<0) +/// Update the atom's desc +#define UPDATE_DESC (1<<1) +/// Update the atom's icon state +#define UPDATE_ICON_STATE (1<<2) +/// Update the atom's overlays +#define UPDATE_OVERLAYS (1<<3) +/// Update the atom's greyscaling +#define UPDATE_GREYSCALE (1<<4) +/// Update the atom's smoothing. (More accurately, queue it for an update) +#define UPDATE_SMOOTHING (1<<5) +/// Update the atom's icon +#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS) + //AREA FLAGS /// If blobs can spawn there and if it counts towards their score. #define BLOBS_ALLOWED (1<<1) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 48621b85f3ad..2d0c8e29af04 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -30,13 +30,13 @@ #define ABOVE_NORMAL_TURF_LAYER 2.08 #define LATTICE_LAYER 2.2 #define DISPOSAL_PIPE_LAYER 2.25 -#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap +#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap #define WIRE_LAYER 2.4 #define WIRE_TERMINAL_LAYER 2.45 #define UNDER_CATWALK 2.454 #define CATWALK_LAYER 2.455 #define GAS_SCRUBBER_LAYER 2.46 -#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap +#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 #define LOW_OBJ_LAYER 2.5 diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 331f30de8bd1..a8039ae5cdd6 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -40,3 +40,6 @@ GLOBAL_LIST_EMPTY(ai_core_displays) GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert GLOBAL_LIST_INIT(alarms, list("Fire" = list(), "Atmosphere" = list(), "Power" = list())) //all engineering alerts for station alert consoles and alarm manager + +GLOBAL_LIST_EMPTY(roundstart_station_borgcharger_areas) // List of area names of roundstart station cyborg rechargers, for the low charge/no charge cyborg screen alert tooltips. +GLOBAL_LIST_EMPTY(roundstart_station_mechcharger_areas) // List of area names of roundstart station mech rechargers, for the low charge/no charge mech screen alert tooltips. diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5c532fdbda1e..2d09bed5dd92 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -129,7 +129,7 @@ if(W == A) W.attack_self(src) - update_inv_hands() + update_held_items() return //These are always reachable. diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index b422622ecc75..dfd012b78518 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -262,13 +262,14 @@ /atom/movable/screen/button_palette/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) /atom/movable/screen/button_palette/proc/set_hud(datum/hud/our_hud) src.our_hud = our_hud refresh_owner() -/atom/movable/screen/button_palette/proc/update_name(updates) +/atom/movable/screen/button_palette/update_name(updates) + . = ..() if(expanded) name = "Hide Buttons" else @@ -357,7 +358,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6, expanded = new_expanded our_group.refresh_actions() - update_icon() + update_appearance(updates = ALL) if(!usr.client) return diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 993180bba4ab..b9eb6b0e582b 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -529,11 +529,45 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." icon_state = "emptycell" +/atom/movable/screen/alert/emptycell/Initialize(mapload) + . = ..() + update_appearance(updates=UPDATE_DESC) + +/atom/movable/screen/alert/emptycell/update_desc() + . = ..() + desc = initial(desc) + if(length(GLOB.roundstart_station_borgcharger_areas)) + desc += " Recharging stations are available in [english_list(GLOB.roundstart_station_borgcharger_areas)]." + /atom/movable/screen/alert/lowcell name = "Low Charge" desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." icon_state = "lowcell" +/atom/movable/screen/alert/lowcell/Initialize(mapload) + . = ..() + update_appearance(updates=UPDATE_DESC) + +/atom/movable/screen/alert/lowcell/update_desc() + . = ..() + desc = initial(desc) + if(length(GLOB.roundstart_station_borgcharger_areas)) + desc += " Recharging stations are available in [english_list(GLOB.roundstart_station_borgcharger_areas)]." + +//MECH + +/atom/movable/screen/alert/lowcell/mech/update_desc() + . = ..() + desc = initial(desc) + if(length(GLOB.roundstart_station_mechcharger_areas)) + desc += " Power ports are available in [english_list(GLOB.roundstart_station_mechcharger_areas)]." + +/atom/movable/screen/alert/emptycell/mech/update_desc() + . = ..() + desc = initial(desc) + if(length(GLOB.roundstart_station_mechcharger_areas)) + desc += " Power ports are available in [english_list(GLOB.roundstart_station_mechcharger_areas)]." + //Ethereal /atom/movable/screen/alert/etherealcharge diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index b1388794b8b4..74e2e666602e 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -107,7 +107,7 @@ if(inv.slot_id) inv.hud = src inv_slots[inv.slot_id] = inv - inv.update_icon() + inv.update_appearance(updates = ALL) /datum/hud/alien/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index 849936d4ed1c..55f3ec125e4b 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -24,7 +24,7 @@ if(inv.slot_id) inv.hud = src inv_slots[inv.slot_id] = inv - inv.update_icon() + inv.update_appearance(updates = ALL) /datum/hud/dextrous/drone/persistent_inventory_update() diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm index d36d43eb5bde..f30abee196b0 100644 --- a/code/_onclick/hud/generic_dextrous.dm +++ b/code/_onclick/hud/generic_dextrous.dm @@ -54,7 +54,7 @@ if(inv.slot_id) inv.hud = src inv_slots[inv.slot_id] = inv - inv.update_icon() + inv.update_appearance(updates = ALL) /datum/hud/dextrous/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm index 6ea4b233d5c2..e62afe640903 100644 --- a/code/_onclick/hud/guardian.dm +++ b/code/_onclick/hud/guardian.dm @@ -7,7 +7,7 @@ pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style - pull_icon.update_icon() + pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 3dcce9b09a83..1930bc460c0a 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -311,7 +311,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( hand_slots["[i]"] = hand_box hand_box.hud = src static_inventory += hand_box - hand_box.update_icon() + hand_box.update_appearance(updates = ALL) var/i = 1 for(var/atom/movable/screen/swap_hand/SH in static_inventory) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 595a23350ceb..520fb98bfb61 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -304,7 +304,7 @@ if(inv.slot_id) inv.hud = src inv_slots[inv.slot_id] = inv - inv.update_icon() + inv.update_appearance(updates = ALL) update_locked_slots() diff --git a/code/_onclick/hud/lavaland_elite.dm b/code/_onclick/hud/lavaland_elite.dm index fd3957f27f44..f88e8fbf1170 100644 --- a/code/_onclick/hud/lavaland_elite.dm +++ b/code/_onclick/hud/lavaland_elite.dm @@ -5,7 +5,7 @@ ..() pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style - pull_icon.update_icon() + pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/living.dm b/code/_onclick/hud/living.dm index 90022ec028f9..c711c1fbfd67 100644 --- a/code/_onclick/hud/living.dm +++ b/code/_onclick/hud/living.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style - pull_icon.update_icon() + pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 8af41afa477d..f0ae933459d0 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -103,7 +103,7 @@ if(inv.slot_id) inv.hud = src inv_slots[inv.slot_id] = inv - inv.update_icon() + inv.update_appearance(updates = ALL) /datum/hud/monkey/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/revenanthud.dm b/code/_onclick/hud/revenanthud.dm index dc801fe89871..6b120eb1f001 100644 --- a/code/_onclick/hud/revenanthud.dm +++ b/code/_onclick/hud/revenanthud.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style - pull_icon.update_icon() + pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 1135d4564a9f..8573c0a214a7 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -281,9 +281,9 @@ if(.) return robot?.toggle_headlamp() - update_icon() + update_appearance(updates = ALL) -/atom/movable/screen/robot/lamp/update_icon() +/atom/movable/screen/robot/lamp/update_appearance(updates = ALL) if(robot?.lamp_enabled) icon_state = "lamp_on" else diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 46b8fa12902d..58bd07db1be0 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -18,9 +18,6 @@ var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. var/datum/hud/hud = null // A reference to the owner HUD, if any. -/atom/movable/screen/proc/update_icon() - return - /atom/movable/screen/Destroy() master = null hud = null @@ -172,7 +169,7 @@ return inv_item.Click(location, control, params) if(usr.attack_ui(slot_id)) - usr.update_inv_hands() + usr.update_held_items() return 1 /atom/movable/screen/inventory/MouseEntered() @@ -184,7 +181,7 @@ cut_overlay(object_overlays) object_overlays.Cut() -/atom/movable/screen/inventory/update_icon() +/atom/movable/screen/inventory/update_appearance(updates = ALL) if(!icon_empty) icon_empty = icon_state @@ -219,7 +216,7 @@ var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked") var/held_index = 0 -/atom/movable/screen/inventory/hand/update_icon() +/atom/movable/screen/inventory/hand/update_appearance(updates = ALL) . = ..() if(!handcuff_overlay) diff --git a/code/_onclick/hud/slime.dm b/code/_onclick/hud/slime.dm index 20b72312db97..e13a214ce88e 100644 --- a/code/_onclick/hud/slime.dm +++ b/code/_onclick/hud/slime.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style - pull_icon.update_icon() + pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 45aa05ea2801..9844aa44b39f 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -234,7 +234,7 @@ return ..() if(!ismob(A)) A.attack_hand(src) - update_inv_hands() + update_held_items() /* diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 5d26a03f702f..8ab086eb9999 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -92,7 +92,7 @@ /obj/item/tk_grab/process() if(check_if_focusable(focus)) //if somebody grabs your thing, no waiting for them to put it down and hitting them again. - update_icon() + update_appearance(updates = ALL) /obj/item/tk_grab/dropped(mob/user) if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item @@ -120,7 +120,7 @@ qdel(src) return focus.attack_self_tk(user) - update_icon() + update_appearance(updates = ALL) /obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity, params)//TODO: go over this . = ..() @@ -135,7 +135,7 @@ if(target == focus) target.attack_self_tk(user) - update_icon() + update_appearance(updates = ALL) return @@ -149,7 +149,7 @@ apply_focus_overlay() focus.throw_at(target, 10, 1,user) user.changeNext_move(CLICK_CD_MELEE) - update_icon() + update_appearance(updates = ALL) /proc/tkMaxRangeCheck(mob/user, atom/target) var/d = get_dist(user, target) @@ -165,7 +165,7 @@ if(!check_if_focusable(target)) return focus = target - update_icon() + update_appearance(updates = ALL) apply_focus_overlay() return TRUE @@ -183,7 +183,7 @@ return new /obj/effect/temp_visual/telekinesis(get_turf(focus)) -/obj/item/tk_grab/update_icon() +/obj/item/tk_grab/update_appearance(updates = ALL) cut_overlays() if(focus) var/old_layer = focus.layer diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm index 6640a08155e5..5395eb69cee5 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/controllers/subsystem/communications.dm @@ -48,7 +48,7 @@ SUBSYSTEM_DEF(communications) var/obj/item/paper/P = new /obj/item/paper(C.loc) P.name = "paper - '[sending.title]'" P.info = sending.content - P.update_icon() + P.update_appearance(updates = ALL) #undef COMMUNICATION_COOLDOWN #undef COMMUNICATION_COOLDOWN_AI diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index d54de2030372..3279e78b7e38 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -220,7 +220,7 @@ SUBSYSTEM_DEF(mapping) for(var/N in nuke_tiles) var/turf/open/floor/circuit/C = N - C.update_icon() + C.update_appearance(updates = ALL) /datum/controller/subsystem/mapping/Recover() flags |= SS_NO_INIT diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 26b0d121e661..ef63b83506c9 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -138,7 +138,7 @@ SUBSYSTEM_DEF(persistence) T.showpiece = new /obj/item/showpiece_dummy(T, path) T.trophy_message = chosen_trophy["message"] T.placer_key = chosen_trophy["placer_key"] - T.update_icon() + T.update_appearance(updates = ALL) /datum/controller/subsystem/persistence/proc/CollectData() CollectChiselMessages() diff --git a/code/datums/actions/action.dm b/code/datums/actions/action.dm index 555e769039f4..8a911901d5bb 100644 --- a/code/datums/actions/action.dm +++ b/code/datums/actions/action.dm @@ -364,14 +364,14 @@ var/update_flag = ALL var/forced = TRUE -// if(updates & UPDATE_ICON_STATE) -// update_flag |= UPDATE_BUTTON_ICON -// forced = TRUE -// if(updates & UPDATE_OVERLAYS) -// update_flag |= UPDATE_BUTTON_OVERLAY -// forced = TRUE -// if(updates & (UPDATE_NAME|UPDATE_DESC)) -// update_flag |= UPDATE_BUTTON_NAME + if(updates & UPDATE_ICON_STATE) + update_flag |= UPDATE_BUTTON_ICON + forced = TRUE + if(updates & UPDATE_OVERLAYS) + update_flag |= UPDATE_BUTTON_OVERLAY + forced = TRUE + if(updates & (UPDATE_NAME|UPDATE_DESC)) + update_flag |= UPDATE_BUTTON_NAME // Status is not relevant, and background is not relevant. Neither will change // Force the update if an icon state or overlay change was done diff --git a/code/datums/components/acid.dm b/code/datums/components/acid.dm index 35709d6bb4bc..cd834f591594 100644 --- a/code/datums/components/acid.dm +++ b/code/datums/components/acid.dm @@ -45,7 +45,7 @@ set_volume(_acid_volume) var/atom/parent_atom = parent RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_update_overlays)) - parent_atom.update_icon() + parent_atom.update_appearance(updates = ALL) sizzle = new(list(parent), TRUE) START_PROCESSING(SSacid, src) /datum/component/acid/Destroy(force, silent) @@ -57,7 +57,7 @@ UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS) if(parent && !QDELING(parent)) var/atom/parent_atom = parent - parent_atom.update_icon() + parent_atom.update_appearance(updates = ALL) return ..() /datum/component/acid/RegisterWithParent() RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm index 0b44926ed9bf..c6e78ac3298c 100644 --- a/code/datums/components/armor_plate.dm +++ b/code/datums/components/armor_plate.dm @@ -66,7 +66,7 @@ if(ismecha(O)) var/obj/mecha/R = O - R.update_icon() + R.update_appearance(updates = ALL) to_chat(user, span_info("You strengthen [R], improving its resistance against melee, bullet and laser damage.")) else to_chat(user, span_info("You strengthen [O], improving its resistance against melee attacks.")) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 12de02741fb7..3d1944b297c0 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -257,6 +257,7 @@ RG.volume -= amt data = RG.data RC.reagents.conditional_update(RC) + RC.update_appearance(UPDATE_ICON) RG = locate(RG.type) in Deletion RG.volume = amt RG.data += data @@ -266,6 +267,7 @@ amt -= RG.volume RC.reagents.reagent_list -= RG RC.reagents.conditional_update(RC) + RC.update_appearance(UPDATE_ICON) RGNT = locate(RG.type) in Deletion RGNT.volume += RG.volume RGNT.data += RG.data diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index 9ff014753aa7..47717a22faae 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -46,7 +46,7 @@ AddGrilledItemOverlay(parent) //var/atom/A = parent - //A.update_icon() + //A.update_appearance(updates = ALL) ///Ran when an object finished grilling /datum/component/grillable/proc/FinishGrilling(atom/grill_source) @@ -82,7 +82,7 @@ O.cut_overlays() //UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS) UnregisterSignal(parent, COMSIG_MOVABLE_MOVED) - //A.update_icon() + //A.update_appearance(updates = ALL) /datum/component/grillable/proc/AddGrilledItemOverlay(obj/source) diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 55d33addeb18..57397013caba 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -140,7 +140,7 @@ SEND_SIGNAL(parent, COMSIG_STORAGE_REMOVED, AM, new_location) if(isobj(parent)) var/obj/O = parent - O.update_icon() + O.update_appearance(updates = ALL) return TRUE /datum/component/storage/concrete/proc/slave_can_insert_object(datum/component/storage/slave, obj/item/I, stop_messages = FALSE, mob/M) @@ -191,13 +191,13 @@ if(!prevent_warning) mob_item_insertion_feedback(usr, M, I) SEND_SIGNAL(parent, COMSIG_STORAGE_INSERTED, I, M) - update_icon() + update_appearance(updates = ALL) return TRUE -/datum/component/storage/concrete/update_icon() +/datum/component/storage/concrete/update_appearance(updates = ALL) if(isobj(parent)) var/obj/O = parent - O.update_icon() + O.update_appearance(updates = ALL) for(var/i in slaves) var/datum/component/storage/slave = i - slave.update_icon() + slave.update_appearance(updates = ALL) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 14dbd5abd8d9..6a2c397a6c8b 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -688,10 +688,10 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance... viewing.show_message(span_notice("[M] puts [I] [insert_preposition]to [parent]."), MSG_VISUAL) -/datum/component/storage/proc/update_icon() +/datum/component/storage/proc/update_appearance(updates = ALL) if(isobj(parent)) var/obj/O = parent - O.update_icon() + O.update_appearance(updates = ALL) /datum/component/storage/proc/signal_insertion_attempt(datum/source, obj/item/I, mob/M, silent = FALSE, force = FALSE) if((!force && !can_be_inserted(I, TRUE, M)) || (I == parent)) diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index 3384f42520dd..1f0fc97e3ba1 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -25,7 +25,7 @@ var/obj/item/organ/appendix/A = affected_mob.getorgan(/obj/item/organ/appendix) if(A) A.inflamed = 1 - A.update_icon() + A.update_appearance(updates = ALL) if(prob(3)) to_chat(affected_mob, span_warning("You feel a stabbing pain in your abdomen!")) affected_mob.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 5) diff --git a/code/datums/elements/update_icon_blocker.dm b/code/datums/elements/update_icon_blocker.dm new file mode 100644 index 000000000000..e921b6e472f4 --- /dev/null +++ b/code/datums/elements/update_icon_blocker.dm @@ -0,0 +1,18 @@ +/// Prevents calling anything in update_appearance(updates = ALL) like update_icon_state() or update_overlays() +/datum/element/update_icon_blocker + +/datum/element/update_icon_blocker/Attach(datum/target) + . = ..() + if(!isatom(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_ATOM_UPDATE_ICON, PROC_REF(block_update_icon)) + +/datum/element/update_icon_blocker/Detach(datum/source, ...) + UnregisterSignal(source, COMSIG_ATOM_UPDATE_ICON) + return ..() + +/datum/element/update_icon_blocker/proc/block_update_icon() + SIGNAL_HANDLER + + return COMSIG_ATOM_NO_UPDATE_ICON_STATE | COMSIG_ATOM_NO_UPDATE_OVERLAYS diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 0f303e307b86..db0de0c7777f 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -181,7 +181,7 @@ righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' block_chance = 50 -/obj/item/twohanded/bostaff/update_icon() +/obj/item/twohanded/bostaff/update_appearance(updates = ALL) icon_state = "bostaff[wielded]" return diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm index 023e6b323ad1..f5921e18deda 100644 --- a/code/datums/status_effects/debuffs/debuffs.dm +++ b/code/datums/status_effects/debuffs/debuffs.dm @@ -1087,7 +1087,7 @@ /datum/status_effect/eldritch/on_apply() if(owner.mob_size >= MOB_SIZE_HUMAN) owner.underlays |= marked_underlay - //owner.update_icon() + //owner.update_appearance(updates = ALL) return TRUE return FALSE @@ -1235,7 +1235,7 @@ /datum/status_effect/cloudstruck/on_apply() mob_overlay = mutable_appearance('icons/effects/eldritch.dmi', "cloud_swirl", ABOVE_MOB_LAYER) owner.overlays += mob_overlay - //owner.update_icon() + //owner.update_appearance(updates = ALL) ADD_TRAIT(owner, TRAIT_BLIND, "cloudstruck") return TRUE @@ -1246,7 +1246,7 @@ REMOVE_TRAIT(owner, TRAIT_BLIND, "cloudstruck") if(owner) owner.overlays -= mob_overlay - //owner.update_icon() + //owner.update_appearance(updates = ALL) /datum/status_effect/cloudstruck/Destroy() . = ..() diff --git a/code/datums/wires/airalarm.dm b/code/datums/wires/airalarm.dm index f6c166c59676..ab31a42ce460 100644 --- a/code/datums/wires/airalarm.dm +++ b/code/datums/wires/airalarm.dm @@ -30,7 +30,7 @@ if(WIRE_POWER) // Short out for a long time. if(!A.shorted) A.shorted = TRUE - A.update_icon() + A.update_appearance(updates = ALL) addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/airalarm, reset), wire), 1200) if(WIRE_IDSCAN) // Toggle lock. A.locked = !A.locked @@ -49,7 +49,7 @@ var/area/AA = get_area(A) if(AA.atmosalert(0, holder)) A.post_alert(0) - A.update_icon() + A.update_appearance(updates = ALL) /datum/wires/airalarm/on_cut(wire, mend) var/obj/machinery/airalarm/A = holder @@ -57,7 +57,7 @@ if(WIRE_POWER) // Short out forever. A.shock(usr, 50) A.shorted = !mend - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_IDSCAN) if(!mend) A.locked = TRUE @@ -71,4 +71,4 @@ var/area/AA = get_area(A) if(AA.atmosalert(2, holder)) A.post_alert(2) - A.update_icon() + A.update_appearance(updates = ALL) diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 09f3a4f5d260..60bcb6c0c10e 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -104,13 +104,13 @@ else if(A.hasPower()) A.unbolt() - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_IDSCAN) // Pulse to disable emergency access and flash red lights. if(A.hasPower() && A.density) A.do_animate("deny") if(A.emergency) A.emergency = FALSE - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_AI) // Pulse to disable WIRE_AI control for 10 ticks (follows same rules as cutting). if(A.aiControlDisabled == AI_WIRE_NORMAL) A.aiControlDisabled = AI_WIRE_DISABLED @@ -129,7 +129,7 @@ A.normalspeed = !A.normalspeed if(WIRE_LIGHT) A.lights = !A.lights - A.update_icon() + A.update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/reset_ai_wire() if(aiControlDisabled == AI_WIRE_DISABLED) @@ -188,7 +188,7 @@ A.close() if(WIRE_LIGHT) // Cut to disable lights, mend to re-enable. A.lights = mend - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_ZAP1, WIRE_ZAP2) // Ouch. if(usr) A.shock(usr, 50) diff --git a/code/datums/wires/airlock_cycle.dm b/code/datums/wires/airlock_cycle.dm index fdd9f08b67a7..b49b733eaa1c 100644 --- a/code/datums/wires/airlock_cycle.dm +++ b/code/datums/wires/airlock_cycle.dm @@ -29,7 +29,7 @@ if(WIRE_POWER) // Short out for a long time. if(!A.shorted) A.shorted = TRUE - A.update_icon() + A.update_appearance(updates = ALL) addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/advanced_airlock_controller, reset), wire), 1200) if(WIRE_IDSCAN) // Toggle lock. A.locked = !A.locked @@ -59,7 +59,7 @@ if(WIRE_POWER) // Short out forever. A.shock(usr, 50) A.shorted = !mend - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_IDSCAN) if(!mend) A.locked = TRUE diff --git a/code/datums/wires/igniter.dm b/code/datums/wires/igniter.dm index 46f7e28732af..7114aba618db 100644 --- a/code/datums/wires/igniter.dm +++ b/code/datums/wires/igniter.dm @@ -28,18 +28,18 @@ A.safety = !A.safety if(A.safety) A.on = FALSE - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_POWER) // Toggle power A.on = !A.on - A.update_icon() + A.update_appearance(updates = ALL) /datum/wires/igniter/on_cut(wire, mend) var/obj/machinery/igniter/A = holder switch(wire) if(WIRE_POWER) // Toggle power A.on = FALSE - A.update_icon() + A.update_appearance(updates = ALL) if(WIRE_SAFETY) // Stop it from being turned on A.on = FALSE A.safety = FALSE - A.update_icon() + A.update_appearance(updates = ALL) diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm index 3c448934b589..cd42d5d049dd 100644 --- a/code/datums/wires/syndicatebomb.dm +++ b/code/datums/wires/syndicatebomb.dm @@ -50,7 +50,7 @@ if(!B.active) holder.visible_message(span_danger("[icon2html(B, viewers(holder))] You hear the bomb start ticking!")) B.activate() - B.update_icon() + B.update_appearance(updates = ALL) else if(B.delayedlittle) holder.visible_message(span_notice("[icon2html(B, viewers(holder))] Nothing happens.")) else @@ -82,7 +82,7 @@ B.active = FALSE B.delayedlittle = FALSE B.delayedbig = FALSE - B.update_icon() + B.update_appearance(updates = ALL) /datum/wires/syndicatebomb/proc/tell_admins(obj/machinery/syndicatebomb/B) if(istype(B, /obj/machinery/syndicatebomb/training)) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 8dbcb4c875d6..88c067a17182 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) ModifyFiredoors(FALSE) for(var/item in firealarms) var/obj/machinery/firealarm/F = item - F.update_icon() + F.update_appearance(updates = ALL) for (var/item in GLOB.alert_consoles) var/obj/machinery/computer/station_alert/a = item @@ -412,7 +412,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) ModifyFiredoors(TRUE) for(var/item in firealarms) var/obj/machinery/firealarm/F = item - F.update_icon() + F.update_appearance(updates = ALL) for (var/item in GLOB.silicon_mobs) var/mob/living/silicon/aiPlayer = item @@ -524,7 +524,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) * Im not sure what the heck this does, somethign to do with weather being able to set icon * states on areas?? where the heck would that even display? */ -/area/proc/update_icon() +/area/update_appearance(updates = ALL) var/weather_icon for(var/V in SSweather.processing) var/datum/weather/W = V @@ -537,7 +537,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) /** * Update the icon of the area (overridden to always be null for space */ -/area/space/update_icon() +/area/space/update_appearance(updates = ALL) icon_state = null @@ -577,7 +577,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) /area/proc/power_change() for(var/obj/machinery/M in src) // for each machine in the area M.power_change() // reverify power status (to update icons etc.) - update_icon() + update_appearance(updates = ALL) /** * Return the usage of power per channel diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d0fcf47e4263..b7f58d944baf 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -49,6 +49,8 @@ ///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays var/list/managed_vis_overlays + ///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc. Single items are stored on their own, not in a list. + var/list/managed_overlays ///Proximity monitor associated with this atom var/datum/proximity_monitor/proximity_monitor @@ -86,6 +88,9 @@ var/base_pixel_x = 0 ///Default pixel y shifting for the atom's icon. var/base_pixel_y = 0 + ///Used for changing icon states for different base sprites. + var/base_icon_state + ///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy() var/list/targeted_by @@ -550,6 +555,99 @@ if(!LAZYLEN(.)) // lol ..length return FALSE +/** + * Updates the appearence of the icon + * + * Mostly delegates to update_name, update_desc, and update_icon + * + * Arguments: + * - updates: A set of bitflags dictating what should be updated. Defaults to [ALL] + */ +/atom/proc/update_appearance(updates=ALL) + SHOULD_NOT_SLEEP(TRUE) + SHOULD_CALL_PARENT(TRUE) + + . = NONE + updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_APPEARANCE, updates) + if(updates & UPDATE_NAME) + . |= update_name(updates) + if(updates & UPDATE_DESC) + . |= update_desc(updates) + if(updates & UPDATE_ICON) + . |= update_icon(updates) + +/// Updates the name of the atom +/atom/proc/update_name(updates=ALL) + SHOULD_CALL_PARENT(TRUE) + return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_NAME, updates) + +/// Updates the description of the atom +/atom/proc/update_desc(updates=ALL) + SHOULD_CALL_PARENT(TRUE) + return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_DESC, updates) + +/// Updates the icon of the atom +/atom/proc/update_icon(updates=ALL) + SIGNAL_HANDLER + SHOULD_CALL_PARENT(TRUE) + + . = NONE + updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON, updates) + if(updates & UPDATE_ICON_STATE) + update_icon_state() + . |= UPDATE_ICON_STATE + + if(updates & UPDATE_OVERLAYS) + if(LAZYLEN(managed_vis_overlays)) + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + + var/list/new_overlays = update_overlays(updates) + if (managed_overlays) + if (length(overlays) == (islist(managed_overlays) ? length(managed_overlays) : 1)) + overlays = null + POST_OVERLAY_CHANGE(src) + else + cut_overlay(managed_overlays) + managed_overlays = null + if(length(new_overlays)) + if (length(new_overlays) == 1) + managed_overlays = new_overlays[1] + else + managed_overlays = new_overlays + add_overlay(new_overlays) + . |= UPDATE_OVERLAYS + + . |= SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, updates, .) + +/// Updates the icon state of the atom +/atom/proc/update_icon_state() + SHOULD_CALL_PARENT(TRUE) + return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE) + +/// Updates the overlays of the atom +/atom/proc/update_overlays() + SHOULD_CALL_PARENT(TRUE) + . = list() + SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .) + +/** + * Checks the atom's loc and calls update_held_items on it if it is a mob. + * + * This should only be used in situations when you are unable to use /datum/element/update_icon_updates_onmob for whatever reason. + * Check code/datums/elements/update_icon_updates_onmob.dm before using this. Adding that to the atom and calling update_appearance will work for most cases. + * + * Arguments: + * * mob/target - The mob to update the icons of. Optional argument, use if the atom's loc is not the mob you want to update. + */ +/atom/proc/update_inhand_icon(mob/target = loc) + SHOULD_CALL_PARENT(TRUE) + if(!istype(target)) + return + + target.update_held_items() + + SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_INHAND_ICON, target) + /** * An atom we are buckled or is contained within us has tried to move * diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 9f6690940f99..c35c833013f2 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -304,7 +304,7 @@ Credit where due: H.equip_to_slot_if_possible(PDA, SLOT_WEAR_ID) PDA.update_label() - PDA.update_icon() + PDA.update_appearance(updates = ALL) PDA.update_filters() if(plasmaman && !visualsOnly) //If we need to breathe from the plasma tank, we should probably start doing that diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index d074cab927ce..03f710df5ee5 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/machines/nuke.dmi' icon_state = "bananiumbomb_base" -/obj/machinery/nuclearbomb/syndicate/bananium/update_icon() +/obj/machinery/nuclearbomb/syndicate/bananium/update_appearance(updates = ALL) if(deconstruction_state == NUKESTATE_INTACT) switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 63b5c896c72a..ea78bfde854e 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -192,7 +192,7 @@ return //We're done here else B.current_fullness++ - B.update_icon() + B.update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(increase_bloodstone_power)), 30 SECONDS) /datum/game_mode/proc/create_anchor_bloodstone() diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 4503462051ec..cf30df00a4ad 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -6,7 +6,7 @@ S.charge = 0 S.output_level = 0 S.output_attempt = FALSE - S.update_icon() + S.update_appearance(updates = ALL) S.power_change() for(var/area/A in GLOB.the_station_areas) @@ -41,7 +41,7 @@ S.charge = S.capacity S.output_level = S.output_level_max S.output_attempt = TRUE - S.update_icon() + S.update_appearance(updates = ALL) S.power_change() for(var/area/A in GLOB.the_station_areas) if(!A.requires_power || A.always_unpowered) @@ -61,6 +61,6 @@ S.charge = S.capacity S.output_level = S.output_level_max S.output_attempt = TRUE - S.update_icon() + S.update_appearance(updates = ALL) S.power_change() diff --git a/code/game/golf/golf.dm b/code/game/golf/golf.dm index 1cd8f3aa189e..4218c7d8c8b5 100644 --- a/code/game/golf/golf.dm +++ b/code/game/golf/golf.dm @@ -39,7 +39,7 @@ golfball.loc = src visible_message(span_notice("The golfball lands in [src].")) - update_icon() + update_appearance(updates = ALL) else visible_message(span_notice("The golfball bounces out of [src]!")) return FALSE diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 578981580bb7..b1a838393a62 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -3,28 +3,28 @@ desc = "A PDA painting machine. To use, simply insert your PDA and choose the desired preset paint scheme." icon = 'icons/obj/pda.dmi' icon_state = "pdapainter" + base_icon_state = "pdapainter" density = TRUE max_integrity = 200 var/obj/item/pda/storedpda = null var/list/colorlist = list() -/obj/machinery/pdapainter/update_icon() - cut_overlays() +/obj/machinery/pdapainter/update_icon_state() + if(stat & BROKEN) + icon_state = "[base_icon_state]-broken" + return ..() + icon_state = "[base_icon_state][powered() ? null : "-off"]" + return ..() + +/obj/machinery/pdapainter/update_overlays() + . = ..() if(stat & BROKEN) - icon_state = "[initial(icon_state)]-broken" return if(storedpda) - add_overlay("[initial(icon_state)]-closed") - - if(powered()) - icon_state = initial(icon_state) - else - icon_state = "[initial(icon_state)]-off" - - return + . += "[initial(icon_state)]-closed" /obj/machinery/pdapainter/Initialize() . = ..() @@ -61,7 +61,7 @@ /obj/machinery/pdapainter/handle_atom_del(atom/A) if(A == storedpda) storedpda = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/pdapainter/attackby(obj/item/O, mob/user, params) if(default_unfasten_wrench(user, O)) @@ -76,7 +76,7 @@ return storedpda = O O.add_fingerprint(user) - update_icon() + update_appearance(UPDATE_ICON) else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) if(stat & BROKEN) @@ -91,7 +91,7 @@ to_chat(user, span_notice("You repair [src].")) stat &= ~BROKEN obj_integrity = max_integrity - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_notice("[src] does not need repairs.")) else @@ -136,6 +136,6 @@ if(storedpda) storedpda.forceMove(drop_location()) storedpda = null - update_icon() + update_appearance(UPDATE_ICON) else to_chat(usr, span_warning("[src] is empty!")) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index bf43c4af6a18..ec27e8fe055e 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -51,7 +51,7 @@ /obj/machinery/sleeper/Initialize() . = ..() occupant_typecache = GLOB.typecache_living - update_icon() + update_appearance(updates = ALL) /obj/machinery/sleeper/RefreshParts() var/E @@ -69,7 +69,7 @@ available_treatments |= treatments[i] stasis = (I >= 4) -/obj/machinery/sleeper/update_icon() +/obj/machinery/sleeper/update_appearance(updates = ALL) if(state_open) icon_state = "[initial(icon_state)]-open" else diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 220b4528b8c6..362012cef760 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -189,7 +189,7 @@ Class Procs: density = FALSE if(drop) dropContents() - update_icon() + update_appearance(updates = ALL) updateUsrDialog() /obj/machinery/proc/dropContents(list/subset = null) @@ -227,7 +227,7 @@ Class Procs: occupant = target target.forceMove(src) updateUsrDialog() - update_icon() + update_appearance(updates = ALL) /obj/machinery/proc/auto_use_power() if(!powered(power_channel)) @@ -426,7 +426,7 @@ Class Procs: if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1)) stat |= BROKEN SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/contents_explosion(severity, target) @@ -436,7 +436,7 @@ Class Procs: /obj/machinery/handle_atom_del(atom/A) if(A == occupant) occupant = null - update_icon() + update_appearance(updates = ALL) updateUsrDialog() /obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 54030e0be8bb..5527f0746485 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -17,7 +17,7 @@ . = ..() . += span_notice("It has [uses] uses of foam remaining.") -/obj/machinery/ai_slipper/update_icon() +/obj/machinery/ai_slipper/update_appearance(updates = ALL) if(stat & BROKEN) return if((stat & NOPOWER) || cooldown_time > world.time || !uses) diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 72f0ce01acd6..93c0fd3bf767 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -23,21 +23,21 @@ if("unlock") locked = FALSE - update_icon() + update_appearance(updates = ALL) if("lock") locked = TRUE - update_icon() + update_appearance(updates = ALL) if("secure_open") locked = FALSE - update_icon() + update_appearance(updates = ALL) sleep(0.2 SECONDS) open(1) locked = TRUE - update_icon() + update_appearance(updates = ALL) if("secure_close") locked = FALSE @@ -45,7 +45,7 @@ locked = TRUE sleep(0.2 SECONDS) - update_icon() + update_appearance(updates = ALL) send_status() @@ -113,7 +113,7 @@ id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER -/obj/machinery/airlock_sensor/update_icon() +/obj/machinery/airlock_sensor/update_appearance(updates = ALL) if(on) if(alert) icon_state = "airlock_sensor_alert" @@ -148,7 +148,7 @@ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) - update_icon() + update_appearance(updates = ALL) /obj/machinery/airlock_sensor/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index 278c0cf1a03a..c835cb08822c 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -107,7 +107,7 @@ pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 - update_icon() + update_appearance(updates = ALL) /obj/machinery/advanced_airlock_controller/Destroy() qdel(wires) @@ -193,7 +193,7 @@ if(WIRE_POWER) if(!wires.is_cut(WIRE_POWER)) shorted = FALSE - update_icon() + update_appearance(updates = ALL) if(WIRE_AI) if(!wires.is_cut(WIRE_AI)) aidisabled = FALSE @@ -323,10 +323,10 @@ vent.pressure_checks = 1 vent.external_pressure_bound = interior_pressure vent.on = TRUE - vent.update_icon() + vent.update_appearance(updates = ALL) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) return if(AIRLOCK_CYCLESTATE_INCLOSING) for(var/airlock in airlocks) @@ -340,10 +340,10 @@ vent.external_pressure_bound = depressurization_target vents_valid = FALSE vent.on = TRUE - vent.update_icon() + vent.update_appearance(updates = ALL) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) if(pressure < depressurization_margin) vents_valid = TRUE if((doors_valid && vents_valid) || is_skipping) @@ -361,10 +361,10 @@ vent.external_pressure_bound = depressurization_target vents_valid = FALSE vent.on = TRUE - vent.update_icon() + vent.update_appearance(updates = ALL) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) if(pressure < depressurization_margin) vents_valid = TRUE if(vents_valid || is_skipping) @@ -382,10 +382,10 @@ vent.external_pressure_bound = interior_pressure vents_valid = FALSE vent.on = TRUE - vent.update_icon() + vent.update_appearance(updates = ALL) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) if(pressure > interior_pressure - 0.5) vents_valid = TRUE if(vents_valid || is_skipping) @@ -407,10 +407,10 @@ vent.external_pressure_bound = exterior_pressure vents_valid = FALSE vent.on = TRUE - vent.update_icon() + vent.update_appearance(updates = ALL) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) if(pressure > exterior_pressure - 0.5) vents_valid = TRUE if(vents_valid || is_skipping) @@ -424,12 +424,12 @@ for(var/V in vents) var/obj/machinery/atmospherics/components/unary/vent_pump/vent = V vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) if(AIRLOCK_CYCLESTATE_OUTOPEN) for(var/V in vents) var/obj/machinery/atmospherics/components/unary/vent_pump/vent = V vent.on = FALSE - vent.update_icon() + vent.update_appearance(updates = ALL) update_icon(TRUE) /obj/machinery/advanced_airlock_controller/attackby(obj/item/W, mob/user, params) @@ -440,13 +440,13 @@ to_chat(user, span_notice("You cut the final wires.")) new /obj/item/stack/cable_coil(loc, 5) buildstage = 1 - update_icon() + update_appearance(updates = ALL) return else if(W.tool_behaviour == TOOL_SCREWDRIVER) // Opening that up. W.play_tool_sound(src) panel_open = !panel_open to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"].")) - update_icon() + update_appearance(updates = ALL) return else if(W.GetID())// trying to unlock the interface with an ID card togglelock(user) @@ -465,7 +465,7 @@ new /obj/item/electronics/advanced_airlock_controller( src.loc ) playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) buildstage = 0 - update_icon() + update_appearance(updates = ALL) return if(istype(W, /obj/item/stack/cable_coil)) @@ -486,14 +486,14 @@ cut_links() shorted = 0 buildstage = 2 - update_icon() + update_appearance(updates = ALL) return if(0) if(istype(W, /obj/item/electronics/advanced_airlock_controller)) if(user.temporarilyRemoveItemFromInventory(W)) to_chat(user, span_notice("You insert the circuit.")) buildstage = 1 - update_icon() + update_appearance(updates = ALL) qdel(W) return @@ -504,7 +504,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt an airlock controller circuit and slot it into the assembly.")) buildstage = 1 - update_icon() + update_appearance(updates = ALL) return if(W.tool_behaviour == TOOL_WRENCH) @@ -775,7 +775,7 @@ else if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] the airlock controller interface.")) updateUsrDialog() else @@ -784,7 +784,7 @@ /obj/machinery/advanced_airlock_controller/power_change() ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/advanced_airlock_controller/emag_act(mob/user) if(obj_flags & EMAGGED) @@ -795,7 +795,7 @@ /obj/machinery/advanced_airlock_controller/obj_break(damage_flag) ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/advanced_airlock_controller/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 1a7697f1d43e..24330291e50f 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -30,9 +30,9 @@ GLOBAL_LIST_EMPTY(announcement_systems) . = ..() GLOB.announcement_systems += src radio = new /obj/item/radio/headset/silicon/ai(src) - update_icon() + update_appearance(updates = ALL) -/obj/machinery/announcement_system/update_icon() +/obj/machinery/announcement_system/update_appearance(updates = ALL) cut_overlays() if(is_operational()) var/mutable_appearance/on_app = mutable_appearance(icon, "AAS_on") @@ -60,13 +60,13 @@ GLOBAL_LIST_EMPTY(announcement_systems) P.play_tool_sound(src) panel_open = !panel_open to_chat(user, span_notice("You [panel_open ? "open" : "close"] the maintenance hatch of [src].")) - update_icon() + update_appearance(updates = ALL) else if(default_deconstruction_crowbar(P)) return else if(P.tool_behaviour == TOOL_MULTITOOL && panel_open && (stat & BROKEN)) to_chat(user, span_notice("You reset [src]'s firmware.")) stat &= ~BROKEN - update_icon() + update_appearance(updates = ALL) else return ..() @@ -141,10 +141,10 @@ GLOBAL_LIST_EMPTY(announcement_systems) log_game("The head announcement was updated: [NewMessage] by:[key_name(usr)]") if("NewheadToggle") newheadToggle = !newheadToggle - update_icon() + update_appearance(updates = ALL) if("ArrivalToggle") arrivalToggle = !arrivalToggle - update_icon() + update_appearance(updates = ALL) add_fingerprint(usr) /obj/machinery/announcement_system/attack_robot(mob/living/silicon/user) diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 03f682bc68b9..2f131956ec0f 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -19,7 +19,7 @@ initial_icon_state = initial(icon_state) return ..() -/obj/machinery/aug_manipulator/update_icon() +/obj/machinery/aug_manipulator/update_appearance(updates = ALL) cut_overlays() if(stat & BROKEN) @@ -50,7 +50,7 @@ /obj/machinery/aug_manipulator/handle_atom_del(atom/A) if(A == storedpart) storedpart = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/aug_manipulator/attackby(obj/item/O, mob/user, params) if(default_unfasten_wrench(user, O)) @@ -71,7 +71,7 @@ return storedpart = O O.add_fingerprint(user) - update_icon() + update_appearance(updates = ALL) else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) if(obj_integrity < max_integrity) @@ -88,7 +88,7 @@ to_chat(user, span_notice("You repair [src].")) stat &= ~BROKEN obj_integrity = max(obj_integrity, max_integrity) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_notice("[src] does not need repairs.")) else @@ -118,7 +118,7 @@ if(storedpart) storedpart.forceMove(get_turf(src)) storedpart = null - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_notice("[src] is empty.")) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index a19876fdfa2b..a95cc5c91102 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -177,7 +177,7 @@ if(printdirection > 8) // Simple Sanity Check printdirection = 0 - update_icon() + update_appearance(updates = ALL) /obj/machinery/autolathe/on_deconstruction() var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) @@ -372,7 +372,7 @@ A = location if(is_stack) // If its a stack we need to define it as so var/obj/item/stack/N = new D.build_path(A, multiplier) - N.update_icon() + N.update_appearance(updates = ALL) N.autolathe_crafted(src) else for(var/i=1, i<=multiplier, i++) diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index 7e85bcff6329..057b28734266 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(request_list) GLOB.allbountyboards -= src . = ..() -/obj/machinery/bounty_board/update_icon() +/obj/machinery/bounty_board/update_appearance(updates = ALL) ..() if(stat & (NOPOWER|BROKEN)) icon_state = "request_kiosk_off" diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 3c51634534e6..b3ffce316465 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -25,7 +25,7 @@ pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0 panel_open = TRUE - update_icon() + update_appearance(updates = ALL) if(!built && !device && device_type) @@ -42,7 +42,7 @@ board.accesses = req_one_access -/obj/machinery/button/update_icon() +/obj/machinery/button/update_appearance(updates = ALL) cut_overlays() if(panel_open) icon_state = "button-open" @@ -61,7 +61,7 @@ if(W.tool_behaviour == TOOL_SCREWDRIVER) if(panel_open || allowed(user)) default_deconstruction_screwdriver(user, "button-open", "[skin]",W) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_danger("Maintenance Access Denied")) flick("[skin]-denied", src) @@ -118,7 +118,7 @@ to_chat(user, span_notice("You wipe the button's ID.")) id = null - update_icon() + update_appearance(updates = ALL) return if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON)) @@ -167,7 +167,7 @@ req_access = list() req_one_access = list() board = null - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You remove electronics from the button frame.")) else @@ -195,7 +195,7 @@ if(device) device.pulsed() - addtimer(CALLBACK(src, PROC_REF(update_icon)), 15) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 15) /obj/machinery/button/door name = "door button" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index a203901d6681..17be7b4667ec 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -96,7 +96,7 @@ if(mapload && is_station_level(z) && prob(3) && !start_active) toggle_cam() else //this is handled by toggle_camera, so no need to update it twice. - update_icon() + update_appearance(updates = ALL) /obj/machinery/camera/Destroy() if(can_use()) @@ -147,14 +147,14 @@ return if(!(. & EMP_PROTECT_SELF)) if(prob(150/severity)) - update_icon() + update_appearance(updates = ALL) var/list/previous_network = network network = list() GLOB.cameranet.removeCamera(src) stat |= EMPED set_light(0) emped = emped+1 //Increase the number of consecutive EMP's - update_icon() + update_appearance(updates = ALL) var/thisemp = emped //Take note of which EMP this proc is for spawn(900) if(loc) //qdel limbo @@ -162,7 +162,7 @@ if(emped == thisemp) //Only fix it if the camera hasn't been EMP'd again network = previous_network stat &= ~EMPED - update_icon() + update_appearance(updates = ALL) if(can_use()) GLOB.cameranet.addCamera(src) emped = 0 //Resets the consecutive EMP count @@ -200,7 +200,7 @@ panel_open = !panel_open to_chat(user, span_notice("You screw the camera's panel [panel_open ? "open" : "closed"].")) I.play_tool_sound(src) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/camera/wirecutter_act(mob/living/user, obj/item/I) @@ -354,7 +354,7 @@ new /obj/item/stack/cable_coil(loc, 2) qdel(src) -/obj/machinery/camera/update_icon() //TO-DO: Make panel open states, xray camera, and indicator lights overlays instead. +/obj/machinery/camera/update_appearance(updates = ALL) //TO-DO: Make panel open states, xray camera, and indicator lights overlays instead. var/xray_module if(isXRay(TRUE)) xray_module = "xray" @@ -393,7 +393,7 @@ visible_message(span_danger("\The [src] [change_msg]!")) playsound(src, 'sound/items/wirecutter.ogg', 100, TRUE) - update_icon() //update Initialize() if you remove this. + update_appearance(updates = ALL) //update Initialize() if you remove this. // now disconnect anyone using the camera //Apparently, this will disconnect anyone even if the camera was re-activated. diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index f69ec7ca6b95..4e9e75b1edd2 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -67,13 +67,13 @@ if(building) setDir(ndir) -/obj/structure/camera_assembly/update_icon() +/obj/structure/camera_assembly/update_appearance(updates = ALL) icon_state = "[xray_module ? "xray" : null][initial(icon_state)]" /obj/structure/camera_assembly/handle_atom_del(atom/A) if(A == xray_module) xray_module = null - update_icon() + update_appearance(updates = ALL) if(malf_xray_firmware_present) malf_xray_firmware_active = malf_xray_firmware_present //re-enable firmware based upgrades after the part is removed. if(istype(loc, /obj/machinery/camera)) @@ -109,7 +109,7 @@ xray_module = null if(malf_xray_firmware_present) malf_xray_firmware_active = malf_xray_firmware_present //re-enable firmware based upgrades after the part is removed. - update_icon() + update_appearance(updates = ALL) else if(I == emp_module) emp_module = null @@ -174,7 +174,7 @@ if(malf_xray_firmware_active) malf_xray_firmware_active = FALSE //flavor reason: MALF AI Upgrade Camera Network ability's firmware is incompatible with the new part //real reason: make it a normal upgrade so the finished camera's icons and examine texts are restored. - update_icon() + update_appearance(updates = ALL) return else if(istype(W, /obj/item/assembly/prox_sensor)) //motion sensing upgrade diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index dcbff23b21ae..906079988759 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -113,12 +113,12 @@ assembly.malf_xray_firmware_active = FALSE //make it appear like it's just normally upgraded so the icons and examine texts are restored. upgrades |= CAMERA_UPGRADE_XRAY - update_icon() + update_appearance(updates = ALL) /obj/machinery/camera/proc/removeXRay(ignore_malf_upgrades) if(!ignore_malf_upgrades) //don't downgrade it if malf software is forced onto it. upgrades &= ~CAMERA_UPGRADE_XRAY - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 7bd231e9afb9..b3132647474e 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -13,7 +13,7 @@ var/chargelevel = -1 var/charge_rate = 250 -/obj/machinery/cell_charger/update_icon() +/obj/machinery/cell_charger/update_appearance(updates = ALL) cut_overlays() if(charging) add_overlay(image(charging.icon, charging.icon_state)) @@ -61,7 +61,7 @@ charging = W user.visible_message("[user] inserts a cell into [src].", span_notice("You insert a cell into [src].")) chargelevel = -1 - update_icon() + update_appearance(updates = ALL) else if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W)) return @@ -81,10 +81,10 @@ return ..() /obj/machinery/cell_charger/proc/removecell() - charging.update_icon() + charging.update_appearance(updates = ALL) charging = null chargelevel = -1 - update_icon() + update_appearance(updates = ALL) /obj/machinery/cell_charger/attack_hand(mob/user) . = ..() @@ -141,4 +141,4 @@ use_power(charge_rate * delta_time) charging.give(charge_rate * delta_time) //this is 2558, efficient batteries exist - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 37da7f293e61..2a7d0fed08fc 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -215,13 +215,13 @@ GLOBAL_VAR_INIT(clones, 0) INVOKE_ASYNC(src, PROC_REF(horrifyingsound)) mess = TRUE icon_state = "pod_g" - update_icon() + update_appearance(updates = ALL) return NONE if(clonemind.zombified) //Can't clone the damned x2 INVOKE_ASYNC(src, PROC_REF(horrifyingsound)) mess = TRUE icon_state = "pod_g" - update_icon() + update_appearance(updates = ALL) return NONE current_insurance = insurance attempting = TRUE //One at a time!! diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm index 42c8a300fd3e..100aae7c15dd 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -22,7 +22,7 @@ /obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C) . = ..() if(mapload) - update_icon() + update_appearance(updates = ALL) power_change() if(!QDELETED(C)) qdel(circuit) @@ -44,7 +44,7 @@ icon_screen = "ratvar[rand(1, 4)]" icon_keyboard = "ratvar_key[rand(1, 6)]" icon_state = "ratvarcomputer[rand(1, 4)]" - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/narsie_act() if(clockwork && clockwork != initial(clockwork)) //if it's clockwork but isn't normally clockwork @@ -52,9 +52,9 @@ icon_screen = initial(icon_screen) icon_keyboard = initial(icon_keyboard) icon_state = initial(icon_state) - update_icon() + update_appearance(updates = ALL) -/obj/machinery/computer/update_icon() +/obj/machinery/computer/update_appearance(updates = ALL) cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index e37e87599c5e..d9e7896f7db6 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -75,9 +75,9 @@ var/oldstat = occupier.stat restoring = Fix() if(oldstat != occupier.stat) - update_icon() + update_appearance(updates = ALL) -/obj/machinery/computer/aifixer/update_icon() +/obj/machinery/computer/aifixer/update_appearance(updates = ALL) ..() if(stat & (NOPOWER|BROKEN)) return @@ -108,7 +108,7 @@ to_chat(AI, "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here.") to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.") card.AI = null - update_icon() + update_appearance(updates = ALL) else //Uploading AI from terminal to card if(occupier && !restoring) @@ -117,7 +117,7 @@ occupier.forceMove(card) card.AI = occupier occupier = null - update_icon() + update_appearance(updates = ALL) else if (restoring) to_chat(user, span_alert("ERROR: Reconstruction in progress.")) else if (!occupier) diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 23f4a2b74f8e..e1e0beaf1a92 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -26,7 +26,7 @@ playsound(active_apc, 'sound/machines/boltsdown.ogg', 25, FALSE) playsound(active_apc, 'sound/machines/terminal_alert.ogg', 50, FALSE) active_apc.locked = TRUE - active_apc.update_icon() + active_apc.update_appearance(updates = ALL) active_apc.remote_control = null active_apc = null @@ -125,7 +125,7 @@ playsound(active_apc, 'sound/machines/boltsdown.ogg', 25, FALSE) playsound(active_apc, 'sound/machines/terminal_alert.ogg', 50, FALSE) active_apc.locked = TRUE - active_apc.update_icon() + active_apc.update_appearance(updates = ALL) active_apc.remote_control = null active_apc = null APC.remote_control = src @@ -138,7 +138,7 @@ playsound(APC, 'sound/machines/boltsup.ogg', 25, FALSE) playsound(APC, 'sound/machines/terminal_alert.ogg', 50, FALSE) APC.locked = FALSE - APC.update_icon() + APC.update_appearance(updates = ALL) active_apc = APC if("check-logs") log_activity("Checked Logs") @@ -160,7 +160,7 @@ log_game("Warning: possible href exploit by [key_name(usr)] - attempted to set [html_encode(type)] on [target] to [html_encode(value)]") return target.vars[type] = target.setsubsystem(text2num(value)) - target.update_icon() + target.update_appearance(updates = ALL) target.update() var/setTo = "" switch(target.vars[type]) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 1f656f3c7bc3..a3bfaa865e06 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -83,7 +83,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( return INITIALIZE_HINT_QDEL Reset() -/obj/machinery/computer/arcade/update_icon() +/obj/machinery/computer/arcade/update_appearance(updates = ALL) if(dir == 2) icon_screen = "invaders" else @@ -141,7 +141,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( return prizevend(user) T.pay_tickets() - T.update_icon() + T.update_appearance(updates = ALL) O = T to_chat(user, span_notice("You turn in 2 tickets to the [src] and claim a prize!")) return diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 07614e156551..f526a937ac05 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -51,7 +51,7 @@ to_chat(usr, "Minor alarm for [zone] cleared.") minor_alarms -= zone . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency) SSradio.remove_object(src, receive_frequency) @@ -74,14 +74,14 @@ priority_alarms += zone else if (severity == "minor") minor_alarms += zone - update_icon() + update_appearance(updates = ALL) return -/obj/machinery/computer/atmos_alert/update_icon() +/obj/machinery/computer/atmos_alert/update_appearance(updates = ALL) ..() if(stat & (NOPOWER|BROKEN)) return if(priority_alarms.len) add_overlay("alert:2") else if(minor_alarms.len) - add_overlay("alert:1") \ No newline at end of file + add_overlay("alert:1") diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 7cabc9b4c943..07ab9ea3c943 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -42,8 +42,8 @@ name = "incinerator chamber gas sensor" id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR -/obj/machinery/air_sensor/update_icon() - icon_state = "gsensor[on]" +/obj/machinery/air_sensor/update_appearance(updates = ALL) + icon_state = "gsensor[on]" /obj/machinery/air_sensor/process_atmos() if(on) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index eb7ef145e0b0..a4c0e84a70f5 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -260,7 +260,7 @@ clockwork = TRUE //it'd look very weird light_power = 0 -/obj/machinery/computer/security/telescreen/update_icon() +/obj/machinery/computer/security/telescreen/update_appearance(updates = ALL) icon_state = initial(icon_state) if(stat & BROKEN) icon_state += "b" diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 988c6af30393..fc78b58f4085 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -523,7 +523,7 @@ P.info += "Medical Record Lost!
" P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, "Record Lost") P.info += "" - P.update_icon() + P.update_appearance(updates = ALL) src.printing = null src.add_fingerprint(usr) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index cccd7f7dfcbd..3f68b4868f8f 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -414,7 +414,7 @@ P.info += "Security Record Lost!
" P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, "Record Lost") P.info += "" - P.update_icon() + P.update_appearance(updates = ALL) printing = FALSE if("print_poster") diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 84657b3c2a76..7187468a7c5e 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -74,7 +74,7 @@ L -= I return !cleared -/obj/machinery/computer/station_alert/update_icon() +/obj/machinery/computer/station_alert/update_appearance(updates = ALL) ..() if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index a5a7d91f8398..c3f056b9613d 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -66,13 +66,13 @@ switch(action) if("regimeset") power_station.engaged = FALSE - power_station.teleporter_hub.update_icon() + power_station.teleporter_hub.update_appearance(updates = ALL) power_station.teleporter_hub.calibrated = FALSE reset_regime() . = TRUE if("settarget") power_station.engaged = FALSE - power_station.teleporter_hub.update_icon() + power_station.teleporter_hub.update_appearance(updates = ALL) power_station.teleporter_hub.calibrated = FALSE set_target(usr) . = TRUE @@ -86,7 +86,7 @@ say("Processing hub calibration to target...") calibrating = TRUE - power_station.update_icon() + power_station.update_appearance(updates = ALL) spawn(50 * (3 - power_station.teleporter_hub.accuracy)) //Better parts mean faster calibration calibrating = FALSE if(check_hub_connection()) @@ -94,7 +94,7 @@ say("Calibration complete.") else say("Error: Unable to detect hub.") - power_station.update_icon() + power_station.update_appearance(updates = ALL) . = TRUE /obj/machinery/computer/teleporter/proc/check_hub_connection() @@ -159,10 +159,10 @@ target_station.stat &= ~NOPOWER if(target_station.teleporter_hub) target_station.teleporter_hub.stat &= ~NOPOWER - target_station.teleporter_hub.update_icon() + target_station.teleporter_hub.update_appearance(updates = ALL) if(target_station.teleporter_console) target_station.teleporter_console.stat &= ~NOPOWER - target_station.teleporter_console.update_icon() + target_station.teleporter_console.update_appearance(updates = ALL) /obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM) var/turf/T = get_turf(AM) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 521b080023f4..ef111be0824c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -172,7 +172,7 @@ GLOBAL_VAR_INIT(cryopods_enabled, FALSE) ..() /obj/machinery/cryopod/LateInitialize() - update_icon() + update_appearance(updates = ALL) find_control_computer() /obj/machinery/cryopod/proc/PowerOn() diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index aa6a469b7df5..fefefdd0568c 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -80,7 +80,7 @@ return return ..() -/obj/machinery/jukebox/update_icon() +/obj/machinery/jukebox/update_appearance(updates = ALL) if(active) icon_state = "[initial(icon_state)]-active" else @@ -174,7 +174,7 @@ /obj/machinery/jukebox/proc/activate_music() active = TRUE - update_icon() + update_appearance(updates = ALL) START_PROCESSING(SSobj, src) var/sound/song_played = sound(selection.song_path) var/list/close = range(10,src) @@ -464,7 +464,7 @@ STOP_PROCESSING(SSobj, src) dance_over() playsound(src,'sound/machines/terminal_off.ogg',50,TRUE) - update_icon() + update_appearance(updates = ALL) stop = world.time + 100 /obj/machinery/jukebox/disco/process() diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index a10c9c2aacd5..8966be899dc6 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -35,9 +35,9 @@ . = ..() decon = new(list(src), FALSE) decon_emagged = new(list(src), FALSE) - update_icon() + update_appearance(updates = ALL) -/obj/machinery/decontamination_unit/update_icon() +/obj/machinery/decontamination_unit/update_appearance(updates = ALL) . = ..() icon_state = uv? "tube_on" : (state_open? "tube_open" : "tube") @@ -52,7 +52,7 @@ open_machine() dump_mob() playsound(src, 'sound/machines/decon/decon-open.ogg', 50, TRUE) - update_icon() + update_appearance(updates = ALL) /obj/machinery/decontamination_unit/proc/dump_mob() var/turf/T = get_turf(src) @@ -97,7 +97,7 @@ uv_cycles-- uv = TRUE locked = TRUE - update_icon() + update_appearance(updates = ALL) if(uv_emagged) radiation_pulse(src, 500, 5) decon_emagged.start() @@ -309,7 +309,7 @@ return FALSE visible_message(span_notice("[user] inserts [I] into [src]."), span_notice("You load [I] into [src].")) - update_icon() + update_appearance(updates = ALL) return if(!state_open && !uv) @@ -441,7 +441,7 @@ dispense(O, usr) desired-- return TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/decontamination_unit/proc/load(obj/item/O) if(ismob(O.loc)) @@ -489,4 +489,4 @@ if(!user.canUseTopic(src, !issilicon(user)) || state_open) return locked = !locked - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index 7000b0768fce..1bb4bd32a381 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -36,9 +36,9 @@ if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational()) use_power(200) defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5% - update_icon() + update_appearance(updates = ALL) -/obj/machinery/defibrillator_mount/update_icon() +/obj/machinery/defibrillator_mount/update_appearance(updates = ALL) cut_overlays() if(defib) add_overlay("defib") @@ -76,7 +76,7 @@ span_notice("You press [I] into the mount, and it clicks into place.")) playsound(src, 'sound/machines/click.ogg', 50, TRUE) defib = I - update_icon() + update_appearance(updates = ALL) return else if(defib && I == defib.paddles) defib.paddles.snap_back() @@ -89,7 +89,7 @@ return clamps_locked = !clamps_locked to_chat(user, span_notice("Clamps [clamps_locked ? "" : "dis"]engaged.")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("Insufficient access.")) return @@ -111,7 +111,7 @@ span_notice("You override the locking clamps on [src]!")) playsound(src, 'sound/machines/locktoggle.ogg', 50, TRUE) clamps_locked = FALSE - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/defibrillator_mount/AltClick(mob/living/carbon/user) @@ -130,7 +130,7 @@ span_notice("You slide out [defib] from [src] and unhook the charging cables.")) playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE) defib = null - update_icon() + update_appearance(updates = ALL) //wallframe, for attaching the mounts easily /obj/item/wallframe/defib_mount diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm index a66dccc96c8f..855c1b60a608 100644 --- a/code/game/machinery/dish_drive.dm +++ b/code/game/machinery/dish_drive.dm @@ -125,6 +125,6 @@ playsound(src, 'sound/items/pshoom.ogg', 50, TRUE) playsound(bin, 'sound/items/pshoom.ogg', 50, TRUE) Beam(bin, icon_state = "rped_upgrade", time = 5) - bin.update_icon() + bin.update_appearance(updates = ALL) flick("synthesizer_beam", src) time_since_dishes = world.time + 600 diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 31e527017524..8924655dfbcb 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -35,7 +35,7 @@ if(scan_level >= 3) . += "Scanner has been upgraded to support autoprocessing." -/obj/machinery/dna_scannernew/update_icon() +/obj/machinery/dna_scannernew/update_appearance(updates = ALL) //no power or maintenance if(stat & (NOPOWER|BROKEN)) @@ -128,7 +128,7 @@ /obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params) if(!occupant && default_deconstruction_screwdriver(user, icon_state, icon_state, I))//sent icon_state is irrelevant... - update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed + update_appearance(updates = ALL)//..since we're updating the icon here, since the scanner can be unpowered when opened/closed return if(default_pry_open(I)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 02d0fefa3ecd..dda289fdb2c4 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -202,7 +202,7 @@ welded = TRUE if(24 to 30) panel_open = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/ComponentInitialize() . = ..() @@ -363,7 +363,7 @@ return emergency = !emergency - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/lock() bolt() @@ -374,7 +374,7 @@ locked = TRUE playsound(src,boltDown,30,0,3) audible_message(span_italics("You hear a click from the bottom of the door."), null, 1) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/unlock() unbolt() @@ -385,7 +385,7 @@ locked = FALSE playsound(src,boltUp,30,0,3) audible_message(span_italics("You hear a click from the bottom of the door."), null, 1) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/narsie_act() var/turf/T = get_turf(src) @@ -448,7 +448,7 @@ /obj/machinery/door/airlock/handle_atom_del(atom/A) if(A == note) note = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/Bumped(atom/movable/AM) if(operating || (obj_flags & EMAGGED)) @@ -522,7 +522,7 @@ /obj/machinery/door/airlock/proc/regainMainPower() if(secondsMainPowerLost > 0) secondsMainPowerLost = 0 - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/handlePowerRestore() var/cont = TRUE @@ -543,7 +543,7 @@ cont = TRUE spawnPowerRestoreRunning = FALSE updateDialog() - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/loseMainPower() if(secondsMainPowerLost <= 0) @@ -553,7 +553,7 @@ if(!spawnPowerRestoreRunning) spawnPowerRestoreRunning = TRUE INVOKE_ASYNC(src, PROC_REF(handlePowerRestore)) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/loseBackupPower() if(secondsBackupPowerLost < 60) @@ -561,12 +561,12 @@ if(!spawnPowerRestoreRunning) spawnPowerRestoreRunning = TRUE INVOKE_ASYNC(src, PROC_REF(handlePowerRestore)) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/regainBackupPower() if(secondsBackupPowerLost > 0) secondsBackupPowerLost = 0 - update_icon() + update_appearance(updates = ALL) // shock user with probability prb (if all connections & power are working) // returns TRUE if shocked, FALSE otherwise @@ -967,7 +967,7 @@ user.visible_message(span_notice("[user] reinforces \the [src] with metal."), span_notice("You reinforce \the [src] with metal.")) security_level = AIRLOCK_SECURITY_METAL - update_icon() + update_appearance(updates = ALL) return else if(istype(C, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/S = C @@ -983,7 +983,7 @@ security_level = AIRLOCK_SECURITY_PLASTEEL modify_max_integrity(normal_integrity * AIRLOCK_INTEGRITY_MULTIPLIER) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R - update_icon() + update_appearance(updates = ALL) return if(AIRLOCK_SECURITY_METAL) if(C.tool_behaviour == TOOL_WELDER) @@ -998,7 +998,7 @@ span_italics("You hear welding.")) security_level = AIRLOCK_SECURITY_NONE spawn_atom_to_turf(/obj/item/stack/sheet/metal, user.loc, 2) - update_icon() + update_appearance(updates = ALL) return if(AIRLOCK_SECURITY_PLASTEEL_I_S) if(C.tool_behaviour == TOOL_CROWBAR) @@ -1015,7 +1015,7 @@ modify_max_integrity(normal_integrity) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_N spawn_atom_to_turf(/obj/item/stack/sheet/plasteel, user.loc, 1) - update_icon() + update_appearance(updates = ALL) return if(AIRLOCK_SECURITY_PLASTEEL_I) if(C.tool_behaviour == TOOL_WELDER) @@ -1075,13 +1075,13 @@ panel_open = !panel_open to_chat(user, span_notice("You [panel_open ? "open":"close"] the maintenance panel of the airlock.")) C.play_tool_sound(src) - update_icon() + update_appearance(updates = ALL) else if((C.tool_behaviour == TOOL_WIRECUTTER) && note) user.visible_message(span_notice("[user] cuts down [note] from [src]."), span_notice("You remove [note] from [src].")) C.play_tool_sound(src) note.forceMove(get_turf(user)) note = null - update_icon() + update_appearance(updates = ALL) else if(is_wire_tool(C) && panel_open) attempt_wire_interaction(user) return @@ -1107,7 +1107,7 @@ return to_chat(user, span_warning("You apply [C]. Next time someone opens the door, it will explode.")) panel_open = FALSE - update_icon() + update_appearance(updates = ALL) user.transferItemToLoc(C, src, TRUE) charge = C else if(istype(C,/obj/item/electronics/airlock)) @@ -1133,7 +1133,7 @@ return user.visible_message(span_notice("[user] pins [C] to [src]."), span_notice("You pin [C] to [src].")) note = C - update_icon() + update_appearance(updates = ALL) else if(istype(C, /obj/item/brace)) //yogs apply_brace(C, user) //yogs else if(istype(C, /obj/item/umbral_tendrils)) @@ -1210,7 +1210,7 @@ welded = !welded user.visible_message("[user.name] has [welded? "welded shut":"unwelded"] [src].", \ span_notice("You [welded ? "weld the airlock shut":"unweld the airlock"].")) - update_icon() + update_appearance(updates = ALL) else if(obj_integrity < max_integrity) if(!W.tool_start_check(user, amount=0)) @@ -1223,7 +1223,7 @@ stat &= ~BROKEN user.visible_message("[user.name] has repaired [src].", \ span_notice("You finish repairing the airlock.")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_notice("The airlock doesn't need repairing.")) @@ -1486,7 +1486,7 @@ assemblytype = initial(airlock.assemblytype) anim_parts = initial(airlock.anim_parts) rebuild_parts() - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/CanAStarPass(obj/item/card/id/ID) //Airlock is passable if it is open (!density), bot has access, and is not bolted shut or powered off) @@ -1579,7 +1579,7 @@ /obj/machinery/door/airlock/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() if(obj_integrity < (0.75 * max_integrity)) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/deconstruct(disassembled = TRUE, mob/user) @@ -1597,7 +1597,7 @@ A.created_name = name A.previous_assembly = previous_airlock A.update_name() - A.update_icon() + A.update_appearance(updates = ALL) if(!disassembled) if(A) @@ -1701,14 +1701,14 @@ if("disrupt-main") if(!secondsMainPowerLost) loseMainPower() - update_icon() + update_appearance(updates = ALL) else to_chat(usr, "Main power is already offline.") . = TRUE if("disrupt-backup") if(!secondsBackupPowerLost) loseBackupPower() - update_icon() + update_appearance(updates = ALL) else to_chat(usr, "Backup power is already offline.") . = TRUE @@ -1735,7 +1735,7 @@ . = TRUE if("light-toggle") lights = !lights - update_icon() + update_appearance(updates = ALL) . = TRUE if("safe-toggle") safe = !safe @@ -1796,7 +1796,7 @@ if(!user_allowed(user)) return emergency = !emergency - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/proc/user_toggle_open(mob/user) if(!user_allowed(user)) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 7e2238fc05ef..ae8e28c507e9 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -226,7 +226,7 @@ DA.glass = TRUE if(heat_proof) DA.heat_proof_finished = TRUE - DA.update_icon() + DA.update_appearance(updates = ALL) DA.update_name() qdel(src) @@ -504,7 +504,7 @@ name = "airlock" desc = "It opens and closes." stealthy = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/cult/proc/reveal() icon = initial(icon) @@ -512,7 +512,7 @@ name = initial(name) desc = initial(desc) stealthy = initial(stealthy) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/airlock/cult/narsie_act() return diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 70b40ad1e10e..9c9ff1d57793 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -102,7 +102,7 @@ if(!targets.len) obj_break() - update_icon() + update_appearance(updates = ALL) /obj/machinery/door_timer/attackby(obj/item/W, mob/user, params) var/obj/item/card/id/card = W.GetID() @@ -122,7 +122,7 @@ if(timing) if(world.time - activation_time >= timer_duration) timer_end() // open doors, reset timer, clear status screen - update_icon() + update_appearance(updates = ALL) // open/closedoor checks if door_timer has power, if so it checks if the // linked door is open/closed (by density) then opens it/closes it. @@ -144,7 +144,7 @@ if(C.opened && !C.close()) continue C.locked = TRUE - C.update_icon() + C.update_appearance(updates = ALL) if(desired_crime) var/datum/data/record/R = find_record("name", desired_name, GLOB.data_core.security) @@ -172,7 +172,7 @@ timing = FALSE activation_time = null set_timer(0) - update_icon() + update_appearance(updates = ALL) var/datum/data/record/R = find_record("name", desired_name, GLOB.data_core.security) if(R) R.fields["criminal"] = "Discharged" @@ -190,7 +190,7 @@ if(C.opened) continue C.locked = FALSE - C.update_icon() + C.update_appearance(updates = ALL) desired_crime = null desired_name = null @@ -314,7 +314,7 @@ // if NOPOWER, display blank // if BROKEN, display blue screen of death icon AI uses // if timing=true, run update display function -/obj/machinery/door_timer/update_icon() +/obj/machinery/door_timer/update_appearance(updates = ALL) if(stat & (NOPOWER)) icon_state = "frame" return diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 4313faf58c19..3b7df460236c 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -3,6 +3,7 @@ desc = "It opens and closes." icon = 'icons/obj/doors/Doorint.dmi' icon_state = "door1" + base_icon_state = "door" opacity = 1 density = TRUE move_resist = MOVE_FORCE_VERY_STRONG @@ -292,11 +293,9 @@ /obj/machinery/door/proc/unelectrify() secondsElectrified = MACHINE_NOT_ELECTRIFIED -/obj/machinery/door/update_icon() - if(density) - icon_state = "door1" - else - icon_state = "door0" +/obj/machinery/door/update_icon_state(updates = ALL) + icon_state = "[base_icon_state][density]" + return ..() /obj/machinery/door/proc/do_animate(animation) switch(animation) @@ -327,7 +326,7 @@ density = FALSE sleep(0.5 SECONDS) layer = initial(layer) - update_icon() + update_appearance(updates = ALL) set_opacity(0) operating = FALSE air_update_turf(1) @@ -358,7 +357,7 @@ sleep(0.5 SECONDS) density = TRUE sleep(0.5 SECONDS) - update_icon() + update_appearance(updates = ALL) if(visible && !glass) set_opacity(1) operating = FALSE diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index fbfbfdb67735..b5306252072a 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -35,6 +35,10 @@ setDir(direct) CalculateAffectingAreas() + if(prob(0.004) && icon == 'icons/obj/doors/doorfireglass.dmi') + base_icon_state = "sus" + desc += " This one looks a bit sus..." + /obj/machinery/door/firedoor/examine(mob/user) . = ..() if(!density) @@ -156,7 +160,7 @@ if(W.use_tool(src, user, 40, volume=50)) welded = !welded to_chat(user, span_danger("[user] [welded?"welds":"unwelds"] [src]."), span_notice("You [welded ? "weld" : "unweld"] [src].")) - update_icon() + update_appearance(updates = ALL) /obj/machinery/door/firedoor/try_to_crowbar(obj/item/I, mob/user) if(welded || operating) @@ -210,22 +214,20 @@ /obj/machinery/door/firedoor/do_animate(animation) switch(animation) if("opening") - flick("door_opening", src) + flick("[base_icon_state]_opening", src) if("closing") - flick("door_closing", src) + flick("[base_icon_state]_closing", src) -/obj/machinery/door/firedoor/update_icon() - cut_overlays() - if(density) - icon_state = "door_closed" - if(welded) - add_overlay("welded") - else - icon_state = "door_open" - if(welded) - add_overlay("welded_open") +/obj/machinery/door/firedoor/update_icon_state() + . = ..() + icon_state = "[base_icon_state]_[density ? "closed" : "open"]" SSdemo.mark_dirty(src) +/obj/machinery/door/firedoor/update_overlays() + . = ..() + if(welded) + . += density ? "welded" : "welded_open" + /obj/machinery/door/firedoor/open() . = ..() latetoggle() @@ -293,7 +295,7 @@ if(!(flags_1 & NODECONSTRUCT_1) && disassembled) var/obj/structure/firelock_frame/F = new assemblytype(get_turf(src)) F.constructionStep = CONSTRUCTION_PANEL_OPEN - F.update_icon() + F.update_appearance(updates = ALL) qdel(src) @@ -316,6 +318,7 @@ /obj/machinery/door/firedoor/border_only/closed icon_state = "door_closed" + base_icon_state = "door_closed" opacity = TRUE density = TRUE @@ -471,7 +474,7 @@ if(CONSTRUCTION_NOCIRCUIT) . += span_notice("There are no firelock electronics in the frame. The frame could be cut apart.") -/obj/structure/firelock_frame/update_icon() +/obj/structure/firelock_frame/update_appearance(updates = ALL) ..() icon_state = "frame[constructionStep]" @@ -502,7 +505,7 @@ user.visible_message(span_notice("[user] pries out a metal plate from [src], exposing the wires."), \ span_notice("You remove the cover plate from [src], exposing the wires.")) constructionStep = CONSTRUCTION_WIRES_EXPOSED - update_icon() + update_appearance(updates = ALL) return if(C.tool_behaviour == TOOL_WRENCH) for(var/obj/machinery/door/firedoor/door in get_turf(src)) //go through each obj/machinery/door/firedoor in the turf @@ -573,7 +576,7 @@ span_notice("You remove the wiring from [src], exposing the circuit board.")) new/obj/item/stack/cable_coil(get_turf(src), 5) constructionStep = CONSTRUCTION_GUTTED - update_icon() + update_appearance(updates = ALL) return if(C.tool_behaviour == TOOL_CROWBAR) C.play_tool_sound(src) @@ -587,7 +590,7 @@ user.visible_message(span_notice("[user] pries the metal plate into [src]."), \ span_notice("You pry [src]'s cover plate into place, hiding the wires.")) constructionStep = CONSTRUCTION_PANEL_OPEN - update_icon() + update_appearance(updates = ALL) return if(CONSTRUCTION_GUTTED) if(C.tool_behaviour == TOOL_CROWBAR) @@ -601,7 +604,7 @@ span_notice("You remove the circuit board from [src].")) new /obj/item/electronics/firelock(drop_location()) constructionStep = CONSTRUCTION_NOCIRCUIT - update_icon() + update_appearance(updates = ALL) return if(istype(C, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/B = C @@ -619,7 +622,7 @@ playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1) B.use(5) constructionStep = CONSTRUCTION_WIRES_EXPOSED - update_icon() + update_appearance(updates = ALL) return if(CONSTRUCTION_NOCIRCUIT) if(C.tool_behaviour == TOOL_WELDER) @@ -652,7 +655,7 @@ span_notice("You insert and secure [C].")) playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1) constructionStep = CONSTRUCTION_GUTTED - update_icon() + update_appearance(updates = ALL) return if(istype(C, /obj/item/electroadaptive_pseudocircuit)) var/obj/item/electroadaptive_pseudocircuit/P = C @@ -661,7 +664,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt a firelock circuit and slot it into the assembly.")) constructionStep = CONSTRUCTION_GUTTED - update_icon() + update_appearance(updates = ALL) return return ..() @@ -676,7 +679,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt a firelock circuit and slot it into the assembly.")) constructionStep = CONSTRUCTION_GUTTED - update_icon() + update_appearance(updates = ALL) return TRUE return FALSE diff --git a/code/game/machinery/doors/passworddoor.dm b/code/game/machinery/doors/passworddoor.dm index ee8a4ec57627..b5617da2591a 100644 --- a/code/game/machinery/doors/passworddoor.dm +++ b/code/game/machinery/doors/passworddoor.dm @@ -42,7 +42,7 @@ else do_animate("deny") -/obj/machinery/door/password/update_icon() +/obj/machinery/door/password/update_appearance(updates = ALL) if(density) icon_state = "closed" else @@ -70,4 +70,4 @@ return /obj/machinery/door/password/ex_act(severity, target) - return \ No newline at end of file + return diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 1f692c99fb13..843d8ec763d3 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -89,7 +89,7 @@ flick("closing", src) playsound(src, 'sound/machines/blastdoor.ogg', 30, 1) -/obj/machinery/door/poddoor/update_icon() +/obj/machinery/door/poddoor/update_appearance(updates = ALL) if(density) icon_state = "closed" else diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 639353a65a04..07f0cb5837d7 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -35,6 +35,7 @@ debris += new /obj/item/stack/rods(src, rods) if(cable) debris += new /obj/item/stack/cable_coil(src, cable) + update_appearance(UPDATE_ICON) /obj/machinery/door/window/ComponentInitialize() . = ..() @@ -48,13 +49,46 @@ electronics = null return ..() -/obj/machinery/door/window/update_icon() - if(density) - icon_state = base_state - else - icon_state = "[base_state]open" +/obj/machinery/door/window/update_appearance(updates = ALL) + . = ..() SSdemo.mark_dirty(src) +/obj/machinery/door/window/update_icon_state() + . = ..() + icon_state = "[base_state][density ? null : "open"]" + + if(hasPower() && unres_sides) + set_light(l_range = 2, l_power = 1) + return + + set_light(l_range = 0) + +/obj/machinery/door/window/update_overlays() + . = ..() + + if(!hasPower() || !unres_sides) + return + + switch(dir) + if(NORTH,SOUTH) + if(unres_sides & NORTH) + var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_n") + side_overlay.pixel_y = dir == NORTH ? 31 : 6 + . += side_overlay + if(unres_sides & SOUTH) + var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_s") + side_overlay.pixel_y = dir == NORTH ? -6 : -31 + . += side_overlay + if(EAST,WEST) + if(unres_sides & EAST) + var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_e") + side_overlay.pixel_x = dir == EAST ? 31 : 6 + . += side_overlay + if(unres_sides & WEST) + var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_w") + side_overlay.pixel_x = dir == EAST ? -6 : -31 + . += side_overlay + /obj/machinery/door/window/proc/open_and_close() if(!open()) return @@ -264,7 +298,7 @@ WA.state= "02" WA.setDir(dir) WA.ini_dir = dir - WA.update_icon() + WA.update_appearance(updates = ALL) WA.created_name = name if(obj_flags & EMAGGED) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index a81e1d3f0064..c55fd986201f 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -83,7 +83,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays) return FALSE return ..() -/obj/machinery/doppler_array/update_icon() +/obj/machinery/doppler_array/update_appearance(updates = ALL) if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else if(powered()) diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 75cedc1c1bba..0a1d53f25149 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -135,7 +135,7 @@ playsound(src, work_sound, 50, 1) mode = DRONE_PRODUCTION timer = world.time + production_time - update_icon() + update_appearance(updates = ALL) if(DRONE_PRODUCTION) materials.use_materials(using_materials) @@ -152,7 +152,7 @@ mode = DRONE_RECHARGING timer = world.time + cooldownTime - update_icon() + update_appearance(updates = ALL) if(DRONE_RECHARGING) if(recharge_sound) @@ -161,7 +161,7 @@ visible_message(span_notice("[src] [recharge_message]")) mode = DRONE_READY - update_icon() + update_appearance(updates = ALL) /obj/machinery/droneDispenser/proc/count_shells() . = 0 @@ -169,7 +169,7 @@ if(istype(a, dispense_type)) .++ -/obj/machinery/droneDispenser/update_icon() +/obj/machinery/droneDispenser/update_appearance(updates = ALL) if(stat & (BROKEN|NOPOWER)) icon_state = icon_off else if(mode == DRONE_RECHARGING) @@ -207,7 +207,7 @@ stat &= ~BROKEN obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index 307536c5e8ae..7109087b2cc3 100644 --- a/code/game/machinery/electrolyzer.dm +++ b/code/game/machinery/electrolyzer.dm @@ -32,7 +32,7 @@ . = ..() if(ispath(cell)) cell = new cell(src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/electrolyzer/Destroy() if(cell) @@ -54,7 +54,7 @@ else . += "There is no power cell installed." -/obj/machinery/electrolyzer/update_icon() +/obj/machinery/electrolyzer/update_appearance(updates = ALL) cut_overlays() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" if(panel_open) @@ -65,26 +65,26 @@ on = FALSE if(!on) active_power_usage = 0 - update_icon() + update_appearance(updates = ALL) return PROCESS_KILL if((stat & NOPOWER) && (!cell || cell.charge <= 0)) on = FALSE - update_icon() + update_appearance(updates = ALL) return FALSE var/turf/L = loc if(!istype(L)) if(mode != ELECTROLYZER_MODE_STANDBY) mode = ELECTROLYZER_MODE_STANDBY - update_icon() + update_appearance(updates = ALL) return var/newMode = on ? ELECTROLYZER_MODE_WORKING : ELECTROLYZER_MODE_STANDBY //change the mode to working if the machine is on if(mode != newMode) //check if the mode is set correctly mode = newMode - update_icon() + update_appearance(updates = ALL) if(mode == ELECTROLYZER_MODE_STANDBY) return @@ -108,7 +108,7 @@ if (!cell.use((5 * proportion) / (efficiency + workingPower))) //automatically turn off machine when cell depletes on = FALSE - update_icon() + update_appearance(updates = ALL) working = FALSE else active_power_usage = (5 * proportion) / (efficiency + workingPower) @@ -160,7 +160,7 @@ if(I.tool_behaviour == TOOL_SCREWDRIVER) panel_open = !panel_open user.visible_message(span_notice("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src]."), span_notice("You [panel_open ? "open" : "close"] the hatch on \the [src].")) - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(I)) return @@ -193,7 +193,7 @@ on = !on mode = ELECTROLYZER_MODE_STANDBY usr.visible_message(span_notice("[usr] switches [on ? "on" : "off"] \the [src]."), span_notice("You switch [on ? "on" : "off"] \the [src].")) - update_icon() + update_appearance(updates = ALL) if (on) START_PROCESSING(SSmachines, src) . = TRUE diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index c057c958342a..e46b83b4a85f 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -67,7 +67,7 @@ if(controller.stat & NOPOWER) return busy = TRUE - update_icon() + update_appearance(updates = ALL) if(door.density) if(!controller.exteriorAirlock || !controller.interiorAirlock) controller.onlyOpen(door) @@ -82,9 +82,9 @@ /obj/machinery/doorButtons/access_button/proc/not_busy() busy = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/machinery/doorButtons/access_button/update_icon() +/obj/machinery/doorButtons/access_button/update_appearance(updates = ALL) if(stat & NOPOWER) icon_state = "access_button_off" else @@ -148,7 +148,7 @@ /obj/machinery/doorButtons/airlock_controller/proc/onlyOpen(obj/machinery/door/airlock/A) if(A) busy = CLOSING - update_icon() + update_appearance(updates = ALL) openDoor(A) /obj/machinery/doorButtons/airlock_controller/proc/onlyClose(obj/machinery/door/airlock/A) @@ -160,7 +160,7 @@ if(A.density) goIdle() return FALSE - update_icon() + update_appearance(updates = ALL) A.safe = FALSE //Door crushies, manual door after all. Set every time in case someone changed it, safe doors can end up waiting forever. A.unbolt() if(A.close()) @@ -179,7 +179,7 @@ if(exteriorAirlock.density == interiorAirlock.density || !A.density) return busy = CYCLE - update_icon() + update_appearance(updates = ALL) if(A == interiorAirlock) if(closeDoor(exteriorAirlock)) busy = CYCLE_INTERIOR @@ -217,7 +217,7 @@ lostPower = FALSE busy = FALSE if(update) - update_icon() + update_appearance(updates = ALL) updateUsrDialog() /obj/machinery/doorButtons/airlock_controller/process() @@ -243,7 +243,7 @@ else if(A.id_tag == idExterior) exteriorAirlock = A -/obj/machinery/doorButtons/airlock_controller/update_icon() +/obj/machinery/doorButtons/airlock_controller/update_appearance(updates = ALL) if(stat & NOPOWER) icon_state = "access_control_off" return diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index bb838b650fc2..91e97a8da01a 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -255,7 +255,7 @@ new_prog.master = src program = new_prog -/obj/machinery/embedded_controller/radio/airlock_controller/update_icon() +/obj/machinery/embedded_controller/radio/airlock_controller/update_appearance(updates = ALL) if(on && program) if(program.memory["processing"]) icon_state = "airlock_control_process" diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 9fb6e9f309e0..235baab66055 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -32,7 +32,7 @@ popup.set_content(return_text()) popup.open() -/obj/machinery/embedded_controller/update_icon() +/obj/machinery/embedded_controller/update_appearance(updates = ALL) /obj/machinery/embedded_controller/proc/return_text() @@ -58,7 +58,7 @@ if(program) program.process(delta_time) - update_icon() + update_appearance(updates = ALL) src.updateDialog() /obj/machinery/embedded_controller/radio diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index 7679080ea1f9..de009453eae0 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -54,7 +54,7 @@ new_prog.master = src program = new_prog -/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon() +/obj/machinery/embedded_controller/radio/simple_vent_controller/update_appearance(updates = ALL) if(on && program) icon_state = "airlock_control_standby" else diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index 3f388b408aa9..e99e6a7b842e 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -30,7 +30,7 @@ /obj/machinery/fat_sucker/Initialize() . = ..() soundloop = new(list(src), FALSE) - update_icon() + update_appearance(updates = ALL) /obj/machinery/fat_sucker/RefreshParts() ..() @@ -59,7 +59,7 @@ return to_chat(occupant, span_notice("You enter [src]")) addtimer(CALLBACK(src, PROC_REF(start_extracting)), 20, TIMER_OVERRIDE|TIMER_UNIQUE) - update_icon() + update_appearance(updates = ALL) /obj/machinery/fat_sucker/open_machine(mob/user) make_meat() @@ -106,7 +106,7 @@ free_exit = !free_exit to_chat(user, span_notice("Safety hatch [free_exit ? "unlocked" : "locked"].")) -/obj/machinery/fat_sucker/update_icon() +/obj/machinery/fat_sucker/update_appearance(updates = ALL) overlays.Cut() if(!state_open) if(processing) @@ -158,7 +158,7 @@ if(C.nutrition > start_at) processing = TRUE soundloop.start() - update_icon() + update_appearance(updates = ALL) set_light(2, 1, "#ff0000") else say("Subject not fat enough.") @@ -195,7 +195,7 @@ to_chat(user, span_warning("[src] must be closed to [panel_open ? "close" : "open"] its maintenance hatch!")) return if(default_deconstruction_screwdriver(user, icon_state, icon_state, I)) - update_icon() + update_appearance(updates = ALL) return return FALSE diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 303562183071..bf3d8e2ebe76 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -44,7 +44,7 @@ panel_open = TRUE pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0 - update_icon() + update_appearance() myarea = get_area(src) LAZYADD(myarea.firealarms, src) @@ -52,31 +52,34 @@ LAZYREMOVE(myarea.firealarms, src) return ..() -/obj/machinery/firealarm/update_icon() - cut_overlays() +/obj/machinery/firealarm/update_appearance(updates) + . = ..() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) +/obj/machinery/firealarm/update_icon_state() if(panel_open) icon_state = "fire_b[buildstage]" - return - + return ..() if(stat & BROKEN) icon_state = "firex" - return - + return ..() icon_state = "fire0" + return ..() +/obj/machinery/firealarm/update_overlays() + . = ..() if(stat & NOPOWER) return - add_overlay("fire_overlay") + if(panel_open) + return if(is_station_level(z)) - add_overlay("fire_[GLOB.security_level]") + . += "fire_[GLOB.security_level]" SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", layer, EMISSIVE_PLANE, dir) else - add_overlay("fire_[SEC_LEVEL_GREEN]") + . += "fire_[SEC_LEVEL_GREEN]" SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", layer, EMISSIVE_PLANE, dir) @@ -84,15 +87,15 @@ A = A.loc if(!detecting || !A.fire) - add_overlay("fire_off") + . += "fire_off" SSvis_overlays.add_vis_overlay(src, icon, "fire_off", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_off", layer, EMISSIVE_PLANE, dir) else if(obj_flags & EMAGGED) - add_overlay("fire_emagged") + . += "fire_emagged" SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", layer, EMISSIVE_PLANE, dir) else - add_overlay("fire_on") + . += "fire_on" SSvis_overlays.add_vis_overlay(src, icon, "fire_on", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_on", layer, EMISSIVE_PLANE, dir) @@ -109,7 +112,7 @@ if(obj_flags & EMAGGED) return obj_flags |= EMAGGED - update_icon() + update_appearance(updates = ALL) if(user) user.visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its thermal sensors.")) @@ -161,7 +164,7 @@ W.play_tool_sound(src) panel_open = !panel_open to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"].")) - update_icon() + update_appearance() return if(panel_open) @@ -194,7 +197,7 @@ W.play_tool_sound(src) new /obj/item/stack/cable_coil(user.loc, 5) to_chat(user, span_notice("You cut the wires from \the [src].")) - update_icon() + update_appearance() return else if(W.force) //hit and turn it on @@ -213,7 +216,7 @@ coil.use(5) buildstage = 2 to_chat(user, span_notice("You wire \the [src].")) - update_icon() + update_appearance() return else if(W.tool_behaviour == TOOL_CROWBAR) @@ -228,14 +231,14 @@ to_chat(user, span_notice("You pry out the circuit.")) new /obj/item/electronics/firealarm(user.loc) buildstage = 0 - update_icon() + update_appearance() return if(0) if(istype(W, /obj/item/electronics/firealarm)) to_chat(user, span_notice("You insert the circuit.")) qdel(W) buildstage = 1 - update_icon() + update_appearance() return else if(istype(W, /obj/item/electroadaptive_pseudocircuit)) @@ -245,7 +248,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt a fire alarm circuit and slot it into the assembly.")) buildstage = 1 - update_icon() + update_appearance() return else if(W.tool_behaviour == TOOL_WRENCH) @@ -271,7 +274,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt a fire alarm circuit and slot it into the assembly.")) buildstage = 1 - update_icon() + update_appearance() return TRUE return FALSE @@ -310,10 +313,9 @@ return // do nothing if we're already active if(fire) set_light(l_power = 0.8) - update_icon() else set_light(l_power = 0) - update_icon() + update_appearance() /* * Return of the Return of the Party button diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index baecdf468dd6..91da89eb44a6 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -46,7 +46,7 @@ return FALSE return ..() -/obj/machinery/flasher/update_icon() +/obj/machinery/flasher/update_appearance(updates = ALL) if (powered()) if(bulb.burnt_out) icon_state = "[base_state]1-p" diff --git a/code/game/machinery/gulag_processor.dm b/code/game/machinery/gulag_processor.dm index b900e9bbce3e..368d530a576b 100644 --- a/code/game/machinery/gulag_processor.dm +++ b/code/game/machinery/gulag_processor.dm @@ -62,7 +62,7 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( /obj/machinery/gulag_processor/power_change() ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/gulag_processor/interact(mob/user) . = ..() @@ -73,7 +73,7 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( /obj/machinery/gulag_processor/attackby(obj/item/I, mob/user) if(!occupant && default_deconstruction_screwdriver(user, "[icon_state]", "[icon_state]",I)) - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(I)) @@ -94,7 +94,7 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( return ..() -/obj/machinery/gulag_processor/update_icon() +/obj/machinery/gulag_processor/update_appearance(updates = ALL) icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 446c93826146..886f07a175a9 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -53,7 +53,7 @@ The console is located at computer/gulag_teleporter.dm /obj/machinery/gulag_teleporter/attackby(obj/item/I, mob/user) if(!occupant && default_deconstruction_screwdriver(user, "[icon_state]", "[icon_state]",I)) - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(I)) @@ -64,7 +64,7 @@ The console is located at computer/gulag_teleporter.dm return ..() -/obj/machinery/gulag_teleporter/update_icon() +/obj/machinery/gulag_teleporter/update_appearance(updates = ALL) icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 863aa385e45c..43486f342df8 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -91,7 +91,7 @@ addtimer(CALLBACK(src, PROC_REF(harvest)), interval) /obj/machinery/harvester/proc/harvest() - update_icon() + update_appearance(updates = ALL) if(!harvesting || state_open || !powered(AREA_USAGE_EQUIP) || !occupant || !iscarbon(occupant)) return playsound(src, 'sound/machines/juicer.ogg', 20, 1) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index ba58cd9a7eb4..11a307f36951 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -33,6 +33,7 @@ GLOBAL_LIST_EMPTY(holopads) name = "holopad" desc = "It's a floor-mounted device for projecting holographic images." icon_state = "holopad0" + base_icon_state = "holopad0" layer = LOW_OBJ_LAYER plane = FLOOR_PLANE flags_1 = HEAR_1 @@ -399,7 +400,7 @@ obj/machinery/holopad/secure/Initialize() playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring! ringing = TRUE - update_icon() + update_appearance(UPDATE_ICON_STATE) /obj/machinery/holopad/proc/activate_holo(mob/living/user) var/mob/living/silicon/ai/AI = user @@ -467,16 +468,18 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ set_light_on(TRUE) else set_light_on(FALSE) - update_icon() + update_appearance() -/obj/machinery/holopad/update_icon() +/obj/machinery/holopad/update_icon_state() var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls) if(ringing) - icon_state = "holopad_ringing" - else if(total_users || replay_mode) - icon_state = "holopad1" - else - icon_state = "holopad0" + icon_state = "[base_icon_state]_ringing" + return ..() + if(panel_open) + icon_state = "[base_icon_state]_open" + return ..() + icon_state = "[base_icon_state][(total_users || replay_mode) ? 1 : 0]" + return ..() /obj/machinery/holopad/proc/set_holo(mob/living/user, obj/effect/overlay/holo_pad_hologram/h) LAZYSET(masters, user, h) diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 70b15d62e138..320f8f3d4310 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -14,9 +14,9 @@ lit = FALSE else lit = !lit - update_icon() + update_appearance(updates = ALL) -/obj/machinery/holosign/update_icon() +/obj/machinery/holosign/update_appearance(updates = ALL) if(!lit) icon_state = initial(icon_state) set_light(0) @@ -27,7 +27,7 @@ /obj/machinery/holosign/power_change() if(!is_operational()) lit = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/holosign/surgery name = "surgery holosign" diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 20813ce8e110..7ee8f0f010a1 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -39,7 +39,7 @@ on = !(on) else on = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/igniter/attackby(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, icon_state, icon_state, O)) @@ -56,7 +56,7 @@ /obj/machinery/igniter/process() //ugh why is this even in process()? if(safety || panel_open) on = FALSE - update_icon() + update_appearance(updates = ALL) return if (src.on && !(stat & NOPOWER)) var/turf/location = src.loc @@ -69,7 +69,7 @@ wires = new /datum/wires/igniter(src) icon_state = "igniter[on]" -/obj/machinery/igniter/update_icon() +/obj/machinery/igniter/update_appearance(updates = ALL) if(stat & NOPOWER) icon_state = "igniter0" else @@ -101,7 +101,7 @@ QDEL_NULL(spark_system) return ..() -/obj/machinery/sparker/update_icon() +/obj/machinery/sparker/update_appearance(updates = ALL) if(disable) icon_state = "[initial(icon_state)]-d" else if(powered()) @@ -122,7 +122,7 @@ user.visible_message(span_notice("[user] has disabled \the [src]!"), span_notice("You disable the connection to \the [src].")) if (!src.disable) user.visible_message(span_notice("[user] has reconnected \the [src]!"), span_notice("You fix the connection to \the [src].")) - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 4985dcf70aea..52e819099c63 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -6,6 +6,7 @@ desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate." icon = 'icons/obj/iv_drip.dmi' icon_state = "iv_drip" + base_icon_state = "iv_drip" anchored = FALSE mouse_drag_pointer = MOUSE_ACTIVE_POINTER var/mob/living/carbon/attached @@ -18,54 +19,40 @@ /obj/machinery/iv_drip/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/iv_drip/Destroy() attached = null QDEL_NULL(beaker) return ..() -/obj/machinery/iv_drip/update_icon() +/obj/machinery/iv_drip/update_icon_state() if(attached) - if(mode) - icon_state = "injecting" - else - icon_state = "donating" + icon_state = "[base_icon_state]_[mode ? "injecting" : "donating"]" else - if(mode) - icon_state = "injectidle" - else - icon_state = "donateidle" + icon_state = "[base_icon_state]_[mode ? "injectidle" : "donateidle"]" + return ..() - cut_overlays() +/obj/machinery/iv_drip/update_overlays() + . = ..() - if(beaker) - if(attached) - add_overlay("beakeractive") - else - add_overlay("beakeridle") - if(beaker.reagents.total_volume) - var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent") - - var/percent = round((beaker.reagents.total_volume / beaker.volume) * 100) - switch(percent) - if(0 to 9) - filling_overlay.icon_state = "reagent0" - if(10 to 24) - filling_overlay.icon_state = "reagent10" - if(25 to 49) - filling_overlay.icon_state = "reagent25" - if(50 to 74) - filling_overlay.icon_state = "reagent50" - if(75 to 79) - filling_overlay.icon_state = "reagent75" - if(80 to 90) - filling_overlay.icon_state = "reagent80" - if(91 to INFINITY) - filling_overlay.icon_state = "reagent100" - - filling_overlay.color = list("#0000", "#0000", "#0000", "#000f", mix_color_from_reagents(beaker.reagents.reagent_list)) - add_overlay(filling_overlay) + if(!beaker) + return + + . += attached ? "beakeractive" : "beakeridle" + var/datum/reagents/container_reagents = beaker.reagents + if(!container_reagents) + return + +/* var/threshold = null + for(var/i in 1 to fill_icon_thresholds.len) + if(ROUND_UP(100 * container_reagents.total_volume / container_reagents.maximum_volume) >= fill_icon_thresholds[i]) + threshold = i + if(threshold) + var/fill_name = "[fill_icon_state][fill_icon_thresholds[threshold]]" + var/mutable_appearance/filling = mutable_appearance(icon, fill_name) + filling.color = mix_color_from_reagents(container_reagents.reagent_list) + . += filling*/ /obj/machinery/iv_drip/MouseDrop(mob/living/target) . = ..() @@ -75,7 +62,7 @@ if(attached) visible_message(span_warning("[attached] is detached from [src].")) attached = null - update_icon() + update_appearance(UPDATE_ICON) return if(!target.has_dna()) @@ -89,7 +76,7 @@ add_fingerprint(usr) attached = target START_PROCESSING(SSmachines, src) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(usr, span_warning("There's nothing attached to the IV drip!")) @@ -105,7 +92,7 @@ to_chat(user, span_notice("You attach [W] to [src].")) user.log_message("attached a [W] to [src] at [AREACOORD(src)] containing ([beaker.reagents.log_list()])", LOG_ATTACK) add_fingerprint(user) - update_icon() + update_appearance(UPDATE_ICON) return else if(istype(W,/obj/item/screwdriver)) return @@ -125,7 +112,7 @@ to_chat(attached, span_userdanger("The IV drip needle is ripped out of you!")) attached.apply_damage(3, BRUTE, pick(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM)) attached = null - update_icon() + update_appearance(UPDATE_ICON) return PROCESS_KILL if(beaker) @@ -139,7 +126,7 @@ var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages beaker.reagents.trans_to(attached, transfer_amount * delta_time * 0.5) - update_icon() + update_appearance(UPDATE_ICON) // Take blood else @@ -156,7 +143,7 @@ visible_message("[src] beeps loudly.") playsound(loc, 'sound/machines/twobeep_high.ogg', 50, 1) attached.transfer_blood_to(beaker, amount) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/iv_drip/attack_hand(mob/user) . = ..() @@ -167,7 +154,7 @@ if(attached) visible_message("[attached] is detached from [src]") attached = null - update_icon() + update_appearance(UPDATE_ICON) return else if(beaker) eject_beaker(user) @@ -188,7 +175,7 @@ if(beaker) beaker.forceMove(drop_location()) beaker = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/iv_drip/verb/toggle_mode() set category = "Object" @@ -203,7 +190,7 @@ return mode = !mode to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].") - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/iv_drip/examine(mob/user) . = ..() @@ -245,10 +232,10 @@ can_convert = FALSE /obj/machinery/iv_drip/saline/Initialize(mapload) - . = ..() - beaker = new /obj/item/reagent_containers/glass/saline(src) + AddElement(/datum/element/update_icon_blocker) + . = ..() -/obj/machinery/iv_drip/saline/update_icon() +/obj/machinery/iv_drip/saline/update_icon_state() return /obj/machinery/iv_drip/saline/eject_beaker() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 139ce45525ed..3e733130f661 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -3,6 +3,7 @@ name = "light switch" icon = 'icons/obj/power.dmi' icon_state = "light-p" + base_icon_state = "light-p" desc = "Make dark." power_channel = AREA_USAGE_LIGHT @@ -25,15 +26,26 @@ if(!name) name = "light switch ([area.name])" - update_icon() + update_appearance(updates = ALL) -/obj/machinery/light_switch/update_icon() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(!(stat & NOPOWER)) - if(area.lightswitch) - SSvis_overlays.add_vis_overlay(src, icon, "light1", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) - else - SSvis_overlays.add_vis_overlay(src, icon, "light0", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) +/obj/machinery/light_switch/update_appearance(updates=ALL) + . = ..() + luminosity = (stat & NOPOWER) ? 0 : 1 + +/obj/machinery/light_switch/update_icon_state() + set_light(area.lightswitch ? 0 : light_range) + icon_state = "[base_icon_state]" + if(stat & NOPOWER) + icon_state += "-nopower" + return ..() + icon_state += "[area.lightswitch ? "-on" : "-off"]" + return ..() + +/obj/machinery/light_switch/update_overlays() + . = ..() + if(stat & NOPOWER) + return ..() +// . += emissive_appearance(icon, "[base_icon_state]-emissive[area.lightswitch ? "-on" : "-off"]", src, alpha = src.alpha) /obj/machinery/light_switch/examine(mob/user) . = ..() @@ -47,10 +59,10 @@ . = ..() area.lightswitch = !area.lightswitch - area.update_icon() + area.update_appearance(updates = ALL) for(var/obj/machinery/light_switch/L in area) - L.update_icon() + L.update_appearance(updates = ALL) area.power_change() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 254a75256c76..2bae95f4427b 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -46,10 +46,10 @@ // update the invisibility and icon /obj/machinery/magnetic_module/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(updates = ALL) // update the icon_state -/obj/machinery/magnetic_module/update_icon() +/obj/machinery/magnetic_module/update_appearance(updates = ALL) var/state="floor_magnet" var/onstate="" if(!on) @@ -161,7 +161,7 @@ else use_power = NO_POWER_USE - update_icon() + update_appearance(updates = ALL) /obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the magneting diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index 8dcca251a562..046013aa4d9a 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -70,7 +70,7 @@ scan_active_4 = FALSE return -/obj/machinery/medical_kiosk/update_icon() +/obj/machinery/medical_kiosk/update_appearance(updates = ALL) if(is_operational()) icon_state = "kiosk_off" else diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 5c58cb19844d..d4526086dc77 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -72,10 +72,10 @@ // hide the object if turf is intact /obj/machinery/navbeacon/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(updates = ALL) // update the icon_state -/obj/machinery/navbeacon/update_icon() +/obj/machinery/navbeacon/update_appearance(updates = ALL) var/state="navbeacon[open]" if(invisibility) @@ -94,7 +94,7 @@ user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", span_notice("You [open ? "open" : "close"] the beacon's cover.")) - update_icon() + update_appearance(updates = ALL) else if(I.GetID()) if(open) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 1e49c5f35e0f..7ac99eb57113 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -150,7 +150,7 @@ GLOBAL_LIST_EMPTY(allCasters) if(newMessage) for(var/obj/machinery/newscaster/N in GLOB.allCasters) N.newsAlert() - N.update_icon() + N.update_appearance(updates = ALL) /datum/newscaster/feed_network/proc/deleteWanted() wanted_issue.active = 0 @@ -159,7 +159,7 @@ GLOBAL_LIST_EMPTY(allCasters) wanted_issue.scannedUser = null wanted_issue.img = null for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) - NEWSCASTER.update_icon() + NEWSCASTER.update_appearance(updates = ALL) /datum/newscaster/feed_network/proc/save_photo(icon/photo) var/photo_file = copytext_char(md5("\icon[photo]"), 1, 6) @@ -183,6 +183,7 @@ GLOBAL_LIST_EMPTY(allCasters) desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!" icon = 'icons/obj/terminals.dmi' icon_state = "newscaster_normal" + base_icon_state = "newscaster_normal" verb_say = "beeps" verb_ask = "beeps" verb_exclaim = "beeps" @@ -218,7 +219,7 @@ GLOBAL_LIST_EMPTY(allCasters) GLOB.allCasters += src unit_no = GLOB.allCasters.len - update_icon() + update_appearance(updates = ALL) /obj/machinery/newscaster/Destroy() GLOB.allCasters -= src @@ -226,31 +227,43 @@ GLOBAL_LIST_EMPTY(allCasters) picture = null return ..() -/obj/machinery/newscaster/update_icon() - cut_overlays() +/obj/machinery/newscaster/update_appearance(updates=ALL) + . = ..() if(stat & (NOPOWER|BROKEN)) - icon_state = "newscaster_off" - else - if(GLOB.news_network.wanted_issue.active) - icon_state = "newscaster_wanted" - else - icon_state = "newscaster_normal" - if(alert) - add_overlay("newscaster_alert") - var/hp_percent = obj_integrity * 100 /max_integrity + set_light(0) + return + set_light(1.5, 0.7, "#34D352") // green light + +/obj/machinery/newscaster/update_overlays() + . = ..() + + + if(!(stat & (NOPOWER|BROKEN))) + var/state = "[base_icon_state]_[GLOB.news_network.wanted_issue.active ? "wanted" : "normal"]" + . += mutable_appearance(icon, state) +// . += emissive_appearance(icon, state, src, alpha = src.alpha) + + if(GLOB.news_network.wanted_issue.active && alert) + . += mutable_appearance(icon, "[base_icon_state]_alert") +// . += emissive_appearance(icon, "[base_icon_state]_alert", src, alpha = src.alpha,) + + var/hp_percent = obj_integrity * 100 / max_integrity switch(hp_percent) if(75 to 100) return if(50 to 75) - add_overlay("crack1") + . += "crack1" +// . += emissive_blocker(icon, "crack1", src, alpha = src.alpha) if(25 to 50) - add_overlay("crack2") + . += "crack2" +// . += emissive_blocker(icon, "crack2", src, alpha = src.alpha) else - add_overlay("crack3") + . += "crack3" +// . += emissive_blocker(icon, "crack3", src, alpha = src.alpha) /obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/newscaster/ui_interact(mob/user) . = ..() @@ -732,7 +745,7 @@ GLOBAL_LIST_EMPTY(allCasters) to_chat(user, span_notice("You repair [src].")) obj_integrity = max_integrity stat &= ~BROKEN - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_notice("[src] does not need repairs.")) else @@ -827,13 +840,13 @@ GLOBAL_LIST_EMPTY(allCasters) /obj/machinery/newscaster/proc/remove_alert() alert = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/newscaster/proc/newsAlert(channel) if(channel) say("Breaking news from [channel]!") alert = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(remove_alert)),alert_delay,TIMER_UNIQUE|TIMER_OVERRIDE) playsound(loc, 'sound/machines/twobeep_high.ogg', 75, 1) else diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 7e7f5525e518..a04674df27d3 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -154,7 +154,7 @@ if(href_list["dir"]) C.setDir(text2num(href_list["dir"])) C.add_fingerprint(usr) - C.update_icon() + C.update_appearance(updates = ALL) wait = world.time + 15 return diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index e75aa43e07d0..1af30d30a11b 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -18,7 +18,7 @@ req_access = list(ACCESS_SEC_DOORS) power_channel = AREA_USAGE_EQUIP //drains power from the EQUIPMENT channel - var/base_icon_state = "standard" + base_icon_state = "standard" var/scan_range = 7 var/atom/base = null //for turrets inside other objects @@ -81,7 +81,7 @@ . = ..() if(!base) base = src - update_icon() + update_appearance(updates = ALL) //Sets up a spark system spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) @@ -97,7 +97,7 @@ if(!has_cover) INVOKE_ASYNC(src, PROC_REF(popUp)) -/obj/machinery/porta_turret/update_icon() +/obj/machinery/porta_turret/update_appearance(updates = ALL) cut_overlays() if(!anchored) icon_state = "turretCover" @@ -143,7 +143,7 @@ if(gun_properties["reqpower"]) reqpower = gun_properties["reqpower"] - update_icon() + update_appearance(updates = ALL) return gun_properties /obj/machinery/porta_turret/Destroy() @@ -220,7 +220,7 @@ /obj/machinery/porta_turret/power_change() . = ..() if(!anchored || (stat & BROKEN) || !powered()) - update_icon() + update_appearance(updates = ALL) remove_control() /obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params) @@ -250,7 +250,7 @@ if(!anchored && !isinspace()) setAnchored(TRUE) invisibility = INVISIBILITY_MAXIMUM - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You secure the exterior bolts on the turret.")) if(has_cover) cover = new /obj/machinery/porta_turret_cover(loc) //create a new turret. While this is handled in process(), this is to workaround a bug where the turret becomes invisible for a split second @@ -286,7 +286,7 @@ obj_flags |= EMAGGED controllock = TRUE on = FALSE //turns off the turret temporarily - update_icon() + update_appearance(updates = ALL) sleep(6 SECONDS) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit on = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here @@ -461,7 +461,7 @@ cover.icon_state = "turretCover" raised = 0 invisibility = 2 - update_icon() + update_appearance(updates = ALL) /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp) var/threatcount = 0 //the integer returned @@ -541,7 +541,7 @@ T = closer break - update_icon() + update_appearance(updates = ALL) var/obj/item/projectile/A //any emagged turrets drains 2x power and uses a different projectile? if(mode == TURRET_STUN) @@ -935,9 +935,9 @@ /obj/machinery/turretid/proc/updateTurrets() for (var/obj/machinery/porta_turret/aTurret in turrets) aTurret.setState(enabled, lethal) - update_icon() + update_appearance(updates = ALL) -/obj/machinery/turretid/update_icon() +/obj/machinery/turretid/update_appearance(updates = ALL) ..() if(stat & NOPOWER) icon_state = "control_off" diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index a8d4da97b57f..6abd799bc6da 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -48,12 +48,12 @@ parent_turret.setAnchored(TRUE) to_chat(user, span_notice("You secure the exterior bolts on the turret.")) parent_turret.invisibility = 0 - parent_turret.update_icon() + parent_turret.update_appearance(updates = ALL) else parent_turret.setAnchored(FALSE) to_chat(user, span_notice("You unsecure the exterior bolts on the turret.")) parent_turret.invisibility = INVISIBILITY_MAXIMUM - parent_turret.update_icon() + parent_turret.update_appearance(updates = ALL) qdel(src) else if(I.GetID()) diff --git a/code/game/machinery/prisonlabor.dm b/code/game/machinery/prisonlabor.dm index e74a55019e2f..bde03ec6cc7a 100644 --- a/code/game/machinery/prisonlabor.dm +++ b/code/game/machinery/prisonlabor.dm @@ -9,7 +9,7 @@ var/obj/item/stack/license_plates/empty/current_plate var/pressing = FALSE -/obj/machinery/plate_press/update_icon() +/obj/machinery/plate_press/update_appearance(updates = ALL) . = ..() if(!is_operational()) icon_state = "offline" @@ -35,7 +35,7 @@ var/obj/item/stack/license_plates/empty/plate = I plate.use(1) current_plate = new plate.type(src, 1) //Spawn a new single sheet in the machine - update_icon() + update_appearance(updates = ALL) else return ..() @@ -48,12 +48,12 @@ ///This proc attempts to create a plate. User cannot move during this process. /obj/machinery/plate_press/proc/work_press(mob/living/user) pressing = TRUE - update_icon() + update_appearance(updates = ALL) to_chat(user, "You start pressing a new license plate!") if(!do_after(user, 4 SECONDS, src)) pressing = FALSE - update_icon() + update_appearance(updates = ALL) return FALSE use_power(100) @@ -61,6 +61,6 @@ pressing = FALSE QDEL_NULL(current_plate) - update_icon() + update_appearance(updates = ALL) new /obj/item/stack/license_plates/filled(drop_location(), 1) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index f8b2ebda8247..374b7b1a3770 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -54,7 +54,7 @@ else use_power = IDLE_POWER_USE icon_state = initial(icon_state) - update_icon() + update_appearance(updates = ALL) /obj/machinery/recharger/attackby(obj/item/G, mob/user, params) if(G.tool_behaviour == TOOL_WRENCH) @@ -111,14 +111,14 @@ add_fingerprint(user) if(charging) - charging.update_icon() + charging.update_appearance(updates = ALL) charging.forceMove(drop_location()) user.put_in_hands(charging) setCharging(null) /obj/machinery/recharger/attack_tk(mob/user) if(charging) - charging.update_icon() + charging.update_appearance(updates = ALL) charging.forceMove(drop_location()) setCharging(null) @@ -132,7 +132,7 @@ if(C.charge < C.maxcharge) C.give(C.chargerate * recharge_coeff * delta_time / 2) use_power(125 * recharge_coeff * delta_time) - update_icon() + update_appearance(updates = ALL) if(istype(charging, /obj/item/ammo_box/magazine/recharge)) var/obj/item/ammo_box/magazine/recharge/R = charging @@ -142,7 +142,7 @@ if(R.stored_ammo.len <= R.max_ammo) break use_power(100 * recharge_coeff) - update_icon() + update_appearance(updates = ALL) return if(istype(charging, /obj/item/ammo_box/magazine/m308/laser)) var/obj/item/ammo_box/magazine/m308/laser/R = charging @@ -150,11 +150,11 @@ for(var/i in 1 to recharge_coeff) //See above R.stored_ammo += new R.ammo_type(R) use_power(100 * recharge_coeff) - update_icon() + update_appearance(updates = ALL) return else if(charging) - charging.update_icon() + charging.update_appearance(updates = ALL) charging.forceMove(drop_location()) setCharging(null) return PROCESS_KILL @@ -175,8 +175,18 @@ B.cell.charge = 0 -/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. - cut_overlays() +/obj/machinery/recharger/update_appearance(updates) + . = ..() + if((stat & (NOPOWER|BROKEN)) || panel_open || !anchored) + luminosity = 0 + return + luminosity = 1 + +/obj/machinery/recharger/update_overlays() //we have an update_appearance(updates = ALL) in addition to the stuff in process to make it feel a tiny bit snappier. + . = ..() + if(stat & (NOPOWER|BROKEN) || !anchored) + return + if(charging) var/mutable_appearance/scan = mutable_appearance(icon, "[initial(icon_state)]filled") var/obj/item/stock_parts/cell/C = charging.get_cell() @@ -194,7 +204,7 @@ scan.color = "#58d0ff" else scan.color = gradient(list(0, "#ff0000", 0.99, "#00ff00", 1, "#cece00"), num) - add_overlay(scan) + . += scan /obj/machinery/recharger/wallrecharger name = "wall recharger" diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index aeda8819dcdd..170c9b9ff3b6 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -16,7 +16,13 @@ /obj/machinery/recharge_station/Initialize() . = ..() - update_icon() + update_appearance() + + var/area_name = get_area_name(src, format_text = TRUE) + if(area_name in GLOB.roundstart_station_borgcharger_areas) + return + GLOB.roundstart_station_borgcharger_areas += area_name + /obj/machinery/recharge_station/RefreshParts() recharge_speed = 0 @@ -88,7 +94,7 @@ use_power = ACTIVE_POWER_USE //It always tries to charge, even if it can't. add_fingerprint(occupant) -/obj/machinery/recharge_station/update_icon() +/obj/machinery/recharge_station/update_appearance(updates = ALL) if(is_operational()) if(state_open) icon_state = "borgcharger0" @@ -107,7 +113,7 @@ /obj/machinery/recharge_station/fullupgrade/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) component_parts = list() component_parts += new /obj/item/circuitboard/machine/cyborgrecharger(null) component_parts += new /obj/item/stock_parts/capacitor/quadratic(null) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 09a1f04f688e..4c1cd48a614c 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -21,7 +21,7 @@ AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/plasma, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/dilithium, /datum/material/plastic), INFINITY, FALSE, null, null, null, TRUE) AddComponent(/datum/component/butchering, 1, amount_produced,amount_produced/5) . = ..() - update_icon() + update_appearance(UPDATE_ICON) req_one_access = get_all_accesses() + get_all_centcom_access() /obj/machinery/recycler/RefreshParts() @@ -67,16 +67,16 @@ obj_flags |= EMAGGED if(safety_mode) safety_mode = FALSE - update_icon() + update_appearance(updates = ALL) playsound(src, "sparks", 75, TRUE, -1) to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) -/obj/machinery/recycler/update_icon() - ..() +/obj/machinery/recycler/update_icon_state() var/is_powered = !(stat & (BROKEN|NOPOWER)) if(safety_mode) is_powered = FALSE icon_state = icon_name + "[is_powered]" + "[(bloody ? "bld" : "")]" // add the blood tag at the end + return ..() /obj/machinery/recycler/CanAllowThrough(atom/movable/AM) . = ..() @@ -160,13 +160,13 @@ /obj/machinery/recycler/proc/emergency_stop() playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE) safety_mode = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(reboot)), SAFETY_COOLDOWN) /obj/machinery/recycler/proc/reboot() playsound(src, 'sound/machines/ping.ogg', 50, FALSE) safety_mode = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/recycler/proc/crush_living(mob/living/L) @@ -184,7 +184,7 @@ if(!bloody && !issilicon(L)) bloody = TRUE - update_icon() + update_appearance(updates = ALL) // Instantly lie down, also go unconscious from the pain, before you die. L.Unconscious(100) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 254bc60a41bf..a30055eb235d 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) desc = "A console intended to send requests to different departments on the station." icon = 'icons/obj/terminals.dmi' icon_state = "req_comp0" + base_icon_state = "req_comp0" var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department var/list/messages = list() //List of all messages var/departmentType = 0 //bitflag @@ -69,28 +70,35 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) max_integrity = 300 armor = list(MELEE = 70, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 0, BIO = 0, RAD = 0, FIRE = 90, ACID = 90) -/obj/machinery/requests_console/update_icon() +/obj/machinery/requests_console/update_appearance(updates = ALL) + . = ..() if(stat & NOPOWER) set_light(0) - else - set_light(1.4,0.7,"#34D352")//green light + return + set_light(1.5, 0.7, "#34D352")//green light + +/obj/machinery/requests_console/update_overlays() + . = ..() + if(open) - if(!hackState) - icon_state="req_comp_open" - else - icon_state="req_comp_rewired" - else if(stat & NOPOWER) - if(icon_state != "req_comp_off") - icon_state = "req_comp_off" + . += mutable_appearance(icon, "req_comp_open") + + if(open || (stat & NOPOWER)) + return + + var/screen_state + + if(emergency || (newmessagepriority == REQ_EXTREME_MESSAGE_PRIORITY)) + screen_state = "[base_icon_state]3" + else if(newmessagepriority == REQ_HIGH_MESSAGE_PRIORITY) + screen_state = "[base_icon_state]2" + else if(newmessagepriority == REQ_NORMAL_MESSAGE_PRIORITY) + screen_state = "[base_icon_state]1" else - if(emergency || (newmessagepriority == REQ_EXTREME_MESSAGE_PRIORITY)) - icon_state = "req_comp3" - else if(newmessagepriority == REQ_HIGH_MESSAGE_PRIORITY) - icon_state = "req_comp2" - else if(newmessagepriority == REQ_NORMAL_MESSAGE_PRIORITY) - icon_state = "req_comp1" - else - icon_state = "req_comp0" + screen_state = "[base_icon_state]0" + + . += mutable_appearance(icon, screen_state) +// . += emissive_appearance(icon, screen_state, src, alpha = src.alpha) /obj/machinery/requests_console/Initialize() . = ..() @@ -174,10 +182,10 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) for (var/obj/machinery/requests_console/Console in GLOB.allConsoles) if (Console.department == department) Console.newmessagepriority = REQ_NO_NEW_MESSAGE - Console.update_icon() + Console.update_appearance(updates = ALL) newmessagepriority = REQ_NO_NEW_MESSAGE - update_icon() + update_appearance(updates = ALL) var/messageComposite = "" for(var/msg in messages) // This puts more recent messages at the *top*, where they belong. messageComposite = "
[msg]
" + messageComposite @@ -288,7 +296,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) if(radio_freq) Radio.set_frequency(radio_freq) Radio.talk_into(src,"[emergency] emergency in [department]!!",radio_freq) - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(clear_emergency)), 5 MINUTES) if(href_list["send"] && message && to_department && priority) @@ -351,7 +359,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) /obj/machinery/requests_console/proc/clear_emergency() emergency = null - update_icon() + update_appearance(updates = ALL) //from message_server.dm: Console.createmessage(data["sender"], data["send_dpt"], data["message"], data["verified"], data["stamped"], data["priority"], data["notify_freq"]) /obj/machinery/requests_console/proc/createmessage(source, source_department, message, msgVerified, msgStamped, priority, radio_freq) @@ -374,14 +382,14 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) if(REQ_NORMAL_MESSAGE_PRIORITY) if(newmessagepriority < REQ_NORMAL_MESSAGE_PRIORITY) newmessagepriority = REQ_NORMAL_MESSAGE_PRIORITY - update_icon() + update_appearance(updates = ALL) if(REQ_HIGH_MESSAGE_PRIORITY) header = "[span_bad("High Priority")]
[header]" alert = "PRIORITY Alert from [source][authentic]" if(newmessagepriority < REQ_HIGH_MESSAGE_PRIORITY) newmessagepriority = REQ_HIGH_MESSAGE_PRIORITY - update_icon() + update_appearance(updates = ALL) if(REQ_EXTREME_MESSAGE_PRIORITY) header = "[span_bad("!!!Extreme Priority!!!")]
[header]" @@ -389,7 +397,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) silenced = FALSE if(newmessagepriority < REQ_EXTREME_MESSAGE_PRIORITY) newmessagepriority = REQ_EXTREME_MESSAGE_PRIORITY - update_icon() + update_appearance(updates = ALL) messages += "[header][sending]" @@ -409,7 +417,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) else to_chat(user, span_notice("You open the maintenance panel.")) open = TRUE - update_icon() + update_appearance(updates = ALL) return if(O.tool_behaviour == TOOL_SCREWDRIVER) if(open) @@ -418,7 +426,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) to_chat(user, span_notice("You modify the wiring.")) else to_chat(user, span_notice("You reset the wiring.")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You must open the maintenance panel first!")) return diff --git a/code/game/machinery/sci_bombardment.dm b/code/game/machinery/sci_bombardment.dm index 0ec1dec53e30..abdb2e9678cb 100644 --- a/code/game/machinery/sci_bombardment.dm +++ b/code/game/machinery/sci_bombardment.dm @@ -53,13 +53,13 @@ break radio = new /obj/item/radio/(src) radio.frequency = radio_freq - update_icon() + update_appearance(updates = ALL) /obj/machinery/sci_bombardment/Destroy() QDEL_NULL(radio) return ..() -/obj/machinery/sci_bombardment/update_icon() +/obj/machinery/sci_bombardment/update_appearance(updates = ALL) cut_overlays() if(!powered(power_channel)) add_overlay("LAM_radar0") @@ -80,7 +80,7 @@ scibomb = B playsound(src, 'sound/effects/bin_close.ogg', 100, 1) to_chat(usr, span_notice("You load [B] into the firing mechanism.")) - update_icon() + update_appearance(updates = ALL) else to_chat(usr, span_warning("There is already a transfer valve loaded in the firing mechanism!")) else @@ -132,7 +132,7 @@ targetdest = initial(dest) tcoords = initial(tcoords) scibomb = initial(scibomb) - update_icon() + update_appearance(updates = ALL) . = TRUE /** @@ -144,7 +144,7 @@ */ /obj/machinery/sci_bombardment/proc/reset_lam() target_delay = !target_delay - update_icon() + update_appearance(updates = ALL) if(target_delay) spawn(100) reset_lam() @@ -202,7 +202,7 @@ radio.talk_into(src, "Controls [locked ? "locked" : "unlocked"] by [I.registered_name].",) else to_chat(usr, span_warning("Access denied. Please seek assistance from station AI or Research Director.")) - update_icon() + update_appearance(updates = ALL) . = TRUE if("count")//Prompts user to change countdown timer (Minimum based on var/mincount) if(locked) @@ -222,7 +222,7 @@ to_chat(usr, span_notice("[scibomb] is ejected from the loading chamber.")) scibomb.forceMove(drop_location()) scibomb = null - update_icon() + update_appearance(updates = ALL) . = TRUE if("launch")//Transfers var/countdown to var/tick before proc'ing countdown() if(locked || target_delay || !scibomb || !dest) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 43940d4a8bc1..95a6e48d14b2 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -93,7 +93,7 @@ /obj/machinery/shieldgen/proc/shields_up() active = TRUE - update_icon() + update_appearance(updates = ALL) move_resist = INFINITY for(var/turf/target_tile in range(shield_range, src)) @@ -104,7 +104,7 @@ /obj/machinery/shieldgen/proc/shields_down() active = FALSE move_resist = initial(move_resist) - update_icon() + update_appearance(updates = ALL) QDEL_LIST(deployed_shields) /obj/machinery/shieldgen/process(delta_time) @@ -164,7 +164,7 @@ obj_integrity = max_integrity stat &= ~BROKEN to_chat(user, span_notice("You repair \the [src].")) - update_icon() + update_appearance(updates = ALL) else if(W.tool_behaviour == TOOL_WRENCH) if(locked) @@ -203,7 +203,7 @@ playsound(src, "sparks", 100, 1) to_chat(user, span_warning("You short out the access controller.")) -/obj/machinery/shieldgen/update_icon() +/obj/machinery/shieldgen/update_appearance(updates = ALL) if(active) icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon" else diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 2d4a55e407dd..0f06e5a3a568 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -65,7 +65,7 @@ money += round(delta_time / 2) //SPESSH MAJICKS -/obj/machinery/computer/slot_machine/update_icon() +/obj/machinery/computer/slot_machine/update_appearance(updates = ALL) if(stat & NOPOWER) icon_state = "slots0" @@ -205,7 +205,7 @@ working = 1 toggle_reel_spin(1) - update_icon() + update_appearance(updates = ALL) updateDialog() spawn(0) @@ -218,7 +218,7 @@ toggle_reel_spin(0, REEL_DEACTIVATE_DELAY) working = 0 give_prizes(the_name, user) - update_icon() + update_appearance(updates = ALL) updateDialog() /obj/machinery/computer/slot_machine/proc/can_spin(mob/user) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 5931e008b1fa..fba5c57d86af 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -32,13 +32,13 @@ /obj/machinery/space_heater/Initialize() . = ..() cell = new(src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/space_heater/on_construction() qdel(cell) cell = null panel_open = TRUE - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/space_heater/on_deconstruction() @@ -57,7 +57,7 @@ if(in_range(user, src) || isobserver(user)) . += "The status display reads: Temperature range at [settableTemperatureRange]°C.
Heating power at [heatingPower*0.001]kJ.
Power consumption at [(efficiency*-0.0025)+150]%." //100%, 75%, 50%, 25% -/obj/machinery/space_heater/update_icon() +/obj/machinery/space_heater/update_appearance(updates = ALL) icon_state = "sheater-[on ? "[mode]" : "off"]" cut_overlays() @@ -69,19 +69,19 @@ if (on) // If it's broken, turn it off too on = FALSE active_power_usage = 0 - update_icon() + update_appearance(updates = ALL) return PROCESS_KILL if((stat & NOPOWER) && (!cell || cell.charge <= 0)) on = FALSE - update_icon() + update_appearance(updates = ALL) return PROCESS_KILL var/turf/L = loc if(!istype(L)) if(mode != HEATER_MODE_STANDBY) mode = HEATER_MODE_STANDBY - update_icon() + update_appearance(updates = ALL) return var/datum/gas_mixture/env = L.return_air() @@ -94,7 +94,7 @@ if(mode != newMode) mode = newMode - update_icon() + update_appearance(updates = ALL) if(mode == HEATER_MODE_STANDBY) return @@ -119,7 +119,7 @@ if (!cell.use(requiredEnergy / efficiency)) //automatically turn off machine when cell depletes on = FALSE - update_icon() + update_appearance(updates = ALL) working = FALSE else active_power_usage = requiredEnergy / efficiency @@ -180,7 +180,7 @@ else if(I.tool_behaviour == TOOL_SCREWDRIVER) panel_open = !panel_open user.visible_message("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src].", span_notice("You [panel_open ? "open" : "close"] the hatch on \the [src].")) - update_icon() + update_appearance(updates = ALL) else if(default_deconstruction_crowbar(I)) return else @@ -262,7 +262,7 @@ on = !on mode = HEATER_MODE_STANDBY usr.visible_message("[usr] switches [on ? "on" : "off"] \the [src].", span_notice("You switch [on ? "on" : "off"] \the [src].")) - update_icon() + update_appearance(updates = ALL) if (on) START_PROCESSING(SSmachines, src) diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 71959216cf96..415daffe307d 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -94,7 +94,7 @@ stasis_can_toggle = world.time + stasis_cooldown playsound(src, 'sound/machines/click.ogg', 60, TRUE) play_power_sound() - update_icon() + update_appearance(updates = ALL) /obj/machinery/stasis/Exited(atom/movable/AM, atom/newloc) if(AM == occupant) @@ -106,7 +106,7 @@ /obj/machinery/stasis/proc/stasis_running() return stasis_enabled && is_operational() -/obj/machinery/stasis/update_icon() +/obj/machinery/stasis/update_appearance(updates = ALL) . = ..() var/_running = stasis_running() var/list/overlays_to_remove = managed_vis_overlays @@ -163,13 +163,13 @@ occupant = L if(stasis_running() && check_nap_violations()) chill_out(L) - update_icon() + update_appearance(updates = ALL) /obj/machinery/stasis/post_unbuckle_mob(mob/living/L) thaw_them(L) if(L == occupant) occupant = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/stasis/process() if( !( occupant && isliving(occupant) && check_nap_violations() ) ) @@ -186,7 +186,7 @@ /obj/machinery/stasis/screwdriver_act(mob/living/user, obj/item/I) . = default_deconstruction_screwdriver(user, "stasis_maintenance", "stasis", I) - update_icon() + update_appearance(updates = ALL) /obj/machinery/stasis/wrench_act(mob/living/user, obj/item/I) if(default_change_direction_wrench(user, I)) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 764d057f6b3b..a7a9098083e3 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -30,7 +30,49 @@ var/obj/effect/overlay/status_display_text/message1_overlay var/obj/effect/overlay/status_display_text/message2_overlay +/* +/obj/machinery/status_display/update_appearance(updates=ALL) + . = ..() + if( \ + (stat & (NOPOWER|BROKEN)) || \ + (current_mode == SD_BLANK) || \ + (current_mode != SD_PICTURE && message1 == "" && message2 == "") \ + ) + set_light(0) + return + set_light(1.5, 0.7, LIGHT_COLOR_BLUE) // blue light + +/obj/machinery/status_display/update_overlays() + . = ..() + + if(stat & (NOPOWER|BROKEN)) + remove_messages() + return + switch(current_mode) + if(SD_BLANK) + remove_messages() + // Turn off backlight. + return + if(SD_PICTURE) + remove_messages() + . += mutable_appearance(icon, current_picture) + if(current_picture == AI_DISPLAY_DONT_GLOW) // If the thing's off, don't display the emissive yeah? + return . + else + var/overlay = update_message(message1_overlay, LINE1_Y, message1) + if(overlay) + message1_overlay = overlay + overlay = update_message(message2_overlay, LINE2_Y, message2) + if(overlay) + message2_overlay = overlay + + // Turn off backlight if message is blank + if(message1 == "" && message2 == "") + return + + . += emissive_appearance(icon, "outline", src, alpha = src.alpha) +*/ /// Immediately blank the display. /obj/machinery/status_display/proc/remove_display() cut_overlays() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 5754b48ec1f5..c959d19d114d 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -135,7 +135,7 @@ mask = new mask_type(src) if(storage_type) storage = new storage_type(src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/suit_storage_unit/Destroy() QDEL_NULL(suit) @@ -144,7 +144,7 @@ QDEL_NULL(storage) return ..() -/obj/machinery/suit_storage_unit/update_icon() +/obj/machinery/suit_storage_unit/update_appearance(updates = ALL) cut_overlays() if(uv) @@ -173,7 +173,7 @@ if(!is_operational() && state_open) open_machine() dump_contents() - update_icon() + update_appearance(updates = ALL) /obj/machinery/suit_storage_unit/proc/dump_contents() dropContents() @@ -222,7 +222,7 @@ uv_cycles-- uv = TRUE locked = TRUE - update_icon() + update_appearance(updates = ALL) if(occupant) if(uv_super) mob_occupant.adjustFireLoss(rand(20, 36)) @@ -365,7 +365,7 @@ storage = I visible_message(span_notice("[user] inserts [I] into [src]."), span_notice("You load [I] into [src].")) - update_icon() + update_appearance(updates = ALL) return if(panel_open && is_wire_tool(I)) @@ -472,7 +472,7 @@ if(I) I.forceMove(loc) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/suit_storage_unit/AltClick(mob/user) if(!user.canUseTopic(src, !issilicon(user))) @@ -496,4 +496,4 @@ if(!user.canUseTopic(src, !issilicon(user)) || state_open) return locked = !locked - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 933d73148ae1..dd5a3a7732f8 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -81,7 +81,7 @@ if(active && ((detonation_timer <= world.time) || explode_now)) active = FALSE timer_set = initial(timer_set) - update_icon() + update_appearance(updates = ALL) try_detonate(TRUE) /obj/machinery/syndicatebomb/Initialize() @@ -89,7 +89,7 @@ wires = new /datum/wires/syndicatebomb(src) if(payload) payload = new payload(src) - update_icon() + update_appearance(updates = ALL) countdown = new(src) STOP_PROCESSING(SSfastprocess, src) @@ -103,7 +103,7 @@ . = ..() . += {"A digital display on it reads "[seconds_remaining()]"."} -/obj/machinery/syndicatebomb/update_icon() +/obj/machinery/syndicatebomb/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" /obj/machinery/syndicatebomb/proc/seconds_remaining() @@ -133,7 +133,7 @@ else if(I.tool_behaviour == TOOL_SCREWDRIVER) open_panel = !open_panel - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You [open_panel ? "open" : "close"] the wire panel.")) else if(is_wire_tool(I) && open_panel) @@ -203,7 +203,7 @@ if(!active) visible_message(span_danger("[icon2html(src, viewers(loc))] [timer_set] seconds until detonation, please clear the area.")) activate() - update_icon() + update_appearance(updates = ALL) add_fingerprint(user) if(payload && !istype(payload, /obj/item/bombcore/training)) @@ -313,7 +313,7 @@ holder.delayedbig = FALSE holder.delayedlittle = FALSE holder.explode_now = FALSE - holder.update_icon() + holder.update_appearance(updates = ALL) holder.updateDialog() STOP_PROCESSING(SSfastprocess, holder) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index a0e36e587e6c..2a6a73cd108a 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -12,7 +12,7 @@ /obj/machinery/telecomms/attackby(obj/item/P, mob/user, params) if(default_deconstruction_screwdriver(user, "[initial(icon_state)]_o", initial(icon_state), P)) - update_icon() + update_appearance(updates = ALL) return // Using a multitool lets you access the receiver's interface else if(P.tool_behaviour == TOOL_MULTITOOL) @@ -95,7 +95,7 @@ if("toggle") toggled = !toggled update_power() - update_icon() + update_appearance(updates = ALL) log_game("[key_name(operator)] toggled [toggled ? "On" : "Off"] [src] at [AREACOORD(src)].") . = TRUE if("id") diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm index df5285e9d601..03c1e05c42e5 100644 --- a/code/game/machinery/telecomms/machines/broadcaster.dm +++ b/code/game/machinery/telecomms/machines/broadcaster.dm @@ -57,7 +57,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages var/mutable_appearance/sending = mutable_appearance(icon, "broadcaster_send", 1) flick(sending, src) -/obj/machinery/telecomms/broadcaster/update_icon() // Special fuckery +/obj/machinery/telecomms/broadcaster/update_appearance(updates = ALL) // Special fuckery cut_overlays() if(on) var/mutable_appearance/on_overlay = mutable_appearance(icon, on_icon, 0) diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index 1475496ace95..7f63314da4da 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -27,7 +27,7 @@ user.put_in_hands(stored) stored = null to_chat(user, span_notice("You remove the blackbox from [src]. The tapes stop spinning.")) - update_icon() + update_appearance(updates = ALL) return else to_chat(user, span_warning("It seems that the blackbox is missing...")) @@ -43,7 +43,7 @@ span_notice("You press the device into [src], and it clicks into place. The tapes begin spinning again.")) playsound(src, 'sound/machines/click.ogg', 50, TRUE) stored = I - update_icon() + update_appearance(updates = ALL) return ..() return ..() @@ -53,7 +53,7 @@ new /obj/effect/decal/cleanable/oil(loc) return ..() -/obj/machinery/blackbox_recorder/update_icon() +/obj/machinery/blackbox_recorder/update_appearance(updates = ALL) . = ..() if(!stored) icon_state = "blackbox_b" @@ -157,7 +157,7 @@ if(!relay_information(signal, /obj/machinery/telecomms/hub)) relay_information(signal, /obj/machinery/telecomms/broadcaster) -/obj/machinery/telecomms/message_server/update_icon() +/obj/machinery/telecomms/message_server/update_appearance(updates = ALL) cut_overlays() if(calibrating && on) var/mutable_appearance/calibrate = mutable_appearance(icon, "message_server_disabled") diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 23eec2e038cf..87c300b97853 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) T.links |= src -/obj/machinery/telecomms/update_icon() +/obj/machinery/telecomms/update_appearance(updates = ALL) cut_overlays() if(on) var/mutable_appearance/on_overlay @@ -177,7 +177,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) update_power() // Update the icon - update_icon() + update_appearance(updates = ALL) update_speed() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index ffd2b23768f6..da960b7e066a 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -58,7 +58,7 @@ if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W)) if(power_station && power_station.engaged) power_station.engaged = 0 //hub with panel open is off, so the station must be informed. - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(W)) return @@ -87,7 +87,7 @@ calibrated = 0 return -/obj/machinery/teleport/hub/update_icon() +/obj/machinery/teleport/hub/update_appearance(updates = ALL) if(panel_open) icon_state = "tele-o" else if(is_ready()) @@ -154,7 +154,7 @@ /obj/machinery/teleport/station/Destroy() if(teleporter_hub) teleporter_hub.power_station = null - teleporter_hub.update_icon() + teleporter_hub.update_appearance(updates = ALL) teleporter_hub = null if (teleporter_console) teleporter_console.power_station = null @@ -179,7 +179,7 @@ to_chat(user, span_alert("This station can't hold more information, try to use better parts.")) return else if(default_deconstruction_screwdriver(user, "controller-o", "controller", W)) - update_icon() + update_appearance(updates = ALL) return else if(default_deconstruction_crowbar(W)) @@ -209,15 +209,15 @@ else to_chat(user, span_alert("No target detected.")) engaged = FALSE - teleporter_hub.update_icon() + teleporter_hub.update_appearance(updates = ALL) add_fingerprint(user) /obj/machinery/teleport/station/power_change() . = ..() if(teleporter_hub) - teleporter_hub.update_icon() + teleporter_hub.update_appearance(updates = ALL) -/obj/machinery/teleport/station/update_icon() +/obj/machinery/teleport/station/update_appearance(updates = ALL) if(panel_open) icon_state = "controller-o" else if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 055e8859d8e3..187942fbabe4 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -34,7 +34,7 @@ QDEL_NULL(countdown) . = ..() -/obj/machinery/transformer/update_icon() +/obj/machinery/transformer/update_appearance(updates = ALL) ..() if(stat & (BROKEN|NOPOWER) || cooldown == 1) icon_state = "separator-AO0" @@ -66,7 +66,7 @@ /obj/machinery/transformer/process() if(cooldown && (cooldown_timer <= world.time)) cooldown = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H) if(stat & (BROKEN|NOPOWER)) @@ -81,7 +81,7 @@ // Activate the cooldown cooldown = 1 cooldown_timer = world.time + cooldown_duration - update_icon() + update_appearance(updates = ALL) playsound(src.loc, 'sound/items/welder.ogg', 50, 1) H.emote("scream") // It is painful diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 248261f0b870..4978611fe5ac 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -146,7 +146,7 @@ GLOBAL_LIST_INIT(dye_registry, list( to_chat(user, span_warning("[src] must be cleaned up first.")) return busy = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(wash_cycle)), 200) START_PROCESSING(SSfastprocess, src) @@ -172,7 +172,7 @@ GLOBAL_LIST_INIT(dye_registry, list( . = ..() if(!busy && bloody_mess && (clean_types & CLEAN_TYPE_BLOOD)) bloody_mess = FALSE - update_icon() + update_appearance(updates = ALL) . = TRUE /obj/machinery/washing_machine/proc/wash_cycle() @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(dye_registry, list( if(color_source) qdel(color_source) color_source = null - update_icon() + update_appearance(updates = ALL) /obj/item/proc/dye_item(dye_color) if(undyeable) @@ -258,7 +258,7 @@ GLOBAL_LIST_INIT(dye_registry, list( add_fingerprint(user) open_machine() -/obj/machinery/washing_machine/update_icon() +/obj/machinery/washing_machine/update_appearance(updates = ALL) cut_overlays() if(busy) icon_state = "wm_running_[bloody_mess]" @@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(dye_registry, list( return if(default_deconstruction_screwdriver(user, null, null, W)) - update_icon() + update_appearance(updates = ALL) return else if(user.a_intent != INTENT_HARM) @@ -298,7 +298,7 @@ GLOBAL_LIST_INIT(dye_registry, list( if(W.dye_color) color_source = W - update_icon() + update_appearance(updates = ALL) else return ..() @@ -318,14 +318,14 @@ GLOBAL_LIST_INIT(dye_registry, list( if(state_open) if(iscorgi(L)) L.forceMove(src) - update_icon() + update_appearance(updates = ALL) return if(!state_open) open_machine() else state_open = FALSE //close the door - update_icon() + update_appearance(updates = ALL) /obj/machinery/washing_machine/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/metal(drop_location(), 2) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 0ae7242751ac..f2c58b116bdd 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -341,12 +341,12 @@ else if(mechsyringe.loc == trg) mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) - mechsyringe.update_icon() + mechsyringe.update_appearance(updates = ALL) break else mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) - mechsyringe.update_icon() + mechsyringe.update_appearance(updates = ALL) break sleep(0.1 SECONDS) return 1 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 7523cfd1e5f1..c3d0753ebe5d 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -483,13 +483,13 @@ var/obj/structure/cable/NC = new(new_turf, "red") NC.d1 = 0 NC.d2 = fdirn - NC.update_icon() + NC.update_appearance(updates = ALL) var/datum/powernet/PN if(last_piece && last_piece.d2 != chassis.dir) last_piece.d1 = min(last_piece.d2, chassis.dir) last_piece.d2 = max(last_piece.d2, chassis.dir) - last_piece.update_icon() + last_piece.update_appearance(updates = ALL) PN = last_piece.powernet if(!PN) diff --git a/code/game/mecha/equipment/weapons/mecha_ammo.dm b/code/game/mecha/equipment/weapons/mecha_ammo.dm index c3080a16a99e..2d7821bfe2ca 100644 --- a/code/game/mecha/equipment/weapons/mecha_ammo.dm +++ b/code/game/mecha/equipment/weapons/mecha_ammo.dm @@ -17,7 +17,7 @@ /// Type of ammo. used to make sure the ammo type is compatable with the weapon itself var/ammo_type -/obj/item/mecha_ammo/proc/update_name() +/obj/item/mecha_ammo/update_name() if(!rounds) name = "empty ammo box" desc = "An exosuit ammuniton box that has since been emptied. Please recycle." diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 20192ad093ab..f3b27f23d184 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -32,6 +32,11 @@ . = ..() recharging_turf = get_step(loc, dir) + var/area_name = get_area_name(src, format_text = TRUE) + if(area_name in GLOB.roundstart_station_mechcharger_areas) + return + GLOB.roundstart_station_mechcharger_areas += area_name + /obj/machinery/mech_bay_recharge_port/Destroy() if (recharge_console && recharge_console.recharge_port == src) recharge_console.recharge_port = null @@ -58,17 +63,17 @@ if(!recharging_mech) recharging_mech = locate(/obj/mecha) in recharging_turf if(recharging_mech) - recharge_console.update_icon() + recharge_console.update_appearance(updates = ALL) if(recharging_mech && recharging_mech.cell) if(recharging_mech.cell.charge < recharging_mech.cell.maxcharge) var/delta = min(max_charge, recharging_mech.cell.maxcharge - recharging_mech.cell.charge) recharging_mech.give_power(delta) use_power(delta*150) else - recharge_console.update_icon() + recharge_console.update_appearance(updates = ALL) if(recharging_mech.loc != recharging_turf) recharging_mech = null - recharge_console.update_icon() + recharge_console.update_appearance(updates = ALL) /obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user, params) @@ -105,7 +110,7 @@ if("reconnect") reconnect() . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/mech_bay_power_console/ui_data(mob/user) var/list/data = list() @@ -138,7 +143,7 @@ else recharge_port = null -/obj/machinery/computer/mech_bay_power_console/update_icon() +/obj/machinery/computer/mech_bay_power_console/update_appearance(updates = ALL) ..() if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN)) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index eac814f4c1d7..718b4b7d3815 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -169,7 +169,7 @@ diag_hud_set_mechcell() diag_hud_set_mechstat() -/obj/mecha/update_icon() +/obj/mecha/update_appearance(updates = ALL) if (silicon_pilot && silicon_icon_state) icon_state = silicon_icon_state . = ..() @@ -462,13 +462,13 @@ if(0.75 to INFINITY) occupant.clear_alert("charge") if(0.5 to 0.75) - occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 1) + occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell/mech, 1) if(0.25 to 0.5) - occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 2) + occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell/mech, 2) if(0.01 to 0.25) - occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 3) + occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell/mech, 3) else - occupant.throw_alert("charge", /atom/movable/screen/alert/emptycell) + occupant.throw_alert("charge", /atom/movable/screen/alert/emptycell/mech) var/integrity = obj_integrity/max_integrity*100 switch(integrity) @@ -909,7 +909,7 @@ occupant = AI silicon_pilot = TRUE icon_state = initial(icon_state) - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/machines/windowdoor.ogg', 50, 1) if(!internal_damage) SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50)) @@ -1092,7 +1092,7 @@ brainmob.update_mobility() brainmob.update_mouse_pointer() icon_state = initial(icon_state) - update_icon() + update_appearance(updates = ALL) setDir(dir_in) log_message("[mmi_as_oc] moved in as pilot.", LOG_MECHA) if(istype(mmi_as_oc, /obj/item/mmi/posibrain)) //yogs start reminder to posibrain to not be shitlers @@ -1185,7 +1185,7 @@ L.forceMove(mmi) L.reset_perspective() mmi.mecha = null - mmi.update_icon() + mmi.update_appearance(updates = ALL) L.mobility_flags = NONE icon_state = initial(icon_state)+"-open" setDir(dir_in) diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 7454e374b181..289d7245f9b6 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -33,13 +33,13 @@ /obj/mecha/working/ripley/go_out() ..() - update_icon() + update_appearance(updates = ALL) /obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H) ..() - update_icon() + update_appearance(updates = ALL) -/obj/mecha/working/ripley/update_icon() +/obj/mecha/working/ripley/update_appearance(updates = ALL) ..() var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) if (C.amount) diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 0cff66319c22..50e25bdee89a 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -91,7 +91,7 @@ S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS,S.bloody_shoes[blood_state]+add_blood) S.add_blood_DNA(return_blood_DNA()) S.blood_state = blood_state - update_icon() + update_appearance(updates = ALL) H.update_inv_shoes() diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 8c8902aa5b3b..30d39385beb7 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -170,7 +170,7 @@ shoe_types |= S.type if (!(entered_dirs & H.dir)) entered_dirs |= H.dir - update_icon() + update_appearance(updates = ALL) /obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O) ..() @@ -182,10 +182,10 @@ shoe_types |= S.type if (!(exited_dirs & H.dir)) exited_dirs |= H.dir - update_icon() + update_appearance(updates = ALL) -/obj/effect/decal/cleanable/blood/footprints/update_icon() +/obj/effect/decal/cleanable/blood/footprints/update_appearance(updates = ALL) cut_overlays() for(var/Ddir in GLOB.cardinals) diff --git a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm index b315c71a9656..d2b69d71dd45 100644 --- a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm +++ b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm @@ -395,7 +395,7 @@ for(var/obj/machinery/atmospherics/components/unary/comp in location) if(!comp.welded) comp.welded = TRUE - comp.update_icon() + comp.update_appearance(updates = ALL) comp.visible_message(span_danger("[comp] sealed shut!")) for(var/mob/living/potential_tinder in location) diff --git a/code/game/objects/effects/effect_system/fluid_spread/effects_smoke.dm b/code/game/objects/effects/effect_system/fluid_spread/effects_smoke.dm index 28fd3ac25150..3d28e7ac499f 100644 --- a/code/game/objects/effects/effect_system/fluid_spread/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/fluid_spread/effects_smoke.dm @@ -306,7 +306,7 @@ for(var/obj/machinery/atmospherics/components/unary/comp in chilly) if(!isnull(comp.welded) && !comp.welded) //must be an unwelded vent pump or vent scrubber. comp.welded = TRUE - comp.update_icon() + comp.update_appearance(updates = ALL) comp.visible_message(span_danger("[comp] is frozen shut!")) // Extinguishes everything in the turf diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index c1e5fbb34288..f0001c9997af 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -87,7 +87,7 @@ GLOBAL_VAR_INIT(glowshrooms, 0) myseed.genes += G set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color) setDir(calc_dir()) - var/base_icon_state = initial(icon_state) + base_icon_state = initial(icon_state) if(!floor) switch(dir) //offset to make it be on the wall rather than on the floor if(NORTH) diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 5d978e646c76..9c3fcd7a76c6 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -84,6 +84,7 @@ anchored = TRUE icon = 'icons/obj/misc.dmi' icon_state = "uglymine" + base_icon_state = "uglymine" alpha = 30 var/triggered = 0 var/smartmine = FALSE @@ -93,6 +94,7 @@ /obj/effect/mine/Initialize() . = ..() layer = ABOVE_MOB_LAYER +// update_appearance(UPDATE_ICON_STATE) /obj/effect/mine/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/multitool)) @@ -104,6 +106,13 @@ return return ..() +/*/obj/effect/mine/update_icon_state() + . = ..() + if(armed) + icon_state = base_icon_state + else + icon_state = "[base_icon_state]-inactive"*/ + /obj/effect/mine/proc/mineEffect(mob/victim) to_chat(victim, span_danger("*click*")) @@ -150,6 +159,7 @@ desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" icon = 'icons/obj/watercloset.dmi' icon_state = "rubberducky" + base_icon_state = "rubberducky" var/sound = 'sound/items/bikehorn.ogg' range_heavy = 2 range_light = 3 @@ -260,6 +270,7 @@ desc = "pick me up" icon = 'icons/effects/effects.dmi' icon_state = "electricity2" + base_icon_state = "electricity2" density = FALSE alpha = 255 var/duration = 0 diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index c520c27d0e97..a1c7a42cb870 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -35,7 +35,7 @@ V.attached_device = A A.holder = V - V.update_icon() + V.update_appearance(updates = ALL) return INITIALIZE_HINT_QDEL diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 95976ac8efe9..cf04fdcf3d3a 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -164,7 +164,7 @@ /obj/effect/temp_visual/dir_setting/curse/hand/Initialize(mapload, set_dir, handedness) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/effect/temp_visual/bsa_splash name = "\improper Bluespace energy wave" @@ -183,7 +183,7 @@ if(EAST) icon_state = "beam_splash_e" -/obj/item/projectile/curse_hand/update_icon() +/obj/item/projectile/curse_hand/update_appearance(updates = ALL) icon_state = "[icon_state][handedness]" /obj/effect/temp_visual/wizard @@ -527,13 +527,13 @@ status = rcd_status delay = rcd_delay if (status == RCD_DECONSTRUCT) - addtimer(CALLBACK(src, PROC_REF(update_icon)), 11) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 11) delay -= 11 icon_state = "rcd_end_reverse" else - update_icon() + update_appearance(updates = ALL) -/obj/effect/constructing_effect/update_icon() +/obj/effect/constructing_effect/update_appearance(updates = ALL) icon_state = "rcd" if (delay < 10) icon_state += "_shortest" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b75cb6008d0b..584505b889aa 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -941,7 +941,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/hand_index = M.get_held_index_of_item(src) if(hand_index) M.held_items[hand_index] = null - M.update_inv_hands() + M.update_held_items() if(M.client) M.client.screen -= src layer = initial(layer) diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 4878db6285c5..7147eac2b0f5 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -114,7 +114,7 @@ RLD loaded = loadwithsheets(O, user) if(loaded) to_chat(user, span_notice("[src] now holds [matter]/[max_matter] matter-units.")) - update_icon() //ensures that ammo counters (if present) get updated + update_appearance(updates = ALL) //ensures that ammo counters (if present) get updated return loaded /obj/item/construction/proc/loadwithsheets(obj/item/stack/S, mob/user) @@ -148,7 +148,7 @@ RLD to_chat(user, no_ammo_message) return FALSE matter -= amount - update_icon() + update_appearance(updates = ALL) return TRUE else if(silo_mats.on_hold()) @@ -736,7 +736,7 @@ RLD explosion(src, 0, 0, 3, 1, flame_range = 1) qdel(src) -/obj/item/construction/rcd/update_icon() +/obj/item/construction/rcd/update_appearance(updates = ALL) ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) @@ -745,7 +745,7 @@ RLD /obj/item/construction/rcd/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/construction/rcd/borg no_ammo_message = span_warning("Insufficient charge.") @@ -875,7 +875,7 @@ RLD else ..() -/obj/item/construction/rld/update_icon() +/obj/item/construction/rld/update_appearance(updates = ALL) icon_state = "rld-[round(matter/35)]" ..() diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index c28b11a8ccc3..e5a1c02f2067 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -23,6 +23,10 @@ var/datum/radial_menu/persistent/wiring_gui_menu var/mob/listeningTo +/obj/item/twohanded/rcl/Initialize(mapload) + . = ..() + update_appearance(UPDATE_ICON_STATE) + /obj/item/twohanded/rcl/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W @@ -42,7 +46,7 @@ loaded.amount += transfer_amount else return - update_icon() + update_appearance(UPDATE_ICON_STATE) to_chat(user, span_notice("You add the cables to [src]. It now contains [loaded.amount].")) else if(W.tool_behaviour == TOOL_SCREWDRIVER) if(!loaded) @@ -74,7 +78,7 @@ loaded.forceMove(get_turf(user)) loaded = null - update_icon() + update_appearance(UPDATE_ICON_STATE) else ..() @@ -90,7 +94,7 @@ QDEL_NULL(wiring_gui_menu) return ..() -/obj/item/twohanded/rcl/update_icon() +/obj/item/twohanded/rcl/update_icon_state() if(!loaded) icon_state = "rcl-0" item_state = "rcl-0" @@ -108,9 +112,10 @@ else icon_state = "rcl-0" item_state = "rcl-0" + return ..() /obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1) - update_icon() + update_appearance(UPDATE_ICON_STATE) if(!loaded || !loaded.amount) if(loud) to_chat(user, span_notice("The last of the cables unreel from [src].")) @@ -193,7 +198,7 @@ loaded.color = colors[current_color_index] last = loaded.place_turf(get_turf(src), user, turn(user.dir, 180)) is_empty(user) //If we've run out, display message - update_icon() + update_appearance(UPDATE_ICON_STATE) //searches the current tile for a stub cable of the same colour @@ -286,11 +291,11 @@ loaded = new() loaded.max_amount = max_amount loaded.amount = max_amount - update_icon() + update_appearance(UPDATE_ICON_STATE) /obj/item/twohanded/rcl/Initialize() . = ..() - update_icon() + update_appearance(UPDATE_ICON_STATE) /obj/item/twohanded/rcl/ui_action_click(mob/user, action) if(istype(action, /datum/action/item_action/rcl_col)) @@ -315,7 +320,7 @@ name = "makeshift rapid cable layer" ghetto = TRUE -/obj/item/twohanded/rcl/ghetto/update_icon() +/obj/item/twohanded/rcl/ghetto/update_icon_state() if(!loaded) icon_state = "rclg-0" item_state = "rclg-0" @@ -327,6 +332,7 @@ else icon_state = "rclg-1" item_state = "rclg-1" + return ..() /datum/action/item_action/rcl_col name = "Change Cable Color" diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 3c99395925cb..01d06b38af0b 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -493,7 +493,7 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list( activate() C.add_fingerprint(usr) - C.update_icon() + C.update_appearance(updates = ALL) if(mode&WRENCH_MODE) C.wrench_act(user, src) return diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index b00227bde330..7409614e2a29 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -5,7 +5,7 @@ icon_state = "ashtray" var/max_butts = 10 -/obj/item/ashtray/update_icon() +/obj/item/ashtray/update_appearance(updates = ALL) ..() overlays.Cut() if(contents.len == max_butts) @@ -32,7 +32,7 @@ if(user.transferItemToLoc(W, src)) visible_message(span_notice("[user] places [W] in [src].")) - update_icon() + update_appearance(updates = ALL) return ..() @@ -42,5 +42,5 @@ visible_message(span_danger("\The [src] slams into [hit_atom], spilling its contents!")) for(var/obj/O in contents) O.forceMove(drop_location()) - update_icon() + update_appearance(updates = ALL) return ..() diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 0959f43b370c..d31952dddb29 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -148,5 +148,5 @@ bag.killing = !bag.killing if(bag.deployed_bag) - bag.deployed_bag.update_icon() + bag.deployed_bag.update_appearance(updates = ALL) to_chat(user, span_notice("\The [bag] is now set to [bag.killing ? "LETHAL" : "NON-LETHAL"].")) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index c825b5ff1fe5..26e69879ed00 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -24,7 +24,8 @@ if(start_lit) light() -/obj/item/candle/update_icon() +/obj/item/candle/update_icon_state() + . = ..() icon_state = "candle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]" /obj/item/candle/attackby(obj/item/W, mob/user, params) @@ -49,13 +50,13 @@ usr.visible_message(show_message) set_light_on(TRUE) START_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON | UPDATE_NAME) /obj/item/candle/proc/put_out_candle() if(!lit) return lit = FALSE - update_icon() + update_appearance(updates = ALL) set_light_on(FALSE) return TRUE @@ -75,7 +76,7 @@ else new /obj/item/trash/candle(loc) qdel(src) - update_icon() + update_appearance(updates = ALL) open_flame() /obj/item/candle/attack_self(mob/user) @@ -99,7 +100,7 @@ wax = 2000 candle_type = "resin" -/obj/item/candle/resin/update_icon() +/obj/item/candle/resin/update_appearance(updates = ALL) icon_state = "resincandle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]" #undef CANDLE_LUMINOSITY diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index e66386cc1672..efdae3c2cd4d 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -37,16 +37,16 @@ var/detail_color = COLOR_ASSEMBLY_ORANGE /obj/item/card/data/Initialize() - .=..() - update_icon() + . = ..() + update_appearance(updates = ALL) -/obj/item/card/data/update_icon() - cut_overlays() +/obj/item/card/data/update_overlays() + . = ..() if(detail_color == COLOR_FLOORTILE_GRAY) return var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color") detail_overlay.color = detail_color - add_overlay(detail_overlay) + . += detail_overlay /obj/item/card/data/full_color desc = "A plastic magstripe card for simple and speedy data storage and transfer. This one has the entire card colored." @@ -597,7 +597,11 @@ update_label("John Doe", "Clowny") addtimer(CALLBACK(src, PROC_REF(wipe_id)), 50 SECONDS) /obj/item/card/id/captains_spare/temporary/proc/wipe_id() - visible_message(span_danger("The temporary spare begins to smolder"), span_userdanger("The temporary spare begins to smolder"), span_userdanger("The temporary spare begins to smolder")) + visible_message( + span_danger("The temporary spare begins to smolder!"), \ + span_userdanger("The temporary spare begins to smolder!"), \ + span_userdanger("You smell something burning really badly!") + ) sleep(10 SECONDS) if(isliving(loc)) var/mob/living/M = loc @@ -610,7 +614,7 @@ update_label("John Doe", "Clowny") if(holder.obj_integrity > holder.integrity_failure) //we dont want to heal it by accident holder.take_damage(holder.obj_integrity - holder.integrity_failure, BURN) //we do a bit of trolling for being naughty else - holder.update_icon() //update the icon anyway so it pops out + holder.update_appearance(updates = ALL) //update the icon anyway so it pops out visible_message(span_danger("The heat of the temporary spare shatters the glass!")); fire_act() sleep(2 SECONDS) @@ -618,7 +622,7 @@ update_label("John Doe", "Clowny") var/obj/structure/fireaxecabinet/bridge/spare/holder = loc forceMove(holder.loc) holder.spareid = null - holder.update_icon() + holder.update_appearance(updates = ALL) burn() //yogs: redd ports holopay but as paystands diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index f63991f4e6f3..975e7d853fca 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -57,6 +57,7 @@ var/turf/startpos = null /obj/item/gun/energy/chrono_gun/Initialize() + AddElement(/datum/element/update_icon_blocker) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHRONO_GUN_TRAIT) if(istype(loc, /obj/item/chrono_eraser)) @@ -65,9 +66,6 @@ TED = new(src.loc) return INITIALIZE_HINT_QDEL -/obj/item/gun/energy/chrono_gun/update_icon() - return - /obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) if(field) field_disconnect(field) @@ -192,7 +190,7 @@ cached_icon.Insert(mob_icon, "frame[i]") mob_underlay = mutable_appearance(cached_icon, "frame1") - update_icon() + update_appearance(updates = ALL) desc = initial(desc) + "
[span_info("It appears to contain [target.name].")]" START_PROCESSING(SSobj, src) @@ -203,7 +201,7 @@ gun.field_disconnect(src) return ..() -/obj/structure/chrono_field/update_icon() +/obj/structure/chrono_field/update_appearance(updates = ALL) var/ttk_frame = 1 - (timetokill / initial(timetokill)) ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT) if(ttk_frame != RPpos) @@ -232,7 +230,7 @@ captured.Unconscious(80) if(captured.loc != src) captured.forceMove(src) - update_icon() + update_appearance(updates = ALL) if(gun) if(gun.field_check(src)) timetokill -= delta_time diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index b52df711f875..fb269b3bcb4d 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -50,7 +50,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM desc = "A [initial(name)]. This one is lit." attack_verb = list("burnt","singed") START_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) /obj/item/match/proc/matchburnout() if(lit) @@ -225,7 +225,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(ismob(loc)) var/mob/M = loc M.update_inv_wear_mask() - M.update_inv_hands() + M.update_held_items() /obj/item/clothing/mask/cigarette/extinguish() if(!lit) @@ -244,7 +244,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/mob/living/M = loc to_chat(M, span_notice("Your [name] goes out.")) M.update_inv_wear_mask() - M.update_inv_hands() + M.update_held_items() /obj/item/clothing/mask/cigarette/proc/handle_reagents() if(reagents.total_volume) @@ -571,7 +571,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM . = ..() if(!overlay_state) overlay_state = pick(overlay_list) - update_icon() + update_appearance(updates = ALL) /obj/item/lighter/cyborg_unequip(mob/user) if(!lit) @@ -587,7 +587,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM user.visible_message(span_suicide("[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")) return BRUTELOSS -/obj/item/lighter/update_icon() +/obj/item/lighter/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" @@ -614,7 +614,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM attack_verb = null //human_defense.dm takes care of it STOP_PROCESSING(SSobj, src) set_light_on(lit) - update_icon() + update_appearance(updates = ALL) /obj/item/lighter/extinguish() set_lit(FALSE) @@ -719,9 +719,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM . = ..() if(!lighter_color) lighter_color = pick(color_list) - update_icon() + update_appearance(updates = ALL) -/obj/item/lighter/greyscale/update_icon() +/obj/item/lighter/greyscale/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 91afba114166..337c47cc3ca3 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -167,7 +167,7 @@ if(T) // this would be awkward if there wasn't a tongue here at this point user.visible_message(span_alert("[user] shoves [src] inside of [T]!")) T.honked = TRUE - T.update_icon() + T.update_appearance(updates = ALL) qdel(src) /obj/item/bikehorn/Initialize() diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 5abcc9e2a30d..778340ade400 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -8,6 +8,16 @@ var/colour = "red" var/open = FALSE +/obj/item/lipstick/Initialize(mapload) + . = ..() +// AddElement(/datum/element/update_icon_updates_onmob) + update_appearance(UPDATE_ICON) + +/obj/item/lipstick/vv_edit_var(vname, vval) + . = ..() + if(vname == NAMEOF(src, open)) + update_appearance(UPDATE_ICON) + /obj/item/lipstick/purple name = "purple lipstick" colour = "purple" @@ -32,16 +42,22 @@ name = "[colour] lipstick" /obj/item/lipstick/attack_self(mob/user) - cut_overlays() to_chat(user, span_notice("You twist \the [src] [open ? "closed" : "open"].")) open = !open - if(open) - var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color") - colored_overlay.color = colour - icon_state = "lipstick_uncap" - add_overlay(colored_overlay) - else - icon_state = "lipstick" + update_appearance(UPDATE_ICON) + +/obj/item/lipstick/update_icon_state() + icon_state = "lipstick[open ? "_uncap" : null]" + item_state = "lipstick[open ? "open" : null]" + return ..() + +/obj/item/lipstick/update_overlays() + . = ..() + if(!open) + return + var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color") + colored_overlay.color = colour + . += colored_overlay /obj/item/lipstick/attack(mob/M, mob/user) if(!open) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index ec83f4c08b7d..5be1c1967bbe 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -172,7 +172,7 @@ if(has_cap) is_capped = !is_capped to_chat(user, span_notice("The cap on [src] is now [is_capped ? "on" : "off"].")) - update_icon() + update_appearance(updates = ALL) /obj/item/toy/crayon/proc/staticDrawables() @@ -262,7 +262,7 @@ . = TRUE paint_mode = PAINT_NORMAL drawtype = "a" - update_icon() + update_appearance(updates = ALL) /obj/item/toy/crayon/proc/crayon_text_strip(text) var/static/regex/crayon_r = new /regex(@"[^\w!?,.=%#&+\/\-]") @@ -548,9 +548,9 @@ new /obj/item/toy/crayon/blue(src) new /obj/item/toy/crayon/purple(src) new /obj/item/toy/crayon/black(src) - update_icon() + update_appearance(updates = ALL) -/obj/item/storage/crayons/update_icon() +/obj/item/storage/crayons/update_appearance(updates = ALL) cut_overlays() for(var/obj/item/toy/crayon/crayon in contents) add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.crayon_color)) @@ -615,7 +615,7 @@ playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) if(can_change_colour) paint_color = "#C0C0C0" - update_icon() + update_appearance(updates = ALL) if(actually_paints) H.lip_style = "spray_face" H.lip_color = paint_color @@ -634,7 +634,7 @@ paint_color = pick("#DA0000","#FF9300","#FFF200","#A8E61D","#00B7EF", "#DA00FF") refill() - update_icon() + update_appearance(updates = ALL) /obj/item/toy/crayon/spraycan/examine(mob/user) @@ -702,7 +702,7 @@ . = ..() -/obj/item/toy/crayon/spraycan/update_icon() +/obj/item/toy/crayon/spraycan/update_appearance(updates = ALL) icon_state = is_capped ? icon_capped : icon_uncapped if(use_overlays) cut_overlays() diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index e5d687fcc2fa..cb8968b2b1e1 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -12,7 +12,7 @@ . = ..() if(amount) credits = amount - update_icon() + update_appearance(updates = ALL) /obj/item/holochip/examine(mob/user) . = ..() @@ -22,7 +22,7 @@ /obj/item/holochip/get_item_credit_value() return credits -/obj/item/holochip/update_icon() +/obj/item/holochip/update_appearance(updates = ALL) name = "\improper [credits] credit holochip" var/rounded_credits = credits switch(credits) @@ -65,7 +65,7 @@ credits -= amount if(credits == 0) qdel(src) - update_icon() + update_appearance(updates = ALL) return amount else if(pay_anyway) qdel(src) @@ -79,7 +79,7 @@ var/obj/item/holochip/H = I credits += H.credits to_chat(user, span_notice("You insert the credits into [src].")) - update_icon() + update_appearance(updates = ALL) qdel(H) /obj/item/holochip/AltClick(mob/user) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 0e13076233d6..49d60ef975e5 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -30,14 +30,14 @@ /obj/item/defibrillator/Initialize() //starts without a cell for rnd . = ..() paddles = make_paddles() - update_icon() + update_appearance(updates = ALL) return /obj/item/defibrillator/loaded/Initialize() //starts with hicap . = ..() paddles = make_paddles() cell = new(src) - update_icon() + update_appearance(updates = ALL) return /obj/item/defibrillator/fire_act(exposed_temperature, exposed_volume) @@ -50,7 +50,7 @@ if(paddles?.loc == src) paddles.extinguish() -/obj/item/defibrillator/update_icon() +/obj/item/defibrillator/update_appearance(updates = ALL) update_power() update_overlays() update_charge() @@ -64,7 +64,7 @@ else powered = FALSE -/obj/item/defibrillator/proc/update_overlays() +/obj/item/defibrillator/update_overlays() cut_overlays() if(!on) add_overlay("[initial(icon_state)]-paddles") @@ -85,7 +85,7 @@ /obj/item/defibrillator/CheckParts(list/parts_list) ..() cell = locate(/obj/item/stock_parts/cell) in contents - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/ui_action_click() toggle_paddles() @@ -133,15 +133,15 @@ return cell = W to_chat(user, span_notice("You install a cell in [src].")) - update_icon() + update_appearance(updates = ALL) else if(W.tool_behaviour == TOOL_SCREWDRIVER) if(cell) - cell.update_icon() + cell.update_appearance(updates = ALL) cell.forceMove(get_turf(src)) cell = null to_chat(user, span_notice("You remove the cell from [src].")) - update_icon() + update_appearance(updates = ALL) else return ..() @@ -169,7 +169,7 @@ else visible_message(span_notice("[src] buzzes: Surge detected!")) playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/proc/toggle_paddles() set name = "Toggle Paddles" @@ -182,14 +182,14 @@ if(!usr.put_in_hands(paddles)) on = FALSE to_chat(user, span_warning("You need a free hand to hold the paddles!")) - update_icon() + update_appearance(updates = ALL) return else //Remove from their hands and back onto the defib unit paddles.unwield() remove_paddles(user) - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -201,7 +201,7 @@ ..() if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT)) remove_paddles(user) - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/item_action_slot_check(slot, mob/user) if(slot == user.getBackSlot()) @@ -219,18 +219,18 @@ remove_paddles(M) QDEL_NULL(paddles) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/proc/deductcharge(chrgdeductamt) if(cell) if(cell.charge < (paddles.revivecost+chrgdeductamt)) powered = FALSE - update_icon() + update_appearance(updates = ALL) if(cell.use(chrgdeductamt)) - update_icon() + update_appearance(updates = ALL) return TRUE else - update_icon() + update_appearance(updates = ALL) return FALSE /obj/item/defibrillator/proc/cooldowncheck(mob/user) @@ -243,8 +243,8 @@ user.visible_message(span_notice("[src] beeps: Charge depleted.")) playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) paddles.cooldown = FALSE - paddles.update_icon() - update_icon() + paddles.update_appearance(updates = ALL) + update_appearance(updates = ALL) /obj/item/defibrillator/compact name = "compact defibrillator" @@ -263,7 +263,7 @@ . = ..() paddles = make_paddles() cell = new(src) - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/compact/combat name = "combat defibrillator" @@ -275,13 +275,13 @@ . = ..() paddles = make_paddles() cell = new /obj/item/stock_parts/cell/infinite(src) - update_icon() + update_appearance(updates = ALL) /obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params) if(W == paddles) paddles.unwield() toggle_paddles() - update_icon() + update_appearance(updates = ALL) return //paddles @@ -346,13 +346,13 @@ if(req_defib || !time) return cooldown = TRUE - update_icon() + update_appearance(updates = ALL) sleep(time) var/turf/T = get_turf(src) T.audible_message(span_notice("[src] beeps: Unit is recharged.")) playsound(src, 'sound/machines/defib_ready.ogg', 50, 0) cooldown = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/twohanded/shockpaddles/New(mainunit) ..() @@ -360,16 +360,16 @@ defib = mainunit forceMove(defib) busy = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/twohanded/shockpaddles/update_icon() +/obj/item/twohanded/shockpaddles/update_appearance(updates = ALL) icon_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]" if(cooldown) icon_state = "defibpaddles[wielded]_cooldown" if(iscarbon(loc)) var/mob/living/carbon/C = loc - C.update_inv_hands() + C.update_held_items() /obj/item/twohanded/shockpaddles/suicide_act(mob/user) if(req_defib && !defib.deductcharge(revivecost)) @@ -397,7 +397,7 @@ return defib.on = FALSE forceMove(defib) - defib.update_icon() + defib.update_appearance(updates = ALL) /obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O) if(!req_defib) @@ -491,7 +491,7 @@ defib.deductcharge(revivecost) cooldown = TRUE busy = FALSE - update_icon() + update_appearance(updates = ALL) if(req_defib) defib.cooldowncheck(user) else @@ -505,7 +505,7 @@ user.visible_message(span_warning("[user] begins to place [src] on [H]'s chest."), span_warning("You overcharge the paddles and begin to place them onto [H]'s chest...")) busy = TRUE - update_icon() + update_appearance(updates = ALL) if(do_after(user, 3 SECONDS, H)) user.visible_message(span_notice("[user] places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest and begin to charge them.")) @@ -518,13 +518,13 @@ if(do_after(user, 3 SECONDS, H)) //Takes longer due to overcharging if(!H) busy = FALSE - update_icon() + update_appearance(updates = ALL) return if(H && H.stat == DEAD) to_chat(user, span_warning("[H] is dead.")) playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) busy = FALSE - update_icon() + update_appearance(updates = ALL) return user.visible_message(span_boldannounce("[user] shocks [H] with \the [src]!"), span_warning("You shock [H] with \the [src]!")) playsound(src, 'sound/machines/defib_zap.ogg', 100, 1, -1) @@ -544,18 +544,18 @@ defib.deductcharge(revivecost) cooldown = TRUE busy = FALSE - update_icon() + update_appearance(updates = ALL) if(!req_defib) recharge(6 SECONDS) if(req_defib && (defib.cooldowncheck(user))) return busy = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/twohanded/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user) user.visible_message(span_warning("[user] begins to place [src] on [H]'s chest."), span_warning("You begin to place [src] on [H]'s chest...")) busy = TRUE - update_icon() + update_appearance(updates = ALL) if(do_after(user, 3 SECONDS, H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message(span_notice("[user] places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest.")) playsound(src, 'sound/machines/defib_charge.ogg', 75, 0) @@ -573,7 +573,7 @@ user.audible_message(span_warning("[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.")) playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) busy = FALSE - update_icon() + update_appearance(updates = ALL) return if(H.stat == DEAD) H.visible_message(span_warning("[H]'s body convulses a bit.")) @@ -640,7 +640,7 @@ if(req_defib) defib.deductcharge(revivecost) cooldown = 1 - update_icon() + update_appearance(updates = ALL) if(req_defib) defib.cooldowncheck(user) else @@ -660,7 +660,7 @@ user.visible_message(span_warning("[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.")) playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) busy = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/twohanded/shockpaddles/cyborg name = "cyborg defibrillator paddles" diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 512fced644ff..7fc56cddb064 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -128,7 +128,7 @@ GLOBAL_LIST_EMPTY(PDAs) cartridge.host_pda = src if(insert_type) inserted_item = SSwardrobe.provide_type(insert_type, src) - update_icon() + update_appearance(updates = ALL) /obj/item/pda/Destroy() GLOB.PDAs -= src @@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(PDAs) return TRUE return FALSE -/obj/item/pda/update_icon() +/obj/item/pda/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/overlay = new() overlay.pixel_x = overlays_x_offset @@ -349,7 +349,7 @@ GLOBAL_LIST_EMPTY(PDAs) if (pai) if(pai.loc != src) pai = null - update_icon() + update_appearance(updates = ALL) else dat += "
  • pAI Device Configuration
  • " dat += "
  • Eject pAI Device
  • " @@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(PDAs) scanmode = PDA_SCANNER_NONE cartridge.host_pda = null cartridge = null - update_icon() + update_appearance(updates = ALL) //MENU FUNCTIONS=================================== @@ -722,7 +722,7 @@ GLOBAL_LIST_EMPTY(PDAs) //EXTRA FUNCTIONS=================================== if (mode == 2 || mode == 21)//To clear message overlays. - update_icon() + update_appearance(updates = ALL) if ((honkamt > 0) && (prob(60)))//For clown virus. honkamt-- @@ -753,7 +753,7 @@ GLOBAL_LIST_EMPTY(PDAs) . = id id = null - update_icon() + update_appearance(updates = ALL) if(ishuman(loc)) var/mob/living/carbon/human/H = loc @@ -856,7 +856,7 @@ GLOBAL_LIST_EMPTY(PDAs) to_chat(L, "[icon2html(src)] Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], [signal.format_message(L)] [reply]") - update_icon() + update_appearance(updates = ALL) add_overlay(icon_alert) /obj/item/pda/proc/receive_ping(message) @@ -949,7 +949,7 @@ GLOBAL_LIST_EMPTY(PDAs) set_light_on(FALSE) else if(light_range) set_light_on(TRUE) - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -962,7 +962,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(inserted_item) to_chat(usr, span_notice("You remove [inserted_item] from [src].")) usr.put_in_hands(inserted_item) //Don't need to manage the pen ref, handled on Exited() - update_icon() + update_appearance(updates = ALL) else to_chat(usr, span_warning("This PDA does not have a pen in it!")) @@ -981,7 +981,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(!user.transferItemToLoc(I, src)) return FALSE insert_id(I, user) - update_icon() + update_appearance(updates = ALL) return TRUE @@ -1007,7 +1007,7 @@ GLOBAL_LIST_EMPTY(PDAs) cartridge = C cartridge.host_pda = src to_chat(user, span_notice("You insert [cartridge] into [src].")) - update_icon() + update_appearance(updates = ALL) else if(istype(C, /obj/item/card/id)) var/obj/item/card/id/idcard = C @@ -1033,7 +1033,7 @@ GLOBAL_LIST_EMPTY(PDAs) return pai = C to_chat(user, span_notice("You slot \the [C] into [src].")) - update_icon() + update_appearance(updates = ALL) updateUsrDialog() else if(is_type_in_list(C, contained_item)) //Checks if there is a pen if(inserted_item) @@ -1043,7 +1043,7 @@ GLOBAL_LIST_EMPTY(PDAs) return to_chat(user, span_notice("You slide \the [C] into \the [src].")) inserted_item = C - update_icon() + update_appearance(updates = ALL) else if(istype(C, /obj/item/photo)) var/obj/item/photo/P = C picture = P.picture diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 7fded4c4ae46..8b9293f3ff18 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -38,9 +38,9 @@ target.transfer_ai(AI_TRANS_TO_CARD, user, null, src) if(AI) log_combat(user, AI, "carded", src) - update_icon() //Whatever happened, update the card's state (icon, name) to match. + update_appearance(updates = ALL) //Whatever happened, update the card's state (icon, name) to match. -/obj/item/aicard/update_icon() +/obj/item/aicard/update_appearance(updates = ALL) cut_overlays() if(AI) name = "[initial(name)] - [AI.name]" @@ -104,4 +104,4 @@ AI.radio_enabled = !AI.radio_enabled to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!") . = TRUE - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index aa0c9ff0329a..b1e70210dc5c 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -517,28 +517,31 @@ if(fuel <= 0) turn_off() STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) /obj/item/flashlight/glowstick/proc/turn_off() on = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/flashlight/glowstick/update_icon() - item_state = "glowstick" - cut_overlays() +/obj/item/flashlight/glowstick/update_appearance(updates=ALL) + . = ..() if(fuel <= 0) - icon_state = "glowstick-empty" - cut_overlays() set_light_on(FALSE) - else if(on) - var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow") - glowstick_overlay.color = color - add_overlay(glowstick_overlay) - item_state = "glowstick-on" + return + if(on) set_light_on(TRUE) - else - icon_state = "glowstick" - cut_overlays() + return + +/obj/item/flashlight/glowstick/update_icon_state() + icon_state = "[base_icon_state][(fuel <= 0) ? "-empty" : ""]" + item_state = "[base_icon_state][((fuel > 0) && on) ? "-on" : ""]" + return ..() + +/obj/item/flashlight/glowstick/update_overlays() + . = ..() + if(fuel <= 0 && !on) + return + /obj/item/flashlight/glowstick/attack_self(mob/user) if(fuel <= 0) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index d8c9b7349f63..8c887c33fe00 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -51,7 +51,7 @@ current_tick_amount = 0 - update_icon() + update_appearance(UPDATE_ICON) update_sound() /obj/item/geiger_counter/examine(mob/user) @@ -78,13 +78,15 @@ . += span_notice("The last radiation amount detected was [last_tick_amount]") -/obj/item/geiger_counter/update_icon() +/obj/item/geiger_counter/update_icon_state() if(!scanning) icon_state = "geiger_off" - return 1 + return ..() + if(obj_flags & EMAGGED) icon_state = "geiger_on_emag" - return 1 + return ..() + switch(radiation_count) if(-INFINITY to RAD_LEVEL_NORMAL) icon_state = "geiger_on_1" @@ -98,7 +100,7 @@ icon_state = "geiger_on_4" if(RAD_LEVEL_CRITICAL + 1 to INFINITY) icon_state = "geiger_on_5" - ..() + return ..() /obj/item/geiger_counter/proc/update_sound() var/datum/looping_sound/geiger/loop = soundloop @@ -116,11 +118,11 @@ if(amount <= RAD_BACKGROUND_RADIATION || !scanning) return current_tick_amount += amount - update_icon() + update_appearance(UPDATE_ICON) /obj/item/geiger_counter/attack_self(mob/user) scanning = !scanning - update_icon() + update_appearance(UPDATE_ICON) to_chat(user, span_notice("[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].")) /obj/item/geiger_counter/afterattack(atom/target, mob/user) @@ -163,7 +165,7 @@ user.visible_message(span_notice("[user] refastens [src]'s maintenance panel!"), span_notice("You reset [src] to its factory settings!")) obj_flags &= ~EMAGGED radiation_count = 0 - update_icon() + update_appearance(UPDATE_ICON) return 1 else return ..() @@ -176,7 +178,7 @@ return 0 radiation_count = 0 to_chat(usr, span_notice("You flush [src]'s radiation counts, resetting it to normal.")) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/geiger_counter/emag_act(mob/user) if(obj_flags & EMAGGED) @@ -196,7 +198,7 @@ if(!scanning) return scanning = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/item/geiger_counter/cyborg/equipped(mob/user) . = ..() diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 873b1d3673c6..ce84c4ea58cd 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -152,7 +152,7 @@ ReplaceLight(target, user) to_chat(user, status_string()) -/obj/item/lightreplacer/update_icon() +/obj/item/lightreplacer/update_appearance(updates = ALL) icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" /obj/item/lightreplacer/proc/status_string() @@ -225,7 +225,7 @@ name = "shortcircuited [initial(name)]" else name = initial(name) - update_icon() + update_appearance(updates = ALL) /obj/item/lightreplacer/proc/CanUse(mob/living/user) src.add_fingerprint(user) @@ -255,7 +255,7 @@ /obj/item/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) J.put_in_cart(src, user) J.myreplacer = src - J.update_icon() + J.update_appearance(updates = ALL) /obj/item/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J) return diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index f7df6e8bd086..73d5315859cf 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -24,7 +24,7 @@ /obj/item/megaphone/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/megaphone/equipped(mob/M, slot) . = ..() @@ -42,11 +42,11 @@ if(last_used > world.time) return FALSE last_used = world.time + recharge_time - update_icon() - addtimer(CALLBACK(src, PROC_REF(update_icon)), recharge_time) + update_appearance(updates = ALL) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), recharge_time) return TRUE -/obj/item/megaphone/update_icon() +/obj/item/megaphone/update_appearance(updates = ALL) . = ..() cut_overlays() var/mutable_appearance/base_overlay diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index d5c56bb11dfd..d1750834292e 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -77,7 +77,7 @@ if(hud_on) remove_hud(user) -/obj/item/multitool/ai_detect/update_icon() +/obj/item/multitool/ai_detect/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][detect_state]" /obj/item/multitool/ai_detect/process() @@ -86,7 +86,7 @@ eye.setLoc(get_turf(src)) multitool_detect() if(detect_state != old_detect_state) - update_icon() + update_appearance(updates = ALL) /obj/item/multitool/ai_detect/proc/toggle_hud(mob/user) hud_on = !hud_on diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 449e9e660fa2..2c297d6048a4 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -26,7 +26,7 @@ var/obj/structure/cable/attached // the attached cable -/obj/item/powersink/update_icon() +/obj/item/powersink/update_appearance(updates = ALL) icon_state = "powersink[mode == OPERATING]" /obj/item/powersink/proc/set_mode(value) @@ -56,7 +56,7 @@ density = TRUE mode = value - update_icon() + update_appearance(updates = ALL) set_light(0) /obj/item/powersink/attackby(obj/item/I, mob/user, params) diff --git a/code/game/objects/items/devices/quantum_keycard.dm b/code/game/objects/items/devices/quantum_keycard.dm index 7fb752a506fc..60c988d81008 100644 --- a/code/game/objects/items/devices/quantum_keycard.dm +++ b/code/game/objects/items/devices/quantum_keycard.dm @@ -25,7 +25,7 @@ to_chat(user, span_notice("The keycard beeps twice and disconnects the quantum link.")) qpad = null -/obj/item/quantum_keycard/update_icon() +/obj/item/quantum_keycard/update_appearance(updates = ALL) if(qpad) icon_state = "quantum_keycard_on" else diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 0feefa1488bd..a73c0c62db2e 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -27,7 +27,7 @@ . = ..() if(starting_tape_type) mytape = new starting_tape_type(src) - update_icon() + update_appearance(updates = ALL) /obj/item/taperecorder/examine(mob/user) @@ -62,7 +62,7 @@ return mytape = I to_chat(user, span_notice("You insert [I] into [src].")) - update_icon() + update_appearance(updates = ALL) /obj/item/taperecorder/proc/eject(mob/user) @@ -71,7 +71,7 @@ stop() user.put_in_hands(mytape) mytape = null - update_icon() + update_appearance(updates = ALL) /obj/item/taperecorder/fire_act(exposed_temperature, exposed_volume) mytape.ruin() //Fires destroy the tape @@ -103,7 +103,7 @@ eject(usr) -/obj/item/taperecorder/update_icon() +/obj/item/taperecorder/update_appearance(updates = ALL) if(!mytape) icon_state = "taperecorder_empty" else if(recording) @@ -136,7 +136,7 @@ if(mytape.used_capacity < mytape.max_capacity) to_chat(usr, span_notice("Recording started.")) recording = 1 - update_icon() + update_appearance(updates = ALL) mytape.timestamp += mytape.used_capacity mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started." var/used = mytape.used_capacity //to stop runtimes when you eject the tape @@ -146,7 +146,7 @@ used++ sleep(1 SECONDS) recording = 0 - update_icon() + update_appearance(updates = ALL) else to_chat(usr, span_notice("The tape is full.")) @@ -168,7 +168,7 @@ playing = 0 var/turf/T = get_turf(src) T.visible_message("Tape Recorder: Playback stopped.") - update_icon() + update_appearance(updates = ALL) /obj/item/taperecorder/verb/play() @@ -185,7 +185,7 @@ return playing = 1 - update_icon() + update_appearance(updates = ALL) to_chat(usr, span_notice("Playing started.")) var/used = mytape.used_capacity //to stop runtimes when you eject the tape var/max = mytape.max_capacity @@ -210,7 +210,7 @@ i++ playing = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/taperecorder/attack_self(mob/user) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 8bc627d4dfc7..233bc64321f5 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -275,4 +275,4 @@ effective or pretty fucking useless. GLOB.active_jammers |= src else GLOB.active_jammers -= src - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index aa5a7fe16adc..566e1cd51802 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -38,7 +38,7 @@ tank_two = item to_chat(user, span_notice("You attach the tank to the transfer valve.")) - update_icon() + update_appearance(updates = ALL) //TODO: Have this take an assemblyholder else if(isassembly(item)) var/obj/item/assembly/A = item @@ -53,7 +53,7 @@ attached_device = A to_chat(user, span_notice("You attach the [item] to the valve controls and secure it.")) A.holder = src - A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). + A.toggle_secure() //this calls update_appearance(updates = ALL), which calls update_appearance(updates = ALL) on the holder (i.e. the bomb). log_bomber(user, "attached a [item.name] to a ttv -", src, null, FALSE) attacher = user return @@ -99,7 +99,7 @@ /obj/item/transfer_valve/proc/toggle_off() toggle = TRUE -/obj/item/transfer_valve/update_icon() +/obj/item/transfer_valve/update_appearance(updates = ALL) cut_overlays() if(!tank_one && !tank_two && !attached_device) @@ -189,12 +189,12 @@ merge_gases() for(var/i in 1 to 6) - addtimer(CALLBACK(src, PROC_REF(update_icon)), 20 + (i - 1) * 10) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 20 + (i - 1) * 10) else if(valve_open && tank_one && tank_two) split_gases() valve_open = FALSE - update_icon() + update_appearance(updates = ALL) // this doesn't do anything but the timer etc. expects it to be here // eventually maybe have it update icon to show state (timer, prox etc.) like old bombs @@ -250,4 +250,4 @@ attached_device = null . = TRUE - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index 3e4da171f927..e0864c0d042f 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -52,7 +52,7 @@ . = ..() if(!result) result = roll(sides) - update_icon() + update_appearance(updates = ALL) /obj/item/dice/suicide_act(mob/user) user.visible_message(span_suicide("[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!")) @@ -142,8 +142,9 @@ w_class = WEIGHT_CLASS_SMALL sides = 100 -/obj/item/dice/d100/update_icon() - return +/obj/item/dice/d100/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/eightbd20 name = "strange d20" @@ -152,8 +153,9 @@ sides = 20 special_faces = list("It is certain","It is decidedly so","Without a doubt","Yes, definitely","You may rely on it","As I see it, yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful") -/obj/item/dice/eightbd20/update_icon() - return +/obj/item/dice/eightbd20/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/fourdd6 name = "4d d6" @@ -162,8 +164,9 @@ sides = 48 special_faces = list("Cube-Side: 1-1","Cube-Side: 1-2","Cube-Side: 1-3","Cube-Side: 1-4","Cube-Side: 1-5","Cube-Side: 1-6","Cube-Side: 2-1","Cube-Side: 2-2","Cube-Side: 2-3","Cube-Side: 2-4","Cube-Side: 2-5","Cube-Side: 2-6","Cube-Side: 3-1","Cube-Side: 3-2","Cube-Side: 3-3","Cube-Side: 3-4","Cube-Side: 3-5","Cube-Side: 3-6","Cube-Side: 4-1","Cube-Side: 4-2","Cube-Side: 4-3","Cube-Side: 4-4","Cube-Side: 4-5","Cube-Side: 4-6","Cube-Side: 5-1","Cube-Side: 5-2","Cube-Side: 5-3","Cube-Side: 5-4","Cube-Side: 5-5","Cube-Side: 5-6","Cube-Side: 6-1","Cube-Side: 6-2","Cube-Side: 6-3","Cube-Side: 6-4","Cube-Side: 6-5","Cube-Side: 6-6","Cube-Side: 7-1","Cube-Side: 7-2","Cube-Side: 7-3","Cube-Side: 7-4","Cube-Side: 7-5","Cube-Side: 7-6","Cube-Side: 8-1","Cube-Side: 8-2","Cube-Side: 8-3","Cube-Side: 8-4","Cube-Side: 8-5","Cube-Side: 8-6") -/obj/item/dice/fourdd6/update_icon() - return +/obj/item/dice/fourdd6/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/attack_self(mob/user) diceroll(user) @@ -188,7 +191,7 @@ comment = "NAT 20!" else if(sides == 20 && result == 1) comment = "Ouch, bad luck." - update_icon() + update_appearance(updates = ALL) if(initial(icon_state) == "d00") result = (result - 1)*10 if(special_faces.len == sides) @@ -205,7 +208,7 @@ else if(!src.throwing) //Dice was thrown and is coming to rest visible_message(span_notice("[src] rolls to a stop, landing on [result]. [comment]")) -/obj/item/dice/update_icon() +/obj/item/dice/update_appearance(updates = ALL) cut_overlays() add_overlay("[src.icon_state]-[src.result]") diff --git a/code/game/objects/items/discoball.dm b/code/game/objects/items/discoball.dm index 704e21c1c760..09f17e90342e 100644 --- a/code/game/objects/items/discoball.dm +++ b/code/game/objects/items/discoball.dm @@ -28,7 +28,7 @@ /obj/structure/discoball/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/discoball/attack_hand(mob/living/carbon/human/user) . = ..() @@ -51,7 +51,7 @@ TurnedOn = FALSE set_light(0) remove_atom_colour(TEMPORARY_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) if(TimerID) deltimer(TimerID) over() @@ -69,10 +69,10 @@ current_color = random_color() set_light_color(current_color) add_atom_colour("#[current_color]", FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors -/obj/structure/discoball/update_icon() +/obj/structure/discoball/update_appearance(updates = ALL) cut_overlays() icon_state = "disco_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index f9f44e9a8859..52a04549baa8 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -56,4 +56,4 @@ icon_state = "docs_[C.crayon_color]" forgedseal = C.crayon_color to_chat(user, span_notice("You forge the official seal with a [C.crayon_color] crayon. No one will notice... right?")) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/etherealdiscoball.dm b/code/game/objects/items/etherealdiscoball.dm index a1bf40b1dbac..3eae40c623a8 100644 --- a/code/game/objects/items/etherealdiscoball.dm +++ b/code/game/objects/items/etherealdiscoball.dm @@ -25,7 +25,7 @@ /obj/structure/etherealball/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/etherealball/attack_hand(mob/living/carbon/human/user) . = ..() @@ -53,7 +53,7 @@ TurnedOn = FALSE set_light(0) remove_atom_colour(TEMPORARY_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) if(TimerID) deltimer(TimerID) @@ -62,10 +62,10 @@ current_color = random_color() set_light(range, power, current_color) add_atom_colour("#[current_color]", FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors -/obj/structure/etherealball/update_icon() +/obj/structure/etherealball/update_appearance(updates = ALL) cut_overlays() icon_state = "ethdisco_head_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 33f9d6790b37..2dd87fb62df5 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -54,7 +54,7 @@ igniter.flamethrower_process(location) -/obj/item/flamethrower/update_icon() +/obj/item/flamethrower/update_appearance(updates = ALL) cut_overlays() if(igniter) add_overlay("+igniter[status]") @@ -67,7 +67,7 @@ item_state = "flamethrower_0" if(ismob(loc)) var/mob/M = loc - M.update_inv_hands() + M.update_held_items() return /obj/item/flamethrower/afterattack(atom/target, mob/user, flag) @@ -104,7 +104,7 @@ else if(W.tool_behaviour == TOOL_SCREWDRIVER && igniter && !lit) status = !status to_chat(user, span_notice("[igniter] is now [status ? "secured" : "unsecured"]!")) - update_icon() + update_appearance(updates = ALL) return else if(isigniter(W)) @@ -116,7 +116,7 @@ if(!user.transferItemToLoc(W, src)) return igniter = I - update_icon() + update_appearance(updates = ALL) return else if(istype(W, /obj/item/tank/internals/plasma)) @@ -129,7 +129,7 @@ if(!user.transferItemToLoc(W, src)) return ptank = W - update_icon() + update_appearance(updates = ALL) return else @@ -150,7 +150,7 @@ user.put_in_hands(ptank) ptank = null to_chat(user, span_notice("You remove the plasma tank from [src]!")) - update_icon() + update_appearance(updates = ALL) /obj/item/flamethrower/examine(mob/user) . = ..() @@ -178,7 +178,7 @@ playsound(loc, deac_sound, 50, TRUE) STOP_PROCESSING(SSobj,src) set_light_on(lit) - update_icon() + update_appearance(updates = ALL) /obj/item/flamethrower/CheckParts(list/parts_list) ..() @@ -187,7 +187,7 @@ weldtool.status = FALSE igniter.secured = FALSE status = TRUE - update_icon() + update_appearance(updates = ALL) //Called from turf.dm turf/dblclick /obj/item/flamethrower/proc/flame_turf(turflist) @@ -265,7 +265,7 @@ set_light(0) playsound(loc, deac_sound, 50, TRUE) STOP_PROCESSING(SSobj,src) - update_icon() + update_appearance(updates = ALL) return FALSE //Burn it @@ -302,7 +302,7 @@ status = TRUE if(create_with_tank) ptank = new /obj/item/tank/internals/plasma/full(src) - update_icon() + update_appearance(updates = ALL) /obj/item/flamethrower/full create_full = TRUE diff --git a/code/game/objects/items/granters/martial_arts/plasma_fist.dm b/code/game/objects/items/granters/martial_arts/plasma_fist.dm index 8b9b1adb4b82..820a7825a35a 100644 --- a/code/game/objects/items/granters/martial_arts/plasma_fist.dm +++ b/code/game/objects/items/granters/martial_arts/plasma_fist.dm @@ -18,9 +18,9 @@ /obj/item/book/granter/martial/plasma_fist/on_reading_finished(mob/living/carbon/user) . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/book/granter/martial/plasma_fist/update_icon() +/obj/item/book/granter/martial/plasma_fist/update_appearance(updates = ALL) . = ..() if(uses <= 0) name = "empty scroll" diff --git a/code/game/objects/items/granters/martial_arts/sleeping_carp.dm b/code/game/objects/items/granters/martial_arts/sleeping_carp.dm index a6e2eed79f23..89ce70279e54 100644 --- a/code/game/objects/items/granters/martial_arts/sleeping_carp.dm +++ b/code/game/objects/items/granters/martial_arts/sleeping_carp.dm @@ -21,9 +21,9 @@ /obj/item/book/granter/martial/carp/on_reading_finished(mob/living/carbon/user) . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/book/granter/martial/carp/update_icon(updates) +/obj/item/book/granter/martial/carp/update_appearance(updates) . = ..() if(!uses) name = "empty scroll" diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index df14ac674abb..3fc275f46aaf 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -45,14 +45,14 @@ assemblyattacher = user.ckey to_chat(user, span_notice("You add [A] to the [name].")) playsound(src, 'sound/weapons/tap.ogg', 20, 1) - update_icon() + update_appearance(updates = ALL) return if(nadeassembly && I.tool_behaviour == TOOL_WIRECUTTER) I.play_tool_sound(src, 20) nadeassembly.forceMove(get_turf(src)) nadeassembly.master = null nadeassembly = null - update_icon() + update_appearance(updates = ALL) return ..() @@ -170,7 +170,7 @@ user.gib(1, 1) qdel(src) -/obj/item/grenade/plastic/update_icon() +/obj/item/grenade/plastic/update_appearance(updates = ALL) if(nadeassembly) icon_state = "[item_state]1" else diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index c5084d0cf29e..da34b51f677c 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -264,9 +264,9 @@ /obj/item/restraints/legcuffs/beartrap/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/restraints/legcuffs/beartrap/update_icon() +/obj/item/restraints/legcuffs/beartrap/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][armed]" /obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user) @@ -281,12 +281,12 @@ ..() if(ishuman(user) && !user.stat && !user.restrained()) armed = !armed - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("[src] is now [armed ? "armed" : "disarmed"]")) /obj/item/restraints/legcuffs/beartrap/proc/close_trap() armed = FALSE - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/effects/snap.ogg', 50, TRUE) /obj/item/restraints/legcuffs/beartrap/Crossed(AM as mob|obj) diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 1481808a3ddc..66bef07d327c 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -497,7 +497,7 @@ user.balloon_alert(user, "you unsheathe \the [src].") playsound(user, 'sound/items/unsheath.ogg', 25, TRUE) swords = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/nullrod/dualsword/attackby(obj/item/I, mob/living/user, params) . = ..() @@ -511,9 +511,9 @@ user.balloon_alert(user, "You sheathe \the [src].") playsound(user, 'sound/items/sheath.ogg', 25, TRUE) - update_icon() + update_appearance(updates = ALL) -/obj/item/nullrod/dualsword/update_icon() +/obj/item/nullrod/dualsword/update_appearance(updates = ALL) . = ..() item_state = swords ? "fulldual" : "emptydual" icon_state = item_state @@ -566,7 +566,7 @@ sheath.swordleft.forceMove(sheath) if(!sheath.swords) user.balloon_alert(user, "you sheathe \the [sheath].") - sheath.update_icon() + sheath.update_appearance(updates = ALL) playsound(user, 'sound/items/sheath.ogg', 25, TRUE) sheath.swords = TRUE diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm index 2cf1258162b5..74970329e6b7 100644 --- a/code/game/objects/items/hot_potato.dm +++ b/code/game/objects/items/hot_potato.dm @@ -138,7 +138,7 @@ /obj/item/hot_potato/proc/activate(delay, mob/user) if(active) return - update_icon() + update_appearance(updates = ALL) if(sticky) ADD_TRAIT(src, TRAIT_NODROP, HOT_POTATO_TRAIT) name = "primed [name]" @@ -150,14 +150,14 @@ active = TRUE /obj/item/hot_potato/proc/deactivate() - update_icon() + update_appearance(updates = ALL) name = initial(name) REMOVE_TRAIT(src, TRAIT_NODROP, HOT_POTATO_TRAIT) STOP_PROCESSING(SSfastprocess, src) colorize(null) active = FALSE -/obj/item/hot_potato/update_icon() +/obj/item/hot_potato/update_appearance(updates = ALL) icon_state = "[initial(icon_state)]" + "[active ? "_active" : ""]" /obj/item/hot_potato/syndicate diff --git a/code/game/objects/items/hourglass.dm b/code/game/objects/items/hourglass.dm index a9e35a0c206b..5180839fea29 100644 --- a/code/game/objects/items/hourglass.dm +++ b/code/game/objects/items/hourglass.dm @@ -29,7 +29,7 @@ to_chat(user,span_notice("You stop the [src].")) //Sand magically flows back because that's more convinient to use. stop() -/obj/item/hourglass/update_icon() +/obj/item/hourglass/update_appearance(updates = ALL) if(timing_id) icon_state = "hourglass_active" else @@ -54,7 +54,7 @@ countdown.stop() finish_time = null animate(src) - update_icon() + update_appearance(updates = ALL) /obj/item/hourglass/proc/finish() visible_message(span_notice("[src] stops.")) @@ -79,4 +79,4 @@ if(user.client && user.client.holder) toggle(user) -#undef HOURGLASS_STATES \ No newline at end of file +#undef HOURGLASS_STATES diff --git a/code/game/objects/items/implants/implantcase.dm b/code/game/objects/items/implants/implantcase.dm index 17db84ab385e..273ea3edef3e 100644 --- a/code/game/objects/items/implants/implantcase.dm +++ b/code/game/objects/items/implants/implantcase.dm @@ -14,7 +14,7 @@ var/imp_type -/obj/item/implantcase/update_icon() +/obj/item/implantcase/update_appearance(updates = ALL) if(imp) icon_state = "implantcase-[imp.implant_color]" reagents = imp.reagents @@ -45,8 +45,8 @@ I.imp.forceMove(src) imp = I.imp I.imp = null - update_icon() - I.update_icon() + update_appearance(updates = ALL) + I.update_appearance(updates = ALL) else if(imp) if(I.imp) @@ -54,8 +54,8 @@ imp.forceMove(I) I.imp = imp imp = null - update_icon() - I.update_icon() + update_appearance(updates = ALL) + I.update_appearance(updates = ALL) else return ..() @@ -64,7 +64,7 @@ . = ..() if(imp_type) imp = new imp_type(src) - update_icon() + update_appearance(updates = ALL) /obj/item/implantcase/tracking diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index fc0dd8ed1187..be04f4cdde01 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -24,7 +24,7 @@ /obj/machinery/implantchair/Initialize() . = ..() open_machine() - update_icon() + update_appearance(updates = ALL) /obj/machinery/implantchair/ui_state(mob/user) @@ -84,7 +84,7 @@ addtimer(CALLBACK(src,"set_ready"),injection_cooldown) else playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1) - update_icon() + update_appearance(updates = ALL) /obj/machinery/implantchair/proc/implant_action(mob/living/M) var/obj/item/I = new implant_type @@ -99,7 +99,7 @@ visible_message(span_warning("[M] has been implanted by [src].")) return TRUE -/obj/machinery/implantchair/update_icon() +/obj/machinery/implantchair/update_appearance(updates = ALL) icon_state = initial(icon_state) if(state_open) icon_state += "_open" @@ -120,7 +120,7 @@ /obj/machinery/implantchair/proc/set_ready() ready = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/implantchair/container_resist(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) diff --git a/code/game/objects/items/implants/implanter.dm b/code/game/objects/items/implants/implanter.dm index c7ed44cd5f67..3d82043cc834 100644 --- a/code/game/objects/items/implants/implanter.dm +++ b/code/game/objects/items/implants/implanter.dm @@ -15,7 +15,7 @@ var/imp_type = null -/obj/item/implanter/update_icon() +/obj/item/implanter/update_appearance(updates = ALL) if(imp) icon_state = "implanter1" else @@ -38,7 +38,7 @@ else M.visible_message("[user] has implanted [M].", span_notice("[user] implants you.")) imp = null - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] fails to implant [M].")) @@ -63,4 +63,4 @@ . = ..() if(imp_type) imp = new imp_type(src) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index a713a85584f3..9ac7f754e019 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -11,7 +11,7 @@ w_class = WEIGHT_CLASS_SMALL var/obj/item/implantcase/case = null -/obj/item/implantpad/update_icon() +/obj/item/implantpad/update_appearance(updates = ALL) icon_state = "implantpad-[!QDELETED(case)]" /obj/item/implantpad/examine(mob/user) @@ -27,7 +27,7 @@ /obj/item/implantpad/handle_atom_del(atom/A) if(A == case) case = null - update_icon() + update_appearance(updates = ALL) updateSelfDialog() . = ..() @@ -46,7 +46,7 @@ case = null updateSelfDialog() - update_icon() + update_appearance(updates = ALL) /obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user, params) if(istype(C, /obj/item/implantcase) && !case) @@ -54,7 +54,7 @@ return case = C updateSelfDialog() - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index d6560e1ad5d1..2b39f2d794db 100644 --- a/code/game/objects/items/inducer.dm +++ b/code/game/objects/items/inducer.dm @@ -22,8 +22,8 @@ var/totransfer = min(cell.charge,(powertransfer * coefficient)) var/transferred = target.give(totransfer) cell.use(transferred) - cell.update_icon() - target.update_icon() + cell.update_appearance(updates = ALL) + target.update_appearance(updates = ALL) /obj/item/inducer/get_cell() return cell @@ -66,12 +66,12 @@ if(!opened) to_chat(user, span_notice("You unscrew the battery compartment.")) opened = TRUE - update_icon() + update_appearance(updates = ALL) return else to_chat(user, span_notice("You close the battery compartment.")) opened = FALSE - update_icon() + update_appearance(updates = ALL) return if(istype(W, /obj/item/stock_parts/cell)) if(opened) @@ -80,7 +80,7 @@ return to_chat(user, span_notice("You insert [W] into [src].")) cell = W - update_icon() + update_appearance(updates = ALL) return else to_chat(user, span_notice("[src] already has \a [cell] installed!")) @@ -132,7 +132,7 @@ user.visible_message("Smoke rises off of [A]'s body!",span_notice("You smell something burning as [A] is charged by the [src]!")) do_sparks(1, FALSE, A) if(O) - O.update_icon() + O.update_appearance(updates = ALL) else break if(done_any) // Only show a message if we succeeded at least once @@ -154,7 +154,7 @@ induce(C, coefficient) do_sparks(1, FALSE, A) if(O) - O.update_icon() + O.update_appearance(updates = ALL) else break if(done_any) // Only show a message if we succeeded at least once @@ -179,10 +179,10 @@ /obj/item/inducer/attack_self(mob/user) if(opened && cell) user.visible_message("[user] removes [cell] from [src]!",span_notice("You remove [cell].")) - cell.update_icon() + cell.update_appearance(updates = ALL) user.put_in_hands(cell) cell = null - update_icon() + update_appearance(updates = ALL) /obj/item/inducer/examine(mob/living/M) @@ -194,7 +194,7 @@ if(opened) . += span_notice("Its battery compartment is open.") -/obj/item/inducer/update_icon() +/obj/item/inducer/update_appearance(updates = ALL) cut_overlays() if(opened) if(!cell) @@ -212,4 +212,4 @@ /obj/item/inducer/sci/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/laser_level.dm b/code/game/objects/items/laser_level.dm index 3d81c5f52536..2ece67dbeca3 100644 --- a/code/game/objects/items/laser_level.dm +++ b/code/game/objects/items/laser_level.dm @@ -15,7 +15,7 @@ /obj/item/laserlevel/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/laserlevel/attack_self(mob/user) lightlevel--; @@ -26,10 +26,10 @@ set_light(l_range = lightlevel / 2, l_power = (lightlevel / 4), l_color = "#00ff00") else set_light(0) - update_icon() + update_appearance(updates = ALL) update_overlay(user) -/obj/item/laserlevel/update_icon() +/obj/item/laserlevel/update_appearance(updates = ALL) cut_overlays() add_overlay("[initial(icon_state)][lightlevel]") return diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index c8b2cc81f41e..464a19d6e71f 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -1,59 +1,113 @@ -/obj/item/latexballon +#define INFLATED "inflated" +#define POPPED "popped" +#define DEFLATED "deflated" + +/obj/item/latexballoon name = "latex glove" desc = "Sterile and airtight." + icon_state = "latexballoon" icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" item_state = "lgloves" force = 0 throwforce = 0 w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 7 - var/state + var/state = DEFLATED var/datum/gas_mixture/air_contents = null -/obj/item/latexballon/proc/blow(obj/item/tank/tank, mob/user) - if (icon_state == "latexballon_bursted") +/obj/item/latexballoon/Initialize(mapload) + . = ..() +// AddElement(/datum/element/atmos_sensitive, mapload) +// AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) + +/obj/item/latexballoon/proc/set_state(state_to_set) + state = state_to_set + update_appearance(UPDATE_ICON | UPDATE_DESC) + +/obj/item/latexballoon/update_icon_state() + . = ..() + + switch(state) + if(INFLATED) + icon_state = "latexballoon_blow" + lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items_righthand.dmi' + item_state = "latexballoon" + if(POPPED) + icon_state = "latexballoon_bursted" + item_state = initial(item_state) + lefthand_file = initial(lefthand_file) + righthand_file = initial(righthand_file) + +/obj/item/latexballoon/update_desc() + . = ..() + switch(state) + if(INFLATED) + desc = "It's a blown up latex glove on a string." + if(POPPED) + desc = "The remains of a latex glove." + +/obj/item/latexballoon/proc/blow(obj/item/tank/tank, mob/user) + if(state == POPPED) return - icon_state = "latexballon_blow" - item_state = "latexballon" - user.update_inv_hands() - to_chat(user, span_notice("You blow up [src] with [tank].")) + air_contents = tank.remove_air_volume(3) -/obj/item/latexballon/proc/burst() - if (!air_contents || icon_state != "latexballon_blow") + if(isnull(air_contents)) + balloon_alert(user, "tank is empty!") return - playsound(src, 'sound/weapons/gunshot.ogg', 100, 1) - icon_state = "latexballon_bursted" - item_state = "lgloves" - if(isliving(loc)) - var/mob/living/user = src.loc - user.update_inv_hands() + + if(state == INFLATED) + burst() // too much air, pop it! + return + + playsound(src, 'sound/weapons/gunshot.ogg', 100, TRUE) + + balloon_alert(user, "you blow up the balloon!") // because it's a balloon obviously + + set_state(INFLATED) + +///obj/item/latexballoon/should_atmos_process(datum/gas_mixture/air, exposed_temperature) +// return (exposed_temperature > T0C+100) + +///obj/item/latexballoon/atmos_expose(datum/gas_mixture/air, exposed_temperature) +// burst() + +/obj/item/latexballoon/proc/burst() + if (!air_contents || state != INFLATED) + return + + set_state(POPPED) + playsound(src, 'sound/weapons/gunshot.ogg', 100, TRUE) loc.assume_air(air_contents) -/obj/item/latexballon/ex_act(severity, target) +/obj/item/latexballoon/ex_act(severity, target) burst() switch(severity) - if (1) + if (EXPLODE_DEVASTATE) qdel(src) - if (2) + if (EXPLODE_HEAVY) if (prob(50)) qdel(src) -/obj/item/latexballon/bullet_act(obj/item/projectile/P) - if(!P.nodamage) +/obj/item/latexballoon/bullet_act(obj/item/projectile/projectile) + if(projectile.damage > 0) burst() - return ..() -/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) - if(temperature > T0C+100) - burst() + return ..() -/obj/item/latexballon/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/tank)) - var/obj/item/tank/T = W - blow(T, user) +/obj/item/latexballoon/attackby(obj/item/item, mob/user, params) + if(istype(item, /obj/item/tank)) + var/obj/item/tank/air_tank = item + blow(air_tank, user) return - if (W.is_sharp() || W.is_hot()) + if(item.get_sharpness() || item.get_temperature()) burst() + return + + return ..() + +#undef INFLATED +#undef POPPED +#undef DEFLATED diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index d1cc8e0a52d9..e619656b4f05 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -71,9 +71,9 @@ var/stamp_count = rand(1, stamp_max) for(var/i in 1 to stamp_count) stamps += list("stamp_[rand(2, 6)]") - update_icon() + update_appearance(updates = ALL) -/obj/item/mail/update_icon() +/obj/item/mail/update_appearance(updates = ALL) . = ..() var/bonus_stamp_offset = 0 for(var/stamp in stamps) @@ -217,7 +217,7 @@ desc = "A certified post crate from CentCom." icon_state = "mail" -/obj/structure/closet/crate/mail/update_icon() +/obj/structure/closet/crate/mail/update_appearance(updates = ALL) . = ..() if(opened) icon_state = "[initial(icon_state)]open" @@ -255,7 +255,7 @@ else if(prob(MAIL_JUNK_CHANCE)) new_mail.junk_mail() - update_icon() + update_appearance(updates = ALL) return mail_count diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 078a5ea37e97..1ba8c2846cb1 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -190,7 +190,7 @@ if(active) icon_state = "swordrainbow" - user.update_inv_hands() + user.update_held_items() else to_chat(user, span_warning("It's already fabulous!")) else diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index f4cda7235bed..6747214abf11 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -702,16 +702,16 @@ held_sausage = target else to_chat(user, span_warning("[target] doesn't seem to want to get on [src]!")) - update_icon() + update_appearance(updates = ALL) /obj/item/melee/roastingstick/attack_hand(mob/user) ..() if (held_sausage) user.put_in_hands(held_sausage) held_sausage = null - update_icon() + update_appearance(updates = ALL) -/obj/item/melee/roastingstick/update_icon() +/obj/item/melee/roastingstick/update_appearance(updates = ALL) . = ..() cut_overlays() if (held_sausage) @@ -733,7 +733,7 @@ /obj/item/melee/roastingstick/handle_atom_del(atom/target) if (target == held_sausage) held_sausage = null - update_icon() + update_appearance(updates = ALL) /obj/item/melee/roastingstick/afterattack(atom/target, mob/user, proximity) . = ..() @@ -764,4 +764,4 @@ held_sausage.add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY) held_sausage.name = "[target.name]-roasted [held_sausage.name]" held_sausage.desc = "[held_sausage.desc] It has been cooked to perfection on \a [target]." - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index bcee869d5159..698f1c0c6d63 100644 --- a/code/game/objects/items/mop.dm +++ b/code/game/objects/items/mop.dm @@ -68,7 +68,7 @@ if(insertable) J.put_in_cart(src, user) J.mymop=src - J.update_icon() + J.update_appearance(updates = ALL) else to_chat(user, span_warning("You are unable to fit your [name] into the [J.name].")) return diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 5bae8781895e..2a0be73b2ced 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -67,7 +67,7 @@ to_chat(user, span_notice("You open [src]'s door.")) playsound(user, 'sound/effects/bin_open.ogg', 50, TRUE) open = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/pet_carrier/AltClick(mob/living/user) if(open || !user.canUseTopic(src, BE_CLOSE)) @@ -78,7 +78,7 @@ playsound(user, 'sound/machines/boltsdown.ogg', 30, TRUE) else playsound(user, 'sound/machines/boltsup.ogg', 30, TRUE) - update_icon() + update_appearance(updates = ALL) /obj/item/pet_carrier/attack(mob/living/target, mob/living/user) if(user.a_intent == INTENT_HARM) @@ -111,7 +111,7 @@ loc.visible_message(span_notice("[user] pushes open the door to [src]!"), \ span_warning("[user] pushes open the door of [src]!")) open = TRUE - update_icon() + update_appearance(updates = ALL) return else if(user.client) container_resist(user) @@ -128,7 +128,7 @@ to_chat(user, span_boldannounce("Bingo! The lock pops open!")) locked = FALSE playsound(src, 'sound/machines/boltsup.ogg', 30, TRUE) - update_icon() + update_appearance(updates = ALL) else loc.visible_message(span_warning("[src] starts rattling as something pushes against the door!"), null, null, null, user) to_chat(user, span_notice("You start pushing out of [src]... (This will take about 20 seconds.)")) @@ -138,10 +138,10 @@ to_chat(user, span_notice("You shove open [src]'s door against the lock's resistance and fall out!")) locked = FALSE open = TRUE - update_icon() + update_appearance(updates = ALL) remove_occupant(user) -/obj/item/pet_carrier/update_icon() +/obj/item/pet_carrier/update_appearance(updates = ALL) cut_overlay("unlocked") cut_overlay("locked") if(open) diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index f4783c79af57..b0e6b54bcee4 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -43,18 +43,18 @@ else target = null STOP_PROCESSING(SSfastprocess, src) - update_icon() + update_appearance(updates = ALL) /obj/item/pinpointer/process() if(!active) return PROCESS_KILL scan_for_target() - update_icon() + update_appearance(updates = ALL) /obj/item/pinpointer/proc/scan_for_target() return -/obj/item/pinpointer/update_icon() +/obj/item/pinpointer/update_appearance(updates = ALL) cut_overlays() if(!active) return diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 6f250f778db0..1d47c3626be3 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -236,7 +236,7 @@ vowbroken = TRUE mood_message = pick(vowbroken_message) - update_desc() + update_appearance(UPDATE_DESC) /obj/item/toy/plush/proc/scorned_by(obj/item/toy/plush/Outmoded) scorned_by.Add(Outmoded) @@ -250,7 +250,7 @@ lover.cheer_up() mood_message = pick(love_message) - update_desc() + update_appearance(UPDATE_DESC) if(partner) //who? partner = null //more like who cares @@ -267,7 +267,7 @@ partner.heal_memories() mood_message = pick(partner_message) - update_desc() + update_appearance(UPDATE_DESC) /obj/item/toy/plush/proc/plop(obj/item/toy/plush/Daddy) if(partner != Daddy) @@ -292,12 +292,12 @@ young = TRUE name = "[Mama] Jr" //Icelandic naming convention pending normal_desc = "[src] is a little baby of [maternal_parent] and [paternal_parent]!" //original desc won't be used so the child can have moods - update_desc() + update_appearance(UPDATE_DESC) Mama.mood_message = pick(Mama.parent_message) - Mama.update_desc() + Mama.update_appearance(UPDATE_DESC) Dada.mood_message = pick(Dada.parent_message) - Dada.update_desc() + Dada.update_appearance(UPDATE_DESC) /obj/item/toy/plush/proc/bad_news(obj/item/toy/plush/Deceased) //cotton to cotton, sawdust to sawdust var/is_that_letter_for_me = FALSE @@ -336,7 +336,7 @@ if(is_that_letter_for_me) heartbroken = TRUE mood_message = pick(heartbroken_message) - update_desc() + update_appearance(UPDATE_DESC) /obj/item/toy/plush/proc/cheer_up() //it'll be all right if(!heartbroken) @@ -348,7 +348,7 @@ if(mood_message in heartbroken_message) mood_message = null - update_desc() + update_appearance(UPDATE_DESC) /obj/item/toy/plush/proc/heal_memories() //time fixes all wounds if(!vowbroken) @@ -357,7 +357,8 @@ mood_message = null cheer_up() -/obj/item/toy/plush/proc/update_desc() +/obj/item/toy/plush/update_desc() + . = ..() desc = normal_desc if(mood_message) desc += mood_message diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index cfb2fd05229a..3cb3acd9718c 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -225,7 +225,7 @@ loadedWeightClass -= I.w_class else if (A == tank) tank = null - update_icon() + update_appearance(updates = ALL) /obj/item/pneumatic_cannon/ghetto //Obtainable by improvised methods; more gas per use, less capacity name = "improvised pneumatic cannon" @@ -250,9 +250,9 @@ return to_chat(user, span_notice("You hook \the [thetank] up to \the [src].")) tank = thetank - update_icon() + update_appearance(updates = ALL) -/obj/item/pneumatic_cannon/update_icon() +/obj/item/pneumatic_cannon/update_appearance(updates = ALL) cut_overlays() if(!tank) return diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 827acd1b39c7..bc218c73f0e9 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -179,7 +179,7 @@ /obj/item/borg/charger/Initialize() . = ..() -/obj/item/borg/charger/update_icon() +/obj/item/borg/charger/update_appearance(updates = ALL) ..() icon_state = "charger_[mode]" @@ -189,7 +189,7 @@ else mode = "draw" to_chat(user, span_notice("You toggle [src] to \"[mode]\" mode.")) - update_icon() + update_appearance(updates = ALL) /obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag) . = ..() @@ -252,7 +252,7 @@ break if(!user.cell.give(draw)) break - target.update_icon() + target.update_appearance(updates = ALL) to_chat(user, span_notice("You stop charging yourself.")) @@ -290,7 +290,7 @@ break if(!cell.give(draw)) break - target.update_icon() + target.update_appearance(updates = ALL) to_chat(user, span_notice("You stop charging [target].")) @@ -607,10 +607,10 @@ to_chat(user, span_warning("[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!")) else deactivate_field() - update_icon() + update_appearance(updates = ALL) to_chat(user, span_boldnotice("You [active? "activate":"deactivate"] [src].")) -/obj/item/borg/projectile_dampen/update_icon() +/obj/item/borg/projectile_dampen/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][active]" /obj/item/borg/projectile_dampen/proc/activate_field() diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index c7026e0bb6e1..7563d2dbaf30 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -36,7 +36,7 @@ /obj/item/robot_suit/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/robot_suit/prebuilt/Initialize() . = ..() @@ -51,7 +51,7 @@ chest.wired = TRUE chest.cell = new /obj/item/stock_parts/cell/high/plus(chest) -/obj/item/robot_suit/update_icon() +/obj/item/robot_suit/update_appearance(updates = ALL) cut_overlays() if(l_arm) add_overlay("[l_arm.icon_state]+o") @@ -108,7 +108,7 @@ to_chat(user, span_notice("You disassemble the cyborg shell.")) else to_chat(user, span_notice("There is nothing to remove from the endoskeleton.")) - update_icon() + update_appearance(updates = ALL) /obj/item/robot_suit/proc/put_in_hand_or_drop(mob/living/user, obj/item/I) //normal put_in_hands() drops the item ontop of the player, this drops it at the suit's loc if(!user.put_in_hands(I)) @@ -172,7 +172,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() l_leg = W - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/bodypart/r_leg/robot)) var/obj/item/bodypart/r_leg/robot/L = W @@ -186,7 +186,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() r_leg = W - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/bodypart/l_arm/robot)) var/obj/item/bodypart/l_leg/robot/L = W @@ -200,7 +200,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() l_arm = W - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/bodypart/r_arm/robot)) if(r_arm) @@ -210,7 +210,7 @@ W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb W.cut_overlays() r_arm = W - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/bodypart/chest/robot)) var/obj/item/bodypart/chest/robot/CH = W @@ -222,7 +222,7 @@ CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb CH.cut_overlays() chest = CH - update_icon() + update_appearance(updates = ALL) else if(!CH.wired) to_chat(user, span_warning("You need to attach wires to it first!")) else @@ -242,7 +242,7 @@ HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb HD.cut_overlays() head = HD - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You need to attach a flash to it first!")) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 2d9f490bc109..6f1a645961a8 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -452,9 +452,9 @@ else to_chat(cyborg, span_notice("You deactivate the self-repair module.")) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) -/obj/item/borg/upgrade/selfrepair/update_icon() +/obj/item/borg/upgrade/selfrepair/update_appearance(updates = ALL) if(cyborg) icon_state = "selfrepair_[on ? "on" : "off"]" for(var/X in actions) @@ -466,7 +466,7 @@ /obj/item/borg/upgrade/selfrepair/proc/deactivate_sr() STOP_PROCESSING(SSobj, src) on = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/borg/upgrade/selfrepair/process() if(world.time < next_repair) diff --git a/code/game/objects/items/sharpener.dm b/code/game/objects/items/sharpener.dm index f01ce181d0df..90814f643ed7 100644 --- a/code/game/objects/items/sharpener.dm +++ b/code/game/objects/items/sharpener.dm @@ -48,7 +48,7 @@ name = "worn out [name]" desc = "[desc] At least, it used to." used = 1 - update_icon() + update_appearance(updates = ALL) /obj/item/sharpener/super name = "super whetstone" diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 1c4c96519950..5e6dd458306e 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -149,23 +149,24 @@ item_state = "flashshield" var/obj/item/assembly/flash/handheld/embedded_flash -/obj/item/shield/riot/flash/Initialize() +/obj/item/shield/riot/flash/Initialize(mapload) . = ..() embedded_flash = new(src) + update_appearance(UPDATE_ICON) /obj/item/shield/riot/flash/attack(mob/living/M, mob/user) . = embedded_flash.attack(M, user) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/shield/riot/flash/attack_self(mob/living/carbon/user) . = embedded_flash.attack_self(user) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/shield/riot/flash/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) . = ..() if (. && !embedded_flash.burnt_out) embedded_flash.activate() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/shield/riot/flash/attackby(obj/item/W, mob/user) @@ -183,22 +184,23 @@ qdel(embedded_flash) embedded_flash = flash flash.forceMove(src) - update_icon() + update_appearance(updates = ALL) return ..() /obj/item/shield/riot/flash/emp_act(severity) . = ..() embedded_flash.emp_act(severity) - update_icon() + update_appearance(updates = ALL) -/obj/item/shield/riot/flash/update_icon() - if(!embedded_flash || embedded_flash.burnt_out) +/obj/item/shield/riot/flash/update_icon_state() + if(QDELETED(embedded_flash) || embedded_flash.burnt_out) icon_state = "riot" item_state = "riot" else icon_state = "flashshield" item_state = "flashshield" + return ..() /obj/item/shield/riot/flash/examine(mob/user) . = ..() @@ -217,7 +219,7 @@ force = 3 throwforce = 3 throw_speed = 3 - var/base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted + base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted var/on_force = 10 var/on_throwforce = 8 var/on_throw_speed = 2 diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index bff05696d0e1..6894ef22c9ed 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -30,7 +30,7 @@ charged++ return -/obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/singularityhammer/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. icon_state = "singhammer[wielded]" return @@ -119,6 +119,6 @@ else shock(hit_atom) -/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/mjollnir/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" return diff --git a/code/game/objects/items/stacks/cash.dm b/code/game/objects/items/stacks/cash.dm index 5e02437e04b6..be685a3c8789 100644 --- a/code/game/objects/items/stacks/cash.dm +++ b/code/game/objects/items/stacks/cash.dm @@ -16,9 +16,10 @@ /obj/item/stack/spacecash/Initialize() . = ..() - update_desc() + update_appearance(UPDATE_DESC) -/obj/item/stack/spacecash/proc/update_desc() +/obj/item/stack/spacecash/update_desc() + . = ..() var/total_worth = get_item_credit_value() desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]" @@ -27,11 +28,11 @@ /obj/item/stack/spacecash/merge(obj/item/stack/S) . = ..() - update_desc() + update_appearance(UPDATE_DESC) /obj/item/stack/spacecash/use(used, transfer = FALSE) . = ..() - update_desc() + update_appearance(UPDATE_DESC) /obj/item/stack/spacecash/c1 icon_state = "spacecash" diff --git a/code/game/objects/items/stacks/license_plates.dm b/code/game/objects/items/stacks/license_plates.dm index 03970a9af37f..9c7f393ed3ff 100644 --- a/code/game/objects/items/stacks/license_plates.dm +++ b/code/game/objects/items/stacks/license_plates.dm @@ -23,7 +23,7 @@ merge_type = /obj/item/stack/license_plates/filled ///Override to allow for variations -/obj/item/stack/license_plates/filled/update_icon() +/obj/item/stack/license_plates/filled/update_appearance(updates = ALL) . = ..() if(novariants) return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 1a8be53394ba..413fe043b6dc 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -354,9 +354,9 @@ . = ..() if(amount == max_amount) //only seal full mesh packs is_open = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/stack/medical/mesh/update_icon() +/obj/item/stack/medical/mesh/update_appearance(updates = ALL) if(is_open) return ..() icon_state = "regen_mesh_closed" @@ -393,7 +393,7 @@ if(!is_open) is_open = TRUE to_chat(user, span_notice("You open the sterile mesh package.")) - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/items/poster_ripped.ogg', 20, TRUE) return . = ..() @@ -411,7 +411,7 @@ flesh_regeneration = 3.5 grind_results = list(/datum/reagent/consumable/aloejuice = 1) -/obj/item/stack/medical/mesh/advanced/update_icon() +/obj/item/stack/medical/mesh/advanced/update_appearance(updates = ALL) if(is_open) return ..() icon_state = "aloe_mesh_closed" diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index bd9aad727da5..07cf41671c5f 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -42,9 +42,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ . = ..() recipes = GLOB.rod_recipes - update_icon() + update_appearance(updates = ALL) -/obj/item/stack/rods/update_icon() +/obj/item/stack/rods/update_appearance(updates = ALL) var/amount = get_amount() if((amount <= 5) && (amount > 0)) icon_state = "rods-[amount]" @@ -80,7 +80,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ A.initialize_custom_food(src, S, user) else A.initialize_custom_food(src, S, user, TRUE) - update_icon() + update_appearance(updates = ALL) else return ..() @@ -89,8 +89,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ is_cyborg = 1 cost = 250 -/obj/item/stack/rods/cyborg/update_icon() - return +/obj/item/stack/rods/cyborg/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/stack/rods/ten amount = 10 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 5905792f3906..b5402a62a061 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -64,7 +64,7 @@ if(S.merge_type == merge_type) merge(S) update_weight() - update_icon() + update_appearance(updates = ALL) /obj/item/stack/proc/update_weight() if(amount <= (max_amount * (1/3))) @@ -74,7 +74,7 @@ else w_class = full_w_class -/obj/item/stack/update_icon() +/obj/item/stack/update_appearance(updates = ALL) if(novariants) return ..() if(amount <= (max_amount * (1/3))) @@ -312,7 +312,7 @@ amount -= used if(check) zero_amount() - update_icon() + update_appearance(updates = ALL) update_weight() return TRUE @@ -343,7 +343,7 @@ source.add_charge(amount * cost) else src.amount += amount - update_icon() + update_appearance(updates = ALL) update_weight() /obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm index d08d877ea8e6..49644ccecc30 100644 --- a/code/game/objects/items/stacks/tickets.dm +++ b/code/game/objects/items/stacks/tickets.dm @@ -10,9 +10,9 @@ /obj/item/stack/arcadeticket/Initialize(mapload, new_amount, merge = TRUE) . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/stack/arcadeticket/update_icon() +/obj/item/stack/arcadeticket/update_appearance(updates = ALL) var/amount = get_amount() if((amount >= 12) && (amount > 0)) icon_state = "arcade-ticket_4" diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index abfcec34c960..50ec14aac7de 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -55,7 +55,7 @@ playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1) return (TOXLOSS) -/obj/item/storage/bag/trash/update_icon() +/obj/item/storage/bag/trash/update_appearance(updates = ALL) //yogs start if(icon_state == "[initial(icon_state)]_broken") return @@ -75,7 +75,7 @@ if(insertable) J.put_in_cart(src, user) J.mybag=src - J.update_icon() + J.update_appearance(updates = ALL) else to_chat(user, span_warning("You are unable to fit your [name] into the [J.name].")) return @@ -382,20 +382,20 @@ if(ishuman(M) || ismonkey(M)) if(prob(10)) M.Paralyze(40) - update_icon() + update_appearance(updates = ALL) -/obj/item/storage/bag/tray/update_icon() +/obj/item/storage/bag/tray/update_appearance(updates = ALL) cut_overlays() for(var/obj/item/I in contents) add_overlay(new /mutable_appearance(I)) /obj/item/storage/bag/tray/Entered() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/bag/tray/Exited() . = ..() - update_icon() + update_appearance(updates = ALL) /* * Chemistry bag diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 2e20fdc88034..876f44731310 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -17,7 +17,7 @@ user.visible_message(span_suicide("[user] begins belting [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")) return BRUTELOSS -/obj/item/storage/belt/update_icon() +/obj/item/storage/belt/update_appearance(updates = ALL) cut_overlays() if(content_overlays) for(var/obj/item/I in contents) @@ -27,7 +27,7 @@ /obj/item/storage/belt/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/belt/utility name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing. @@ -356,7 +356,7 @@ SSwardrobe.provide_type(/obj/item/assembly/flash/handheld, src) SSwardrobe.provide_type(/obj/item/melee/baton/loaded, src) SSwardrobe.provide_type(/obj/item/barrier_taperoll/police, src) - update_icon() + update_appearance(updates = ALL) /obj/item/storage/belt/security/chief name = "\improper Head of Security's toolbelt" @@ -378,7 +378,7 @@ SSwardrobe.provide_type(/obj/item/melee/baton/loaded, src) SSwardrobe.provide_type(/obj/item/barrier_taperoll/police, src) SSwardrobe.provide_type(/obj/item/shield/riot/tele, src) - update_icon() + update_appearance(updates = ALL) /obj/item/storage/belt/security/webbing name = "security webbing" @@ -819,7 +819,7 @@ content_overlays = TRUE slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK -/obj/item/storage/belt/quiver/update_icon() +/obj/item/storage/belt/quiver/update_appearance(updates = ALL) ..() if(content_overlays && ismob(loc)) var/mob/M = loc @@ -912,7 +912,7 @@ if(bow.chambered == arrow) bow.chambered = null bow.update_slowdown() - bow.update_icon() + bow.update_appearance(updates = ALL) if(!SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, arrow, null, TRUE, TRUE)) return @@ -1186,11 +1186,11 @@ var/obj/item/I = contents[1] user.visible_message("[user] takes [I] out of [src].", span_notice("You take [I] out of [src].")) user.put_in_hands(I) - update_icon() + update_appearance(updates = ALL) else to_chat(user, "[src] is empty.") -/obj/item/storage/belt/sabre/update_icon() +/obj/item/storage/belt/sabre/update_appearance(updates = ALL) icon_state = "sheath" item_state = "sheath" if(contents.len) @@ -1203,7 +1203,7 @@ /obj/item/storage/belt/sabre/PopulateContents() new /obj/item/melee/sabre(src) - update_icon() + update_appearance(updates = ALL) /obj/item/storage/belt/multi name = "multi-belt" diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index eb1fb722d97b..760abf68baf0 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -36,7 +36,7 @@ /obj/item/storage/box/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/box/suicide_act(mob/living/carbon/user) var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD) @@ -49,7 +49,7 @@ user.visible_message(span_suicide("[user] attempts to put [user.p_their()] head into \the [src], but realizes [user.p_their()] has no head!")) return SHAME -/obj/item/storage/box/update_icon() +/obj/item/storage/box/update_appearance(updates = ALL) . = ..() if(illustration) cut_overlays() @@ -995,7 +995,7 @@ foldable = null var/design = NODESIGN -/obj/item/storage/box/papersack/update_icon() +/obj/item/storage/box/papersack/update_appearance(updates = ALL) if(contents.len == 0) icon_state = "[item_state]" else icon_state = "[item_state]_closed" diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 6f89037da156..5b8330ba9a55 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -29,7 +29,7 @@ for(var/i = 1 to STR.max_items) new spawn_type(src) -/obj/item/storage/box/fancy/update_icon() +/obj/item/storage/box/fancy/update_appearance(updates = ALL) if(fancy_open) icon_state = "[icon_type]box[contents.len]" else @@ -45,18 +45,18 @@ /obj/item/storage/box/fancy/attack_self(mob/user) fancy_open = !fancy_open - update_icon() + update_appearance(updates = ALL) . = ..() /obj/item/storage/box/fancy/Exited() . = ..() fancy_open = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/storage/box/fancy/Entered() . = ..() fancy_open = TRUE - update_icon() + update_appearance(updates = ALL) /* * Donut Box @@ -130,7 +130,7 @@ /obj/item/storage/box/fancy/candle_box/attack_self(mob_user) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/box/fancy/candle_box/ComponentInitialize() . = ..() @@ -176,7 +176,7 @@ else to_chat(user, span_notice("There are no [icon_type]s left in the pack.")) -/obj/item/storage/box/fancy/cigarettes/update_icon() +/obj/item/storage/box/fancy/cigarettes/update_appearance(updates = ALL) if(fancy_open || !contents.len) cut_overlays() if(!contents.len) @@ -304,7 +304,7 @@ STR.max_items = 10 STR.set_holdable(list(/obj/item/rollingpaper)) -/obj/item/storage/box/fancy/rollingpapers/update_icon() +/obj/item/storage/box/fancy/rollingpapers/update_appearance(updates = ALL) cut_overlays() if(!contents.len) add_overlay("[icon_state]_empty") @@ -328,7 +328,7 @@ STR.max_items = 5 STR.set_holdable(list(/obj/item/clothing/mask/cigarette/cigar)) -/obj/item/storage/box/fancy/cigarettes/cigars/update_icon() +/obj/item/storage/box/fancy/cigarettes/cigars/update_appearance(updates = ALL) cut_overlays() if(fancy_open) icon_state = "[initial(icon_state)]_open" diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index b059fee6e7b4..ece68cef3307 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -63,12 +63,12 @@ /obj/item/storage/lockbox/Entered() . = ..() open = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/storage/lockbox/Exited() . = ..() open = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/storage/lockbox/AltClick(mob/user) ..() @@ -138,7 +138,7 @@ if(user.canUseTopic(src, BE_CLOSE)) if(!SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)) open = (open ? FALSE : TRUE) - update_icon() + update_appearance(updates = ALL) ..() /obj/item/storage/lockbox/medal/PopulateContents() @@ -154,7 +154,7 @@ for(var/i in 1 to 3) new /obj/item/clothing/accessory/medal/conduct(src) -/obj/item/storage/lockbox/medal/update_icon() +/obj/item/storage/lockbox/medal/update_appearance(updates = ALL) cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) @@ -242,7 +242,7 @@ icon_closed = "vialbox" icon_broken = "vialbox" -/obj/item/storage/lockbox/vialbox/update_icon() +/obj/item/storage/lockbox/vialbox/update_appearance(updates = ALL) cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) var/slot = 1 @@ -270,7 +270,7 @@ /obj/item/storage/lockbox/vialbox/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/lockbox/vialbox/ComponentInitialize() . = ..() @@ -283,11 +283,11 @@ /obj/item/storage/lockbox/vialbox/attackby(obj/item/W, mob/user, params) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/lockbox/vialbox/AltClick(mob/user) ..() - update_icon() + update_appearance(updates = ALL) /obj/item/storage/lockbox/vialbox/full/PopulateContents() for(var/i in 1 to 6) diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index b76374179d67..adc1dd90e468 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -28,9 +28,9 @@ latches = "double_latch" if(prob(1)) latches = "triple_latch" - update_icon() + update_appearance(updates = ALL) -/obj/item/storage/toolbox/update_icon() +/obj/item/storage/toolbox/update_appearance(updates = ALL) ..() cut_overlays() if(has_latches) @@ -309,7 +309,7 @@ if(/obj/item/storage/toolbox/syndicate) B.toolbox_color = "s" user.put_in_hands(B) - B.update_icon() + B.update_appearance(updates = ALL) to_chat(user, span_notice("You add the tiles into the empty [name]. They protrude from the top.")) qdel(src) else diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 9b2a65ec972a..740e5842265f 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -55,13 +55,13 @@ var/mob/living/carbon/human/H = loc if(H.wear_id == src) H.sec_hud_set_ID() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/wallet/Entered(atom/movable/AM) . = ..() refreshID() -/obj/item/storage/wallet/update_icon() +/obj/item/storage/wallet/update_appearance(updates = ALL) var/new_state = "wallet" if(front_id) new_state = "wallet_[front_id.icon_state]" @@ -97,4 +97,4 @@ /obj/item/storage/wallet/random/PopulateContents() new /obj/item/holochip(src, rand(5,30)) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index f1c2b598bf93..0fd0def15e2d 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -56,7 +56,7 @@ else cell = new preload_cell_type(src) RegisterSignal(src, COMSIG_MOVABLE_PRE_DROPTHROW, PROC_REF(throwbaton)) - update_icon() + update_appearance(updates = ALL) /obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) if(..()) @@ -77,7 +77,7 @@ status = FALSE visible_message(span_warning("The safety strap on [src] is pulled as it is dropped, triggering its emergency shutoff!")) addtimer(VARSET_CALLBACK(src, dropcheck, FALSE), 8 SECONDS) - update_icon() + update_appearance(updates = ALL) else thrown = FALSE @@ -97,12 +97,12 @@ if(status && cell.charge < hitcost) //we're below minimum, turn off status = FALSE - update_icon() + update_appearance(updates = ALL) playsound(loc, "sparks", 75, 1, -1) STOP_PROCESSING(SSobj, src) // no more charge? stop checking for discharge -/obj/item/melee/baton/update_icon() +/obj/item/melee/baton/update_appearance(updates = ALL) if(status) icon_state = "[initial(icon_state)]_active" else if(!cell) @@ -137,16 +137,16 @@ return cell = W to_chat(user, span_notice("You install a cell in [src].")) - update_icon() + update_appearance(updates = ALL) else if(W.tool_behaviour == TOOL_SCREWDRIVER) if(cell) - cell.update_icon() + cell.update_appearance(updates = ALL) cell.forceMove(get_turf(src)) cell = null to_chat(user, span_notice("You remove the cell from [src].")) status = FALSE STOP_PROCESSING(SSobj, src) // no cell, no charge; stop processing for on because it cant be on - update_icon() + update_appearance(updates = ALL) else return ..() @@ -169,7 +169,7 @@ to_chat(user, span_warning("[src] does not have a power source!")) else to_chat(user, span_warning("[src] is out of charge.")) - update_icon() + update_appearance(updates = ALL) add_fingerprint(user) /obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user) diff --git a/code/game/objects/items/supermatter_delaminator.dm b/code/game/objects/items/supermatter_delaminator.dm index 7850b140ba4a..8c67b5f823d1 100644 --- a/code/game/objects/items/supermatter_delaminator.dm +++ b/code/game/objects/items/supermatter_delaminator.dm @@ -39,7 +39,7 @@ return FALSE forceMove(tongs) tongs.shard = src - tongs.update_icon() + tongs.update_appearance(updates = ALL) to_chat(user, span_notice("You carefully pick up [src] with [tongs].")) else if(istype(W, /obj/item/antinoblium_container/)) // we don't want it to dust return @@ -84,8 +84,8 @@ T.shard.forceMove(src) shard = T.shard T.shard = null - T.update_icon() - update_icon() + T.update_appearance(updates = ALL) + update_appearance(updates = ALL) to_chat(user, span_warning("Container is resealing...")) addtimer(CALLBACK(src, PROC_REF(seal)), 50) return TRUE @@ -96,8 +96,8 @@ shard.forceMove(T) T.shard = shard shard = null - T.update_icon() - update_icon() + T.update_appearance(updates = ALL) + update_appearance(updates = ALL) visible_message(span_warning("[user] gingerly takes out the antinoblium shard with the tongs...")) return TRUE @@ -107,14 +107,14 @@ STOP_PROCESSING(SSobj, shard) playsound(src, 'sound/items/deconstruct.ogg', 60, 1) sealed = TRUE - update_icon() + update_appearance(updates = ALL) say("Hermetic locks re-engaged; [shard] is safely recontained.") /obj/item/antinoblium_container/proc/unseal() if(!sealed) return sealed = FALSE - update_icon() + update_appearance(updates = ALL) say("Hermetic locks disengaged; [shard] is available for use.") /obj/item/antinoblium_container/attackby(obj/item/hemostat/antinoblium/tongs, mob/user) @@ -138,7 +138,7 @@ seal() to_chat(user, span_warning("[user] seals the [src].")) -/obj/item/antinoblium_container/update_icon() +/obj/item/antinoblium_container/update_appearance(updates = ALL) if(sealed) icon_state = "antinoblium_container_sealed" else if (shard) @@ -160,7 +160,7 @@ QDEL_NULL(shard) return ..() -/obj/item/hemostat/antinoblium/update_icon() +/obj/item/hemostat/antinoblium/update_appearance(updates = ALL) if(shard) icon_state = "antinoblium_tongs_loaded" else @@ -178,7 +178,7 @@ shard.forceMove(loc) visible_message(span_notice("\The [shard] falls out of \the [src] as it hits the ground.")) shard = null - update_icon() + update_appearance(updates = ALL) ..() /obj/item/hemostat/antinoblium/proc/Consume(atom/movable/AM, mob/user) @@ -203,7 +203,7 @@ empulse(src, 5, 10) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) QDEL_NULL(shard) - update_icon() + update_appearance(updates = ALL) /obj/item/supermatter_corruptor name = "supermatter data corruptor bug" diff --git a/code/game/objects/items/syndicateReverseCard.dm b/code/game/objects/items/syndicateReverseCard.dm index 165642ef518b..788255a1be2b 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -14,7 +14,7 @@ name = "[cardColor] Reverse" icon_state = "sc_[cardColor] Reverse_uno" -/obj/item/syndicateReverseCard/update_icon() +/obj/item/syndicateReverseCard/update_appearance(updates = ALL) ..() if (used) cut_overlays() @@ -45,7 +45,7 @@ user.put_in_hands(target_gun) firer.put_in_hands(src) used = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/syndicateReverseCard/examine(mob/user) . = ..() diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index 537af0d89931..6b00433f962d 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -54,13 +54,13 @@ /obj/item/tank/jetpack/proc/turn_on(mob/user) on = TRUE - update_icon() + update_appearance(updates = ALL) ion_trail.start() RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(move_react)) if(full_speed) user.add_movespeed_modifier(MOVESPEED_ID_JETPACK, priority=100, multiplicative_slowdown=jetspeed, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK) -/obj/item/tank/jetpack/update_icon() +/obj/item/tank/jetpack/update_appearance(updates = ALL) icon_state = initial(icon_state) if(!classic && on) //does the jetpack have its own on sprite? icon_state = "[initial(icon_state)]-on" @@ -72,7 +72,7 @@ /obj/item/tank/jetpack/proc/turn_off(mob/user) on = FALSE stabilizers = FALSE - update_icon() + update_appearance(updates = ALL) ion_trail.stop() UnregisterSignal(user, COMSIG_MOVABLE_MOVED) user.remove_movespeed_modifier(MOVESPEED_ID_JETPACK) diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index 46596036d1e5..4dfde41b56f9 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -104,7 +104,7 @@ return src.master = F F.ptank = src - F.update_icon() + F.update_appearance(updates = ALL) else return ..() diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index bff47bf38e48..1b4c3e8240df 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -138,7 +138,7 @@ return FALSE forceMove(tongs) tongs.sliver = src - tongs.update_icon() + tongs.update_appearance(updates = ALL) to_chat(user, span_notice("You carefully pick up [src] with [tongs].")) else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust return @@ -223,7 +223,7 @@ QDEL_NULL(sliver) return ..() -/obj/item/hemostat/supermatter/update_icon() +/obj/item/hemostat/supermatter/update_appearance(updates = ALL) if(sliver) icon_state = "supermatter_tongs_loaded" else @@ -241,7 +241,7 @@ sliver.forceMove(loc) visible_message(span_notice("\The [sliver] falls out of \the [src] as it hits the ground.")) sliver = null - update_icon() + update_appearance(updates = ALL) ..() /obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user) @@ -263,4 +263,4 @@ radiation_pulse(src, 500, 2) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) QDEL_NULL(sliver) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index c7cf0c171ab7..90e896e5ac70 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -44,11 +44,11 @@ icon_state = "screwdriver" var/our_color = pick(screwdriver_colors) add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) if(prob(75)) pixel_y = rand(0, 16) -/obj/item/screwdriver/update_icon() +/obj/item/screwdriver/update_appearance(updates = ALL) if(!random_color) //icon override return cut_overlays() diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index a372cd1a3b72..2191fbef8f96 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -46,7 +46,7 @@ . = ..() create_reagents(max_fuel) reagents.add_reagent(/datum/reagent/fuel, max_fuel) - update_icon() + update_appearance(updates = ALL) /obj/item/weldingtool/proc/update_torch() @@ -57,7 +57,7 @@ item_state = "[initial(item_state)]" -/obj/item/weldingtool/update_icon() +/obj/item/weldingtool/update_appearance(updates = ALL) cut_overlays() if(change_icons) var/ratio = get_fuel() / max_fuel @@ -72,7 +72,7 @@ if(0) force = 3 damtype = "brute" - update_icon() + update_appearance(updates = ALL) if(!can_off_process) STOP_PROCESSING(SSobj, src) return @@ -83,7 +83,7 @@ burned_fuel_for += delta_time if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) use(1) - update_icon() + update_appearance(updates = ALL) //This is to start fires. process() is only called if the welder is on. open_flame() @@ -143,7 +143,7 @@ if(!status && O.is_refillable()) reagents.trans_to(O, reagents.total_volume, transfered_by = user) to_chat(user, span_notice("You empty [src]'s fuel tank into [O].")) - update_icon() + update_appearance(updates = ALL) if(isOn()) use(1) var/turf/location = get_turf(user) @@ -164,7 +164,7 @@ explode() switched_on(user) - update_icon() + update_appearance(updates = ALL) /obj/item/weldingtool/use_tool(atom/target, mob/living/user, delay, amount, volume, datum/callback/extra_checks, robo_check) var/mutable_appearance/sparks = mutable_appearance('icons/effects/welding_effect.dmi', "welding_sparks", GASFIRE_LAYER, src, ABOVE_LIGHTING_PLANE) @@ -204,11 +204,11 @@ if(get_fuel() <= 0 && welding) set_light_on(FALSE) switched_on(user) - update_icon() + update_appearance(updates = ALL) //mob icon update if(ismob(loc)) var/mob/M = loc - M.update_inv_hands(0) + M.update_held_items(0) return 0 return 1 @@ -226,7 +226,7 @@ force = 15 damtype = BURN hitsound = 'sound/items/welder.ogg' - update_icon() + update_appearance(updates = ALL) START_PROCESSING(SSobj, src) else to_chat(user, span_warning("You need more fuel!")) @@ -243,7 +243,7 @@ force = 3 damtype = "brute" hitsound = "swing_hit" - update_icon() + update_appearance(updates = ALL) /obj/item/weldingtool/examine(mob/user) diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 14c16e3935ff..841f80fb70f8 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -40,9 +40,9 @@ icon_state = "cutters" var/our_color = pick(wirecutter_colors) add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) -/obj/item/wirecutters/update_icon() +/obj/item/wirecutters/update_appearance(updates = ALL) if(!random_color) //icon override return cut_overlays() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 8ddaa5a60e7a..2724a2a9cc9b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -66,7 +66,7 @@ A.reagents.trans_to(src, 10, transfered_by = user) to_chat(user, span_notice("You fill the balloon with the contents of [A].")) desc = "A translucent balloon with some form of liquid sloshing around in it." - update_icon() + update_appearance(updates = ALL) /obj/item/toy/balloon/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) @@ -79,7 +79,7 @@ desc = "A translucent balloon with some form of liquid sloshing around in it." to_chat(user, span_notice("You fill the balloon with the contents of [I].")) I.reagents.trans_to(src, 10, transfered_by = user) - update_icon() + update_appearance(updates = ALL) else if(I.is_sharp()) balloon_burst() else @@ -103,7 +103,7 @@ icon_state = "burst" qdel(src) -/obj/item/toy/balloon/update_icon() +/obj/item/toy/balloon/update_appearance(updates = ALL) if(src.reagents.total_volume >= 1) icon_state = "waterballoon" item_state = "balloon" @@ -206,7 +206,7 @@ to_chat(user, span_notice("You reload [7 - src.bullets] cap\s.")) A.amount_left -= 7 - src.bullets src.bullets = 7 - A.update_icon() + A.update_appearance(updates = ALL) return 1 else return ..() @@ -238,7 +238,7 @@ materials = list(/datum/material/iron=10, /datum/material/glass=10) var/amount_left = 7 -/obj/item/toy/ammo/gun/update_icon() +/obj/item/toy/ammo/gun/update_appearance(updates = ALL) src.icon_state = text("357OLD-[]", src.amount_left) /obj/item/toy/ammo/gun/examine(mob/user) @@ -300,7 +300,7 @@ if(active) icon_state = "swordrainbow" - user.update_inv_hands() + user.update_held_items() else to_chat(user, span_warning("It's already fabulous!")) else @@ -405,9 +405,9 @@ name = "toy pirate sledgehammer" desc += " This one looks different from the ones you see on commercials..." icon_state = "vxtvul_hammer_pirate0-0" - update_icon() + update_appearance(updates = ALL) -/obj/item/twohanded/vxtvulhammer/toy/update_icon() +/obj/item/twohanded/vxtvulhammer/toy/update_appearance(updates = ALL) if(!pirated) icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" else @@ -776,7 +776,7 @@ C.deckstyle = deckstyle cards.Cut(1,2) user.put_in_hands(C) - update_icon() + update_appearance(updates = ALL) C.interact(user) else //if more than one card is drawn var/obj/item/toy/cards/cardhand/H = new/obj/item/toy/cards/cardhand(user.drop_location()) @@ -790,9 +790,9 @@ H.deckstyle=deckstyle src.cards.Cut(1,drawnumber+1) user.put_in_hands(H) - update_icon() + update_appearance(updates = ALL) H.interact(user) - H.update_icon() + H.update_appearance(updates = ALL) /obj/item/toy/cards/deck/AltClick(mob/living/L) if(!(L.mobility_flags & MOBILITY_PICKUP)) @@ -805,7 +805,7 @@ drawsize=clamp(drawsize,1,min(cards.len,10)) draw_card(L,drawsize) -/obj/item/toy/cards/deck/update_icon() +/obj/item/toy/cards/deck/update_appearance(updates = ALL) if(cards.len > 26) icon_state = "deck_[deckstyle]_full" else if(cards.len > 10) @@ -839,7 +839,7 @@ qdel(SC) else to_chat(user, span_warning("You can't mix cards from other decks!")) - update_icon() + update_appearance(updates = ALL) else if(istype(I, /obj/item/toy/cards/cardhand)) var/obj/item/toy/cards/cardhand/CH = I if(CH.parentdeck == src) @@ -851,7 +851,7 @@ qdel(CH) else to_chat(user, span_warning("You can't mix cards from other decks!")) - update_icon() + update_appearance(updates = ALL) else return ..() @@ -911,7 +911,7 @@ cardUser.visible_message(span_notice("[cardUser] draws a card from [cardUser.p_their()] hand."), span_notice("You take the [C.cardname] from your hand.")) interact(cardUser) - update_icon() + update_appearance(updates = ALL) if(length(currenthand) == 1) var/obj/item/toy/cards/singlecard/N = new/obj/item/toy/cards/singlecard(loc) N.parentdeck = parentdeck @@ -928,7 +928,7 @@ user.visible_message("[user] adds a card to [user.p_their()] hand.", span_notice("You add the [C.cardname] to your hand.")) qdel(C) interact(user) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -943,7 +943,7 @@ user.visible_message("[user] adds the cards from [user.p_their()] hand to another, consolidating them.", span_notice("You add the cards from one hand to another.")) qdel(C) interact(user) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -977,7 +977,7 @@ . = ..() . += "This hand has [currenthand.len] cards in it." -/obj/item/toy/cards/cardhand/update_icon() +/obj/item/toy/cards/cardhand/update_appearance(updates = ALL) if(src.currenthand.len > 4) src.icon_state = "[deckstyle]_hand5" else @@ -1054,7 +1054,7 @@ user.visible_message("[user] adds a card to [user.p_their()] hand.", span_notice("You add the [cardname] to your hand.")) qdel(src) H.interact(user) - H.update_icon() + H.update_appearance(updates = ALL) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -1141,7 +1141,7 @@ cards += "Wildcard" cards += "Wild Draw Four" -/obj/item/toy/cards/deck/uno/update_icon() +/obj/item/toy/cards/deck/uno/update_appearance(updates = ALL) if(cards.len > 54) icon_state = "deck_[deckstyle]_full" else if(cards.len > 25) @@ -1679,9 +1679,9 @@ obj/item/toy/turn_tracker /obj/item/toy/eldritch_book/attack_self(mob/user) book_open = !book_open - update_icon() + update_appearance(updates = ALL) -/obj/item/toy/eldritch_book/update_icon() +/obj/item/toy/eldritch_book/update_appearance(updates = ALL) icon_state = book_open ? "book_open" : "book" /* diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 7706c8ebdbad..44542fcc2e01 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -45,11 +45,11 @@ name = copytext(name, 1, sf) else //something wrong name = "[initial(name)]" - update_icon() + update_appearance(updates = ALL) if(user.get_item_by_slot(SLOT_BACK) == src) user.update_inv_back() else - user.update_inv_hands() + user.update_held_items() if(show_message) if(iscyborg(user)) to_chat(user, span_notice("You free up your module.")) @@ -86,7 +86,7 @@ if(force_wielded) force += force_wielded name = "[name] (Wielded)" - update_icon() + update_appearance(updates = ALL) if(iscyborg(user)) to_chat(user, span_notice("You dedicate your module to [src].")) else @@ -108,8 +108,9 @@ return unwield(user) -/obj/item/twohanded/update_icon() - return +/obj/item/twohanded/Initialize(mapload) //lol + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/twohanded/attack_self(mob/user) . = ..() @@ -255,7 +256,7 @@ . = ..() AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools -/obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/fireaxe/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" return @@ -290,7 +291,7 @@ desc = "A large, menacing axe made of an unknown substance that the most elder atmosians call Metallic Hydrogen. Truly an otherworldly weapon." force_wielded = 18 -/obj/item/twohanded/fireaxe/metal_h2_axe/update_icon() //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/fireaxe/metal_h2_axe/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. icon_state = "metalh2_axe[wielded]" return @@ -349,7 +350,7 @@ var/obj/O = A O.take_damage(force, BRUTE, MELEE, FALSE, null, armour_penetration) -/obj/item/twohanded/fireaxe/energy/update_icon() +/obj/item/twohanded/fireaxe/energy/update_appearance(updates = ALL) icon_state = "energy-fireaxe[wielded]" SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_TYPE_BLOOD) @@ -456,7 +457,7 @@ STOP_PROCESSING(SSobj, src) . = ..() -/obj/item/twohanded/dualsaber/update_icon() +/obj/item/twohanded/dualsaber/update_appearance(updates = ALL) if(wielded) icon_state = "dualsaber[saber_color][wielded]" else @@ -566,7 +567,7 @@ hacked = TRUE to_chat(user, span_warning("2XRNBW_ENGAGE")) saber_color = "rainbow" - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("It's starting to look like a triple rainbow - no, nevermind.")) else @@ -615,7 +616,7 @@ . = ..() AddComponent(/datum/component/jousting) -/obj/item/twohanded/spear/update_icon() +/obj/item/twohanded/spear/update_appearance(updates = ALL) icon_state = "[icon_prefix][wielded]" /obj/item/twohanded/spear/deconstruct() //we drop our rod and maybe the glass shard used @@ -637,7 +638,7 @@ righthand_file = 'yogstation/icons/mob/inhands/weapons/polearms_righthand.dmi' //yogs mob_overlay_icon = 'yogstation/icons/mob/clothing/back.dmi' //yogs icon_prefix = "spearplasma" - update_icon() + update_appearance(updates = ALL) qdel(tip) var/obj/item/grenade/G = locate() in parts_list if(G) @@ -662,7 +663,7 @@ G.forceMove(src) explosive = G desc = "A makeshift spear with [G] attached to it" - update_icon() + update_appearance(updates = ALL) /obj/item/twohanded/spear/explosive/suicide_act(mob/living/carbon/user) user.visible_message(span_suicide("[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")) @@ -677,7 +678,7 @@ . = ..() . += span_notice("Alt-click to set your war cry.") -/obj/item/twohanded/spear/explosive/update_icon() +/obj/item/twohanded/spear/explosive/update_appearance(updates = ALL) icon_state = "spearbomb[wielded]" /obj/item/twohanded/spear/explosive/AltClick(mob/user) @@ -756,7 +757,7 @@ hitsound = "swing_hit" if(src == user.get_active_held_item()) //update inhands - user.update_inv_hands() + user.update_held_items() for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -861,7 +862,7 @@ throwforce = 100 force_wielded = 500000 // Kills you DEAD. -/obj/item/twohanded/pitchfork/update_icon() +/obj/item/twohanded/pitchfork/update_appearance(updates = ALL) icon_state = "pitchfork[wielded]" /obj/item/twohanded/pitchfork/suicide_act(mob/user) @@ -937,7 +938,7 @@ return 1 return 0 -/obj/item/twohanded/vibro_weapon/update_icon() +/obj/item/twohanded/vibro_weapon/update_appearance(updates = ALL) icon_state = "hfrequency[wielded]" /obj/item/twohanded/vibro_weapon/wizard @@ -962,7 +963,7 @@ desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters." force_wielded = 18 -/obj/item/twohanded/fireaxe/boneaxe/update_icon() +/obj/item/twohanded/fireaxe/boneaxe/update_appearance(updates = ALL) icon_state = "bone_axe[wielded]" /* @@ -990,7 +991,7 @@ attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") sharpness = SHARP_EDGED -/obj/item/twohanded/bonespear/update_icon() +/obj/item/twohanded/bonespear/update_appearance(updates = ALL) icon_state = "bone_spear[wielded]" /obj/item/twohanded/bonespear/chitinspear //like a mix of a bone spear and bone axe, but more like a bone spear. And better. @@ -1003,7 +1004,7 @@ throwforce = 25 attack_verb = list("attacked", "poked", "jabbed", "torn", "gored", "sliced", "ripped", "cut") -/obj/item/twohanded/bonespear/chitinspear/update_icon() +/obj/item/twohanded/bonespear/chitinspear/update_appearance(updates = ALL) icon_state = "chitin_spear[wielded]" /obj/item/twohanded/binoculars @@ -1070,7 +1071,7 @@ attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") sharpness = SHARP_EDGED -/obj/item/twohanded/bamboospear/update_icon() +/obj/item/twohanded/bamboospear/update_appearance(updates = ALL) icon_state = "bamboo_spear[wielded]" /* @@ -1133,7 +1134,7 @@ QDEL_NULL(spark_system) return ..() -/obj/item/twohanded/vxtvulhammer/update_icon() +/obj/item/twohanded/vxtvulhammer/update_appearance(updates = ALL) icon_state = "vxtvul_hammer[wielded]-[supercharged]" /obj/item/twohanded/vxtvulhammer/examine(mob/living/carbon/user) @@ -1173,7 +1174,7 @@ set_light_on(FALSE) force = initial(force) + (wielded ? force_wielded : 0) armour_penetration = initial(armour_penetration) - update_icon() + update_appearance(updates = ALL) /obj/item/twohanded/vxtvulhammer/proc/charge_hammer(mob/living/carbon/user) if(!wielded) @@ -1276,7 +1277,7 @@ desc = "A relic sledgehammer with charge packs wired to two blast pads on its head. This one has been defaced by Syndicate pirates. \ While wielded in two hands, the user can charge a massive blow that will shatter construction and hurl bodies." -/obj/item/twohanded/vxtvulhammer/pirate/update_icon() +/obj/item/twohanded/vxtvulhammer/pirate/update_appearance(updates = ALL) icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" // Baseball Bats @@ -1381,7 +1382,7 @@ w_class = WEIGHT_CLASS_HUGE slot_flags = ITEM_SLOT_BACK -/obj/item/twohanded/bigspoon/update_icon() +/obj/item/twohanded/bigspoon/update_appearance(updates = ALL) hitsound = wielded ? 'yogstation/sound/weapons/bat_hit.ogg' : 'sound/items/trayhit1.ogg' //big donk if wielded item_state = "bigspoon[wielded]" //i don't know why it's item_state rather than icon_state like every other wielded weapon return @@ -1408,7 +1409,7 @@ Broom attack_verb = list("swept", "brushed off", "bludgeoned", "whacked") resistance_flags = FLAMMABLE -/obj/item/twohanded/broom/update_icon() +/obj/item/twohanded/broom/update_appearance(updates = ALL) icon_state = "broom[wielded]" /obj/item/twohanded/broom/wield(mob/user) @@ -1448,14 +1449,14 @@ Broom break if (i > 1) if (target_bin) - target_bin.update_icon() + target_bin.update_appearance(updates = ALL) to_chat(user, span_notice("You sweep the pile of garbage into [target_bin].")) playsound(loc, 'sound/weapons/thudswoosh.ogg', 30, TRUE, -1) /obj/item/twohanded/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta J.put_in_cart(src, user) J.mybroom=src - J.update_icon() + J.update_appearance(updates = ALL) /obj/item/twohanded/broom/cyborg name = "robotic push broom" diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index f07a18f152d9..b65890d3d6a3 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -178,9 +178,6 @@ /obj/proc/container_resist(mob/living/user) return -/obj/proc/update_icon() - return - /mob/proc/unset_machine() if(machine) machine.on_unset_machine(src) diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 369c7dc50d85..771f6a00c5a1 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -229,7 +229,7 @@ /obj/structure/alien/egg/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) if(status == GROWING || status == GROWN) child = new(src) if(status == GROWING) @@ -238,7 +238,7 @@ if(status == BURST) obj_integrity = integrity_failure -/obj/structure/alien/egg/update_icon() +/obj/structure/alien/egg/update_appearance(updates = ALL) ..() switch(status) if(GROWING) @@ -279,7 +279,7 @@ /obj/structure/alien/egg/proc/Grow() status = GROWN - update_icon() + update_appearance(updates = ALL) proximity_monitor.SetRange(1) //drops and kills the hugger if any is remaining @@ -287,7 +287,7 @@ if(status == GROWN || status == GROWING) proximity_monitor.SetRange(0) status = BURST - update_icon() + update_appearance(updates = ALL) flick("egg_opening", src) addtimer(CALLBACK(src, PROC_REF(finish_bursting), kill), 15) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 32a0f55ded1d..d8c80de244b0 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -119,7 +119,7 @@ var/y = text2num(params["y"]) grid[x][y] = color used = TRUE - update_icon() + update_appearance(updates = ALL) . = TRUE if("finalize") . = TRUE @@ -132,7 +132,7 @@ generate_proper_overlay() try_rename(user) -/obj/item/canvas/update_icon() +/obj/item/canvas/update_appearance(updates = ALL) cut_overlays() if(!icon_generated) if(used) @@ -155,7 +155,7 @@ CRASH("Error generating painting png : [result]") generated_icon = new(png_filename) icon_generated = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/canvas/proc/get_data_string() var/list/data = list() @@ -281,7 +281,7 @@ C.forceMove(drop_location()) C = null to_chat(user, span_notice("You remove the painting from the frame.")) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas) @@ -290,13 +290,13 @@ if(!C.finalized) C.finalize(user) to_chat(user,span_notice("You frame [C].")) - update_icon() + update_appearance(updates = ALL) /obj/structure/sign/painting/proc/try_rename(mob/user) if(C.painting_name == initial(C.painting_name)) C.try_rename(user) -/obj/structure/sign/painting/update_icon() +/obj/structure/sign/painting/update_appearance(updates = ALL) . = ..() if(C && C.generated_icon) @@ -356,7 +356,7 @@ new_canvas.author_ckey = author new_canvas.name = "painting - [title]" C = new_canvas - update_icon() + update_appearance(updates = ALL) /obj/structure/sign/painting/proc/save_persistent() if(!persistence_id || !C || C.no_save) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 43cac0f2f63d..d2d35383cf58 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -20,27 +20,55 @@ if(!istype(sign)) return - icon_state = sign.icon + if(sign.rename_area) + rename_area(src, sign.name) + + chosen_sign = sign + update_appearance() + +/obj/structure/sign/barsign/update_icon_state() + if(chosen_sign?.icon) + icon_state = chosen_sign.icon + else + icon_state = "empty" + + return ..() + +/obj/structure/sign/barsign/update_desc() + . = ..() + + if(chosen_sign && chosen_sign.desc) + desc = chosen_sign.desc - if(sign.name) - name = "[initial(name)] ([sign.name])" +/obj/structure/sign/barsign/update_name() + . = ..() + if(chosen_sign && chosen_sign.rename_area) + name = "[initial(name)] ([chosen_sign.name])" else name = "[initial(name)]" - if(sign.desc) - desc = sign.desc +/*/obj/structure/sign/barsign/update_overlays() + . = ..() - if(sign.rename_area && sign.name) - rename_area(src, sign.name) + if(stat & (NOPOWER|BROKEN)) + return - return sign + if(chosen_sign && chosen_sign.light_mask) + . += emissive_appearance(icon, "[chosen_sign.icon]-light-mask", src)*/ + +/obj/structure/sign/barsign/update_appearance(updates=ALL) + . = ..() +// if(stat & (NOPOWER|BROKEN)) +// set_light(0) +// return +// if(chosen_sign && chosen_sign.neon_color) +// set_light(MINIMUM_USEFUL_LIGHT_RANGE, 0.7, chosen_sign.neon_color) /obj/structure/sign/barsign/proc/set_sign_by_name(sign_name) - for(var/d in subtypesof(/datum/barsign)) - var/datum/barsign/D = d - if(initial(D.name) == sign_name) - var/new_sign = new D - return set_sign(new_sign) + for(var/datum/barsign/sign as anything in subtypesof(/datum/barsign)) + if(initial(sign.name) == sign_name) + var/new_sign = new sign + set_sign(new_sign) /obj/structure/sign/barsign/obj_break(damage_flag) if(!broken && !(flags_1 & NODECONSTRUCT_1)) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 359e8be8dd82..3da81acd9964 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -350,7 +350,7 @@ LINEN BINS . += "There are [amount] bed sheets in the bin." -/obj/structure/bedsheetbin/update_icon() +/obj/structure/bedsheetbin/update_appearance(updates = ALL) switch(amount) if(0) icon_state = "linenbin-empty" @@ -362,7 +362,7 @@ LINEN BINS /obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume) if(amount) amount = 0 - update_icon() + update_appearance(updates = ALL) ..() /obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params) @@ -372,7 +372,7 @@ LINEN BINS sheets.Add(I) amount++ to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(updates = ALL) else if(default_unfasten_wrench(user, I, 5)) return @@ -421,7 +421,7 @@ LINEN BINS B.forceMove(drop_location()) user.put_in_hands(B) to_chat(user, span_notice("You take [B] out of [src].")) - update_icon() + update_appearance(updates = ALL) if(hidden) hidden.forceMove(drop_location()) @@ -444,7 +444,7 @@ LINEN BINS B.forceMove(drop_location()) to_chat(user, span_notice("You telekinetically remove [B] from [src].")) - update_icon() + update_appearance(updates = ALL) if(hidden) hidden.forceMove(drop_location()) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 1fc3a90fbf2d..6505ef58d5ff 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -13,14 +13,14 @@ GLOBAL_LIST_EMPTY(lockers) var/welded = FALSE var/locked = FALSE var/large = TRUE - var/wall_mounted = 0 //never solid (You can always pass over it) + var/wall_mounted = FALSE //never solid (You can always pass over it) max_integrity = 200 integrity_failure = 50 armor = list(MELEE = 20, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 70, ACID = 60) var/breakout_time = 1200 var/message_cooldown var/can_weld_shut = TRUE - var/open_flags = 0 + var/open_flags = NONE var/dense_when_open = FALSE //if it's dense when open or not var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet. @@ -56,7 +56,7 @@ GLOBAL_LIST_EMPTY(lockers) if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents . = INITIALIZE_HINT_LATELOAD - update_icon() + update_appearance(updates = ALL) PopulateContents() var/static/list/loc_connections = list( COMSIG_ATOM_MAGICALLY_UNLOCKED = PROC_REF(on_magic_unlock), @@ -78,30 +78,45 @@ GLOBAL_LIST_EMPTY(lockers) GLOB.lockers -= src return ..() +/obj/structure/closet/update_appearance(updates=ALL) + . = ..() + if(opened || broken || !secure) + luminosity = 0 + return + luminosity = 1 + /obj/structure/closet/update_icon() - cut_overlays() - if(!opened) - layer = OBJ_LAYER - if(!is_animating_door) - if(icon_door) - add_overlay("[icon_door]_door") - else - add_overlay("[icon_state]_door") - if(welded) - add_overlay(icon_welded) - if(secure && !broken) - if(locked) - add_overlay("locked") - else - add_overlay("unlocked") + . = ..() + if(issupplypod(src)) + return - else - layer = BELOW_OBJ_LAYER - if(!is_animating_door) - if(icon_door_override) - add_overlay("[icon_door]_open") - else - add_overlay("[icon_state]_open") + layer = opened ? BELOW_OBJ_LAYER : OBJ_LAYER + +/obj/structure/closet/update_overlays() + . = ..() + closet_update_overlays(.) + +/obj/structure/closet/proc/closet_update_overlays(list/new_overlays) + . = new_overlays + if(!is_animating_door) + if(opened && !notreallyacloset) + var/mutable_appearance/door_overlay = mutable_appearance(icon, "[icon_state]_open", alpha = src.alpha) + . += door_overlay +// door_overlay.overlays += emissive_blocker(door_overlay.icon, door_overlay.icon_state, src, alpha = door_overlay.alpha) // If we don't do this the door doesn't block emissives and it looks weird. + else if(!notreallyacloset) + . += "[icon_door || icon_state]_door" + + if(opened) + return + + if(welded) + . += icon_welded + + if(broken || !secure) + return + //Overlay is similar enough for both that we can use the same mask for both +// . += emissive_appearance(icon, "locked", src, alpha = src.alpha) + . += locked ? "locked" : "unlocked" /obj/structure/closet/proc/animate_door(var/closing = FALSE) if(!door_anim_time) @@ -131,7 +146,7 @@ GLOBAL_LIST_EMPTY(lockers) /obj/structure/closet/proc/end_door_animation() is_animating_door = FALSE vis_contents -= door_obj - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/proc/get_door_transform(angle) var/matrix/M = matrix() @@ -211,7 +226,7 @@ GLOBAL_LIST_EMPTY(lockers) climb_time *= 0.5 //it's faster to climb onto an open thing dump_contents() animate_door(FALSE) - update_icon() + update_appearance(updates = ALL) update_airtightness() return 1 @@ -265,7 +280,7 @@ GLOBAL_LIST_EMPTY(lockers) opened = FALSE density = TRUE animate_door(TRUE) - update_icon() + update_appearance(updates = ALL) update_airtightness() close_storage(user) return TRUE @@ -339,7 +354,7 @@ GLOBAL_LIST_EMPTY(lockers) user.visible_message(span_notice("[user] [welded ? "welds shut" : "unwelded"] \the [src]."), span_notice("You [welded ? "weld" : "unwelded"] \the [src] with \the [W]."), span_italics("You hear welding.")) - update_icon() + update_appearance(updates = ALL) else if(W.tool_behaviour == TOOL_WRENCH && anchorable) if(isinspace() && !anchored) return @@ -516,7 +531,7 @@ GLOBAL_LIST_EMPTY(lockers) locked = !locked user.visible_message(span_notice("[user] [locked ? null : "un"]locks [src]."), span_notice("You [locked ? null : "un"]lock [src].")) - update_icon() + update_appearance(updates = ALL) else if(!silent) to_chat(user, span_notice("Access Denied")) else if(secure && broken) @@ -530,7 +545,7 @@ GLOBAL_LIST_EMPTY(lockers) playsound(src, "sparks", 50, 1) broken = TRUE locked = FALSE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) @@ -546,7 +561,7 @@ GLOBAL_LIST_EMPTY(lockers) if(secure && !broken && !(. & EMP_PROTECT_SELF)) if(prob(50 / severity)) locked = !locked - update_icon() + update_appearance(updates = ALL) if(prob(20 / severity) && !opened) if(!locked) open() diff --git a/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm b/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm index a582f4e6ce1e..40b778a1ac64 100644 --- a/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm +++ b/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm @@ -87,7 +87,7 @@ else return ..() -/obj/structure/closet/bluespace/internal/update_icon() +/obj/structure/closet/bluespace/internal/update_appearance(updates = ALL) cut_overlays() var/obj/structure/closet/other = get_other_locker() if(!other) diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index b3b19dbe9c3e..61f817d12d30 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -38,7 +38,7 @@ if(t) name = "[initial(name)] - [t]" tagged = 1 - update_icon() + update_appearance(updates = ALL) else name = initial(name) return @@ -46,9 +46,9 @@ to_chat(user, span_notice("You cut the tag off [src].")) name = initial(name) tagged = 0 - update_icon() + update_appearance(updates = ALL) -/obj/structure/closet/body_bag/update_icon() +/obj/structure/closet/body_bag/update_appearance(updates = ALL) ..() if (tagged) add_overlay("bodybag_label") @@ -190,7 +190,7 @@ to_chat(the_folder, span_warning("You wrestle with [src], but it won't fold while its straps are fastened.")) return ..() -/obj/structure/closet/body_bag/environmental/prisoner/update_icon() +/obj/structure/closet/body_bag/environmental/prisoner/update_appearance(updates = ALL) . = ..() if(sinched) icon_state = initial(icon_state) + "_sinched" @@ -216,7 +216,7 @@ if(!dense_when_open) density = FALSE dump_contents() - update_icon() + update_appearance(updates = ALL) return TRUE /obj/structure/closet/body_bag/environmental/prisoner/container_resist(mob/living/user) @@ -278,7 +278,7 @@ span_notice("You [sinched ? null : "un"]sinch [src]."), span_hear("You hear stretching followed by metal clicking from [src].")) log_game("[key_name(user)] [sinched ? "sinched":"unsinched"] secure environmental bag [src] at [AREACOORD(src)]") - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/body_bag/environmental/prisoner/syndicate name = "syndicate prisoner transport bag" @@ -292,7 +292,7 @@ breakout_time = 8 MINUTES sinch_time = 4 SECONDS -/obj/structure/closet/body_bag/environmental/prisoner/syndicate/update_icon() +/obj/structure/closet/body_bag/environmental/prisoner/syndicate/update_appearance(updates = ALL) . = ..() var/obj/item/bodybag/environmental/prisoner/syndicate/inner_bag = foldedbag_instance if(sinched && inner_bag && inner_bag.killing) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 60952c2af129..bc7c0ab7d11e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -57,7 +57,7 @@ if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name))) //they can open all lockers, or nobody owns this, or they own this locker locked = !locked - update_icon() + update_appearance(updates = ALL) if(!registered_name) registered_name = I.registered_name diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index c95786346146..a673bd0fa614 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -23,7 +23,7 @@ . = ..() if(icon_state == "[initial(icon_state)]open") opened = TRUE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/crate/CanAllowThrough(atom/movable/mover, turf/target) . = ..() @@ -35,7 +35,7 @@ if(!locatedcrate.opened) //otherwise, if the located crate is closed, allow entering return TRUE -/obj/structure/closet/crate/update_icon() +/obj/structure/closet/crate/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][opened ? "open" : ""]" cut_overlays() @@ -56,7 +56,7 @@ playsound(src, 'sound/items/poster_ripped.ogg', 75, 1) manifest.forceMove(get_turf(src)) manifest = null - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/crate/proc/tear_manifest(mob/user) to_chat(user, span_notice("You tear the manifest off of [src].")) @@ -66,7 +66,7 @@ if(ishuman(user)) user.put_in_hands(manifest) manifest = null - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/crate/coffin name = "coffin" diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index e4f101a07ad4..25ccab092bee 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -10,9 +10,9 @@ /obj/structure/closet/crate/bin/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/structure/closet/crate/bin/update_icon() +/obj/structure/closet/crate/bin/update_appearance(updates = ALL) ..() cut_overlays() if(contents.len == 0) @@ -28,7 +28,7 @@ to_chat(user, span_notice("You fill the bag.")) for(var/obj/item/O in src) SEND_SIGNAL(T, COMSIG_TRY_STORAGE_INSERT, O, user, TRUE) - T.update_icon() + T.update_appearance(updates = ALL) do_animate() else if(istype(W, /obj/item/wrench)) anchored = !anchored @@ -41,4 +41,4 @@ flick("animate_largebins", src) spawn(13) playsound(loc, close_sound, 15, 1, -3) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index dcc0883ecba8..ec17b96a14be 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -21,7 +21,7 @@ return ..() -/obj/structure/closet/crate/critter/update_icon() +/obj/structure/closet/crate/critter/update_appearance(updates = ALL) cut_overlays() if(opened) add_overlay("crittercrate_door_open") diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index 4f338ba105b0..9f640d7f79eb 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -13,7 +13,7 @@ return 0 . = ..() -/obj/structure/closet/crate/secure/update_icon() +/obj/structure/closet/crate/secure/update_appearance(updates = ALL) ..() if(broken) add_overlay("securecrateemag") @@ -131,4 +131,4 @@ locked = !locked user.visible_message(span_notice("[user] [locked ? null : "un"]locks [src]."), span_notice("You [locked ? null : "un"]lock [src].")) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 8a268250fa70..ebf9e7daf82b 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -30,7 +30,7 @@ trophy_message = showpiece_entry["trophy_message"] if(start_showpiece_type) showpiece = new start_showpiece_type (src) - update_icon() + update_appearance(updates = ALL) /obj/structure/displaycase/Destroy() if(electronics) @@ -75,7 +75,7 @@ broken = 1 new /obj/item/shard( src.loc ) playsound(src, "shatter", 70, TRUE) - update_icon() + update_appearance(updates = ALL) trigger_alarm() /obj/structure/displaycase/proc/trigger_alarm() @@ -85,7 +85,7 @@ alarmed.burglaralert(src) playsound(src, 'sound/effects/alert.ogg', 50, TRUE) -/obj/structure/displaycase/update_icon() +/obj/structure/displaycase/update_appearance(updates = ALL) var/icon/I if(open) I = icon('icons/obj/stationobjs.dmi',"glassbox_open") @@ -115,7 +115,7 @@ to_chat(user, span_notice("You begin repairing [src]...")) if(W.use_tool(src, user, 40, amount=5, volume=50)) obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You repair [src].")) else to_chat(user, span_warning("[src] is already in good condition!")) @@ -139,7 +139,7 @@ if(user.transferItemToLoc(W, src)) showpiece = W to_chat(user, span_notice("You put [W] on display.")) - update_icon() + update_appearance(updates = ALL) else if(glass_fix && broken && istype(W, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = W if(G.get_amount() < 2) @@ -150,13 +150,13 @@ G.use(2) broken = 0 obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) else return ..() /obj/structure/displaycase/proc/toggle_lock(mob/user) open = !open - update_icon() + update_appearance(updates = ALL) /obj/structure/displaycase/attack_paw(mob/user) return attack_hand(user) @@ -171,7 +171,7 @@ log_combat(user, src, "deactivates the hover field of") dump() src.add_fingerprint(user) - update_icon() + update_appearance(updates = ALL) return else //prevents remote "kicks" with TK @@ -306,7 +306,7 @@ to_chat(user, span_notice("You insert [W] into the case.")) showpiece = W added_roundstart = FALSE - update_icon() + update_appearance(updates = ALL) placer_key = user.ckey diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index 5c32f56027b0..6feaf846926e 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -40,11 +40,11 @@ last_process = world.time to_chat(user, span_notice("The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.")) user.reagents.add_reagent(/datum/reagent/medicine/omnizine/godblood,20) - update_icon() - addtimer(CALLBACK(src, PROC_REF(update_icon)), time_between_uses) + update_appearance(updates = ALL) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), time_between_uses) -/obj/structure/healingfountain/update_icon() +/obj/structure/healingfountain/update_appearance(updates = ALL) if(last_process + time_between_uses > world.time) icon_state = "fountain" else diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index f895029e139c..7bb408e64cec 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -22,7 +22,7 @@ /obj/structure/door_assembly/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) update_name() /obj/structure/door_assembly/examine(mob/user) @@ -255,14 +255,14 @@ door.name = base_name door.previous_airlock = previous_assembly electronics.forceMove(door) - door.update_icon() + door.update_appearance(updates = ALL) qdel(src) else return ..() update_name() - update_icon() + update_appearance(updates = ALL) -/obj/structure/door_assembly/update_icon() +/obj/structure/door_assembly/update_appearance(updates = ALL) cut_overlays() if(!glass) add_overlay(get_airlock_overlay("fill_construction", icon)) @@ -270,7 +270,7 @@ add_overlay(get_airlock_overlay("glass_construction", overlays_file)) add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file)) -/obj/structure/door_assembly/proc/update_name() +/obj/structure/door_assembly/update_name() name = "" switch(state) if(AIRLOCK_ASSEMBLY_NEEDS_WIRES) @@ -293,7 +293,7 @@ if(electronics) target.electronics = source.electronics source.electronics.forceMove(target) - target.update_icon() + target.update_appearance(updates = ALL) target.update_name() qdel(source) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 0d3f46a82036..fea1907e1871 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -44,7 +44,7 @@ /obj/structure/extinguisher_cabinet/handle_atom_del(atom/A) if(A == stored_extinguisher) stored_extinguisher = null - update_icon() + update_appearance(updates = ALL) /obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params) if(I.tool_behaviour == TOOL_WRENCH && !stored_extinguisher) @@ -64,7 +64,7 @@ return stored_extinguisher = I to_chat(user, span_notice("You place [I] in [src].")) - update_icon() + update_appearance(updates = ALL) return TRUE else toggle_cabinet(user) @@ -87,7 +87,7 @@ if(!opened) opened = 1 playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) - update_icon() + update_appearance(updates = ALL) else toggle_cabinet(user) @@ -99,7 +99,7 @@ stored_extinguisher = null opened = 1 playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) - update_icon() + update_appearance(updates = ALL) else toggle_cabinet(user) @@ -118,9 +118,9 @@ else playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) opened = !opened - update_icon() + update_appearance(updates = ALL) -/obj/structure/extinguisher_cabinet/update_icon() +/obj/structure/extinguisher_cabinet/update_appearance(updates = ALL) if(!opened) icon_state = "extinguisher_closed" return @@ -139,7 +139,7 @@ if(stored_extinguisher) stored_extinguisher.forceMove(loc) stored_extinguisher = null - update_icon() + update_appearance(updates = ALL) /obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 2bf3d657577b..5afd8435e1b0 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -59,7 +59,7 @@ for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield return opening = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, /obj/structure/falsewall/proc/toggle_open), 5) /obj/structure/falsewall/proc/toggle_open() @@ -67,10 +67,10 @@ density = !density set_opacity(density) opening = FALSE - update_icon() + update_appearance(updates = ALL) air_update_turf(TRUE) -/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open +/obj/structure/falsewall/update_appearance(updates = ALL)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open if(opening) if(density) icon_state = "fwall_opening" diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 1c2a78f1dccd..5a32d22df80f 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -21,7 +21,7 @@ /obj/structure/fireaxecabinet/Initialize() . = ..() fireaxe = new - update_icon() + update_appearance(updates = ALL) //yogs NOTICE - Destroy() function MIRRORED to yogstation/code/game/objects/structure/fireaxe.dm //changes made to the below function will have no effect @@ -44,7 +44,7 @@ to_chat(user, span_notice("You begin repairing [src].")) if(I.use_tool(src, user, 40, volume=50, amount=2)) obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You repair [src].")) else to_chat(user, span_warning("[src] is already in good condition!")) @@ -59,7 +59,7 @@ if(do_after(user, 2 SECONDS, src) && G.use(2)) broken = 0 obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) //yogs start - warn user if they use the wrong type of glass to repair else if(istype(I, /obj/item/stack/sheet/glass) && broken) to_chat(user, span_warning("You need reinforced glass sheets to fix [src]!")) @@ -75,7 +75,7 @@ return fireaxe = F to_chat(user, span_caution("You place the [F.name] back in the [name].")) - update_icon() + update_appearance(updates = ALL) return else if(istype(I, /obj/item/card/id/captains_spare) && !spareid && !axe) var/obj/item/card/id/captains_spare/S = I @@ -83,7 +83,7 @@ return spareid = S to_chat(user, span_caution("You place the [S.name] back in the [name].")) - update_icon() + update_appearance(updates = ALL) return else if(istype(I, /obj/item/twohanded/fishingrod/collapsible/miningmedic) && !olreliable && !axe) var/obj/item/twohanded/fishingrod/collapsible/miningmedic/R = I @@ -94,7 +94,7 @@ return olreliable = R to_chat(user, span_caution("You place the [R.name] back in the [name].")) - update_icon() + update_appearance(updates = ALL) return else if(!broken) //open the cabinet normally. @@ -131,11 +131,11 @@ return . = ..() if(.) - update_icon() + update_appearance(updates = ALL) /obj/structure/fireaxecabinet/obj_break(damage_flag) if(!broken && !(flags_1 & NODECONSTRUCT_1)) - update_icon() + update_appearance(updates = ALL) broken = TRUE playsound(src, 'sound/effects/glassbr3.ogg', 100, 1) new /obj/item/shard(loc) @@ -178,7 +178,7 @@ spareid = null olreliable = null src.add_fingerprint(user) - update_icon() + update_appearance(updates = ALL) return toggle_open()//yogs - consolidates opening code return @@ -194,7 +194,7 @@ toggle_open()//yogs - consolidates opening code return -/obj/structure/fireaxecabinet/update_icon() +/obj/structure/fireaxecabinet/update_appearance(updates = ALL) cut_overlays() if(fireaxe) add_overlay("axe") @@ -231,7 +231,7 @@ if(do_after(user, 2 SECONDS, src)) to_chat(user, span_caution("You [locked ? "disable" : "re-enable"] the locking modules.")) locked = !locked - update_icon() + update_appearance(updates = ALL) /obj/structure/fireaxecabinet/verb/toggle_open() set name = "Open/Close" @@ -247,7 +247,7 @@ else playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)//yogs - adds open/close sound open = !open - update_icon() + update_appearance(updates = ALL) return /obj/structure/fireaxecabinet/proc/trigger_alarm() @@ -270,7 +270,7 @@ . = ..() fireaxe = null spareid = new(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/fireaxecabinet/bridge/spare/reset_lock(mob/user) //this happens when you hack the lock as a synthetic/AI, or with a multitool. @@ -308,4 +308,4 @@ . = ..() fireaxe = null olreliable = new(src) - update_icon() + update_appearance(updates = ALL) diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index 51c919119ce3..e1737adad212 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -69,7 +69,7 @@ else . = ..() -/obj/structure/fireplace/update_icon() +/obj/structure/fireplace/update_appearance(updates = ALL) cut_overlays() if(lit) switch(burn_time_remaining()) @@ -112,7 +112,7 @@ playsound(src, 'sound/effects/comfyfire.ogg',50,0, 0, 1) var/turf/T = get_turf(src) T.hotspot_expose(700, 2.5 * delta_time) - update_icon() + update_appearance(updates = ALL) adjust_light() /obj/structure/fireplace/extinguish() @@ -142,11 +142,11 @@ desc = "A large stone brick fireplace, warm and cozy." flame_expiry_timer = world.time + fuel_added fuel_added = 0 - update_icon() + update_appearance(updates = ALL) adjust_light() /obj/structure/fireplace/proc/put_out() lit = FALSE - update_icon() + update_appearance(updates = ALL) adjust_light() desc = initial(desc) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 38a7e2b3884c..83deeff4d937 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -34,20 +34,21 @@ if(broken) holes = (holes | 16) //16 is the biggest hole - update_icon() + update_appearance(updates = ALL) return holes = (holes | (1 << rand(0,3))) //add random holes between 1 and 8 - update_icon() + update_appearance(updates = ALL) -/obj/structure/grille/update_icon() +/obj/structure/grille/update_appearance(updates = ALL) if(QDELETED(src)) return for(var/i = 0; i < 5; i++) var/mask = 1 << i if(holes & mask) filters += filter(type="alpha", icon = icon('icons/obj/smooth_structures/grille.dmi', "broken_[i]"), flags = MASK_INVERSE) + return ..() /obj/structure/grille/examine(mob/user) . = ..() @@ -303,7 +304,7 @@ /obj/structure/grille/broken/Initialize() . = ..() holes = (holes | 16) - update_icon() + update_appearance(updates = ALL) /obj/structure/grille/ratvar icon = 'icons/obj/structures.dmi' diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index a9326cf17293..2b8d06d9d913 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -19,10 +19,10 @@ I.forceMove(src) if(contents.len >= capacity) break - update_icon() + update_appearance(updates = ALL) return ..() -/obj/structure/guncase/update_icon() +/obj/structure/guncase/update_appearance(updates = ALL) cut_overlays() if(case_type && LAZYLEN(contents)) var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type) @@ -42,14 +42,14 @@ if(!user.transferItemToLoc(I, src)) return to_chat(user, span_notice("You place [I] in [src].")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] is full.")) return else if(user.a_intent != INTENT_HARM) open = !open - update_icon() + update_appearance(updates = ALL) else return ..() @@ -63,7 +63,7 @@ ShowWindow(user) else open = !open - update_icon() + update_appearance(updates = ALL) /obj/structure/guncase/proc/ShowWindow(mob/user) var/dat = {"
    @@ -89,10 +89,10 @@ if(ishuman(usr)) if(!usr.put_in_hands(O)) O.forceMove(get_turf(src)) - update_icon() + update_appearance(updates = ALL) /obj/structure/guncase/handle_atom_del(atom/A) - update_icon() + update_appearance(updates = ALL) /obj/structure/guncase/contents_explosion(severity, target) for(var/thing in contents) diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index 68c1f77770b4..48067345d990 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -20,7 +20,7 @@ victim = locate(/obj/item/bodypart/head) in parts_list name = "[victim.name] on a spear" ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/headpike/glass/CheckParts(list/parts_list) spear = locate(/obj/item/twohanded/spear) in parts_list @@ -38,7 +38,7 @@ . = ..() pixel_x = rand(-8, 8) -/obj/structure/headpike/update_icon() +/obj/structure/headpike/update_appearance(updates = ALL) ..() var/obj/item/bodypart/head/H = locate() in contents var/mutable_appearance/MA = new() diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index b8be88a76bb2..43510242cdf7 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -212,14 +212,14 @@ /obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) playsound(loc, 'sound/weapons/egloves.ogg', 80, 1) -/obj/structure/holobed/update_icon() +/obj/structure/holobed/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][stasis ? "" : "_off"]" /obj/structure/holobed/AltClick(mob/living/user) if(user.a_intent == INTENT_HELP) stasis = !stasis handle_stasis(occupant) - update_icon() + update_appearance(updates = ALL) to_chat(user, span_warning("You [stasis ? "activate" : "deactivate"] the stasis field.")) /obj/structure/holobed/Exited(atom/movable/AM, atom/newloc) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 1effa44b3076..3ec372c7812b 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -64,28 +64,28 @@ if(!myspray) put_in_cart(I, user) myspray=I - update_icon() + update_appearance(updates = ALL) else to_chat(user, fail_msg) else if(istype(I, /obj/item/paint/paint_remover)) if(!myremover) put_in_cart(I, user) myremover=I - update_icon() + update_appearance(updates = ALL) else to_chat(user, fail_msg) else if(istype(I, /obj/item/melee/flyswatter)) if(!myswatter) put_in_cart(I, user) myswatter=I - update_icon() + update_appearance(updates = ALL) else to_chat(user, fail_msg) else if(istype(I, /obj/item/flashlight)) if(!mylight) put_in_cart(I, user) mylight=I - update_icon() + update_appearance(updates = ALL) else to_chat(user, fail_msg) else if(istype(I, /obj/item/lightreplacer)) @@ -104,7 +104,7 @@ if(signs < max_signs) put_in_cart(I, user) signs++ - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] can't hold any more signs!")) else if(mybag) @@ -208,7 +208,7 @@ else return - update_icon() + update_appearance(updates = ALL) /* check_menu: Checks if we are allowed to interact with a radial menu @@ -223,7 +223,7 @@ return FALSE return TRUE -/obj/structure/janitorialcart/update_icon() +/obj/structure/janitorialcart/update_appearance(updates = ALL) cut_overlays() if(mybag) add_overlay("cart_garbage") diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 588e726ac71e..7d158e9b70f9 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -13,11 +13,11 @@ if (up) src.up = up up.down = src - up.update_icon() + up.update_appearance(updates = ALL) if (down) src.down = down down.up = src - down.update_icon() + down.update_appearance(updates = ALL) return INITIALIZE_HINT_LATELOAD /obj/structure/ladder/Destroy(force) @@ -36,26 +36,26 @@ if (L) down = L L.up = src // Don't waste effort looping the other way - L.update_icon() + L.update_appearance(updates = ALL) if (!up) L = locate() in SSmapping.get_turf_above(T) if (L) up = L L.down = src // Don't waste effort looping the other way - L.update_icon() + L.update_appearance(updates = ALL) - update_icon() + update_appearance(updates = ALL) /obj/structure/ladder/proc/disconnect() if(up && up.down == src) up.down = null - up.update_icon() + up.update_appearance(updates = ALL) if(down && down.up == src) down.up = null - down.update_icon() + down.update_appearance(updates = ALL) up = down = null -/obj/structure/ladder/update_icon() +/obj/structure/ladder/update_appearance(updates = ALL) if(up && down) icon_state = "ladder11" @@ -160,7 +160,7 @@ /obj/structure/ladder/unbreakable/LateInitialize() // Override the parent to find ladders based on being height-linked if (!id || (up && down)) - update_icon() + update_appearance(updates = ALL) return for (var/O in GLOB.ladders) @@ -170,17 +170,17 @@ if (!down && L.height == height - 1) down = L L.up = src - L.update_icon() + L.update_appearance(updates = ALL) if (up) break // break if both our connections are filled else if (!up && L.height == height + 1) up = L L.down = src - L.update_icon() + L.update_appearance(updates = ALL) if (down) break // break if both our connections are filled - update_icon() + update_appearance(updates = ALL) /obj/structure/ladder/unbreakable/binary name = "mysterious ladder" diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm index 3b91e7e76d21..8f1e92d90d3f 100644 --- a/code/game/objects/structures/life_candle.dm +++ b/code/game/objects/structures/life_candle.dm @@ -37,7 +37,7 @@ user.visible_message(span_notice("[user] touches [src]. It seems to respond to [user.p_their()] presence!"), span_warning("You create a connection between you and [src].")) linked_minds |= user.mind - update_icon() + update_appearance(updates = ALL) float(linked_minds.len) if(linked_minds.len) START_PROCESSING(SSobj, src) @@ -46,7 +46,7 @@ STOP_PROCESSING(SSobj, src) set_light(0) -/obj/structure/life_candle/update_icon() +/obj/structure/life_candle/update_appearance(updates = ALL) if(linked_minds.len) icon_state = icon_state_active else diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index a5af8c214ace..0009e8bd09df 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -95,7 +95,7 @@ door_opened = TRUE layer = OPEN_DOOR_LAYER air_update_turf(1) - update_icon() + update_appearance(updates = ALL) isSwitchingStates = FALSE if(close_delay != -1) @@ -116,10 +116,10 @@ door_opened = FALSE layer = initial(layer) air_update_turf(1) - update_icon() + update_appearance(updates = ALL) isSwitchingStates = FALSE -/obj/structure/mineral_door/update_icon() +/obj/structure/mineral_door/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][door_opened ? "open":""]" /obj/structure/mineral_door/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 843185bcc24e..36fa9e723de7 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -19,27 +19,27 @@ if(!user.transferItemToLoc(M, src)) return ourmop = M - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You put [M] into [src].")) else reagents.trans_to(M, 5, transfered_by = user) to_chat(user, span_notice("You wet [M] in [src].")) playsound(loc, 'sound/effects/slosh.ogg', 25, 1) - update_icon() + update_appearance(updates = ALL) else . = ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/mopbucket/attack_hand(mob/user) if(ourmop) user.put_in_hands(ourmop) to_chat(user, span_notice("You take [ourmop] from [src].")) ourmop = null - update_icon() + update_appearance(updates = ALL) return return ..() -/obj/structure/mopbucket/update_icon() +/obj/structure/mopbucket/update_appearance(updates = ALL) cut_overlays() if(reagents.total_volume > 0) add_overlay("mopbucket_water") diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index a164eca7a0dd..cc4ec6e8e5be 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an var/breakout_time = 600 /obj/structure/bodycontainer/Initialize() + AddElement(/datum/element/update_icon_blocker) . = ..() GLOB.bodycontainers += src recursive_organ_check(src) @@ -43,10 +44,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/on_log(login) ..() - update_icon() - -/obj/structure/bodycontainer/update_icon() - return + update_appearance(updates = ALL) /obj/structure/bodycontainer/relaymove(mob/user) if(user.stat || !isturf(loc)) @@ -130,7 +128,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an for(var/atom/movable/AM in src) AM.forceMove(T) recursive_organ_check(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bodycontainer/proc/close() playsound(src, 'sound/effects/roll.ogg', 5, 1) @@ -140,7 +138,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an if(ismob(AM) && !isliving(AM)) continue AM.forceMove(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) @@ -173,7 +171,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an beeper = !beeper to_chat(user, span_notice("You turn the speaker function [beeper ? "on" : "off"].")) -/obj/structure/bodycontainer/morgue/update_icon() +/obj/structure/bodycontainer/morgue/update_appearance(updates = ALL) if (!connected || connected.loc != src) // Open or tray is gone. icon_state = "morgue0" else @@ -232,7 +230,7 @@ GLOBAL_LIST_EMPTY(crematoriums) connected = new /obj/structure/tray/c_tray(src) connected.connected = src -/obj/structure/bodycontainer/crematorium/update_icon() +/obj/structure/bodycontainer/crematorium/update_appearance(updates = ALL) if(!connected || connected.loc != src) icon_state = "crema0" else @@ -260,7 +258,7 @@ GLOBAL_LIST_EMPTY(crematoriums) else audible_message(span_italics("You hear a roar as the crematorium fires up.")) locked = TRUE - update_icon() + update_appearance(updates = ALL) cremate_timer = addtimer(CALLBACK(src, PROC_REF(finish_cremate), user), (breakout_time + cremate_time ), TIMER_STOPPABLE) @@ -271,7 +269,7 @@ GLOBAL_LIST_EMPTY(crematoriums) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people deltimer(cremate_timer) cremate_timer = null - update_icon() + update_appearance(updates = ALL) /obj/structure/bodycontainer/crematorium/proc/finish_cremate(mob/user) var/list/conts = get_all_contents() - src - connected @@ -327,7 +325,7 @@ GLOBAL_LIST_EMPTY(crematoriums) if(!QDELETED(src)) locked = FALSE - update_icon() + update_appearance(updates = ALL) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people /obj/structure/bodycontainer/crematorium/creamatorium @@ -362,7 +360,7 @@ GLOBAL_LIST_EMPTY(crematoriums) /obj/structure/tray/Destroy() if(connected) connected.connected = null - connected.update_icon() + connected.update_appearance(updates = ALL) connected = null return ..() diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 8913505ecbf4..232a36327c3c 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -56,7 +56,7 @@ FLOOR SAFES space += I.w_class I.forceMove(src) -/obj/structure/safe/update_icon() +/obj/structure/safe/update_appearance(updates = ALL) if(open) icon_state = "[initial(icon_state)]-open" else @@ -147,7 +147,7 @@ FLOOR SAFES return to_chat(user, span_notice("You [open ? "close" : "open"] [src].")) open = !open - update_icon() + update_appearance(updates = ALL) return TRUE if("turnright") if(open) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 04d361b2b1dc..833fddea39a3 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -29,7 +29,7 @@ /obj/machinery/shower/interact(mob/M) on = !on - update_icon() + update_appearance(updates = ALL) handle_mist() add_fingerprint(M) if(on) @@ -69,7 +69,7 @@ . = ..() . += span_notice("You can alt-click to change the temperature.") -/obj/machinery/shower/update_icon() +/obj/machinery/shower/update_appearance(updates = ALL) . = ..() cut_overlays() if(on) diff --git a/code/game/objects/structures/stairs.dm b/code/game/objects/structures/stairs.dm index 40e2517985d8..60b914b4e63d 100644 --- a/code/game/objects/structures/stairs.dm +++ b/code/game/objects/structures/stairs.dm @@ -34,12 +34,12 @@ update_surrounding() /obj/structure/stairs/proc/update_surrounding() - update_icon() + update_appearance(updates = ALL) for(var/i in GLOB.cardinals) var/turf/T = get_step(get_turf(src), i) var/obj/structure/stairs/S = locate() in T if(S) - S.update_icon() + S.update_appearance(updates = ALL) /obj/structure/stairs/Uncross(atom/movable/AM, atom/newloc) if(!newloc || !AM) @@ -54,7 +54,7 @@ return FALSE return ..() -/obj/structure/stairs/update_icon() +/obj/structure/stairs/update_appearance(updates = ALL) if(isTerminator()) icon_state = "stairs_t" else diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index b43ba8e6d852..3e86be1d3dcd 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -73,7 +73,7 @@ /obj/structure/table/proc/deconstruction_hints(mob/user) return span_notice("The top is screwed on, but the main bolts are also visible.") -/obj/structure/table/update_icon() +/obj/structure/table/update_appearance(updates = ALL) if(smooth) queue_smooth(src) queue_smooth_neighbors(src) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index e444e73b84b0..f36ce75888ea 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -23,9 +23,9 @@ new /obj/item/tank/internals/oxygen(src) for(var/i in 1 to plasmatanks) new /obj/item/tank/internals/plasma(src) - update_icon() + update_appearance(updates = ALL) -/obj/structure/tank_dispenser/update_icon() +/obj/structure/tank_dispenser/update_appearance(updates = ALL) cut_overlays() switch(oxygentanks) if(1 to 3) @@ -69,7 +69,7 @@ if(!user.transferItemToLoc(I, src)) return to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(updates = ALL) /obj/structure/tank_dispenser/ui_state(mob/user) return GLOB.physical_state @@ -109,7 +109,7 @@ usr.put_in_hands(tank) oxygentanks-- . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/structure/tank_dispenser/deconstruct(disassembled = TRUE) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 55a4f827e09a..50e89b5c148d 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -38,7 +38,7 @@ for(var/obj/structure/transit_tube_pod/pod in loc) if(!pod.moving && !pod.cargo) AM.forceMove(pod) - pod.update_icon() + pod.update_appearance(updates = ALL) return @@ -152,7 +152,7 @@ continue S.forceMove(pod) playsound(src, 'sound/mecha/mechturn.ogg', 25 ,1) - pod.update_icon() + pod.update_appearance(updates = ALL) sleep(SleepTime) if(open_status == STATION_TUBE_CLOSED && pod && pod.loc == loc) pod.follow_tube() diff --git a/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm index 363e07b906eb..96e6a71bee93 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm @@ -4,7 +4,7 @@ cargo = TRUE name = "transit tube cargo pod" -/obj/structure/transit_tube_pod/cargo/update_icon() +/obj/structure/transit_tube_pod/cargo/update_appearance(updates = ALL) if(contents.len) icon_state = "pod_cargo_occupied" else diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index ee2906ab84bf..9a9901d9b4f0 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -19,7 +19,7 @@ empty_pod() return ..() -/obj/structure/transit_tube_pod/update_icon() +/obj/structure/transit_tube_pod/update_appearance(updates = ALL) if(contents.len) icon_state = "pod_occupied" else @@ -88,7 +88,7 @@ location = get_turf(src) for(var/atom/movable/M in contents) M.forceMove(location) - update_icon() + update_appearance(updates = ALL) /obj/structure/transit_tube_pod/Process_Spacemove() if(moving) //No drifting while moving in the tubes @@ -176,7 +176,7 @@ if(direction == turn(station.boarding_dir,180)) if(station.open_status == STATION_TUBE_OPEN) mob.forceMove(loc) - update_icon() + update_appearance(updates = ALL) else station.open_animation() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 2b574b751802..a8546fc98e88 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -14,7 +14,7 @@ /obj/structure/toilet/Initialize() . = ..() open = round(rand(0, 1)) - update_icon() + update_appearance(updates = ALL) /obj/structure/toilet/attack_hand(mob/living/user) @@ -67,10 +67,10 @@ w_items -= I.w_class else open = !open - update_icon() + update_appearance(updates = ALL) -/obj/structure/toilet/update_icon() +/obj/structure/toilet/update_appearance(updates = ALL) icon_state = "toilet[open][cistern]" @@ -81,7 +81,7 @@ if(I.use_tool(src, user, 30)) user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", span_notice("You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!"), span_italics("You hear grinding porcelain.")) cistern = !cistern - update_icon() + update_appearance(updates = ALL) else if(cistern) if(user.a_intent != INTENT_HARM) @@ -392,9 +392,9 @@ /obj/structure/curtain/proc/toggle() open = !open - update_icon() + update_appearance(updates = ALL) -/obj/structure/curtain/update_icon() +/obj/structure/curtain/update_appearance(updates = ALL) if(!open) icon_state = "closed" layer = WALL_OBJ_LAYER diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index dd0090d3053e..88b52cf01bf8 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -47,7 +47,7 @@ setDir(ini_dir) move_update_air(T) -/obj/structure/windoor_assembly/update_icon() +/obj/structure/windoor_assembly/update_appearance(updates = ALL) icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]" /obj/structure/windoor_assembly/CanAllowThrough(atom/movable/mover, turf/target) @@ -309,7 +309,7 @@ return ..() //Update to reflect changes(if applicable) - update_icon() + update_appearance(updates = ALL) @@ -339,7 +339,7 @@ /obj/structure/windoor_assembly/proc/after_rotation(mob/user) ini_dir = dir - update_icon() + update_appearance(updates = ALL) //Flips the windoor assembly, determines whather the door opens to the left or the right /obj/structure/windoor_assembly/verb/flip() @@ -361,5 +361,5 @@ facing = "l" to_chat(usr, span_notice("The windoor will now slide to the left.")) - update_icon() + update_appearance(updates = ALL) return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 275e6dcf83d2..3a6d0267fd56 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -329,12 +329,12 @@ //This proc is used to update the icons of nearby windows. /obj/structure/window/proc/update_nearby_icons() - update_icon() + update_appearance(updates = ALL) if(smooth) queue_smooth_neighbors(src) //merges adjacent full-tile windows into one -/obj/structure/window/update_icon() +/obj/structure/window/update_appearance(updates = ALL) if(!QDELETED(src)) if(!fulltile) return @@ -810,7 +810,7 @@ /obj/structure/window/reinforced/clockwork/ratvar_act() if(GLOB.ratvar_awakens) obj_integrity = max_integrity - update_icon() + update_appearance(updates = ALL) /obj/structure/window/reinforced/clockwork/narsie_act() take_damage(rand(25, 75), BRUTE) @@ -876,7 +876,7 @@ /obj/structure/window/paperframe/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/window/paperframe/examine(mob/user) . = ..() @@ -902,19 +902,19 @@ playsound(src, hitsound, 50, 1) if(!QDELETED(src)) user.visible_message(span_danger("[user] tears a hole in [src].")) - update_icon() + update_appearance(updates = ALL) -/obj/structure/window/paperframe/update_icon() - if(obj_integrity < max_integrity) - cut_overlay(paper) - add_overlay(torn) - set_opacity(FALSE) - else - cut_overlay(torn) - add_overlay(paper) - set_opacity(TRUE) +/obj/structure/window/paperframe/update_appearance(updates) + . = ..() + set_opacity(obj_integrity >= max_integrity) + +/obj/structure/window/paperframe/update_icon(updates=ALL) + . = ..() queue_smooth(src) +/obj/structure/window/paperframe/update_overlays() + . = ..() + . += (obj_integrity < max_integrity) ? torn : paper /obj/structure/window/paperframe/attackby(obj/item/W, mob/user) if(W.is_hot()) @@ -929,10 +929,10 @@ qdel(W) user.visible_message("[user] patches some of the holes in \the [src].") if(obj_integrity == max_integrity) - update_icon() + update_appearance(updates = ALL) return ..() - update_icon() + update_appearance(updates = ALL) @@ -953,9 +953,9 @@ /obj/structure/cloth_curtain/proc/toggle() open = !open - update_icon() + update_appearance(updates = ALL) -/obj/structure/cloth_curtain/update_icon() +/obj/structure/cloth_curtain/update_appearance(updates = ALL) if(!open) icon_state = "curtain_closed" layer = WALL_OBJ_LAYER diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index de63a88639dd..17a4e0910825 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -322,7 +322,7 @@ /turf/open/floor/grass/fairy/Initialize() . = ..() icon_state = "fairygrass[rand(1,4)]" - update_icon() + update_appearance(updates = ALL) /turf/open/indestructible/boss //you put stone tiles on this and use it as a base name = "necropolis floor" diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 4101efd3ac69..7d09ead97354 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -115,7 +115,7 @@ /turf/open/floor/blob_act(obj/structure/blob/B) return -/turf/open/floor/proc/update_icon() +/turf/open/floor/update_appearance(updates = ALL) update_visuals() return 1 @@ -164,7 +164,7 @@ W.icon_regular_floor = old_icon W.icon_state_regular_floor = old_icon_state W.setDir(old_dir) - W.update_icon() + W.update_appearance(updates = ALL) return W /turf/open/floor/attackby(obj/item/C, mob/user, params) @@ -285,7 +285,7 @@ new_window.req_one_access = the_rcd.airlock_electronics.one_access new_window.unres_sides = the_rcd.airlock_electronics.unres_sides new_window.autoclose = TRUE - new_window.update_icon() + new_window.update_appearance(updates = ALL) return TRUE to_chat(user, span_notice("You build an airlock.")) var/obj/machinery/door/airlock/new_airlock = new the_rcd.airlock_type(src) @@ -304,7 +304,7 @@ if(new_airlock.electronics.unres_sides) new_airlock.unres_sides = new_airlock.electronics.unres_sides new_airlock.autoclose = TRUE - new_airlock.update_icon() + new_airlock.update_appearance(updates = ALL) return TRUE if(RCD_DECONSTRUCT) diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 2789469e486c..90530dd55a00 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -197,7 +197,7 @@ . = ..() if(src.type == /turf/open/floor/grass) //don't want grass subtypes getting the icon state, icon_state = "grass[rand(1,4)]" - update_icon() + update_appearance(updates = ALL) /turf/open/floor/grass/attackby(obj/item/C, mob/user, params) if((C.tool_behaviour == TOOL_SHOVEL) && params) @@ -293,9 +293,9 @@ /turf/open/floor/carpet/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/turf/open/floor/carpet/update_icon() +/turf/open/floor/carpet/update_appearance(updates = ALL) if(!..()) return 0 if(!broken && !burnt) @@ -402,11 +402,11 @@ /turf/open/floor/carpet/break_tile() broken = TRUE - update_icon() + update_appearance(updates = ALL) /turf/open/floor/carpet/burn_tile() burnt = TRUE - update_icon() + update_appearance(updates = ALL) /turf/open/floor/carpet/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) return FALSE diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index b890683f6af5..d5ece9c632cd 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -34,7 +34,7 @@ /turf/open/floor/light/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) if(!length(lighttile_designs)) populate_lighttile_designs() @@ -43,7 +43,7 @@ light_range = 0 update_light() -/turf/open/floor/light/update_icon() +/turf/open/floor/light/update_appearance(updates = ALL) ..() if(on) switch(state) @@ -79,7 +79,7 @@ if(!choice) return FALSE currentcolor = choice - update_icon() + update_appearance(updates = ALL) /turf/open/floor/light/attack_ai(mob/user) if(!can_modify_colour) @@ -88,7 +88,7 @@ if(!choice) return FALSE currentcolor = choice - update_icon() + update_appearance(updates = ALL) return attack_hand(user) /turf/open/floor/light/attackby(obj/item/C, mob/user, params) @@ -98,7 +98,7 @@ if(state && user.temporarilyRemoveItemFromInventory(C)) qdel(C) state = 0 //fixing it by bashing it with a light bulb, fun eh? - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You replace the light bulb.")) else to_chat(user, span_notice("The light bulb seems fine, no need to replace it.")) diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index e99722885d0d..3b3f30c12b13 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -23,7 +23,7 @@ icons = typelist("icons", icons) -/turf/open/floor/mineral/update_icon() +/turf/open/floor/mineral/update_appearance(updates = ALL) if(!..()) return 0 if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index bb8bd5a8ec7e..d2dc9452a4dc 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -20,14 +20,14 @@ /turf/open/floor/circuit/Initialize() SSmapping.nuke_tiles += src - update_icon() + update_appearance(updates = ALL) . = ..() /turf/open/floor/circuit/Destroy() SSmapping.nuke_tiles -= src return ..() -/turf/open/floor/circuit/update_icon() +/turf/open/floor/circuit/update_appearance(updates = ALL) if(on) if(LAZYLEN(SSmapping.nuke_threats)) icon_state = "rcircuitanim" diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index e3150da9027d..610317fe2975 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -13,7 +13,7 @@ new /obj/effect/glowing_rune(src) ChangeTurf(/turf/open/floor/plating/rust) -/turf/open/floor/plasteel/update_icon() +/turf/open/floor/plasteel/update_appearance(updates = ALL) if(!..()) return 0 if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 947be76e60d9..1b94ef3cfea7 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -44,7 +44,7 @@ else icon_plating = initial(icon_state) -/turf/open/floor/plating/update_icon() +/turf/open/floor/plating/update_appearance(updates = ALL) if(!..()) return if(!broken && !burnt) diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 262c13095871..0436586512a2 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -93,9 +93,9 @@ if(hardness <= 0) gets_drilled(user,triggered_by_explosion) else - update_icon() + update_appearance(updates = ALL) -/turf/closed/mineral/proc/update_icon() +/turf/closed/mineral/update_appearance(updates = ALL) if(hardness != initial(hardness)) var/mutable_appearance/cracks = mutable_appearance('icons/turf/mining.dmi',"rock_cracks",ON_EDGED_TURF_LAYER) var/matrix/M = new diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index 628a6d692b24..5375b213faf4 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -55,7 +55,7 @@ if(W.tool_behaviour == TOOL_WIRECUTTER) W.play_tool_sound(src, 100) d_state = SUPPORT_LINES - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You cut the outer grille.")) return 1 @@ -66,14 +66,14 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_LINES) return 1 d_state = COVER - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You unsecure the support lines.")) return 1 else if(W.tool_behaviour == TOOL_WIRECUTTER) W.play_tool_sound(src, 100) d_state = INTACT - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You repair the outer grille.")) return 1 @@ -86,7 +86,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != COVER) return 1 d_state = CUT_COVER - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You press firmly on the cover, dislodging it.")) return 1 @@ -96,7 +96,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != COVER) return 1 d_state = SUPPORT_LINES - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("The support lines have been secured.")) return 1 @@ -107,7 +107,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != CUT_COVER) return 1 d_state = ANCHOR_BOLTS - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You pry off the cover.")) return 1 @@ -119,7 +119,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != CUT_COVER) return TRUE d_state = COVER - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("The metal cover has been welded securely to the frame.")) return 1 @@ -130,7 +130,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS) return 1 d_state = SUPPORT_RODS - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You remove the bolts anchoring the support rods.")) return 1 @@ -140,7 +140,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS) return 1 d_state = CUT_COVER - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("The metal cover has been pried back into place.")) return 1 @@ -153,7 +153,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_RODS) return 1 d_state = SHEATH - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You slice through the support rods.")) return 1 @@ -164,7 +164,7 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_RODS) return 1 d_state = ANCHOR_BOLTS - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You tighten the bolts anchoring the support rods.")) return 1 @@ -186,12 +186,12 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != SHEATH) return TRUE d_state = SUPPORT_RODS - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You weld the support rods back together.")) return 1 return 0 -/turf/closed/wall/r_wall/proc/update_icon() +/turf/closed/wall/r_wall/update_appearance(updates = ALL) if(d_state != INTACT) smooth = SMOOTH_FALSE clear_smooth_overlays() diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index e976bada3522..c4debfcb6a4f 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -8,7 +8,7 @@ /turf/open/space/transit/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) RegisterSignal(src, COMSIG_TURF_RESERVATION_RELEASED, PROC_REF(launch_contents)) /turf/open/space/transit/Destroy() @@ -67,7 +67,7 @@ /turf/open/space/transit/east dir = EAST -/turf/open/space/transit/proc/update_icon() +/turf/open/space/transit/update_appearance(updates = ALL) icon_state = "speedspace_ns_[get_transit_state(src)]" transform = turn(matrix(), get_transit_angle(src)) diff --git a/code/modules/NTNet/relays.dm b/code/modules/NTNet/relays.dm index 036d4593691f..553cf2f814af 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -32,7 +32,7 @@ return FALSE return TRUE -/obj/machinery/ntnet_relay/update_icon() +/obj/machinery/ntnet_relay/update_appearance(updates = ALL) cut_overlays() if(is_operational()) var/mutable_appearance/on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") @@ -49,7 +49,7 @@ else use_power = IDLE_POWER_USE - update_icon() + update_appearance(updates = ALL) if(dos_overload > 0) dos_overload = max(0, dos_overload - dos_dissipate * delta_time) @@ -57,12 +57,12 @@ // If DoS traffic exceeded capacity, crash. if((dos_overload > dos_capacity) && !dos_failure) dos_failure = 1 - update_icon() + update_appearance(updates = ALL) SSnetworks.station_network.add_log("Quantum relay switched from normal operation mode to overload recovery mode.") // If the DoS buffer reaches 0 again, restart. if((dos_overload == 0) && dos_failure) dos_failure = 0 - update_icon() + update_appearance(updates = ALL) SSnetworks.station_network.add_log("Quantum relay switched from overload recovery mode to normal operation mode.") ..() @@ -89,13 +89,13 @@ if("restart") dos_overload = 0 dos_failure = 0 - update_icon() + update_appearance(updates = ALL) SSnetworks.station_network.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.") return TRUE if("toggle") enabled = !enabled SSnetworks.station_network.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].") - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/ntnet_relay/Initialize() diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 64f814a6ffd0..2046f1ba4c29 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -22,7 +22,7 @@ sparks = new /datum/effect_system/spark_spread() sparks.set_up(2,0) sparks.attach(src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/vr_sleeper/attackby(obj/item/I, mob/user, params) if(!state_open && !occupant) @@ -61,7 +61,7 @@ sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) -/obj/machinery/vr_sleeper/update_icon() +/obj/machinery/vr_sleeper/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" /obj/machinery/vr_sleeper/open_machine() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b9a6b5e9a898..e57cc5232b14 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1397,7 +1397,7 @@ var/obj/item/reagent_containers/food/snacks/cookie/cookie = new(H) if(H.put_in_hands(cookie)) // They have hands and can use them to hold cookies - H.update_inv_hands() + H.update_held_items() log_admin("[key_name(H)] got their cookie in-hand, spawned by [key_name(src.owner)].") message_admins("[key_name(H)] got their cookie in-hand, spawned by [key_name(src.owner)].") else // They do not have hands available, for some reason diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 31990ad0b82f..c185f01b8516 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -457,7 +457,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) var/obj/item/storage/wallet/W = worn W.front_id = id id.forceMove(W) - W.update_icon() + W.update_appearance(updates = ALL) else H.equip_to_slot(id,SLOT_WEAR_ID) else if(isanimal(M)) @@ -848,7 +848,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) F.anchored = TRUE F.warming_up = 3 F.start_fields() - F.update_icon() + F.update_appearance(updates = ALL) spawn(30) for(var/obj/machinery/the_singularitygen/G in GLOB.machines) diff --git a/code/modules/admin/verbs/manipulate_organs.dm b/code/modules/admin/verbs/manipulate_organs.dm index 92eacb7af34b..67b29052c24e 100644 --- a/code/modules/admin/verbs/manipulate_organs.dm +++ b/code/modules/admin/verbs/manipulate_organs.dm @@ -71,4 +71,4 @@ var/obj/item/implantcase/case = new(get_turf(C)) case.imp = I I.forceMove(case) - case.update_icon() + case.update_appearance(updates = ALL) diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 9fcca9388dbf..0949c859fd1e 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc /datum/atom_hud/alternate_appearance/basic/antagonist_hud/process(delta_time) index += 1 - update_icon() + update_appearance(updates = ALL) /datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/check_processing() if (antag_hud_images.len > 1 && !(DF_ISPROCESSING in datum_flags)) @@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc return final_antag_hud_images -/datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_icon() +/datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_appearance(updates = ALL) if (antag_hud_images.len == 0) image.icon = icon('icons/blanks/32x32.dmi', "nothing") else @@ -88,5 +88,5 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc antag_hud_images = get_antag_hud_images(source) index = clamp(index, 1, antag_hud_images.len) - update_icon() + update_appearance(updates = ALL) check_processing() diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 3b783cd6e0c7..141c0fcf1c4e 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -74,7 +74,7 @@ M.icon_state = disguise.icon_state M.cut_overlays() M.add_overlay(disguise.overlays) - M.update_inv_hands() + M.update_held_items() /obj/item/clothing/suit/armor/abductor/vest/proc/DeactivateStealth() if(!stealth_active) @@ -405,8 +405,9 @@
    Congratulations! You are now trained for invasive xenobiology research!"} -/obj/item/paper/guides/antag/abductor/update_icon() - return +/obj/item/paper/guides/antag/abductor/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/paper/guides/antag/abductor/AltClick() return //otherwise it would fold into a paperplane. @@ -442,9 +443,9 @@ Congratulations! You are now trained for invasive xenobiology research!"} txt = "probing" to_chat(usr, span_notice("You switch the baton to [txt] mode.")) - update_icon() + update_appearance(updates = ALL) -/obj/item/abductor/baton/update_icon() +/obj/item/abductor/baton/update_appearance(updates = ALL) switch(mode) if(BATON_STUN) icon_state = "wonderprodStun" diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm index 0aa4fa5d0dd6..475184e294b6 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -18,6 +18,7 @@ var/active_mind_control = FALSE /obj/item/organ/heart/gland/Initialize() + AddElement(/datum/element/update_icon_blocker) . = ..() icon_state = pick(list("health", "spider", "slime", "emp", "species", "egg", "vent", "mindshock", "viral")) @@ -49,9 +50,6 @@ holder.icon_state = "hudgland_ready" else holder.icon_state = "hudgland_spent" - -/obj/item/organ/heart/gland/update_icon() - return // stop it from switching to the non existent heart_on sprite /obj/item/organ/heart/gland/proc/mind_control(command, mob/living/user) if(!ownerCheck() || !mind_control_uses || active_mind_control) diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index af79d3d5e118..156cc8147300 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -183,7 +183,7 @@ SSjob.SendToLateJoin(H, FALSE) return -/obj/machinery/abductor/experiment/update_icon() +/obj/machinery/abductor/experiment/update_appearance(updates = ALL) if(state_open) icon_state = "experiment-open" else diff --git a/code/modules/antagonists/blob/blobstrains/_blobstrain.dm b/code/modules/antagonists/blob/blobstrains/_blobstrain.dm index 87e87ba24c67..b949270203df 100644 --- a/code/modules/antagonists/blob/blobstrains/_blobstrain.dm +++ b/code/modules/antagonists/blob/blobstrains/_blobstrain.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_INIT(valid_blobstrains, subtypesof(/datum/blobstrain) - list(/datum/ point_rate = point_rate * overmind.basemodifier for(var/BL in GLOB.blobs) var/obj/structure/blob/B = BL - B.update_icon() + B.update_appearance(updates = ALL) for(var/BLO in overmind.blob_mobs) var/mob/living/simple_animal/hostile/blob/BM = BLO BM.update_icons() //If it's getting a new strain, tell it what it does! diff --git a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm index 6f922e7694de..d407df3ff44b 100644 --- a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm +++ b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm @@ -17,7 +17,7 @@ var/obj/structure/blob/newB = B.expand(null, null, 0) if(newB) newB.obj_integrity = B.obj_integrity - damage - newB.update_icon() + newB.update_appearance(updates = ALL) return ..() diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 8741b6920db1..e60bc379820a 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -59,7 +59,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) set_strain(BS) color = blobstrain.complementary_color if(blob_core) - blob_core.update_icon() + blob_core.update_appearance(updates = ALL) SSshuttle.registerHostileEnvironment(src) announcement_time = world.time + 6000 . = ..() @@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) var/obj/structure/blob/B = BL if(B && B.overmind == src) B.overmind = null - B.update_icon() //reset anything that was ours + B.update_appearance(updates = ALL) //reset anything that was ours for(var/BLO in blob_mobs) var/mob/living/simple_animal/hostile/blob/BM = BLO if(BM) diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm index 2aa7516c5faf..dad35bc8ed9b 100644 --- a/code/modules/antagonists/blob/powers.dm +++ b/code/modules/antagonists/blob/powers.dm @@ -51,7 +51,7 @@ core.overmind = src blobs_legit += src blob_core = core - core.update_icon() + core.update_appearance(updates = ALL) update_health_hud() placed = 1 return 1 @@ -173,7 +173,7 @@ if(LAZYLEN(candidates)) //if we got at least one candidate, they're a blobbernaut now. B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health B.obj_integrity = min(B.obj_integrity, B.max_integrity) - B.update_icon() + B.update_appearance(updates = ALL) B.visible_message(span_warning("The blobbernaut [pick("rips", "tears", "shreds")] its way out of the factory blob!")) playsound(B.loc, 'sound/effects/splat.ogg', 50, 1) var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut(get_turf(B)) diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index faab39fc9ded..669c83db1568 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -29,7 +29,7 @@ overmind.blobs_legit += src GLOB.blobs += src //Keep track of the blob in the normal list either way setDir(pick(GLOB.cardinals)) - update_icon() + update_appearance(updates = ALL) if(atmosblock) air_update_turf(1) ConsumeTile() @@ -82,7 +82,7 @@ var/atom/movable/mover = caller . = . || (mover.pass_flags & PASSBLOB) -/obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind. +/obj/structure/blob/update_appearance(updates = ALL) //Updates color based on overmind color if we have an overmind. if(overmind) add_atom_colour(overmind.blobstrain.color, FIXED_COLOUR_PRIORITY) else @@ -103,7 +103,7 @@ var/obj/structure/blob/B = L if(!B.overmind && !istype(B, /obj/structure/blob/core) && prob(30)) B.overmind = pulsing_overmind //reclaim unclaimed, non-core blobs. - B.update_icon() + B.update_appearance(updates = ALL) var/distance = get_dist(get_turf(src), get_turf(B)) var/expand_probablity = max(20 - distance * 8, 1) if(B.Adjacent(src)) @@ -127,7 +127,7 @@ if(heal_timestamp <= world.time) obj_integrity = min(max_integrity, obj_integrity+health_regen) heal_timestamp = world.time + 20 - update_icon() + update_appearance(updates = ALL) pulse_timestamp = world.time + 10 return 1 //we did it, we were pulsed! return 0 //oh no we failed @@ -185,7 +185,7 @@ if(T.Enter(B,src)) //NOW we can attempt to move into the tile B.density = initial(B.density) B.forceMove(T) - B.update_icon() + B.update_appearance(updates = ALL) if(B.overmind && expand_reaction) B.overmind.blobstrain.expand_reaction(src, B, T, controller) return B @@ -289,7 +289,7 @@ /obj/structure/blob/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() if(. && obj_integrity > 0) - update_icon() + update_appearance(updates = ALL) /obj/structure/blob/obj_destruction(damage_flag) if(overmind) @@ -301,7 +301,7 @@ CRASH("change_to(): invalid type for blob") var/obj/structure/blob/B = new type(src.loc, controller) B.creation_action() - B.update_icon() + B.update_appearance(updates = ALL) B.setDir(dir) qdel(src) return B @@ -344,7 +344,7 @@ return "Currently weak to brute damage." return "N/A" -/obj/structure/blob/normal/update_icon() +/obj/structure/blob/normal/update_appearance(updates = ALL) ..() if(obj_integrity <= 15) icon_state = "blob_damaged" diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index 98ac915e8b11..8ca9c0566e98 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -14,17 +14,17 @@ GLOB.blob_cores += src START_PROCESSING(SSobj, src) GLOB.poi_list |= src - update_icon() //so it atleast appears + update_appearance(updates = ALL) //so it atleast appears if(!placed && !overmind) return INITIALIZE_HINT_QDEL if(overmind) - update_icon() + update_appearance(updates = ALL) . = ..() /obj/structure/blob/core/scannerreport() return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts." -/obj/structure/blob/core/update_icon() +/obj/structure/blob/core/update_appearance(updates = ALL) cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") diff --git a/code/modules/antagonists/blob/structures/node.dm b/code/modules/antagonists/blob/structures/node.dm index 456b2d8bcf0b..e1d36439561c 100644 --- a/code/modules/antagonists/blob/structures/node.dm +++ b/code/modules/antagonists/blob/structures/node.dm @@ -18,7 +18,7 @@ /obj/structure/blob/node/scannerreport() return "Gradually expands and sustains nearby blob spores and blobbernauts." -/obj/structure/blob/node/update_icon() +/obj/structure/blob/node/update_appearance(updates = ALL) cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") diff --git a/code/modules/antagonists/blob/structures/shield.dm b/code/modules/antagonists/blob/structures/shield.dm index 0a21174326c4..8392fa8c53ab 100644 --- a/code/modules/antagonists/blob/structures/shield.dm +++ b/code/modules/antagonists/blob/structures/shield.dm @@ -19,7 +19,7 @@ /obj/structure/blob/shield/core point_return = 0 -/obj/structure/blob/shield/update_icon() +/obj/structure/blob/shield/update_appearance(updates = ALL) ..() if(obj_integrity < max_integrity * 0.5) icon_state = "[initial(icon_state)]_damaged" diff --git a/code/modules/antagonists/bloodsuckers/powers/targeted/lasombra.dm b/code/modules/antagonists/bloodsuckers/powers/targeted/lasombra.dm index 450049b3ed12..6ce4cda367a1 100644 --- a/code/modules/antagonists/bloodsuckers/powers/targeted/lasombra.dm +++ b/code/modules/antagonists/bloodsuckers/powers/targeted/lasombra.dm @@ -78,7 +78,7 @@ if(istype(O, /obj/item/pda)) var/obj/item/pda/PDA = O PDA.set_light_on(FALSE) - PDA.update_icon() + PDA.update_appearance(updates = ALL) O.visible_message(span_danger("The light in [PDA] shorts out!")) else O.visible_message(span_danger("[O] is disintegrated by [src]!")) diff --git a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_coffin.dm b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_coffin.dm index 466683d15ec6..4aa781944d04 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_coffin.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_coffin.dm @@ -162,7 +162,7 @@ if(user == resident) if(welded) welded = FALSE - update_icon() + update_appearance(updates = ALL) locked = FALSE return TRUE playsound(get_turf(src), 'sound/machines/door_locked.ogg', 20, 1) diff --git a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm index 5740e6d5cd4f..ae49d0909e04 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -317,7 +317,7 @@ to_chat(user, span_cult("Seems like you need a direct link to the abyss to awaken [src]. Maybe searching a spacial influence would yield something.")) return icon_state = initial(icon_state) + (awoken ? "_idle" : "_awaken") - update_icon() + update_appearance(updates = ALL) var/rankspent switch(bloodsuckerdatum.clanprogress) if(0) @@ -399,7 +399,7 @@ . = ..() anchored = FALSE -/obj/structure/bloodsucker/moldingstone/update_icon() +/obj/structure/bloodsucker/moldingstone/update_appearance(updates = ALL) cut_overlays() switch(metal) if(1 to 5) @@ -431,7 +431,7 @@ balloon_alert(user, "added [metal] metal") if(istype(I, /obj/item/bloodsucker/chisel)) start_sculpiting(user) - update_icon() + update_appearance(updates = ALL) /obj/structure/bloodsucker/moldingstone/proc/start_sculpiting(mob/living/artist) if(metal < 10) @@ -444,7 +444,7 @@ if(!do_after(artist, 10 SECONDS, src)) artist.balloon_alert(artist, "ruined!") metal -= rand(5, 10) - update_icon() + update_appearance(updates = ALL) return artist.balloon_alert(artist, "done, a masterpiece!") @@ -468,7 +468,7 @@ new /obj/item/stack/sheet/metal(get_turf(user), count) else to_chat(user, span_warning("There's no metal to retrieve in [src].")) - update_icon() + update_appearance(updates = ALL) #undef METALLIMIT /obj/structure/bloodsucker/bloodstatue @@ -714,7 +714,7 @@ playsound(loc, 'sound/effects/pop_expl.ogg', 25, 1) density = TRUE - update_icon() + update_appearance(updates = ALL) // Set up Torture stuff now convert_progress = 3 @@ -750,7 +750,7 @@ visible_message(span_danger("[buckled_mob][buckled_mob.stat == DEAD ? "'s corpse" : ""] slides off of the rack.")) density = FALSE buckled_mob.Paralyze(2 SECONDS) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/structure/bloodsucker/vassalrack/attack_hand(mob/user, list/modifiers) @@ -811,10 +811,10 @@ smallmeat++ meat_amount = bigmeat + intermeat + mediummeat + smallmeat qdel(I) - update_icon() + update_appearance(updates = ALL) #undef MEATLIMIT -/obj/structure/bloodsucker/vassalrack/update_icon() +/obj/structure/bloodsucker/vassalrack/update_appearance(updates = ALL) cut_overlays() if(bigmeat) add_overlay("bigmeat_[bigmeat]") @@ -853,7 +853,7 @@ else to_chat(user, span_warning("There's no meat to retrieve in [src]")) meat_amount = bigmeat + intermeat + mediummeat + smallmeat - update_icon() + update_appearance(updates = ALL) /** * Step One: Tick Down Conversion from 3 to 0 @@ -1153,7 +1153,7 @@ if(bigmeat && meatlost == 4) bigmeat-- meatlost -= 4 - update_icon() + update_appearance(updates = ALL) meat_amount = bigmeat + intermeat + mediummeat + smallmeat //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1187,7 +1187,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/structure/bloodsucker/candelabrum/update_icon() +/obj/structure/bloodsucker/candelabrum/update_appearance(updates = ALL) icon_state = "candelabrum[lit ? "_lit" : ""]" return ..() @@ -1212,7 +1212,7 @@ else set_light(0) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bloodsucker/candelabrum/process() if(!lit) @@ -1288,7 +1288,7 @@ if(!buckle_mob(target)) return - update_icon() + update_appearance(updates = ALL) /obj/structure/bloodsucker/candelabrum/proc/remove_loyalties(mob/living/target, mob/living/user) // Find Mindshield implant & destroy, takes a good while. @@ -1300,7 +1300,7 @@ /obj/structure/bloodsucker/candelabrum/unbuckle_mob(mob/living/buckled_mob, force = FALSE, can_fall = TRUE) . = ..() src.visible_message(span_danger("[buckled_mob][buckled_mob.stat==DEAD?"'s corpse":""] slides off of the candelabrum.")) - update_icon() + update_appearance(updates = ALL) /// Blood Throne - Allows Bloodsuckers to remotely speak with their Vassals. - Code (Mostly) stolen from comfy chairs (armrests) and chairs (layers) /* broken currently diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 5557758aead7..1ed5644b287b 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -33,7 +33,7 @@ if(!silent) playsound(user, 'sound/effects/blobattack.ogg', 30, TRUE) user.visible_message(span_warning("With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!"), span_notice("We assimilate the [weapon_name_simple] back into our body."), "You hear organic matter ripping and tearing!") qdel(blade) - target.update_inv_hands() + target.update_held_items() /*/datum/action/changeling/sting/extract_dna //yogs start - removed extract dna sting name = "Extract DNA Sting" diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index fc43883665ec..872eacf3f592 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -181,7 +181,7 @@ /obj/effect/clockwork/sigil/transmission/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/effect/clockwork/sigil/transmission/ex_act(severity) if(severity == 3) @@ -242,7 +242,7 @@ return FALSE return TRUE -/obj/effect/clockwork/sigil/transmission/update_icon() +/obj/effect/clockwork/sigil/transmission/update_appearance(updates = ALL) var/power_charge = get_clockwork_power() if(GLOB.ratvar_awakens) alpha = 255 diff --git a/code/modules/antagonists/clockcult/clock_helpers/clock_powerdrain.dm b/code/modules/antagonists/clockcult/clock_helpers/clock_powerdrain.dm index 5ada97e2fd2b..b84d1dbd8b83 100644 --- a/code/modules/antagonists/clockcult/clock_helpers/clock_powerdrain.dm +++ b/code/modules/antagonists/clockcult/clock_helpers/clock_powerdrain.dm @@ -21,7 +21,7 @@ shorted = 1 visible_message(span_warning("The [name]'s screen blurs with static.")) update() - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/smes/power_drain(clockcult_user) if(charge) @@ -32,13 +32,13 @@ icon_state = "[initial(icon_state)]-o" do_sparks(10, FALSE, src) visible_message(span_warning("[src]'s panel flies open with a flurry of sparks!")) - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/power_drain(clockcult_user) if(charge) . = min(charge, MIN_CLOCKCULT_POWER*3) charge = use(.) - update_icon() + update_appearance(updates = ALL) /mob/living/silicon/robot/power_drain(clockcult_user) if((!clockcult_user || !is_servant_of_ratvar(src)) && cell && cell.charge) diff --git a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm index 7542c93ca2a2..4b439b4e71cd 100644 --- a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm +++ b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm @@ -12,7 +12,7 @@ else current_power = GLOB.clockwork_power = clamp(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER) for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects) - T.update_icon() + T.update_appearance(updates = ALL) var/unlock_message if(current_power >= SCRIPT_UNLOCK_THRESHOLD && !GLOB.script_scripture_unlocked) GLOB.script_scripture_unlocked = TRUE diff --git a/code/modules/antagonists/clockcult/clock_scripture.dm b/code/modules/antagonists/clockcult/clock_scripture.dm index 4d02e411a297..f953aa8480d3 100644 --- a/code/modules/antagonists/clockcult/clock_scripture.dm +++ b/code/modules/antagonists/clockcult/clock_scripture.dm @@ -322,7 +322,7 @@ GLOBAL_LIST_INIT(scripture_states,scripture_states_init_value()) //list of clock slab.slab_ability = new ranged_type(slab) slab.slab_ability.slab = slab slab.slab_ability.set_ranged_ability(invoker, ranged_message) - invoker.update_inv_hands() + invoker.update_held_items() var/end_time = world.time + timeout_time var/successful = FALSE if(timeout_time) @@ -348,5 +348,5 @@ GLOBAL_LIST_INIT(scripture_states,scripture_states_init_value()) //list of clock slab.item_state = initial(slab.lefthand_file) slab.item_state = initial(slab.righthand_file) slab.inhand_overlay = null - invoker?.update_inv_hands() + invoker?.update_held_items() return successful //slab doesn't look like a word now. diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm index 221436cb1b0d..1397f9dfae59 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm @@ -296,7 +296,7 @@ if(!O.pulledby && !iseffect(O) && O.density) if(!step_away(O, src, 2) || get_dist(O, src) < 2) O.take_damage(50, BURN, BOMB) - O.update_icon() + O.update_appearance(updates = ALL) for(var/V in GLOB.player_list) var/mob/M = V var/turf/T = get_turf(M) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index be5cb128225e..c297cdd1dbfc 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -384,7 +384,7 @@ max = 40 prefix = "darkened" -/obj/item/sharpener/cult/update_icon() +/obj/item/sharpener/cult/update_appearance(updates = ALL) icon_state = "cult_sharpener[used ? "_used" : ""]" /obj/item/clothing/suit/hooded/cultrobes/cult_shield @@ -690,7 +690,7 @@ GLOBAL_VAR_INIT(curselimit, 0) qdel(spear_act) ..() -/obj/item/twohanded/cult_spear/update_icon() +/obj/item/twohanded/cult_spear/update_appearance(updates = ALL) icon_state = "bloodspear[wielded]" /obj/item/twohanded/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 53d7f23a9115..f7c762ea6bd5 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -306,13 +306,14 @@ /obj/structure/destructible/cult/pillar/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration = 0) ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/destructible/cult/pillar/Destroy() new /obj/effect/decal/cleanable/ash(loc) ..() -/obj/structure/destructible/cult/pillar/update_icon() +/obj/structure/destructible/cult/pillar/update_appearance(updates = ALL) + . = ..() icon_state = "pillar[alt ? "alt": ""]2" if (obj_integrity < max_integrity/3) icon_state = "pillar[alt ? "alt": ""]0" @@ -398,7 +399,7 @@ M.playsound_local(src, 'sound/effects/explosionfar.ogg', 50, 1) shake_camera(M, 1, 1) for (var/obj/structure/destructible/cult/pillar/P in pillars) - P.update_icon() + P.update_appearance(updates = ALL) /obj/structure/destructible/cult/bloodstone/proc/summon() resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF //should stop the stone from being destroyed by damage @@ -408,7 +409,7 @@ /obj/structure/destructible/cult/bloodstone/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration = 0) ..() - update_icon() + update_appearance(updates = ALL) /obj/structure/destructible/cult/bloodstone/ex_act(var/severity) switch(severity) @@ -470,7 +471,7 @@ else T.narsie_act(TRUE, TRUE) -/obj/structure/destructible/cult/bloodstone/update_icon() +/obj/structure/destructible/cult/bloodstone/update_appearance(updates = ALL) icon_state = "bloodstone-[current_fullness]" cut_overlays() var/image/I_base = image('icons/obj/cult_64x64.dmi',"bloodstone-base") @@ -500,7 +501,7 @@ animate(color = list(1.25,0.12,0,0,0,1.25,0.12,0,0.12,0,1.25,0,0,0,0,1,0,0,0,0), time = 0.1 SECONDS) animate(color = list(1.125,0.06,0,0,0,1.125,0.06,0,0.06,0,1.125,0,0,0,0,1,0,0,0,0), time = 0.1 SECONDS) set_light(20, 20) - update_icon() + update_appearance(updates = ALL) /obj/structure/destructible/cult/bloodstone/conceal() //lol return diff --git a/code/modules/antagonists/devil/true_devil/inventory.dm b/code/modules/antagonists/devil/true_devil/inventory.dm index a3d0dbdf582b..c79229dfc5bd 100644 --- a/code/modules/antagonists/devil/true_devil/inventory.dm +++ b/code/modules/antagonists/devil/true_devil/inventory.dm @@ -1,10 +1,10 @@ /mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) - update_inv_hands() + update_held_items() return 1 return 0 -/mob/living/carbon/true_devil/update_inv_hands() +/mob/living/carbon/true_devil/update_held_items() //TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_overlay should use the down sprite when facing down, left, or right, and the up sprite when facing up. remove_overlay(DEVIL_HANDS_LAYER) var/list/hands_overlays = list() diff --git a/code/modules/antagonists/eldritch_cult/eldritch_book.dm b/code/modules/antagonists/eldritch_cult/eldritch_book.dm index 75f4bb92702a..a70a3c8cbaf2 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_book.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_book.dm @@ -155,7 +155,7 @@ if(cultie.gain_knowledge(EK)) return TRUE - update_icon() // Not applicable to all objects. + update_appearance(updates = ALL) // Not applicable to all objects. /obj/item/forbidden_book/ui_close(mob/user) flick("book_closing",src) diff --git a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm index 4ec64ef051db..010f17c1862d 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm @@ -761,7 +761,7 @@ pixel_y = rand(-6,6) pixel_x = rand(-6,6) icon_state = "small_rune_[rand(12)]" - update_icon() + update_appearance(updates = ALL) // Shoots out in a wave-like, what rust heretics themselves get /datum/action/cooldown/spell/cone/staggered/entropic_plume diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index fa76d6315e05..a3172c80ac67 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -39,7 +39,7 @@ GLOB.nuke_list += src core = new /obj/item/nuke_core(src) STOP_PROCESSING(SSobj, core) - update_icon() + update_appearance(updates = ALL) GLOB.poi_list |= src previous_level = get_security_level() @@ -111,7 +111,7 @@ if(I.use_tool(src, user, 60, volume=100)) deconstruction_state = NUKESTATE_UNSCREWED to_chat(user, span_notice("You remove the screws from [src]'s front panel.")) - update_icon() + update_appearance(updates = ALL) return if(NUKESTATE_PANEL_REMOVED) @@ -122,7 +122,7 @@ if(I.use_tool(src, user, 80, volume=100, amount=1)) to_chat(user, span_notice("You cut [src]'s inner plate.")) deconstruction_state = NUKESTATE_WELDED - update_icon() + update_appearance(updates = ALL) return if(NUKESTATE_CORE_EXPOSED) if(istype(I, /obj/item/nuke_core_container)) @@ -132,7 +132,7 @@ if(core_box.load(core, user)) to_chat(user, span_notice("You load the plutonium core into [core_box].")) deconstruction_state = NUKESTATE_CORE_REMOVED - update_icon() + update_appearance(updates = ALL) core = null else to_chat(user, span_warning("You fail to load the plutonium core into [core_box]. [core_box] has already been used!")) @@ -146,7 +146,7 @@ to_chat(user, span_notice("You repair [src]'s inner metal plate. The radiation is contained.")) deconstruction_state = NUKESTATE_PANEL_REMOVED STOP_PROCESSING(SSobj, core) - update_icon() + update_appearance(updates = ALL) return . = ..() @@ -158,14 +158,14 @@ if(tool.use_tool(src, user, 30, volume=100)) to_chat(user, span_notice("You remove [src]'s front panel.")) deconstruction_state = NUKESTATE_PANEL_REMOVED - update_icon() + update_appearance(updates = ALL) return TRUE if(NUKESTATE_WELDED) to_chat(user, span_notice("You start prying off [src]'s inner plate...")) if(tool.use_tool(src, user, 30, volume=100)) to_chat(user, span_notice("You pry off [src]'s inner plate. You can see the core's green glow!")) deconstruction_state = NUKESTATE_CORE_EXPOSED - update_icon() + update_appearance(updates = ALL) START_PROCESSING(SSobj, core) return TRUE @@ -179,7 +179,7 @@ else return NUKE_OFF_UNLOCKED -/obj/machinery/nuclearbomb/update_icon() +/obj/machinery/nuclearbomb/update_appearance(updates = ALL) if(deconstruction_state == NUKESTATE_INTACT) switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) @@ -408,7 +408,7 @@ timing = FALSE detonation_timer = null countdown.stop() - update_icon() + update_appearance(updates = ALL) /obj/machinery/nuclearbomb/proc/set_active() if(safety) @@ -429,7 +429,7 @@ S.switch_mode_to(initial(S.mode)) S.alert = FALSE countdown.stop() - update_icon() + update_appearance(updates = ALL) /obj/machinery/nuclearbomb/proc/get_time_left() if(timing) @@ -456,7 +456,7 @@ exploding = TRUE yes_code = FALSE safety = TRUE - update_icon() + update_appearance(updates = ALL) sound_to_playing_players('sound/machines/alarm.ogg') if(SSticker && SSticker.mode) SSticker.roundend_check_paused = TRUE @@ -563,7 +563,7 @@ S.switch_mode_to(initial(S.mode)) S.alert = FALSE countdown.stop() - update_icon() + update_appearance(updates = ALL) /obj/machinery/nuclearbomb/beer/proc/fizzbuzz() var/datum/reagents/R = new/datum/reagents(1000) diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index 5ba81ca9faa7..e4a47a7de7c6 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -183,7 +183,7 @@ /datum/outfit/nuclear_operative_elite/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/shield/energy/shield = locate() in H.held_items shield.icon_state = "[shield.base_icon_state]1" - H.update_inv_hands() + H.update_held_items() /datum/antagonist/nukeop/leader name = "Nuclear Operative Leader" diff --git a/code/modules/antagonists/official/official.dm b/code/modules/antagonists/official/official.dm index 8b1c544e25e6..f39b417392c5 100644 --- a/code/modules/antagonists/official/official.dm +++ b/code/modules/antagonists/official/official.dm @@ -86,4 +86,4 @@ /datum/antagonist/centcom/grand_admiral name = "CentCom Grand Admiral" role = "Grand Admiral" - outfit = /datum/outfit/centcom/grand_admiral \ No newline at end of file + outfit = /datum/outfit/centcom/grand_admiral diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm index 2e0f24481c15..8cf014a34d7c 100644 --- a/code/modules/antagonists/revolution/revolution.dm +++ b/code/modules/antagonists/revolution/revolution.dm @@ -151,7 +151,7 @@ to_chat(admin, span_danger("Repairing flash failed!")) else flash.burnt_out = FALSE - flash.update_icon() + flash.update_appearance(updates = ALL) /datum/antagonist/rev/head/proc/admin_demote(datum/mind/target,mob/user) message_admins("[key_name_admin(user)] has demoted [key_name_admin(owner)] from head revolutionary.") diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index f81c23c44083..449c64a2daa9 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -75,8 +75,9 @@ icon = 'icons/obj/surgery.dmi' icon_state = "demon_heart-on" -/obj/item/organ/heart/demon/update_icon() - return //always beating visually +/obj/item/organ/internal/heart/demon/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/organ/heart/demon/attack(mob/M, mob/living/carbon/user, obj/target) if(M != user) diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm index 8d1dd9363c25..e6e745a62d83 100644 --- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm +++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm @@ -654,7 +654,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/AI_Module)) if(!is_station_level(F.z)) continue F.obj_flags |= EMAGGED - F.update_icon() + F.update_appearance(updates = ALL) to_chat(owner, span_notice("All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.")) owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0) diff --git a/code/modules/antagonists/zombie/abilities/spit.dm b/code/modules/antagonists/zombie/abilities/spit.dm index 809bf1767c5b..d6995eec3c59 100644 --- a/code/modules/antagonists/zombie/abilities/spit.dm +++ b/code/modules/antagonists/zombie/abilities/spit.dm @@ -12,7 +12,7 @@ else add_ranged_ability(user, span_notice("You open your neurotoxin reserves. Left-click to fire at a target!"), TRUE) -/obj/effect/proc_holder/zombie/spit/update_icon() +/obj/effect/proc_holder/zombie/spit/update_appearance(updates = ALL) action.button_icon_state = "alien_neurotoxin_[active]" action.build_all_button_icons() diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index ed41fff2b090..41c4b8645173 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -18,7 +18,7 @@ throw_range = 7 var/is_position_sensitive = FALSE //set to true if the device has different icons for each position. - //This will prevent things such as visible lasers from facing the incorrect direction when transformed by assembly_holder's update_icon() + //This will prevent things such as visible lasers from facing the incorrect direction when transformed by assembly_holder's update_appearance(updates = ALL) var/secured = TRUE var/list/attached_overlays = null var/obj/item/assembly_holder/holder = null @@ -89,7 +89,7 @@ /obj/item/assembly/proc/toggle_secure() secured = !secured - update_icon() + update_appearance(updates = ALL) return secured diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 7b8590f3d416..5b28c80850f1 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -19,7 +19,7 @@ /obj/item/onetankbomb/examine(mob/user) return bombtank.examine(user) -/obj/item/onetankbomb/update_icon() +/obj/item/onetankbomb/update_appearance(updates = ALL) cut_overlays() if(bombtank) icon = bombtank.icon @@ -132,7 +132,7 @@ master = bomb forceMove(bomb) - bomb.update_icon() + bomb.update_appearance(updates = ALL) user.put_in_hands(bomb) //Equips the bomb if possible, or puts it on the floor. to_chat(user, span_notice("You attach [assembly] to [src].")) diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm index 8eff567fcb1a..f6c91fc26751 100644 --- a/code/modules/assembly/doorcontrol.dm +++ b/code/modules/assembly/doorcontrol.dm @@ -65,7 +65,7 @@ if(specialfunctions & BOLTS) if(!D.wires.is_cut(WIRE_BOLTS) && D.hasPower()) D.locked = !D.locked - D.update_icon() + D.update_appearance(updates = ALL) if(specialfunctions & SHOCK) if(D.secondsElectrified) D.set_electrified(MACHINE_ELECTRIFIED_PERMANENT, usr) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index e3ea2cf94db0..0f7629096e55 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -54,9 +54,9 @@ if(flash) add_overlay(flashing_overlay) attached_overlays += flashing_overlay - addtimer(CALLBACK(src, PROC_REF(update_icon)), 5) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 5) if(holder) - holder.update_icon() + holder.update_appearance(updates = ALL) /obj/item/assembly/flash/proc/clown_check(mob/living/carbon/human/user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) @@ -67,7 +67,7 @@ /obj/item/assembly/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something. if(!burnt_out) burnt_out = TRUE - update_icon() + update_appearance(updates = ALL) if(ismob(loc)) var/mob/M = loc M.visible_message(span_danger("[src] burns out!"),span_userdanger("[src] burns out!")) diff --git a/code/modules/assembly/health.dm b/code/modules/assembly/health.dm index 69f90681a7ca..fb22dede8413 100644 --- a/code/modules/assembly/health.dm +++ b/code/modules/assembly/health.dm @@ -27,7 +27,7 @@ else scanning = FALSE STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) return secured /obj/item/assembly/health/AltClick(mob/living/user) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index b00f74e42374..47d29c21d0c2 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -27,7 +27,7 @@ attach(A,user) attach(A2,user) name = "[A.name]-[A2.name] assembly" - update_icon() + update_appearance(updates = ALL) SSblackbox.record_feedback("tally", "assembly_made", 1, "[initial(A.name)]-[initial(A2.name)]") /obj/item/assembly_holder/proc/attach(obj/item/assembly/A, mob/user) @@ -44,7 +44,7 @@ a_right = A A.holder_movement() -/obj/item/assembly_holder/update_icon() +/obj/item/assembly_holder/update_appearance(updates = ALL) cut_overlays() if(a_left) add_overlay("[a_left.icon_state]_left") @@ -84,8 +84,7 @@ // yogs end add_overlay(right) - if(master) - master.update_icon() + master?.update_appearance(updates) /obj/item/assembly_holder/Crossed(atom/movable/AM as mob|obj) . = ..() diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index b1078c082865..ef3f93ed3683 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -39,7 +39,7 @@ return FALSE //Cooldown check on = !on refreshBeam() - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/assembly/infra/toggle_secure() @@ -50,22 +50,23 @@ else QDEL_LIST(beams) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) return secured -/obj/item/assembly/infra/update_icon() - cut_overlays() - attached_overlays = list() - if(on) - add_overlay("infrared_on") - attached_overlays += "infrared_on" - if(visible && secured) - add_overlay("infrared_visible") - attached_overlays += "infrared_visible" +/obj/item/assembly/infra/update_appearance(updates = ALL) + . = ..() + holder?.update_appearance(updates) - if(holder) - holder.update_icon() - return +/obj/item/assembly/infra/update_overlays() + . = ..() + attached_overlays = list() + if(!on) + return + . += "infrared_on" + attached_overlays += "infrared_on" + if(visible && secured) + . += "infrared_visible" + attached_overlays += "infrared_visible" /obj/item/assembly/infra/dropped() . = ..() @@ -207,7 +208,7 @@ visible = !visible . = TRUE - update_icon() + update_appearance(updates = ALL) refreshBeam() /***************************IBeam*********************************/ diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 6266ccaf3595..43ac7c36b13d 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -22,16 +22,16 @@ if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) to_chat(user, span_warning("Your hand slips, setting off the trigger!")) pulse(FALSE) - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) -/obj/item/assembly/mousetrap/update_icon() +/obj/item/assembly/mousetrap/update_appearance(updates = ALL) if(armed) icon_state = "mousetraparmed" else icon_state = "mousetrap" if(holder) - holder.update_icon() + holder.update_appearance(updates = ALL) /obj/item/assembly/mousetrap/proc/triggered(mob/target, type = "feet") if(!armed) @@ -42,7 +42,7 @@ if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) playsound(src, 'sound/effects/snap.ogg', 50, TRUE) armed = FALSE - update_icon() + update_appearance(updates = ALL) pulse(FALSE) return FALSE switch(type) @@ -69,7 +69,7 @@ M.splat() playsound(src, 'sound/effects/snap.ogg', 50, TRUE) armed = FALSE - update_icon() + update_appearance(updates = ALL) pulse(FALSE) @@ -87,7 +87,7 @@ return to_chat(user, span_notice("You disarm [src].")) armed = !armed - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 4ef4ed3e2940..861de9b0c554 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -29,7 +29,7 @@ timing = !timing else scanning = FALSE - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/assembly/prox_sensor/on_detach() @@ -50,7 +50,7 @@ else START_PROCESSING(SSobj, src) proximity_monitor.SetHost(loc,src) - update_icon() + update_appearance(updates = ALL) return secured /obj/item/assembly/prox_sensor/HasProximity(atom/movable/AM as mob|obj) @@ -84,7 +84,7 @@ return FALSE scanning = scan proximity_monitor.SetRange(scanning ? sensitivity : 0) - update_icon() + update_appearance(updates = ALL) /obj/item/assembly/prox_sensor/proc/sensitivity_change(value) var/sense = min(max(sensitivity + value, 0), 5) @@ -92,7 +92,7 @@ if(scanning && proximity_monitor.SetRange(sense)) sense() -/obj/item/assembly/prox_sensor/update_icon() +/obj/item/assembly/prox_sensor/update_appearance(updates = ALL) cut_overlays() attached_overlays = list() if(timing) @@ -102,7 +102,7 @@ add_overlay("prox_scanning") attached_overlays += "prox_scanning" if(holder) - holder.update_icon() + holder.update_appearance(updates = ALL) return /obj/item/assembly/prox_sensor/ui_status(mob/user) @@ -140,7 +140,7 @@ . = TRUE if("time") timing = !timing - update_icon() + update_appearance(updates = ALL) . = TRUE if("input") var/value = text2num(params["adjust"]) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 8b097bee28c5..16a82933b97d 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -44,9 +44,9 @@ signal() return TRUE -/obj/item/assembly/signaler/update_icon() +/obj/item/assembly/signaler/update_appearance(updates = ALL) if(holder) - holder.update_icon() + holder.update_appearance(updates = ALL) return /obj/item/assembly/signaler/ui_status(mob/user) @@ -104,9 +104,9 @@ else idx++ label_color = label_colors[idx] - update_icon() + update_appearance(updates = ALL) - update_icon() + update_appearance(updates = ALL) /obj/item/assembly/signaler/attackby(obj/item/W, mob/user, params) if(issignaler(W)) @@ -116,7 +116,7 @@ set_frequency(signaler2.frequency) // yogs start - signaller colors label_color = signaler2.label_color - update_icon() + update_appearance(updates = ALL) // yogs end to_chat(user, "You transfer the frequency and code of \the [signaler2.name] to \the [name]") ..() diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 0c5011f07425..e739a3e6ea38 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -37,7 +37,7 @@ if(!..()) return FALSE//Cooldown check timing = !timing - update_icon() + update_appearance(updates = ALL) return TRUE @@ -48,7 +48,7 @@ else timing = FALSE STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) return secured @@ -63,7 +63,7 @@ LM.playsound_local(get_turf(src), 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE) if(loop) timing = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/assembly/timer/process(delta_time) @@ -76,14 +76,14 @@ time = saved_time -/obj/item/assembly/timer/update_icon() +/obj/item/assembly/timer/update_appearance(updates = ALL) cut_overlays() attached_overlays = list() if(timing) add_overlay("timer_timing") attached_overlays += "timer_timing" if(holder) - holder.update_icon() + holder.update_appearance(updates = ALL) /obj/item/assembly/timer/ui_status(mob/user) if(is_secured(user)) @@ -115,7 +115,7 @@ timing = !timing if(timing && istype(holder, /obj/item/transfer_valve)) log_bomber(usr, "activated a", src, "attachment on [holder]") - update_icon() + update_appearance(updates = ALL) . = TRUE if("repeat") loop = !loop diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 8b9ba4a59fdc..fb2a7a3388bb 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -236,7 +236,7 @@ if(name == initial(name)) name = "[get_area_name(src)] Air Alarm" - update_icon() + update_appearance(updates = ALL) /obj/machinery/airalarm/Destroy() SSradio.remove_object(src, frequency) @@ -458,7 +458,7 @@ if(A.atmosalert(0, src)) post_alert(0) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/airalarm/proc/reset(wire) @@ -466,7 +466,7 @@ if(WIRE_POWER) if(!wires.is_cut(WIRE_POWER)) shorted = FALSE - update_icon() + update_appearance(updates = ALL) if(WIRE_AI) if(!wires.is_cut(WIRE_AI)) aidisabled = FALSE @@ -630,7 +630,7 @@ "set_internal_pressure" = 0 ), signal_source) -/obj/machinery/airalarm/update_icon() +/obj/machinery/airalarm/update_appearance(updates = ALL) if(panel_open) switch(buildstage) if(2) @@ -724,7 +724,7 @@ if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state post_alert(new_area_danger_level) - update_icon() + update_appearance(updates = ALL) /obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) switch(buildstage) @@ -734,13 +734,13 @@ to_chat(user, span_notice("You cut the final wires.")) new /obj/item/stack/cable_coil(loc, 5) buildstage = 1 - update_icon() + update_appearance(updates = ALL) return else if(W.tool_behaviour == TOOL_SCREWDRIVER) // Opening that Air Alarm up. W.play_tool_sound(src) panel_open = !panel_open to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"].")) - update_icon() + update_appearance(updates = ALL) return else if(W.GetID())// trying to unlock the interface with an ID card togglelock(user) @@ -759,7 +759,7 @@ new /obj/item/electronics/airalarm( src.loc ) playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) buildstage = 0 - update_icon() + update_appearance(updates = ALL) return if(istype(W, /obj/item/stack/cable_coil)) @@ -780,14 +780,14 @@ shorted = 0 post_alert(0) buildstage = 2 - update_icon() + update_appearance(updates = ALL) return if(0) if(istype(W, /obj/item/electronics/airalarm)) if(user.temporarilyRemoveItemFromInventory(W)) to_chat(user, span_notice("You insert the circuit.")) buildstage = 1 - update_icon() + update_appearance(updates = ALL) qdel(W) return @@ -798,7 +798,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt an air alarm circuit and slot it into the assembly.")) buildstage = 1 - update_icon() + update_appearance(updates = ALL) return if(W.tool_behaviour == TOOL_WRENCH) @@ -828,7 +828,7 @@ user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \ span_notice("You adapt an air alarm circuit and slot it into the assembly.")) buildstage = 1 - update_icon() + update_appearance(updates = ALL) return TRUE return FALSE diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index ce6d38b8a42d..6de36eee0450 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -117,13 +117,13 @@ GLOBAL_LIST_EMPTY(pipeimages) if(can_be_node(target, i)) nodes[i] = target break - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/proc/setPipingLayer(new_layer) piping_layer = (pipe_flags & PIPING_DEFAULT_LAYER_ONLY) ? PIPING_LAYER_DEFAULT : new_layer - update_icon() + update_appearance(updates = ALL) -/obj/machinery/atmospherics/update_icon() +/obj/machinery/atmospherics/update_appearance(updates = ALL) layer = initial(layer) + piping_layer / 1000 return ..() @@ -175,7 +175,7 @@ GLOBAL_LIST_EMPTY(pipeimages) var/obj/machinery/atmospherics/pipe/P = reference P.destroy_network() nodes[nodes.Find(reference)] = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/pipe)) //lets you autodrop diff --git a/code/modules/atmospherics/machinery/components/binary_devices/binary_devices.dm b/code/modules/atmospherics/machinery/components/binary_devices/binary_devices.dm index 22a407f3d14b..65e8d3350e68 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/binary_devices.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/binary_devices.dm @@ -14,7 +14,7 @@ initialize_directions = EAST|WEST /obj/machinery/atmospherics/components/binary/hide(intact) - update_icon() + update_appearance(updates = ALL) ..() /obj/machinery/atmospherics/components/binary/getNodeConnects() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index 4677507cec21..5d8fbe58ac69 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -36,7 +36,7 @@ /obj/machinery/atmospherics/components/binary/circulator/Initialize(mapload) .=..() component_parts = list(new /obj/item/circuitboard/machine/circulator) - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/circulator/ComponentInitialize() . = ..() @@ -82,7 +82,7 @@ ..() update_icon_nopipes() -/obj/machinery/atmospherics/components/binary/circulator/update_icon() +/obj/machinery/atmospherics/components/binary/circulator/update_appearance(updates = ALL) cut_overlays() if(anchored) @@ -188,7 +188,7 @@ node2.addMember(src) SSair.add_to_rebuild_queue(src) - update_icon() + update_appearance(updates = ALL) return TRUE @@ -257,7 +257,7 @@ generator.cold_circ = null else generator.hot_circ = null - generator.update_icon() + generator.update_appearance(updates = ALL) generator = null /obj/machinery/atmospherics/components/binary/circulator/setPipingLayer(new_layer) @@ -281,5 +281,5 @@ /obj/machinery/atmospherics/components/binary/circulator/obj_break(damage_flag) if(generator) generator.kill_circs() - generator.update_icon() + generator.update_appearance(updates = ALL) ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index 9181b33d5709..98837e855d13 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -175,7 +175,7 @@ return //do not update_icon spawn(2) broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume name = "large dual-port air vent" diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index cc951ab2977e..24344a37c188 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -33,7 +33,7 @@ Passive gate is similar to the regular pump except: var/msg = "was turned [on ? "on" : "off"] by [key_name(user)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/passive_gate/AltClick(mob/user) @@ -43,7 +43,7 @@ Passive gate is similar to the regular pump except: investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful balloon_alert(user, "pressure output set to [target_pressure] kPa") - update_icon() + update_appearance(updates = ALL) return ..() @@ -148,7 +148,7 @@ Passive gate is similar to the regular pump except: var/msg = "was set to [target_pressure] kPa by [key_name(usr)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/passive_gate/atmosinit() ..() @@ -179,7 +179,7 @@ Passive gate is similar to the regular pump except: return broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/passive_gate/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm index 92a3873e6980..bea0dcde8220 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm @@ -24,7 +24,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/pressure_valve/AltClick(mob/user) @@ -32,7 +32,7 @@ target_pressure = MAX_OUTPUT_PRESSURE investigate_log("was set to [target_pressure] kPa by [key_name(user)]", INVESTIGATE_ATMOS) balloon_alert(user, "pressure output set to [target_pressure] kPa") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/pressure_valve/Destroy() @@ -117,7 +117,7 @@ if(.) target_pressure = clamp(pressure, 0, ONE_ATMOSPHERE*100) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/pressure_valve/atmosinit() . = ..() @@ -147,7 +147,7 @@ return broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/pressure_valve/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index ef25ea72f46e..f2ea0c5c9517 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -30,7 +30,7 @@ /obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user) if(can_interact(user)) on = !on - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) @@ -40,7 +40,7 @@ investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - makes supermatter invest useful balloon_alert(user, "pressure output set to [target_pressure] kPa") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/pump/Destroy() @@ -137,7 +137,7 @@ var/msg = "was set to [target_pressure] kPa by [key_name(usr)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - makes supermatter invest useful - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/pump/atmosinit() ..() @@ -168,7 +168,7 @@ return broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/pump/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm index 88ccb2a6adc0..932fed89f4d2 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm @@ -23,7 +23,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/temperature_gate/AltClick(mob/user) @@ -31,7 +31,7 @@ target_temperature = max_temperature investigate_log("was set to [target_temperature] K by [key_name(user)]", INVESTIGATE_ATMOS) balloon_alert(user, "target temperature set to [target_temperature] K") - update_icon() + update_appearance(updates = ALL) return ..() @@ -109,7 +109,7 @@ if(.) target_temperature = clamp(minimum_temperature, temperature, max_temperature) investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/temperature_gate/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm index 579fea954138..0574365adec8 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm @@ -18,7 +18,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/temperature_pump/AltClick(mob/user) @@ -26,7 +26,7 @@ heat_transfer_rate = max_heat_transfer_rate investigate_log("was set to [heat_transfer_rate]% by [key_name(user)]", INVESTIGATE_ATMOS) balloon_alert(user, "transfer rate set to [heat_transfer_rate]%") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/temperature_pump/update_icon_nopipes() @@ -94,4 +94,4 @@ if(.) heat_transfer_rate = clamp(rate, 0, max_heat_transfer_rate) investigate_log("was set to [heat_transfer_rate]% by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 04ca2b623e24..b75a4cce11b1 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -34,7 +34,7 @@ var/msg = "was turned [on ? "on" : "off"] by [key_name(usr)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/volume_pump/AltClick(mob/user) @@ -44,7 +44,7 @@ investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful balloon_alert(user, "volume output set to [transfer_rate] L/s") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/binary/volume_pump/Destroy() @@ -158,7 +158,7 @@ var/msg = "was set to [transfer_rate] L/s by [key_name(usr)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/volume_pump/receive_signal(datum/signal/signal) if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command")) @@ -185,7 +185,7 @@ return //do not update_icon broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/binary/volume_pump/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 184258760675..37d8b0333d19 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -24,7 +24,7 @@ /obj/machinery/atmospherics/components/proc/update_icon_nopipes() return -/obj/machinery/atmospherics/components/update_icon() +/obj/machinery/atmospherics/components/update_appearance(updates = ALL) update_icon_nopipes() underlays.Cut() diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index 3c60597ff47e..f5896b78ac89 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -52,8 +52,7 @@ if(tool.use_tool(src, user, 10 SECONDS, volume=30, amount=5)) balloon_alert(user, "repaired") cracked = FALSE - update_icon() - update_overlays() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/hypertorus/default_change_direction_wrench(mob/user, obj/item/I) . = ..() @@ -72,7 +71,7 @@ node.addMember(src) SSair.add_to_rebuild_queue(src) -/obj/machinery/atmospherics/components/unary/hypertorus/update_icon() +/obj/machinery/atmospherics/components/unary/hypertorus/update_appearance(updates = ALL) . = ..() if(panel_open) icon_state = icon_state_open @@ -81,7 +80,7 @@ else icon_state = icon_state_off -/obj/machinery/atmospherics/components/unary/hypertorus/proc/update_overlays() +/obj/machinery/atmospherics/components/unary/hypertorus/update_overlays() if(!cracked) return @@ -153,7 +152,7 @@ return return ..() -/obj/machinery/hypertorus/update_icon() +/obj/machinery/hypertorus/update_appearance(updates = ALL) if(panel_open) icon_state = icon_state_open else if(active) diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm index d3c98bc979c2..fa82b7e8f121 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm @@ -89,22 +89,22 @@ return to_chat(user, span_notice("You link all parts toghether.")) active = TRUE - update_icon() + update_appearance(updates = ALL) linked_interface.active = TRUE - linked_interface.update_icon() + linked_interface.update_appearance(updates = ALL) RegisterSignal(linked_interface, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_input.active = TRUE - linked_input.update_icon() + linked_input.update_appearance(updates = ALL) RegisterSignal(linked_input, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_output.active = TRUE - linked_output.update_icon() + linked_output.update_appearance(updates = ALL) RegisterSignal(linked_output, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_moderator.active = TRUE - linked_moderator.update_icon() + linked_moderator.update_appearance(updates = ALL) RegisterSignal(linked_moderator, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) for(var/obj/machinery/hypertorus/corner/corner in corners) corner.active = TRUE - corner.update_icon() + corner.update_appearance(updates = ALL) RegisterSignal(corner, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) soundloop = new(list(src), TRUE) soundloop.volume = 5 @@ -138,27 +138,27 @@ if(!active) return active = FALSE - update_icon() + update_appearance(updates = ALL) if(linked_interface) linked_interface.active = FALSE - linked_interface.update_icon() + linked_interface.update_appearance(updates = ALL) linked_interface = null if(linked_input) linked_input.active = FALSE - linked_input.update_icon() + linked_input.update_appearance(updates = ALL) linked_input = null if(linked_output) linked_output.active = FALSE - linked_output.update_icon() + linked_output.update_appearance(updates = ALL) linked_output = null if(linked_moderator) linked_moderator.active = FALSE - linked_moderator.update_icon() + linked_moderator.update_appearance(updates = ALL) linked_moderator = null if(corners.len) for(var/obj/machinery/hypertorus/corner/corner in corners) corner.active = FALSE - corner.update_icon() + corner.update_appearance(updates = ALL) corners = list() QDEL_NULL(soundloop) @@ -592,7 +592,7 @@ /obj/machinery/atmospherics/components/unary/hypertorus/core/proc/create_crack() var/obj/machinery/atmospherics/components/unary/hypertorus/part = pick(machine_parts) part.cracked = TRUE - part.update_icon() + part.update_appearance(updates = ALL) part.update_overlays() return part diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm index d3b1dfab1e01..f52d0f868b21 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -15,7 +15,7 @@ circuit = /obj/item/circuitboard/machine/crystallizer pipe_flags = PIPING_ONE_PER_TURF| PIPING_DEFAULT_LAYER_ONLY - ///Base icon state for the machine to be used in update_icon() + ///Base icon state for the machine to be used in update_appearance(updates = ALL) var/base_icon = "crystallizer" ///Internal Gas mix used for processing the gases that have been put in var/datum/gas_mixture/internal @@ -79,12 +79,14 @@ SSair.add_to_rebuild_queue(src) return TRUE -/obj/machinery/atmospherics/components/binary/crystallizer/proc/update_overlays() +/obj/machinery/atmospherics/components/binary/crystallizer/update_overlays() + . = ..() cut_overlays() add_overlay(getpipeimage(icon, "pipe", dir, COLOR_LIME, piping_layer)) add_overlay(getpipeimage(icon, "pipe", turn(dir, 180), COLOR_RED, piping_layer)) -/obj/machinery/atmospherics/components/binary/crystallizer/proc/update_icon_state() +/obj/machinery/atmospherics/components/binary/crystallizer/update_icon_state() + . = ..() if(panel_open) icon_state = "[base_icon]-open" else if(on) @@ -92,7 +94,7 @@ else icon_state = "[base_icon]-off" -/obj/machinery/atmospherics/components/binary/crystallizer/update_icon() +/obj/machinery/atmospherics/components/binary/crystallizer/update_appearance(updates = ALL) . = ..() update_icon_state() update_overlays() @@ -102,7 +104,7 @@ return on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) ///Checks if the gases in the input are the ones needed by the recipe /obj/machinery/atmospherics/components/binary/crystallizer/proc/check_gas_requirements() @@ -341,7 +343,7 @@ var/_gas_input = params["gas_input"] gas_input = clamp(_gas_input, 0, max_gas_input) investigate_log("was set to [gas_input] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) #undef MIN_PROGRESS_AMOUNT #undef MIN_DEVIATION_RATE diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 4794b303f08e..ec9322d4a703 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -21,7 +21,7 @@ var/msg = "was turned [on ? "on" : "off"] by [key_name(usr)]" investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) @@ -31,7 +31,7 @@ investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful balloon_alert(user, "volume output set to [transfer_rate] L/s") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/trinary/filter/proc/set_frequency(new_frequency) @@ -44,7 +44,7 @@ SSradio.remove_object(src,frequency) return ..() -/obj/machinery/atmospherics/components/trinary/filter/update_icon() +/obj/machinery/atmospherics/components/trinary/filter/update_appearance(updates = ALL) cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) @@ -194,7 +194,7 @@ investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/trinary/filter/can_unwrench(mob/user) . = ..() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index e1b4960217e9..fdbe577c0f6e 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -20,7 +20,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) @@ -28,10 +28,10 @@ target_pressure = MAX_OUTPUT_PRESSURE investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) balloon_alert(user, "pressure output on set to [target_pressure] kPa") - update_icon() + update_appearance(updates = ALL) return ..() -/obj/machinery/atmospherics/components/trinary/mixer/update_icon() +/obj/machinery/atmospherics/components/trinary/mixer/update_appearance(updates = ALL) cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) @@ -173,7 +173,7 @@ adjust_node1_value(100 - value) investigate_log("was set to [node2_concentration] % on node 2 by [key_name(usr)]", INVESTIGATE_ATMOS) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/trinary/mixer/proc/adjust_node1_value(newValue) node1_concentration = newValue / 100 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 46da9bb8a67d..8afe86d0eeca 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -54,7 +54,7 @@ var/oldoccupant = occupant . = ..() // Parent proc takes care of removing occupant if necessary if (AM == oldoccupant) - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/cryo_cell/on_construction() ..(dir, dir) @@ -102,7 +102,7 @@ beaker.forceMove(drop_location()) beaker = null -/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() +/obj/machinery/atmospherics/components/unary/cryo_cell/update_appearance(updates = ALL) cut_overlays() if(panel_open) @@ -181,7 +181,7 @@ return if(!is_operational()) on = FALSE - update_icon() + update_appearance(updates = ALL) return if(!occupant) return @@ -198,7 +198,7 @@ playsound(src,'sound/machines/cryo_warning_ignore.ogg',60,1) on = FALSE sleep(0.2 SECONDS)// here for timing. Shuts off right at climax of the effect before falloff. - update_icon() + update_appearance(updates = ALL) return var/robotic_limb_damage = 0 // brute and burn damage to robotic limbs @@ -221,7 +221,7 @@ if(!treating_wounds) on = FALSE - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors. var/msg = "Patient fully restored." if(robotic_limb_damage) @@ -270,7 +270,7 @@ if(!nodes[1] || !airs[1] || (air1.get_moles(/datum/gas/oxygen) < 5 && air1.get_moles(/datum/gas/pluoxium) < 5)) // Turn off if the machine won't work. on = FALSE - update_icon() + update_appearance(updates = ALL) return if(occupant) @@ -310,7 +310,7 @@ var/mob/living/L = M L.update_mobility() occupant = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/user) treating_wounds = FALSE @@ -371,7 +371,7 @@ || default_change_direction_wrench(user, I) \ || default_pry_open(I) \ || default_deconstruction_crowbar(I)) - update_icon() + update_appearance(updates = ALL) return else if(I.tool_behaviour == TOOL_SCREWDRIVER) to_chat(user, "You can't access the maintenance panel while the pod is " \ @@ -465,7 +465,7 @@ log_game("[key_name(usr)] removed an [beaker] to cryo containing [beaker.reagents.reagent_list]") // yogs -- Adds logging for when the beaker's removed from cryo beaker = null . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user) return // we don't see the pipe network while inside cryo. @@ -511,7 +511,7 @@ on = FALSE else if(!state_open) on = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/cryo_cell/AltClick(mob/user) if(!user.canUseTopic(src, !issilicon(user))) @@ -522,6 +522,6 @@ close_machine() else open_machine() - update_icon() + update_appearance(updates = ALL) #undef CRYOMOBS diff --git a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm index 3cfca0993886..1ec97f060ac5 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm @@ -23,7 +23,7 @@ piping_layer = 4 icon_state = "he_map-4" -/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon() +/obj/machinery/atmospherics/components/unary/heat_exchanger/update_appearance(updates = ALL) if(nodes[1]) icon_state = "he1" var/obj/machinery/atmospherics/node = nodes[1] diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index f48524d90e3e..313d05644d0c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -28,7 +28,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/unary/outlet_injector/AltClick(mob/user) @@ -36,7 +36,7 @@ volume_rate = MAX_TRANSFER_RATE investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS) balloon_alert(user, "volume output set to [volume_rate] L/s") - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/unary/outlet_injector/Destroy() @@ -145,7 +145,7 @@ spawn(2) broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/outlet_injector/ui_interact(mob/user, datum/tgui/ui) @@ -185,7 +185,7 @@ if(.) volume_rate = clamp(rate, 0, MAX_TRANSFER_RATE) investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) broadcast_status() /obj/machinery/atmospherics/components/unary/outlet_injector/can_unwrench(mob/user) @@ -199,7 +199,7 @@ return on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) // mapping diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 801f7a4b2fcf..13df8015809a 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -39,7 +39,7 @@ B += M.rating heat_capacity = 5000 * ((B - 1) ** 2) -/obj/machinery/atmospherics/components/unary/thermomachine/update_icon() +/obj/machinery/atmospherics/components/unary/thermomachine/update_appearance(updates = ALL) cut_overlays() if(panel_open) @@ -68,7 +68,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/atmospherics/components/unary/thermomachine/AltClick(mob/living/user) @@ -183,7 +183,7 @@ target_temperature = clamp(target, min_temperature, max_temperature) investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/thermomachine/freezer name = "freezer" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm index e095517775f1..d5ca80df352d 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm @@ -18,10 +18,10 @@ /obj/machinery/atmospherics/components/unary/on_construction() ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/hide(intact) - update_icon() + update_appearance(updates = ALL) ..(intact) /obj/machinery/atmospherics/components/unary/proc/assign_uid_vents() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index c61b24eabb59..27d1d148bfcd 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -119,7 +119,7 @@ space_shutoff_ticks-- if(space_shutoff_ticks <= 1 && !on) on = TRUE - update_icon() + update_appearance(updates = ALL) if(!nodes[1]) on = FALSE if(!on || welded) @@ -137,7 +137,7 @@ last_moles_added = 0 on = FALSE space_shutoff_ticks = 20 // shut off for about 20 seconds before trying again. - update_icon() + update_appearance(updates = ALL) return if(pump_direction & RELEASING) // internal -> external @@ -302,7 +302,7 @@ // log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]") broadcast_status() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/components/unary/vent_pump/welder_act(mob/living/user, obj/item/I) if(!I.tool_start_check(user, amount=0)) @@ -315,7 +315,7 @@ else user.visible_message("[user] unwelded the vent.", span_notice("You unweld the vent."), span_italics("You hear welding.")) welded = FALSE - update_icon() + update_appearance(updates = ALL) pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) pipe_vision_img.plane = ABOVE_HUD_PLANE investigate_log("was [welded ? "welded shut" : "unwelded"] by [key_name(user)]", INVESTIGATE_ATMOS) @@ -345,7 +345,7 @@ return user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the vent", "You hear loud scraping noises.") welded = FALSE - update_icon() + update_appearance(updates = ALL) pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) pipe_vision_img.plane = ABOVE_HUD_PLANE playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index bca6f49eeb7c..568dcc0ffe76 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -243,7 +243,7 @@ return //do not update_icon broadcast_status() - update_icon() + update_appearance(updates = ALL) return /obj/machinery/atmospherics/components/unary/vent_scrubber/power_change() @@ -261,7 +261,7 @@ else user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.") welded = FALSE - update_icon() + update_appearance(updates = ALL) pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) pipe_vision_img.plane = ABOVE_HUD_PLANE investigate_log("was [welded ? "welded shut" : "unwelded"] by [key_name(user)]", INVESTIGATE_ATMOS) @@ -287,7 +287,7 @@ return user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.") welded = FALSE - update_icon() + update_appearance(updates = ALL) pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) pipe_vision_img.plane = ABOVE_HUD_PLANE playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1) diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index db6cb5682a06..9a13e351930e 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -71,12 +71,12 @@ /obj/machinery/atmospherics/miner/proc/set_active(setting) if(active != setting) active = setting - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/miner/proc/set_broken(setting) if(broken != setting) broken = setting - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/miner/proc/update_power() if(!active) @@ -108,7 +108,7 @@ return TRUE return FALSE -/obj/machinery/atmospherics/miner/update_icon() +/obj/machinery/atmospherics/miner/update_appearance(updates = ALL) cut_overlays() if(broken) add_overlay("broken") diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm index 10b8fff66ae3..e7dd1a664de5 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm @@ -30,7 +30,7 @@ return ..(target, given_layer, FALSE) //we want a normal pipe instead return ..(target, given_layer, TRUE) -/obj/machinery/atmospherics/pipe/heat_exchanging/junction/update_icon() +/obj/machinery/atmospherics/pipe/heat_exchanging/junction/update_appearance(updates = ALL) icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm index ab63bddb6a14..753261b4c46d 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm @@ -26,7 +26,7 @@ initialize_directions = NORTH|SOUTH|EAST|WEST initialize_directions &= ~dir -/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_icon() +/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_appearance(updates = ALL) cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm index fddd9ea8b079..64bbf3cf97e2 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm @@ -24,7 +24,7 @@ /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections() initialize_directions = initial(initialize_directions) -/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon() +/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_appearance(updates = ALL) cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm index fd013e11bd36..417bfb58740a 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm @@ -24,7 +24,7 @@ if(EAST, WEST) initialize_directions = EAST|WEST -/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon() +/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_appearance(updates = ALL) icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index 00285a5f77d1..a5d87004970a 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -42,7 +42,7 @@ /obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes() return front_nodes + back_nodes + nodes -/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!! +/obj/machinery/atmospherics/pipe/layer_manifold/update_appearance(updates = ALL) //HEAVILY WIP FOR UPDATE ICONS!! cut_overlays() layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else. @@ -99,7 +99,7 @@ new_nodes += foundfront if(foundback && !QDELETED(foundback)) new_nodes += foundback - update_icon() + update_appearance(updates = ALL) return new_nodes /obj/machinery/atmospherics/pipe/layer_manifold/atmosinit() @@ -128,7 +128,7 @@ if(reference in back_nodes) var/i = back_nodes.Find(reference) back_nodes[i] = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/pipe/layer_manifold/relaymove(mob/living/user, dir) if(initialize_directions & dir) diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index 7e1464138d0f..5738b5cef2c3 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -22,7 +22,7 @@ var/mutable_appearance/center -/* We use New() instead of Initialize() because these values are used in update_icon() +/* We use New() instead of Initialize() because these values are used in update_appearance(updates = ALL) * in the mapping subsystem init before Initialize() is called in the atoms subsystem init. * This is true for the other manifolds (the 4 ways and the heat exchanges) too. */ @@ -35,7 +35,7 @@ initialize_directions = NORTH|SOUTH|EAST|WEST initialize_directions &= ~dir -/obj/machinery/atmospherics/pipe/manifold/update_icon() +/obj/machinery/atmospherics/pipe/manifold/update_appearance(updates = ALL) cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index 75aa68046046..e5802bd39baa 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -29,7 +29,7 @@ /obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections() initialize_directions = initial(initialize_directions) -/obj/machinery/atmospherics/pipe/manifold4w/update_icon() +/obj/machinery/atmospherics/pipe/manifold4w/update_appearance(updates = ALL) cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 2d9dfc0b4a13..cda15529ac54 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -45,7 +45,7 @@ /obj/machinery/atmospherics/pipe/hide(i) if(level == 1 && isturf(loc)) invisibility = i ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/pipe/proc/releaseAirToTurf() if(air_temporary) @@ -98,7 +98,7 @@ qdel(meter) . = ..() -/obj/machinery/atmospherics/pipe/update_icon() +/obj/machinery/atmospherics/pipe/update_appearance(updates = ALL) . = ..() update_alpha() @@ -109,7 +109,7 @@ for(var/i in 1 to device_type) if(nodes[i]) var/obj/machinery/atmospherics/N = nodes[i] - N.update_icon() + N.update_appearance(updates = ALL) /obj/machinery/atmospherics/pipe/return_pipenets() . = list(parent) diff --git a/code/modules/atmospherics/machinery/pipes/simple.dm b/code/modules/atmospherics/machinery/pipes/simple.dm index 00d24cebda5e..db30a39d3442 100644 --- a/code/modules/atmospherics/machinery/pipes/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple.dm @@ -32,7 +32,7 @@ if(EAST, WEST) initialize_directions = EAST|WEST -/obj/machinery/atmospherics/pipe/simple/update_icon() +/obj/machinery/atmospherics/pipe/simple/update_appearance(updates = ALL) icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 5ff4b2868fa0..e6e5f6e6cf2b 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -234,7 +234,7 @@ timing = !timing if(timing) valve_timer = world.time + (timer_set * 10) - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/canister/proto name = "prototype canister" @@ -272,7 +272,7 @@ /obj/machinery/portable_atmospherics/canister/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/canister/Destroy() qdel(pump) @@ -306,7 +306,7 @@ #define CANISTER_LIGHT_RANGE 0.4 #define CANISTER_LIGHT_POWER 0.5 -/obj/machinery/portable_atmospherics/canister/update_icon() +/obj/machinery/portable_atmospherics/canister/update_appearance(updates = ALL) if(stat & BROKEN) cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) @@ -474,7 +474,7 @@ if(.) if(close_valve) valve_open = FALSE - update_icon() + update_appearance(updates = ALL) investigate_log("Valve was closed by [key_name(user)].
    ", INVESTIGATE_ATMOS) else if(valve_open && holding) investigate_log("[key_name(user)] started a transfer into [holding].
    ", INVESTIGATE_ATMOS) @@ -499,7 +499,7 @@ pump.airs[1] = null pump.airs[2] = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/canister/ui_state(mob/user) return GLOB.physical_state @@ -645,7 +645,7 @@ investigate_log("[key_name(usr)] removed the [holding], leaving the valve open and transferring into the [span_boldannounce("air")].", INVESTIGATE_ATMOS) replace_tank(usr, FALSE) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/canister/examine(mob/dead/observer/user) if(istype(user)) diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 6651e9376774..d7122f4162e6 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -70,7 +70,7 @@ anchored = TRUE //Prevent movement pixel_x = new_port.pixel_x pixel_y = new_port.pixel_y - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/portable_atmospherics/Move() @@ -86,7 +86,7 @@ connected_port = null pixel_x = 0 pixel_y = 0 - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/portable_atmospherics/AltClick(mob/living/user) @@ -111,7 +111,7 @@ holding = new_tank else holding = null - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params) @@ -122,7 +122,7 @@ return to_chat(user, span_notice("[holding ? "In one smooth motion you pop [holding] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].")) replace_tank(user, FALSE, T) - update_icon() + update_appearance(updates = ALL) else if(W.tool_behaviour == TOOL_WRENCH) if(!(stat & BROKEN)) if(connected_port) @@ -132,7 +132,7 @@ "[user] disconnects [src].", \ span_notice("You unfasten [src] from the port."), \ span_italics("You hear a ratchet.")) - update_icon() + update_appearance(updates = ALL) return else var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate(/obj/machinery/atmospherics/components/unary/portables_connector) in loc @@ -147,7 +147,7 @@ "[user] connects [src].", \ span_notice("You fasten [src] to the port."), \ span_italics("You hear a ratchet.")) - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index 14a413defbf2..b3b5c4263302 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -29,7 +29,7 @@ QDEL_NULL(pump) return ..() -/obj/machinery/portable_atmospherics/pump/update_icon() +/obj/machinery/portable_atmospherics/pump/update_appearance(updates = ALL) icon_state = "psiphon:[on]" cut_overlays() @@ -67,7 +67,7 @@ if(prob(100 / severity)) direction = PUMP_OUT pump.target_pressure = rand(0, 100 * ONE_ATMOSPHERE) - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/pump/replace_tank(mob/living/user, close_valve) . = ..() @@ -75,7 +75,7 @@ if(close_valve) if(on) on = FALSE - update_icon() + update_appearance(updates = ALL) else if(on && holding && direction == PUMP_OUT) investigate_log("[key_name(user)] started a transfer into [holding].
    ", INVESTIGATE_ATMOS) @@ -153,10 +153,10 @@ if(holding) replace_tank(usr, FALSE) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/pump/CtrlShiftClick(mob/user) if(!user.canUseTopic(src, BE_CLOSE)) return on = !on - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 692412c4b944..7c0f036e20cf 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -36,7 +36,7 @@ air_update_turf() return ..() -/obj/machinery/portable_atmospherics/scrubber/update_icon() +/obj/machinery/portable_atmospherics/scrubber/update_appearance(updates = ALL) icon_state = "pscrubber:[on]" cut_overlays() @@ -79,7 +79,7 @@ if(is_operational()) if(prob(50 / severity)) on = !on - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -113,7 +113,7 @@ if(close_valve) if(on) on = FALSE - update_icon() + update_appearance(updates = ALL) else if(on && holding) investigate_log("[key_name(user)] started a transfer into [holding].
    ", INVESTIGATE_ATMOS) @@ -131,7 +131,7 @@ if("toggle_filter") scrubbing ^= gas_id2path(params["val"]) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/portable_atmospherics/scrubber/huge name = "huge air scrubber" @@ -149,13 +149,13 @@ /obj/machinery/portable_atmospherics/scrubber/huge/movable movable = TRUE -/obj/machinery/portable_atmospherics/scrubber/huge/update_icon() +/obj/machinery/portable_atmospherics/scrubber/huge/update_appearance(updates = ALL) icon_state = "scrubber:[on]" /obj/machinery/portable_atmospherics/scrubber/huge/process_atmos() if((!anchored && !movable) || !is_operational()) on = FALSE - update_icon() + update_appearance(updates = ALL) use_power = on ? ACTIVE_POWER_USE : IDLE_POWER_USE if(!on) return @@ -176,4 +176,4 @@ if(!user.canUseTopic(src, BE_CLOSE)) return on = !on - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index bb9b2081180f..49c9ff4ddf81 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -16,7 +16,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/machinery/gateway/Initialize() randomspawns = GLOB.awaydestinations - update_icon() + update_appearance(updates = ALL) if(!istype(src, /obj/machinery/gateway/centerstation) && !istype(src, /obj/machinery/gateway/centeraway)) switch(dir) if(SOUTH,SOUTHEAST,SOUTHWEST) @@ -26,9 +26,9 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/machinery/gateway/proc/toggleoff() for(var/obj/machinery/gateway/G in linked) G.active = 0 - G.update_icon() + G.update_appearance(updates = ALL) active = 0 - update_icon() + update_appearance(updates = ALL) /obj/machinery/gateway/proc/detect() if(!can_link) @@ -53,7 +53,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) ready = TRUE return ready -/obj/machinery/gateway/update_icon() +/obj/machinery/gateway/update_appearance(updates = ALL) if(active) icon_state = "on" return @@ -80,7 +80,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) . = ..() if(!GLOB.the_gateway) GLOB.the_gateway = src - update_icon() + update_appearance(updates = ALL) wait = world.time + CONFIG_GET(number/gateway_delay) //+ thirty minutes default awaygate = locate(/obj/machinery/gateway/centeraway) @@ -100,7 +100,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) var/obj/machinery/gateway/centeraway/awaygate = null can_link = TRUE -/obj/machinery/gateway/centerstation/update_icon() +/obj/machinery/gateway/centerstation/update_appearance(updates = ALL) if(active) icon_state = "oncenter" return @@ -129,9 +129,9 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) for(var/obj/machinery/gateway/G in linked) G.active = 1 - G.update_icon() + G.update_appearance(updates = ALL) active = 1 - update_icon() + update_appearance(updates = ALL) //okay, here's the good teleporting stuff /obj/machinery/gateway/centerstation/Bumped(atom/movable/AM) @@ -179,11 +179,11 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/machinery/gateway/centeraway/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) stationgate = locate(/obj/machinery/gateway/centerstation) -/obj/machinery/gateway/centeraway/update_icon() +/obj/machinery/gateway/centeraway/update_appearance(updates = ALL) if(active) icon_state = "oncenter" return @@ -198,9 +198,9 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) for(var/obj/machinery/gateway/G in linked) G.active = 1 - G.update_icon() + G.update_appearance(updates = ALL) active = 1 - update_icon() + update_appearance(updates = ALL) /obj/machinery/gateway/centeraway/proc/check_exile_implant(mob/living/L) for(var/obj/item/implant/exile/E in L.implants)//Checking that there is an exile implant @@ -250,4 +250,4 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/item/paper/fluff/gateway info = "Congratulations,

    Your station has been selected to carry out the Gateway Project.

    The equipment will be shipped to you at the start of the next quarter.
    You are to prepare a secure location to house the equipment as outlined in the attached documents.

    --Nanotrasen Bluespace Research" - name = "Confidential Correspondence, Pg 1" \ No newline at end of file + name = "Confidential Correspondence, Pg 1" diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm index 38ebc62e93b6..b69c9a8f7e90 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -413,8 +413,9 @@ icon_state = "1" color = rgb(0,0,255) -/obj/structure/ladder/unbreakable/rune/update_icon() - return +/obj/structure/ladder/unbreakable/rune/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/structure/ladder/unbreakable/rune/show_fluff_message(up,mob/user) user.visible_message("[user] activates \the [src].",span_notice("You activate \the [src].")) diff --git a/code/modules/awaymissions/pamphlet.dm b/code/modules/awaymissions/pamphlet.dm index 7cbbde096d6e..b28f517ea93b 100644 --- a/code/modules/awaymissions/pamphlet.dm +++ b/code/modules/awaymissions/pamphlet.dm @@ -35,5 +35,6 @@ environs." //we don't want the silly text overlay! -/obj/item/paper/pamphlet/update_icon() - return +/obj/item/paper/pamphlet/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index a65843e618e0..02a0e42e4b08 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -134,12 +134,12 @@ close_switchstates() mode = new newmode(src) mode.enter_mode(src) - modebutton.update_icon() + modebutton.update_appearance(updates = ALL) /datum/buildmode/proc/change_dir(newdir) build_dir = newdir close_dirswitch() - dirbutton.update_icon() + dirbutton.update_appearance(updates = ALL) return 1 /datum/buildmode/proc/InterceptClickOn(mob/user, params, atom/object) diff --git a/code/modules/buildmode/buttons.dm b/code/modules/buildmode/buttons.dm index a60f105f8321..00df1eabbd25 100644 --- a/code/modules/buildmode/buttons.dm +++ b/code/modules/buildmode/buttons.dm @@ -24,10 +24,10 @@ bd.toggle_modeswitch() else if(pa.Find("right")) bd.mode.change_settings(usr.client) - update_icon() + update_appearance(updates = ALL) return 1 -/atom/movable/screen/buildmode/mode/update_icon() +/atom/movable/screen/buildmode/mode/update_appearance(updates = ALL) if(bd && bd.mode) icon_state = bd.mode.get_button_iconstate() else @@ -47,13 +47,13 @@ screen_loc = "NORTH,WEST+2" name = "Change Dir" -/atom/movable/screen/buildmode/bdir/update_icon() +/atom/movable/screen/buildmode/bdir/update_appearance(updates = ALL) dir = bd.build_dir return /atom/movable/screen/buildmode/bdir/Click() bd.toggle_dirswitch() - update_icon() + update_appearance(updates = ALL) return 1 // used to switch between modes diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index 6a2e47dd4d7e..01b912aa147b 100644 --- a/code/modules/cargo/bounty_console.dm +++ b/code/modules/cargo/bounty_console.dm @@ -23,7 +23,7 @@ /obj/item/paper/bounty_printout/Initialize() . = ..() info = "

    Nanotrasen Cargo Bounties


    " - update_icon() + update_appearance(updates = ALL) for(var/datum/bounty/B in GLOB.bounties_list) if(B.claimed) continue diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm index 4ceb0113c062..0567513a7f58 100644 --- a/code/modules/cargo/centcom_podlauncher.dm +++ b/code/modules/cargo/centcom_podlauncher.dm @@ -714,7 +714,7 @@ if (isnull(target_turf)) return var/obj/structure/closet/supplypod/centcompod/toLaunch = DuplicateObject(temp_pod) //Duplicate the temp_pod (which we have been varediting or configuring with the UI) and store the result - toLaunch.update_icon()//we update_icon() here so that the door doesnt "flicker on" right after it lands + toLaunch.update_appearance(updates = ALL)//we update_appearance(updates = ALL) here so that the door doesnt "flicker on" right after it lands var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/podStorage] toLaunch.forceMove(shippingLane) if (launchClone) //We arent launching the actual items from the bay, rather we are creating clones and launching those diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 785c55fb3f9e..06536b1cac3c 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -192,7 +192,7 @@ . = TRUE message_admins("[ADMIN_LOOKUPFLW(usr)] has ordered a [SO.pack.name] pod at location [ADMIN_VERBOSEJMP(LZ)]") investigate_log("Order #[SO.id] ([SO.pack.name], placed by [key_name(SO.orderer_ckey)]), paid by [D.account_holder] has shipped.", INVESTIGATE_CARGO) - update_icon() + update_appearance(updates = ALL) else if(SO.pack.get_cost() * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^) landingzone = GLOB.areas_by_type[pick(GLOB.the_station_areas)] //override default landing zone @@ -212,7 +212,7 @@ new /obj/effect/DPtarget(LZ, podType, SO) amountordered++ . = TRUE - update_icon() + update_appearance(updates = ALL) CHECK_TICK message_admins("[ADMIN_LOOKUPFLW(usr)] has ordered a [SO.pack.name] pod x[amountordered] at location [ADMIN_VERBOSEJMP(LZ)]") investigate_log("Order #[SO.id] ([SO.pack.name] x[amountordered], placed by [key_name(SO.orderer_ckey)]), paid by [D.account_holder] has shipped.", INVESTIGATE_CARGO) diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm index 226f430292a4..97ce697bf3f5 100644 --- a/code/modules/cargo/gondolapod.dm +++ b/code/modules/cargo/gondolapod.dm @@ -29,7 +29,7 @@ name = linked_pod.name . = ..() -/mob/living/simple_animal/pet/gondola/gondolapod/proc/update_icon() +/mob/living/simple_animal/pet/gondola/gondolapod/update_appearance(updates = ALL) if(opened) icon_state = "gondolapod_open" else @@ -60,12 +60,12 @@ /mob/living/simple_animal/pet/gondola/gondolapod/setOpened() opened = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, setClosed)), 50) /mob/living/simple_animal/pet/gondola/gondolapod/setClosed() opened = FALSE - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/pet/gondola/gondolapod/death() qdel(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm index 3c532e137355..b6c62828d6b4 100644 --- a/code/modules/cargo/order.dm +++ b/code/modules/cargo/order.dm @@ -54,7 +54,7 @@ P.info += "Rank: [orderer_rank]
    " P.info += "Comment: [reason]
    " - P.update_icon() + P.update_appearance(updates = ALL) return P /datum/supply_order/proc/generateManifest(obj/structure/closet/crate/C, var/owner, var/packname) //generates-the-manifests. @@ -92,10 +92,10 @@ while(--lost >= 0) qdel(pick(C.contents)) - P.update_icon() + P.update_appearance(updates = ALL) P.forceMove(C) C.manifest = P - C.update_icon() + C.update_appearance(updates = ALL) return P @@ -113,4 +113,4 @@ for (var/I in misc_contents) new I(miscbox) generateManifest(miscbox, misc_own, "") - return \ No newline at end of file + return diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index a66293a499da..9b5a098c0183 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -58,8 +58,6 @@ var/list/reverse_option_list = list("Mobs"=FALSE,"Objects"=FALSE,"Anchored"=FALSE,"Underfloor"=FALSE,"Wallmounted"=FALSE,"Floors"=FALSE,"Walls"=FALSE, "Mecha"=FALSE) var/list/turfs_in_cargo = list() - var/list/managed_overlays - /obj/structure/closet/supplypod/bluespacepod style = STYLE_BLUESPACE bluespace = TRUE @@ -109,7 +107,7 @@ door = "[base]_door" else door = FALSE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/proc/SetReverseIcon() fin_mask = "bottomfin" @@ -117,7 +115,7 @@ icon_state = GLOB.podstyles[style][POD_BASE] + "_reverse" pixel_x = initial(pixel_x) transform = matrix() - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/proc/backToNonReverseIcon() fin_mask = initial(fin_mask) @@ -125,9 +123,9 @@ icon_state = GLOB.podstyles[style][POD_BASE] pixel_x = initial(pixel_x) transform = matrix() - update_icon() + update_appearance(updates = ALL) -/obj/structure/closet/supplypod/update_icon() +/obj/structure/closet/supplypod/update_appearance(updates = ALL) var/list/new_overlays = update_overlays() if(managed_overlays) cut_overlay(managed_overlays) @@ -136,7 +134,7 @@ managed_overlays = new_overlays add_overlay(new_overlays) -/obj/structure/closet/supplypod/proc/update_overlays() +/obj/structure/closet/supplypod/update_overlays() . = list() if(style == STYLE_INVISIBLE) return @@ -420,17 +418,17 @@ /obj/structure/closet/supplypod/setOpened() //Proc exists here, as well as in any atom that can assume the role of a "holder" of a supplypod. Check the open_pod() proc for more details opened = TRUE density = FALSE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/extractionpod/setOpened() opened = TRUE density = TRUE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/setClosed() //Ditto opened = FALSE density = TRUE - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/proc/tryMakeRubble(turf/T) //Ditto if (rubble_type == RUBBLE_NONE) @@ -443,7 +441,7 @@ return rubble = new /obj/effect/supplypod_rubble(T) rubble.setStyle(rubble_type, src) - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/Moved() deleteRubble() @@ -452,7 +450,7 @@ /obj/structure/closet/supplypod/proc/deleteRubble() rubble?.fadeAway() rubble = null - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/supplypod/proc/addGlow() if (GLOB.podstyles[style][POD_SHAPE] != POD_SHAPE_NORML) @@ -599,7 +597,7 @@ /obj/effect/DPtarget/proc/beginLaunch(effectCircle) //Begin the animation for the pod falling. The effectCircle param determines whether the pod gets to come in from any descent angle pod.addGlow() - pod.update_icon() + pod.update_appearance(updates = ALL) if (pod.style != STYLE_INVISIBLE) pod.add_filter("motionblur",1,list("type"="motion_blur", "x"=0, "y"=3)) pod.forceMove(drop_location()) diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index ca8417f9bb04..d52bae77d032 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -29,9 +29,9 @@ playsound(src,'sound/machines/synth_no.ogg',50,0) if (SP_UNREADY) ready = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/supplypod_beacon/update_icon() +/obj/item/supplypod_beacon/update_appearance(updates = ALL) cut_overlays() if (launched) add_overlay("sp_green") diff --git a/code/modules/client/preferences/ghost.dm b/code/modules/client/preferences/ghost.dm index 648feea31e49..82c5e21b9eb5 100644 --- a/code/modules/client/preferences/ghost.dm +++ b/code/modules/client/preferences/ghost.dm @@ -16,7 +16,7 @@ return ghost.ghost_accs = value - ghost.update_icon() + ghost.update_appearance(updates = ALL) /datum/preference/choiced/ghost_accessories/deserialize(input, datum/preferences/preferences) // Old ghost preferences used to be 1/50/100. diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index cc7039212f3e..33177c4c4c1e 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -243,7 +243,7 @@ var/obj/item/clothing/head/helmet/helmet = initial(HS.helmettype) I.head_piece.initial_state = initial(helmet.icon_state) update_item(helmet, I.head_piece) - I.head_piece.update_icon() + I.head_piece.update_appearance(updates = ALL) qdel(helmet) //YOGS END target.icon = initial(picked_item.icon) diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index bc4f213ea14f..2082772f4675 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -35,15 +35,15 @@ /obj/item/clothing/ears/headphones/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/clothing/ears/headphones/update_icon() +/obj/item/clothing/ears/headphones/update_appearance(updates = ALL) icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" /obj/item/clothing/ears/headphones/proc/toggle(owner) headphones_on = !headphones_on - update_icon() + update_appearance(updates = ALL) var/mob/living/carbon/human/H = owner if(istype(H)) H.update_inv_ears() diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index d9e4b4733701..183e182c111f 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -24,7 +24,7 @@ /obj/item/clothing/glasses/meson/engine/Initialize() . = ..() START_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/glasses/meson/engine/Destroy() STOP_PROCESSING(SSobj, src) @@ -50,7 +50,7 @@ if(H.glasses == src) H.update_sight() - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -114,7 +114,7 @@ pic = new('icons/turf/overlays.dmi', place, "redOverlay", AREA_LAYER) flick_overlay(pic, list(user.client), 8) -/obj/item/clothing/glasses/meson/engine/update_icon() +/obj/item/clothing/glasses/meson/engine/update_appearance(updates = ALL) icon_state = "trayson-[mode]" update_mob() @@ -125,7 +125,7 @@ if(user.get_item_by_slot(SLOT_GLASSES) == src) user.update_inv_glasses() else - user.update_inv_hands() + user.update_held_items() /obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves name = "optical t-ray scanner" diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 07554e146686..9fa37f0d05e0 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -31,9 +31,9 @@ turn_on(user) else turn_off(user) - update_icon() + update_appearance(updates = ALL) -/obj/item/clothing/head/hardhat/update_icon() +/obj/item/clothing/head/hardhat/update_appearance(updates = ALL) icon_state = "hardhat[on]_[hat_type]" item_state = "hardhat[on]_[hat_type]" if(ishuman(loc)) @@ -128,7 +128,7 @@ /obj/item/clothing/head/hardhat/weldhat/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/head/hardhat/weldhat/attack_self(mob/living/user) toggle_helmet_light(user) @@ -147,7 +147,7 @@ /obj/item/clothing/head/hardhat/weldhat/proc/toggle_welding_screen(mob/living/user) if(weldingvisortoggle(user)) playsound(src, 'sound/mecha/mechmove03.ogg', 50, 1) //Visors don't just come from nothing - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands) . = ..() @@ -156,7 +156,7 @@ if(!up) . += mutable_appearance(mob_overlay_icon, "weldvisor") -/obj/item/clothing/head/hardhat/weldhat/update_icon() +/obj/item/clothing/head/hardhat/weldhat/update_appearance(updates = ALL) cut_overlays() if(!up) add_overlay("weldvisor") diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index c2cfb47a1e4e..c1f42c776666 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -49,7 +49,7 @@ if(A == attached_light) set_attached_light(null) update_helmlight() - update_icon() + update_appearance(updates = ALL) QDEL_NULL(alight) qdel(A) return ..() @@ -371,7 +371,7 @@ //LightToggle -/obj/item/clothing/head/helmet/update_icon() +/obj/item/clothing/head/helmet/update_appearance(updates = ALL) var/state = "[initial(icon_state)]" if(attached_light) if(attached_light.on) @@ -399,7 +399,7 @@ return to_chat(user, span_notice("You click [S] into place on [src].")) set_attached_light(S) - update_icon() + update_appearance(updates = ALL) update_helmlight() alight = new(src) if(loc == user) @@ -419,7 +419,7 @@ var/obj/item/flashlight/removed_light = set_attached_light(null) update_helmlight() removed_light.update_brightness(user) - update_icon() + update_appearance(updates = ALL) user.update_inv_head() QDEL_NULL(alight) return TRUE @@ -444,7 +444,7 @@ /obj/item/clothing/head/helmet/proc/update_helmlight() if(attached_light) - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 128507cc0cc5..d26734ae8c7b 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -207,9 +207,9 @@ /obj/item/clothing/head/wig/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/clothing/head/wig/update_icon() +/obj/item/clothing/head/wig/update_appearance(updates = ALL) cut_overlays() icon_state = "" var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style] @@ -241,7 +241,7 @@ user.visible_message(span_notice("[user] changes \the [src]'s hairstyle to [new_style]."), span_notice("You change \the [src]'s hairstyle to [new_style].")) if(adjustablecolor) hair_color = input(usr,"","Choose Color",hair_color) as color|null - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/head/wig/random/Initialize(mapload) @@ -264,7 +264,7 @@ . = ..() if(ishuman(user) && slot == SLOT_HEAD) hair_color = "#[user.hair_color]" - update_icon() + update_appearance(updates = ALL) user.update_inv_head() /obj/item/clothing/head/bronze diff --git a/code/modules/clothing/neck/bodycamera.dm b/code/modules/clothing/neck/bodycamera.dm index 5fac7363de8d..39bc4c52cb44 100644 --- a/code/modules/clothing/neck/bodycamera.dm +++ b/code/modules/clothing/neck/bodycamera.dm @@ -26,7 +26,7 @@ bodcam.network = list("ss13") bodcam.internal_light = FALSE bodcam.status = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/neck/bodycam/attack_self(mob/user) if(!setup) @@ -39,7 +39,7 @@ bodcam.status = TRUE to_chat(user, span_notice("You turn on the body camera.")) getMobhook(user) - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/neck/bodycam/AltClick(mob/user) if(preset) @@ -52,9 +52,9 @@ bodcam.network[1] = temp setup = TRUE bodcam.status = TRUE - update_icon() + update_appearance(updates = ALL) -/obj/item/clothing/neck/bodycam/update_icon() +/obj/item/clothing/neck/bodycam/update_appearance(updates = ALL) ..() var/suffix = "off" if(bodcam.status) @@ -92,7 +92,7 @@ Disconnect() bodcam.c_tag = null bodcam.network[1] = null //requires a reset - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/neck/bodycam/Destroy() Disconnect() diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index 20dd6785aadf..d69f88b1a9ce 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -23,7 +23,7 @@ on = !on if(!always_noslip) clothing_flags &= ~NOSLIP - update_icon() + update_appearance(updates = ALL) to_chat(loc, span_warning("You ran out of bananium!")) else new /obj/item/grown/bananapeel/specialpeel(get_step(src,turn(usr.dir, 180))) //honk @@ -45,7 +45,7 @@ var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(bananium.get_material_amount(/datum/material/bananium)) on = !on - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You [on ? "activate" : "deactivate"] the prototype shoes.")) if(!always_noslip) if(on) @@ -55,7 +55,7 @@ else to_chat(user, span_warning("You need bananium to turn the prototype shoes on!")) -/obj/item/clothing/shoes/clown_shoes/banana_shoes/update_icon() +/obj/item/clothing/shoes/clown_shoes/banana_shoes/update_appearance(updates = ALL) if(on) icon_state = "clown_prototype_on" else diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index bbcfebefe739..a1d265a12a7b 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -305,7 +305,7 @@ visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE|HIDEFACIALHAIR visor_flags = STOPSPRESSUREDAMAGE -/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon() +/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_appearance(updates = ALL) icon_state = "hardsuit[on]-[hardsuit_type]" /obj/item/clothing/head/helmet/space/hardsuit/syndi/Initialize() @@ -336,7 +336,7 @@ flags_cover &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH) flags_inv &= ~visor_flags_inv cold_protection &= ~HEAD - update_icon() + update_appearance(updates = ALL) playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1) toggle_hardsuit_mode(user) user.update_inv_head() @@ -363,7 +363,7 @@ linkedsuit.cold_protection &= ~(CHEST | GROIN | LEGS | FEET | ARMS | HANDS) linkedsuit.icon_state = "hardsuit[on]-[hardsuit_type]" - linkedsuit.update_icon() + linkedsuit.update_appearance(updates = ALL) user.update_inv_wear_suit() user.update_inv_w_uniform() diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index 2962bba33b01..d861ed754fea 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -137,7 +137,7 @@ P.info = text("
    Forensic Record - (FR-[])


    ", frNum) P.info += jointext(log, "
    ") P.info += "
    Notes:
    " - P.update_icon() + P.update_appearance(updates = ALL) if(ismob(loc)) var/mob/M = loc diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 9ba61b2b7dfa..d14ae10dc7e5 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -137,7 +137,7 @@ . = ..() gps = new/obj/item/gps/internal/pirate(src) gps.tracking = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/shuttle_scrambler/process() if(active) @@ -168,7 +168,7 @@ if(active || !user.canUseTopic(src, BE_CLOSE)) return toggle_on(user) - update_icon() + update_appearance(updates = ALL) send_notification() else dump_loot(user) @@ -195,7 +195,7 @@ active = FALSE STOP_PROCESSING(SSobj,src) -/obj/machinery/shuttle_scrambler/update_icon() +/obj/machinery/shuttle_scrambler/update_appearance(updates = ALL) if(active) icon_state = "dominator-blue" else diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index a581d6c659ea..4ae297f33e11 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -49,7 +49,7 @@ if(istype(O, /obj/structure/closet/secure_closet)) var/obj/structure/closet/secure_closet/temp = O temp.locked = FALSE - temp.update_icon() + temp.update_appearance(updates = ALL) else if(istype(O, /obj/machinery/door/airlock)) var/obj/machinery/door/airlock/temp = O //Skip doors in critical positions, such as the SM chamber, and skip doors the AI can't control since it's a virus diff --git a/code/modules/events/shuttle_loan.dm b/code/modules/events/shuttle_loan.dm index 5f96b5b052f8..70dbdb3b1de0 100644 --- a/code/modules/events/shuttle_loan.dm +++ b/code/modules/events/shuttle_loan.dm @@ -271,7 +271,7 @@ setAnchored(TRUE) timer_set = rand(480, 600) //once the supply shuttle docks (after 5 minutes travel time), players have between 3-5 minutes to defuse the bomb activate() - update_icon() + update_appearance(updates = ALL) /obj/item/paper/fluff/cargo/bomb name = "hastly scribbled note" diff --git a/code/modules/events/stray_cargo.dm b/code/modules/events/stray_cargo.dm index 0666ca9bd206..90eca071d24a 100644 --- a/code/modules/events/stray_cargo.dm +++ b/code/modules/events/stray_cargo.dm @@ -52,7 +52,7 @@ var/datum/supply_pack/SP = new pack_type var/obj/structure/closet/crate/crate = SP.generate(null) crate.locked = FALSE //Unlock secure crates - crate.update_icon() + crate.update_appearance(updates = ALL) var/obj/structure/closet/supplypod/pod = make_pod() new /obj/effect/DPtarget(LZ, pod, crate) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 74af5070fc36..b962dbdcd357 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -23,9 +23,9 @@ age_restricted = TRUE /obj/item/reagent_containers/food/drinks/bottle/on_reagent_change(changetype) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/food/drinks/bottle/update_icon() +/obj/item/reagent_containers/food/drinks/bottle/update_appearance(updates = ALL) cut_overlays() if(reagents.total_volume) diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index b5963cbad589..30b367c6b941 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -60,7 +60,7 @@ . = ..() -/obj/item/reagent_containers/food/snacks/customizable/proc/update_name(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/customizable/update_name(obj/item/reagent_containers/food/snacks/S) for(var/obj/item/I in ingredients) if(!istype(S, I.type)) customname = "custom" @@ -334,9 +334,9 @@ /obj/item/reagent_containers/glass/bowl/on_reagent_change(changetype) ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/glass/bowl/update_icon() +/obj/item/reagent_containers/glass/bowl/update_appearance(updates = ALL) cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/food/soupsalad.dmi', "fullbowl") diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 67fbd04f12ab..8a7677a9accf 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -247,7 +247,7 @@ All foods are distributed among various categories. Use common sense. trash = null return -/obj/item/reagent_containers/food/snacks/proc/update_overlays(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/update_overlays(obj/item/reagent_containers/food/snacks/S) cut_overlays() var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling") if(S.filling_color == "#FFFFFF") diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index e9fc9463db46..26a626eba29c 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -651,9 +651,9 @@ /obj/item/reagent_containers/food/snacks/pancakes/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/food/snacks/pancakes/update_icon() +/obj/item/reagent_containers/food/snacks/pancakes/update_appearance(updates = ALL) if(contents.len) name = "stack of pancakes" else @@ -717,13 +717,13 @@ pancake.pixel_x = rand(-1,1) pancake.pixel_y = 3 * contents.len - 1 add_overlay(pancake) - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/food/snacks/pancakes/attack(mob/M, mob/user, def_zone, stacked = TRUE) if(user.a_intent == INTENT_HARM || !contents.len || !stacked) return ..() var/obj/item/O = contents[contents.len] . = O.attack(M, user, def_zone, FALSE) - update_icon() + update_appearance(updates = ALL) #undef PANCAKE_MAX_STACK diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 2e9d001b6096..bc12a66df568 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -38,7 +38,7 @@ if(M.rating >= 2) . += "Gibber has been upgraded to process inorganic materials." -/obj/machinery/gibber/update_icon() +/obj/machinery/gibber/update_appearance(updates = ALL) cut_overlays() if (dirty) add_overlay("grbloody") @@ -99,7 +99,7 @@ user.visible_message(span_danger("[user] stuffs [C] into the gibber!")) C.forceMove(src) occupant = C - update_icon() + update_appearance(updates = ALL) else startgibbing(user) @@ -133,7 +133,7 @@ /obj/machinery/gibber/proc/go_out() dropContents() - update_icon() + update_appearance(updates = ALL) /obj/machinery/gibber/proc/startgibbing(mob/user) if(src.operating) @@ -145,7 +145,7 @@ visible_message(span_italics("You hear a loud squelchy grinding sound.")) playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) operating = TRUE - update_icon() + update_appearance(updates = ALL) var/offset = prob(50) ? -2 : 2 animate(src, pixel_x = pixel_x + offset, time = 0.02 SECONDS, loop = 200) //start shaking @@ -221,7 +221,7 @@ pixel_x = initial(pixel_x) //return to its spot after shaking operating = FALSE - update_icon() + update_appearance(updates = ALL) //auto-gibs anything that bumps into it /obj/machinery/gibber/autogibber diff --git a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm index efd6c0c36d06..d12f564c495a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm @@ -32,7 +32,7 @@ return if(!on && default_deconstruction_screwdriver(user, icon_state, icon_state, I)) - update_icon() + update_appearance(updates = ALL) return if(griddled_objects.len >= max_items) @@ -49,7 +49,7 @@ I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/8), world.icon_size/4) to_chat(user, "You place [I] on [src].") AddToGrill(I, user) - update_icon() + update_appearance(updates = ALL) else return ..() @@ -62,7 +62,7 @@ begin_processing() else end_processing() - update_icon() + update_appearance(updates = ALL) update_grill_audio() @@ -106,7 +106,7 @@ if(prob(10)) visible_message("[griddled_item] doesn't seem to be doing too great on the [src]!") -/obj/machinery/griddle/update_icon() +/obj/machinery/griddle/update_appearance(updates = ALL) . = ..() if(panel_open) icon_state = "griddle[variant]_o" diff --git a/code/modules/food_and_drinks/kitchen_machinery/grill.dm b/code/modules/food_and_drinks/kitchen_machinery/grill.dm index 2bce876dd710..b250f59301f8 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/grill.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/grill.dm @@ -20,7 +20,7 @@ . = ..() grill_loop = new(list(src), FALSE) -/obj/machinery/grill/update_icon() +/obj/machinery/grill/update_appearance(updates = ALL) if(grilled_item) icon_state = "grill" else if(grill_fuel > 0) @@ -38,7 +38,7 @@ else grill_fuel += (50 * stackamount) S.use(stackamount) - update_icon() + update_appearance(updates = ALL) return if(I.resistance_flags & INDESTRUCTIBLE) to_chat(user, span_warning("You don't feel it would be wise to grill [I]...")) @@ -59,7 +59,7 @@ RegisterSignal(grilled_item, COMSIG_GRILL_COMPLETED, PROC_REF(GrillCompleted)) grilled_item.foodtype |= GRILLED to_chat(user, span_notice("You put the [grilled_item] on [src].")) - update_icon() + update_appearance(updates = ALL) grill_loop.start() return else @@ -67,13 +67,13 @@ grill_fuel += (20 * (I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy))) to_chat(user, span_notice("You pour the Monkey Energy in [src].")) I.reagents.remove_reagent(/datum/reagent/consumable/monkey_energy, I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy)) - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/grill/process(delta_time) ..() - update_icon() + update_appearance(updates = ALL) if(grill_fuel <= 0) return else @@ -124,7 +124,7 @@ if(grilled_item) to_chat(user, span_notice("You take out [grilled_item] from [src].")) grilled_item.forceMove(drop_location()) - update_icon() + update_appearance(updates = ALL) return return ..() diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 8c49d584ed36..d343dc8eee8b 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -87,7 +87,7 @@ "- Capacity: [max_n_of_items] items.\n"+\ span_notice("- Cook time reduced by [(efficiency - 1) * 25]%.") -/obj/machinery/microwave/update_icon() +/obj/machinery/microwave/update_appearance(updates = ALL) if(broken) icon_state = "mwb" else if(dirty_anim_playing) @@ -109,7 +109,7 @@ if(dirty < 100) if(default_deconstruction_screwdriver(user, icon_state, icon_state, O) || default_unfasten_wrench(user, O)) - update_icon() + update_appearance(updates = ALL) return if(panel_open && is_wire_tool(O)) @@ -127,7 +127,7 @@ if(O.use_tool(src, user, 20)) user.visible_message("[user] fixes \the [src].", span_notice("You fix \the [src].")) broken = 0 - update_icon() + update_appearance(updates = ALL) return FALSE //to use some fuel else to_chat(user, span_warning("It's broken!")) @@ -141,7 +141,7 @@ playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) user.visible_message("[user] has cleaned \the [src].", span_notice("You clean \the [src].")) dirty = 0 - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You need more space cleaner!")) return TRUE @@ -152,7 +152,7 @@ if(do_after(user, P.cleanspeed, src)) user.visible_message("[user] has cleaned \the [src].", span_notice("You clean \the [src].")) dirty = 0 - update_icon() + update_appearance(updates = ALL) return TRUE if(dirty == 100) // The microwave is all dirty so can't be used! @@ -258,7 +258,7 @@ set_light(1.5) soundloop.start() - update_icon() + update_appearance(updates = ALL) /obj/machinery/microwave/proc/spark() visible_message(span_warning("Sparks fly around [src]!")) @@ -282,7 +282,7 @@ turn_on() playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) dirty_anim_playing = TRUE - update_icon() + update_appearance(updates = ALL) loop(MICROWAVE_MUCK, 4) /obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10 @@ -349,7 +349,7 @@ /obj/machinery/microwave/proc/after_finish_loop() set_light(0) soundloop.stop() - update_icon() + update_appearance(updates = ALL) #undef MICROWAVE_NORMAL #undef MICROWAVE_MUCK diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 471abd866cc4..105a74f18ab5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -42,7 +42,7 @@ QDEL_NULL(particles) . = ..() -/obj/machinery/oven/update_icon() +/obj/machinery/oven/update_appearance(updates = ALL) update_overlays() if(panel_open) icon_state = "oven_o" @@ -53,7 +53,7 @@ icon_state = "oven_off" return ..() -/obj/machinery/oven/proc/update_overlays() +/obj/machinery/oven/update_overlays() cut_overlays() var/mutable_appearance/door_overlay if(open) @@ -87,7 +87,7 @@ if(prob(10)) visible_message(span_danger("You smell a burnt smell coming from [src]!")) set_smoke_state(worst_cooked_food_state) - update_icon() + update_appearance(updates = ALL) /obj/machinery/oven/attackby(obj/item/I, mob/user, params) @@ -110,7 +110,7 @@ RegisterSignal(used_tray, COMSIG_MOVABLE_MOVED, PROC_REF(ItemMoved)) update_baking_audio() - update_icon() + update_appearance(updates = ALL) ///Called when the tray is moved out of the oven in some way /obj/machinery/oven/proc/ItemMoved(obj/item/oven_tray, atom/OldLoc, Dir, Forced) @@ -144,7 +144,7 @@ if(used_tray) begin_processing() used_tray.vis_flags |= VIS_HIDE - update_icon() + update_appearance(updates = ALL) update_baking_audio() return TRUE @@ -178,7 +178,7 @@ to_chat(user,span_notice("The access panel won't budge with a tray inside!")) return TRUE panel_open = !panel_open - update_icon() + update_appearance(updates = ALL) return TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 4634feb216e1..bae71731393d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -146,10 +146,10 @@ /obj/machinery/smartfridge/obj_break(damage_flag) if(!(stat & BROKEN)) stat |= BROKEN - update_icon() + update_appearance(updates = ALL) ..(damage_flag) -/obj/machinery/smartfridge/update_icon() +/obj/machinery/smartfridge/update_appearance(updates = ALL) var/startstate = initial(icon_state) if(stat & BROKEN) icon_state = "[startstate]-broken" @@ -230,7 +230,7 @@ if(accept_check(O)) load(O) user.visible_message("[user] has added \the [O] to \the [src].", span_notice("You add \the [O] to \the [src].")) - update_icon() + update_appearance(updates = ALL) updateUsrDialog() if(contents.len >= max_n_of_items) indicate_full() @@ -245,7 +245,7 @@ if(accept_check(G)) load(G) loaded++ - update_icon() + update_appearance(updates = ALL) updateUsrDialog() if(loaded) @@ -272,7 +272,7 @@ load(organ) OS.clear_organ() user.visible_message("[user] has added \the [organ] to \the [src].", span_notice("You add \the [organ] to \the [src].")) - update_icon() + update_appearance(updates = ALL) updateUsrDialog() if(contents.len >= max_n_of_items) indicate_full() @@ -377,7 +377,7 @@ if(O.name == params["name"]) dispense(O, usr) break - update_icon() + update_appearance(updates = ALL) cut_overlay(full_indicator_state) animate_dispenser() return TRUE @@ -390,7 +390,7 @@ dispense(O, usr) desired-- - update_icon() + update_appearance(updates = ALL) cut_overlay(full_indicator_state) animate_dispenser() return TRUE @@ -454,7 +454,7 @@ /obj/machinery/smartfridge/drying_rack/ui_act(action, params) . = ..() if(.) - update_icon() // This is to handle a case where the last item is taken out manually instead of through drying pop-out + update_appearance(updates = ALL) // This is to handle a case where the last item is taken out manually instead of through drying pop-out return switch(action) if("Dry") @@ -474,9 +474,9 @@ /obj/machinery/smartfridge/drying_rack/load() //For updating the filled overlay ..() - update_icon() + update_appearance(updates = ALL) -/obj/machinery/smartfridge/drying_rack/update_icon() +/obj/machinery/smartfridge/drying_rack/update_appearance(updates = ALL) ..() cut_overlays() if(drying) @@ -489,7 +489,7 @@ if(drying) if(rack_dry())//no need to update unless something got dried SStgui.update_uis(src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/smartfridge/drying_rack/accept_check(obj/item/O) if(istype(O, /obj/item/reagent_containers/food/snacks/)) @@ -507,7 +507,7 @@ else drying = TRUE use_power = ACTIVE_POWER_USE - update_icon() + update_appearance(updates = ALL) /obj/machinery/smartfridge/drying_rack/proc/rack_dry() for(var/obj/item/reagent_containers/food/snacks/S in src) diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index 31ef16bbfad3..66e86e55a061 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -31,14 +31,14 @@ /obj/item/pizzabox/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/pizzabox/Destroy() unprocess() return ..() -/obj/item/pizzabox/update_icon() +/obj/item/pizzabox/update_appearance(updates = ALL) // Description desc = initial(desc) if(open) @@ -104,7 +104,7 @@ audible_message(span_warning("[icon2html(src, hearers(src))] *beep*")) bomb_active = TRUE START_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/pizzabox/attack_hand(mob/user) @@ -115,13 +115,13 @@ user.put_in_hands(pizza) to_chat(user, span_notice("You take [pizza] out of [src].")) pizza = null - update_icon() + update_appearance(updates = ALL) else if(bomb) if(wires.is_all_cut() && bomb_defused) user.put_in_hands(bomb) to_chat(user, span_notice("You carefully remove the [bomb] from [src].")) bomb = null - update_icon() + update_appearance(updates = ALL) return else bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num|null @@ -136,14 +136,14 @@ bomb.adminlog = "The [bomb.name] in [src.name] that [key_name(user)] activated has detonated!" to_chat(user, span_warning("You trap [src] with [bomb].")) - update_icon() + update_appearance(updates = ALL) else if(boxes.len) var/obj/item/pizzabox/topbox = boxes[boxes.len] boxes -= topbox user.put_in_hands(topbox) to_chat(user, span_notice("You remove the topmost [name] from the stack.")) - topbox.update_icon() - update_icon() + topbox.update_appearance(updates = ALL) + update_appearance(updates = ALL) user.regenerate_icons() /obj/item/pizzabox/attackby(obj/item/I, mob/user, params) @@ -158,8 +158,8 @@ boxes += add newbox.boxes.Cut() to_chat(user, span_notice("You put [newbox] on top of [src]!")) - newbox.update_icon() - update_icon() + newbox.update_appearance(updates = ALL) + update_appearance(updates = ALL) user.regenerate_icons() if(boxes.len >= 5) if(prob(10 * boxes.len)) @@ -179,7 +179,7 @@ return pizza = I to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(updates = ALL) return else if(istype(I, /obj/item/bombcore/miniature/pizza)) if(open && !bomb) @@ -188,7 +188,7 @@ wires = new /datum/wires/explosive/pizza(src) bomb = I to_chat(user, span_notice("You put [I] in [src]. Sneeki breeki...")) - update_icon() + update_appearance(updates = ALL) return else if(bomb) to_chat(user, span_notice("[src] already has a bomb in it!")) @@ -202,7 +202,7 @@ if(!user.canUseTopic(src, BE_CLOSE)) return to_chat(user, span_notice("You write with [I] on [src].")) - update_icon() + update_appearance(updates = ALL) return else if(is_wire_tool(I)) if(wires && bomb) @@ -252,9 +252,9 @@ fall_dir = pick(GLOB.alldirs) step(P.pizza, fall_dir) P.pizza = null - P.update_icon() + P.update_appearance(updates = ALL) boxes -= P - update_icon() + update_appearance(updates = ALL) if(isliving(loc)) var/mob/living/L = loc L.regenerate_icons() @@ -263,7 +263,7 @@ STOP_PROCESSING(SSobj, src) qdel(wires) wires = null - update_icon() + update_appearance(updates = ALL) /obj/item/pizzabox/bomb/Initialize() . = ..() diff --git a/code/modules/food_and_drinks/plate.dm b/code/modules/food_and_drinks/plate.dm index 5140cd543efb..f7050ff6e628 100644 --- a/code/modules/food_and_drinks/plate.dm +++ b/code/modules/food_and_drinks/plate.dm @@ -31,7 +31,7 @@ I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -placement_offset, max_height_offset) to_chat(user, span_notice("You place [I] on [src].")) AddToPlate(I, user) - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm index 9c53e54cc252..5121d0cded74 100644 --- a/code/modules/games/cas.dm +++ b/code/modules/games/cas.dm @@ -78,7 +78,7 @@ H.pickup(user) user.put_in_hands(H) user.visible_message("[user] draws a card from the deck.", span_notice("You draw a card from the deck.")) - update_icon() + update_appearance(updates = ALL) /obj/item/toy/cards/deck/cas/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/toy/cards/singlecard/cas)) @@ -93,9 +93,9 @@ cards += RC user.visible_message("[user] adds a card to the bottom of the deck.",span_notice("You add the card to the bottom of the deck.")) qdel(SC) - update_icon() + update_appearance(updates = ALL) -/obj/item/toy/cards/deck/cas/update_icon() +/obj/item/toy/cards/deck/cas/update_appearance(updates = ALL) if(cards.len < 26) icon_state = "deck_[deckstyle]_low" @@ -129,14 +129,14 @@ else if(flipped) name = buffertext flipped = !flipped - update_icon() + update_appearance(updates = ALL) /obj/item/toy/cards/singlecard/cas/AltClick(mob/living/user) if(!ishuman(user) || !user.canUseTopic(src, BE_CLOSE)) return Flip() -/obj/item/toy/cards/singlecard/cas/update_icon() +/obj/item/toy/cards/singlecard/cas/update_appearance(updates = ALL) if(flipped) icon_state = "[card_face]_flipped" else diff --git a/code/modules/goals/station_goals/bsa.dm b/code/modules/goals/station_goals/bsa.dm index 11149fb38997..709eb8bd0e30 100644 --- a/code/modules/goals/station_goals/bsa.dm +++ b/code/modules/goals/station_goals/bsa.dm @@ -255,7 +255,7 @@ if("recalibrate") calibrate(usr) . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/bsa_control/proc/calibrate(mob/user) if(!GLOB.bsa_unlock) diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index fa8c89811907..e0ae1499f4ae 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -116,9 +116,9 @@ else animate(src, pixel_y = 0, time = 1 SECONDS) anchored = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/machinery/satellite/update_icon() +/obj/machinery/satellite/update_appearance(updates = ALL) icon_state = active ? "sat_active" : "sat_inactive" /obj/machinery/satellite/multitool_act(mob/living/user, obj/item/I) diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm index 0897a4768918..b25bed06f9ef 100644 --- a/code/modules/holodeck/area_copy.dm +++ b/code/modules/holodeck/area_copy.dm @@ -37,7 +37,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars, list( var/obj/item/I = O I.damtype = STAMINA // thou shalt not - N.update_icon() + N.update_appearance(updates = ALL) if(ismachinery(O)) var/obj/machinery/M = O M.power_change() diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index 95b12ccbcef0..451a8811f850 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -187,7 +187,7 @@ ready = !ready - update_icon() + update_appearance(updates = ALL) var/numbuttons = 0 var/numready = 0 @@ -199,7 +199,7 @@ if(numbuttons == numready) begin_event() -/obj/machinery/readybutton/update_icon() +/obj/machinery/readybutton/update_appearance(updates = ALL) if(ready) icon_state = "auth_on" else diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 82510c22eadd..aa4bd9e3e9e3 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -34,7 +34,7 @@ . = ..() if(src.type == /turf/open/floor/holofloor/grass) //don't want grass subtypes getting the icon state, icon_state = "grass[rand(1,4)]" - update_icon() + update_appearance(updates = ALL) /turf/open/floor/holofloor/beach gender = PLURAL @@ -117,9 +117,9 @@ /turf/open/floor/holofloor/carpet/Initialize() . = ..() - addtimer(CALLBACK(src, PROC_REF(update_icon)), 1) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 1) -/turf/open/floor/holofloor/carpet/update_icon() +/turf/open/floor/holofloor/carpet/update_appearance(updates = ALL) if(!..()) return 0 if(intact) diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm index daa22c4f850f..50b5f773416e 100644 --- a/code/modules/hydroponics/beekeeping/honeycomb.dm +++ b/code/modules/hydroponics/beekeeping/honeycomb.dm @@ -17,10 +17,10 @@ . = ..() pixel_x = rand(8,-8) pixel_y = rand(8,-8) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/honeycomb/update_icon() +/obj/item/reagent_containers/honeycomb/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/honey_overlay = mutable_appearance(icon, /datum/reagent/consumable/honey) if(honey_color) @@ -37,4 +37,4 @@ reagents.add_reagent(R.type,5) else honey_color = "" - update_icon() \ No newline at end of file + update_appearance(updates = ALL) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 9d828aa4f92d..bed6118641bc 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -31,7 +31,7 @@ ..() if(A == beaker) beaker = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/biogenerator/contents_explosion(severity, target) ..() @@ -63,9 +63,9 @@ . += span_notice("The status display reads: Productivity at [productivity*100]%.
    Matter consumption reduced by [(efficiency*25)-25]%.
    Machine can hold up to [max_items] pieces of produce.") /obj/machinery/biogenerator/on_reagent_change(changetype) //When the reagents change, change the icon as well. - update_icon() + update_appearance(updates = ALL) -/obj/machinery/biogenerator/update_icon() +/obj/machinery/biogenerator/update_appearance(updates = ALL) if(panel_open) icon_state = "biogen-empty-o" else if(!src.beaker) @@ -88,7 +88,7 @@ var/obj/item/reagent_containers/glass/B = beaker B.forceMove(drop_location()) beaker = null - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(O)) @@ -104,7 +104,7 @@ return beaker = O to_chat(user, span_notice("You add the container to the machine.")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("Close the maintenance panel first.")) return @@ -184,12 +184,12 @@ qdel(I) if(S) processing = TRUE - update_icon() + update_appearance(updates = ALL) playsound(loc, 'sound/machines/blender.ogg', 50, TRUE) use_power(S * 30) sleep(S + 15 / productivity) processing = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = TRUE) if(materials.len != 1 || materials[1] != getmaterialref(/datum/material/biomass)) @@ -199,7 +199,7 @@ else if(remove_points) points -= materials[getmaterialref(/datum/material/biomass)]*multiplier/efficiency - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1) @@ -240,7 +240,7 @@ beaker.reagents.add_reagent(R, D.make_reagents[R]) . = 1 --i - update_icon() + update_appearance(updates = ALL) return . /obj/machinery/biogenerator/proc/detach(mob/living/user) @@ -250,7 +250,7 @@ else beaker.drop_location(get_turf(src)) beaker = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/biogenerator/ui_status(mob/user) if(stat & BROKEN || panel_open) diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 7d0ad8e0676c..6094267d0b65 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -63,9 +63,9 @@ ENABLE_BITFIELD(reagents.flags, DRAINABLE) DISABLE_BITFIELD(reagents.flags, REFILLABLE) to_chat(user, span_notice("You close [src], letting you draw from its tap.")) - update_icon() + update_appearance(updates = ALL) -/obj/structure/fermenting_barrel/update_icon() +/obj/structure/fermenting_barrel/update_appearance(updates = ALL) if(open) icon_state = "barrel_open" else diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 689cb7242bda..180e0bed82b3 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -55,7 +55,7 @@ min_wchance = 0 min_wrate = 0 -/obj/machinery/plantgenes/update_icon() +/obj/machinery/plantgenes/update_appearance(updates = ALL) ..() cut_overlays() if((stat & (BROKEN|NOPOWER))) @@ -71,7 +71,7 @@ /obj/machinery/plantgenes/attackby(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(I)) return @@ -261,7 +261,7 @@ seed.verb_pickup() seed = null update_genes() - update_icon() + update_appearance(updates = ALL) else var/obj/item/I = usr.get_active_held_item() if (istype(I, /obj/item/seeds)) @@ -269,7 +269,7 @@ return insert_seed(I) to_chat(usr, span_notice("You add [I] to the machine.")) - update_icon() + update_appearance(updates = ALL) else if(href_list["eject_disk"] && !operation) var/obj/item/I = usr.get_active_held_item() eject_disk() @@ -278,7 +278,7 @@ return disk = I to_chat(usr, span_notice("You add [I] to the machine.")) - update_icon() + update_appearance(updates = ALL) else if(href_list["op"] == "insert" && disk && disk.gene && seed) if(!operation) // Wait for confirmation operation = "insert" @@ -337,10 +337,10 @@ else if(istype(G, /datum/plant_gene/core/weed_chance)) gene.value = max(gene.value, min_wchance) disk.update_name() - disk.update_icon() + disk.update_appearance(updates = ALL) qdel(seed) seed = null - update_icon() + update_appearance(updates = ALL) if("replace") if(disk && disk.gene && istype(disk.gene, G.type) && istype(G, /datum/plant_gene/core)) seed.genes -= G @@ -372,7 +372,7 @@ S.forceMove(src) seed = S update_genes() - update_icon() + update_appearance(updates = ALL) /obj/machinery/plantgenes/proc/eject_disk() if (disk && !operation) @@ -383,7 +383,7 @@ disk.forceMove(drop_location()) disk = null update_genes() - update_icon() + update_appearance(updates = ALL) /obj/machinery/plantgenes/proc/update_genes() core_genes = list() @@ -436,16 +436,16 @@ /obj/item/disk/plantgene/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) src.pixel_x = rand(-5, 5) src.pixel_y = rand(-5, 5) -/obj/item/disk/plantgene/update_icon() +/obj/item/disk/plantgene/update_appearance(updates = ALL) cut_overlays() if(gene) add_overlay("datadisk_gene") -/obj/item/disk/plantgene/proc/update_name() +/obj/item/disk/plantgene/update_name() if(gene) name = "[gene.get_name()] (plant data disk)" else diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index aef012e31693..294c914f653d 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -215,7 +215,7 @@ weedinvasion() // Weed invasion into empty tray needs_update = 1 if (needs_update) - update_icon() + update_appearance(updates = ALL) return /obj/machinery/hydroponics/proc/nutrimentMutation() @@ -237,7 +237,7 @@ return return -/obj/machinery/hydroponics/update_icon() +/obj/machinery/hydroponics/update_appearance(updates = ALL) //Refreshes the icon and sets the luminosity cut_overlays() @@ -360,7 +360,7 @@ harvest = 0 weedlevel = 0 // Reset pestlevel = 0 // Reset - update_icon() + update_appearance(updates = ALL) visible_message(span_warning("The [oldPlantName] is overtaken by some [myseed.plantname]!")) update_name() @@ -394,7 +394,7 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_icon() + update_appearance(updates = ALL) visible_message(span_warning("[oldPlantName] suddenly mutates into [myseed.plantname]!")) update_name() @@ -414,7 +414,7 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_icon() + update_appearance(updates = ALL) visible_message(span_warning("The mutated weeds in [src] spawn some [myseed.plantname]!")) update_name() else @@ -426,7 +426,7 @@ pestlevel = 0 // Pests die lastproduce = 0 if(!dead) - update_icon() + update_appearance(updates = ALL) dead = 1 @@ -777,9 +777,9 @@ S.clear_reagents() qdel(S) - H.update_icon() + H.update_appearance(updates = ALL) if(reagent_source) // If the source wasn't composted and destroyed - reagent_source.update_icon() + reagent_source.update_appearance(updates = ALL) return 1 else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) @@ -795,7 +795,7 @@ age = 1 plant_health = myseed.endurance lastcycle = world.time - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] already has seeds in it!")) @@ -823,7 +823,7 @@ if(weedlevel > 0) user.visible_message("[user] uproots the weeds.", span_notice("You remove the weeds from [src].")) weedlevel = 0 - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("This plot is completely devoid of weeds! It doesn't need uprooting.")) @@ -844,7 +844,7 @@ user.visible_message(span_notice("[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses."), \ span_notice("You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.")) for(var/obj/machinery/hydroponics/h in range(1,src)) - h.update_icon() + h.update_appearance(updates = ALL) else if(istype(O, /obj/item/shovel/spade)) if(!myseed && !weedlevel) @@ -864,7 +864,7 @@ myseed = null update_name() weedlevel = 0 //Has a side effect of cleaning up those nasty weeds - update_icon() + update_appearance(updates = ALL) else return ..() @@ -895,7 +895,7 @@ qdel(myseed) myseed = null update_name() - update_icon() + update_appearance(updates = ALL) else if(user) examine(user) @@ -903,7 +903,7 @@ /obj/machinery/hydroponics/AltClick(mob/user) . = ..() if(!anchored) - update_icon() + update_appearance(updates = ALL) return FALSE var/warning = tgui_alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", list("Yes", "No")) if(warning == "Yes" && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) @@ -931,7 +931,7 @@ myseed = null update_name() dead = 0 - update_icon() + update_appearance(updates = ALL) /// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds./// /obj/machinery/hydroponics/proc/adjustNutri(adjustamt) @@ -965,9 +965,9 @@ /obj/machinery/hydroponics/proc/become_self_sufficient() // Ambrosia Gaia effect visible_message(span_boldnotice("[src] begins to glow with a beautiful light!")) self_sustaining = TRUE - update_icon() + update_appearance(updates = ALL) -/obj/machinery/hydroponics/proc/update_name() +/obj/machinery/hydroponics/update_name() if(myseed) name = "[initial(name)] ([myseed.plantname])" else diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index ecf0626b8c07..7ce4c92a576b 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -239,8 +239,8 @@ C.charge = newcharge if(isobj(C.loc)) var/obj/O = C.loc - O.update_icon() //update power meters and such - C.update_icon() + O.update_appearance(updates = ALL) //update power meters and such + C.update_appearance(updates = ALL) batteries_recharged = 1 if(batteries_recharged) to_chat(target, span_notice("Your batteries are recharged!")) diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 59fd4e84fde6..09d8d7df7206 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -94,14 +94,14 @@ */ /obj/item/instrument/piano_synth/headphones/proc/start_playing() icon_state = "[initial(icon_state)]_on" - update_icon() + update_appearance(updates = ALL) /** * Called by a component signal when our song stops playing. */ /obj/item/instrument/piano_synth/headphones/proc/stop_playing() icon_state = "[initial(icon_state)]" - update_icon() + update_appearance(updates = ALL) /obj/item/instrument/banjo name = "banjo" diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 5677347d72e8..0e0867ce3bae 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -338,7 +338,7 @@ H.equip_to_slot_if_possible(PDA, SLOT_WEAR_ID) PDA.update_label() - PDA.update_icon() + PDA.update_appearance(updates = ALL) PDA.update_filters() else diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index c1d040f74847..0a19eb395c17 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -48,7 +48,7 @@ for(var/obj/item/I in loc) if(istype(I, /obj/item/book)) I.forceMove(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bookcase/attackby(obj/item/I, mob/user, params) switch(state) @@ -82,13 +82,13 @@ if(is_type_in_list(I, allowed_books)) if(!user.transferItemToLoc(I, src)) return - update_icon() + update_appearance(updates = ALL) else if(STR) for(var/obj/item/T in I.contents) if(istype(T, /obj/item/book) || istype(T, /obj/item/spellbook)) STR.remove_from_storage(T, src) to_chat(user, span_notice("You empty \the [I] into \the [src].")) - update_icon() + update_appearance(updates = ALL) else if(istype(I, /obj/item/pen)) if(!user.is_literate()) to_chat(user, span_notice("You scribble illegibly on the side of [src]!")) @@ -129,7 +129,7 @@ user.put_in_hands(choice) else choice.forceMove(drop_location()) - update_icon() + update_appearance(updates = ALL) /obj/structure/bookcase/deconstruct(disassembled = TRUE) @@ -139,7 +139,7 @@ qdel(src) -/obj/structure/bookcase/update_icon() +/obj/structure/bookcase/update_appearance(updates = ALL) if(contents.len < 5) icon_state = "book-[contents.len]" else @@ -152,7 +152,7 @@ /obj/structure/bookcase/manuals/medical/Initialize() . = ..() new /obj/item/book/manual/wiki/medical_cloning(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bookcase/manuals/engineering @@ -165,7 +165,7 @@ new /obj/item/book/manual/wiki/engineering_guide(src) new /obj/item/book/manual/wiki/engineering_singulo_tesla(src) new /obj/item/book/manual/wiki/robotics_cyborgs(src) - update_icon() + update_appearance(updates = ALL) /obj/structure/bookcase/manuals/research_and_development @@ -174,7 +174,7 @@ /obj/structure/bookcase/manuals/research_and_development/Initialize() . = ..() new /obj/item/book/manual/wiki/research_and_development(src) - update_icon() + update_appearance(updates = ALL) /* diff --git a/code/modules/library/random_books.dm b/code/modules/library/random_books.dm index 193e6e6ba2d3..fecd4a5735d6 100644 --- a/code/modules/library/random_books.dm +++ b/code/modules/library/random_books.dm @@ -31,11 +31,11 @@ /obj/structure/bookcase/random/Initialize(mapload) . = ..() if(!book_count || !isnum(book_count)) - update_icon() + update_appearance(updates = ALL) return book_count += pick(-1,-1,0,1,1) create_random_books(book_count, src, FALSE, category) - update_icon() + update_appearance(updates = ALL) /proc/create_random_books(amount = 2, location, fail_loud = FALSE, category = null) . = list() @@ -45,7 +45,7 @@ if(fail_loud || prob(5)) var/obj/item/paper/P = new(location) P.info = "There once was a book from Nantucket
    But the database failed us, so f*$! it.
    I tried to be good to you
    Now this is an I.O.U
    If you're feeling entitled, well, stuff it!

    ~" - P.update_icon() + P.update_appearance(updates = ALL) return if(prob(25)) category = null diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index ee83c53b4e8b..ad4b1b45e7f6 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -145,9 +145,9 @@ creator_key = user.ckey realdate = world.realtime map = SSmapping.config.map_name - update_icon() + update_appearance(updates = ALL) -/obj/structure/chisel_message/update_icon() +/obj/structure/chisel_message/update_appearance(updates = ALL) ..() var/hash = md5(hidden_message) var/newcolor = copytext_char(hash, 1, 7) @@ -188,7 +188,7 @@ var/turf/newloc = locate(x, y, z) if(isturf(newloc)) forceMove(newloc) - update_icon() + update_appearance(updates = ALL) /obj/structure/chisel_message/examine(mob/user) . = ..() diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index 703f47e6f33d..09b952f07d75 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -247,7 +247,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) else var/obj/item/organ/O = part O.organ_flags |= ORGAN_FROZEN - j.update_icon() + j.update_appearance(updates = ALL) qdel(src) /obj/effect/mapping_helpers/teleport_anchor diff --git a/code/modules/mapping/minimap.dm b/code/modules/mapping/minimap.dm index 6b7293ade551..9f9837120ca7 100644 --- a/code/modules/mapping/minimap.dm +++ b/code/modules/mapping/minimap.dm @@ -105,9 +105,9 @@ /obj/item/map/station/Initialize() ..() minimaps += SSmapping.station_minimaps - update_icon() + update_appearance(updates = ALL) -/obj/item/map/update_icon() +/obj/item/map/update_appearance(updates = ALL) cut_overlays() var/datum/minimap/map = minimaps[1] if(!map) return diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 95e51c784a7a..612adcab945a 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -124,9 +124,9 @@ /obj/item/clothing/head/helmet/space/hostile_environment/Initialize() . = ..() AddComponent(/datum/component/spraycan_paintable) - update_icon() + update_appearance(updates = ALL) -/obj/item/clothing/head/helmet/space/hostile_environment/update_icon() +/obj/item/clothing/head/helmet/space/hostile_environment/update_appearance(updates = ALL) ..() cut_overlays() var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hostile_env_glass") diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 8ce5c4f88b81..732986ad11e4 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -28,7 +28,7 @@ var/detonation_damage = 50 var/backstab_bonus = 30 -/obj/item/twohanded/kinetic_crusher/update_icon() //Updates the sprite for in-hand and on-mob. +/obj/item/twohanded/kinetic_crusher/update_appearance(updates = ALL) //Updates the sprite for in-hand and on-mob. icon_state = "mining_hammer[wielded]" return @@ -508,7 +508,7 @@ ..() -/obj/item/twohanded/kinetic_crusher/mega/update_icon() +/obj/item/twohanded/kinetic_crusher/mega/update_appearance(updates = ALL) icon_state = "magmite_crusher[wielded]" return diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index 864fdb0e26b2..ba04f19df1d9 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -33,14 +33,14 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/item/stack/marker_beacon/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/stack/marker_beacon/examine(mob/user) . = ..() . += "Use in-hand to place a [singular_name].\n"+\ "Alt-click to select a color. Current color is [picked_color]." -/obj/item/stack/marker_beacon/update_icon() +/obj/item/stack/marker_beacon/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][lowertext(picked_color)]" /obj/item/stack/marker_beacon/attack_self(mob/user) @@ -64,7 +64,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( return if(input_color) picked_color = input_color - update_icon() + update_appearance(updates = ALL) /obj/structure/marker_beacon name = "marker beacon" @@ -83,20 +83,20 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/structure/marker_beacon/Initialize(mapload, set_color) . = ..() picked_color = set_color - update_icon() + update_appearance(updates = ALL) /obj/structure/marker_beacon/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) var/obj/item/stack/marker_beacon/M = new(loc) M.picked_color = picked_color - M.update_icon() + M.update_appearance(updates = ALL) qdel(src) /obj/structure/marker_beacon/examine(mob/user) . = ..() . += span_notice("Alt-click to select a color. Current color is [picked_color].") -/obj/structure/marker_beacon/update_icon() +/obj/structure/marker_beacon/update_appearance(updates = ALL) while(!picked_color || !GLOB.marker_beacon_colors[picked_color]) picked_color = pick(GLOB.marker_beacon_colors) icon_state = "[initial(icon_state)][lowertext(picked_color)]-on" @@ -110,7 +110,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( if(do_after(user, remove_speed, src)) var/obj/item/stack/marker_beacon/M = new(loc) M.picked_color = picked_color - M.update_icon() + M.update_appearance(updates = ALL) transfer_fingerprints_to(M) if(user.put_in_hands(M, TRUE)) //delete the beacon if it fails playsound(src, 'sound/items/deconstruct.ogg', 50, 1) @@ -143,4 +143,4 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( return if(input_color) picked_color = input_color - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index b5e179ce4912..073e4b4e94cd 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -41,7 +41,7 @@ /obj/item/organ/regenerative_core/proc/preserved(implanted = 0) inert = FALSE preserved = TRUE - update_icon() + update_appearance(updates = ALL) name = "preserved regenerative core" desc = "All that remains of a hivelord. It is preserved, allowing you to use it to heal completely without danger of decay." if(implanted) @@ -54,7 +54,7 @@ name = "decayed regenerative core" desc = "All that remains of a hivelord. It has decayed, and is completely useless." SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "inert")) - update_icon() + update_appearance(updates = ALL) /obj/item/organ/regenerative_core/ui_action_click() if(inert) @@ -134,9 +134,9 @@ /obj/item/organ/regenerative_core/legion/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/organ/regenerative_core/update_icon() +/obj/item/organ/regenerative_core/update_appearance(updates = ALL) icon_state = inert ? "legion_soul_inert" : "legion_soul" cut_overlays() if(!inert && !preserved) diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index e4f7f6056887..9e85edc6baed 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -138,7 +138,7 @@ icon = 'icons/obj/lavaland/survival_pod.dmi' icon_state = "sleeper" -/obj/machinery/sleeper/survival_pod/update_icon() +/obj/machinery/sleeper/survival_pod/update_appearance(updates = ALL) if(state_open) cut_overlays() else @@ -154,8 +154,9 @@ /obj/machinery/stasis/survival_pod/play_power_sound() return -/obj/machinery/stasis/survival_pod/update_icon() - return +/obj/machinery/stasis/survival_pod/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() //Computer /obj/item/gps/computer @@ -206,8 +207,9 @@ pitches = FALSE var/empty = FALSE -/obj/machinery/smartfridge/survival_pod/update_icon() - return +/obj/machinery/smartfridge/survival_pod/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/smartfridge/survival_pod/Initialize(mapload) . = ..() diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 30b37f99f25d..8eac950db92e 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -300,7 +300,7 @@ icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_bowl" -/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_icon() +/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_appearance(updates = ALL) cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/lavaland/ash_flora.dmi', "fullbowl") diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 209f262c5244..06aab00bd118 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -683,7 +683,7 @@ GLOBAL_LIST_EMPTY(aide_list) desc = "A flask with an almost-holy aura emitting from it. The label on the bottle says: 'erqo'hyy tvi'rf lbh jv'atf'." list_reagents = list(/datum/reagent/flightpotion = 5) -/obj/item/reagent_containers/glass/bottle/potion/update_icon() +/obj/item/reagent_containers/glass/bottle/potion/update_appearance(updates = ALL) if(reagents.total_volume) icon_state = initial(icon_state) desc = initial(desc) @@ -1504,18 +1504,18 @@ GLOBAL_LIST_EMPTY(aide_list) chaser_speed = max(chaser_speed + health_percent, 0.5) //one tenth of a second faster for each missing 10% of health blast_range -= round(health_percent * 10) //one additional range for each missing 10% of health -/obj/item/hierophant_club/update_icon() +/obj/item/hierophant_club/update_appearance(updates = ALL) icon_state = "hierophant_club[timer <= world.time ? "_ready":""][(beacon && !QDELETED(beacon)) ? "":"_beacon"]" item_state = icon_state if(ismob(loc)) var/mob/M = loc - M.update_inv_hands() + M.update_held_items() M.update_inv_back() /obj/item/hierophant_club/proc/prepare_icon_update() - update_icon() + update_appearance(updates = ALL) sleep(timer - world.time) - update_icon() + update_appearance(updates = ALL) /obj/item/hierophant_club/ui_action_click(mob/user, action) if(istype(action, /datum/action/item_action/toggle_unfriendly_fire)) //toggle friendly fire... @@ -1743,7 +1743,7 @@ GLOBAL_LIST_EMPTY(aide_list) var/fauna_damage_type = BRUTE resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF -/obj/item/twohanded/bonespear/stalwartpike/update_icon() +/obj/item/twohanded/bonespear/stalwartpike/update_appearance(updates = ALL) . = ..() if(wielded) icon_state = "stalwart_spear1" diff --git a/code/modules/mining/lavaland/world_anvil.dm b/code/modules/mining/lavaland/world_anvil.dm index 76b08f2ca73a..18f77da0d08e 100644 --- a/code/modules/mining/lavaland/world_anvil.dm +++ b/code/modules/mining/lavaland/world_anvil.dm @@ -27,7 +27,7 @@ QDEL_NULL(internal) . = ..() -/obj/structure/world_anvil/update_icon() +/obj/structure/world_anvil/update_appearance(updates = ALL) icon_state = forge_charges > 0 ? "anvil_a" : "anvil" if(forge_charges > 0) set_light(4,1,LIGHT_COLOR_ORANGE) @@ -44,7 +44,7 @@ forge_charges = forge_charges + placed_ore.quality to_chat(user,"You place down the gibtonite on the World Anvil, and watch as the gibtonite melts into it. The World Anvil is now heated enough for [forge_charges] forge[forge_charges > 1 ? "s" : ""].") qdel(placed_ore) - update_icon() + update_appearance(updates = ALL) return if(forge_charges <= 0) to_chat(user,"The World Anvil is not hot enough to be usable!") @@ -70,7 +70,7 @@ forge_charges-- if(forge_charges <= 0) visible_message("The World Anvil cools down.") - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 998142f53fc9..8e2457b03a6d 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -345,7 +345,7 @@ do_sparks(5, TRUE, src) ..() -/obj/machinery/mineral/ore_redemption/update_icon() +/obj/machinery/mineral/ore_redemption/update_appearance(updates = ALL) if(powered()) icon_state = initial(icon_state) else diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index ddaa3629eca9..ef65ebe7688b 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) if(user.a_intent == INTENT_HARM) //so we can hit the machine return ..() - if(default_deconstruction_screwdriver(user, "icon_state", "icon_state", W)) + if(default_deconstruction_screwdriver(user, "silo_open", "silo", W)) return TRUE if(default_deconstruction_crowbar(W)) diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index fcd4fe2dc71f..cfa4211a906c 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -105,7 +105,7 @@ var/datum/data/mining_equipment/M = p GLOB.vending_products[M.equipment_path] = 1 -/obj/machinery/mineral/equipment_vendor/update_icon() +/obj/machinery/mineral/equipment_vendor/update_appearance(updates = ALL) if(powered()) icon_state = initial(icon_state) else diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index a950925c99f6..0d831c0f3cd6 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -22,7 +22,7 @@ var/list/stack_overlays var/edible = FALSE //can a preternis eat it for some funny effect? -/obj/item/stack/ore/update_icon() +/obj/item/stack/ore/update_appearance(updates = ALL) var/difference = min(ORESTACK_OVERLAYS_MAX, amount) - (LAZYLEN(stack_overlays)+1) if(difference == 0) return @@ -612,7 +612,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ /obj/item/coinstack/Initialize() . = ..() coins = list() - update_icon() + update_appearance(updates = ALL) /obj/item/coinstack/examine(mob/user) . = ..() @@ -626,7 +626,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(antag > 1) . += span_info("But they told me I could only have one at a time...") -/obj/item/coinstack/update_icon() +/obj/item/coinstack/update_appearance(updates = ALL) cut_overlays() for(var/i in 1 to length(coins)) var/obj/item/coin/C = coins[i] @@ -655,7 +655,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ C.pixel_y = 0 src.add_fingerprint(user) to_chat(user,span_notice("You add [C] to the stack of coins.")) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/coinstack/proc/remove_from_stack(mob/living/user) //you can only remove the topmost coin from the stack @@ -663,7 +663,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(top_coin) coins -= top_coin user.put_in_active_hand(top_coin) - update_icon() + update_appearance(updates = ALL) if(length(coins) <= 1) //one coin left, we're done here var/obj/item/coin/lastCoin = coins[1] coins -= coins[1] diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 8b623a5b7edd..60b033cd9087 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -299,7 +299,7 @@ observer.real_name = observer.client.prefs.read_preference(/datum/preference/name/real_name) observer.name = observer.real_name observer.client.init_verbs() - observer.update_icon() + observer.update_appearance(updates = ALL) observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) QDEL_NULL(mind) qdel(src) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2b4984769ab9..bfe9e407c1dd 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -115,7 +115,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) facial_hair_style = body_human.facial_hair_style facial_hair_color = brighten_color(body_human.facial_hair_color) - update_icon() + update_appearance(updates = ALL) if(!T || is_secret_level(T.z)) var/list/turfs = get_area_turfs(/area/shuttle/arrival) @@ -193,7 +193,9 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) * Hair will always update its dir, so if your sprite has no dirs the haircut will go all over the place. * |- Ricotez */ -/mob/dead/observer/proc/update_icon(new_form) +/mob/dead/observer/update_icon(updates=ALL, new_form) + . = ..() + if(client) //We update our preferences in case they changed right before update_icon was called. ghost_accs = client.prefs.read_preference(/datum/preference/choiced/ghost_accessories) ghost_others = client.prefs.read_preference(/datum/preference/choiced/ghost_others) @@ -818,7 +820,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp qdel(species) - update_icon() + update_appearance(updates = ALL) /mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) return IsAdminGhost(usr) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 6b212efaa5ec..6281ee138adc 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -190,7 +190,7 @@ I.equipped(src, SLOT_HANDS, no_sound) if(I.pulledby) I.pulledby.stop_pulling() - update_inv_hands() + update_held_items() I.pixel_x = initial(I.pixel_x) I.pixel_y = initial(I.pixel_y) I.transform = initial(I.transform) @@ -330,7 +330,7 @@ var/hand_index = get_held_index_of_item(I) if(hand_index) held_items[hand_index] = null - update_inv_hands() + update_held_items() if(I) if(client) client.screen -= I @@ -434,7 +434,7 @@ return FALSE if(M.equip_to_appropriate_slot(src)) - M.update_inv_hands() + M.update_held_items() return TRUE else if(equip_delay_self) diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 27b646b0c990..86e2a59bbd59 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -24,7 +24,7 @@ Unless you are slaved as a silicon, you retain crew/antagonist/etc status and should behave as such.\n\ Being placed in a mech does not slave you to any laws." -/obj/item/mmi/update_icon() +/obj/item/mmi/update_appearance(updates = ALL) if(!brain) icon_state = "mmi_off" return @@ -83,7 +83,7 @@ brain = newbrain name = "[initial(name)]: [brainmob.real_name]" - update_icon() + update_appearance(updates = ALL) SSblackbox.record_feedback("amount", "mmis_filled", 1) @@ -110,7 +110,7 @@ if(!brainmob) return to_chat(brainmob, span_userdanger("Due to the traumatic danger of your removal, all memories of the events leading to your brain being removed are lost[rebooting ? ", along with all memories of the events leading to your death as a cyborg" : ""]")) eject_brain(user) - update_icon() + update_appearance(updates = ALL) name = initial(name) user.visible_message(span_notice("[user] rips the brain out of [src]"), span_danger("You successfully remove the brain from the [src][rebooting ? ", interrupting the reboot process" : ""]")) if(rebooting) @@ -159,7 +159,7 @@ name = "[initial(name)]: [brainmob.real_name]" to_chat(brainmob, welcome_message) - update_icon() + update_appearance(updates = ALL) return /obj/item/mmi/proc/replacement_ai_name() diff --git a/code/modules/mob/living/brain/death.dm b/code/modules/mob/living/brain/death.dm index e90637f63ed8..9419a9ebe61a 100644 --- a/code/modules/mob/living/brain/death.dm +++ b/code/modules/mob/living/brain/death.dm @@ -7,7 +7,7 @@ var/obj/item/mmi = container mmi.visible_message(span_warning("[src]'s MMI flatlines!"), \ span_italics("You hear something flatline.")) - mmi.update_icon() + mmi.update_appearance(updates = ALL) return ..() diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index e7f48ee9991e..3f444e185370 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -58,12 +58,12 @@ GLOBAL_VAR(posibrain_notify_cooldown) ping_ghosts("requested", FALSE) next_ask = world.time + askDelay searching = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(check_success)), askDelay) /obj/item/mmi/posibrain/proc/check_success() searching = FALSE - update_icon() + update_appearance(updates = ALL) if(QDELETED(brainmob)) return if(brainmob.client) @@ -126,7 +126,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) brainmob.mind.remove_all_antag() brainmob.mind.wipe_memory() - update_icon() + update_appearance(updates = ALL) return ..() /obj/item/mmi/posibrain/proc/transfer_personality(mob/candidate) @@ -204,7 +204,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) return -/obj/item/mmi/posibrain/update_icon() +/obj/item/mmi/posibrain/update_appearance(updates = ALL) if(searching) icon_state = "[initial(icon_state)]-searching" return diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index 3e5fdaf31ef9..f7de3864883d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -44,7 +44,7 @@ alt_icon = old_icon pixel_x = get_standard_pixel_x_offset(mobility_flags & MOBILITY_STAND) pixel_y = get_standard_pixel_y_offset(mobility_flags & MOBILITY_STAND) - update_inv_hands() + update_held_items() update_inv_handcuffed() /mob/living/carbon/alien/humanoid/regenerate_icons() @@ -75,7 +75,7 @@ overlays_standing[HANDCUFF_LAYER] = cuffs //Royals have bigger sprites, so inhand things must be handled differently. -/mob/living/carbon/alien/humanoid/royal/update_inv_hands() +/mob/living/carbon/alien/humanoid/royal/update_held_items() ..() remove_overlay(HANDS_LAYER) var/list/hands = list() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 45f47a9d6044..42e7e6738cc6 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -45,10 +45,10 @@ var/atom/movable/screen/inventory/hand/H H = hud_used.hand_slots["[oindex]"] if(H) - H.update_icon() + H.update_appearance(updates = ALL) H = hud_used.hand_slots["[held_index]"] if(H) - H.update_icon() + H.update_appearance(updates = ALL) /mob/living/carbon/activate_hand(selhand) //l/r OR 1-held_items.len diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index dec676f7b770..6c25a02e06eb 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -67,7 +67,7 @@ I.attack_hand(src) if(get_active_held_item() == I) //if our attack_hand() picks up the item... visible_message(span_warning("[src] catches [I]!")) //catch that sucker! - update_inv_hands() + update_held_items() I.pixel_x = initial(I.pixel_x) I.pixel_y = initial(I.pixel_y) I.transform = initial(I.transform) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 2574a5250c22..f6a10476b4cf 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -80,7 +80,7 @@ FP.entered_dirs |= dir FP.bloodiness = S.bloody_shoes[S.blood_state] - BLOOD_LOSS_IN_SPREAD FP.add_blood_DNA(S.return_blood_DNA()) - FP.update_icon() + FP.update_appearance(updates = ALL) update_inv_shoes() //End bloody footprints if(istype(S)) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 6a8c17291a18..f48942ef83c8 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -343,7 +343,7 @@ to_chat(src, "You have no backpack to take something out of!") return if(equip_to_slot_if_possible(thing, SLOT_BACK)) - update_inv_hands() + update_held_items() return if(!SEND_SIGNAL(equipped_back, COMSIG_CONTAINS_STORAGE)) // not a storage item if(!thing) @@ -374,7 +374,7 @@ to_chat(src, "You have no belt to take something out of!") return if(equip_to_slot_if_possible(thing, SLOT_BELT)) - update_inv_hands() + update_held_items() return if(!SEND_SIGNAL(equipped_belt, COMSIG_CONTAINS_STORAGE)) // not a storage item if(!thing) @@ -403,7 +403,7 @@ to_chat(src, span_notice("You have no suit storage to take something out of.")) return if(equip_to_slot_if_possible(thing, SLOT_SUIT_STORE)) - update_inv_hands() + update_held_items() return if(!SEND_SIGNAL(equipped_suit, COMSIG_CONTAINS_STORAGE)) // not a storage item if(!thing) diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 9d6fd3130a33..9ba5168380c0 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -147,6 +147,9 @@ var/obj/item/light_eater/blade decay_factor = 0 +/obj/item/organ/heart/nightmare/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/organ/heart/nightmare/attack(mob/M, mob/living/carbon/user, obj/target) if(M != user) @@ -179,9 +182,6 @@ /obj/item/organ/heart/nightmare/Stop() return 0 -/obj/item/organ/heart/nightmare/update_icon() - return //always beating visually - /obj/item/organ/heart/nightmare/process() if(QDELETED(owner) || owner.stat != DEAD || !owner) respawn_progress = 0 @@ -261,7 +261,7 @@ var/obj/item/pda/PDA = O PDA.set_light_on(FALSE) PDA.set_light_range(0) //It won't be turning on again. - PDA.update_icon() + PDA.update_appearance(updates = ALL) visible_message(span_danger("The light in [PDA] shorts out!")) else visible_message(span_danger("[O] is disintegrated by [src]!")) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index c0bcb9f8e63a..e1d528f7ed6b 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -102,7 +102,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM] - inv.update_icon() + inv.update_appearance(updates = ALL) if(istype(w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform @@ -148,7 +148,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_ID] - inv.update_icon() + inv.update_appearance(updates = ALL) var/mutable_appearance/id_overlay = overlays_standing[ID_LAYER] @@ -173,7 +173,7 @@ There are several things that need to be remembered: if(client && hud_used && hud_used.inv_slots[SLOT_GLOVES]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_GLOVES] - inv.update_icon() + inv.update_appearance(updates = ALL) if(!gloves && blood_in_hands) var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER) @@ -209,7 +209,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_GLASSES] - inv.update_icon() + inv.update_appearance(updates = ALL) if(glasses) glasses.screen_loc = ui_glasses //...draw the item in the inventory screen @@ -237,7 +237,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_EARS] - inv.update_icon() + inv.update_appearance(updates = ALL) if(ears) ears.screen_loc = ui_ears //move the item to the appropriate screen loc @@ -258,7 +258,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(wear_neck) wear_neck.screen_loc = ui_neck @@ -283,7 +283,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES] - inv.update_icon() + inv.update_appearance(updates = ALL) if(shoes) var/target_overlay = shoes.icon_state @@ -311,7 +311,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_SUIT_STORE] - inv.update_icon() + inv.update_appearance(updates = ALL) if(s_store) s_store.screen_loc = ui_sstore1 @@ -350,7 +350,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_BELT] - inv.update_icon() + inv.update_appearance(updates = ALL) if(belt) belt.screen_loc = ui_belt @@ -373,7 +373,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_SUIT] - inv.update_icon() + inv.update_appearance(updates = ALL) if(istype(wear_suit, /obj/item)) wear_suit.screen_loc = ui_oclothing @@ -402,10 +402,10 @@ There are several things that need to be remembered: var/atom/movable/screen/inventory/inv inv = hud_used.inv_slots[SLOT_L_STORE] - inv.update_icon() + inv.update_appearance(updates = ALL) inv = hud_used.inv_slots[SLOT_R_STORE] - inv.update_icon() + inv.update_appearance(updates = ALL) if(l_store) l_store.screen_loc = ui_storage1 @@ -428,7 +428,7 @@ There are several things that need to be remembered: if(client && hud_used) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(wear_mask) var/target_overlay = wear_mask.icon_state @@ -455,7 +455,7 @@ There are several things that need to be remembered: if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(back) update_hud_back(back) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index fdb575db5865..09bc7a3ce9b1 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -95,7 +95,7 @@ update_inv_legcuffed() if(SLOT_HANDS) put_in_hands(I) - update_inv_hands() + update_held_items() if(SLOT_IN_BACKPACK) if(!back || !SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) not_handled = TRUE diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index eb0c0337cec3..4fc1933c9bc9 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -41,13 +41,13 @@ /mob/living/carbon/regenerate_icons() if(notransform) return 1 - update_inv_hands() + update_held_items() update_inv_handcuffed() update_inv_legcuffed() update_fire() -/mob/living/carbon/update_inv_hands() +/mob/living/carbon/update_held_items() remove_overlay(HANDS_LAYER) if (handcuffed) drop_all_held_items() @@ -117,7 +117,7 @@ if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(wear_mask) if(!(SLOT_WEAR_MASK in check_obscured_slots())) @@ -131,7 +131,7 @@ if(client && hud_used && hud_used.inv_slots[SLOT_NECK]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(wear_neck) if(!(SLOT_NECK in check_obscured_slots())) @@ -145,7 +145,7 @@ if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK] - inv.update_icon() + inv.update_appearance(updates = ALL) if(back) overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = 'icons/mob/clothing/back.dmi') @@ -161,7 +161,7 @@ if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD] - inv.update_icon() + inv.update_appearance(updates = ALL) if(head) overlays_standing[HEAD_LAYER] = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/clothing/head/head.dmi') @@ -198,7 +198,7 @@ for(var/hand in hud_used.hand_slots) var/atom/movable/screen/inventory/hand/H = hud_used.hand_slots[hand] if(H) - H.update_icon() + H.update_appearance(updates = ALL) //update whether our head item appears on our hud. /mob/living/carbon/proc/update_hud_head(obj/item/I) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index a022db670b21..465a1e8a831a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1054,7 +1054,7 @@ playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1, ignore_walls = FALSE) to_chat(src, "Hack complete. \The [apc] is now under your exclusive control.") - apc.update_icon() + apc.update_appearance(updates = ALL) /mob/living/silicon/ai/verb/deploy_to_shell(var/mob/living/silicon/robot/target) set category = "AI Commands" diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm index 36b861050cc2..12e8d577d38f 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm @@ -40,7 +40,7 @@ GLOBAL_VAR_INIT(primary_data_core, null) GLOB.data_cores += src if(primary && !GLOB.primary_data_core) GLOB.primary_data_core = src - update_icon() + update_appearance(updates = ALL) RefreshParts() /obj/machinery/ai/data_core/RefreshParts() @@ -165,7 +165,7 @@ GLOBAL_VAR_INIT(primary_data_core, null) if(valid_holder()) valid_ticks++ if(valid_ticks == 1) - update_icon() + update_appearance(updates = ALL) use_power = ACTIVE_POWER_USE if((stat & NOPOWER)) integrated_battery.use(active_power_usage * CELL_POWERUSE_MULTIPLIER) @@ -174,7 +174,7 @@ GLOBAL_VAR_INIT(primary_data_core, null) valid_ticks-- if(valid_ticks <= 0) use_power = IDLE_POWER_USE - update_icon() + update_appearance(updates = ALL) for(var/mob/living/silicon/ai/AI in contents) if(!AI.is_dying) AI.relocate() @@ -214,7 +214,7 @@ GLOBAL_VAR_INIT(primary_data_core, null) if(AI.eyeobj) AI.eyeobj.forceMove(get_turf(src)) -/obj/machinery/ai/data_core/update_icon() +/obj/machinery/ai/data_core/update_appearance(updates = ALL) cut_overlays() if(!(stat & (BROKEN|EMPED)) && has_power()) diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm index a47fbdc71046..7e4445d97c18 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm @@ -218,7 +218,7 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6)) return downloading.transfer_ai(AI_TRANS_TO_CARD, user_downloading, null, intellicard) intellicard.forceMove(get_turf(src)) - intellicard.update_icon() + intellicard.update_appearance(updates = ALL) intellicard = null stop_download(TRUE) @@ -237,7 +237,7 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6)) intellicard.AI.control_disabled = FALSE intellicard.AI.relocate(TRUE) intellicard.AI = null - intellicard.update_icon() + intellicard.update_appearance(updates = ALL) /obj/machinery/computer/ai_control_console/ui_act(action, params) if(..()) diff --git a/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm b/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm index 6f4a1b779cab..9a7cbca4ddc9 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm @@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) roundstart = mapload installed_racks = list() GLOB.server_cabinets += src - update_icon() + update_appearance(updates = ALL) RefreshParts() /obj/machinery/ai/server_cabinet/Destroy() @@ -79,7 +79,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) valid_ticks++ if(!was_valid_holder) - update_icon() + update_appearance(updates = ALL) was_valid_holder = TRUE if(!hardware_synced) @@ -96,7 +96,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) GLOB.ai_os.update_hardware() -/obj/machinery/ai/server_cabinet/update_icon() +/obj/machinery/ai/server_cabinet/update_appearance(updates = ALL) cut_overlays() if(installed_racks.len > 0) @@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) cached_power_usage += rack.get_power_usage() GLOB.ai_os.update_hardware() use_power = ACTIVE_POWER_USE - update_icon() + update_appearance(updates = ALL) return FALSE if(W.tool_behaviour == TOOL_CROWBAR) if(installed_racks.len) @@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) GLOB.ai_os.update_hardware() to_chat(user, span_notice("You remove all the racks from [src]")) use_power = IDLE_POWER_USE - update_icon() + update_appearance(updates = ALL) return FALSE else if(default_deconstruction_crowbar(W)) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 35ea739c3dee..5fd2521d72fd 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -171,14 +171,14 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) continue cameras_telegraphed -= C C.in_use_lights-- - C.update_icon() + C.update_appearance(updates = ALL) for (var/V in add) var/obj/machinery/camera/C = V if(QDELETED(C)) continue cameras_telegraphed |= C C.in_use_lights++ - C.update_icon() + C.update_appearance(updates = ALL) /mob/camera/aiEye/pic_in_pic/proc/disable_camera_telegraphing() telegraph_cameras = FALSE @@ -187,7 +187,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) if(QDELETED(C)) continue C.in_use_lights-- - C.update_icon() + C.update_appearance(updates = ALL) cameras_telegraphed.Cut() /mob/camera/aiEye/pic_in_pic/Destroy() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 08ec212972ff..db9225ab7676 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -170,7 +170,7 @@ mmi.brainmob.name = src.real_name mmi.brainmob.real_name = src.real_name mmi.brainmob.container = mmi - mmi.update_icon() + mmi.update_appearance(updates = ALL) updatename() @@ -195,7 +195,7 @@ mmi.brainmob.remove_from_dead_mob_list() mmi.brainmob.add_to_alive_mob_list() mind.transfer_to(mmi.brainmob) - mmi.update_icon() + mmi.update_appearance(updates = ALL) if(istype(mmi, /obj/item/mmi/posibrain)) ADD_TRAIT(mmi.brainmob, TRAIT_PACIFISM, POSIBRAIN_TRAIT) else @@ -803,14 +803,14 @@ set_light_range(1) //Again, like above, this only takes effect when the light is forced on by doomsday mode. set_light_on(FALSE) lamp_enabled = FALSE - lampButton?.update_icon() + lampButton?.update_appearance(updates = ALL) update_icons() return set_light_range(lamp_intensity) set_light_color(lamp_color) set_light_on(TRUE) lamp_enabled = TRUE - lampButton?.update_icon() + lampButton?.update_appearance(updates = ALL) update_icons() /mob/living/silicon/robot/proc/deconstruct() diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 487c1d033d74..0139291de74d 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -54,7 +54,7 @@ add_fingerprint(user) if(opened && !wiresexposed && !issilicon(user)) if(cell) - cell.update_icon() + cell.update_appearance(updates = ALL) cell.add_fingerprint(user) user.put_in_active_hand(cell) to_chat(user, span_notice("You remove \the [cell].")) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index e0eeeba1982a..da5675478eca 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -153,7 +153,7 @@ var/obj/item/assembly/flash/F = I F.times_used = 0 F.burnt_out = FALSE - F.update_icon() + F.update_appearance(updates = ALL) else if(istype(I, /obj/item/melee/baton)) var/obj/item/melee/baton/B = I if(B.cell) @@ -389,7 +389,7 @@ if(T.cell.charge < T.cell.maxcharge) var/obj/item/ammo_casing/energy/S = T.ammo_type[T.select] T.cell.give(S.e_cost * coeff) - T.update_icon() + T.update_appearance(updates = ALL) else T.charge_timer = 0 diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm index 4f9cc5d7a41c..55e90c41ebbf 100644 --- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm +++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm @@ -51,7 +51,7 @@ weapon.attack(C, src) playsound(src, 'sound/weapons/blade1.ogg', 50, TRUE, -1) if(C.stat == DEAD) - addtimer(CALLBACK(src, PROC_REF(update_icon)), 2) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 2) back_to_idle() @@ -60,13 +60,13 @@ return switch(mode) if(BOT_IDLE) // idle - update_icon() + update_appearance(updates = ALL) walk_to(src,0) look_for_perp() // see if any criminals are in range if(!mode && auto_patrol) // still idle, and set to patrol mode = BOT_START_PATROL // switch to patrol mode if(BOT_HUNT) // hunting for perp - update_icon() + update_appearance(updates = ALL) playsound(src,'sound/effects/beepskyspinsabre.ogg',100,TRUE,-1) // general beepsky doesn't give up so easily, jedi scum if(frustration >= 20) diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index cff40711067f..a68eecac6df6 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -51,11 +51,11 @@ /mob/living/simple_animal/bot/atmosbot/turn_on() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/atmosbot/turn_off() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/atmosbot/set_custom_texts() text_hack = "You corrupt [name]'s safety protocols." @@ -82,7 +82,7 @@ if(last_barrier_tick + ATMOSBOT_HOLOBARRIER_COOLDOWN < world.time) target = return_nearest_breach() action = ATMOSBOT_DEPLOY_FOAM - update_icon() + update_appearance(updates = ALL) if(!target) if(auto_patrol) @@ -194,9 +194,9 @@ return breached_pressure = new_breach_pressure update_controls() - update_icon() + update_appearance(updates = ALL) -/mob/living/simple_animal/bot/atmosbot/update_icon() +/mob/living/simple_animal/bot/atmosbot/update_appearance(updates = ALL) icon_state = "atmosbot[on][on?"_[action]":""]" /mob/living/simple_animal/bot/atmosbot/UnarmedAttack(atom/A, proximity) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index b5f5a013fc2b..5faed059e230 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -130,7 +130,7 @@ on = TRUE update_mobility() set_light_on(on) - update_icon() + update_appearance(updates = ALL) diag_hud_set_botstat() return TRUE @@ -139,7 +139,7 @@ update_mobility() set_light_on(on) bot_reset() //Resets an AI's call, should it exist. - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/Initialize() . = ..() @@ -400,7 +400,7 @@ if(istype(dropped_item, /obj/item/stock_parts/cell)) var/obj/item/stock_parts/cell/dropped_cell = dropped_item dropped_cell.charge = 0 - dropped_cell.update_icon() + dropped_cell.update_appearance(updates = ALL) else if(istype(dropped_item, /obj/item/storage)) var/obj/item/storage/S = dropped_item @@ -409,7 +409,7 @@ else if(istype(dropped_item, /obj/item/gun/energy)) var/obj/item/gun/energy/dropped_gun = dropped_item dropped_gun.cell.charge = 0 - dropped_gun.update_icon() + dropped_gun.update_appearance(updates = ALL) //Generalized behavior code, override where needed! @@ -855,7 +855,7 @@ Pass a positive integer as an argument to override a bot's default speed. ejectpai(usr) update_controls() -/mob/living/simple_animal/bot/proc/update_icon() +/mob/living/simple_animal/bot/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][on]" // Machinery to simplify topic and access calls @@ -968,7 +968,7 @@ Pass a positive integer as an argument to override a bot's default speed. /mob/living/simple_animal/bot/revive(full_heal = 0, admin_revive = 0) if(..()) - update_icon() + update_appearance(updates = ALL) . = 1 /mob/living/simple_animal/bot/ghost() diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 0e3afdf43cb7..7c1caae2f841 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -212,9 +212,9 @@ /obj/item/bot_assembly/floorbot/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/bot_assembly/floorbot/update_icon() +/obj/item/bot_assembly/floorbot/update_appearance(updates = ALL) ..() switch(build_step) if(ASSEMBLY_FIRST_STEP) @@ -237,7 +237,7 @@ to_chat(user, span_notice("You add [W] to [src].")) qdel(W) build_step++ - update_icon() + update_appearance(updates = ALL) if(ASSEMBLY_SECOND_STEP) if(istype(W, /obj/item/bodypart/l_arm/robot) || istype(W, /obj/item/bodypart/r_arm/robot)) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 87cb73c8e6dc..d70be10e9760 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -388,15 +388,15 @@ Auto Patrol[]"}, if(!lasercolor) var/obj/item/gun/energy/e_gun/dragnet/G = new (Tsec) G.cell.charge = 0 - G.update_icon() + G.update_appearance(updates = ALL) else if(lasercolor == "b") var/obj/item/gun/energy/laser/bluetag/G = new (Tsec) G.cell.charge = 0 - G.update_icon() + G.update_appearance(updates = ALL) else if(lasercolor == "r") var/obj/item/gun/energy/laser/redtag/G = new (Tsec) G.cell.charge = 0 - G.update_icon() + G.update_appearance(updates = ALL) if(prob(50)) new /obj/item/bodypart/l_leg/robot(Tsec) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 1d992c22bc6b..6fd44704e3e6 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -41,7 +41,7 @@ /mob/living/simple_animal/bot/firebot/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) var/datum/job/engineer/J = new/datum/job/engineer access_card.access += J.get_access() prev_access = access_card.access @@ -76,11 +76,11 @@ /mob/living/simple_animal/bot/firebot/turn_on() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/firebot/turn_off() ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/firebot/bot_reset() ..() @@ -88,14 +88,14 @@ old_target_fire = null ignore_list = list() anchored = FALSE - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/firebot/proc/soft_reset() path = list() target_fire = null mode = BOT_IDLE last_found = world.time - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/firebot/set_custom_texts() text_hack = "You corrupt [name]'s safety protocols." @@ -152,7 +152,7 @@ stationary_mode = !stationary_mode update_controls() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/firebot/proc/is_burning(atom/target) if(ismob(target)) @@ -286,7 +286,7 @@ flick("firebot1_use", user) internal_ext.afterattack(target, user, null) -/mob/living/simple_animal/bot/firebot/update_icon() +/mob/living/simple_animal/bot/firebot/update_appearance(updates = ALL) if(!on) icon_state = "firebot0" return diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index a4ad78b124a5..6e4c0737f29a 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -45,7 +45,7 @@ /mob/living/simple_animal/bot/floorbot/Initialize(mapload, new_toolbox_color) . = ..() toolbox_color = new_toolbox_color - update_icon() + update_appearance(updates = ALL) var/datum/job/engineer/J = new/datum/job/engineer access_card.access += J.get_access() prev_access = access_card.access @@ -55,11 +55,11 @@ /mob/living/simple_animal/bot/floorbot/turn_on() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/floorbot/turn_off() ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/floorbot/bot_reset() ..() @@ -67,7 +67,7 @@ oldloc = null ignore_list = list() anchored = FALSE - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/floorbot/set_custom_texts() text_hack = "You corrupt [name]'s construction protocols." @@ -355,11 +355,11 @@ if(specialtiles == 0) speak("Requesting refill of custom floortiles to continue replacing.") mode = BOT_IDLE - update_icon() + update_appearance(updates = ALL) anchored = FALSE target = null -/mob/living/simple_animal/bot/floorbot/update_icon() +/mob/living/simple_animal/bot/floorbot/update_appearance(updates = ALL) icon_state = "[toolbox_color]floorbot[on]" diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 384edd069202..8fdbb187355c 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -39,7 +39,7 @@ /mob/living/simple_animal/bot/honkbot/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) auto_patrol = TRUE var/datum/job/clown/J = new/datum/job/clown access_card.access += J.get_access() @@ -50,7 +50,7 @@ /mob/living/simple_animal/bot/honkbot/proc/sensor_blink() icon_state = "honkbot-c" - addtimer(CALLBACK(src, PROC_REF(update_icon)), 5, TIMER_OVERRIDE|TIMER_UNIQUE) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 5, TIMER_OVERRIDE|TIMER_UNIQUE) //honkbots react with sounds. /mob/living/simple_animal/bot/honkbot/proc/react_ping() @@ -133,7 +133,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, oldtarget_name = user.name audible_message(span_danger("[src] gives out an evil laugh!")) playsound(src, 'sound/machines/honkbot_evil_laugh.ogg', 75, 1, -1) // evil laughter - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/honkbot/bullet_act(obj/item/projectile/Proj) if((istype(Proj,/obj/item/projectile/beam)) || (istype(Proj,/obj/item/projectile/bullet) && (Proj.damage_type == BURN))||(Proj.damage_type == BRUTE) && (!Proj.nodamage && Proj.damage < health && ishuman(Proj.firer))) @@ -176,7 +176,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, playsound(src, "honkbot_e", 50, 0) spam_flag = TRUE // prevent spam icon_state = "honkbot-e" - addtimer(CALLBACK(src, PROC_REF(update_icon)), 30, TIMER_OVERRIDE|TIMER_UNIQUE) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 30, TIMER_OVERRIDE|TIMER_UNIQUE) addtimer(CALLBACK(src, PROC_REF(spam_flag_false)), cooldowntimehorn) /mob/living/simple_animal/bot/honkbot/proc/honk_attack(mob/living/carbon/C) // horn attack diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 3cf8e99d2eb6..9120a5b89fd5 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -91,7 +91,7 @@ treatment_tox_avoid = null treatment_tox = /datum/reagent/toxin/sodium_thiopental -/mob/living/simple_animal/bot/medbot/update_icon() +/mob/living/simple_animal/bot/medbot/update_appearance(updates = ALL) cut_overlays() if(skin) add_overlay("medskin_[skin]") @@ -116,11 +116,11 @@ prev_access = access_card.access qdel(J) skin = new_skin - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/medbot/update_mobility() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/medbot/bot_reset() ..() @@ -129,14 +129,14 @@ oldloc = null last_found = world.time declare_cooldown = 0 - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/medbot/proc/soft_reset() //Allows the medibot to still actively perform its medical duties without being completely halted as a hard reset does. path = list() patient = null mode = BOT_IDLE last_found = world.time - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/medbot/set_custom_texts() @@ -222,7 +222,7 @@ else if(href_list["stationary"]) stationary_mode = !stationary_mode path = list() - update_icon() + update_appearance(updates = ALL) else if(href_list["virus"]) treat_virus = !treat_virus @@ -413,7 +413,7 @@ if(patient && (get_dist(src,patient) <= 1)) //Patient is next to us, begin treatment! if(mode != BOT_HEALING) mode = BOT_HEALING - update_icon() + update_appearance(updates = ALL) frustration = 0 medicate_patient(patient) return @@ -554,9 +554,9 @@ var/mob/living/carbon/C = A patient = C mode = BOT_HEALING - update_icon() + update_appearance(updates = ALL) medicate_patient(C) - update_icon() + update_appearance(updates = ALL) else ..() @@ -664,7 +664,7 @@ if(failed) visible_message("[src] retracts its syringe.") - update_icon() + update_appearance(updates = ALL) soft_reset() return diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 78b371ae68ae..3350217a2e9c 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -115,7 +115,7 @@ ..() else ..() - update_icon() + update_appearance(updates = ALL) return /mob/living/simple_animal/bot/mulebot/emag_act(mob/user) @@ -127,7 +127,7 @@ flick("mulebot-emagged", src) playsound(src, "sparks", 100, 0) -/mob/living/simple_animal/bot/mulebot/update_icon() +/mob/living/simple_animal/bot/mulebot/update_appearance(updates = ALL) if(open) icon_state="mulebot-hatch" else @@ -389,7 +389,7 @@ load = AM mode = BOT_IDLE - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/mulebot/proc/load_mob(mob/living/M) can_buckle = TRUE @@ -463,7 +463,7 @@ num_steps-- if(!on || client) return - update_icon() + update_appearance(updates = ALL) switch(mode) if(BOT_IDLE) // idle @@ -572,7 +572,7 @@ mode = BOT_GO_HOME else mode = BOT_DELIVER - update_icon() + update_appearance(updates = ALL) get_nav() // starts bot moving to home @@ -583,7 +583,7 @@ spawn(0) set_destination(home_destination) mode = BOT_BLOCKED - update_icon() + update_appearance(updates = ALL) // called when bot reaches current target /mob/living/simple_animal/bot/mulebot/proc/at_target() @@ -691,7 +691,7 @@ loaddir = text2num(direction) else loaddir = 0 - update_icon() + update_appearance(updates = ALL) if(destination) // No need to calculate a path if you do not have a destination set! calc_path() @@ -713,7 +713,7 @@ new /obj/item/stack/cable_coil/cut(Tsec) if(cell) cell.forceMove(Tsec) - cell.update_icon() + cell.update_appearance(updates = ALL) cell = null do_sparks(3, TRUE, src) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 60bf9159515c..fe004dbdd52e 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -71,7 +71,7 @@ /mob/living/simple_animal/bot/secbot/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) var/datum/job/detective/J = new/datum/job/detective access_card.access += J.get_access() prev_access = access_card.access @@ -83,7 +83,7 @@ if(prob(5)) russian = TRUE // imported from Russia -/mob/living/simple_animal/bot/secbot/update_icon() +/mob/living/simple_animal/bot/secbot/update_appearance(updates = ALL) if(mode == BOT_HUNT) icon_state = "[initial(icon_state)]-c" return @@ -209,7 +209,7 @@ Auto Patrol: []"}, oldtarget_name = user.name audible_message(span_danger("[src] buzzes oddly!")) declare_arrests = FALSE - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/bot/secbot/bullet_act(obj/item/projectile/Proj) if(istype(Proj , /obj/item/projectile/beam)||istype(Proj, /obj/item/projectile/bullet)) @@ -264,7 +264,7 @@ Auto Patrol: []"}, var/judgement_criteria = judgement_criteria() playsound(src, 'sound/weapons/egloves.ogg', 50, TRUE, -1) icon_state = "secbot-c" - addtimer(CALLBACK(src, PROC_REF(update_icon)), 2) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 2) var/threat = 5 if(ishuman(C)) var/mob/living/carbon/human/H = C diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index e6c5cb6a540b..f8707a633f80 100644 --- a/code/modules/mob/living/simple_animal/eldritch_demons.dm +++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm @@ -322,7 +322,7 @@ icon_state = "rust_walker_n" else if(newdir == SOUTH) icon_state = "rust_walker_s" - //update_icon() + //update_appearance(updates = ALL) /mob/living/simple_animal/hostile/eldritch/rust_spirit/Moved() . = ..() diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm index 520728b34532..bda0c98d00af 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm @@ -8,7 +8,7 @@ /mob/living/simple_animal/drone/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) - update_inv_hands() + update_held_items() if(I == head) head = null update_inv_head() @@ -59,7 +59,7 @@ var/index = get_held_index_of_item(I) if(index) held_items[index] = null - update_inv_hands() + update_held_items() if(I.pulledby) I.pulledby.stop_pulling() diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm index b6fe86efe0db..1e861b57b88c 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm @@ -18,7 +18,7 @@ drone_overlays[cache_index] = null -/mob/living/simple_animal/drone/update_inv_hands() +/mob/living/simple_animal/drone/update_held_items() remove_overlay(DRONE_HANDS_LAYER) var/list/hands_overlays = list() @@ -85,7 +85,7 @@ /mob/living/simple_animal/drone/regenerate_icons() // Drones only have 4 slots, which in this specific instance // is a small blessing. - update_inv_hands() + update_held_items() update_inv_head() update_inv_internal_storage() diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index f5fe2ccbfd7f..b9deddaa8d11 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -65,7 +65,7 @@ to_chat(user, span_notice("You install [M] in [src]!")) mmi = M transfer_personality(M) - update_icon() + update_appearance(updates = ALL) return 1 else if(O.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src)) ///Removed needless self repair part @@ -131,7 +131,7 @@ if(!QDELETED(src) && stat != DEAD) death() -/mob/living/simple_animal/spiderbot/proc/update_icon() +/mob/living/simple_animal/spiderbot/update_appearance(updates = ALL) if(mmi) if(istype(mmi, /obj/item/mmi/posibrain)) icon_state = "spiderbot-chassis-posi" @@ -150,10 +150,10 @@ else if(key) mmi.brainmob.key = key mmi.forceMove(loc) - mmi.update_icon() + mmi.update_appearance(updates = ALL) mmi = null name = initial(name) - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/spiderbot/gib() eject_brain() diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 29bbf2324254..8e4eb31de605 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -256,7 +256,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/index = get_held_index_of_item(I) if(index) held_items[index] = null - update_inv_hands() + update_held_items() if(I.pulledby) I.pulledby.stop_pulling() @@ -277,7 +277,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians cut_overlay(I) guardian_overlays[cache_index] = null -/mob/living/simple_animal/hostile/guardian/update_inv_hands() +/mob/living/simple_animal/hostile/guardian/update_held_items() remove_overlay(GUARDIAN_HANDS_LAYER) var/list/hands_overlays = list() var/obj/item/l_hand = get_item_for_held_index(1) @@ -314,7 +314,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians apply_overlay(GUARDIAN_HANDS_LAYER) /mob/living/simple_animal/hostile/guardian/regenerate_icons() - update_inv_hands() + update_held_items() //MANIFEST, RECALL, TOGGLE MODE/LIGHT, SHOW TYPE @@ -636,8 +636,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
    "} -/obj/item/paper/guides/antag/guardian/update_icon() - return +/obj/item/paper/guides/antag/guardian/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/paper/guides/antag/guardian/wizard name = "Guardian Guide" diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index dc2d4a0b8cfd..bb6d28ac8f0e 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -42,7 +42,7 @@ //SLOT HANDLING BULLSHIT FOR INTERNAL STORAGE /mob/living/simple_animal/hostile/guardian/dextrous/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) - update_inv_hands() + update_held_items() if(I == internal_storage) internal_storage = null update_inv_internal_storage() diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm index 9d451748b059..3d8f90840624 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm @@ -9,7 +9,7 @@ cut_overlay(I) gorilla_overlays[cache_index] = null -/mob/living/simple_animal/hostile/gorilla/update_inv_hands() +/mob/living/simple_animal/hostile/gorilla/update_held_items() cut_overlays("standing_overlay") remove_overlay(GORILLA_HANDS_LAYER) @@ -49,5 +49,5 @@ return ..() /mob/living/simple_animal/hostile/gorilla/regenerate_icons() - update_inv_hands() + update_held_items() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index dd7d5fba6cb7..6bb7a6c8416e 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -300,8 +300,9 @@ Difficulty: Very Hard var/list/stored_items = list() var/list/blacklist = list() -/obj/machinery/smartfridge/black_box/update_icon() - return +/obj/machinery/smartfridge/black_box/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/smartfridge/black_box/accept_check(obj/item/O) if(!istype(O)) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4a87971bef8d..31a2c0ac66b7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -239,19 +239,19 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select] if(Zapgun.cell.charge >= shot.e_cost) Zapgun.cell.use(shot.e_cost) - Zapgun.update_icon() + Zapgun.update_appearance(updates = ALL) ..() else if(Zapstick) if(Zapstick.charges) Zapstick.charges-- - Zapstick.update_icon() + Zapstick.update_appearance(updates = ALL) ..() else if(Pewgun) if(Pewgun.chambered) if(Pewgun.chambered.BB) qdel(Pewgun.chambered.BB) Pewgun.chambered.BB = null //because qdel takes too long, ensures icon update - Pewgun.chambered.update_icon() + Pewgun.chambered.update_appearance(updates = ALL) ..() else visible_message(span_danger("The [src] clears a jam!")) @@ -260,7 +260,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) Pewgun.chambered = Pewgun.magazine.get_round(0) Pewgun.chambered.forceMove(Pewgun) - Pewgun.update_icon() + Pewgun.update_appearance(updates = ALL) else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think Pewgun.chambered = Pewgun.magazine.get_round(0) Pewgun.chambered.forceMove(Pewgun) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index aeb129cc76b4..cf3e370358eb 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -536,16 +536,16 @@ var/atom/movable/screen/inventory/hand/H H = hud_used.hand_slots["[hand_index]"] if(H) - H.update_icon() + H.update_appearance(updates = ALL) H = hud_used.hand_slots["[oindex]"] if(H) - H.update_icon() + H.update_appearance(updates = ALL) /mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE) . = ..(I, del_on_fail, merge_stacks) - update_inv_hands() + update_held_items() -/mob/living/simple_animal/update_inv_hands() +/mob/living/simple_animal/update_held_items() if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD) var/obj/item/l_hand = get_item_for_held_index(1) var/obj/item/r_hand = get_item_for_held_index(2) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 60f16e558944..8be3d38844e9 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -149,7 +149,7 @@ coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]") regenerate_icons() -/mob/living/simple_animal/slime/proc/update_name() +/mob/living/simple_animal/slime/update_name() if(slime_name_regex.Find(name)) number = rand(1, 1000) name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 96234ae968e8..64be881e1ce5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -707,7 +707,7 @@ var/obj/item/I = get_active_held_item() if(I) I.attack_self(src) - update_inv_hands() + update_held_items() /** * Get the notes of this mob diff --git a/code/modules/mob/update_icons.dm b/code/modules/mob/update_icons.dm index 581584912df0..a9d59456a44c 100644 --- a/code/modules/mob/update_icons.dm +++ b/code/modules/mob/update_icons.dm @@ -1,6 +1,7 @@ //Most of these are defined at this level to reduce on checks elsewhere in the code. //Having them here also makes for a nice reference list of the various overlay-updating procs available +///Redraws the entire mob. For carbons, this is rather expensive, please use the individual update_X procs. /mob/proc/regenerate_icons() //TODO: phase this out completely if possible return @@ -19,7 +20,7 @@ /mob/proc/update_inv_back() return -/mob/proc/update_inv_hands() +/mob/proc/update_held_items() return /mob/proc/update_inv_wear_mask() @@ -68,4 +69,4 @@ return /mob/proc/update_inv_ears() - return \ No newline at end of file + return diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 0764f2aa2654..744079da545b 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -99,7 +99,7 @@ idle_threads = list() install_starting_components() install_starting_files() - update_icon() + update_appearance(updates = ALL) /obj/item/modular_computer/Destroy() kill_program(forced = TRUE) @@ -262,7 +262,7 @@ . += get_modular_computer_parts_examine(user) -/obj/item/modular_computer/update_icon() +/obj/item/modular_computer/update_appearance(updates = ALL) if(!physical) return @@ -293,11 +293,11 @@ /obj/item/modular_computer/equipped() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/modular_computer/dropped() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/modular_computer/proc/update_label() @@ -338,7 +338,7 @@ else to_chat(user, span_notice("You press the power button and start up \the [src].")) enabled = TRUE - update_icon() + update_appearance(updates = ALL) play_computer_sound(startup_sound, get_clamped_volume(), FALSE) ui_interact(user) else // Unpowered @@ -480,7 +480,7 @@ var/mob/user = usr if(user && istype(user)) ui_interact(user) // Re-open the UI on this computer. It should show the main screen now. - update_icon() + update_appearance(updates = ALL) // Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on) /obj/item/modular_computer/proc/get_ntnet_status(specific_action = 0) @@ -504,7 +504,7 @@ if(loud) physical.visible_message(span_notice("\The [src] shuts down.")) enabled = FALSE - update_icon() + update_appearance(updates = ALL) play_computer_sound(shutdown_sound, get_clamped_volume(), FALSE) /** @@ -517,7 +517,7 @@ if(!has_light) return FALSE set_light_on(!light_on) - update_icon() + update_appearance(updates = ALL) return TRUE /** diff --git a/code/modules/modular_computers/computers/item/computer_components.dm b/code/modules/modular_computers/computers/item/computer_components.dm index 8020167959a6..ade43953655f 100644 --- a/code/modules/modular_computers/computers/item/computer_components.dm +++ b/code/modules/modular_computers/computers/item/computer_components.dm @@ -50,7 +50,7 @@ yeet.on_remove(src, user) if(enabled && !use_power()) shutdown_computer() - update_icon() + update_appearance(updates = ALL) return TRUE /// This isn't the "uninstall fully" proc, it just makes the computer lose all its references to the component diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index cb6f3f7aa702..c64246b3c65b 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -116,7 +116,7 @@ active_program.program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs active_program = null - update_icon() + update_appearance(updates = ALL) if(user && istype(user)) ui_interact(user) // Re-open the UI on this computer. It should show the main screen now. @@ -156,7 +156,7 @@ active_program = P P.alert_pending = FALSE idle_threads.Remove(P) - update_icon() + update_appearance(updates = ALL) return var/obj/item/computer_hardware/processor_unit/PU = all_components[MC_CPU] @@ -171,7 +171,7 @@ if(P.run_program(user)) active_program = P P.alert_pending = FALSE - update_icon() + update_appearance(updates = ALL) return TRUE if("PC_toggle_light") diff --git a/code/modules/modular_computers/computers/item/laptop/laptop.dm b/code/modules/modular_computers/computers/item/laptop/laptop.dm index 8dbb3472a44c..d9300949c3a0 100644 --- a/code/modules/modular_computers/computers/item/laptop/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop/laptop.dm @@ -33,7 +33,7 @@ if(start_open && !screen_on) toggle_open() -/obj/item/modular_computer/laptop/update_icon() +/obj/item/modular_computer/laptop/update_appearance(updates = ALL) if(screen_on) ..() else @@ -106,7 +106,7 @@ icon_state = icon_state_unpowered screen_on = !screen_on - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index dd636708bd2f..f71793922d38 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -62,7 +62,7 @@ if(!machinery_computer) return ..() - machinery_computer.update_icon() + machinery_computer.update_appearance(updates = ALL) return /obj/item/modular_computer/processor/attack_ghost(mob/user) diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index e1d9f279d25f..28e87fe2df50 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -56,11 +56,11 @@ return to_chat(user, span_notice("You slide \the [C] into \the [src].")) inserted_item = C - update_icon() + update_appearance(updates = ALL) else return ..() -/obj/item/modular_computer/tablet/update_icon() +/obj/item/modular_computer/tablet/update_appearance(updates = ALL) ..() if (!isnull(variants)) if(!finish_color) diff --git a/code/modules/modular_computers/computers/machinery/console/modular_console.dm b/code/modules/modular_computers/computers/machinery/console/modular_console.dm index fd5d35c8329a..fae3cd416152 100644 --- a/code/modules/modular_computers/computers/machinery/console/modular_console.dm +++ b/code/modules/modular_computers/computers/machinery/console/modular_console.dm @@ -42,9 +42,9 @@ network_card.identification_string = "Unknown Console" if(cpu) cpu.screen_on = 1 - update_icon() + update_appearance(updates = ALL) -/obj/machinery/modular_computer/console/update_icon() +/obj/machinery/modular_computer/console/update_appearance(updates = ALL) . = ..() // this bit of code makes the computer hug the wall its next to diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 73ad7713bd36..fe36d84387bd 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -75,8 +75,8 @@ return FALSE return (cpu.emag_act(user)) -/obj/machinery/modular_computer/update_icon() - cpu.update_icon() +/obj/machinery/modular_computer/update_appearance(updates = ALL) + cpu.update_appearance(updates = ALL) /obj/machinery/modular_computer/AltClick(mob/user) if(cpu) @@ -105,13 +105,13 @@ if(cpu) cpu.shutdown_computer(0) stat |= NOPOWER - update_icon() + update_appearance(updates = ALL) // Modular computers can have battery in them, we handle power in previous proc, so prevent this from messing it up for us. /obj/machinery/modular_computer/power_change() if(cpu && cpu.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline. stat &= ~NOPOWER - update_icon() + update_appearance(updates = ALL) return . = ..() diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 0daf31715c19..2dbf51324912 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -68,7 +68,7 @@ // Relays icon update to the computer. /datum/computer_file/program/proc/update_computer_icon() if(computer) - computer.update_icon() + computer.update_appearance(updates = ALL) // Attempts to create a log in global ntnet datum. Returns 1 on success, 0 on fail. /datum/computer_file/program/proc/generate_network_log(text) @@ -237,7 +237,7 @@ program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs computer.active_program = null - computer.update_icon() + computer.update_appearance(updates = ALL) ui.close() if(user && istype(user)) diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 4c82eeb5f235..d10ff670753d 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -28,7 +28,7 @@ computer.visible_message(span_notice("\The [computer]'s screen brightly flashes and loud electrical buzzing is heard.")) computer.enabled = FALSE - computer.update_icon() + computer.update_appearance(updates = ALL) var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL] var/obj/item/computer_hardware/recharger/recharger = computer.all_components[MC_CHARGE] diff --git a/code/modules/modular_computers/file_system/programs/arcade.dm b/code/modules/modular_computers/file_system/programs/arcade.dm index 3f2fd4639e87..40f436ea6c22 100644 --- a/code/modules/modular_computers/file_system/programs/arcade.dm +++ b/code/modules/modular_computers/file_system/programs/arcade.dm @@ -28,7 +28,7 @@ game_active = FALSE program_icon_state = "arcade_off" if(istype(computer)) - computer.update_icon() + computer.update_appearance(updates = ALL) ticket_count += 1 sleep(1 SECONDS) return @@ -38,7 +38,7 @@ game_active = FALSE program_icon_state = "arcade_off" if(istype(computer)) - computer.update_icon() + computer.update_appearance(updates = ALL) sleep(1 SECONDS) return return @@ -168,4 +168,4 @@ boss_id = rand(1,6) pause_state = FALSE if(istype(computer)) - computer.update_icon() + computer.update_appearance(updates = ALL) diff --git a/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm index f0d06dc70970..ca3918331c3d 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm @@ -31,7 +31,7 @@ ui_header = "smmon_[last_status].gif" program_icon_state = "smmon_[last_status]" if(istype(computer)) - computer.update_icon() + computer.update_appearance(updates = ALL) /datum/computer_file/program/supermatter_monitor/run_program(mob/living/user) . = ..(user) diff --git a/code/modules/modular_computers/file_system/programs/medical/crew_monitor.dm b/code/modules/modular_computers/file_system/programs/medical/crew_monitor.dm index 2f64d0d938ce..28ef95d324aa 100644 --- a/code/modules/modular_computers/file_system/programs/medical/crew_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/medical/crew_monitor.dm @@ -56,7 +56,7 @@ ui_header = "health_green.gif" if(istype(computer)) - computer.update_icon() + computer.update_appearance(updates = ALL) /datum/computer_file/program/crew_monitor/ui_data(mob/user) var/list/data = get_header_data() diff --git a/code/modules/modular_computers/file_system/programs/portrait_printer.dm b/code/modules/modular_computers/file_system/programs/portrait_printer.dm index 912bf4030dcd..625c6f29f7f8 100644 --- a/code/modules/modular_computers/file_system/programs/portrait_printer.dm +++ b/code/modules/modular_computers/file_system/programs/portrait_printer.dm @@ -73,7 +73,7 @@ printed_canvas.name = "painting - [title]" ///this is a copy of something that is already in the database- it should not be able to be saved. printed_canvas.no_save = TRUE - printed_canvas.update_icon() + printed_canvas.update_appearance(updates = ALL) to_chat(usr, span_notice("You have printed [title] onto a new canvas.")) playsound(computer.physical, 'sound/items/poster_being_created.ogg', 100, TRUE) diff --git a/code/modules/modular_computers/file_system/programs/radar.dm b/code/modules/modular_computers/file_system/programs/radar.dm index 97f64584ed06..0d3a44030145 100644 --- a/code/modules/modular_computers/file_system/programs/radar.dm +++ b/code/modules/modular_computers/file_system/programs/radar.dm @@ -17,7 +17,7 @@ var/atom/selected ///Used to store when the next scan is available. Updated by the scan() proc. var/next_scan = 0 - ///Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_icon() calls + ///Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance(updates = ALL) calls var/last_icon_state = "" ///Used by the tgui interface, themed NT or Syndicate. var/arrowstyle = "ntosradarpointer.png" @@ -180,7 +180,7 @@ if(!trackable(signal)) program_icon_state = "[initial(program_icon_state)]lost" if(last_icon_state != program_icon_state) - computer.update_icon() + computer.update_appearance(updates = ALL) last_icon_state = program_icon_state return @@ -198,7 +198,7 @@ program_icon_state = "[initial(program_icon_state)]far" if(last_icon_state != program_icon_state) - computer.update_icon() + computer.update_appearance(updates = ALL) last_icon_state = program_icon_state computer.setDir(get_dir(here_turf, target_turf)) diff --git a/code/modules/modular_computers/file_system/programs/science/airestorer.dm b/code/modules/modular_computers/file_system/programs/science/airestorer.dm index 56a9d7463fbd..f5c7a3a3b493 100644 --- a/code/modules/modular_computers/file_system/programs/science/airestorer.dm +++ b/code/modules/modular_computers/file_system/programs/science/airestorer.dm @@ -85,7 +85,7 @@ A.updatehealth() if(A.health >= 0 && A.stat == DEAD) A.revive() - cardhold.update_icon() + cardhold.update_appearance(updates = ALL) // Finished restoring if(A.health >= 100) ai_slot.locked = FALSE diff --git a/code/modules/modular_computers/hardware/printer.dm b/code/modules/modular_computers/hardware/printer.dm index 5f5fa75d1eb8..22f8a675a22c 100644 --- a/code/modules/modular_computers/hardware/printer.dm +++ b/code/modules/modular_computers/hardware/printer.dm @@ -37,7 +37,7 @@ P.info = text_to_print if(paper_title) P.name = paper_title - P.update_icon() + P.update_appearance(updates = ALL) P.reload_fields() stored_paper-- P = null @@ -52,7 +52,7 @@ // Damaged printer causes the resulting paper to be somewhat harder to read. if(damage > damage_malfunction) P.info = stars(P.info, 100-malfunction_probability) - P.update_icon() + P.update_appearance(updates = ALL) P.reload_fields() stored_paper-- P = null diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index f8b61cef7b5e..a4a529c3b469 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -55,7 +55,7 @@ They *could* go in their appropriate files, but this is supposed to be modular playsound(loc, "sparks", 50, 1) obj_flags |= EMAGGED locked = FALSE - update_icon() + update_appearance(updates = ALL) @@ -112,7 +112,7 @@ They *could* go in their appropriate files, but this is supposed to be modular S.cell.give(charge) charge = 0 corrupt() - update_icon() + update_appearance(updates = ALL) /obj/machinery/proc/AI_notify_hack() var/turf/location = get_turf(src) diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm index 6a9040497657..aab9572e7059 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -29,7 +29,7 @@ U.put_in_hands(old_cell) old_cell.add_fingerprint(U) old_cell.corrupt() - old_cell.update_icon() + old_cell.update_appearance(updates = ALL) cell = CELL to_chat(U, span_notice("Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%")) else diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index 312b8a26abc1..e512b719ec00 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -58,19 +58,19 @@ if(thing == pai) //double check /mob/living/silicon/pai/Destroy() if you change these. pai = null emotion_icon = initial(emotion_icon) - update_icon() + update_appearance(updates = ALL) return ..() /obj/item/pai_card/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) SSpai.pai_card_list += src /obj/item/pai_card/suicide_act(mob/living/user) user.visible_message(span_suicide("[user] is staring sadly at [src]! [user.p_they()] can't keep living without real human intimacy!")) return OXYLOSS -/obj/item/pai_card/proc/update_overlays() +/obj/item/pai_card/update_overlays() . = ..() . += "pai-[emotion_icon]" if(pai?.hacking_cable) @@ -79,7 +79,7 @@ /obj/item/pai_card/vv_edit_var(vname, vval) . = ..() if(vname == NAMEOF(src, emotion_icon)) - update_icon() + update_appearance(updates = ALL) /obj/item/pai_card/ui_interact(mob/user, datum/tgui/ui) . = ..() @@ -253,7 +253,7 @@ return FALSE pai = downloaded emotion_icon = "null" - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/effects/pai_boot.ogg', 50, TRUE, -1) audible_message("[src] plays a cheerful startup noise!") return TRUE diff --git a/code/modules/pai/death.dm b/code/modules/pai/death.dm index 62cd82fe009b..7b856657f2e9 100644 --- a/code/modules/pai/death.dm +++ b/code/modules/pai/death.dm @@ -14,6 +14,6 @@ card.forceMove(drop_location()) card.pai = null card.emotion_icon = initial(card.emotion_icon) - card.update_icon() + card.update_appearance(updates = ALL) qdel(src) diff --git a/code/modules/pai/door_jack.dm b/code/modules/pai/door_jack.dm index 50013cf5862c..44b06f69ea34 100644 --- a/code/modules/pai/door_jack.dm +++ b/code/modules/pai/door_jack.dm @@ -116,7 +116,7 @@ untrack_thing(hacking_cable) QDEL_NULL(hacking_cable) if(!QDELETED(card)) - card.update_icon() + card.update_appearance(updates = ALL) return FALSE var/obj/machinery/door/door = hacking_cable.machine balloon_alert(src, "success") diff --git a/code/modules/pai/pai.dm b/code/modules/pai/pai.dm index 71a1013a4c19..49f47b7ad282 100644 --- a/code/modules/pai/pai.dm +++ b/code/modules/pai/pai.dm @@ -170,7 +170,7 @@ hacking_cable = null SStgui.update_user_uis(src) if(!QDELETED(card)) - card.update_icon() + card.update_appearance(updates = ALL) if(deleting_atom == atmos_analyzer) atmos_analyzer = null if(deleting_atom == camera) diff --git a/code/modules/pai/software.dm b/code/modules/pai/software.dm index 1ff2e02d3585..8ac66feebfed 100644 --- a/code/modules/pai/software.dm +++ b/code/modules/pai/software.dm @@ -142,7 +142,7 @@ if(isnull(new_image)) return FALSE card.emotion_icon = new_image - card.update_icon() + card.update_appearance(updates = ALL) return TRUE /** diff --git a/code/modules/paperwork/carbonpaper.dm b/code/modules/paperwork/carbonpaper.dm index d81bbbb5fc2c..59f858a3fb8f 100644 --- a/code/modules/paperwork/carbonpaper.dm +++ b/code/modules/paperwork/carbonpaper.dm @@ -7,7 +7,7 @@ var/iscopy = FALSE -/obj/item/paper/carbon/update_icon() +/obj/item/paper/carbon/update_appearance(updates = ALL) if(iscopy) if(written.len) icon_state = "cpaper_words" @@ -52,8 +52,8 @@ copied = TRUE copy.copied = TRUE copy.iscopy = TRUE - update_icon() - copy.update_icon() + update_appearance(updates = ALL) + copy.update_appearance(updates = ALL) usr.put_in_hands(copy) else to_chat(usr, span_warning("There are no more carbon copies attached to this paper!")) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 37ff574f43e5..c1dca1568995 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -17,7 +17,7 @@ return BRUTELOSS//the clipboard's clip is very strong. industrial duty. can kill a man easily. /obj/item/clipboard/Initialize() - update_icon() + update_appearance(updates = ALL) . = ..() /obj/item/clipboard/Destroy() @@ -25,7 +25,7 @@ QDEL_NULL(toppaper) //let movable/Destroy handle the rest return ..() -/obj/item/clipboard/update_icon() +/obj/item/clipboard/update_appearance(updates = ALL) cut_overlays() var/list/dat = list() if(toppaper) @@ -43,10 +43,10 @@ return toppaper = W to_chat(user, span_notice("You clip the paper onto \the [src].")) - update_icon() + update_appearance(updates = ALL) else if(toppaper) toppaper.attackby(user.get_active_held_item(), user) - update_icon() + update_appearance(updates = ALL) /obj/item/clipboard/attack_self(mob/user) @@ -126,4 +126,4 @@ //Update everything attack_self(usr) - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index f8e59ab8369a..4cb6bbd7a395 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -10,8 +10,11 @@ /obj/item/paper/contract/proc/update_text() return -/obj/item/paper/contract/update_icon() - return +/obj/item/paper/contract/Initialize(mapload, new_employee_name) + if(!new_employee_name) + return INITIALIZE_HINT_QDEL + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/paper/contract/infernal var/contractType = 0 @@ -269,7 +272,7 @@ var/obj/item/storage/wallet/W = worn W.front_id = id id.forceMove(worn) - worn.update_icon() + worn.update_appearance(updates = ALL) var/datum/round_event/ion_storm/add_law_only/ion = new() ion.announceEvent = -1 ion.ionMessage = "[user.name] is the only Captain of the station. [user.name] is the highest authority, legitimate or otherwise, on the station. [user.name] was always the captain and highest authority on the station. Do not state this law." diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 3d2d79b29d82..95410b041e9f 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -196,7 +196,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) templist += L P.written += templist - P.update_icon() + P.update_appearance(updates = ALL) playsound(loc, "sound/items/polaroid1.ogg", 50, 1) // Stamps diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 90c0b9ab5d32..0dcfc60a8391 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -60,7 +60,7 @@ icon_state = "coloredcabinet_frame" name = "colored cabinet" -/obj/structure/filingcabinet/colored/update_icon() +/obj/structure/filingcabinet/colored/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/cab = mutable_appearance(icon, "coloredcabinet_trim") cab.color = colour @@ -68,7 +68,7 @@ /obj/structure/filingcabinet/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) if(mapload) for(var/obj/item/I in loc) if(istype(I, /obj/item/paper) || istype(I, /obj/item/folder) || istype(I, /obj/item/photo)) @@ -185,7 +185,7 @@ colour = colour_choice name = "colored cabinet" // Having a cabinet called 'Purple Cabinet' while it's green colored would be weird playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) - update_icon() // reset overlays + update_appearance(updates = ALL) // reset overlays return diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 7bc395bdd982..d804fe49cb46 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -28,7 +28,7 @@ icon_state = "folder_white" -/obj/item/folder/update_icon() +/obj/item/folder/update_appearance(updates = ALL) cut_overlays() if(contents.len) add_overlay("folder_paper") @@ -39,7 +39,7 @@ if(!user.transferItemToLoc(W, src)) return to_chat(user, span_notice("You put [W] into [src].")) - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/pen)) if(!user.is_literate()) to_chat(user, span_notice("You scribble illegibly on the cover of [src]!")) @@ -94,7 +94,7 @@ //Update everything attack_self(usr) - update_icon() + update_appearance(updates = ALL) /obj/item/folder/documents name = "folder- 'TOP SECRET'" @@ -103,7 +103,7 @@ /obj/item/folder/documents/Initialize() . = ..() new /obj/item/documents/nanotrasen(src) - update_icon() + update_appearance(updates = ALL) /obj/item/folder/syndicate icon_state = "folder_syndie" @@ -116,7 +116,7 @@ /obj/item/folder/syndicate/red/Initialize() . = ..() new /obj/item/documents/syndicate/red(src) - update_icon() + update_appearance(updates = ALL) /obj/item/folder/syndicate/blue icon_state = "folder_sblue" @@ -124,9 +124,9 @@ /obj/item/folder/syndicate/blue/Initialize() . = ..() new /obj/item/documents/syndicate/blue(src) - update_icon() + update_appearance(updates = ALL) /obj/item/folder/syndicate/mining/Initialize() . = ..() new /obj/item/documents/syndicate/mining(src) - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/paperwork/inspector_booth.dm b/code/modules/paperwork/inspector_booth.dm index 3e970fd8dc08..a64ff29c0db6 100644 --- a/code/modules/paperwork/inspector_booth.dm +++ b/code/modules/paperwork/inspector_booth.dm @@ -55,9 +55,9 @@ /obj/machinery/inspector_booth/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/machinery/inspector_booth/update_icon() +/obj/machinery/inspector_booth/update_appearance(updates = ALL) if (stat & NOPOWER) icon_state = "booth_off" else if (panel_open || stat & MAINT) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 94c01b862069..18f633baeed5 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -75,10 +75,10 @@ pixel_y = rand(-8, 8) pixel_x = rand(-9, 9) written = list() - update_icon() + update_appearance(updates = ALL) -/obj/item/paper/update_icon() +/obj/item/paper/update_appearance(updates = ALL) if(resistance_flags & ON_FIRE) icon_state = "paper_onfire" @@ -184,7 +184,7 @@ stamps = null LAZYCLEARLIST(stamped) cut_overlays() - update_icon() + update_appearance(updates = ALL) /obj/item/paper/proc/parsepencode(t, obj/item/pen/P, mob/user, iscrayon = 0) @@ -278,7 +278,7 @@ else written.Insert(text2num(id),templist) // text2num, otherwise it writes to the hashtable index instead of into the array usr << browse("[name][render_body(usr,TRUE)]
    [stamps]", "window=[name]") // Update the window - update_icon() + update_appearance(updates = ALL) /obj/item/paper/attackby(obj/item/P, mob/living/carbon/human/user, params) @@ -352,7 +352,7 @@ src.loc = B P.loc = B B.amount = 2 - B.update_icon() + B.update_appearance(updates = ALL) add_fingerprint(user) @@ -365,7 +365,7 @@ /obj/item/paper/extinguish() ..() - update_icon() + update_appearance(updates = ALL) /* * Construction paper @@ -390,8 +390,9 @@ icon_state = "scrap" slot_flags = null -/obj/item/paper/crumpled/update_icon() - return +/obj/item/paper/crumpled/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/paper/crumpled/bloody icon_state = "scrap_bloodied" diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index e9386ff652aa..220117faea9a 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -58,7 +58,7 @@ usr << browse("", "window=[name]") //Closes the dialog P = src[page] P.attackby(W, user) - update_icon() + update_appearance(updates = ALL) attack_self(usr) //Update the browsed page. add_fingerprint(usr) return @@ -114,7 +114,7 @@ /obj/item/paper_bundle/attack_self(mob/user as mob) src.show_content(user) add_fingerprint(usr) - update_icon() + update_appearance(updates = ALL) return /obj/item/paper_bundle/proc/update_screen() @@ -165,7 +165,7 @@ page = amount if(page == amount) screen = 2 - update_icon() + update_appearance(updates = ALL) else to_chat(usr, span_notice("You need to hold it in hand!")) if (istype(src.loc, /mob) || istype(src.loc?.loc, /mob)) @@ -205,7 +205,7 @@ /obj/item/paper_bundle/AltClick(mob/living/user) unbundle() -/obj/item/paper_bundle/update_icon() +/obj/item/paper_bundle/update_appearance(updates = ALL) cut_overlays() var/obj/item/paper/P = src[1] icon_state = P.icon_state diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 6edc5bb08645..f9892f324b97 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -15,7 +15,7 @@ /obj/item/papercutter/Initialize() . = ..() storedcutter = new /obj/item/hatchet/cutterblade(src) - update_icon() + update_appearance(updates = ALL) /obj/item/papercutter/suicide_act(mob/user) @@ -34,7 +34,7 @@ return (BRUTELOSS) -/obj/item/papercutter/update_icon() +/obj/item/papercutter/update_appearance(updates = ALL) ..() cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") @@ -49,7 +49,7 @@ playsound(loc, "pageturn", 60, 1) to_chat(user, span_notice("You place [P] in [src].")) storedpaper = P - update_icon() + update_appearance(updates = ALL) return if(istype(P, /obj/item/hatchet/cutterblade) && !storedcutter) if(!user.transferItemToLoc(P, src)) @@ -57,7 +57,7 @@ to_chat(user, span_notice("You replace [src]'s [P].")) P.forceMove(src) storedcutter = P - update_icon() + update_appearance(updates = ALL) return if(P.tool_behaviour == TOOL_SCREWDRIVER && storedcutter) P.play_tool_sound(src) @@ -79,7 +79,7 @@ to_chat(user, span_notice("You remove [src]'s [storedcutter].")) user.put_in_hands(storedcutter) storedcutter = null - update_icon() + update_appearance(updates = ALL) if(storedpaper) playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1) @@ -88,7 +88,7 @@ qdel(storedpaper) new /obj/item/paperslip(get_turf(src)) new /obj/item/paperslip(get_turf(src)) - update_icon() + update_appearance(updates = ALL) /obj/item/papercutter/MouseDrop(atom/over_object) . = ..() diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index c52d915c54b4..76a820b95d06 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -25,7 +25,7 @@ if(P && !bin_pen) P.forceMove(src) bin_pen = P - update_icon() + update_appearance(updates = ALL) /obj/item/paper_bin/Destroy() if(papers) @@ -37,7 +37,7 @@ /obj/item/paper_bin/fire_act(exposed_temperature, exposed_volume) if(total_paper) total_paper = 0 - update_icon() + update_appearance(updates = ALL) ..() /obj/item/paper_bin/MouseDrop(atom/over_object) @@ -73,14 +73,14 @@ user.put_in_hands(P) to_chat(user, span_notice("You take [P] out of \the [src].")) bin_pen = null - update_icon() + update_appearance(updates = ALL) else if(total_paper >= 1) response = alert(user, "Do you take regular paper, or Carbon copy paper?", "Paper type request", "Regular", "Carbon Copy", "Cancel") if (response != "Regular" && response != "Carbon Copy") add_fingerprint(user) return total_paper-- - update_icon() + update_appearance(updates = ALL) // If there's any custom paper on the stack, use that instead of creating a new paper. var/obj/item/paper/P if(papers.len > 0) @@ -113,14 +113,14 @@ to_chat(user, span_notice("You put [P] in [src].")) papers.Add(P) total_paper++ - update_icon() + update_appearance(updates = ALL) else if(istype(I, /obj/item/pen) && !bin_pen) var/obj/item/pen/P = I if(!user.transferItemToLoc(P, src)) return to_chat(user, span_notice("You put [P] in [src].")) bin_pen = P - update_icon() + update_appearance(updates = ALL) else return ..() @@ -131,7 +131,7 @@ else . += "It doesn't contain anything." -/obj/item/paper_bin/update_icon() +/obj/item/paper_bin/update_appearance(updates = ALL) if(total_paper < 1) icon_state = "paper_bin0" else diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 97985c89f6ff..6c330a49adde 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -29,7 +29,7 @@ newPaper.forceMove(src) else internalPaper = new(src) - update_icon() + update_appearance(updates = ALL) /obj/item/paperplane/handle_atom_del(atom/A) if(A == internalPaper) @@ -52,7 +52,7 @@ sleep(1 SECONDS) return (BRUTELOSS) -/obj/item/paperplane/update_icon() +/obj/item/paperplane/update_appearance(updates = ALL) cut_overlays() var/list/stamped = internalPaper.stamped if(stamped) @@ -75,7 +75,7 @@ else if(istype(P, /obj/item/stamp)) //we don't randomize stamps on a paperplane internalPaper.attackby(P, user) //spoofed attack to update internal paper. - update_icon() + update_appearance(updates = ALL) else if(P.is_hot()) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10)) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 3447000a9306..0294135e4d57 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -11,7 +11,7 @@ /obj/machinery/papershredder/proc/try_insert(mob/user, insert_size = 0) if(paperamount <= max_paper - insert_size) paperamount += insert_size - update_icon() + update_appearance(updates = ALL) playsound(src.loc, 'sound/items/pshred.ogg', 75, 1) return TRUE else @@ -30,7 +30,7 @@ if(ran == 3) SP.color = null paperamount -=1 - update_icon() + update_appearance(updates = ALL) to_chat(user, span_warning("The [src] was too full and shredded paper goes everywhere!")) else to_chat(user, span_warning("The [src] is full please empty it before you continue.")) @@ -74,7 +74,7 @@ SP.color = null STR.handle_item_insertion(SP) paperamount -=1 - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("The [W] is full.")) return @@ -85,7 +85,7 @@ if(paperamount < max_paper) qdel(W) paperamount += 1 - update_icon() + update_appearance(updates = ALL) return if(shred_amount && try_insert(user, shred_amount)) @@ -113,12 +113,12 @@ if(ran == 3) SP.color = null paperamount -=1 - update_icon() + update_appearance(updates = ALL) /obj/machinery/papershredder/AltClick(mob/living/user) emptypaper() -/obj/machinery/papershredder/update_icon() +/obj/machinery/papershredder/update_appearance(updates = ALL) if(paperamount == 0) icon_state = "papershredder0" if(paperamount == 1||paperamount == 2) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 20793611c237..645f3f00e159 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -227,9 +227,9 @@ to_chat(user, span_warning("[src] is now active.")) var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on - update_icon() + update_appearance(updates = ALL) -/obj/item/pen/edagger/update_icon() +/obj/item/pen/edagger/update_appearance(updates = ALL) if(on) icon_state = "edagger" item_state = "edagger" diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 39a1f086641e..fc905584e005 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -341,7 +341,7 @@ c.written += L c.name = copy.name c.fields = copy.fields - c.update_icon() + c.update_appearance(updates = ALL) c.stamps = copy.stamps if(copy.stamped) c.stamped = copy.stamped.Copy() @@ -374,7 +374,7 @@ p.amount++ //p.amount-- p.loc = src.loc - p.update_icon() + p.update_appearance(updates = ALL) p.icon_state = "paper_words" p.name = bundle.name p.pixel_y = rand(-8, 8) diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index fcc8d03554f4..7672a1a858a0 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -18,9 +18,9 @@ /obj/machinery/ticket_machine/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/machinery/ticket_machine/update_icon() +/obj/machinery/ticket_machine/update_appearance(updates = ALL) var/Temp = screenNum //This whole thing breaks down a 3 digit number into 3 seperate digits, aka "69" becomes "0","6" and "9" var/Digit1 = round(Temp%10)//The remainder of any number/10 is always that number's rightmost digit var/Digit2 = round(((Temp-Digit1)*0.1)%10) //Same idea, but divided by ten, to find the middle digit @@ -50,7 +50,7 @@ if(currentNum < screenNum - 1) screenNum -- //this should only happen if the queue is all caught up and more numbers get called than tickets exist currentNum = screenNum - 1 //so the number wont go onto infinity. Numbers that haven't been taken yet won't show up on the screen yet either. - update_icon() //Update our icon here + update_appearance(updates = ALL) //Update our icon here if(tickets.len\The [src] already contains a photo.
    ") ..() @@ -31,7 +31,7 @@ user.put_in_hands(I) to_chat(user, span_notice("You carefully remove the photo from \the [src].")) displayed = null - update_icon() + update_appearance(updates = ALL) return ..() /obj/item/wallframe/picture/attack_self(mob/user) @@ -44,7 +44,7 @@ else return ..() -/obj/item/wallframe/picture/update_icon() +/obj/item/wallframe/picture/update_appearance(updates = ALL) cut_overlays() if(displayed) add_overlay(image(displayed)) @@ -106,7 +106,7 @@ else qdel(framed) framed = P - update_icon() + update_appearance(updates = ALL) /obj/structure/sign/picture_frame/examine(mob/user) if(in_range(src, user) && framed) @@ -135,7 +135,7 @@ if(!user.transferItemToLoc(P, src)) return framed = P - update_icon() + update_appearance(updates = ALL) else to_chat(user, "\The [src] already contains a photo.") @@ -148,7 +148,7 @@ if(framed) framed.show(user) -/obj/structure/sign/picture_frame/update_icon() +/obj/structure/sign/picture_frame/update_appearance(updates = ALL) cut_overlays() if(framed) add_overlay(image(framed)) @@ -162,5 +162,5 @@ if(contents.len) var/obj/item/I = pick(contents) I.forceMove(F) - F.update_icon() + F.update_appearance(updates = ALL) qdel(src) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index 768367a708ed..5dea309e7766 100644 --- a/code/modules/photography/photos/photo.dm +++ b/code/modules/photography/photos/photo.dm @@ -21,7 +21,7 @@ if(!istype(P)) return picture = P - update_icon() + update_appearance(updates = ALL) if(P.caption) scribble = P.caption if(setname && P.picture_name) @@ -32,7 +32,7 @@ if(setdesc && P.picture_desc) desc = P.picture_desc -/obj/item/photo/update_icon() +/obj/item/photo/update_appearance(updates = ALL) if(!istype(picture) || !picture.picture_image) return var/icon/I = picture.get_small_icon() diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index f238a8cc734d..a5d28bf42960 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -57,7 +57,7 @@ All the important duct code: for(var/atom/movable/AM in get_step(src, D)) if(connect_network(AM, D)) add_connects(D) - update_icon() + update_appearance(updates = ALL) /obj/machinery/duct/proc/connect_network(atom/movable/AM, direction, ignore_color) if(istype(AM, /obj/machinery/duct)) @@ -82,7 +82,7 @@ All the important duct code: add_neighbour(D) D.add_connects(opposite_dir) - D.update_icon() + D.update_appearance(updates = ALL) return TRUE //tell the current pipe to also update it's sprite if(!(D in neighbours)) //we cool if((duct_color != D.duct_color) && !(ignore_colors || D.ignore_colors)) @@ -125,7 +125,7 @@ All the important duct code: duct.remove_duct(src) lose_neighbours() reset_connects(0) - update_icon() + update_appearance(updates = ALL) /obj/machinery/duct/proc/create_duct() duct = new() @@ -160,7 +160,7 @@ All the important duct code: adjacents += D return adjacents -/obj/machinery/duct/update_icon() //setting connects isnt a parameter because sometimes we make more than one change, overwrite it completely or just add it to the bitfield +/obj/machinery/duct/update_appearance(updates = ALL) //setting connects isnt a parameter because sometimes we make more than one change, overwrite it completely or just add it to the bitfield var/temp_icon = initial(icon_state) for(var/D in GLOB.cardinals) if(D & connects) @@ -245,7 +245,7 @@ All the important duct code: return connect_network(D, direction, TRUE) add_connects(direction) - update_icon() + update_appearance(updates = ALL) /obj/machinery/duct/multilayered name = "duct layer-manifold" @@ -262,7 +262,7 @@ All the important duct code: dumb = TRUE -/obj/machinery/duct/multilayered/update_icon() +/obj/machinery/duct/multilayered/update_appearance(updates = ALL) icon_state = initial(icon_state) if((connects & NORTH) || (connects & SOUTH)) icon_state += "_vertical" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 2600bf0ebff7..1e153bcd428e 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -205,7 +205,7 @@ operating = FALSE name = "[area.name] APC" stat |= MAINT - src.update_icon() + src.update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(update)), 5) /obj/machinery/power/apc/Destroy() @@ -230,7 +230,7 @@ /obj/machinery/power/apc/handle_atom_del(atom/A) if(A == cell) cell = null - update_icon() + update_appearance(updates = ALL) updateUsrDialog() /obj/machinery/power/apc/proc/make_terminal() @@ -260,7 +260,7 @@ stack_trace("Bad areastring path for [src], [src.areastring]") else if(isarea(A) && src.areastring == null) src.area = A - update_icon() + update_appearance(updates = ALL) make_terminal() @@ -325,7 +325,7 @@ // update the APC icon to show the three base states // also add overlays for indicator lights -/obj/machinery/power/apc/update_icon() +/obj/machinery/power/apc/update_appearance(updates = ALL) var/update = check_updates() //returns 0 if no need to update icons. // 1 if we need to update the icon_state // 2 if we need to update the overlays @@ -518,7 +518,7 @@ else if (opened!=APC_COVER_REMOVED) opened = APC_COVER_CLOSED coverlocked = TRUE //closing cover relocks it - update_icon() + update_appearance(updates = ALL) return else if (!(stat & BROKEN)) if(coverlocked && !(stat & MAINT)) // locked... @@ -529,7 +529,7 @@ return else opened = APC_COVER_OPENED - update_icon() + update_appearance(updates = ALL) return else W.play_tool_sound(src) @@ -538,7 +538,7 @@ W.play_tool_sound(src) to_chat(user, span_notice("You pry the broken cover off of [src].")) opened = APC_COVER_REMOVED - update_icon() + update_appearance(updates = ALL) return /obj/machinery/power/apc/screwdriver_act(mob/living/user, obj/item/W) @@ -550,10 +550,10 @@ user.visible_message("[user] removes \the [cell] from [src]!",span_notice("You remove \the [cell].")) var/turf/T = get_turf(user) cell.forceMove(T) - cell.update_icon() + cell.update_appearance(updates = ALL) cell = null charging = APC_NOT_CHARGING - update_icon() + update_appearance(updates = ALL) return else switch (has_electronics) @@ -570,14 +570,14 @@ else to_chat(user, span_warning("There is nothing to secure!")) return - update_icon() + update_appearance(updates = ALL) else if(obj_flags & EMAGGED) to_chat(user, span_warning("The interface is broken!")) return else panel_open = !panel_open to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"].")) - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/apc/wirecutter_act(mob/living/user, obj/item/W) if (terminal && opened) @@ -626,7 +626,7 @@ "[user.name] has inserted the power cell to [src.name]!",\ span_notice("You insert the power cell.")) chargecount = 0 - update_icon() + update_appearance(updates = ALL) else if (W.GetID()) togglelock(user) else if (istype(W, /obj/item/stack/cable_coil) && opened) @@ -704,7 +704,7 @@ chargecount = 0 user.visible_message(span_notice("[user] fabricates a weak power cell and places it into [src]."), \ span_warning("Your [P.name] whirrs with strain as you create a weak power cell and place it into [src]!")) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] has both electronics and a cell.")) return @@ -719,7 +719,7 @@ to_chat(user, span_notice("You replace missing APC's cover.")) qdel(W) opened = APC_COVER_OPENED - update_icon() + update_appearance(updates = ALL) return if (has_electronics) to_chat(user, span_warning("You cannot repair this APC until you remove the electronics still inside!")) @@ -733,7 +733,7 @@ obj_integrity = max_integrity if (opened==APC_COVER_REMOVED) opened = APC_COVER_OPENED - update_icon() + update_appearance(updates = ALL) else if(istype(W, /obj/item/clockwork/integration_cog) && is_servant_of_ratvar(user)) if(integration_cog) to_chat(user, span_warning("This APC already has a cog.")) @@ -742,7 +742,7 @@ user.visible_message(span_warning("[user] slices [src]'s cover lock, and it swings wide open!"), \ span_alloy("You slice [src]'s cover lock apart with [W], and the cover swings open.")) opened = APC_COVER_OPENED - update_icon() + update_appearance(updates = ALL) else user.visible_message(span_warning("[user] presses [W] into [src]!"), \ span_alloy("You hold [W] in place within [src], and it slowly begins to warm up...")) @@ -759,7 +759,7 @@ playsound(src, 'sound/machines/clockcult/steam_whoosh.ogg', 50, FALSE) opened = APC_COVER_CLOSED locked = FALSE - update_icon() + update_appearance(updates = ALL) return else if(istype(W, /obj/item/apc_powercord)) return //because we put our fancy code in the right places, and this is all in the powercord's afterattack() @@ -815,7 +815,7 @@ chargecount = 0 user.visible_message(span_notice("[user] fabricates a weak power cell and places it into [src]."), \ span_warning("Your [the_rcd.name] whirrs with strain as you create a weak power cell and place it into [src]!")) - update_icon() + update_appearance(updates = ALL) return TRUE else to_chat(user, span_warning("[src] has both electronics and a cell.")) @@ -835,7 +835,7 @@ if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack) locked = !locked to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] the APC interface.")) - update_icon() + update_appearance(updates = ALL) updateUsrDialog() else to_chat(user, span_warning("Access denied.")) @@ -866,7 +866,7 @@ opened = APC_COVER_REMOVED coverlocked = FALSE visible_message(span_warning("The APC cover is knocked down!")) - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/apc/emag_act(mob/user) if(!(obj_flags & EMAGGED) && !malfhack) @@ -882,7 +882,7 @@ obj_flags |= EMAGGED locked = FALSE to_chat(user, span_notice("You emag the APC interface.")) - update_icon() + update_appearance(updates = ALL) // attack with hand - remove cell (if cover open) or interact with the APC @@ -899,10 +899,10 @@ if(cell) user.visible_message("[user] removes \the [cell] from [src]!",span_notice("You remove \the [cell].")) user.put_in_hands(cell) - cell.update_icon() + cell.update_appearance(updates = ALL) src.cell = null charging = APC_NOT_CHARGING - src.update_icon() + src.update_appearance(updates = ALL) return if((stat & MAINT) && !opened) //no board; no interface return @@ -1040,7 +1040,7 @@ to_chat(usr, "The APC does not respond to the command.") else locked = !locked - update_icon() + update_appearance(updates = ALL) . = TRUE if("cover") coverlocked = !coverlocked @@ -1055,20 +1055,20 @@ chargemode = !chargemode if(!chargemode) charging = APC_NOT_CHARGING - update_icon() + update_appearance(updates = ALL) . = TRUE if("channel") if(params["eqp"]) equipment = setsubsystem(text2num(params["eqp"])) - update_icon() + update_appearance(updates = ALL) update() else if(params["lgt"]) lighting = setsubsystem(text2num(params["lgt"])) - update_icon() + update_appearance(updates = ALL) update() else if(params["env"]) environ = setsubsystem(text2num(params["env"])) - update_icon() + update_appearance(updates = ALL) update() . = TRUE if("overload") @@ -1086,7 +1086,7 @@ malfvacate() if("reboot") failure_timer = 0 - update_icon() + update_appearance(updates = ALL) update() if("emergency_lighting") emergency_lights = !emergency_lights @@ -1111,7 +1111,7 @@ add_hiddenprint(user) log_combat(user, src, "turned [operating ? "on" : "off"]") update() - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/apc/proc/malfhack(mob/living/silicon/ai/malf) if(!istype(malf)) @@ -1252,7 +1252,7 @@ /obj/machinery/power/apc/process() if(icon_update_needed) - update_icon() + update_appearance(updates = ALL) if(stat & (BROKEN|MAINT)) return if(!area.requires_power) @@ -1427,7 +1427,7 @@ if(APC_RESET_EMP) equipment = 3 environ = 3 - update_icon() + update_appearance(updates = ALL) update() // damage and destruction acts @@ -1443,7 +1443,7 @@ lighting = 0 equipment = 0 environ = 0 - update_icon() + update_appearance(updates = ALL) update() addtimer(CALLBACK(src, PROC_REF(reset), APC_RESET_EMP), 600) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4143c7a3ad65..404bd441a9dd 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -90,7 +90,7 @@ By design, d1 is the smallest direction and d2 is the highest cable_color = param_color || cable_color || pick(cable_colors) if(cable_colors[cable_color]) cable_color = cable_colors[cable_color] - update_icon() + update_appearance(updates = ALL) /obj/structure/cable/Destroy() // called when a cable is deleted if(powernet) @@ -117,9 +117,9 @@ By design, d1 is the smallest direction and d2 is the highest if(level == 1 && isturf(loc)) invisibility = i ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(updates = ALL) -/obj/structure/cable/update_icon() +/obj/structure/cable/update_appearance(updates = ALL) icon_state = "[d1]-[d2]" color = null add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY) @@ -492,12 +492,12 @@ By design, d1 is the smallest direction and d2 is the highest pixel_x = rand(-2,2) pixel_y = rand(-2,2) - update_icon() + update_appearance(updates = ALL) /obj/item/stack/cable_coil/proc/set_cable_color(new_color) color = GLOB.cable_colors[new_color] cable_color = new_color - update_icon() + update_appearance(updates = ALL) /obj/item/stack/cable_coil/suicide_act(mob/user) if(locate(/obj/structure/chair/stool) in get_turf(user)) @@ -537,7 +537,7 @@ By design, d1 is the smallest direction and d2 is the highest if(use(CABLE_RESTRAINTS_COST)) var/obj/item/restraints/handcuffs/cable/restraints = new(null, cable_color) user.put_in_hands(restraints) - update_icon() + update_appearance(updates = ALL) /////////////////////////////////// // General procedures @@ -562,7 +562,7 @@ By design, d1 is the smallest direction and d2 is the highest return return ..() -/obj/item/stack/cable_coil/update_icon() +/obj/item/stack/cable_coil/update_appearance(updates = ALL) if(novariants) return icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" @@ -576,7 +576,7 @@ By design, d1 is the smallest direction and d2 is the highest var/obj/item/stack/cable_coil/new_cable = ..() if(istype(new_cable)) new_cable.cable_color = cable_color - new_cable.update_icon() + new_cable.update_appearance(updates = ALL) //add cables to the stack /obj/item/stack/cable_coil/proc/give(extra) @@ -584,7 +584,7 @@ By design, d1 is the smallest direction and d2 is the highest amount = max_amount else amount += extra - update_icon() + update_appearance(updates = ALL) @@ -633,7 +633,7 @@ By design, d1 is the smallest direction and d2 is the highest C.d1 = 0 //it's a O-X node cable C.d2 = dirn C.add_fingerprint(user) - C.update_icon() + C.update_appearance(updates = ALL) //create a new powernet with the cable, if needed it will be merged later var/datum/powernet/PN = new() @@ -705,7 +705,7 @@ By design, d1 is the smallest direction and d2 is the highest NC.d1 = 0 NC.d2 = fdirn NC.add_fingerprint(user) - NC.update_icon() + NC.update_appearance(updates = ALL) //create a new powernet with the cable, if needed it will be merged later var/datum/powernet/newPN = new(loc.z) @@ -747,7 +747,7 @@ By design, d1 is the smallest direction and d2 is the highest return - C.update_icon() + C.update_appearance(updates = ALL) C.d1 = nd1 C.d2 = nd2 @@ -755,7 +755,7 @@ By design, d1 is the smallest direction and d2 is the highest //updates the stored cable coil C.add_fingerprint(user) - C.update_icon() + C.update_appearance(updates = ALL) C.mergeConnectedNetworks(C.d1) //merge the powernets... @@ -786,7 +786,7 @@ By design, d1 is the smallest direction and d2 is the highest /obj/item/stack/cable_coil/cyborg/attack_self(mob/user) var/picked = tgui_input_list(user, "Pick a cable color.","Cable Color", GLOB.cable_colors) cable_color = picked - update_icon() + update_appearance(updates = ALL) ////////////////////////////// // Misc. @@ -848,7 +848,7 @@ By design, d1 is the smallest direction and d2 is the highest amount = rand(1,2) pixel_x = rand(-2,2) pixel_y = rand(-2,2) - update_icon() + update_appearance(updates = ALL) /obj/item/stack/cable_coil/cut/red cable_color = "red" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index dc28c0f25167..3f30eb75b99d 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -33,7 +33,7 @@ charge = maxcharge if(ratingdesc) desc += " This one has a rating of [DisplayEnergy(maxcharge)], and you should not swallow it." - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/Destroy() STOP_PROCESSING(SSobj, src) @@ -54,7 +54,7 @@ else return PROCESS_KILL -/obj/item/stock_parts/cell/update_icon() +/obj/item/stock_parts/cell/update_appearance(updates = ALL) cut_overlays() if(grown_battery) add_overlay(image('icons/obj/power.dmi',"grown_wires")) @@ -178,7 +178,7 @@ /obj/item/stock_parts/cell/crap/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/upgraded name = "upgraded power cell" @@ -200,7 +200,7 @@ /obj/item/stock_parts/cell/secborg/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/mini_egun name = "miniature energy gun power cell" @@ -236,7 +236,7 @@ /obj/item/stock_parts/cell/high/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/super name = "super-capacity power cell" @@ -248,7 +248,7 @@ /obj/item/stock_parts/cell/super/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/hyper name = "hyper-capacity power cell" @@ -260,7 +260,7 @@ /obj/item/stock_parts/cell/hyper/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/bluespace name = "bluespace power cell" @@ -273,7 +273,7 @@ /obj/item/stock_parts/cell/bluespace/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/infinite name = "infinite-capacity power cell!" @@ -294,8 +294,9 @@ maxcharge = 50000 ratingdesc = FALSE -/obj/item/stock_parts/cell/infinite/abductor/update_icon() - return +/obj/item/stock_parts/cell/infinite/abductor/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/stock_parts/cell/potato @@ -326,7 +327,7 @@ /obj/item/stock_parts/cell/emproof/empty/Initialize() . = ..() charge = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/stock_parts/cell/emproof/empty/ComponentInitialize() . = ..() diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 4f611e650120..98588801ad6b 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -22,7 +22,7 @@ find_circs() connect_to_network() SSair.atmos_machinery += src - update_icon() + update_appearance(updates = ALL) component_parts = list(new /obj/item/circuitboard/machine/generator) /obj/machinery/power/generator/ComponentInitialize() @@ -34,7 +34,7 @@ SSair.atmos_machinery -= src return ..() -/obj/machinery/power/generator/update_icon() +/obj/machinery/power/generator/update_appearance(updates = ALL) cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) @@ -109,7 +109,7 @@ var/datum/gas_mixture/cold_circ_air1 = cold_circ.airs[1] cold_circ_air1.merge(cold_air) - update_icon() + update_appearance(updates = ALL) src.updateDialog() @@ -222,7 +222,7 @@ to_chat(user, span_notice("You start removing the circulators...")) if(I.use_tool(src, user, 30, volume=50)) kill_circs() - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You disconnect [src]'s circulator links.")) playsound(src, 'sound/misc/box_deploy.ogg', 50) return TRUE @@ -248,7 +248,7 @@ kill_circs() connect_to_network() to_chat(user, span_notice("You [anchored?"secure":"unsecure"] [src].")) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/power/generator/screwdriver_act(mob/user, obj/item/I) @@ -263,7 +263,7 @@ panel_open = !panel_open I.play_tool_sound(src) to_chat(user, span_notice("You [panel_open?"open":"close"] the panel on [src].")) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/power/generator/crowbar_act(mob/user, obj/item/I) @@ -286,11 +286,11 @@ /obj/machinery/power/generator/proc/kill_circs() if(hot_circ) hot_circ.generator = null - hot_circ.update_icon() + hot_circ.update_appearance(updates = ALL) hot_circ = null if(cold_circ) cold_circ.generator = null - cold_circ.update_icon() + cold_circ.update_appearance(updates = ALL) cold_circ = null /obj/machinery/power/generator/obj_break(damage_flag) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 7adcdd8e07cb..9c1c8a1e38a2 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne if(tesla_flags & TESLA_MACHINE_EXPLOSIVE) qdel(src)//like the singulo, tesla deletes it. stops it from exploding over and over -/obj/machinery/gravity_generator/update_icon() +/obj/machinery/gravity_generator/update_appearance(updates = ALL) ..() icon_state = "[get_status()]_[sprite_number]" @@ -154,7 +154,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne part.sprite_number = count part.main_part = src parts += part - part.update_icon() + part.update_appearance(updates = ALL) /obj/machinery/gravity_generator/main/proc/connected_parts() return parts.len == 8 @@ -177,7 +177,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne if(M.stat & BROKEN) M.set_fix() broken_state = 0 - update_icon() + update_appearance(updates = ALL) set_power() // Interaction @@ -190,14 +190,14 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne to_chat(user, span_notice("You secure the screws of the framework.")) I.play_tool_sound(src) broken_state++ - update_icon() + update_appearance(updates = ALL) return if(GRAV_NEEDS_WELDING) if(I.tool_behaviour == TOOL_WELDER) if(I.use_tool(src, user, 0, volume=50, amount=1)) to_chat(user, span_notice("You mend the damaged framework.")) broken_state++ - update_icon() + update_appearance(updates = ALL) return if(GRAV_NEEDS_PLASTEEL) if(istype(I, /obj/item/stack/sheet/plasteel)) @@ -207,7 +207,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne to_chat(user, span_notice("You add the plating to the framework.")) playsound(src.loc, 'sound/machines/click.ogg', 75, 1) broken_state++ - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You need 10 sheets of plasteel!")) return @@ -259,10 +259,10 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne return "fix[min(broken_state, 3)]" return on || charging_state != POWER_IDLE ? "on" : "off" -/obj/machinery/gravity_generator/main/update_icon() +/obj/machinery/gravity_generator/main/update_appearance(updates = ALL) ..() for(var/obj/O in parts) - O.update_icon() + O.update_appearance(updates = ALL) // Set the charging state based on power/breaker. /obj/machinery/gravity_generator/main/proc/set_power() @@ -274,7 +274,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne charging_state = new_state ? POWER_UP : POWER_DOWN // Startup sequence animation. investigate_log("is now [charging_state == POWER_UP ? "charging" : "discharging"].", INVESTIGATE_GRAVITY) - update_icon() + update_appearance(updates = ALL) // Set the state of the gravity. /obj/machinery/gravity_generator/main/proc/set_state(new_state) @@ -295,7 +295,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne investigate_log("was brought offline and there is now no gravity for this level.", INVESTIGATE_GRAVITY) message_admins("The gravity generator was brought offline with no backup generator. [ADMIN_VERBOSEJMP(src)]") - update_icon() + update_appearance(updates = ALL) update_list() src.updateUsrDialog() if(alert) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 87558aa6b688..36d00652d538 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -87,7 +87,7 @@ if(cell) user.visible_message("[user] removes [cell] from [src]!",span_notice("You remove [cell].")) user.put_in_hands(cell) - cell.update_icon() + cell.update_appearance(updates = ALL) cell = null add_fingerprint(user) @@ -340,7 +340,7 @@ QDEL_NULL(cell) return ..() -/obj/machinery/light/update_icon() +/obj/machinery/light/update_appearance(updates = ALL) cut_overlays() switch(status) // set icon_states if(LIGHT_OK) @@ -408,7 +408,7 @@ else use_power = IDLE_POWER_USE set_light(0) - update_icon() + update_appearance(updates = ALL) active_power_usage = (brightness * 10) if(on != on_gs) @@ -537,7 +537,7 @@ set_light(0) forced_off = !forced_off on = !on - update_icon() + update_appearance(updates = ALL) update() else return ..() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index ad2772f03c94..a0c54dd950ea 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -45,15 +45,15 @@ /obj/machinery/power/port_gen/proc/TogglePower() if(active) active = FALSE - update_icon() + update_appearance(updates = ALL) soundloop.stop() else if(HasFuel()) active = TRUE START_PROCESSING(SSmachines, src) - update_icon() + update_appearance(updates = ALL) soundloop.start() -/obj/machinery/power/port_gen/update_icon() +/obj/machinery/power/port_gen/update_appearance(updates = ALL) icon_state = "[base_icon]_[active]" /obj/machinery/power/port_gen/process() diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index fa967e02f788..6afcc7c33be2 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -124,7 +124,7 @@ SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_LOST) . = TRUE stat |= NOPOWER - update_icon() + update_appearance(updates = ALL) // connect the machine to a powernet if a node cable is present on the turf /obj/machinery/power/proc/connect_to_network() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 7a8d8c5da898..38b6209c5601 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -159,7 +159,7 @@ if(!user.transferItemToLoc(W, src)) return loaded_tank = W - update_icon() + update_appearance(updates = ALL) else if(W.GetID()) if(togglelock(user)) return TRUE @@ -294,14 +294,14 @@ if(active) toggle_power() else - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/rad_collector/rad_act(pulse_strength, collectable_radiation) . = ..() if(loaded_tank && active && collectable_radiation && pulse_strength > RAD_COLLECTOR_EFFICIENCY) stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT*(machine_tier+power_bonus) -/obj/machinery/power/rad_collector/update_icon() +/obj/machinery/power/rad_collector/update_appearance(updates = ALL) cut_overlays() if(loaded_tank) add_overlay("ptank") @@ -327,7 +327,7 @@ else icon_state = "ca" flick("ca_deactive", src) - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/rad_collector/bullet_act(obj/item/projectile/P) if(istype(P, /obj/item/projectile/energy/nuclear_particle)) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index e8bb1661c7f0..20820d22e44f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -126,7 +126,7 @@ QDEL_NULL(sparks) return ..() -/obj/machinery/power/emitter/update_icon() +/obj/machinery/power/emitter/update_appearance(updates = ALL) if(active && powernet) icon_state = avail(active_power_usage) ? icon_state_on : icon_state_underpowered else @@ -152,7 +152,7 @@ log_game("Emitter turned [active ? "ON" : "OFF"] by [key_name(user)] in [AREACOORD(src)]") investigate_log("turned [active ? "ON" : "OFF"] by [key_name(user)] at [AREACOORD(src)]", INVESTIGATE_SINGULO) investigate_log("turned [active ? "ON" : "OFF"] by [key_name(user)] at [AREACOORD(src)]", INVESTIGATE_SUPERMATTER) // yogs - so supermatter investigate is useful - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("The controls are locked!")) @@ -175,20 +175,20 @@ return if(state != EMITTER_WELDED || (!powernet && active_power_usage)) active = FALSE - update_icon() + update_appearance(updates = ALL) return if(active == TRUE) if(!active_power_usage || surplus() >= active_power_usage) add_load(active_power_usage) if(!powered) powered = TRUE - update_icon() + update_appearance(updates = ALL) investigate_log("regained power and turned ON at [AREACOORD(src)]", INVESTIGATE_SINGULO) investigate_log("regained power and turned ON at [AREACOORD(src)]", INVESTIGATE_SUPERMATTER) // yogs - so supermatter investigate is useful else if(powered) powered = FALSE - update_icon() + update_appearance(updates = ALL) investigate_log("lost power and turned OFF at [AREACOORD(src)]", INVESTIGATE_SINGULO) investigate_log("lost power and turned OFF at [AREACOORD(src)]", INVESTIGATE_SUPERMATTER) // yogs - so supermatter investigate is useful log_game("Emitter lost power in [AREACOORD(src)]") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index d9e087c18724..da96d4ced5c5 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -44,7 +44,7 @@ field_generator power level display var/list/obj/machinery/field/generator/connected_gens var/clean_up = 0 -/obj/machinery/field/generator/update_icon() +/obj/machinery/field/generator/update_appearance(updates = ALL) cut_overlays() if(warming_up) add_overlay("+a[warming_up]") @@ -173,7 +173,7 @@ field_generator power level display var/new_level = round(num_power_levels * power / field_generator_max_power) if(new_level != power_level) power_level = new_level - update_icon() + update_appearance(updates = ALL) /obj/machinery/field/generator/proc/turn_off() active = FG_OFFLINE @@ -182,7 +182,7 @@ field_generator power level display while (warming_up>0 && !active) sleep(5 SECONDS) warming_up-- - update_icon() + update_appearance(updates = ALL) /obj/machinery/field/generator/proc/turn_on() active = FG_CHARGING @@ -190,7 +190,7 @@ field_generator power level display while (warming_up<3 && active) sleep(5 SECONDS) warming_up++ - update_icon() + update_appearance(updates = ALL) if(warming_up >= 3) start_fields() @@ -306,7 +306,7 @@ field_generator power level display connected_gens |= G G.connected_gens |= src - update_icon() + update_appearance(updates = ALL) /obj/machinery/field/generator/proc/cleanup() @@ -321,7 +321,7 @@ field_generator power level display FG.cleanup() connected_gens -= FG clean_up = 0 - update_icon() + update_appearance(updates = ALL) //This is here to help fight the "hurr durr, release singulo cos nobody will notice before the //singulo eats the evidence". It's not fool-proof but better than nothing. diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 6f5824de0c19..3dcb4ca98906 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -107,7 +107,7 @@ construction_state = PA_CONSTRUCTION_PANEL_OPEN update_state() - update_icon() + update_appearance(updates = ALL) /obj/structure/particle_accelerator/deconstruct(disassembled = TRUE) @@ -122,7 +122,7 @@ investigate_log("was moved whilst active; it powered down.", INVESTIGATE_SINGULO) -/obj/structure/particle_accelerator/update_icon() +/obj/structure/particle_accelerator/update_appearance(updates = ALL) switch(construction_state) if(PA_CONSTRUCTION_UNSECURED,PA_CONSTRUCTION_UNWIRED) icon_state="[reference]" diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 382c4223f344..825b78f5f233 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -54,7 +54,7 @@ var/obj/structure/particle_accelerator/part = CP part.strength = null part.powered = FALSE - part.update_icon() + part.update_appearance(updates = ALL) connected_parts.Cut() return if(!part_scan()) @@ -62,7 +62,7 @@ active = FALSE connected_parts.Cut() -/obj/machinery/particle_accelerator/control_box/update_icon() +/obj/machinery/particle_accelerator/control_box/update_appearance(updates = ALL) if(active) icon_state = "control_boxp[strength]" //yogs- fix sprite not updating (note that /tg/ PA power 2 sprite is incomplete) else @@ -84,7 +84,7 @@ for(var/CP in connected_parts) var/obj/structure/particle_accelerator/part = CP part.strength = strength - part.update_icon() + part.update_appearance(updates = ALL) /obj/machinery/particle_accelerator/control_box/proc/add_strength(s) if(assembled && (strength < strength_upper_limit)) @@ -120,12 +120,12 @@ if(connected_parts.len < 6) investigate_log("lost a connected part; It powered down.", INVESTIGATE_SINGULO) toggle_power() - update_icon() + update_appearance(updates = ALL) return if(area_restricted && !istype(get_area(src),/area/engine)) investigate_log("had its area restriction turned on while in an invalid area; It powered down.", INVESTIGATE_SINGULO) toggle_power() - update_icon() + update_appearance(updates = ALL) return //emit some particles for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts) @@ -198,14 +198,14 @@ var/obj/structure/particle_accelerator/part = CP part.strength = strength part.powered = TRUE - part.update_icon() + part.update_appearance(updates = ALL) else use_power = IDLE_POWER_USE for(var/CP in connected_parts) var/obj/structure/particle_accelerator/part = CP part.strength = null part.powered = FALSE - part.update_icon() + part.update_appearance(updates = ALL) return TRUE @@ -269,7 +269,7 @@ if(did_something) user.changeNext_move(CLICK_CD_MELEE) update_state() - update_icon() + update_appearance(updates = ALL) return ..() @@ -365,7 +365,7 @@ to_chat(operator, "You [locked ? "enable" : "disable"] the area restriction."); . = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/particle_accelerator/control_box/charlie //for charlie station locked = FALSE diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 9a94a93dca46..2b502df20639 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -61,7 +61,7 @@ obj_break() return terminal.master = src - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/smes/RefreshParts() var/IO = 0 @@ -81,7 +81,7 @@ /obj/machinery/power/smes/attackby(obj/item/I, mob/user, params) //opening using screwdriver if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I)) - update_icon() + update_appearance(updates = ALL) return //changing direction using wrench @@ -98,7 +98,7 @@ to_chat(user, span_alert("No power terminal found.")) return stat &= ~BROKEN - update_icon() + update_appearance(updates = ALL) return //building and linking a terminal @@ -205,7 +205,7 @@ obj_break() -/obj/machinery/power/smes/update_icon() +/obj/machinery/power/smes/update_appearance(updates = ALL) cut_overlays() if(stat & BROKEN) return @@ -286,7 +286,7 @@ // only update icon if state changed if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting) - update_icon() + update_appearance(updates = ALL) @@ -316,7 +316,7 @@ output_used -= excess if(clev != chargedisplay() ) //if needed updates the icons overlay - update_icon() + update_appearance(updates = ALL) return @@ -353,12 +353,12 @@ if("tryinput") input_attempt = !input_attempt log_smes(usr) - update_icon() + update_appearance(updates = ALL) . = TRUE if("tryoutput") output_attempt = !output_attempt log_smes(usr) - update_icon() + update_appearance(updates = ALL) . = TRUE if("input") var/target = params["target"] @@ -420,7 +420,7 @@ output_level = rand(0, output_level_max) input_level = rand(0, input_level_max) charge = max(charge - 1e6/severity, 0) - update_icon() + update_appearance(updates = ALL) log_smes() /obj/machinery/power/smes/engineering @@ -446,7 +446,7 @@ return output_attempt = !output_attempt log_smes(user) - update_icon() + update_appearance(updates = ALL) #undef SMES_OUTPUTTING #undef SMES_NOT_OUTPUTTING diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 125490890808..e769619a872e 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -34,7 +34,7 @@ panelstructure = mutable_appearance(icon, "solar_panel", FLY_LAYER) paneloverlay = mutable_appearance(icon, "solar_panel-o", FLY_LAYER) paneloverlay.color = panelcolor - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/solar/Destroy() unset_control() //remove from control computer @@ -113,7 +113,7 @@ new /obj/item/shard(src.loc) qdel(src) -/obj/machinery/power/solar/update_icon() +/obj/machinery/power/solar/update_appearance(updates = ALL) ..() cut_overlays() var/matrix/turner = matrix() @@ -134,7 +134,7 @@ if(azimuth_current != azimuth_target) azimuth_current = azimuth_target occlusion_setup() - update_icon() + update_appearance(updates = ALL) needs_to_update_solar_exposure = TRUE ///trace towards sun to see if we're in shadow @@ -349,7 +349,7 @@ if(connected_tracker && length(connected_panels)) track = SOLAR_TRACK_AUTO connected_tracker.sun_update(SSsun, SSsun.azimuth) - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/solar_control/Destroy() for(var/obj/machinery/power/solar/M in connected_panels) @@ -372,7 +372,7 @@ if(!T.control) //i.e unconnected T.set_control(src) -/obj/machinery/power/solar_control/update_icon() +/obj/machinery/power/solar_control/update_appearance(updates = ALL) cut_overlays() if(stat & NOPOWER) add_overlay("[icon_keyboard]_off") diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index c35403f7ae78..cf4ba453137c 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -33,9 +33,9 @@ pixel_x = rand(-10, 10) pixel_y = rand(-10, 10) setDir(pick(GLOB.alldirs)) - update_icon() + update_appearance(updates = ALL) -/obj/item/ammo_casing/update_icon() +/obj/item/ammo_casing/update_appearance(updates = ALL) ..() icon_state = "[initial(icon_state)][BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? "-live" : ""]" desc = "[initial(desc)][!BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? " This one is spent." : ""]" @@ -59,7 +59,7 @@ else continue if (boolets > 0) - box.update_icon() + box.update_appearance(updates = ALL) to_chat(user, span_notice("You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.")) else to_chat(user, span_warning("You fail to collect anything!")) @@ -72,7 +72,7 @@ . = ..() /obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3) - update_icon() + update_appearance(updates = ALL) SpinAnimation(10, 1) var/matrix/M = matrix(transform) M.Turn(rand(-170,170)) diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index 846c96a80fb0..e5c3a04b72fb 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -19,7 +19,7 @@ else user.changeNext_move(CLICK_CD_RANGE) user.newtonian_move(get_dir(target, user)) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "", atom/fired_from) diff --git a/code/modules/projectiles/ammunition/reusable/_reusable.dm b/code/modules/projectiles/ammunition/reusable/_reusable.dm index 64cd363bec47..f43f9c36eb74 100644 --- a/code/modules/projectiles/ammunition/reusable/_reusable.dm +++ b/code/modules/projectiles/ammunition/reusable/_reusable.dm @@ -31,4 +31,4 @@ if(!BB) newshot() in_air = FALSE - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/projectiles/ammunition/reusable/arrow.dm b/code/modules/projectiles/ammunition/reusable/arrow.dm index 39f9492767b2..665613ea66c0 100644 --- a/code/modules/projectiles/ammunition/reusable/arrow.dm +++ b/code/modules/projectiles/ammunition/reusable/arrow.dm @@ -76,7 +76,7 @@ if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_off() - update_icon() + update_appearance(updates = ALL) return ..() /obj/item/ammo_casing/reusable/arrow/wirecutter_act(mob/living/user, obj/item/I) @@ -131,23 +131,23 @@ if(istype(new_explosive)) explosive = new_explosive LAZYADD(attached_parts, new_explosive) - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_casing/reusable/arrow/proc/add_bola(obj/item/restraints/legcuffs/bola/new_bola) if(istype(new_bola)) bola = new_bola LAZYADD(attached_parts, new_bola) - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_casing/reusable/arrow/proc/add_syringe(obj/item/reagent_containers/syringe/new_syringe) if(istype(new_syringe)) syringe = new_syringe LAZYADD(attached_parts, new_syringe) - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_casing/reusable/arrow/proc/add_flame() flaming = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_casing/reusable/arrow/proc/on_embed(target, mob/living/carbon/embedde) if(syringe) @@ -439,7 +439,7 @@ // Otherwise, move it to the arrow and make it the new shard new_shard.forceMove(src) shard = new_shard - update_icon() + update_appearance(updates = ALL) ..() /obj/item/ammo_casing/reusable/arrow/singulo/update_icon(force_update) diff --git a/code/modules/projectiles/ammunition/reusable/foam.dm b/code/modules/projectiles/ammunition/reusable/foam.dm index 90ebfb71bdf5..b0af19d2b809 100644 --- a/code/modules/projectiles/ammunition/reusable/foam.dm +++ b/code/modules/projectiles/ammunition/reusable/foam.dm @@ -10,7 +10,7 @@ var/modified = FALSE var/obj/item/pen/pen -/obj/item/ammo_casing/reusable/foam_dart/update_icon() +/obj/item/ammo_casing/reusable/foam_dart/update_appearance(updates = ALL) ..() if (modified) icon_state = "foamdart_empty" @@ -26,7 +26,7 @@ if (A.tool_behaviour == TOOL_SCREWDRIVER && !modified) modified = TRUE to_chat(user, span_notice("You pop the safety cap off [src].")) - update_icon() + update_appearance(updates = ALL) else if (istype(A, /obj/item/pen)) if(modified) if(!pen) diff --git a/code/modules/projectiles/attachments/_attachment.dm b/code/modules/projectiles/attachments/_attachment.dm index a7b59c5a9f93..43728cbc75fd 100644 --- a/code/modules/projectiles/attachments/_attachment.dm +++ b/code/modules/projectiles/attachments/_attachment.dm @@ -35,7 +35,7 @@ /// See code/modules/projectiles/attachments/laser_sight.dm for example. var/list/actions_list = list() -/obj/item/attachment/update_icon() +/obj/item/attachment/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][is_on ? "_on" : ""]" . = ..() attached_gun?.update_attachments() diff --git a/code/modules/projectiles/attachments/laser_sight.dm b/code/modules/projectiles/attachments/laser_sight.dm index 23569ceadf88..df86cab5f7b9 100644 --- a/code/modules/projectiles/attachments/laser_sight.dm +++ b/code/modules/projectiles/attachments/laser_sight.dm @@ -48,7 +48,7 @@ else attached_gun.spread += 6 QDEL_LIST(attached_gun.current_tracers) - update_icon() + update_appearance(updates = ALL) /obj/item/attachment/laser_sight/process() return aiming_beam(TRUE) diff --git a/code/modules/projectiles/attachments/scopes.dm b/code/modules/projectiles/attachments/scopes.dm index 4a340175c638..d9aff9a03111 100644 --- a/code/modules/projectiles/attachments/scopes.dm +++ b/code/modules/projectiles/attachments/scopes.dm @@ -47,7 +47,7 @@ else attached_gun.spread += accuracy drop_user(current_user) - update_icon() + update_appearance(updates = ALL) /obj/item/attachment/scope/infrared/pickup_user(mob/user) . = ..() diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 68ed1c623d6e..64806619dd19 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -39,7 +39,7 @@ calc_mats() if(!start_empty) top_off(starting=TRUE) - update_icon() + update_appearance(updates = ALL) /** * top_off is used to refill the magazine to max, in case you want to increase the size of a magazine with VV then refill it at once @@ -59,7 +59,7 @@ for(var/i = max(1, stored_ammo.len), i <= max_ammo, i++) stored_ammo += new round_check(src) - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_box/proc/calc_mats(force = FALSE) if (force || !bullet_cost) @@ -138,8 +138,8 @@ if(!silent) to_chat(user, span_notice("You load [num_loaded] round\s into \the [src]!")) playsound(src, 'sound/weapons/bulletinsert.ogg', 60, TRUE) - A.update_icon() - update_icon() + A.update_appearance(updates = ALL) + update_appearance(updates = ALL) return num_loaded /obj/item/ammo_box/attack_self(mob/user) @@ -150,7 +150,7 @@ A.bounce_away(FALSE, NONE) playsound(src, 'sound/weapons/bulletinsert.ogg', 60, TRUE) to_chat(user, span_notice("You remove a round from [src]!")) - update_icon() + update_appearance(updates = ALL) /obj/item/ammo_box/AltClick(mob/user) . = ..() @@ -167,9 +167,9 @@ A.bounce_away(FALSE, NONE) playsound(src, 'sound/weapons/bulletinsert.ogg', 60, TRUE) to_chat(user, span_notice("You remove a round from [src]!")) - update_icon() + update_appearance(updates = ALL) -/obj/item/ammo_box/update_icon() +/obj/item/ammo_box/update_appearance(updates = ALL) var/rounds_left = stored_ammo.len switch(multiple_sprites) if(AMMO_BOX_PER_BULLET) @@ -206,4 +206,4 @@ /obj/item/ammo_box/magazine/handle_atom_del(atom/A) stored_ammo -= A - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index 690c880c15a1..2712eba4a447 100644 --- a/code/modules/projectiles/boxes_magazines/external/grenade.dm +++ b/code/modules/projectiles/boxes_magazines/external/grenade.dm @@ -5,7 +5,7 @@ caliber = "75" max_ammo = 8 -/obj/item/ammo_box/magazine/m75/update_icon() +/obj/item/ammo_box/magazine/m75/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "75-8" diff --git a/code/modules/projectiles/boxes_magazines/external/lmg.dm b/code/modules/projectiles/boxes_magazines/external/lmg.dm index 8132339a8e3d..d58903e067df 100644 --- a/code/modules/projectiles/boxes_magazines/external/lmg.dm +++ b/code/modules/projectiles/boxes_magazines/external/lmg.dm @@ -32,6 +32,6 @@ ammo_type = /obj/item/ammo_casing/mm712x82/inc sprite_designation = "I" -/obj/item/ammo_box/magazine/mm712x82/update_icon() +/obj/item/ammo_box/magazine/mm712x82/update_appearance(updates = ALL) ..() icon_state = "a762[sprite_designation]-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/boxes_magazines/external/pistol.dm b/code/modules/projectiles/boxes_magazines/external/pistol.dm index 1642a131d395..bb1a9749cb55 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -64,7 +64,7 @@ caliber = ".45" max_ammo = 8 -/obj/item/ammo_box/magazine/m45/update_icon() +/obj/item/ammo_box/magazine/m45/update_appearance(updates = ALL) ..() if (ammo_count() >= 8) icon_state = "45-8" @@ -81,7 +81,7 @@ caliber = "9mm" max_ammo = 15 -/obj/item/ammo_box/magazine/pistolm9mm/update_icon() +/obj/item/ammo_box/magazine/pistolm9mm/update_appearance(updates = ALL) ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" @@ -95,7 +95,7 @@ caliber = ".50ae" max_ammo = 7 -/obj/item/ammo_box/magazine/m50/update_icon() +/obj/item/ammo_box/magazine/m50/update_appearance(updates = ALL) . = ..() if (ammo_count() >= 7) icon_state = "50ae-7" @@ -112,7 +112,7 @@ caliber = "38" max_ammo = 8 -/obj/item/ammo_box/magazine/v38/update_icon() +/obj/item/ammo_box/magazine/v38/update_appearance(updates = ALL) ..() if (ammo_count() >= 8) icon_state = "v38[sprite_designation]-8" diff --git a/code/modules/projectiles/boxes_magazines/external/rechargable.dm b/code/modules/projectiles/boxes_magazines/external/rechargable.dm index e98aff2bbc60..23754c87a826 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -8,7 +8,7 @@ caliber = LASER max_ammo = 20 -/obj/item/ammo_box/magazine/recharge/update_icon() +/obj/item/ammo_box/magazine/recharge/update_appearance(updates = ALL) ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." cut_overlays() @@ -29,7 +29,7 @@ icon_state = "lasgunmag" desc = "A rechargeable, detachable battery that serves as a magazine for las weaponry." -/obj/item/ammo_box/magazine/recharge/lasgun/update_icon() +/obj/item/ammo_box/magazine/recharge/lasgun/update_appearance(updates = ALL) ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) @@ -74,7 +74,7 @@ "fire" = 2 ) -/obj/item/gun/ballistic/automatic/pistol/ntusp/update_icon() +/obj/item/gun/ballistic/automatic/pistol/ntusp/update_appearance(updates = ALL) icon_state = initial(icon_state) if(istype(magazine, /obj/item/ammo_box/magazine/recharge/ntusp/laser)) // Tricks the parent proc into thinking we have a skin so it uses the laser-variant icon_state @@ -104,7 +104,7 @@ var/bullets_to_remove = round(bullet_count / (severity*2)) for(var/i = 0; i < bullets_to_remove, i++) qdel(get_round()) - update_icon() + update_appearance(updates = ALL) if(isgun(loc)) var/obj/item/gun/ballistic/G = loc if(!G.magazine == src) @@ -135,7 +135,7 @@ icon_state = "powerpack_small-l" max_ammo = 8 -/obj/item/ammo_box/magazine/recharge/ntusp/laser/update_icon() +/obj/item/ammo_box/magazine/recharge/ntusp/laser/update_appearance(updates = ALL) ..() cut_overlays() var/cur_ammo = ammo_count() diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index f33ba8a15753..64a07035bf35 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -8,7 +8,7 @@ caliber = ".45" max_ammo = 10 -/obj/item/ammo_box/magazine/m10mm/rifle/update_icon() +/obj/item/ammo_box/magazine/m10mm/rifle/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "75-8" @@ -25,7 +25,7 @@ caliber = "a556" max_ammo = 30 -/obj/item/ammo_box/magazine/m556/update_icon() +/obj/item/ammo_box/magazine/m556/update_appearance(updates = ALL) ..() icon_state = "5.56m[sprite_designation]-[round(ammo_count(),5)]" @@ -55,7 +55,7 @@ caliber = "a556" max_ammo = 30 -/obj/item/ammo_box/magazine/r556/update_icon() +/obj/item/ammo_box/magazine/r556/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "arg556[sprite_designation]" @@ -96,7 +96,7 @@ caliber = "m308" max_ammo = 15 -/obj/item/ammo_box/magazine/m308/update_icon() +/obj/item/ammo_box/magazine/m308/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "m308[sprite_designation]" @@ -130,7 +130,7 @@ caliber = "a762" max_ammo = 11 -/obj/item/ammo_box/magazine/ks762/update_icon() +/obj/item/ammo_box/magazine/ks762/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "ks762[sprite_designation]" diff --git a/code/modules/projectiles/boxes_magazines/external/shotgun.dm b/code/modules/projectiles/boxes_magazines/external/shotgun.dm index 46eaf75985f4..49fd92d40e08 100644 --- a/code/modules/projectiles/boxes_magazines/external/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/external/shotgun.dm @@ -10,7 +10,7 @@ max_ammo = 8 sprite_designation = "b" -/obj/item/ammo_box/magazine/m12g/update_icon() +/obj/item/ammo_box/magazine/m12g/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "m12g[sprite_designation]-8" diff --git a/code/modules/projectiles/boxes_magazines/external/smg.dm b/code/modules/projectiles/boxes_magazines/external/smg.dm index c05c7332e51a..1d9e6a3d10de 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -8,7 +8,7 @@ caliber = "4.6x30mm" max_ammo = 20 -/obj/item/ammo_box/magazine/wt550m9/update_icon() +/obj/item/ammo_box/magazine/wt550m9/update_appearance(updates = ALL) ..() switch(ammo_count()) if(17 to 21) //Considers the extra bullet in the chamber @@ -75,7 +75,7 @@ sprite_designation = "B" max_ammo = 10 -/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_icon() // Snowflake code snowflake code +/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_appearance(updates = ALL) // Snowflake code snowflake code ..() switch(ammo_count()) if(9 to 11) //Considers the extra bullet in the chamber @@ -101,7 +101,7 @@ caliber = "9mm" max_ammo = 32 -/obj/item/ammo_box/magazine/uzim9mm/update_icon() +/obj/item/ammo_box/magazine/uzim9mm/update_appearance(updates = ALL) ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" @@ -115,7 +115,7 @@ caliber = "9mm" max_ammo = 21 -/obj/item/ammo_box/magazine/smgm9mm/update_icon() +/obj/item/ammo_box/magazine/smgm9mm/update_appearance(updates = ALL) ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" @@ -145,7 +145,7 @@ caliber = ".45" max_ammo = 24 -/obj/item/ammo_box/magazine/smgm45/update_icon() +/obj/item/ammo_box/magazine/smgm45/update_appearance(updates = ALL) ..() icon_state = "c20r45[sprite_designation]-[round(ammo_count(),2)]" diff --git a/code/modules/projectiles/boxes_magazines/external/sniper.dm b/code/modules/projectiles/boxes_magazines/external/sniper.dm index 6da8640160d9..1930d1d4eb80 100644 --- a/code/modules/projectiles/boxes_magazines/external/sniper.dm +++ b/code/modules/projectiles/boxes_magazines/external/sniper.dm @@ -9,7 +9,7 @@ max_ammo = 6 caliber = ".50bmg" -/obj/item/ammo_box/magazine/sniper_rounds/update_icon() +/obj/item/ammo_box/magazine/sniper_rounds/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "[initial(icon_state)]-ammo" diff --git a/code/modules/projectiles/boxes_magazines/external/toy.dm b/code/modules/projectiles/boxes_magazines/external/toy.dm index 82c97ea054ff..6878f71663fc 100644 --- a/code/modules/projectiles/boxes_magazines/external/toy.dm +++ b/code/modules/projectiles/boxes_magazines/external/toy.dm @@ -9,7 +9,7 @@ ammo_type = /obj/item/ammo_casing/reusable/foam_dart max_ammo = 20 -/obj/item/ammo_box/magazine/toy/smg/update_icon() +/obj/item/ammo_box/magazine/toy/smg/update_appearance(updates = ALL) ..() if(ammo_count()) icon_state = "smg9mm-42" @@ -35,7 +35,7 @@ ammo_type = /obj/item/ammo_casing/reusable/foam_dart max_ammo = 20 -/obj/item/ammo_box/magazine/toy/smgm45/update_icon() +/obj/item/ammo_box/magazine/toy/smgm45/update_appearance(updates = ALL) ..() icon_state = "c20r45-[round(ammo_count(),2)]" @@ -50,7 +50,7 @@ ammo_type = /obj/item/ammo_casing/reusable/foam_dart max_ammo = 50 -/obj/item/ammo_box/magazine/toy/m762/update_icon() +/obj/item/ammo_box/magazine/toy/m762/update_appearance(updates = ALL) ..() icon_state = "a762-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm index a1d16826ccfe..d276f25636b7 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm @@ -58,4 +58,4 @@ for(var/i = 1, i <= max_ammo, i++) if(!give_round(new load_type(src))) break - update_icon() \ No newline at end of file + update_appearance(updates = ALL) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 53b41c5996e9..bde5f42926fb 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -121,7 +121,7 @@ pin = null if(A == chambered) chambered = null - update_icon() + update_appearance(updates = ALL) if(A == bayonet) clear_bayonet() if(A == gun_light) @@ -206,7 +206,7 @@ w_class -= suppressed.w_class qdel(suppressed) suppressed = null - update_icon() + update_appearance(updates = ALL) else if(enloudened && enloudened.enloudened_sound) playsound(user, enloudened.enloudened_sound, fire_sound_volume, vary_fire_sound) @@ -355,7 +355,7 @@ firing_burst = FALSE return FALSE process_chamber() - update_icon() + update_appearance(updates = ALL) return TRUE /// cd_override is FALSE or 0 by default (no override), if you want to make a gun have no click cooldown then just make it something small like 0.001 @@ -409,17 +409,17 @@ shoot_with_empty_chamber(user) return process_chamber() - update_icon() + update_appearance(updates = ALL) semicd = TRUE addtimer(CALLBACK(src, PROC_REF(reset_semicd)), fire_delay) if(user) - user.update_inv_hands() + user.update_held_items() SSblackbox.record_feedback("tally", "gun_fired", 1, type) recent_shoot = world.time return TRUE -/obj/item/gun/update_icon() +/obj/item/gun/update_appearance(updates = ALL) ..() @@ -629,7 +629,7 @@ else cut_overlay(flashlight_overlay, TRUE) flashlight_overlay = null - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 8b0b522902cc..562527df1ef8 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -156,7 +156,7 @@ feedback_fire_slide ? add_overlay(feedback_firing_icon) : add_overlay(feedback_original_icon) DabAnimation(speed = feedback_recoil_speed, angle = ((rand(25,50)) * feedback_recoil_amount), direction = (feedback_recoil_reverse ? 2 : 3), hold_seconds = feedback_recoil_hold) sleep(frames) - update_icon() + update_appearance(updates = ALL) return if (bolt_type == BOLT_TYPE_LOCKING) if(type != "slide*") @@ -165,7 +165,7 @@ DabAnimation(speed = feedback_recoil_speed, angle = ((rand(20,25)) * feedback_recoil_amount), direction = 2) add_overlay("[feedback_original_icon_base]_[type]") // actual animation sleep(frames) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/Initialize() . = ..() @@ -177,7 +177,7 @@ feedback_firing_icon = feedback_original_icon_base if (!spawnwithmagazine) bolt_locked = TRUE - update_icon() + update_appearance(updates = ALL) return if (!magazine) if (!starting_mag_type) @@ -185,10 +185,10 @@ else magazine = new starting_mag_type(src) chamber_round() - update_icon() + update_appearance(updates = ALL) -/obj/item/gun/ballistic/update_icon() +/obj/item/gun/ballistic/update_appearance(updates = ALL) if (QDELETED(src)) return ..() @@ -281,7 +281,7 @@ else playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) feedback("slide_close") - update_icon() + update_appearance(updates = ALL) ///Drops the bolt from a locked position /obj/item/gun/ballistic/proc/drop_bolt(mob/user = null) @@ -291,7 +291,7 @@ bolt_locked = FALSE feedback("slide_close") chamber_round() - update_icon() + update_appearance(updates = ALL) ///Handles all the logic needed for magazine insertion /obj/item/gun/ballistic/proc/insert_magazine(mob/user, obj/item/ammo_box/magazine/AM, display_message = TRUE) @@ -308,7 +308,7 @@ feedback("mag_in") if (bolt_type == BOLT_TYPE_OPEN && !bolt_locked) chamber_round(TRUE) - update_icon() + update_appearance(updates = ALL) return TRUE else to_chat(user, span_warning("You cannot seem to get \the [src] out of your hands!")) @@ -340,10 +340,10 @@ else magazine = null user.put_in_hands(old_mag) - old_mag.update_icon() + old_mag.update_appearance(updates = ALL) if (display_message) to_chat(user, span_notice("You pull the [magazine_wording] out of \the [src].")) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/can_shoot() return chambered @@ -376,8 +376,8 @@ user.say(reload_say, forced = "reloading") if (chambered == null && bolt_type == BOLT_TYPE_NO_BOLT) chamber_round() - A.update_icon() - update_icon() + A.update_appearance(updates = ALL) + update_appearance(updates = ALL) return if(istype(A, /obj/item/suppressor)) var/obj/item/suppressor/S = A @@ -420,11 +420,11 @@ /obj/item/gun/ballistic/proc/install_suppressor(obj/item/suppressor/S) suppressed = S w_class += S.w_class //so pistols do not fit in pockets when suppressed - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/proc/install_enloudener(obj/item/enloudener/E) enloudened = E - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/AltClick(mob/user) if (unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) @@ -438,7 +438,7 @@ user.put_in_hands(suppressed) w_class -= suppressed.w_class suppressed = null - update_icon() + update_appearance(updates = ALL) return if(enloudened && can_unsuppress) if(!user.is_holding(src)) @@ -447,7 +447,7 @@ user.put_in_hands(enloudened) w_class -= enloudened.w_class enloudened = null - update_icon() + update_appearance(updates = ALL) return ///Prefire empty checks for the bolt drop @@ -456,7 +456,7 @@ if (bolt_type == BOLT_TYPE_OPEN && !bolt_locked) bolt_locked = TRUE playsound(src, bolt_drop_sound, bolt_drop_sound_volume) - update_icon() + update_appearance(updates = ALL) ///postfire empty checks for bolt locking and sound alarms /obj/item/gun/ballistic/proc/postfire_empty_checks() @@ -464,12 +464,12 @@ if (!alarmed && empty_alarm) playsound(src, empty_alarm_sound, empty_alarm_volume, empty_alarm_vary) alarmed = TRUE - update_icon() + update_appearance(updates = ALL) if (bolt_type == BOLT_TYPE_LOCKING) if(!bolt_locked) feedback("slide_open") bolt_locked = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/afterattack() prefire_empty_checks() @@ -500,7 +500,7 @@ if (num_unloaded) to_chat(user, span_notice("You unload [num_unloaded] [cartridge_wording]\s from [src].")) playsound(user, eject_sound, eject_sound_volume, eject_sound_vary) - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("[src] is empty!")) return @@ -630,7 +630,7 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list( slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) recoil = SAWN_OFF_RECOIL sawn_off = TRUE - update_icon() + update_appearance(updates = ALL) return TRUE ///used for sawing guns, causes the gun to fire without the input of the user diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 2208ecf166d7..a86aaab45643 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -27,7 +27,7 @@ /obj/item/gun/ballistic/automatic/proto/unrestricted pin = /obj/item/firing_pin -/obj/item/gun/ballistic/automatic/update_icon() +/obj/item/gun/ballistic/automatic/update_appearance(updates = ALL) ..() if(!select) add_overlay("[initial(icon_state)]_semi") @@ -56,7 +56,7 @@ to_chat(user, span_notice("You switch to [burst_size]-rnd burst.")) playsound(user, 'sound/weapons/empty.ogg', 100, 1) - update_icon() + update_appearance(updates = ALL) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -82,7 +82,7 @@ /obj/item/gun/ballistic/automatic/c20r/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/automatic/wt550 name = "\improper security auto carbine" @@ -133,7 +133,7 @@ /obj/item/gun/ballistic/automatic/m90/Initialize() . = ..() underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher(src) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/automatic/m90/unrestricted pin = /obj/item/firing_pin @@ -141,7 +141,7 @@ /obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize() . = ..() underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(src) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/automatic/m90/afterattack(atom/target, mob/living/user, flag, params) if(select == 2) @@ -157,7 +157,7 @@ else ..() -/obj/item/gun/ballistic/automatic/m90/update_icon() +/obj/item/gun/ballistic/automatic/m90/update_appearance(updates = ALL) ..() switch(select) if(0) @@ -188,7 +188,7 @@ spread -= spread_difference to_chat(user, span_notice("You switch to semi-auto.")) playsound(user, 'sound/weapons/empty.ogg', 100, 1) - update_icon() + update_appearance(updates = ALL) return /obj/item/gun/ballistic/automatic/tommygun @@ -262,10 +262,10 @@ playsound(user, 'sound/weapons/sawopen.ogg', 60, 1) else playsound(user, 'sound/weapons/sawopen.ogg', 60, 1) - update_icon() + update_appearance(updates = ALL) -/obj/item/gun/ballistic/automatic/l6_saw/update_icon() +/obj/item/gun/ballistic/automatic/l6_saw/update_appearance(updates = ALL) . = ..() add_overlay("l6_door_[cover_open ? "open" : "closed"]") @@ -276,7 +276,7 @@ return else . = ..() - update_icon() + update_appearance(updates = ALL) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/gun/ballistic/automatic/l6_saw/attack_hand(mob/user) diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm index a627ad529b40..84087b422174 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -45,7 +45,7 @@ /obj/item/gun/ballistic/bow/chamber_round() chambered = magazine.get_round(1) update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/dropped() . = ..() @@ -63,7 +63,7 @@ chambered = null magazine.give_round(old_chambered) update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/equipped(mob/user, slot) ..() @@ -73,7 +73,7 @@ chambered = null magazine.get_round(FALSE) update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/attack_self(mob/living/user) if(drawing) @@ -123,7 +123,7 @@ user.put_in_hands(AC) to_chat(user, span_notice("You remove [AC].")) update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/ammo_casing)) @@ -133,9 +133,9 @@ to_chat(user, span_notice("You notch [I].")) nerfed = istype(I, /obj/item/ammo_casing/reusable/arrow/toy) update_slowdown() - update_icon() + update_appearance(updates = ALL) -/obj/item/gun/ballistic/bow/update_icon() +/obj/item/gun/ballistic/bow/update_appearance(updates = ALL) cut_overlay(arrow_overlay, TRUE) icon_state = "[initial(icon_state)][chambered ? "_firing" : ""]" if(get_ammo()) @@ -460,7 +460,7 @@ if(TIMER_COOLDOWN_CHECK(src, "arrow_recharge")) . += span_warning("It is currently recharging!") -/obj/item/gun/ballistic/bow/energy/update_icon() +/obj/item/gun/ballistic/bow/energy/update_appearance(updates = ALL) cut_overlay(arrow_overlay, TRUE) if(folded) @@ -478,7 +478,7 @@ if(ismob(loc)) var/mob/M = loc - M.update_inv_hands() + M.update_held_items() /obj/item/gun/ballistic/bow/energy/shoot_live_shot(mob/living/user, pointblank, atom/pbtarget, message) if(folded) @@ -501,7 +501,7 @@ to_chat(user, span_notice("You fabricate an arrow.")) recharge_arrow() update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/energy/proc/recharge_arrow() if(folded || magazine.get_round(TRUE)) @@ -509,7 +509,7 @@ var/ammo_type = magazine.ammo_type magazine.give_round(new ammo_type()) update_slowdown() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/energy/attackby(obj/item/I, mob/user, params) return @@ -521,7 +521,7 @@ QDEL_NULL(current_round) if(!TIMER_COOLDOWN_CHECK(src, "arrow_recharge")) recharge_arrow() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/energy/proc/select_projectile(mob/living/user) var/obj/item/ammo_box/magazine/internal/bow/energy/M = magazine @@ -559,7 +559,7 @@ to_chat(user, span_notice("You switch \the [src]'s firing mode to \"[initial(choice.name)]\".")) QDEL_NULL(choice_list) QDEL_NULL(radial_list) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/energy/CtrlClick(mob/living/user) if(!can_fold || !user.is_holding(src)) @@ -589,7 +589,7 @@ //magazine.stored_ammo = stored_ammo if(user) to_chat(user, span_notice("You extend [src], allowing it to be fired.")) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/energy/advanced name = "advanced hardlight bow" diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index 2fb829dc8f94..ddae61139d1b 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -42,7 +42,7 @@ armed = 0 to_chat(user, span_warning("You need a free hand to hold the gun!")) return - update_icon() + update_appearance(updates = ALL) user.update_inv_back() else to_chat(user, span_warning("You are already holding the gun!")) @@ -81,7 +81,7 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunpack/update_icon() +/obj/item/minigunpack/update_appearance(updates = ALL) if(armed) icon_state = "notholstered" else @@ -96,7 +96,7 @@ to_chat(user, span_notice("You attach the [gun.name] to the [name].")) else src.visible_message(span_warning("The [gun.name] snaps back onto the [name]!")) - update_icon() + update_appearance(updates = ALL) user.update_inv_back() diff --git a/code/modules/projectiles/guns/ballistic/minigun.dm b/code/modules/projectiles/guns/ballistic/minigun.dm index f66198d60137..58396b9c5f87 100644 --- a/code/modules/projectiles/guns/ballistic/minigun.dm +++ b/code/modules/projectiles/guns/ballistic/minigun.dm @@ -42,7 +42,7 @@ armed = FALSE to_chat(user, span_warning("You need a free hand to hold the gun!")) return - update_icon() + update_appearance(updates = ALL) user.update_inv_back() else to_chat(user, span_warning("You are already holding the gun!")) @@ -81,7 +81,7 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunbackpack/update_icon() +/obj/item/minigunbackpack/update_appearance(updates = ALL) if(armed) icon_state = "notholstered" else @@ -96,7 +96,7 @@ to_chat(user, span_notice("You attach the [gun.name] to the [name].")) else visible_message(span_warning("The [gun.name] snaps back onto the [name]!")) - update_icon() + update_appearance(updates = ALL) user.update_inv_back() diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index aa9e032ebd46..0e291903e03b 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -181,8 +181,8 @@ ..() if(get_ammo(FALSE) > 0) spin() - update_icon() - A.update_icon() + update_appearance(updates = ALL) + A.update_appearance(updates = ALL) return /obj/item/gun/ballistic/revolver/russian/attack_self(mob/user) diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 356e9c069f4b..7a596a139817 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -15,7 +15,7 @@ bolt_drop_sound = "sound/weapons/mosinboltin.ogg" tac_reloads = FALSE -obj/item/gun/ballistic/rifle/update_icon() +obj/item/gun/ballistic/rifle/update_appearance(updates = ALL) ..() add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") @@ -25,7 +25,7 @@ obj/item/gun/ballistic/rifle/rack(mob/user = null) playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) process_chamber(FALSE, FALSE, FALSE) bolt_locked = TRUE - update_icon() + update_appearance(updates = ALL) return drop_bolt(user) diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 7bec002f220f..bb6a69396169 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -228,11 +228,11 @@ slot_flags = ITEM_SLOT_BACK to_chat(user, span_notice("You tie the lengths of cable to the shotgun, making a sling.")) slung = TRUE - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("You need at least ten lengths of cable if you want to make a sling!")) -/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_icon() +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_appearance(updates = ALL) ..() if(slung) icon_state = "ishotgunsling" @@ -243,7 +243,7 @@ if(. && slung) //sawing off the gun removes the sling new /obj/item/stack/cable_coil(get_turf(src), 10) slung = 0 - update_icon() + update_appearance(updates = ALL) /obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawn name = "sawn-off improvised shotgun" diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index 0de7b9610b37..c2ca6dc51bf7 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -13,7 +13,7 @@ item_flags = NONE casing_ejector = FALSE -/obj/item/gun/ballistic/automatic/toy/update_icon() +/obj/item/gun/ballistic/automatic/toy/update_appearance(updates = ALL) . = ..() add_overlay("[icon_state]_toy") @@ -56,7 +56,7 @@ casing_ejector = FALSE can_suppress = FALSE -/obj/item/gun/ballistic/shotgun/toy/update_icon() +/obj/item/gun/ballistic/shotgun/toy/update_appearance(updates = ALL) . = ..() add_overlay("[icon_state]_toy") @@ -90,7 +90,7 @@ /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot -/obj/item/gun/ballistic/automatic/c20r/toy/update_icon() +/obj/item/gun/ballistic/automatic/c20r/toy/update_appearance(updates = ALL) . = ..() add_overlay("[icon_state]_toy") @@ -110,6 +110,6 @@ /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot mag_type = /obj/item/ammo_box/magazine/toy/m762/riot -/obj/item/gun/ballistic/automatic/l6_saw/toy/update_icon() +/obj/item/gun/ballistic/automatic/l6_saw/toy/update_appearance(updates = ALL) . = ..() add_overlay("[icon_state]_toy") diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 311300cbba8a..c2b932666acb 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -10,7 +10,7 @@ var/list/ammo_type = list(/obj/item/ammo_casing/energy) var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next. var/can_charge = TRUE //Can it be charged in a recharger? - var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_icon()? + var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_appearance(updates = ALL)? var/charge_sections = 4 ammo_x_offset = 2 var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail @@ -45,7 +45,7 @@ emp_jam_timer = addtimer(CALLBACK(src, PROC_REF(emp_unjam)), unjam_time, TIMER_STOPPABLE) chambered = null //we empty the chamber recharge_newshot() //and try to charge a new shot - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/shoot_with_empty_chamber(mob/living/user as mob|obj) if(emp_jammed) @@ -73,7 +73,7 @@ recharge_newshot(TRUE) if(selfcharge) START_PROCESSING(SSobj, src) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/proc/update_ammo_types() var/obj/item/ammo_casing/energy/shot @@ -100,12 +100,12 @@ cell.give(100*charge_amount) if(!chambered) //if empty chamber we try to charge a new shot recharge_newshot(TRUE) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/attack_self(mob/living/user as mob) if(ammo_type.len > 1) select_fire(user) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/can_shoot() var/obj/item/ammo_casing/energy/shot = ammo_type[select] @@ -204,7 +204,7 @@ playsound(loc, fire_sound, 50, 1, -1) var/obj/item/ammo_casing/energy/shot = ammo_type[select] cell.use(shot.e_cost) - update_icon() + update_appearance(updates = ALL) return(FIRELOSS) else user.visible_message(span_suicide("[user] panics and starts choking to death!")) diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 6addb2cd4fe9..2f0c0a024798 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -173,7 +173,7 @@ if(DUEL_SETTING_C) setting = DUEL_SETTING_A to_chat(user,span_notice("You switch [src] setting to [setting] mode.")) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/dueling/update_icon(force_update) . = ..() @@ -230,7 +230,7 @@ duration = 30 var/setting -/obj/effect/temp_visual/dueling_chaff/update_icon() +/obj/effect/temp_visual/dueling_chaff/update_appearance(updates = ALL) . = ..() switch(setting) if(DUEL_SETTING_A) @@ -251,13 +251,13 @@ . = ..() var/obj/item/projectile/energy/duel/D = BB D.setting = setting - D.update_icon() + D.update_appearance(updates = ALL) /obj/item/ammo_casing/energy/duel/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from) . = ..() var/obj/effect/temp_visual/dueling_chaff/C = new(get_turf(user)) C.setting = setting - C.update_icon() + C.update_appearance(updates = ALL) //Projectile @@ -268,7 +268,7 @@ homing = TRUE var/setting -/obj/item/projectile/energy/duel/update_icon() +/obj/item/projectile/energy/duel/update_appearance(updates = ALL) . = ..() switch(setting) if(DUEL_SETTING_A) @@ -323,7 +323,7 @@ STR.max_items = 2 STR.set_holdable(list(/obj/item/gun/energy/dueling)) -/obj/item/storage/lockbox/dueling/update_icon() +/obj/item/storage/lockbox/dueling/update_appearance(updates = ALL) cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) @@ -343,4 +343,4 @@ gun_A.duel = D gun_B.duel = D D.gun_A = gun_A - D.gun_B = gun_B \ No newline at end of file + D.gun_B = gun_B diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 202a43709089..aa3b2174d78d 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -30,7 +30,7 @@ set_gun_light(new /obj/item/flashlight/seclite(src)) return ..() -/obj/item/gun/energy/e_gun/mini/update_icon() +/obj/item/gun/energy/e_gun/mini/update_appearance(updates = ALL) ..() if(gun_light && gun_light.on) add_overlay("mini-light") diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index b446dff500fe..59624751b4b4 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -108,7 +108,7 @@ /obj/item/gun/energy/kinetic_accelerator/proc/empty() if(cell) cell.use(cell.charge) - update_icon() + update_appearance(updates = ALL) /obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time) if(!cell) @@ -142,10 +142,10 @@ playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) else to_chat(loc, span_warning("[src] silently charges up.")) - update_icon() + update_appearance(updates = ALL) overheat = FALSE -/obj/item/gun/energy/kinetic_accelerator/update_icon() +/obj/item/gun/energy/kinetic_accelerator/update_appearance(updates = ALL) ..() if(!can_shoot()) add_overlay("[icon_state]_empty") diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 94e81c77da54..2036217aa77a 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -34,7 +34,7 @@ pin = null ammo_x_offset = 1 -/obj/item/gun/energy/decloner/update_icon() +/obj/item/gun/energy/decloner/update_appearance(updates = ALL) ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) @@ -138,6 +138,7 @@ toolspeed = 2 /obj/item/gun/energy/plasmacutter/Initialize() + AddElement(/datum/element/update_icon_blocker) . = ..() AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg') @@ -207,10 +208,6 @@ else . = ..(amount=1) - -/obj/item/gun/energy/plasmacutter/update_icon() - return - /obj/item/gun/energy/plasmacutter/adv name = "advanced plasma cutter" icon_state = "adv_plasmacutter" @@ -306,7 +303,7 @@ desc = "A projector that emits high density quantum-coupled bluespace beams. This one seems to be modified to go through glass." ammo_type = list(/obj/item/ammo_casing/energy/wormhole/upgraded, /obj/item/ammo_casing/energy/wormhole/orange/upgraded) -/obj/item/gun/energy/wormhole_projector/update_icon() +/obj/item/gun/energy/wormhole_projector/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][select]" item_state = icon_state @@ -384,8 +381,8 @@ can_charge = FALSE use_cyborg_cell = TRUE -/obj/item/gun/energy/printer/update_icon() - return +/obj/item/gun/energy/printer/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) /obj/item/gun/energy/printer/emp_act() return diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index a8e5555d17e5..a6a59f279605 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -80,8 +80,9 @@ recharge_newshot() return 1 -/obj/item/gun/magic/update_icon() - return +/obj/item/gun/magic/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj) to_chat(user, span_warning("The [name] whizzles quietly.")) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 64e159b5570f..1123c510d3cd 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -21,7 +21,7 @@ . = ..() . += "Has [charges] charge\s remaining." -/obj/item/gun/magic/wand/update_icon() +/obj/item/gun/magic/wand/update_appearance(updates = ALL) icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" /obj/item/gun/magic/wand/attack(atom/target, mob/living/user) @@ -44,7 +44,7 @@ zap_self(user) else . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/magic/wand/proc/zap_self(mob/living/user) diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index a911ee20855d..1898cf2a290a 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -148,7 +148,7 @@ current_zoom_x = 0 current_zoom_y = 0 -/obj/item/gun/energy/beam_rifle/update_icon() +/obj/item/gun/energy/beam_rifle/update_appearance(updates = ALL) cut_overlays() var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1] if(!QDELETED(cell) && (cell.charge >= primary_ammo.e_cost)) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index 164d3d790e66..794719430f8f 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -41,10 +41,10 @@ user.put_in_hands(bomb) user.visible_message(span_warning("[user] detaches [bomb] from [src].")) bomb = null - update_icon() + update_appearance(updates = ALL) return ..() -/obj/item/gun/blastcannon/update_icon() +/obj/item/gun/blastcannon/update_appearance(updates = ALL) if(bomb) icon_state = icon_state_loaded name = "blast cannon" @@ -65,7 +65,7 @@ return FALSE user.visible_message(span_warning("[user] attaches [T] to [src]!")) bomb = T - update_icon() + update_appearance(updates = ALL) return TRUE return ..() @@ -94,7 +94,7 @@ var/power = bomb? calculate_bomb() : debug_power power = min(power, max_power) QDEL_NULL(bomb) - update_icon() + update_appearance(updates = ALL) var/heavy = power * 0.25 var/medium = power * 0.5 var/light = power diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index 6098c5bdefcb..7d6acd3d3326 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -17,7 +17,7 @@ /obj/item/gun/syringe/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) chambered = new /obj/item/ammo_casing/syringegun(src) /obj/item/gun/syringe/handle_atom_del(atom/A) @@ -36,7 +36,7 @@ /obj/item/gun/syringe/process_chamber() if(chambered && !chambered.BB) //we just fired recharge_newshot() - update_icon() + update_appearance(updates = ALL) /obj/item/gun/syringe/examine(mob/user) . = ..() @@ -66,14 +66,14 @@ to_chat(user, span_notice("You load [A] into \the [src].")) syringes += A recharge_newshot() - update_icon() + update_appearance(updates = ALL) playsound(loc, load_sound, 40) return TRUE else to_chat(user, span_warning("[src] cannot hold more syringes!")) return FALSE -/obj/item/gun/syringe/update_icon() +/obj/item/gun/syringe/update_appearance(updates = ALL) . = ..() if(!has_syringe_overlay) return @@ -116,7 +116,7 @@ to_chat(user, span_notice("You load \the [D] into \the [src].")) syringes += D recharge_newshot() - update_icon() + update_appearance(updates = ALL) playsound(loc, load_sound, 40) return TRUE else diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index dd9d72b15926..a3986dc49400 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -448,7 +448,7 @@ for(var/atom/movable/AM in contents) C.insert(AM) C.welded = weld - C.update_icon() + C.update_appearance(updates = ALL) created = TRUE return ..() @@ -475,7 +475,7 @@ if(!welded) return icon_state = magic_icon - update_icon() + update_appearance(updates = ALL) /obj/structure/closet/decay/after_weld(weld_state) if(weld_state) @@ -495,7 +495,7 @@ /obj/structure/closet/decay/proc/unmagify() icon_state = weakened_icon - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(decay)), 15 SECONDS) icon_welded = "welded" diff --git a/code/modules/projectiles/projectile/reusable/arrow.dm b/code/modules/projectiles/projectile/reusable/arrow.dm index 30058fb07342..477c1bfde08b 100644 --- a/code/modules/projectiles/projectile/reusable/arrow.dm +++ b/code/modules/projectiles/projectile/reusable/arrow.dm @@ -37,7 +37,7 @@ L.ignite_mob() arrow.flaming = FALSE - arrow.update_icon() + arrow.update_appearance(updates = ALL) /obj/item/projectile/bullet/reusable/arrow/handle_drop(atom/target) if(dropped || !ammo_type) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 23fe2a6eef06..27236fb13a33 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -107,7 +107,7 @@ t4_upgrade_reagents = sortList(t4_upgrade_reagents, /proc/cmp_reagents_asc) display_reagents |= t4_upgrade_reagents //we don't sort display_reagents again after adding these because they will fuck up the order - update_icon() + update_appearance(updates = ALL) /obj/machinery/chem_dispenser/Destroy() QDEL_NULL(beaker) @@ -145,7 +145,7 @@ if(working_state) flick(working_state,src) -/obj/machinery/chem_dispenser/update_icon() +/obj/machinery/chem_dispenser/update_appearance(updates = ALL) cut_overlays() icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]" if(has_panel_overlay && panel_open) @@ -347,7 +347,7 @@ if(default_unfasten_wrench(user, I)) return if(default_deconstruction_screwdriver(user, icon_state, icon_state, I)) - update_icon() + update_appearance(updates = ALL) return if(default_deconstruction_crowbar(I)) return @@ -375,7 +375,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(updates = ALL) else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag)) to_chat(user, span_warning("You can't load [I] into [src]!")) return ..() @@ -434,7 +434,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/chem_dispenser/on_deconstruction() @@ -479,7 +479,7 @@ var/old = dir . = ..() if(dir != old) - update_icon() // the beaker needs to be re-positioned if we rotate + update_appearance(updates = ALL) // the beaker needs to be re-positioned if we rotate /obj/machinery/chem_dispenser/drinks/display_beaker() var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker") diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index b7d6268b8347..2727fa68a2e1 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -21,16 +21,16 @@ . = ..() if(A == beaker) beaker = null - update_icon() + update_appearance(updates = ALL) -/obj/machinery/chem_heater/update_icon() +/obj/machinery/chem_heater/update_appearance(updates = ALL) icon_state = "mixer[beaker ? 1 : 0][on ? "a" : "b"]" /obj/machinery/chem_heater/CtrlClick(mob/user) if(!user.canUseTopic(src, !issilicon(user))) return on = !on - update_icon() + update_appearance(updates = ALL) /obj/machinery/chem_heater/AltClick(mob/living/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) @@ -47,7 +47,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/chem_heater/RefreshParts() @@ -91,7 +91,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(updates = ALL) return return ..() @@ -129,7 +129,7 @@ if("power") on = !on . = TRUE - update_icon() + update_appearance(updates = ALL) if("temperature") var/target = params["target"] var/adjust = text2num(params["adjust"]) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 84a71dae462b..6892772e501b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -65,11 +65,11 @@ if(A == beaker) beaker = null reagents.clear_reagents() - update_icon() + update_appearance(updates = ALL) else if(A == bottle) bottle = null -/obj/machinery/chem_master/update_icon() +/obj/machinery/chem_master/update_appearance(updates = ALL) cut_overlays() if (stat & BROKEN) add_overlay("waitlight") @@ -103,7 +103,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(updates = ALL) else if(!condi && istype(I, /obj/item/storage/pill_bottle)) if(bottle) to_chat(user, span_warning("A pill bottle is already loaded into [src]!")) @@ -131,7 +131,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/chem_master/on_deconstruction() diff --git a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm index 4bc6fd486e40..c05d533c1816 100644 --- a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm +++ b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm @@ -53,7 +53,7 @@ var/input = text2num(params["amount"]) if(input) amount = input - update_icon() + update_appearance(updates = ALL) /obj/machinery/chem_dispenser/chem_synthesizer/proc/find_reagent(input) . = FALSE diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index b46cb1600c7d..bd5670081160 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -17,7 +17,7 @@ /obj/machinery/computer/pandemic/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/pandemic/Destroy() QDEL_NULL(beaker) @@ -42,7 +42,7 @@ /obj/machinery/computer/pandemic/handle_atom_del(atom/A) if(A == beaker) beaker = null - update_icon() + update_appearance(updates = ALL) return ..() /obj/machinery/computer/pandemic/proc/get_by_index(thing, index) @@ -122,10 +122,10 @@ /obj/machinery/computer/pandemic/proc/reset_replicator_cooldown() wait = FALSE - update_icon() + update_appearance(updates = ALL) playsound(src, 'sound/machines/ping.ogg', 30, TRUE) -/obj/machinery/computer/pandemic/update_icon() +/obj/machinery/computer/pandemic/update_appearance(updates = ALL) if(stat & BROKEN) icon_state = (beaker ? "mixer1_b" : "mixer0_b") return @@ -140,7 +140,7 @@ if(beaker) beaker.forceMove(drop_location()) beaker = null - update_icon() + update_appearance(updates = ALL) /obj/machinery/computer/pandemic/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -215,7 +215,7 @@ B.desc = "A small bottle. Contains [A.agent] culture in synthblood medium." B.reagents.add_reagent(/datum/reagent/blood, 20, data) wait = TRUE - update_icon() + update_appearance(updates = ALL) var/turf/source_turf = get_turf(src) log_virus("A culture bottle was printed for the virus [A.admin_details()] at [loc_name(source_turf)] by [key_name(usr)]") addtimer(CALLBACK(src, PROC_REF(reset_replicator_cooldown)), 50) @@ -229,7 +229,7 @@ B.name = "[D.name] vaccine bottle" B.reagents.add_reagent(/datum/reagent/vaccine, 15, list(id)) wait = TRUE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(reset_replicator_cooldown)), 200) . = TRUE @@ -247,7 +247,7 @@ beaker = I to_chat(user, span_notice("You insert [I] into [src].")) - update_icon() + update_appearance(updates = ALL) else return ..() diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index ac4d9da53f03..c4144928cb18 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -37,7 +37,7 @@ . = ..() holdingitems = list() QDEL_NULL(container) - update_icon() + update_appearance(updates = ALL) /obj/machinery/reagentgrinder/Destroy() if(container) @@ -89,7 +89,7 @@ . = ..() if(A == container) container = null - update_icon() + update_appearance(updates = ALL) if(holdingitems[A]) holdingitems -= A @@ -99,7 +99,7 @@ AM.forceMove(drop_location()) holdingitems = list() -/obj/machinery/reagentgrinder/update_icon() +/obj/machinery/reagentgrinder/update_appearance(updates = ALL) if(!container) icon_state = "juicer" return @@ -118,7 +118,7 @@ container = new_container else container = null - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) @@ -142,7 +142,7 @@ return replace_container(user, B) to_chat(user, span_notice("You add [B] to [src].")) - update_icon() + update_appearance(updates = ALL) return TRUE //no afterattack if(holdingitems.len >= limit) diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index c7477ce9d10f..d6504978233d 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -36,7 +36,7 @@ for(var/obj/item/stock_parts/matter_bin/B in component_parts) reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating -/obj/machinery/smoke_machine/update_icon() +/obj/machinery/smoke_machine/update_appearance(updates = ALL) if((!is_operational()) || (!on) || (reagents.total_volume == 0)) if (panel_open) icon_state = "smoke0-o" @@ -70,12 +70,12 @@ return if(reagents.total_volume == 0) on = FALSE - update_icon() + update_appearance(updates = ALL) return var/turf/location = get_turf(src) var/smoke_test = locate(/obj/effect/particle_effect/fluid/smoke) in location if(on && !smoke_test) - update_icon() + update_appearance(updates = ALL) var/datum/effect_system/fluid_spread/smoke/chem/smoke_machine/smoke = new() smoke.set_up(setting * 3, location = location, carry = reagents, efficiency = efficiency) smoke.start() @@ -131,7 +131,7 @@ switch(action) if("purge") reagents.clear_reagents() - update_icon() + update_appearance(updates = ALL) . = TRUE if("setting") var/amount = text2num(params["amount"]) @@ -140,7 +140,7 @@ . = TRUE if("power") on = !on - update_icon() + update_appearance(updates = ALL) if(on) message_admins("[ADMIN_LOOKUPFLW(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [ADMIN_VERBOSEJMP(src)].") log_game("[key_name(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [AREACOORD(src)].") diff --git a/code/modules/reagents/chemistry/recipes/special.dm b/code/modules/reagents/chemistry/recipes/special.dm index 4bb16dcd1f2f..270832b6f3dd 100644 --- a/code/modules/reagents/chemistry/recipes/special.dm +++ b/code/modules/reagents/chemistry/recipes/special.dm @@ -208,4 +208,4 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related dat += " above [recipe.required_temp] degrees" dat += "." info = dat.Join("") - update_icon() + update_appearance(updates = ALL) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 065c26f04dd9..83db61c70476 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -56,7 +56,7 @@ . = ..() if(blood_type != null) reagents.add_reagent(unique_blood ? unique_blood : /datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null)) - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/blood/on_reagent_change(changetype) if(reagents) @@ -68,7 +68,7 @@ else blood_type = null update_pack_name() - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/blood/proc/update_pack_name() if(!labelled) @@ -77,7 +77,7 @@ else name = "blood pack" -/obj/item/reagent_containers/blood/update_icon() +/obj/item/reagent_containers/blood/update_appearance(updates = ALL) cut_overlays() var/v = min(round(reagents.total_volume / volume * 10), 10) @@ -140,4 +140,4 @@ labelled = 0 update_pack_name() else - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm index a922925a8c9f..62235cc2f51f 100644 --- a/code/modules/reagents/reagent_containers/borghypo.dm +++ b/code/modules/reagents/reagent_containers/borghypo.dm @@ -55,7 +55,7 @@ Borg Hypospray regenerate_reagents() charge_timer = 0 - //update_icon() + //update_appearance(updates = ALL) return 1 // Use this to add more chemicals for the borghypo to produce. diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 798145704a2b..4543e9e3dde0 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -15,12 +15,12 @@ . = ..() if(!icon_state) icon_state = "bottle" - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/glass/bottle/update_icon() +/obj/item/reagent_containers/glass/bottle/update_appearance(updates = ALL) cut_overlays() if(!filling_icon_state) filling_icon_state = icon_state @@ -467,7 +467,7 @@ disease_amount = 15 /// Name that used as the base for pen renaming, so subtypes can have different names without having to worry about messing with it var/base_name = "vial" - var/base_icon_state = "vial" + base_icon_state = "vial" /// List of icon_states that require the stripe overlay to look good. Not a very good way of doing it, but its the best I can come up with right now. var/list/striped_vial_skins = list("vial_white", "vial_red", "vial_blue", "vial_green", "vial_orange", "vial_purple", "vial_black", "viallarge_white", "viallarge_red", "viallarge_blue", "viallarge_green", "viallarge_orange", "viallarge_purple", "viallarge_black") diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 640716e6e1b8..38216c4f798b 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -44,7 +44,7 @@ span_userdanger("[user] tries to squirt something into [target]'s eyes, but fails!")) to_chat(user, span_notice("You transfer [trans] unit\s of the solution.")) - update_icon() + update_appearance(updates = ALL) return else if(isalien(target)) //hiss-hiss has no eyes! to_chat(target, span_danger("[target] does not seem to have any eyes!")) @@ -82,7 +82,7 @@ trans = src.reagents.trans_to(target, amount_per_transfer_from_this, transfered_by = user) to_chat(user, span_notice("You transfer [trans] unit\s of the solution.")) - update_icon() + update_appearance(updates = ALL) else @@ -98,9 +98,9 @@ to_chat(user, span_notice("You fill [src] with [trans] unit\s of the solution.")) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/dropper/update_icon() +/obj/item/reagent_containers/dropper/update_appearance(updates = ALL) cut_overlays() if(reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper") diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 678c2b7d51e9..f50982c7175a 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -119,15 +119,15 @@ /obj/item/reagent_containers/glass/beaker/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/glass/beaker/get_part_rating() return reagents.maximum_volume /obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/glass/beaker/update_icon() +/obj/item/reagent_containers/glass/beaker/update_appearance(updates = ALL) cut_overlays() if(reagents.total_volume) @@ -177,7 +177,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,20,25,30,60,120) -/obj/item/reagent_containers/glass/beaker/plastic/update_icon() +/obj/item/reagent_containers/glass/beaker/plastic/update_appearance(updates = ALL) icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states ..() icon_state = "beakerwhite" @@ -422,9 +422,9 @@ /obj/item/reagent_containers/glass/mixbowl/on_reagent_change(changetype) ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/glass/mixbowl/update_icon() +/obj/item/reagent_containers/glass/mixbowl/update_appearance(updates = ALL) cut_overlays() if(reagents.total_volume) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index b97dd338140b..61a5ea3a3133 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -126,7 +126,7 @@ if(!iscyborg(user)) reagents.maximum_volume = 0 //Makes them useless afterwards reagents.flags = NONE - update_icon() + update_appearance(updates = ALL) addtimer(CALLBACK(src, PROC_REF(cyborg_recharge), user), 80) /obj/item/reagent_containers/autoinjector/medipen/proc/cyborg_recharge(mob/living/silicon/robot/user) @@ -134,9 +134,9 @@ var/mob/living/silicon/robot/R = user if(R.cell.use(100)) reagents.add_reagent_list(list_reagents) - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/autoinjector/medipen/update_icon() +/obj/item/reagent_containers/autoinjector/medipen/update_appearance(updates = ALL) if(reagents.total_volume > 0) icon_state = initial(icon_state) else @@ -305,14 +305,14 @@ if(ispath(container)) container = new container antispam = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/hypospray/update_icon() +/obj/item/hypospray/update_appearance(updates = ALL) ..() cut_overlays() if(ismob(loc)) var/mob/M = loc - M.update_inv_hands() + M.update_held_items() if(container?.reagents?.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10") @@ -355,7 +355,7 @@ user.put_in_hands(container) to_chat(user, span_notice("You remove [container] from [src].")) container = null - update_icon() + update_appearance(updates = ALL) playsound(loc, pick(eject_sound), 50, 1) else to_chat(user, span_notice("This hypo isn't loaded!")) @@ -376,7 +376,7 @@ return FALSE container = V user.visible_message(span_notice("[user] has loaded [container] into [src]."),span_notice("You have loaded [container] into [src].")) - update_icon() + update_appearance(updates = ALL) playsound(loc, pick(load_sound), 35, 1) return TRUE else @@ -433,7 +433,7 @@ if(HYPO_DRAW) draw(target, user) antispam = FALSE - update_icon() + update_appearance(updates = ALL) /obj/item/hypospray/proc/inject(mob/living/carbon/target, mob/user) //Initial Checks/Logging diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 1ca00f8877fd..cd67ea85b687 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -21,28 +21,28 @@ . = ..() if(list_reagents) //syringe starts in inject mode if its already got something inside mode = SYRINGE_INJECT - update_icon() + update_appearance(updates = ALL) RegisterSignals(src, list(COMSIG_ITEM_EMBEDDED, COMSIG_ITEM_EMBED_TICK), PROC_REF(embed_inject)) /obj/item/reagent_containers/syringe/on_reagent_change(changetype) - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/syringe/pickup(mob/user) ..() - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/syringe/dropped(mob/user) ..() - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/syringe/attack_self(mob/user) mode = !mode - update_icon() + update_appearance(updates = ALL) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/reagent_containers/syringe/attack_hand() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/reagent_containers/syringe/attack_paw(mob/user) return attack_hand(user) @@ -103,7 +103,7 @@ to_chat(user, span_notice("You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.")) if (reagents.total_volume >= reagents.maximum_volume) mode=!mode - update_icon() + update_appearance(updates = ALL) if(SYRINGE_INJECT) // Always log attemped injections for admins @@ -165,10 +165,10 @@ to_chat(user, span_notice("You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.")) if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT) mode = SYRINGE_DRAW - update_icon() + update_appearance(updates = ALL) -/obj/item/reagent_containers/syringe/update_icon() +/obj/item/reagent_containers/syringe/update_appearance(updates = ALL) cut_overlays() var/rounded_vol if(reagents && reagents.total_volume) @@ -189,7 +189,7 @@ if (SYRINGE_INJECT) injoverlay = "inject" add_overlay(injoverlay) - M.update_inv_hands() + M.update_held_items() /obj/item/reagent_containers/syringe/proc/embed_inject(target, mob/living/carbon/human/embedde, obj/item/bodypart/part) if(!reagents.total_volume) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 3d38e3d93bca..e8decb0df568 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -101,7 +101,7 @@ reagents.trans_to(W, W.max_fuel, transfered_by = user) user.visible_message(span_notice("[user] refills [user.p_their()] [W.name]."), span_notice("You refill [W].")) playsound(src, 'sound/effects/refill.ogg', 50, 1) - W.update_icon() + W.update_appearance(updates = ALL) else user.visible_message(span_warning("[user] catastrophically fails at refilling [user.p_their()] [W.name]!"), span_userdanger("That was stupid of you.")) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 25a7e6c3a122..caf4d1e9eeb7 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -121,7 +121,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) movedir = backwards update() -/obj/machinery/conveyor/update_icon() +/obj/machinery/conveyor/update_appearance(updates = ALL) if(!operating) icon_state = "conveyor[inverted ? "-0" : "0"]" else @@ -132,7 +132,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) if(stat & NOPOWER) operating = FALSE . = FALSE - update_icon() + update_appearance(updates = ALL) // machine process // move items to the target location @@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) inverted = !inverted update_move_direction() to_chat(user, span_notice("You set [src]'s direction [inverted ? "backwards" : "back to default"].")) - update_icon() + update_appearance(updates = ALL) else if(I.tool_behaviour == TOOL_MULTITOOL) switch(conveytime) @@ -253,7 +253,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) . = ..() if (newid) id = newid - update_icon() + update_appearance(updates = ALL) LAZYADD(GLOB.conveyors_by_id[id], src) /obj/machinery/conveyor_switch/Destroy() @@ -271,7 +271,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) // update the icon depending on the position -/obj/machinery/conveyor_switch/update_icon() +/obj/machinery/conveyor_switch/update_appearance(updates = ALL) if(position<0) if(invert_icon) icon_state = "switch-fwd" @@ -297,7 +297,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) for(var/obj/machinery/conveyor/C in GLOB.conveyors_by_id[id]) C.operating = position C.update_move_direction() - C.update_icon() + C.update_appearance(updates = ALL) CHECK_TICK // attack with hand, switch position @@ -318,13 +318,13 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) position = 0 operated = 1 - update_icon() + update_appearance(updates = ALL) // find any switches with same id as this one, and set their positions to match us for(var/obj/machinery/conveyor_switch/S in GLOB.conveyors_by_id[id]) S.invert_icon = invert_icon S.position = position - S.update_icon() + S.update_appearance(updates = ALL) CHECK_TICK /obj/machinery/conveyor_switch/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index bab1c389c7b8..d9859663293e 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -39,7 +39,7 @@ air_contents = new /datum/gas_mixture() //gas.volume = 1.05 * CELLSTANDARD - update_icon() + update_appearance(updates = ALL) return INITIALIZE_HINT_LATELOAD //we need turfs to have air @@ -96,7 +96,7 @@ if((I.item_flags & ABSTRACT) || !user.temporarilyRemoveItemFromInventory(I)) return place_item_in_disposal(I, user) - update_icon() + update_appearance(updates = ALL) return 1 //no afterattack else return ..() @@ -140,7 +140,7 @@ target.visible_message(span_danger("[user] has placed [target] in [src]."), span_userdanger("[user] has placed [target] in [src].")) log_combat(user, target, "stuffed", addition="into [src]") target.LAssailant = WEAKREF(user) - update_icon() + update_appearance(updates = ALL) /obj/machinery/disposal/relaymove(mob/user) attempt_escape(user) @@ -157,14 +157,14 @@ // leave the disposal /obj/machinery/disposal/proc/go_out(mob/user) user.forceMove(loc) - update_icon() + update_appearance(updates = ALL) // monkeys and xenos can only pull the flush lever /obj/machinery/disposal/attack_paw(mob/user) if(stat & BROKEN) return flush = !flush - update_icon() + update_appearance(updates = ALL) // eject the contents of the disposal unit @@ -173,11 +173,12 @@ for(var/atom/movable/AM in src) AM.forceMove(T) AM.pipe_eject(0) - update_icon() + update_appearance(updates = ALL) // update the icon & overlays to reflect mode & status -/obj/machinery/disposal/update_icon() - return +/obj/machinery/disposal/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/disposal/proc/flush() flushing = TRUE @@ -233,7 +234,7 @@ src.transfer_fingerprints_to(stored) stored.anchored = FALSE stored.density = TRUE - stored.update_icon() + stored.update_appearance(updates = ALL) for(var/atom/movable/AM in src) //out, out, darned crowbar! AM.forceMove(T) ..() @@ -273,8 +274,8 @@ to_chat(user, span_warning("You empty the bag.")) for(var/obj/item/O in T.contents) STR.remove_from_storage(O,src) - T.update_icon() - update_icon() + T.update_appearance(updates = ALL) + update_appearance(updates = ALL) else return ..() @@ -285,7 +286,7 @@ if(!user.canUseTopic(src, TRUE)) return flush = !flush - update_icon() + update_appearance(updates = ALL) /obj/machinery/disposal/bin/ui_state(mob/user) return GLOB.notcontained_state @@ -315,22 +316,22 @@ switch(action) if("handle-0") flush = FALSE - update_icon() + update_appearance(updates = ALL) . = TRUE if("handle-1") if(!panel_open) flush = TRUE - update_icon() + update_appearance(updates = ALL) . = TRUE if("pump-0") if(pressure_charging) pressure_charging = FALSE - update_icon() + update_appearance(updates = ALL) . = TRUE if("pump-1") if(!pressure_charging) pressure_charging = TRUE - update_icon() + update_appearance(updates = ALL) . = TRUE if("eject") eject() @@ -346,7 +347,7 @@ visible_message(span_notice("[AM] lands in [src] and triggers the flush system!.")) else visible_message(span_notice("[AM] lands in [src].")) - update_icon() + update_appearance(updates = ALL) else visible_message(span_notice("[AM] bounces off of [src]'s rim!")) return ..() @@ -357,9 +358,9 @@ ..() full_pressure = FALSE pressure_charging = TRUE - update_icon() + update_appearance(updates = ALL) -/obj/machinery/disposal/bin/update_icon() +/obj/machinery/disposal/bin/update_appearance(updates = ALL) cut_overlays() if(stat & BROKEN) pressure_charging = FALSE @@ -435,7 +436,7 @@ if(air_contents.return_pressure() >= SEND_PRESSURE) full_pressure = TRUE pressure_charging = FALSE - update_icon() + update_appearance(updates = ALL) return /obj/machinery/disposal/bin/get_remote_view_fullscreens(mob/user) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 83af120d4cb8..d8e41f05aee0 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -32,7 +32,7 @@ var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) rotcomp.BaseRot(null,ROTATION_FLIP) - update_icon() + update_appearance(updates = ALL) /obj/structure/disposalconstruct/Move() var/old_dir = dir @@ -40,7 +40,7 @@ setDir(old_dir) //pipes changing direction when moved is just annoying and buggy // update iconstate and dpdir due to dir and type -/obj/structure/disposalconstruct/update_icon() +/obj/structure/disposalconstruct/update_appearance(updates = ALL) icon_state = initial(pipe_type.icon_state) if(is_pipe()) icon_state = "con[icon_state]" @@ -63,7 +63,7 @@ // change visibility status and force update of icon /obj/structure/disposalconstruct/hide(var/intact) invisibility = (intact && level==1) ? INVISIBILITY_MAXIMUM: 0 // hide if floor is intact - update_icon() + update_appearance(updates = ALL) /obj/structure/disposalconstruct/proc/get_disposal_dir() if(!is_pipe()) @@ -98,7 +98,7 @@ if(dir in GLOB.diagonals) // Fix RPD-induced diagonal turning setDir(turn(dir, 45)) pipe_type = initial(temp.flip_type) - update_icon() + update_appearance(updates = ALL) /obj/structure/disposalconstruct/proc/can_be_rotated(mob/user,rotation_type) if(anchored) @@ -151,7 +151,7 @@ density = initial(pipe_type.density) to_chat(user, span_notice("You attach the [pipename] to the underfloor.")) I.play_tool_sound(src, 100) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/structure/disposalconstruct/welder_act(mob/living/user, obj/item/I) diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm index ae918a84d964..26897f1a0474 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -67,11 +67,11 @@ to_chat(user, span_notice("The liquid feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.")) user.reagents.add_reagent(/datum/reagent/medicine/omnizine/godblood,10) //Hurts your brain and makes you go insane user.reagents.add_reagent(/datum/reagent/toxin/mindbreaker,10) //However, it gives rather potent healing. - update_icon() - addtimer(CALLBACK(src, PROC_REF(update_icon)), time_between_uses) + update_appearance(updates = ALL) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), time_between_uses) -/obj/structure/holyfountain/update_icon() +/obj/structure/holyfountain/update_appearance(updates = ALL) if(last_process + time_between_uses > world.time) icon_state = "fountain" else diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 45f8e8afc293..ba62f348480c 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -48,10 +48,10 @@ Note: Must be placed within 3 tiles of the R&D Console linked_console.updateUsrDialog() /obj/machinery/rnd/destructive_analyzer/proc/finish_loading() - update_icon() + update_appearance(updates = ALL) reset_busy() -/obj/machinery/rnd/destructive_analyzer/update_icon() +/obj/machinery/rnd/destructive_analyzer/update_appearance(updates = ALL) if(loaded_item) icon_state = "d_analyzer_l" else @@ -94,7 +94,7 @@ Note: Must be placed within 3 tiles of the R&D Console else qdel(thing) if (!innermode) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/machinery/rnd/destructive_analyzer/proc/user_try_decon_id(id, mob/user) @@ -150,5 +150,5 @@ Note: Must be placed within 3 tiles of the R&D Console return FALSE loaded_item.forceMove(get_turf(src)) loaded_item = null - update_icon() + update_appearance(updates = ALL) return TRUE diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 782688384e82..cee825c3fb62 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -564,12 +564,12 @@ addtimer(CALLBACK(src, PROC_REF(reset_exp)), resetTime) /obj/machinery/rnd/experimentor/proc/reset_exp() - update_icon() + update_appearance(updates = ALL) recentlyExperimented = FALSE if(autoexperiment) do_experiment() -/obj/machinery/rnd/experimentor/update_icon() +/obj/machinery/rnd/experimentor/update_appearance(updates = ALL) icon_state = "h_lathe" /obj/machinery/rnd/experimentor/proc/warn_admins(user, ReactionName) diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index bd2b417d7a99..47e1b920cbd9 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -38,7 +38,7 @@ busy = status busy_message = message busy_icon_state = working_icon - update_icon() + update_appearance(updates = ALL) /obj/machinery/nanite_chamber/proc/set_safety(threshold) if(!occupant) @@ -104,7 +104,7 @@ return SEND_SIGNAL(occupant, COMSIG_NANITE_DELETE) -/obj/machinery/nanite_chamber/update_icon() +/obj/machinery/nanite_chamber/update_appearance(updates = ALL) cut_overlays() if((stat & MAINT) || panel_open) @@ -188,7 +188,7 @@ /obj/machinery/nanite_chamber/attackby(obj/item/I, mob/user, params) if(!occupant && default_deconstruction_screwdriver(user, icon_state, icon_state, I))//sent icon_state is irrelevant... - update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed + update_appearance(updates = ALL)//..since we're updating the icon here, since the scanner can be unpowered when opened/closed return if(default_pry_open(I)) diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm index 234492e4c7c7..b278323e30cc 100644 --- a/code/modules/research/nanites/nanite_chamber_computer.dm +++ b/code/modules/research/nanites/nanite_chamber_computer.dm @@ -122,7 +122,7 @@ switch(action) if("toggle_lock") chamber.locked = !chamber.locked - chamber.update_icon() + chamber.update_appearance(updates = ALL) . = TRUE if("eject") eject(usr) diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index ad787af0069f..45f2ce12115a 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -33,7 +33,7 @@ if(allowed(user)) to_chat(user, span_notice("You unlock [src].")) locked = FALSE - update_icon() + update_appearance(updates = ALL) else to_chat(user, span_warning("Access denied.")) @@ -44,9 +44,9 @@ obj_flags |= EMAGGED if(locked) locked = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/nanite_remote/update_icon() +/obj/item/nanite_remote/update_appearance(updates = ALL) . = ..() cut_overlays() if(obj_flags & EMAGGED) @@ -166,7 +166,7 @@ if("lock") if(!(obj_flags & EMAGGED)) locked = TRUE - update_icon() + update_appearance(updates = ALL) . = TRUE diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 283eb1a895ed..5e1786ce8a90 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -30,7 +30,7 @@ /obj/machinery/public_nanite_chamber/proc/set_busy(status, working_icon) busy = status busy_icon_state = working_icon - update_icon() + update_appearance(updates = ALL) /obj/machinery/public_nanite_chamber/proc/inject_nanites(mob/living/attacker) if(stat & (NOPOWER|BROKEN)) @@ -60,7 +60,7 @@ log_combat(attacker, occupant, "injected", null, "with nanites via [src]") occupant.AddComponent(/datum/component/nanites, 75, cloud_id) -/obj/machinery/public_nanite_chamber/update_icon() +/obj/machinery/public_nanite_chamber/update_appearance(updates = ALL) cut_overlays() if((stat & MAINT) || panel_open) @@ -161,7 +161,7 @@ /obj/machinery/public_nanite_chamber/attackby(obj/item/I, mob/user, params) if(!occupant && default_deconstruction_screwdriver(user, icon_state, icon_state, I))//sent icon_state is irrelevant... - update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed + update_appearance(updates = ALL)//..since we're updating the icon here, since the scanner can be unpowered when opened/closed return if(default_pry_open(I)) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 0652ca2ddeda..d776911226e1 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -27,7 +27,7 @@ var/obj/item/circuitboard/machine/B = new /obj/item/circuitboard/machine/rdserver(null) B.apply_default_parts(src) current_temp = get_env_temp() - update_icon() + update_appearance(updates = ALL) /obj/machinery/rnd/server/Destroy() SSresearch.servers -= src @@ -39,7 +39,7 @@ tot_rating += SP.rating heat_gen /= max(1, tot_rating) -/obj/machinery/rnd/server/update_icon() +/obj/machinery/rnd/server/update_appearance(updates = ALL) if(panel_open) icon_state = "server_t" return @@ -53,7 +53,7 @@ /obj/machinery/rnd/server/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I) .=..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/rnd/server/power_change() . = ..() @@ -65,7 +65,7 @@ working = FALSE else working = TRUE - update_icon() + update_appearance(updates = ALL) /obj/machinery/rnd/server/emp_act() . = ..() diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index daf5b60f5879..5431b7d5f283 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -82,7 +82,7 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN) GLOB.security_level = level for(var/obj/machinery/firealarm/FA in GLOB.machines) if(is_station_level(FA.z)) - FA.update_icon() + FA.update_appearance(updates = ALL) if(level >= SEC_LEVEL_RED) for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index f4d45e3561c4..2e72ec11cf05 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -498,8 +498,9 @@ density = FALSE clockwork = TRUE //it'd look weird -/obj/machinery/computer/shuttle/pod/update_icon() - return +/obj/machinery/computer/shuttle/pod/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/computer/shuttle/pod/emag_act(mob/user) if(obj_flags & EMAGGED) diff --git a/code/modules/shuttle/manipulator.dm b/code/modules/shuttle/manipulator.dm index c82232e217a5..e5e7378b1139 100644 --- a/code/modules/shuttle/manipulator.dm +++ b/code/modules/shuttle/manipulator.dm @@ -12,11 +12,11 @@ density = TRUE -/obj/machinery/shuttle_manipulator/update_icon() +/obj/machinery/shuttle_manipulator/update_appearance(updates = ALL) cut_overlays() var/mutable_appearance/hologram_projection = mutable_appearance(icon, "hologram_on") hologram_projection.pixel_y = 22 var/mutable_appearance/hologram_ship = mutable_appearance(icon, "hologram_whiteship") hologram_ship.pixel_y = 27 add_overlay(hologram_projection) - add_overlay(hologram_ship) \ No newline at end of file + add_overlay(hologram_ship) diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 2faa462705f4..cda0542a9000 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -258,8 +258,8 @@ All ShuttleMove procs go here A.addMember(src) SSair.add_to_rebuild_queue(src) else - // atmosinit() calls update_icon(), so we don't need to call it - update_icon() + // atmosinit() calls update_appearance(updates = ALL), so we don't need to call it + update_appearance(updates = ALL) /obj/machinery/atmospherics/pipe/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) . = ..() diff --git a/code/modules/shuttle/shuttle_rotate.dm b/code/modules/shuttle/shuttle_rotate.dm index 61e43d69fb8c..1b2efe414a84 100644 --- a/code/modules/shuttle/shuttle_rotate.dm +++ b/code/modules/shuttle/shuttle_rotate.dm @@ -42,7 +42,7 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate /mob/dead/observer/shuttleRotate(rotation, params) . = ..() - update_icon() + update_appearance(updates = ALL) /************************************Structure rotate procs************************************/ @@ -59,7 +59,7 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate var/temp = d1 d1 = d2 d2 = temp - update_icon() + update_appearance(updates = ALL) //Fixes dpdir on shuttle rotation /obj/structure/disposalpipe/shuttleRotate(rotation, params) diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index 89e02920a732..63e513302fe2 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -29,7 +29,7 @@ obj/machinery/spaceship_navigation_beacon/emp_act() return ..() // update the icon_state -/obj/machinery/spaceship_navigation_beacon/update_icon() +/obj/machinery/spaceship_navigation_beacon/update_appearance(updates = ALL) if(powered()) icon_state = "core" else @@ -37,7 +37,7 @@ obj/machinery/spaceship_navigation_beacon/emp_act() /obj/machinery/spaceship_navigation_beacon/power_change() . = ..() - update_icon() + update_appearance(updates = ALL) /obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/multitool/I) if(panel_open) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 65f56f9b655b..abea24517e18 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -19,9 +19,9 @@ . = ..() if(prob(50)) desc = "Oh no, not again." - update_icon() + update_appearance(updates = ALL) -/obj/machinery/power/emitter/energycannon/magical/update_icon() +/obj/machinery/power/emitter/energycannon/magical/update_appearance(updates = ALL) if(active) icon_state = icon_state_on else @@ -39,7 +39,7 @@ visible_message("\ [src] closes its eyes.") active = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/emitter/energycannon/magical/attackby(obj/item/W, mob/user, params) return diff --git a/code/modules/spells/spell_types/self/disguise.dm b/code/modules/spells/spell_types/self/disguise.dm index 0ecf7549f6fb..419182904627 100644 --- a/code/modules/spells/spell_types/self/disguise.dm +++ b/code/modules/spells/spell_types/self/disguise.dm @@ -53,7 +53,7 @@ C.icon_state = target.icon_state C.cut_overlays() C.add_overlay(target.get_overlays_copy(list(HANDS_LAYER))) - C.update_inv_hands() + C.update_held_items() log_game("[C.name] has disguised as [target.name]!") is_disguised = TRUE addtimer(CALLBACK(src, PROC_REF(undocloak), C), (40 SECONDS + (spell_level * 3))) //Sets it up so this is unchanged on default level, and goes up per level invested. diff --git a/code/modules/spells/spell_types/self/summonitem.dm b/code/modules/spells/spell_types/self/summonitem.dm index 26d960eb4038..cb2b255c9e40 100644 --- a/code/modules/spells/spell_types/self/summonitem.dm +++ b/code/modules/spells/spell_types/self/summonitem.dm @@ -125,7 +125,7 @@ if(istype(retrieved_item, /obj/machinery/portable_atmospherics)) var/obj/machinery/portable_atmospherics/atmos_item = retrieved_item atmos_item.disconnect() - atmos_item.update_icon() + atmos_item.update_appearance(updates = ALL) // Otherwise bring the whole thing with us item_to_retrieve = retrieved_item diff --git a/code/modules/surgery/anesthesia_machine.dm b/code/modules/surgery/anesthesia_machine.dm index d4cdb85dae4e..f9427bc8b77f 100644 --- a/code/modules/surgery/anesthesia_machine.dm +++ b/code/modules/surgery/anesthesia_machine.dm @@ -20,9 +20,9 @@ if(is_roundstart) var/obj/item/tank/T = new /obj/item/tank/internals/anesthetic(src) attached_tank = T - update_icon() + update_appearance(updates = ALL) -/obj/machinery/anesthetic_machine/update_icon() +/obj/machinery/anesthetic_machine/update_appearance(updates = ALL) cut_overlays() if(mask_out) add_overlay("mask_off") @@ -44,7 +44,7 @@ I.forceMove(src) // Put new tank in, set it as attached tank visible_message("[user] inserts [I] into [src].") attached_tank = I - update_icon() + update_appearance(updates = ALL) return . = ..() @@ -54,7 +54,7 @@ attached_tank.forceMove(loc) to_chat(user, "You remove the [attached_tank].") attached_tank = null - update_icon() + update_appearance(updates = ALL) if(mask_out) retract_mask() @@ -67,7 +67,7 @@ else attached_mask.forceMove(src) mask_out = FALSE - update_icon() + update_appearance(updates = ALL) return TRUE return FALSE @@ -87,7 +87,7 @@ target.open_internals(attached_tank, TRUE) mask_out = TRUE START_PROCESSING(SSmachines, src) - update_icon() + update_appearance(updates = ALL) else to_chat(usr, "[mask_out ? "The machine is already in use!" : "The machine has no attached tank!"]") diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index cf7bb028dc80..2eb18eedd5f0 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -230,7 +230,7 @@ if(C.hud_used) var/atom/movable/screen/inventory/hand/R = C.hud_used.hand_slots["[held_index]"] if(R) - R.update_icon() + R.update_appearance(updates = ALL) if(C.gloves) C.dropItemToGround(C.gloves, TRUE) C.update_inv_gloves() //to remove the bloody hands overlay @@ -248,7 +248,7 @@ if(C.hud_used) var/atom/movable/screen/inventory/hand/L = C.hud_used.hand_slots["[held_index]"] if(L) - L.update_icon() + L.update_appearance(updates = ALL) if(C.gloves) C.dropItemToGround(C.gloves, TRUE) C.update_inv_gloves() //to remove the bloody hands overlay @@ -333,7 +333,7 @@ if(C.hud_used) var/atom/movable/screen/inventory/hand/hand = C.hud_used.hand_slots["[held_index]"] if(hand) - hand.update_icon() + hand.update_appearance(updates = ALL) C.update_inv_gloves() if(special) //non conventional limb attachment diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 199aeffaae44..dd3c9e99a433 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -124,7 +124,7 @@ if(owner.hud_used) var/atom/movable/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"] if(L) - L.update_icon() + L.update_appearance(updates = ALL) /obj/item/bodypart/l_arm/monkey icon = 'icons/mob/animal_parts.dmi' @@ -219,7 +219,7 @@ if(owner.hud_used) var/atom/movable/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"] if(R) - R.update_icon() + R.update_appearance(updates = ALL) /obj/item/bodypart/r_arm/monkey icon = 'icons/mob/animal_parts.dmi' diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index 502e94bb786b..402f01ffc6b1 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -68,7 +68,7 @@ return TRUE case.imp.implant(target, user) case.imp = null - case.update_icon() + case.update_appearance(updates = ALL) display_results(user, target, span_notice("You implant \the [I] into [target]'s [parse_zone(target_zone)]."), "[user] implants \the [I] into [target]'s [parse_zone(target_zone)]!", "[user] inserts something into [target]'s [parse_zone(target_zone)]!") @@ -92,7 +92,7 @@ if(case && !case.imp) case.imp = I I.forceMove(case) - case.update_icon() + case.update_appearance(updates = ALL) display_results(user, target, span_notice("You place [I] into [case]."), "[user] places [I] into [case]!", "[user] places it into [case]!") diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index dad5d62f72ca..d12c63c94703 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -10,7 +10,7 @@ now_fixed = span_info("The pain in your abdomen has subsided.") var/inflamed -/obj/item/organ/appendix/update_icon() +/obj/item/organ/appendix/update_appearance(updates = ALL) if(inflamed) icon_state = "appendixinflamed" name = "inflamed appendix" @@ -30,7 +30,7 @@ for(var/datum/disease/appendicitis/A in M.diseases) A.cure() inflamed = TRUE - update_icon() + update_appearance(updates = ALL) ..() /obj/item/organ/appendix/Insert(mob/living/carbon/M, special = 0) @@ -64,7 +64,7 @@ inflamed = FALSE M.emote("chuckle") //you really think that will stop me? -/obj/item/organ/appendix/cybernetic/update_icon() +/obj/item/organ/appendix/cybernetic/update_appearance(updates = ALL) icon_state = "implant-filter" name = "cybernetic appendix" diff --git a/code/modules/surgery/organs/augment_legs.dm b/code/modules/surgery/organs/augment_legs.dm index 9d48dceb8e6d..04bd05335058 100644 --- a/code/modules/surgery/organs/augment_legs.dm +++ b/code/modules/surgery/organs/augment_legs.dm @@ -11,7 +11,7 @@ /obj/item/organ/cyberimp/leg/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) SetSlotFromZone() /obj/item/organ/cyberimp/leg/emp_act(severity) @@ -59,7 +59,7 @@ else CRASH("Invalid zone for [type]") -/obj/item/organ/cyberimp/leg/update_icon() +/obj/item/organ/cyberimp/leg/update_appearance(updates = ALL) if(zone == BODY_ZONE_R_LEG) transform = null else // Mirroring the icon @@ -81,7 +81,7 @@ zone = BODY_ZONE_R_LEG SetSlotFromZone() to_chat(user, span_notice("You modify [src] to be installed on the [zone == BODY_ZONE_R_LEG ? "right" : "left"] leg.")) - update_icon() + update_appearance(updates = ALL) /obj/item/organ/cyberimp/leg/emp_act(severity) . = ..() diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index ecbeaa0f80f2..fedbe3b65b6f 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -18,7 +18,7 @@ if(ispath(holder)) holder = new holder(src) - update_icon() + update_appearance(updates = ALL) SetSlotFromZone() items_list = contents.Copy() @@ -31,7 +31,7 @@ else CRASH("Invalid zone for [type]") -/obj/item/organ/cyberimp/arm/update_icon() +/obj/item/organ/cyberimp/arm/update_appearance(updates = ALL) if(zone == BODY_ZONE_R_ARM) transform = null else // Mirroring the icon @@ -52,7 +52,7 @@ zone = BODY_ZONE_R_ARM SetSlotFromZone() to_chat(user, span_notice("You modify [src] to be installed on the [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.")) - update_icon() + update_appearance(updates = ALL) /obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/M, special = 0) Retract() @@ -323,7 +323,7 @@ tool_behaviour = active_tool.tool_behaviour lefthand_file = active_tool.lefthand_file righthand_file = active_tool.righthand_file - linkedarm.owner.update_inv_hands() + linkedarm.owner.update_held_items() plane = 22 /obj/item/toolset_handler/attack_self(mob/user) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 9d9eca03c0c8..8b6d5d9d9400 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -162,9 +162,9 @@ if(!silent) to_chat(owner, span_notice("You turn your thrusters set off.")) on = FALSE - update_icon() + update_appearance(updates = ALL) -/obj/item/organ/cyberimp/chest/thrusters/update_icon() +/obj/item/organ/cyberimp/chest/thrusters/update_appearance(updates = ALL) if(on) icon_state = "imp_jetpack-on" else @@ -266,9 +266,9 @@ on = !on if(!silent) to_chat(owner, span_notice("You turn your spinal implant [on? "on" : "off"].")) - update_icon() + update_appearance(updates = ALL) -/obj/item/organ/cyberimp/chest/spinalspeed/update_icon() +/obj/item/organ/cyberimp/chest/spinalspeed/update_appearance(updates = ALL) if(on) icon_state = "imp_spinal-on" else diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index dcbadbc1700e..cb4aabc4d12e 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -41,7 +41,7 @@ if(user.getorganslot(bastard.slot)) //NEVERMIND WE ARE NOT BALLING bastard.zone = original_zone //MISSION ABORT bastard.SetSlotFromZone() - bastard.update_icon() + bastard.update_appearance(updates = ALL) storedorgan.Insert(user)//insert stored organ into the user user.visible_message(span_notice("[user] presses a button on [src], and you hear a short mechanical noise."), span_notice("You feel a sharp sting as [src] plunges into your body.")) playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, 1) @@ -145,7 +145,7 @@ implant.zone = BODY_ZONE_R_ARM to_chat(user, span_notice("You change the autosurgeon to target the right arm.")) implant.SetSlotFromZone() - implant.update_icon() //If for whatever reason, the implant is removed from the autosurgeon after it's switched + implant.update_appearance(updates = ALL) //If for whatever reason, the implant is removed from the autosurgeon after it's switched /obj/item/autosurgeon/arm/syndicate/syndie_mantis uses = 1 @@ -322,7 +322,7 @@ if(user.getorganslot(bastard.slot)) //NEVERMIND WE ARE NOT BALLING bastard.zone = original_zone //MISSION ABORT bastard.SetSlotFromZone() - bastard.update_icon() + bastard.update_appearance(updates = ALL) toimplant.Insert(user)//insert stored organ into the user user.visible_message(span_notice("[user] presses a button on [src], and you hear a short mechanical noise."), span_notice("You feel a sharp sting as [src] plunges into your body.")) playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, 1) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 27cd00138ffa..1fbdf2a018a2 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -28,9 +28,9 @@ /obj/item/organ/heart/Initialize() . = ..() icon_base = icon_state - update_icon() + update_appearance(updates = ALL) -/obj/item/organ/heart/update_icon() +/obj/item/organ/heart/update_appearance(updates = ALL) if(beating) icon_state = "[icon_base]-on" else @@ -55,12 +55,12 @@ /obj/item/organ/heart/proc/Stop() beating = 0 - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/organ/heart/proc/Restart() beating = 1 - update_icon() + update_appearance(updates = ALL) return TRUE /obj/item/organ/heart/prepare_eat() diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 91e72a6a0c5e..a75b564dadb2 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -39,7 +39,7 @@ . = ..() languages_possible = languages_possible_base -/obj/item/organ/tongue/update_icon() +/obj/item/organ/tongue/update_appearance(updates = ALL) . = ..() if(honked) // This tongue has a bike horn inside of it. Let's draw it add_overlay("honked") @@ -75,7 +75,7 @@ /obj/item/organ/tongue/Initialize() // this only exists to make sure the spawned tongue has a horn inside of it visually . = ..() - update_icon() + update_appearance(updates = ALL) /obj/item/organ/tongue/examine(mob/user) . = ..() diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm index ee690b5b5806..7c2c86a77aa6 100644 --- a/code/modules/vehicles/motorized_wheelchair.dm +++ b/code/modules/vehicles/motorized_wheelchair.dm @@ -33,7 +33,7 @@ var/mob/living/L = A L.update_mobility() if(power_cell) - power_cell.update_icon() + power_cell.update_appearance(updates = ALL) refresh_parts() /obj/vehicle/ridden/wheelchair/motorized/obj_destruction(damage_flag) @@ -75,7 +75,7 @@ /obj/vehicle/ridden/wheelchair/motorized/attack_hand(mob/living/user) if(power_cell && panel_open) - power_cell.update_icon() + power_cell.update_appearance(updates = ALL) user.put_in_hands(power_cell) to_chat(user, span_notice("You remove the [power_cell] from [src].")) power_cell = null diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index e174ffc33cb4..f212c2b3cf34 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -9,7 +9,7 @@ /obj/vehicle/ridden/janicart/Initialize(mapload) . = ..() - update_icon() + update_appearance(updates = ALL) var/datum/component/riding/D = LoadComponent(/datum/component/riding) D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 7), TEXT_EAST = list(-12, 7), TEXT_WEST = list( 12, 7))) @@ -42,7 +42,7 @@ return to_chat(user, span_notice("You hook the trashbag onto [src].")) mybag = I - update_icon() + update_appearance(updates = ALL) else if(istype(I, /obj/item/janiupgrade)) if(floorbuffer) to_chat(user, span_warning("[src] already has a floor buffer!")) @@ -51,11 +51,11 @@ qdel(I) to_chat(user, span_notice("You upgrade [src] with the floor buffer.")) AddElement(/datum/element/cleaning) - update_icon() + update_appearance(updates = ALL) else return ..() -/obj/vehicle/ridden/janicart/update_icon() +/obj/vehicle/ridden/janicart/update_appearance(updates = ALL) cut_overlays() if(mybag) add_overlay("cart_garbage") @@ -70,7 +70,7 @@ mybag.forceMove(get_turf(user)) user.put_in_hands(mybag) mybag = null - update_icon() + update_appearance(updates = ALL) /obj/vehicle/ridden/janicart/upgraded floorbuffer = TRUE diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 2bb93b08e363..db759839aa13 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -265,7 +265,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C else ..() -/obj/machinery/vending/update_icon() +/obj/machinery/vending/update_appearance(updates = ALL) if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else @@ -973,7 +973,7 @@ GLOBAL_LIST_EMPTY(vending_products) else stat |= NOPOWER - update_icon() + update_appearance(updates = ALL) //Somebody cut an important wire and now we're following a new definition of "pitch." /** diff --git a/icons/obj/doors/doorfire.dmi b/icons/obj/doors/doorfire.dmi index 3b9f05cfa32116b59b224b7e8f243728647e922c..34c19dbb56ed349bf1f614339ed8c61450e2b907 100644 GIT binary patch literal 10590 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 EKesqCkN^Mx literal 7717 zcmb7pWmHsA|Lz&OOF%jVq`O0gP6cTM2?1%44jG0)Q4x@kl5$Xy4v~%lludBddGArI{)6~bO z{(;gwBqY2ki27`{0hn}2IX+0zEzd`1ekZi71cA269ut^6Si9v$7hLlK#`|1#L}t7; zm2bQpqrNRHkhr>4Q$4+YB}?$Y9a`CzpTTi^_Jf0qTMq3laK=UTP*V4jHHmhfrhPgV zB(Gcp-cXPm2LN^keJyqKu-v`8$RP8Lyx#V+r~9ogC@D=kI!Qd6Y#vj=#`MYxyE`TI zv!fK|WshL?cR<9|^fVvbksDbgSWGv$n8}pm&0} z8jJ=%-0l6)Tusz`Q|LYhA)OTguMTWS4)w1a?H^~kZ8o)Iu1F_mXAOX59!@mL^N5J* z=i};)S^U&uKVJ}%A8zJ6D=oxe2iB!4Dk`){tIC}Gma}FmJ2D?j!#X3GTm4W@(>aIe z^g*}EmVKqqucFGEXVc{m2hJ5Ta6Jggnak(eXvi5w0Kg6z36(XC;mYYR-lRsU6i#{= zz8+s92yb(|3Q~H<+T7fs_l`I9kN>pA*47RluzNKW0NHNx1v(Pz<-(g$O=;{tJ|w7C zZusw?nesaRA>Z>yr~NbJb;d6#zB#U7tPxvWABQX=;8nsAk2ONQbvWrN>5=Z?~6#(&+lYWEAQ@y+*II&+C? zcW%4<40@KK2B3s=TXwPp!D(x(6%)B#Wmou%R$M+hogP{=1OP7;ht@jwctZ{cb}(nE z{(X*nr5EhL&l=aa2Xzg%SLPEFr|RVj;R$ndfX)gaLD3gjkb=DK%6t655Z9yCZkMnyrg3-rL0#QI;yc|YB6|n{Fu{h*7ohPky>S<&6qMc^cPWR`ON_ivJ;xT`N#WY&R>L_5(J80*> zyCtoh_J1j}OkuUPrQhW>5;brtjn-a5{yc|ALC7mkEQH#y{q+qEJcx*f{g;zEio;vs zaWr$3i>Id{yE8SqvU@XL)GO#ryk$i-$LNA&jaY&X*Jv49dBV4v&{*U#elno~H(@kk z7?oa)pi0CZH)Q8FvgEw_9YLgRk-y+)T##sVzE$hLs47>Byfqo?!~3DpcA>KCU?!06 zI;iupMBbxnJnpY7F|$HnhNmAqcwT899dgP|wQYniGfCYtz?%A@pg~(}@h^Fq`UaAKRs9GkEi8(k zxsM^l@~)#I-Dxr-tvklA$zjfbr5U09YL*c3&+Dv}!u)j10-3ym6LjZwe8&{5S4Yu2uaEV8Y+iY_ z(TJSMG2wNwj5>Nsy*{b|-M>%LSBTd~moK!NAkJ>+f=@8+PB(2K*v0bZM=niK;P7p{ zhX?OOyXe@|sR0bxdhN9iLu`NbRqSLTL|!=gR$I!et^E~~tc+Yzw!swn+Oh}SY-&ujBC}JmSF*j1meFL}?e%z~xMCOhahZ)hs?N=SBOo8xCxF zsPz%~VJjqdSj!|-e{g*uh0(%hK%hr>F67HK6c2CFa{)A;LFT%oiS6mHX|lSuJTAFB zp(`3)pNsrPD)pzVrn&E|TYZ(@iDF?IAV@9&^@P6Tx<%=9{;El#aE2iH-1d!SYVZ;N z1LBE4c3y91G$j63))j2FfMxPR|BiW1ICX|9+q9_w%F4>s^RAop+=-_FdlNG=B{}s0 z2i?|IXL6>GxY7xw`eBe=I!qYx90oFBLj%r_z%SiI;o{%WkG$hy-R;w z=pLy@S{5W<)ik}Fc%-hTLfb)OicPQ7E{=+PE9Njo&6W#Yilt=Mwc z2aUte7CP@7TET}~%8vh-TD&SYT5*-PMB&7+L*V7o=^qDv)3_aeK9!E*kJt5Y@B>xi zUVAWZEBTMP#9IGIE{icj69Aehd>Wd$oZNMZFqJrR37@_yWoE4m`F7K=!b?s?rMTu& zE*PnqDvMdA<#KcCFRXu~ZFC)kkw%>AG2*95y8+_{VG3OoBwI5M*e*Zsqk$!_3Ul>S zI+Y;kX_;NI*)fyxb#X~u5^F7X(R=5rTYtg4jtVUxPtlpD(A2>1 z)nzpk#BxB9u=Zj`r{ON+8J`x=DlI`Jmq&!xLtJY7%cbiq(`aqa?2d!6@W<;@!4!D) zGJX)oSehR*=ykudv7`58=3oQ@QG^(sLDNDn%Ki|$z zTmzzx>&dYcqd8Qc0=C*Mm^9SlieVJo67A1TMne&JUbD#__?HC78StMOBhLY~J1HHV z4vf!e5Xkmpe&h7X_9Jtq6uql0bVIwJj=UY_43IcT7jd%KkzYO5R-KU_oF>C|trzft zCpY%>SNMB+%puc$QI5|DQew|PA+D8=G={>hrU$Epi{$M&Od|VU-6#HMwQ&JSY5z34 zKqk^gEZla~`n9yfrmcLlF?a?p3CUQFM$oomYxE^VUM5wMZf6`0R+<|d^U|F!?X8x` z)ofeM(`C+CFF{$Vg@~@N-o%@GlEB4L3zZ#bmG`Yt{cVr>P_6oeVydQuuBwqb-B$f? z3*^WBQebm!on=aAV@m#ONA(A>hVHy{>bTj~w@m7B>TfF{_V#P{4}Lemd&>0~=T2D% z{UJ~&x8E1Mr534`*n?l5AG}z{j+lAw*{0|UiSRHy<9{vzcTj|M+I^hJI}i|4Z4Wqa z;~Ya~7IBUZQHSo0->d>yq``TZ(67u(A1V{(LSM}sfi9pLRp(0J{NDjAqDy-%6RMP#?BNEg z6=^x}F=18etxG@O#SfxS1LQ!7v7>d6hJ*OJwFp|}wz=0+0V{uXK3J8h)ig#r>{cdH z$x{WU^CoO^Z-~z%6-T`KCG?P4y#B|4WcrrwI;fvI^Lnw>nsDbbXfZJ-VBHYfwO!)4 zm_$-6_Cl~L`NG_m)tV@Fod{mXX|fO{Pf?+BX@v$Qb>FJ2!i)NL8sBV@|NbCk7aJyn zuDy(P^`E2`G`6_der!jmbhy@(Eww2>0PW(EO4!n+Xvh`6pjG5Bd&NfNtOa&D*Cd~U zcIlIYKi~bTN>P;XiSrO!2%Yy|ifU>WyZCYGz-tL@HrSjz<(W9t9Eex<=22hj3Mx@` zo797<_z2})@7BFZb~XFXnR3gNgfPq>2|^F6^S_>=8AWn}7RQo`A4Ej7_}Y|ER9K2I z_F-09VkV?MSqYQdE7mQdnZbB z06#f{a|9XxX;0U@#}Hhg0tinVTZuttp<06W814;_-v7IE!N!|3>P{xbwfVR#c;$Pv z@R_|xv%fbs*2rmBH>M}4I5DNhBu8Uj!qVjX6jV+8AFmv4q8pj7ILE(yxBzK~=Co8F zPg+R9>p928e9yTpplU_X*4@pyx8t4ttszjQ2D6cyL5Mr=5C_?f@AS&xn4Cg`5XmmA zUmxEv@jvB-D|te-K0j4u@JA`>y4umS10A91q~c@zw#@QCi}w{LogQf4Yj}bYYujA) zU$77O({D%~=i$e1Epfl}Tu5-}3%9NB--YFI9#}aDHkJ`~CmPQgZ^^=2u&6=#duRMq znIDy74M&Z+Bg%=6+-XW`uj1uej63vWfUzhi3b?goF{*PoTbA4ay2+KKSi&;JM?j!J z1xnPEVbX%F0Zyav+>wDOPD&z^R7%)dc#Ic;OXB_I9cs!)DCA=lbx!<#!OJ0bbpKu9 zD{|uK%qY3HDNh(H97uTb|F~Z42Rq01bZy&EuN=}iD@FEay7lk5U&hp;Uqd^>->4QS zF_^`fzamW(fy|}A6O~n{Pk0Jkasah`Dg=3w!m7hX`fU;JZr_*tQ4m5j*EuO-9RpQ^ z8>b&&K#{5zZ3o2v&>P#tK|Ds6K^v>cFB|+K#NaQ?4xSNbZW(KaqrtYQuX<;M$|(Ga z)5-DE{$uwuTrX+m}Uj%wyYzPYtj+y!nIj4I3bT7k5&FHJuHC><(cqxKObqwVy`mqGg6 zuV_eN!wW;XwyestL?lNLD6siB)CRmz1oi*8Gu$gj_s{2KWK`b2;d%4uZM5$*yz-V~ z&(G_}utnp{|06E}1woqyoxygv1f+Ozr;Uvy84E!N_NY1xhhhX^@5M7EW}!;6P*u3` z8*ys2|Iho5^a$~u=H>>U%OInD1L@OAK3S+zU7X{&I+3JvdvL$=CXWA+O?XL`Mt|ld z?CDBTnIqV->Ci6I?5PO$zwoMpWBnVw3dd04IAB@`&ijoOr)ckB*1vzqf>V(VfA|F7 zCs{|9iGw)8hn&Gn#A)DEi+uL>*{6yOsU#)mrP31{yG3Pb56`4sxduyW1-od6@1_Q@ z9%%vd5){PWaI{iEm23oWtNMV~T5m6;n<3sxP6wrPeq+N1)tZVyHD;kYJa6D>SxTRE z6B9SZq=t2o#07grfyx{EH*q%<)D&TAJ@^|9^1y7nW6{0*;6ohvx0)YLs|vs|y&gku@5 z5%<|QsegT1(Rz~k>5+D`)H&ic?GRE&1OwmBuD}>;e~tYIk87+48RGN>`J<2W{#v&= z`)P+E7YPVXT>K~2!;|W77Q%SNw8U?@W!$2Jh95%_`@9J{qv19-TKSqdFY(YWGVJAL$u%k!LzKun022q5c%6@o~PsjHJ3?5%XrAh%>J7xhlsG;_?qhs95B=C zk9Fs?gsfH_?RZtKzJEG+xWno21G_n6JugMvIVtFUd5X_F7(jD+kcj~^+QUly2-ci0 zQdtY%AQtMKXVBa37o_lT=kl#GI&=IWf)4$)_L{%o3h(*a{&Bf&q^~t4a1PmbtCl>$ z7cvvlEVLNtH$Ha?ZK%^I?ZXbEHZ~M@1YQ#+T>9B)y7nHA=Eylc?cLehkt(+th`Q~$ z!9N9cc4cTB`*XCA_}-y^Je{zLGRtUHoA6YVKe3Hjo+2y6f6ipLNaZKqdrqU={95a~ zH`Z7zf8vJtL$BVQJ&Q}KV#=%mfw^Cp?JnfY<8HZfp>J}^bF+YYM=<8Jr0~Gq%ZyU> z##Xa3K?y4gftPX4*8^D-V4qoP4;yw{eGFkgK<3?jwidbW1NjQ~^-Byx*d`-`%fvQh zT96Z(Py1?*CY$V|E6zCzA5(XRvH#bcvOet;y>b!tj2ZLaPy6>8i><@qWBa`VXt+s&c=px?g+uoboq z6RIZ(Q*1U;N=|6 z&CRh#xl6yxEDuQ9B{siUna^;sMQ_hv%Mw z7@RkkxT+T`|8H$tUM5Tq_{%zUZSmswZTzuB6(Aj|Adh1J8x+FuXT(^bhC=8Yb30o= zuTMjYwMu0((=sco+yESTdT>uG*Ph~VlvS?pcp|A|-Q4&yls&^Yw|95{#hPEGT;jSIm8+R(5vW6D zrl(@3yPOX7Q-qRbmYTLnT-`nwSH-R7+NIV*o5RHe+__tQ4;iw{xr%4qxmCne7u|=? z1Z<#ux*Nph%FF~e2`QH{*e*jJtZhLiuWy&GxHKq$PG@86L$6rI?khA1Cl45B#^a=M z`MG^hJC{X5<$R;Bu8`EL3)1vshSj>`H6L@RT6W60x6->%qMiryyxka5K6%oCDP!vr z6Evv8R7m;#qgrTl=;Om%HWs0?(4PkHMyT~phXd;H?nx?o;Pk~l|NP4Sf|o0_?WU>m zCK+=<_Tn@L_U`;W2hZtigM<<4tq{WI(5F8qjCJRX&xhHWtwOuomwr4=!`ePWoZwrL zxdmt^%HcE<@u|+^5;a`^6@&fdny_{AIvoW&IB{j0ULo<-41?lq{2d5xPlq;9s#UFF zK!V5Z7t>WcWU!oZG2q_4d*)!@CF-r?5}ifTqb_O%)kMDE6plYMi2l}#o9_{vLzJ*Z zaA>wKp@L~R?i?DFE?Admz|4=63kQ^NR~+2Xx(_TLWwWmGEX*Pm4! zH0)e!HPgrt#A=mw9T{-=0%SN?#4tl${BKQ=(rkc!otWM()w-FiQAMm?F?~+&*TvEN zYHAK>vkj7Cf1EDpraIim@DQ~odo|~*)axJ#?YOJPm@mt&_=3M6Tv;hLg>#hh>SQnY z+!pt5uPsf;;PU#ICrRzOZ*LJpXN84wFWjQ`SasGvn|{__5N+RZl-Y46Re3-bd_bf6 zkTaI^8IM(m1~yFk1fQiEho@=3{aEAh6n+CXZW7Zo5*AI z;;~1M88|=n9LGr&&y6NjfjeYDHNpXq)E`vUsfMp~5`jxYWfsp}cO diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi index f5c8325c1721b4f8f32c0fda5b66904db75f39b6..7f817d663dd5cd0884671fbb78908d68095357cd 100644 GIT binary patch delta 28541 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 delta 28302 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 delta 1863 zcmV-N2e|m!ngiXM1CS&E)sZE)fBh$LqRk7bw{bvctV8Z)>;@bb8cd9Iil>!sFe6Q*pyK*!O9sVy34>rm%ThWcv0vlcrWrfzHap;egHpc5sk z62s&lKL_03a+51i+8MB@fAVz~@J(?E)gaf=P{_B&C4)`t{Iz9;sw9?Rc+T}!of!Dh zG9NL$X1^mCXCuiwGC3xb6EZm^lQS|oCzA^@Is8CI|A2BshX36mDl+}2P!$>eSR$Dn zF}-Gw0vfG2DF8%voWM>J*l7YgOJL^->>`2P$AJhR0zt%&ks$Jie^3zdJ{ClJ#Ppi2 zTHr{E1&JJ!$qAX9lF1pFoRi4~ncN3~gdSo*f{!5}(T50-;64B(cEt3W{UW=9RQ(ii zOa&)Ya7qPdRB%oO7gTUx_7w6^^%VA4^c46|^Axr(`Dpa4yHR`?3;3s@E`YmOU>plf z!rCpnQ(TnbFrpWHe`CU1!8azj6MRExjo^`w?E|C0J1RJ)f)gq@rGhgmIH!UODtOla zMUfZnUle=U{YAkS&0iFI-uuN@{PFELzUFD@n2t{9=#-Am=;)k|F6ih*%SXxpjeg(o zk#azzFWbHNEc7qR@kyY7V=6eIf>SCuqk?lPxS)b(T^_0Oe<|!`k4LI{3VYt+#aI0P zJvqMM3EY^-O^Do-$jyk{oX9PR+-YM+Ds%#R(bkd5oPeG+brIxAmlD#_o$LJ_-MQZ1 z(4Fi3{oJ|U-_EISgICvLM}yPl?st&j(m$ZRw$%DcpLlYR$?fC~Y=jaGI@JEH4|*%Z z7CS2=)@u>Ce~@Z7DA9#3yV_d#cPlu(%U@CHU}4_bfbAzv@A5`>)_;~|<3Bc7E3AWn zjV$0AZM~`jj6=l(wy+f1_;)cB+JO?+c4(YlE3^)Te;TI*Q)!1~?NVzTMASz zNQtFhuSFSfy>_R#@DJXLFk0#=EP!Y>{t*Pj1Ll>TfuNe}b$NTu^W>{_bbGQdRSM;Q z&Pt&wfB*ZB6sq#S^+=(rfOj3Gw?Vs5OR#w%q1@zaDcUyR8?pqOZ)@Q&nBZ7$@)B%+ zoZxBh5^R5a<#BsF3N6G(G7gZg$W0+&P$vdSZ#-md@VvV3vI(*?V zT~-^>CR#ii*s|xXrrZ1nrPSM$MD-2{nd%)9Qq?;of%Ld5n4 ze+dcO8zcm5Z;+6$y+Lxk_BLth+IysjYl%E1T1(_9!CE3uiPaK$N~o5|QzErQo)V}f z@{~9&k*9=di997rOXMj*S|U%6(Gq!Lh?dCz4-xt%WN-6HcP7oJ1jC6A`*t;CvFM=m zPnaB({z;RA(!VrxQ2G~zOkW}T1&xF&f4%bbZE|UR_+QA|@!-bbRw#aD&@Mk2z5C?u z-6!LBpG@9;GCiN%3;kEmCRBJi8?Y5W^x8i`Vaxn+n6Xu(HyFc=GWGz@No=4(_R%!j z#Nc-sTVmTu8+Fie#-5-OC3_Oq3K_*tGWIAe6cX7pmbKDSSGyR4X~tG9O39uLf3z{+ zEMuRvDRB!@#&GkDeKaK~WWOUsk&BG2oNn2(Xky0b%kXfCzkuO3h8$&V)isS)>;W-~ zyvx|XwA?k?v~>(O&e$_r3G6|Fbur{5V@u81CvBP-Y?`sB&Vh>>(OJem34=x4t^YF5 z*wc3{m52$|mqo@_jfgtIufvS3e`;v4tU*;#!pzIz~i?z;zqr@woB*bMmbY(idGPQ?CqG?o*w|Fz{r z?0<8qpuv12{0nvkSS&!w0;04z*Xrsz%FpcAzaH7+)91l|0goUd|7xIswzK~STg6c( BqmTdq diff --git a/tgui/docs/tutorial-and-examples.md b/tgui/docs/tutorial-and-examples.md index 3dba803c959a..b88c157cf84a 100644 --- a/tgui/docs/tutorial-and-examples.md +++ b/tgui/docs/tutorial-and-examples.md @@ -84,7 +84,7 @@ input. The input's `action` and `params` are passed to the proc. return FALSE color = new_color . = TRUE - update_icon() + update_appearance(updates = ALL) ``` The `..()` (parent call) is very important here, as it is how we check that the @@ -312,7 +312,7 @@ upon code review): // A demo of proper input sanitation. var = CLAMP(newvar, min_val, max_val) . = TRUE - update_icon() // Not applicable to all objects. + update_appearance(updates = ALL) // Not applicable to all objects. ``` And the template: diff --git a/yogstation.dme b/yogstation.dme index 3e643d0be2b1..6cf95d72ace2 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -640,6 +640,7 @@ #include "code\datums\elements\earhealing.dm" #include "code\datums\elements\firestacker.dm" #include "code\datums\elements\squish.dm" +#include "code\datums\elements\update_icon_blocker.dm" #include "code\datums\helper_datums\events.dm" #include "code\datums\helper_datums\getrev.dm" #include "code\datums\helper_datums\icon_snapshot.dm" diff --git a/yogstation/code/_globalvars/lists/maintenance_loot.dm b/yogstation/code/_globalvars/lists/maintenance_loot.dm index 3267bbec6c9d..c595ab948052 100644 --- a/yogstation/code/_globalvars/lists/maintenance_loot.dm +++ b/yogstation/code/_globalvars/lists/maintenance_loot.dm @@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(maintenance_loot_traditional,list( /obj/item/instrument/violin = W_RARE, /obj/item/kitchen/fork = W_UNCOMMON, /obj/item/laser_pointer = W_UNCOMMON, - /obj/item/latexballon = W_UNCOMMON, + /obj/item/latexballoon = W_UNCOMMON, /obj/item/lighter = W_RARE, /obj/item/lighter/greyscale = W_UNCOMMON, /obj/item/lipstick/random = W_UNCOMMON, diff --git a/yogstation/code/controllers/subsystem/bluespace_locker.dm b/yogstation/code/controllers/subsystem/bluespace_locker.dm index e54b407ef0c0..66b8f89d3920 100644 --- a/yogstation/code/controllers/subsystem/bluespace_locker.dm +++ b/yogstation/code/controllers/subsystem/bluespace_locker.dm @@ -65,8 +65,8 @@ SUBSYSTEM_DEF(bluespace_locker) internal_locker.contents += external_locker.contents internal_locker.open() internal_locker.dump_contents() - internal_locker.update_icon() - external_locker.update_icon() + internal_locker.update_appearance(updates = ALL) + external_locker.update_appearance(updates = ALL) /datum/controller/subsystem/bluespace_locker/proc/redistribute_locker() if(!internal_locker) diff --git a/yogstation/code/controllers/subsystem/yogs.dm b/yogstation/code/controllers/subsystem/yogs.dm index acae9bc7c77b..479bd18d2cfd 100644 --- a/yogstation/code/controllers/subsystem/yogs.dm +++ b/yogstation/code/controllers/subsystem/yogs.dm @@ -125,7 +125,7 @@ SUBSYSTEM_DEF(Yogs) for(var/datum/department_goal/d in listOfGoals[account]) P.info += d.get_name() P.info += "
    " - P.update_icon() + P.update_appearance(updates = ALL) else var/obj/item/paper/P = new /obj/item/paper(C.loc) @@ -135,7 +135,7 @@ SUBSYSTEM_DEF(Yogs) if(d.account == account) P.info += d.get_name() P.info += "" - P.update_icon() + P.update_appearance(updates = ALL) for(var/path in subtypesof(/datum/corporation)) diff --git a/yogstation/code/game/gamemodes/gangs/dominator.dm b/yogstation/code/game/gamemodes/gangs/dominator.dm index 2cfd70c1fbac..dc6aa2e29e2f 100644 --- a/yogstation/code/game/gamemodes/gangs/dominator.dm +++ b/yogstation/code/game/gamemodes/gangs/dominator.dm @@ -28,7 +28,7 @@ spark_system = new spark_system.set_up(5, TRUE, src) countdown = new(src) - update_icon() + update_appearance(updates = ALL) .=..() /obj/machinery/dominator/Destroy() @@ -54,7 +54,7 @@ /obj/machinery/dominator/tesla_act() qdel(src) -/obj/machinery/dominator/update_icon() +/obj/machinery/dominator/update_appearance(updates = ALL) cut_overlays() if(!(stat & BROKEN)) icon_state = "dominator-active" @@ -137,7 +137,7 @@ spark_system.start() else if(!(stat & BROKEN)) spark_system.start() - update_icon() + update_appearance(updates = ALL) /obj/machinery/dominator/obj_break(damage_flag) @@ -196,7 +196,7 @@ SSshuttle.registerHostileEnvironment(src) name = "[gang.name] Gang [name]" operating = TRUE - update_icon() + update_appearance(updates = ALL) countdown.color = gang.color countdown.start() @@ -244,7 +244,7 @@ set_light(0) operating = FALSE stat |= BROKEN - update_icon() + update_appearance(updates = ALL) STOP_PROCESSING(SSmachines, src) if(nukedisk) nukedisk.forceMove(drop_location()) diff --git a/yogstation/code/game/gamemodes/gangs/gangtool.dm b/yogstation/code/game/gamemodes/gangs/gangtool.dm index 27d1c9e5dfc6..57621f73a825 100644 --- a/yogstation/code/game/gamemodes/gangs/gangtool.dm +++ b/yogstation/code/game/gamemodes/gangs/gangtool.dm @@ -21,7 +21,7 @@ var/list/tags = list() /obj/item/gangtool/Initialize() - update_icon() + update_appearance(updates = ALL) if(buyable_items.len) return ..() for(var/i in subtypesof(/datum/gang_item)) @@ -138,7 +138,7 @@ recall(usr) attack_self(usr) -/obj/item/gangtool/update_icon() +/obj/item/gangtool/update_appearance(updates = ALL) overlays.Cut() var/image/I = new(icon, "[icon_state]-overlay") if(gang) @@ -174,7 +174,7 @@ if(G) gang = G.gang gang.gangtools += src - update_icon() + update_appearance(updates = ALL) if(!(user.mind in gang.leaders) && promotable) G.promote() free_pen = TRUE diff --git a/yogstation/code/game/mecha/makeshift/lockermech.dm b/yogstation/code/game/mecha/makeshift/lockermech.dm index 2bd3abe045a4..0c16252b0e45 100644 --- a/yogstation/code/game/mecha/makeshift/lockermech.dm +++ b/yogstation/code/game/mecha/makeshift/lockermech.dm @@ -26,11 +26,11 @@ /obj/mecha/working/makeshift/go_out() ..() - update_icon() + update_appearance(updates = ALL) /obj/mecha/working/makeshift/moved_inside(mob/living/carbon/human/H) ..() - update_icon() + update_appearance(updates = ALL) /obj/mecha/working/makeshift/Exit(atom/movable/O) diff --git a/yogstation/code/game/objects/items/brace.dm b/yogstation/code/game/objects/items/brace.dm index b8ec8cbadaa4..ecfd8bf60124 100644 --- a/yogstation/code/game/objects/items/brace.dm +++ b/yogstation/code/game/objects/items/brace.dm @@ -23,7 +23,7 @@ var/obj/machinery/door/airlock/placed_on var/cover_open = FALSE -/obj/structure/deployed_brace/update_icon() +/obj/structure/deployed_brace/update_appearance(updates = ALL) ..() cut_overlays() if(cover_open) @@ -53,7 +53,7 @@ cover_open = !cover_open tool.play_tool_sound(src) to_chat(user, span_notice("You [cover_open ? "open" : "close"] the cover.")) - update_icon() + update_appearance(updates = ALL) /obj/structure/deployed_brace/wrench_act(mob/user, obj/item/tool) if(get_dist(user, placed_on) > 1) diff --git a/yogstation/code/game/objects/items/crayons.dm b/yogstation/code/game/objects/items/crayons.dm index d66e8e4a97fa..15e06165ddfb 100644 --- a/yogstation/code/game/objects/items/crayons.dm +++ b/yogstation/code/game/objects/items/crayons.dm @@ -88,7 +88,7 @@ if(G) gang = G paint_color = G.color - update_icon() + update_appearance(updates = ALL) /obj/item/toy/crayon/spraycan/gang/examine(mob/user) . = ..() diff --git a/yogstation/code/game/objects/items/fishing/rods.dm b/yogstation/code/game/objects/items/fishing/rods.dm index 6d8184f87b9c..f80b81e4236b 100644 --- a/yogstation/code/game/objects/items/fishing/rods.dm +++ b/yogstation/code/game/objects/items/fishing/rods.dm @@ -200,10 +200,10 @@ opened = !opened w_class = opened ? WEIGHT_CLASS_BULKY : WEIGHT_CLASS_SMALL playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) - update_icon() + update_appearance(updates = ALL) user.regenerate_icons() -/obj/item/twohanded/fishingrod/collapsible/update_icon() +/obj/item/twohanded/fishingrod/collapsible/update_appearance(updates = ALL) item_state = opened ? "fishing_rod" : "" icon_state = "[rod_icon_state][opened ? "" : "_c"]" diff --git a/yogstation/code/game/objects/items/holotool/holotool.dm b/yogstation/code/game/objects/items/holotool/holotool.dm index f766f694564f..d2de3f177b85 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -68,7 +68,7 @@ if(!C || QDELETED(src)) return current_color = C - update_icon() + update_appearance(updates = ALL) action.build_all_button_icons() user.regenerate_icons() @@ -80,7 +80,7 @@ current_tool = mode current_tool.on_set(src) playsound(loc, 'yogstation/sound/items/holotool.ogg', get_clamped_volume(), 1, -1) - update_icon() + update_appearance(updates = ALL) user.regenerate_icons() @@ -101,7 +101,7 @@ else qdel(M) -/obj/item/holotool/update_icon() +/obj/item/holotool/update_appearance(updates = ALL) cut_overlays() if(current_tool) var/mutable_appearance/holo_item = mutable_appearance(icon, current_tool.name) diff --git a/yogstation/code/game/objects/items/melee/energy.dm b/yogstation/code/game/objects/items/melee/energy.dm index 43adcdf8c2bb..89643257f457 100644 --- a/yogstation/code/game/objects/items/melee/energy.dm +++ b/yogstation/code/game/objects/items/melee/energy.dm @@ -7,7 +7,7 @@ if(active) icon_state = "sword[color]" - user.update_inv_hands() + user.update_held_items() else ..() diff --git a/yogstation/code/game/objects/items/premadepapers.dm b/yogstation/code/game/objects/items/premadepapers.dm index 33f606deb52b..6b2be8d46926 100644 --- a/yogstation/code/game/objects/items/premadepapers.dm +++ b/yogstation/code/game/objects/items/premadepapers.dm @@ -24,7 +24,7 @@ written += new/datum/langtext("

    Reason: ",/datum/language/common) written += "" written += new/datum/langtext("

    Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** @@ -57,7 +57,7 @@ written += new/datum/langtext("

    Administrator Notes: ",/datum/language/common) written += "" written += new/datum/langtext("

    Stamp Below if Accepted:",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -106,7 +106,7 @@ written += new/datum/langtext("
    ",/datum/language/common) written += new/datum/langtext("
    ",/datum/language/common) written += new/datum/langtext("Signed: ",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -173,7 +173,7 @@ written += "" written += new/datum/langtext("

    ",/datum/language/common) written += new/datum/langtext("Reporting Officer's Signature:",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -207,7 +207,7 @@ written += "" written += new/datum/langtext("
    ",/datum/language/common) written += new/datum/langtext("Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** @@ -243,7 +243,7 @@ written += new/datum/langtext("Signed, ",/datum/language/common) written += "" written += new/datum/langtext("
    Roboticist Notes:",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -274,7 +274,7 @@ written += "" written += new/datum/langtext("
    ",/datum/language/common) written += new/datum/langtext("Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -312,7 +312,7 @@ written += "" written += new/datum/langtext("
    ",/datum/language/common) written += new/datum/langtext("Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -340,7 +340,7 @@ written += "" written += new/datum/langtext("


    ",/datum/language/common) written += new/datum/langtext("Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) //RD upgrade form not included because from personal experience if you don't upgrade stuff you will be lynched @@ -372,7 +372,7 @@ written += new/datum/langtext("

    Signed, ",/datum/language/common) written += "" written += new/datum/langtext("


    Stamp Below if Approved",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -403,7 +403,7 @@ written += "" written += new/datum/langtext("
    Stamp:",/datum/language/common) written += new/datum/langtext("",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -476,7 +476,7 @@ written += "" written += new/datum/langtext(", hereby acknowledge that I have answered this test's questions to the best of my ability, and acknowledge that if I fail this test, a penalty to be determined may be applied to me.
    ",/datum/language/common) written += new/datum/langtext("Test Administrator: ",/datum/language/common) - update_icon() + update_appearance(updates = ALL) /** * @@ -501,7 +501,7 @@ written += new/datum/langtext("4. Who is the CEO of Nanotrasen? Answer below. Theo Deimi
    ",/datum/language/common) written += new/datum/langtext("5. From the following letters, Z V B D M K T P H S Y C, which 2, in order, come last in the alphabet? YZ
    ",/datum/language/common) written += new/datum/langtext("
    TOP SECRET - Command Eyes Only
    ",/datum/language/common) - update_icon() + update_appearance(updates = ALL) // How to perform autopsy @@ -514,7 +514,7 @@ written += new/datum/langtext("Step 1: Apply drapes to the chest and select Autopsy.
    ",/datum/language/common) written += new/datum/langtext("Step 2: Incise the chest with a scalpel.
    ",/datum/language/common) written += new/datum/langtext("Step 3: While holding a forensic scanner in your off-hand, perform the autopsy using the scalpel again.
    ",/datum/language/common) - update_icon() + update_appearance(updates = ALL) //academy ruin papers @@ -551,7 +551,7 @@ written += new/datum/langtext("To: Recruiter Billy the Lame
    ",/datum/language/common) written += new/datum/langtext("Bill, where the heck did you find this guy? Are you sure he's wizard material..? He st--te-s a-lot. He's a -tink-ng l-zard--
    ",/datum/language/common) written += new/datum/langtext("The rest of the paper is charred...",/datum/language/common) - update_icon() + update_appearance(updates = ALL) @@ -606,7 +606,7 @@ new /obj/item/paper/paperwork/incident_report(src) new /obj/item/paper/paperwork/literacytest(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Head of Security's clipboard. @@ -633,7 +633,7 @@ for (var/i in 1 to 10) new /obj/item/paper/paperwork/sec_incident_report(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Captain's clipboard. @@ -658,7 +658,7 @@ new /obj/item/paper/paperwork/literacytest(src) new /obj/item/paper/paperwork/literacytest/answers(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Head of Personnels clipboard. @@ -685,7 +685,7 @@ new /obj/item/paper/paperwork/literacytest(src) new /obj/item/paper/paperwork/literacytest/answers(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Warden's clipboard. @@ -709,7 +709,7 @@ for (var/i in 1 to 10) new /obj/item/paper/paperwork/sec_incident_report(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Chief Engineer's clipboard. @@ -732,7 +732,7 @@ new /obj/item/paper/paperwork/hopaccessrequestform(src) new /obj/item/paper/paperwork/incident_report(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the Chief Medical Officer's clipboard. @@ -755,7 +755,7 @@ new /obj/item/paper/paperwork/hopaccessrequestform(src) new /obj/item/paper/paperwork/incident_report(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes security officer clipboards. @@ -771,7 +771,7 @@ for (var/i in 1 to 10) new /obj/item/paper/paperwork/incident_report(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) /** * Initializes the admin variant clipboard. @@ -808,5 +808,5 @@ new /obj/item/paper/paperwork/literacytest(src) new /obj/item/paper/paperwork/literacytest/answers(src) toppaper = contents[contents.len] - update_icon() + update_appearance(updates = ALL) //turdis bad diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index e30c0094ec3b..c043770e6959 100644 --- a/yogstation/code/game/objects/items/sharpener.dm +++ b/yogstation/code/game/objects/items/sharpener.dm @@ -1,2 +1,2 @@ -/obj/item/sharpener/update_icon() +/obj/item/sharpener/update_appearance(updates = ALL) icon_state = "[initial(icon_state)]_used" diff --git a/yogstation/code/game/objects/items/tool_switcher.dm b/yogstation/code/game/objects/items/tool_switcher.dm index c2f268b97b9e..c1c2d512f33d 100644 --- a/yogstation/code/game/objects/items/tool_switcher.dm +++ b/yogstation/code/game/objects/items/tool_switcher.dm @@ -116,7 +116,7 @@ current_tool = T if(istype(loc, /mob)) var/mob/M = loc - M.update_inv_hands() + M.update_held_items() /obj/item/storage/belt/tool_switcher/proc/switch_tool_index(I) if(!current_program || I > current_program.tools_list.len || I < 1) diff --git a/yogstation/code/game/objects/items/tools.dm b/yogstation/code/game/objects/items/tools.dm index b226265de38a..bd7f2a99c558 100644 --- a/yogstation/code/game/objects/items/tools.dm +++ b/yogstation/code/game/objects/items/tools.dm @@ -67,7 +67,7 @@ to_chat(user,span_notice("Your servos whirr as the cutting head reconfigures into a prying head.")) else to_chat(user, span_notice("You attach the pry jaws to [src].")) - update_icon() + update_appearance(updates = ALL) /obj/item/jawsoflife/proc/transform_cutters(mob/user) attack_verb = list("pinched", "nipped") @@ -81,7 +81,7 @@ to_chat(user,span_notice("Your servos whirr as the prying head reconfigures into a cutting head.")) else to_chat(user, span_notice("You attach the cutting jaws to [src].")) - update_icon() + update_appearance(updates = ALL) //better handdrill /obj/item/handdrill @@ -139,7 +139,7 @@ to_chat(user,span_notice("Your servos whirr as the drill reconfigures into bolt mode.")) else to_chat(user, span_notice("You attach the bolt driver bit to [src].")) - update_icon() + update_appearance(updates = ALL) /obj/item/handdrill/proc/transform_screwdriver(mob/user) desc = "A simple powered hand drill. It's fitted with a screw bit." @@ -151,7 +151,7 @@ to_chat(user,span_notice("Your servos whirr as the drill reconfigures into screw mode.")) else to_chat(user, span_notice("You attach the screw driver bit to [src].")) - update_icon() + update_appearance(updates = ALL) /obj/item/jawsoflife/jimmy name = "airlock jimmy" diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index 63e66819c839..518dc490a3fe 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -9,7 +9,7 @@ /obj/structure/fireaxecabinet/Initialize()//<-- mirrored/overwritten proc . = ..() fireaxe = new - update_icon() + update_appearance(updates = ALL) //Sets up a spark system spark_system = new /datum/effect_system/spark_spread spark_system.set_up(2, 1, src) @@ -86,7 +86,7 @@ audible_message("You hear an audible clunk as the [name]'s bolt [locked ? "retracts" : "locks into place"].") playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) locked = !locked - update_icon() + update_appearance(updates = ALL) /obj/structure/fireaxecabinet/emag_act(mob/user) //this allows you to emag the fireaxe cabinet, unlocking it immediately. @@ -105,5 +105,5 @@ playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) locked = 0 audible_message("You hear an audible clunk as the [name]'s bolt retracts.") - update_icon() + update_appearance(updates = ALL) //Fireaxe Cabinet is now permanently unlocked. diff --git a/yogstation/code/game/objects/structures/toilet_bong.dm b/yogstation/code/game/objects/structures/toilet_bong.dm index 53d10d66c52d..ca3ee23d9ce3 100644 --- a/yogstation/code/game/objects/structures/toilet_bong.dm +++ b/yogstation/code/game/objects/structures/toilet_bong.dm @@ -20,10 +20,10 @@ STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = WEIGHT_CLASS_SMALL * 24 STR.max_items = 24 - RegisterSignal(STR, COMSIG_STORAGE_INSERTED, PROC_REF(update_icon)) - RegisterSignal(STR, COMSIG_STORAGE_REMOVED, PROC_REF(update_icon)) + RegisterSignal(STR, COMSIG_STORAGE_INSERTED, TYPE_PROC_REF(/atom/, update_appearance)) + RegisterSignal(STR, COMSIG_STORAGE_REMOVED, TYPE_PROC_REF(/atom/, update_appearance)) -/obj/structure/toilet_bong/update_icon() +/obj/structure/toilet_bong/update_appearance(updates = ALL) . = ..() cut_overlays() if (LAZYLEN(contents)) @@ -47,7 +47,7 @@ smoke.set_up(smoke_spread, location = location, carry = boof.reagents, silent = TRUE) smoke.start() qdel(boof) - update_icon() + update_appearance(updates = ALL) // It's a bong powered by a **flamethrower**, it's definitely an open flame!! /obj/structure/toilet_bong/process() diff --git a/yogstation/code/modules/antagonists/darkspawn/darkspawn_objects/umbral_tendrils.dm b/yogstation/code/modules/antagonists/darkspawn/darkspawn_objects/umbral_tendrils.dm index 1c55ec101a61..64286afa1606 100644 --- a/yogstation/code/modules/antagonists/darkspawn/darkspawn_objects/umbral_tendrils.dm +++ b/yogstation/code/modules/antagonists/darkspawn/darkspawn_objects/umbral_tendrils.dm @@ -82,7 +82,7 @@ if(istype(O, /obj/item/pda)) var/obj/item/pda/PDA = O PDA.set_light_on(FALSE) - PDA.update_icon() + PDA.update_appearance(updates = ALL) visible_message(span_danger("The light in [PDA] shorts out!")) else visible_message(span_danger("[O] is disintegrated by [src]!")) diff --git a/yogstation/code/modules/antagonists/shadowling/shadowling_abilities.dm b/yogstation/code/modules/antagonists/shadowling/shadowling_abilities.dm index 8619b1ce991b..610db76137e7 100644 --- a/yogstation/code/modules/antagonists/shadowling/shadowling_abilities.dm +++ b/yogstation/code/modules/antagonists/shadowling/shadowling_abilities.dm @@ -521,7 +521,7 @@ target_apc.cell?.charge = 0 //Sent to the shadow realm target_apc.chargemode = 0 //Won't recharge either until an engineer hits the button target_apc.charging = 0 - target_apc.update_icon() + target_apc.update_appearance(updates = ALL) return TRUE diff --git a/yogstation/code/modules/antagonists/slaughter/slaughter.dm b/yogstation/code/modules/antagonists/slaughter/slaughter.dm index 5059c40e89a1..adce2cb98ca1 100644 --- a/yogstation/code/modules/antagonists/slaughter/slaughter.dm +++ b/yogstation/code/modules/antagonists/slaughter/slaughter.dm @@ -133,9 +133,6 @@ icon_state = "demon_heart-on" decay_factor = 0 -/obj/item/organ/heart/demon/update_icon() - return //always beating visually - /obj/item/organ/heart/demon/attack(mob/M, mob/living/carbon/user, obj/target) if(M != user) return ..() diff --git a/yogstation/code/modules/assembly/signaler.dm b/yogstation/code/modules/assembly/signaler.dm index 0ef59694cd3b..64a9d361b987 100644 --- a/yogstation/code/modules/assembly/signaler.dm +++ b/yogstation/code/modules/assembly/signaler.dm @@ -5,9 +5,9 @@ /obj/item/assembly/signaler/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/item/assembly/signaler/update_icon() +/obj/item/assembly/signaler/update_appearance(updates = ALL) if(label_color) cut_overlays() attached_overlays = list() diff --git a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm index 7e9daa9c63f1..560406da89fd 100644 --- a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm +++ b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm @@ -47,7 +47,7 @@ GLOBAL_LIST_EMPTY(bluespace_pipe_networks) return ..() + GLOB.bluespace_pipe_networks[bluespace_network_name] - src /obj/machinery/atmospherics/pipe/bluespace/hide() - update_icon() + update_appearance(updates = ALL) /obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe) underlays.Cut() @@ -83,4 +83,4 @@ GLOBAL_LIST_EMPTY(bluespace_pipe_networks) if(color) . = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir, color) else - . = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir) \ No newline at end of file + . = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir) diff --git a/yogstation/code/modules/clothing/head/helmet.dm b/yogstation/code/modules/clothing/head/helmet.dm index 791bbf0bcf90..f3922751b494 100644 --- a/yogstation/code/modules/clothing/head/helmet.dm +++ b/yogstation/code/modules/clothing/head/helmet.dm @@ -5,7 +5,7 @@ . = ..() initial_state = "[initial(icon_state)]" -/obj/item/clothing/head/helmet/update_icon() +/obj/item/clothing/head/helmet/update_appearance(updates = ALL) var/state = "[initial_state]" if(attached_light) if(attached_light.on) diff --git a/yogstation/code/modules/clothing/suits/nerd.dm b/yogstation/code/modules/clothing/suits/nerd.dm index cbb076804702..8f70ceb4d8b3 100644 --- a/yogstation/code/modules/clothing/suits/nerd.dm +++ b/yogstation/code/modules/clothing/suits/nerd.dm @@ -52,7 +52,7 @@ . = ..() GC = new(src) GC.scanning = TRUE - update_icon() + update_appearance(updates = ALL) /obj/item/clothing/suit/armor/nerd/Destroy() QDEL_NULL(GC) diff --git a/yogstation/code/modules/donor/unique_donator_items.dm b/yogstation/code/modules/donor/unique_donator_items.dm index f6ba7f938e2f..2f3fd88d88d7 100644 --- a/yogstation/code/modules/donor/unique_donator_items.dm +++ b/yogstation/code/modules/donor/unique_donator_items.dm @@ -555,7 +555,7 @@ Uncomment this and use atomproccall as necessary, then copypaste the output into unlock_path = /obj/item/instrument/saxophone /datum/donator_gear/latexballon name = "latex glove" - unlock_path = /obj/item/latexballon + unlock_path = /obj/item/latexballoon /datum/donator_gear/zippo name = "Zippo lighter" unlock_path = /obj/item/lighter diff --git a/yogstation/code/modules/guardian/abilities/major/healing.dm b/yogstation/code/modules/guardian/abilities/major/healing.dm index d471a2b1fe89..326b742eeb71 100644 --- a/yogstation/code/modules/guardian/abilities/major/healing.dm +++ b/yogstation/code/modules/guardian/abilities/major/healing.dm @@ -45,7 +45,7 @@ guardian.do_attack_animation(O) O.obj_integrity = min(O.obj_integrity + (O.max_integrity * 0.1), O.max_integrity) var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(O)) - O.update_icon() + O.update_appearance(updates = ALL) if (guardian.namedatum) H.color = guardian.namedatum.color guardian.changeNext_move(CLICK_CD_MELEE) diff --git a/yogstation/code/modules/jobs/job_types/_job.dm b/yogstation/code/modules/jobs/job_types/_job.dm index 6f74b51930a9..d7c78f2d4ec1 100644 --- a/yogstation/code/modules/jobs/job_types/_job.dm +++ b/yogstation/code/modules/jobs/job_types/_job.dm @@ -49,18 +49,18 @@ var/obj/item/modular_computer/tablet/pda/PDA = locate(/obj/item/modular_computer/tablet/pda) in H.get_all_contents() if(PDA) PDA.finish_color = "glass" - PDA.update_icon() + PDA.update_appearance(updates = ALL) if(PDA_COLOR_PIPBOY) var/obj/item/modular_computer/tablet/pda/PDA = locate(/obj/item/modular_computer/tablet/pda) in H.get_all_contents() if(PDA) PDA.finish_color = "pipboy" PDA.slot_flags |= ITEM_SLOT_GLOVES - PDA.update_icon() + PDA.update_appearance(updates = ALL) if(PDA_COLOR_RAINBOW) var/obj/item/modular_computer/tablet/pda/PDA = locate(/obj/item/modular_computer/tablet/pda) in H.get_all_contents() if(PDA) PDA.finish_color = "rainbow" - PDA.update_icon() + PDA.update_appearance(updates = ALL) /datum/job/proc/give_cape(mob/living/H, mob/M) var/client/C = M.client diff --git a/yogstation/code/modules/mob/living/brain/MMI.dm b/yogstation/code/modules/mob/living/brain/MMI.dm index 938d33afd02c..de1634975f93 100644 --- a/yogstation/code/modules/mob/living/brain/MMI.dm +++ b/yogstation/code/modules/mob/living/brain/MMI.dm @@ -7,7 +7,7 @@ brain = newbrain name = "[initial(name)]: [brain.real_name]" to_chat(brainmob, "(If your brain was removed after your death you don't remember how you died, or who killed you. See rule 1.6.") //yogs - update_icon() + update_appearance(updates = ALL) return .=..() diff --git a/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm b/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm index 935de756f1c0..22e580c8d145 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm @@ -33,7 +33,7 @@ if(random_color) var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(updates = ALL) var/datum/component/riding/D = LoadComponent(/datum/component/riding) D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 8, MOB_LAYER), TEXT_SOUTH = list(0, 8, MOB_LAYER), TEXT_EAST = list(0, 8, MOB_LAYER), TEXT_WEST = list( 0, 8, MOB_LAYER))) D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER) @@ -44,7 +44,7 @@ /mob/living/simple_animal/chocobo/death(gibbed) . = ..() - update_icon() + update_appearance(updates = ALL) for(var/mob/living/N in buckled_mobs) unbuckle_mob(N) can_buckle = FALSE @@ -53,9 +53,9 @@ . = ..() if(.) can_buckle = initial(can_buckle) - update_icon() + update_appearance(updates = ALL) -/mob/living/simple_animal/chocobo/proc/update_icon() +/mob/living/simple_animal/chocobo/update_appearance(updates = ALL) if(!random_color) //icon override return cut_overlays() diff --git a/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm b/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm index 765fd785384d..e9a048ee5479 100644 --- a/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm +++ b/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm @@ -105,7 +105,7 @@ Difficulty: Insanely Hard /mob/living/simple_animal/hostile/retaliate/goat/king/phase2/Initialize() . = ..() - update_icon() + update_appearance(updates = ALL) /mob/living/simple_animal/hostile/retaliate/goat/king/Found(atom/A) if(isliving(A)) @@ -251,11 +251,11 @@ Difficulty: Insanely Hard player.music_path = /datum/music/sourced/battle/king_goat_2 player.do_range_check(0) stun_chance = 10 - update_icon() + update_appearance(updates = ALL) visible_message(span_cult("\The [src]' wounds close with a flash, and when he emerges, he's even larger than before!")) -/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/proc/update_icon() +/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/update_appearance(updates = ALL) var/matrix/M = new if(phase3) icon_state = "king_goat3" diff --git a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm index 0e252afdaf75..f0ae8bf53e30 100644 --- a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -16,4 +16,4 @@ if(!active) toggle_power() - update_icon() + update_appearance(updates = ALL) diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 647a4aba1bad..aa186f49331f 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -15,7 +15,7 @@ connect_to_network() return ..() -/obj/machinery/power/validhunter_engine/update_icon() +/obj/machinery/power/validhunter_engine/update_appearance(updates = ALL) if(operating) icon_state = "throw_me_in_the_trash_and_feed_my_remains_to_the_devil_operating" else @@ -74,7 +74,7 @@ /obj/machinery/power/validhunter_engine/proc/process_mob(mob/living/L, mob/user) operating = TRUE - update_icon() + update_appearance(updates = ALL) playsound(src.loc, 'sound/machines/terminal_on.ogg', 50, 1) L.forceMove(src) @@ -159,7 +159,7 @@ pixel_x = initial(pixel_x) //return to its spot after shaking operating = FALSE - update_icon() + update_appearance(updates = ALL) /obj/machinery/power/validhunter_engine/proc/fake_gib(mob/living/L) playsound(src.loc, 'sound/machines/terminal_off.ogg', 50, 1) @@ -167,5 +167,5 @@ dropContents() operating = FALSE - update_icon() + update_appearance(updates = ALL) diff --git a/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm index 9aaa8b623031..060b47aee275 100644 --- a/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm @@ -13,8 +13,9 @@ casing_ejector = FALSE internal_magazine = TRUE -/obj/item/gun/ballistic/speargun/update_icon() - return +/obj/item/gun/ballistic/speargun/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/gun/ballistic/speargun/attack_self() return diff --git a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm index 64698a74717a..1f0f1f348fdc 100644 --- a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm +++ b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm @@ -23,7 +23,7 @@ amount_per_transfer_from_this = 25 list_reagents = list(/datum/reagent/medicine/stimulants = 75) -/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/update_icon() +/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/update_appearance(updates = ALL) if(reagents.total_volume > 25) icon_state = initial(icon_state) else if(reagents.total_volume) @@ -45,7 +45,7 @@ var/enlightenment = pick(strings(REDPILL_FILE, "redpill_questions")) to_chat(M, span_notice("[enlightenment]")) -/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/redpill/update_icon() +/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/redpill/update_appearance(updates = ALL) if(reagents.total_volume > 25) icon_state = initial(icon_state) else if(reagents.total_volume) diff --git a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm index 53080382d2dd..53d0b7074ac7 100644 --- a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm +++ b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm @@ -27,7 +27,7 @@ if(!wires.is_cut(WIRE_SORT_SCAN)) sort_scan = TRUE -/obj/structure/disposalpipe/sorting/update_icon() +/obj/structure/disposalpipe/sorting/update_appearance(updates = ALL) cut_overlays() . = ..() if(panel_open) @@ -37,7 +37,7 @@ panel_open = !panel_open I.play_tool_sound(src) to_chat(user, span_notice("You [panel_open ? "open" : "close"] the wire panel.")) - update_icon() + update_appearance(updates = ALL) return TRUE /obj/structure/disposalpipe/sorting/attackby(obj/item/I, mob/user) diff --git a/yogstation/code/modules/spacepods/construction.dm b/yogstation/code/modules/spacepods/construction.dm index 52b704d195ca..6edc64d42c99 100644 --- a/yogstation/code/modules/spacepods/construction.dm +++ b/yogstation/code/modules/spacepods/construction.dm @@ -200,4 +200,4 @@ user.visible_message("[user] welds [src]'s armor.", "You weld [src]'s armor.") // finally this took too fucking long // somehow this takes up 40 lines less code than the original, code-less version. And it actually works - update_icon() + update_appearance(updates = ALL) diff --git a/yogstation/code/modules/spacepods/equipment.dm b/yogstation/code/modules/spacepods/equipment.dm index f0b4944a907b..4acf5d20ea9e 100644 --- a/yogstation/code/modules/spacepods/equipment.dm +++ b/yogstation/code/modules/spacepods/equipment.dm @@ -38,7 +38,7 @@ /obj/item/spacepod_equipment/weaponry/on_install(obj/spacepod/SP) . = ..() SP.weapon = src - SP.update_icon() + SP.update_appearance(updates = ALL) /obj/item/spacepod_equipment/weaponry/on_uninstall() . = ..() diff --git a/yogstation/code/modules/spacepods/physics.dm b/yogstation/code/modules/spacepods/physics.dm index 4eb92c5b40c5..26fa44f3bb96 100644 --- a/yogstation/code/modules/spacepods/physics.dm +++ b/yogstation/code/modules/spacepods/physics.dm @@ -207,7 +207,7 @@ C.pixel_y = last_offset_y*32 animate(C, pixel_x = offset_x*32, pixel_y = offset_y*32, time = time SECONDS, flags=ANIMATION_END_NOW) user_thrust_dir = 0 - update_icon() + update_appearance(updates = ALL) /obj/spacepod/Bumped(atom/movable/A) if(A.dir & NORTH) diff --git a/yogstation/code/modules/spacepods/spacepod.dm b/yogstation/code/modules/spacepods/spacepod.dm index 871b8cc14925..251ca19afc57 100644 --- a/yogstation/code/modules/spacepods/spacepod.dm +++ b/yogstation/code/modules/spacepods/spacepod.dm @@ -168,12 +168,12 @@ GLOBAL_LIST_INIT(spacepods_list, list()) if(W.use_tool(src, user, 50, amount=3, volume = 50)) if(repairing) obj_integrity = min(max_integrity, obj_integrity + 10) - update_icon() + update_appearance(updates = ALL) to_chat(user, span_notice("You mend some [pick("dents","bumps","damage")] with [W]")) else if(!cell && !internal_tank && !equipment.len && !pilot && !passengers.len && construction_state == SPACEPOD_ARMOR_WELDED) user.visible_message("[user] slices off [src]'s armor.", span_notice("You slice off [src]'s armor.")) construction_state = SPACEPOD_ARMOR_SECURED - update_icon() + update_appearance(updates = ALL) return TRUE return ..() @@ -235,7 +235,7 @@ GLOBAL_LIST_INIT(spacepods_list, list()) max_integrity = armor.pod_integrity obj_integrity = max_integrity - integrity_failure + obj_integrity pod_armor = armor - update_icon() + update_appearance(updates = ALL) /obj/spacepod/proc/remove_armor() if(!pod_armor) @@ -243,7 +243,7 @@ GLOBAL_LIST_INIT(spacepods_list, list()) max_integrity = integrity_failure desc = initial(desc) pod_armor = null - update_icon() + update_appearance(updates = ALL) /obj/spacepod/proc/InterceptClickOn(mob/user, params, atom/target) @@ -256,7 +256,7 @@ GLOBAL_LIST_INIT(spacepods_list, list()) /obj/spacepod/take_damage() ..() - update_icon() + update_appearance(updates = ALL) /obj/spacepod/return_air() return cabin_air @@ -396,7 +396,7 @@ GLOBAL_LIST_INIT(spacepods_list, list()) // there here's your frame pieces back, happy? qdel(src) -/obj/spacepod/update_icon() +/obj/spacepod/update_appearance(updates = ALL) cut_overlays() if(construction_state != SPACEPOD_ARMOR_WELDED) icon = 'goon/icons/obj/spacepods/construction_2x2.dmi' diff --git a/yogstation/code/modules/xenoarch/loot/gigadrill.dm b/yogstation/code/modules/xenoarch/loot/gigadrill.dm index 5e109872c365..49729a5bc986 100644 --- a/yogstation/code/modules/xenoarch/loot/gigadrill.dm +++ b/yogstation/code/modules/xenoarch/loot/gigadrill.dm @@ -13,13 +13,13 @@ /obj/vehicle/ridden/gigadrill/after_add_occupant(mob/M) . = ..() - update_icon() + update_appearance(updates = ALL) /obj/vehicle/ridden/gigadrill/after_remove_occupant(mob/M) . = ..() - update_icon() + update_appearance(updates = ALL) -/obj/vehicle/ridden/gigadrill/update_icon() +/obj/vehicle/ridden/gigadrill/update_appearance(updates = ALL) . = ..() if(occupant_amount()) icon_state = "gigadrill_mov" From 906a924046b976a14e47d8b7b44f9481e39ac481 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:18:11 -0300 Subject: [PATCH 02/18] e2 --- code/game/atoms.dm | 2 -- code/modules/mob/living/carbon/human/update_icons.dm | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 32cb796f805f..97b90a9485e4 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -549,8 +549,6 @@ if(!LAZYLEN(.)) // lol ..length return FALSE -/atom/proc/update_icon() - return /** * Updates the appearence of the icon * diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 0134b2acb51e..29474653b298 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -101,7 +101,7 @@ There are several things that need to be remembered: remove_overlay(UNIFORM_LAYER) if(client && hud_used) - var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM] + var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_ICLOTHING) + 1] inv.update_appearance(updates = ALL) if(istype(w_uniform, /obj/item/clothing/under)) From d940c2783310647739d345e7b5a88343de468af0 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:47:44 -0300 Subject: [PATCH 03/18] i'll do a bit of these --- code/_onclick/hud/robot.dm | 10 ++-- code/_onclick/hud/screen_objects.dm | 80 +++++++++++++---------------- code/game/area/areas.dm | 7 +-- code/game/machinery/doors/door.dm | 2 +- code/modules/buildmode/buttons.dm | 9 ++-- 5 files changed, 50 insertions(+), 58 deletions(-) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 8573c0a214a7..3f69c2755f99 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -281,13 +281,11 @@ if(.) return robot?.toggle_headlamp() - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) -/atom/movable/screen/robot/lamp/update_appearance(updates = ALL) - if(robot?.lamp_enabled) - icon_state = "lamp_on" - else - icon_state = "lamp_off" +/atom/movable/screen/robot/lamp/update_icon_state() + icon_state = robot?.lamp_enabled ? "lamp_on" : "lamp_off" + return ..() /atom/movable/screen/robot/modPC name = "Modular Interface" diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 58bd07db1be0..30984a917b13 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -181,7 +181,7 @@ cut_overlay(object_overlays) object_overlays.Cut() -/atom/movable/screen/inventory/update_appearance(updates = ALL) +/atom/movable/screen/inventory/update_icon_state() if(!icon_empty) icon_empty = icon_state @@ -190,6 +190,7 @@ icon_state = icon_full else icon_state = icon_empty + return ..() /atom/movable/screen/inventory/proc/add_overlays() var/mob/user = hud.mymob @@ -216,7 +217,7 @@ var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked") var/held_index = 0 -/atom/movable/screen/inventory/hand/update_appearance(updates = ALL) +/atom/movable/screen/inventory/hand/update_overlays() . = ..() if(!handcuff_overlay) @@ -224,22 +225,20 @@ var/state = (!(held_index % 2)) ? "markus" : "gabrielle" handcuff_overlay = mutable_appearance((ui_style ? ui_style2icon(ui_style) : 'icons/mob/screen_gen.dmi'), state) - cut_overlays() - if(!hud?.mymob) return if(iscarbon(hud.mymob)) var/mob/living/carbon/C = hud.mymob if(C.handcuffed) - add_overlay(handcuff_overlay) + . += handcuff_overlay if(held_index) if(!C.has_hand_for_held_index(held_index)) - add_overlay(blocked_overlay) + . += blocked_overlay if(held_index == hud.mymob.active_hand_index) - add_overlay((held_index % 2) ? "lhandactive" : "rhandactive") + . += (held_index % 2) ? "lhandactive" : "rhandactive" /atom/movable/screen/inventory/hand/Click(location, control, params) @@ -329,16 +328,13 @@ /atom/movable/screen/mov_intent/Click() toggle(usr) -/atom/movable/screen/mov_intent/update_icon(mob/user) - if(!user && hud) - user = hud.mymob - if(!user) - return - switch(user.m_intent) +/atom/movable/screen/mov_intent/update_icon_state() + switch(hud?.mymob?.m_intent) if(MOVE_INTENT_WALK) icon_state = "walking" if(MOVE_INTENT_RUN) icon_state = "running" + return ..() /atom/movable/screen/mov_intent/proc/toggle(mob/user) if(isobserver(user)) @@ -349,19 +345,16 @@ name = "stop pulling" icon = 'icons/mob/screen_midnight.dmi' icon_state = "pull" + base_icon_state = "pull" /atom/movable/screen/pull/Click() if(isobserver(usr)) return usr.stop_pulling() -/atom/movable/screen/pull/update_icon(mob/mymob) - if(!mymob) - return - if(mymob.pulling) - icon_state = "pull" - else - icon_state = "pull0" +/atom/movable/screen/pull/update_icon_state() + icon_state = "[base_icon_state][hud?.mymob?.pulling ? null : 0]" + return ..() /atom/movable/screen/resist name = "resist" @@ -379,6 +372,7 @@ name = "rest" icon = 'icons/mob/screen_midnight.dmi' icon_state = "act_rest" + base_icon_state = "act_rest" layer = HUD_LAYER plane = HUD_PLANE @@ -387,14 +381,12 @@ var/mob/living/L = usr L.lay_down() -/atom/movable/screen/rest/update_icon(mob/mymob) - if(!isliving(mymob)) - return - var/mob/living/L = mymob - if(!L.resting) - icon_state = "act_rest" - else - icon_state = "act_rest0" +/atom/movable/screen/rest/update_icon_state() + var/mob/living/user = hud?.mymob + if(!istype(user)) + return ..() + icon_state = "[base_icon_state][user.resting ? 0 : null]" + return ..() /atom/movable/screen/storage name = "storage" @@ -434,7 +426,7 @@ name = "damage zone" icon_state = "zone_sel" screen_loc = ui_zonesel - var/selecting = BODY_ZONE_CHEST + var/overlay_icon = 'icons/mob/screen_gen.dmi' var/static/list/hover_overlays_cache = list() var/hovering @@ -527,31 +519,31 @@ return BODY_ZONE_HEAD /atom/movable/screen/zone_sel/proc/set_selected_zone(choice, mob/user) - if(isobserver(user)) + if(user != hud?.mymob) return - if(choice != selecting) - selecting = choice - update_icon(usr) - return 1 + if(choice != hud.mymob.zone_selected) +// if(should_log) +// hud.mymob.log_manual_zone_selected_update("screen_hud", new_target = choice) + hud.mymob.zone_selected = choice + update_appearance() + SEND_SIGNAL(user, COMSIG_MOB_SELECTED_ZONE_SET, choice) + + return TRUE -/atom/movable/screen/zone_sel/update_icon(mob/user) - cut_overlays() - add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[selecting]")) - user.zone_selected = selecting +/atom/movable/screen/zone_sel/update_overlays() + . = ..() + if(!hud?.mymob) + return + . += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]") /atom/movable/screen/zone_sel/alien icon = 'icons/mob/screen_alien.dmi' - -/atom/movable/screen/zone_sel/alien/update_icon(mob/user) - cut_overlays() - add_overlay(mutable_appearance('icons/mob/screen_alien.dmi', "[selecting]")) - user.zone_selected = selecting + overlay_icon = 'icons/mob/screen_alien.dmi' /atom/movable/screen/zone_sel/robot icon = 'icons/mob/screen_cyborg.dmi' - /atom/movable/screen/flash name = "flash" icon_state = "blank" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 0b6eb492d9e0..da6cfa30cbfc 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -524,7 +524,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) * Im not sure what the heck this does, somethign to do with weather being able to set icon * states on areas?? where the heck would that even display? */ -/area/update_appearance(updates = ALL) +/area/update_icon_state() var/weather_icon for(var/V in SSweather.processing) var/datum/weather/W = V @@ -533,13 +533,14 @@ GLOBAL_LIST_EMPTY(teleportlocs) weather_icon = TRUE if(!weather_icon) icon_state = null + return ..() /** * Update the icon of the area (overridden to always be null for space */ -/area/space/update_appearance(updates = ALL) +/area/space/update_icon_state() icon_state = null - + return ..() /** * Returns int 1 or 0 if the area has power for the given channel diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 0524a8e24556..3a08805385d9 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -293,7 +293,7 @@ /obj/machinery/door/proc/unelectrify() secondsElectrified = MACHINE_NOT_ELECTRIFIED -/obj/machinery/door/update_icon_state(updates = ALL) +/obj/machinery/door/update_icon_state() icon_state = "[base_icon_state][density]" return ..() diff --git a/code/modules/buildmode/buttons.dm b/code/modules/buildmode/buttons.dm index 00df1eabbd25..88af90f667bd 100644 --- a/code/modules/buildmode/buttons.dm +++ b/code/modules/buildmode/buttons.dm @@ -27,11 +27,12 @@ update_appearance(updates = ALL) return 1 -/atom/movable/screen/buildmode/mode/update_appearance(updates = ALL) - if(bd && bd.mode) +/atom/movable/screen/buildmode/mode/update_icon_state() + if(bd?.mode) icon_state = bd.mode.get_button_iconstate() else icon_state = initial(icon_state) + return ..() /atom/movable/screen/buildmode/help icon_state = "buildhelp" @@ -47,9 +48,9 @@ screen_loc = "NORTH,WEST+2" name = "Change Dir" -/atom/movable/screen/buildmode/bdir/update_appearance(updates = ALL) +/atom/movable/screen/buildmode/bdir/update_icon_state() dir = bd.build_dir - return + return ..() /atom/movable/screen/buildmode/bdir/Click() bd.toggle_dirswitch() From 3f03d9744fb056733f9cb8457ffe1bc08e4bf028 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:51:10 -0300 Subject: [PATCH 04/18] =?UTF-8?q?s=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/_onclick/hud/screen_objects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 30984a917b13..1a24d0fb96cc 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -519,7 +519,7 @@ return BODY_ZONE_HEAD /atom/movable/screen/zone_sel/proc/set_selected_zone(choice, mob/user) - if(user != hud?.mymob) + if(user != hud?.mymob) return if(choice != hud.mymob.zone_selected) From 590581a72e3f4bbd23f331b1f799a015efa7d3f8 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Sun, 18 Jun 2023 20:06:11 -0300 Subject: [PATCH 05/18] e --- code/_onclick/hud/ai.dm | 36 +++++----- code/_onclick/hud/alien.dm | 28 ++++---- code/_onclick/hud/alien_larva.dm | 14 ++-- code/_onclick/hud/blob_overmind.dm | 22 +++--- code/_onclick/hud/blobbernauthud.dm | 4 +- code/_onclick/hud/constructs.dm | 6 +- code/_onclick/hud/devil.dm | 14 ++-- code/_onclick/hud/drones.dm | 4 +- code/_onclick/hud/generic_dextrous.dm | 20 +++--- code/_onclick/hud/ghost.dm | 22 +++--- code/_onclick/hud/guardian.dm | 14 ++-- code/_onclick/hud/horror.dm | 2 +- code/_onclick/hud/hud.dm | 3 +- code/_onclick/hud/human.dm | 68 +++++++++---------- code/_onclick/hud/lavaland_elite.dm | 4 +- code/_onclick/hud/living.dm | 4 +- code/_onclick/hud/monkey.dm | 32 ++++----- code/_onclick/hud/pai.dm | 30 ++++---- code/_onclick/hud/revenanthud.dm | 4 +- code/_onclick/hud/robot.dm | 34 +++++----- code/_onclick/hud/screen_objects.dm | 12 +++- code/_onclick/hud/slime.dm | 4 +- code/_onclick/hud/swarmer.dm | 12 ++-- code/game/machinery/airlock_cycle_control.dm | 10 +-- code/game/machinery/doors/airlock.dm | 24 +++---- code/game/machinery/harvester.dm | 4 +- .../structures/signs/signs_interactive.dm | 10 +-- code/game/objects/structures/window.dm | 2 +- .../antagonists/bloodsuckers/bloodsuckers.dm | 9 +-- .../antagonists/changeling/changeling.dm | 6 +- code/modules/assembly/flash.dm | 8 +-- code/modules/cargo/gondolapod.dm | 8 +-- code/modules/client/preferences/ghost.dm | 2 +- code/modules/clothing/glasses/_glasses.dm | 5 +- code/modules/clothing/head/collectable.dm | 5 +- code/modules/clothing/head/misc_special.dm | 5 +- code/modules/clothing/spacesuits/plasmamen.dm | 9 +-- code/modules/flufftext/Hallucination.dm | 9 +-- code/modules/mob/dead/observer/login.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- .../mob/living/simple_animal/bot/atmosbot.dm | 11 +-- .../mob/living/simple_animal/bot/bot.dm | 13 ++-- .../living/simple_animal/bot/construction.dm | 23 +++++-- .../mob/living/simple_animal/bot/firebot.dm | 11 ++- .../mob/living/simple_animal/bot/floorbot.dm | 3 +- .../mob/living/simple_animal/bot/medbot.dm | 23 ++++--- .../mob/living/simple_animal/bot/mulebot.dm | 27 ++++---- .../mob/living/simple_animal/slime/slime.dm | 3 +- code/modules/mob/mob.dm | 8 +-- code/modules/mob/mob_movement.dm | 2 +- code/modules/pai/hud.dm | 30 ++++---- code/modules/power/cell.dm | 4 +- code/modules/power/singularity/generator.dm | 6 +- .../projectiles/ammunition/reusable/arrow.dm | 4 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/energy.dm | 4 +- .../projectiles/guns/energy/dueling.dm | 2 +- .../projectiles/guns/energy/energy_gun.dm | 2 +- code/modules/projectiles/guns/magic.dm | 2 +- .../security_levels/keycard_authentication.dm | 4 +- code/modules/vending/security_armaments.dm | 2 +- .../game/gamemodes/darkspawn/darkspawn_hud.dm | 6 +- .../game/gamemodes/vampire/vampire_hud.dm | 6 +- .../atmospherics/machinery/pipes/bluespace.dm | 3 +- .../living/simple_animal/friendly/chocobo.dm | 25 +++---- .../hostile/retaliate/king_of_goats.dm | 6 +- yogstation/code/modules/xenoarch/loot/guns.dm | 2 +- 67 files changed, 381 insertions(+), 366 deletions(-) diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index 1b13ac173001..bd31a0a94bd3 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -192,7 +192,7 @@ var/widescreen = owner?.client?.prefs?.read_preference(/datum/preference/toggle/widescreen) // Language menu - using = new /atom/movable/screen/language_menu + using = new /atom/movable/screen/language_menu(src) if(widescreen) using.screen_loc = ui_ai_language_menu_widescreen else @@ -200,12 +200,12 @@ static_inventory += using //AI core - using = new /atom/movable/screen/ai/aicore() + using = new /atom/movable/screen/ai/aicore(src) using.screen_loc = ui_ai_core static_inventory += using //Dashboard - using = new /atom/movable/screen/ai/dashboard + using = new /atom/movable/screen/ai/dashboard(src) if(widescreen) using.screen_loc = ui_ai_dashboard_widescreen else @@ -214,72 +214,72 @@ static_inventory += using //Camera list - using = new /atom/movable/screen/ai/camera_list() + using = new /atom/movable/screen/ai/camera_list(src) using.screen_loc = ui_ai_camera_list static_inventory += using //Track - using = new /atom/movable/screen/ai/camera_track() + using = new /atom/movable/screen/ai/camera_track(src) using.screen_loc = ui_ai_track_with_camera static_inventory += using //Camera light - using = new /atom/movable/screen/ai/camera_light() + using = new /atom/movable/screen/ai/camera_light(src) using.screen_loc = ui_ai_camera_light static_inventory += using //Crew Monitoring - using = new /atom/movable/screen/ai/crew_monitor() + using = new /atom/movable/screen/ai/crew_monitor(src) using.screen_loc = ui_ai_crew_monitor static_inventory += using //Crew Manifest - using = new /atom/movable/screen/ai/crew_manifest() + using = new /atom/movable/screen/ai/crew_manifest(src) using.screen_loc = ui_ai_crew_manifest static_inventory += using //Alerts - using = new /atom/movable/screen/ai/alerts() + using = new /atom/movable/screen/ai/alerts(src) using.screen_loc = ui_ai_alerts static_inventory += using //Announcement - using = new /atom/movable/screen/ai/announcement() + using = new /atom/movable/screen/ai/announcement(src) using.screen_loc = ui_ai_announcement static_inventory += using //Shuttle - using = new /atom/movable/screen/ai/call_shuttle() + using = new /atom/movable/screen/ai/call_shuttle(src) using.screen_loc = ui_ai_shuttle static_inventory += using //Laws - using = new /atom/movable/screen/ai/state_laws() + using = new /atom/movable/screen/ai/state_laws(src) using.screen_loc = ui_ai_state_laws static_inventory += using //Integrated Tablet - using = new /atom/movable/screen/ai/mod_pc() + using = new /atom/movable/screen/ai/mod_pc(src) using.screen_loc = ui_ai_pda_send static_inventory += using //Take image - using = new /atom/movable/screen/ai/image_take() + using = new /atom/movable/screen/ai/image_take(src) using.screen_loc = ui_ai_take_picture static_inventory += using //View images - using = new /atom/movable/screen/ai/image_view() + using = new /atom/movable/screen/ai/image_view(src) using.screen_loc = ui_ai_view_images static_inventory += using //Medical/Security sensors - using = new /atom/movable/screen/ai/sensors() + using = new /atom/movable/screen/ai/sensors(src) using.screen_loc = ui_ai_sensor static_inventory += using //Multicamera mode - using = new /atom/movable/screen/ai/multicam() + using = new /atom/movable/screen/ai/multicam(src) if(widescreen) using.screen_loc = ui_ai_multicam_widescreen else @@ -287,7 +287,7 @@ static_inventory += using //Add multicamera camera - using = new /atom/movable/screen/ai/add_multicam() + using = new /atom/movable/screen/ai/add_multicam(src) if(widescreen) using.screen_loc = ui_ai_add_multicam_widescreen else diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 07d879dd8c88..f450fdce1a5d 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -39,26 +39,26 @@ //begin buttons - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_1" using.screen_loc = ui_swaphand_position(owner,1) static_inventory += using - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_2" using.screen_loc = ui_swaphand_position(owner,2) static_inventory += using - using = new /atom/movable/screen/act_intent/alien() + using = new /atom/movable/screen/act_intent/alien(src) using.icon_state = mymob.a_intent static_inventory += using action_intent = using if(isalienhunter(mymob)) var/mob/living/carbon/alien/humanoid/hunter/H = mymob - H.leap_icon = new /atom/movable/screen/alien/leap() + H.leap_icon = new /atom/movable/screen/alien/leap(src) H.leap_icon.screen_loc = ui_alien_storage_r static_inventory += H.leap_icon @@ -66,41 +66,41 @@ using.screen_loc = ui_alien_language_menu static_inventory += using - using = new /atom/movable/screen/drop() + using = new /atom/movable/screen/drop(src) using.icon = ui_style using.screen_loc = ui_drop_throw static_inventory += using - using = new /atom/movable/screen/resist() + using = new /atom/movable/screen/resist(src) using.icon = ui_style using.screen_loc = ui_above_movement hotkeybuttons += using - throw_icon = new /atom/movable/screen/throw_catch() + throw_icon = new /atom/movable/screen/throw_catch(src) throw_icon.icon = ui_style throw_icon.screen_loc = ui_drop_throw hotkeybuttons += throw_icon - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_movement static_inventory += pull_icon //begin indicators - healths = new /atom/movable/screen/healths/alien() + healths = new /atom/movable/screen/healths/alien(src) infodisplay += healths - alien_plasma_display = new /atom/movable/screen/alien/plasma_display() + alien_plasma_display = new /atom/movable/screen/alien/plasma_display(src) infodisplay += alien_plasma_display if(!isalienqueen(mymob)) - alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder + alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder(src) infodisplay += alien_queen_finder - zone_select = new /atom/movable/screen/zone_sel/alien() - zone_select.update_icon(mymob) + zone_select = new /atom/movable/screen/zone_sel/alien(src) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory)) diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 5c7062a365f1..f20a3a182ede 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -5,19 +5,19 @@ ..() var/atom/movable/screen/using - using = new /atom/movable/screen/act_intent/alien() + using = new /atom/movable/screen/act_intent/alien(src) using.icon_state = mymob.a_intent static_inventory += using action_intent = using - healths = new /atom/movable/screen/healths/alien() + healths = new /atom/movable/screen/healths/alien(src) infodisplay += healths - alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder() + alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder(src) infodisplay += alien_queen_finder - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = 'icons/mob/screen_alien.dmi' - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_movement hotkeybuttons += pull_icon @@ -25,6 +25,6 @@ using.screen_loc = ui_alien_language_menu static_inventory += using - zone_select = new /atom/movable/screen/zone_sel/alien() - zone_select.update_icon(mymob) + zone_select = new /atom/movable/screen/zone_sel/alien(src) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm index 622e45e69e98..b69902fc380a 100644 --- a/code/_onclick/hud/blob_overmind.dm +++ b/code/_onclick/hud/blob_overmind.dm @@ -126,7 +126,7 @@ ..() var/atom/movable/screen/using - blobpwrdisplay = new /atom/movable/screen() + blobpwrdisplay = new /atom/movable/screen(src) blobpwrdisplay.name = "blob power" blobpwrdisplay.icon_state = "block" blobpwrdisplay.screen_loc = ui_health @@ -135,44 +135,44 @@ blobpwrdisplay.plane = ABOVE_HUD_PLANE infodisplay += blobpwrdisplay - healths = new /atom/movable/screen/healths/blob() + healths = new /atom/movable/screen/healths/blob(src) infodisplay += healths - using = new /atom/movable/screen/blob/BlobHelp() + using = new /atom/movable/screen/blob/BlobHelp(src) using.screen_loc = "WEST:6,NORTH:-3" static_inventory += using - using = new /atom/movable/screen/blob/JumpToNode() + using = new /atom/movable/screen/blob/JumpToNode(src) using.screen_loc = ui_inventory static_inventory += using - using = new /atom/movable/screen/blob/JumpToCore() + using = new /atom/movable/screen/blob/JumpToCore(src) using.screen_loc = ui_zonesel using.hud = src static_inventory += using - using = new /atom/movable/screen/blob/Blobbernaut() + using = new /atom/movable/screen/blob/Blobbernaut(src) using.screen_loc = ui_belt static_inventory += using - using = new /atom/movable/screen/blob/ResourceBlob() + using = new /atom/movable/screen/blob/ResourceBlob(src) using.screen_loc = ui_back static_inventory += using - using = new /atom/movable/screen/blob/NodeBlob() + using = new /atom/movable/screen/blob/NodeBlob(src) using.screen_loc = ui_hand_position(2) static_inventory += using - using = new /atom/movable/screen/blob/FactoryBlob() + using = new /atom/movable/screen/blob/FactoryBlob(src) using.screen_loc = ui_hand_position(1) static_inventory += using - using = new /atom/movable/screen/blob/ReadaptStrain() + using = new /atom/movable/screen/blob/ReadaptStrain(src) using.screen_loc = ui_storage1 using.hud = src static_inventory += using - using = new /atom/movable/screen/blob/RelocateCore() + using = new /atom/movable/screen/blob/RelocateCore(src) using.screen_loc = ui_storage2 static_inventory += using diff --git a/code/_onclick/hud/blobbernauthud.dm b/code/_onclick/hud/blobbernauthud.dm index 2431a1afeaa2..130f2159888f 100644 --- a/code/_onclick/hud/blobbernauthud.dm +++ b/code/_onclick/hud/blobbernauthud.dm @@ -1,6 +1,6 @@ /datum/hud/living/blobbernaut/New(mob/living/owner) . = ..() - blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind() + blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind(src) blobpwrdisplay.hud = src - infodisplay += blobpwrdisplay \ No newline at end of file + infodisplay += blobpwrdisplay diff --git a/code/_onclick/hud/constructs.dm b/code/_onclick/hud/constructs.dm index 4b8fb2838042..e17b335122f2 100644 --- a/code/_onclick/hud/constructs.dm +++ b/code/_onclick/hud/constructs.dm @@ -3,11 +3,11 @@ /datum/hud/constructs/New(mob/owner) ..() - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_construct_pull static_inventory += pull_icon - healths = new /atom/movable/screen/healths/construct() + healths = new /atom/movable/screen/healths/construct(src) infodisplay += healths diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm index 3e4b39832322..d987366920ed 100644 --- a/code/_onclick/hud/devil.dm +++ b/code/_onclick/hud/devil.dm @@ -6,20 +6,20 @@ ..() var/atom/movable/screen/using - using = new /atom/movable/screen/drop() + using = new /atom/movable/screen/drop(src) using.icon = ui_style using.screen_loc = ui_drone_drop static_inventory += using - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_drone_pull static_inventory += pull_icon build_hand_slots() - using = new /atom/movable/screen/inventory() + using = new /atom/movable/screen/inventory(src) using.name = "hand" using.icon = ui_style using.icon_state = "swap_1_m" @@ -28,7 +28,7 @@ using.plane = HUD_PLANE static_inventory += using - using = new /atom/movable/screen/inventory() + using = new /atom/movable/screen/inventory(src) using.name = "hand" using.icon = ui_style using.icon_state = "swap_2" @@ -37,9 +37,9 @@ using.plane = HUD_PLANE static_inventory += using - zone_select = new /atom/movable/screen/zone_sel() + zone_select = new /atom/movable/screen/zone_sel(src) zone_select.icon = ui_style - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) devilsouldisplay = new /atom/movable/screen/devil/soul_counter infodisplay += devilsouldisplay diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index ace511d4223e..764afc810f36 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -2,7 +2,7 @@ ..() var/atom/movable/screen/inventory/inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "internal storage" inv_box.icon = ui_style inv_box.icon_state = "suit_storage" @@ -11,7 +11,7 @@ inv_box.slot_id = ITEM_SLOT_DEX_STORAGE static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "head/mask" inv_box.icon = ui_style inv_box.icon_state = "mask" diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm index 59c73f60366b..75a83b8b432a 100644 --- a/code/_onclick/hud/generic_dextrous.dm +++ b/code/_onclick/hud/generic_dextrous.dm @@ -3,26 +3,26 @@ ..() var/atom/movable/screen/using - using = new /atom/movable/screen/drop() + using = new /atom/movable/screen/drop(src) using.icon = ui_style using.screen_loc = ui_drone_drop static_inventory += using - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_drone_pull static_inventory += pull_icon build_hand_slots() - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_1_m" using.screen_loc = ui_swaphand_position(owner,1) static_inventory += using - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_2" using.screen_loc = ui_swaphand_position(owner,2) @@ -31,20 +31,20 @@ if(mymob.possible_a_intents) if(mymob.possible_a_intents.len == 4) // All possible intents - full intent selector - action_intent = new /atom/movable/screen/act_intent/segmented + action_intent = new /atom/movable/screen/act_intent/segmented(src) else - action_intent = new /atom/movable/screen/act_intent + action_intent = new /atom/movable/screen/act_intent(src) action_intent.icon = ui_style action_intent.icon_state = mymob.a_intent static_inventory += action_intent - zone_select = new /atom/movable/screen/zone_sel() + zone_select = new /atom/movable/screen/zone_sel(src) zone_select.icon = ui_style - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select - using = new /atom/movable/screen/area_creator + using = new /atom/movable/screen/area_creator(src) using.icon = ui_style static_inventory += using diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index b3e456eeb0ec..c58b790d3515 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -48,47 +48,47 @@ ..() var/atom/movable/screen/using - using = new /atom/movable/screen/ghost/jump_to_mob() + using = new /atom/movable/screen/ghost/jump_to_mob(src) using.screen_loc = ui_ghost_jump_to_mob static_inventory += using - using = new /atom/movable/screen/ghost/orbit() + using = new /atom/movable/screen/ghost/orbit(src) using.screen_loc = ui_ghost_orbit static_inventory += using - using = new /atom/movable/screen/ghost/reenter_corpse() + using = new /atom/movable/screen/ghost/reenter_corpse(src) using.screen_loc = ui_ghost_reenter_corpse static_inventory += using - using = new /atom/movable/screen/ghost/teleport() + using = new /atom/movable/screen/ghost/teleport(src) using.screen_loc = ui_ghost_teleport static_inventory += using - using = new /atom/movable/screen/ghost/spawners() + using = new /atom/movable/screen/ghost/spawners(src) using.screen_loc = ui_ghost_spawners static_inventory += using - using = new /atom/movable/screen/ghost/med_scan() + using = new /atom/movable/screen/ghost/med_scan(src) using.screen_loc = ui_ghost_med static_inventory += using - using = new /atom/movable/screen/ghost/chem_scan() + using = new /atom/movable/screen/ghost/chem_scan(src) using.screen_loc = ui_ghost_chem static_inventory += using - using = new /atom/movable/screen/ghost/nanite_scan() + using = new /atom/movable/screen/ghost/nanite_scan(src) using.screen_loc = ui_ghost_nanite static_inventory += using - using = new /atom/movable/screen/ghost/wound_scan() + using = new /atom/movable/screen/ghost/wound_scan(src) using.screen_loc = ui_ghost_wound static_inventory += using - using = new /atom/movable/screen/ghost/pai() + using = new /atom/movable/screen/ghost/pai(src) using.screen_loc = ui_ghost_pai static_inventory += using - using = new /atom/movable/screen/language_menu/ghost + using = new /atom/movable/screen/language_menu/ghost(src) using.icon = ui_style static_inventory += using diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm index e62afe640903..b3eced779e0f 100644 --- a/code/_onclick/hud/guardian.dm +++ b/code/_onclick/hud/guardian.dm @@ -5,33 +5,33 @@ ..() var/atom/movable/screen/using - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon - healths = new /atom/movable/screen/healths/guardian() + healths = new /atom/movable/screen/healths/guardian(src) infodisplay += healths - using = new /atom/movable/screen/guardian/Manifest() + using = new /atom/movable/screen/guardian/Manifest(src) using.screen_loc = ui_hand_position(2) static_inventory += using - using = new /atom/movable/screen/guardian/Recall() + using = new /atom/movable/screen/guardian/Recall(src) using.screen_loc = ui_hand_position(1) static_inventory += using - using = new owner.toggle_button_type() + using = new owner.toggle_button_type(src) using.screen_loc = ui_storage1 static_inventory += using - using = new /atom/movable/screen/guardian/ToggleLight() + using = new /atom/movable/screen/guardian/ToggleLight(src) using.screen_loc = ui_inventory static_inventory += using - using = new /atom/movable/screen/guardian/Communicate() + using = new /atom/movable/screen/guardian/Communicate(src) using.screen_loc = ui_back static_inventory += using diff --git a/code/_onclick/hud/horror.dm b/code/_onclick/hud/horror.dm index 3cc1c016093e..66cf769f8cee 100644 --- a/code/_onclick/hud/horror.dm +++ b/code/_onclick/hud/horror.dm @@ -9,7 +9,7 @@ /datum/hud/chemical_counter/New(mob/owner) . = ..() - chemical_counter = new /atom/movable/screen/horror_chemicals + chemical_counter = new /atom/movable/screen/horror_chemicals(src) infodisplay += chemical_counter /datum/hud/chemical_counter/Destroy() diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 1930bc460c0a..ac788889cf16 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -302,14 +302,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list( hand_slots = list() var/atom/movable/screen/inventory/hand/hand_box for(var/i in 1 to mymob.held_items.len) - hand_box = new /atom/movable/screen/inventory/hand() + hand_box = new /atom/movable/screen/inventory/hand(src) hand_box.name = mymob.get_held_index_name(i) hand_box.icon = ui_style hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]" hand_box.screen_loc = ui_hand_position(i) hand_box.held_index = i hand_slots["[i]"] = hand_box - hand_box.hud = src static_inventory += hand_box hand_box.update_appearance(updates = ALL) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index a40b6621beeb..c946a0f856cc 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -95,28 +95,28 @@ using.screen_loc = UI_BOXLANG static_inventory += using - using = new /atom/movable/screen/area_creator + using = new /atom/movable/screen/area_creator(src) using.icon = ui_style if(!widescreen_layout) using.screen_loc = UI_BOXAREA static_inventory += using - action_intent = new /atom/movable/screen/act_intent/segmented + action_intent = new /atom/movable/screen/act_intent/segmented(src) action_intent.icon_state = mymob.a_intent static_inventory += action_intent - using = new /atom/movable/screen/mov_intent + using = new /atom/movable/screen/mov_intent(src) using.icon = ui_style using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") using.screen_loc = ui_movi static_inventory += using - using = new /atom/movable/screen/drop() + using = new /atom/movable/screen/drop(src) using.icon = ui_style using.screen_loc = ui_drop_throw static_inventory += using - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "i_clothing" inv_box.icon = ui_style inv_box.slot_id = ITEM_SLOT_ICLOTHING @@ -124,7 +124,7 @@ inv_box.screen_loc = ui_iclothing toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "o_clothing" inv_box.icon = ui_style inv_box.slot_id = ITEM_SLOT_OCLOTHING @@ -134,19 +134,19 @@ build_hand_slots() - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_1" using.screen_loc = ui_swaphand_position(owner,1) static_inventory += using - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_2" using.screen_loc = ui_swaphand_position(owner,2) static_inventory += using - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "id" inv_box.icon = ui_style inv_box.icon_state = "id" @@ -154,7 +154,7 @@ inv_box.slot_id = ITEM_SLOT_ID static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "mask" inv_box.icon = ui_style inv_box.icon_state = "mask" @@ -162,7 +162,7 @@ inv_box.slot_id = ITEM_SLOT_MASK toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "neck" inv_box.icon = ui_style inv_box.icon_state = "neck" @@ -170,7 +170,7 @@ inv_box.slot_id = ITEM_SLOT_NECK toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "back" inv_box.icon = ui_style inv_box.icon_state = "back" @@ -178,7 +178,7 @@ inv_box.slot_id = ITEM_SLOT_BACK static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "storage1" inv_box.icon = ui_style inv_box.icon_state = "pocket" @@ -186,7 +186,7 @@ inv_box.slot_id = ITEM_SLOT_LPOCKET static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "storage2" inv_box.icon = ui_style inv_box.icon_state = "pocket" @@ -194,7 +194,7 @@ inv_box.slot_id = ITEM_SLOT_RPOCKET static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "suit storage" inv_box.icon = ui_style inv_box.icon_state = "suit_storage" @@ -202,22 +202,22 @@ inv_box.slot_id = ITEM_SLOT_SUITSTORE static_inventory += inv_box - using = new /atom/movable/screen/resist() + using = new /atom/movable/screen/resist(src) using.icon = ui_style using.screen_loc = ui_above_intent hotkeybuttons += using - using = new /atom/movable/screen/human/toggle() + using = new /atom/movable/screen/human/toggle(src) using.icon = ui_style using.screen_loc = ui_inventory static_inventory += using - using = new /atom/movable/screen/human/equip() + using = new /atom/movable/screen/human/equip(src) using.icon = ui_style using.screen_loc = ui_equip_position(mymob) static_inventory += using - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "gloves" inv_box.icon = ui_style inv_box.icon_state = "gloves" @@ -225,7 +225,7 @@ inv_box.slot_id = ITEM_SLOT_GLOVES toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "eyes" inv_box.icon = ui_style inv_box.icon_state = "glasses" @@ -233,7 +233,7 @@ inv_box.slot_id = ITEM_SLOT_EYES toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "ears" inv_box.icon = ui_style inv_box.icon_state = "ears" @@ -241,7 +241,7 @@ inv_box.slot_id = ITEM_SLOT_EARS toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "head" inv_box.icon = ui_style inv_box.icon_state = "head" @@ -249,7 +249,7 @@ inv_box.slot_id = ITEM_SLOT_HEAD toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "shoes" inv_box.icon = ui_style inv_box.icon_state = "shoes" @@ -257,7 +257,7 @@ inv_box.slot_id = ITEM_SLOT_FEET toggleable_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "belt" inv_box.icon = ui_style inv_box.icon_state = "belt" @@ -266,38 +266,38 @@ inv_box.slot_id = ITEM_SLOT_BELT static_inventory += inv_box - throw_icon = new /atom/movable/screen/throw_catch() + throw_icon = new /atom/movable/screen/throw_catch(src) throw_icon.icon = ui_style throw_icon.screen_loc = ui_drop_throw hotkeybuttons += throw_icon - rest_icon = new /atom/movable/screen/rest() + rest_icon = new /atom/movable/screen/rest(src) rest_icon.icon = ui_style rest_icon.screen_loc = ui_above_movement static_inventory += rest_icon - healths = new /atom/movable/screen/healths() + healths = new /atom/movable/screen/healths(src) infodisplay += healths - stamina = new /atom/movable/screen/stamina() + stamina = new /atom/movable/screen/stamina(src) stamina.hud = src infodisplay += stamina - healthdoll = new /atom/movable/screen/healthdoll() + healthdoll = new /atom/movable/screen/healthdoll(src) infodisplay += healthdoll - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_intent static_inventory += pull_icon - devilsouldisplay = new /atom/movable/screen/devil/soul_counter + devilsouldisplay = new /atom/movable/screen/devil/soul_counter(src) infodisplay += devilsouldisplay - zone_select = new /atom/movable/screen/zone_sel() + zone_select = new /atom/movable/screen/zone_sel(src) zone_select.icon = ui_style - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory)) diff --git a/code/_onclick/hud/lavaland_elite.dm b/code/_onclick/hud/lavaland_elite.dm index f88e8fbf1170..19f6e1ba81e3 100644 --- a/code/_onclick/hud/lavaland_elite.dm +++ b/code/_onclick/hud/lavaland_elite.dm @@ -3,13 +3,13 @@ /datum/hud/lavaland_elite/New(mob/living/simple_animal/hostile/asteroid/elite) ..() - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon - healths = new /atom/movable/screen/healths/lavaland_elite() + healths = new /atom/movable/screen/healths/lavaland_elite(src) healths.hud = src infodisplay += healths diff --git a/code/_onclick/hud/living.dm b/code/_onclick/hud/living.dm index c711c1fbfd67..27431e958b3e 100644 --- a/code/_onclick/hud/living.dm +++ b/code/_onclick/hud/living.dm @@ -4,7 +4,7 @@ /datum/hud/living/New(mob/living/owner) ..() - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull @@ -12,6 +12,6 @@ static_inventory += pull_icon //mob health doll! assumes whatever sprite the mob is - healthdoll = new /atom/movable/screen/healthdoll/living() + healthdoll = new /atom/movable/screen/healthdoll/living(src) healthdoll.hud = src infodisplay += healthdoll diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 0e9096a5d8c7..79be8e15de1b 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -3,13 +3,13 @@ var/atom/movable/screen/using var/atom/movable/screen/inventory/inv_box - action_intent = new /atom/movable/screen/act_intent() + action_intent = new /atom/movable/screen/act_intent(src) action_intent.icon = ui_style action_intent.icon_state = mymob.a_intent action_intent.screen_loc = ui_acti static_inventory += action_intent - using = new /atom/movable/screen/mov_intent() + using = new /atom/movable/screen/mov_intent(src) using.icon = ui_style using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") using.screen_loc = ui_movi @@ -19,26 +19,26 @@ using.icon = ui_style static_inventory += using - using = new /atom/movable/screen/drop() + using = new /atom/movable/screen/drop(src) using.icon = ui_style using.screen_loc = ui_drop_throw static_inventory += using build_hand_slots() - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_1_m" //extra wide! using.screen_loc = ui_swaphand_position(owner,1) static_inventory += using - using = new /atom/movable/screen/swap_hand() + using = new /atom/movable/screen/swap_hand(src) using.icon = ui_style using.icon_state = "swap_2" using.screen_loc = ui_swaphand_position(owner,2) static_inventory += using - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "mask" inv_box.icon = ui_style inv_box.icon_state = "mask" @@ -47,7 +47,7 @@ inv_box.slot_id = ITEM_SLOT_MASK static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "neck" inv_box.icon = ui_style inv_box.icon_state = "neck" @@ -56,7 +56,7 @@ inv_box.slot_id = ITEM_SLOT_NECK static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "head" inv_box.icon = ui_style inv_box.icon_state = "head" @@ -65,7 +65,7 @@ inv_box.slot_id = ITEM_SLOT_HEAD static_inventory += inv_box - inv_box = new /atom/movable/screen/inventory() + inv_box = new /atom/movable/screen/inventory(src) inv_box.name = "back" inv_box.icon = ui_style inv_box.icon_state = "back" @@ -73,28 +73,28 @@ inv_box.slot_id = ITEM_SLOT_BACK static_inventory += inv_box - throw_icon = new /atom/movable/screen/throw_catch() + throw_icon = new /atom/movable/screen/throw_catch(src) throw_icon.icon = ui_style throw_icon.screen_loc = ui_drop_throw hotkeybuttons += throw_icon - healths = new /atom/movable/screen/healths() + healths = new /atom/movable/screen/healths(src) infodisplay += healths - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_movement static_inventory += pull_icon - zone_select = new /atom/movable/screen/zone_sel() + zone_select = new /atom/movable/screen/zone_sel(src) zone_select.icon = ui_style - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select mymob.client.screen = list() - using = new /atom/movable/screen/resist() + using = new /atom/movable/screen/resist(src) using.icon = ui_style using.screen_loc = ui_above_intent hotkeybuttons += using diff --git a/code/_onclick/hud/pai.dm b/code/_onclick/hud/pai.dm index 8a1fd1cbe2c0..265bbd1f5723 100644 --- a/code/_onclick/hud/pai.dm +++ b/code/_onclick/hud/pai.dm @@ -173,77 +173,77 @@ var/atom/movable/screen/using // Software menu - using = new /atom/movable/screen/pai/software + using = new /atom/movable/screen/pai/software(src) using.screen_loc = ui_pai_software static_inventory += using // Holoform - using = new /atom/movable/screen/pai/shell + using = new /atom/movable/screen/pai/shell(src) using.screen_loc = ui_pai_shell static_inventory += using // Chassis Select Menu - using = new /atom/movable/screen/pai/chassis + using = new /atom/movable/screen/pai/chassis(src) using.screen_loc = ui_pai_chassis static_inventory += using // Rest - using = new /atom/movable/screen/pai/rest + using = new /atom/movable/screen/pai/rest(src) using.screen_loc = ui_pai_rest static_inventory += using // Integrated Light - using = new /atom/movable/screen/pai/light + using = new /atom/movable/screen/pai/light(src) using.screen_loc = ui_pai_light static_inventory += using // Newscaster - using = new /atom/movable/screen/pai/newscaster + using = new /atom/movable/screen/pai/newscaster(src) using.screen_loc = ui_pai_newscaster static_inventory += using // Language menu - using = new /atom/movable/screen/language_menu + using = new /atom/movable/screen/language_menu(src) using.screen_loc = ui_borg_language_menu static_inventory += using // Host Monitor - using = new /atom/movable/screen/pai/host_monitor() + using = new /atom/movable/screen/pai/host_monitor(src) using.screen_loc = ui_pai_host_monitor static_inventory += using // Crew Manifest - using = new /atom/movable/screen/pai/crew_manifest() + using = new /atom/movable/screen/pai/crew_manifest(src) using.screen_loc = ui_pai_crew_manifest static_inventory += using // Laws - using = new /atom/movable/screen/pai/state_laws() + using = new /atom/movable/screen/pai/state_laws(src) using.screen_loc = ui_pai_state_laws static_inventory += using // PDA message - using = new /atom/movable/screen/pai/pda_msg_send() + using = new /atom/movable/screen/pai/pda_msg_send(src) using.screen_loc = ui_pai_pda_send static_inventory += using // PDA log - using = new /atom/movable/screen/pai/pda_msg_show() + using = new /atom/movable/screen/pai/pda_msg_show(src) using.screen_loc = ui_pai_pda_log static_inventory += using // Take image - using = new /atom/movable/screen/pai/image_take() + using = new /atom/movable/screen/pai/image_take(src) using.screen_loc = ui_pai_take_picture static_inventory += using // View images - using = new /atom/movable/screen/pai/image_view() + using = new /atom/movable/screen/pai/image_view(src) using.screen_loc = ui_pai_view_images static_inventory += using // Radio - using = new /atom/movable/screen/pai/radio() + using = new /atom/movable/screen/pai/radio(src) using.screen_loc = ui_borg_radio static_inventory += using diff --git a/code/_onclick/hud/revenanthud.dm b/code/_onclick/hud/revenanthud.dm index 6b120eb1f001..24fbda2059c0 100644 --- a/code/_onclick/hud/revenanthud.dm +++ b/code/_onclick/hud/revenanthud.dm @@ -4,12 +4,12 @@ /datum/hud/revenant/New(mob/owner) ..() - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon - healths = new /atom/movable/screen/healths/revenant() + healths = new /atom/movable/screen/healths/revenant(src) infodisplay += healths diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 3f69c2755f99..5e5bff505f9b 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -91,29 +91,29 @@ static_inventory += using //Radio - using = new /atom/movable/screen/robot/radio() + using = new /atom/movable/screen/robot/radio(src) using.screen_loc = ui_borg_radio static_inventory += using //Module select - using = new /atom/movable/screen/robot/module1() + using = new /atom/movable/screen/robot/module1(src) using.screen_loc = ui_inv1 static_inventory += using mymobR.inv1 = using - using = new /atom/movable/screen/robot/module2() + using = new /atom/movable/screen/robot/module2(src) using.screen_loc = ui_inv2 static_inventory += using mymobR.inv2 = using - using = new /atom/movable/screen/robot/module3() + using = new /atom/movable/screen/robot/module3(src) using.screen_loc = ui_inv3 static_inventory += using mymobR.inv3 = using //End of module select - using = new /atom/movable/screen/robot/lamp() + using = new /atom/movable/screen/robot/lamp(src) using.screen_loc = ui_borg_lamp using.hud = src static_inventory += using @@ -122,24 +122,24 @@ lampscreen.robot = mymobR //Photography stuff - using = new /atom/movable/screen/ai/image_take() + using = new /atom/movable/screen/ai/image_take(src) using.screen_loc = ui_borg_camera using.hud = src static_inventory += using //Sec/Med HUDs - using = new /atom/movable/screen/ai/sensors() + using = new /atom/movable/screen/ai/sensors(src) using.screen_loc = ui_borg_sensor static_inventory += using //Thrusters - using = new /atom/movable/screen/robot/thrusters() + using = new /atom/movable/screen/robot/thrusters(src) using.screen_loc = ui_borg_thrusters static_inventory += using mymobR.thruster_button = using //Borg Integrated Tablet - using = new /atom/movable/screen/robot/modPC() + using = new /atom/movable/screen/robot/modPC(src) using.screen_loc = ui_borg_tablet using.hud = src static_inventory += using @@ -150,32 +150,32 @@ tabletbutton.robot = mymobR //Intent - action_intent = new /atom/movable/screen/act_intent/robot() + action_intent = new /atom/movable/screen/act_intent/robot(src) action_intent.icon_state = mymob.a_intent static_inventory += action_intent //Health - healths = new /atom/movable/screen/healths/robot() + healths = new /atom/movable/screen/healths/robot(src) infodisplay += healths //Installed Module - mymobR.hands = new /atom/movable/screen/robot/module() + mymobR.hands = new /atom/movable/screen/robot/module(src) mymobR.hands.screen_loc = ui_borg_module static_inventory += mymobR.hands //Store - module_store_icon = new /atom/movable/screen/robot/store() + module_store_icon = new /atom/movable/screen/robot/store(src) module_store_icon.screen_loc = ui_borg_store - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = 'icons/mob/screen_cyborg.dmi' - pull_icon.update_icon(mymob) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_borg_pull hotkeybuttons += pull_icon - zone_select = new /atom/movable/screen/zone_sel/robot() - zone_select.update_icon(mymob) + zone_select = new /atom/movable/screen/zone_sel/robot(src) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 1a24d0fb96cc..179d3cf3af04 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -15,8 +15,15 @@ speech_span = SPAN_ROBOT vis_flags = VIS_INHERIT_PLANE appearance_flags = APPEARANCE_UI - var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. - var/datum/hud/hud = null // A reference to the owner HUD, if any. + /// A reference to the object in the slot. Grabs or items, generally. + var/obj/master = null + /// A reference to the owner HUD, if any. + var/datum/hud/hud = null + +/atom/movable/screen/New(datum/hud/new_hud) + . = ..() + if(istype(new_hud)) + hud = new_hud /atom/movable/screen/Destroy() master = null @@ -444,6 +451,7 @@ return set_selected_zone(choice, usr) /atom/movable/screen/zone_sel/MouseEntered(location, control, params) + . = ..() MouseMove(location, control, params) /atom/movable/screen/zone_sel/MouseMove(location, control, params) diff --git a/code/_onclick/hud/slime.dm b/code/_onclick/hud/slime.dm index e13a214ce88e..e07f6cbe250b 100644 --- a/code/_onclick/hud/slime.dm +++ b/code/_onclick/hud/slime.dm @@ -4,7 +4,7 @@ /datum/hud/slime/New(mob/living/simple_animal/slime/owner) ..() - pull_icon = new /atom/movable/screen/pull() + pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style pull_icon.update_appearance(updates = ALL) pull_icon.screen_loc = ui_living_pull @@ -12,5 +12,5 @@ static_inventory += pull_icon - healths = new /atom/movable/screen/healths/slime() + healths = new /atom/movable/screen/healths/slime(src) infodisplay += healths diff --git a/code/_onclick/hud/swarmer.dm b/code/_onclick/hud/swarmer.dm index 328053720ccf..44d09c3e5692 100644 --- a/code/_onclick/hud/swarmer.dm +++ b/code/_onclick/hud/swarmer.dm @@ -72,32 +72,32 @@ . = ..() var/atom/movable/screen/using - using = new /atom/movable/screen/swarmer/fabricate_trap() + using = new /atom/movable/screen/swarmer/fabricate_trap(src) using.screen_loc = ui_hand_position(2) using.hud = src static_inventory += using - using = new /atom/movable/screen/swarmer/barricade() + using = new /atom/movable/screen/swarmer/barricade(src) using.screen_loc = ui_hand_position(1) using.hud = src static_inventory += using - using = new /atom/movable/screen/swarmer/replicate() + using = new /atom/movable/screen/swarmer/replicate(src) using.screen_loc = ui_zonesel using.hud = src static_inventory += using - using = new /atom/movable/screen/swarmer/repair_self() + using = new /atom/movable/screen/swarmer/repair_self(src) using.screen_loc = ui_storage1 using.hud = src static_inventory += using - using = new /atom/movable/screen/swarmer/toggle_light() + using = new /atom/movable/screen/swarmer/toggle_light(src) using.screen_loc = ui_back using.hud = src static_inventory += using - using = new /atom/movable/screen/swarmer/contact_swarmers() + using = new /atom/movable/screen/swarmer/contact_swarmers(src) using.screen_loc = ui_inventory using.hud = src static_inventory += using diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index 85256d5c0360..76f7e868ede4 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -134,7 +134,7 @@ if(airlock.density && (cyclestate == AIRLOCK_CYCLESTATE_CLOSED || (airlocks[A] && cyclestate == AIRLOCK_CYCLESTATE_INOPEN) || (!airlocks[A] && cyclestate == AIRLOCK_CYCLESTATE_OUTOPEN))) airlock.bolt() -/obj/machinery/advanced_airlock_controller/update_icon(use_hash = FALSE) +/obj/machinery/advanced_airlock_controller/update_appearance(updates = ALL, use_hash = FALSE) var/turf/location = get_turf(src) if(!location) return @@ -292,12 +292,12 @@ /obj/machinery/advanced_airlock_controller/process_atmos() if((stat & (NOPOWER|BROKEN)) || shorted) - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) return var/turf/location = get_turf(src) if(!location) - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) return var/pressure = 0 if(location) @@ -430,7 +430,7 @@ var/obj/machinery/atmospherics/components/unary/vent_pump/vent = V vent.on = FALSE vent.update_appearance(updates = ALL) - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) /obj/machinery/advanced_airlock_controller/attackby(obj/item/W, mob/user, params) switch(buildstage) @@ -732,7 +732,7 @@ depressurization_target = clamp(text2num(params["pressure"]), 0, depressurization_margin - 0.15) if("skip_delay") skip_delay = clamp(text2num(params["skip_delay"]), 0, 1200) - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) /obj/machinery/advanced_airlock_controller/proc/request_from_door(airlock) var/role = airlocks[airlock] diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 8a0af8abc214..bd904df6202b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -594,7 +594,7 @@ else return FALSE -/obj/machinery/door/airlock/update_icon(state=0, override=0) +/obj/machinery/door/airlock/update_appearance(updates, state=0, override=0) cut_overlays() if(operating && !override) return @@ -764,15 +764,15 @@ /obj/machinery/door/airlock/do_animate(animation) switch(animation) if("opening") - update_icon(AIRLOCK_OPENING) + update_appearance(UPDATE_ICON, AIRLOCK_OPENING) if("closing") - update_icon(AIRLOCK_CLOSING) + update_appearance(UPDATE_ICON, AIRLOCK_CLOSING) if("deny") if(!stat) - update_icon(AIRLOCK_DENY) + update_appearance(UPDATE_ICON, AIRLOCK_DENY) playsound(src,doorDeni,50,0,3) sleep(0.6 SECONDS) - update_icon(AIRLOCK_CLOSED) + update_appearance(UPDATE_ICON, AIRLOCK_CLOSED) /obj/machinery/door/airlock/examine(mob/user) . = ..() @@ -1392,7 +1392,7 @@ if(welded) welded = !welded operating = TRUE - update_icon(AIRLOCK_OPENING, 1) + update_appearance(UPDATE_ICON, AIRLOCK_OPENING, 1) sleep(0.1 SECONDS) set_opacity(0) update_freelook_sight() @@ -1402,7 +1402,7 @@ air_update_turf(1) sleep(0.1 SECONDS) layer = OPEN_DOOR_LAYER - update_icon(AIRLOCK_OPEN, 1) + update_appearance(UPDATE_ICON, AIRLOCK_OPEN, 1) operating = FALSE if(delayed_close_requested) delayed_close_requested = FALSE @@ -1437,7 +1437,7 @@ SSexplosions.med_mov_atom += killthis operating = TRUE - update_icon(AIRLOCK_CLOSING, 1) + update_appearance(UPDATE_ICON, AIRLOCK_CLOSING, 1) layer = CLOSED_DOOR_LAYER if(air_tight) density = TRUE @@ -1453,7 +1453,7 @@ set_opacity(1) update_freelook_sight() sleep(0.1 SECONDS) - update_icon(AIRLOCK_CLOSED, 1) + update_appearance(UPDATE_ICON, AIRLOCK_CLOSED, 1) operating = FALSE delayed_close_requested = FALSE if(safe) @@ -1503,13 +1503,13 @@ /obj/machinery/door/airlock/emag_act(mob/user) if(!operating && density && hasPower() && !(obj_flags & EMAGGED)) operating = TRUE - update_icon(AIRLOCK_EMAG, 1) + update_appearance(UPDATE_ICON, AIRLOCK_EMAG, 1) sleep(0.6 SECONDS) if(QDELETED(src)) return operating = FALSE if(!open()) - update_icon(AIRLOCK_CLOSED, 1) + update_appearance(UPDATE_ICON, AIRLOCK_CLOSED, 1) obj_flags |= EMAGGED lights = FALSE locked = TRUE @@ -1814,7 +1814,7 @@ /obj/machinery/door/airlock/proc/blow_charge() panel_open = TRUE - update_icon(AIRLOCK_OPENING) + update_appearance(UPDATE_ICON, AIRLOCK_OPENING) visible_message(span_warning("[src]'s panel is blown off in a spray of deadly shrapnel!")) charge.forceMove(drop_location()) charge.ex_act(EXPLODE_DEVASTATE) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 4483d2e61a10..5f0c30858eb1 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -27,7 +27,7 @@ max_time -= L.rating interval = max(max_time,1) -/obj/machinery/harvester/update_icon(warming_up) +/obj/machinery/harvester/update_appearance(updates = ALL, warming_up) if(warming_up) icon_state = initial(icon_state)+"-charging" return @@ -87,7 +87,7 @@ harvesting = TRUE visible_message(span_notice("The [name] begins warming up!")) say("Initializing harvest protocol.") - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) addtimer(CALLBACK(src, PROC_REF(harvest)), interval) /obj/machinery/harvester/proc/harvest() diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 589f1e251033..2d7b63f40534 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -18,20 +18,20 @@ GLOBAL_LIST_EMPTY(map_delamination_counters) /obj/structure/sign/delamination_counter/proc/update_count(new_count) since_last = min(new_count, 99) - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/sign/delamination_counter/update_icon() - cut_overlays() +/obj/structure/sign/delamination_counter/update_overlays() + . = ..() var/ones = since_last % 10 var/mutable_appearance/ones_overlay = mutable_appearance('icons/obj/decals.dmi', "days_[ones]") ones_overlay.pixel_x = 4 - add_overlay(ones_overlay) + . += ones_overlay var/tens = (since_last / 10) % 10 var/mutable_appearance/tens_overlay = mutable_appearance('icons/obj/decals.dmi', "days_[tens]") tens_overlay.pixel_x = -5 - add_overlay(tens_overlay) + . += tens_overlay /obj/structure/sign/delamination_counter/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 40913b8c0151..426d572b54d3 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -905,7 +905,7 @@ . = ..() set_opacity(obj_integrity >= max_integrity) -/obj/structure/window/paperframe/update_icon(updates=ALL) +/obj/structure/window/paperframe/update_icon(updates = ALL) . = ..() queue_smooth(src) diff --git a/code/modules/antagonists/bloodsuckers/bloodsuckers.dm b/code/modules/antagonists/bloodsuckers/bloodsuckers.dm index fcd04fefdcd1..03de29db0778 100644 --- a/code/modules/antagonists/bloodsuckers/bloodsuckers.dm +++ b/code/modules/antagonists/bloodsuckers/bloodsuckers.dm @@ -157,16 +157,13 @@ var/datum/hud/bloodsucker_hud = owner.current.hud_used - blood_display = new /atom/movable/screen/bloodsucker/blood_counter() - blood_display.hud = bloodsucker_hud + blood_display = new /atom/movable/screen/bloodsucker/blood_counter(bloodsucker_hud) bloodsucker_hud.infodisplay += blood_display - vamprank_display = new /atom/movable/screen/bloodsucker/rank_counter() - vamprank_display.hud = bloodsucker_hud + vamprank_display = new /atom/movable/screen/bloodsucker/rank_counter(bloodsucker_hud) bloodsucker_hud.infodisplay += vamprank_display - sunlight_display = new /atom/movable/screen/bloodsucker/sunlight_counter() - sunlight_display.hud = bloodsucker_hud + sunlight_display = new /atom/movable/screen/bloodsucker/sunlight_counter(bloodsucker_hud) bloodsucker_hud.infodisplay += sunlight_display INVOKE_ASYNC(bloodsucker_hud, TYPE_PROC_REF(/datum/hud/, show_hud), bloodsucker_hud.hud_version) diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 50745e796481..6076108a95f2 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -407,12 +407,10 @@ if(mob_to_tweak.hud_used) var/datum/hud/hud_used = mob_to_tweak.hud_used - lingchemdisplay = new /atom/movable/screen/ling/chems() - lingchemdisplay.hud = hud_used + lingchemdisplay = new /atom/movable/screen/ling/chems(hud_used) hud_used.infodisplay += lingchemdisplay - lingstingdisplay = new /atom/movable/screen/ling/sting() - lingstingdisplay.hud = hud_used + lingstingdisplay = new /atom/movable/screen/ling/sting(hud_used) hud_used.infodisplay += lingstingdisplay hud_used.show_hud(hud_used.hud_version) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index f387a665caed..7d7db1c887c6 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -45,7 +45,7 @@ attack(user,user) return FIRELOSS -/obj/item/assembly/flash/update_icon(flash = FALSE) +/obj/item/assembly/flash/update_icon(updates = ALL, flash = FALSE) cut_overlays() attached_overlays = list() if(burnt_out) @@ -119,7 +119,7 @@ addtimer(CALLBACK(src, PROC_REF(flash_end)), FLASH_LIGHT_DURATION, TIMER_OVERRIDE|TIMER_UNIQUE) times_used++ flash_recharge() - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) if(user && !clown_check(user)) return FALSE return TRUE @@ -172,7 +172,7 @@ var/mob/living/silicon/robot/R = M if(!R.sensor_protection) log_combat(user, R, "flashed", src) - update_icon(1) + update_appearance(UPDATE_ICON, TRUE) R.Paralyze(rand(80,120)) R.set_confusion_if_lower(5 SECONDS * CONFUSION_STACK_MAX_MULTIPLIER) R.flash_act(affect_silicon = 1) @@ -293,7 +293,7 @@ addtimer(CALLBACK(src, PROC_REF(flash_end)), FLASH_LIGHT_DURATION, TIMER_OVERRIDE|TIMER_UNIQUE) addtimer(CALLBACK(src, PROC_REF(cooldown)), flashcd) playsound(src, 'sound/weapons/flash.ogg', 100, TRUE) - update_icon(1) + update_appearance(UPDATE_ICON, TRUE) return TRUE diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm index 97ce697bf3f5..f47f42f54c75 100644 --- a/code/modules/cargo/gondolapod.dm +++ b/code/modules/cargo/gondolapod.dm @@ -29,11 +29,9 @@ name = linked_pod.name . = ..() -/mob/living/simple_animal/pet/gondola/gondolapod/update_appearance(updates = ALL) - if(opened) - icon_state = "gondolapod_open" - else - icon_state = "gondolapod" +/mob/living/simple_animal/pet/gondola/gondolapod/update_icon_state() + icon_state = "gondolapod[opened ? "_open" : ""]" + return ..() /mob/living/simple_animal/pet/gondola/gondolapod/verb/deliver() set name = "Release Contents" diff --git a/code/modules/client/preferences/ghost.dm b/code/modules/client/preferences/ghost.dm index 82c5e21b9eb5..ed8356c3a249 100644 --- a/code/modules/client/preferences/ghost.dm +++ b/code/modules/client/preferences/ghost.dm @@ -90,7 +90,7 @@ if (!is_donator(client)) return - ghost.update_icon(value) + ghost.update_appearance(UPDATE_ICON, value) /datum/preference/choiced/ghost_form/compile_constant_data() var/list/data = ..() diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 5cf0c4407f9f..f99d6eaf9dcf 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -338,11 +338,12 @@ /obj/item/clothing/glasses/blindfold/white/equipped(mob/living/carbon/human/user, slot) if(ishuman(user) && slot == ITEM_SLOT_EYES) - update_icon(user) + update_appearance(UPDATE_ICON, user) user.update_inv_glasses() //Color might have been changed by update_icon. ..() -/obj/item/clothing/glasses/blindfold/white/update_icon(mob/living/carbon/human/user) +/obj/item/clothing/glasses/blindfold/white/update_appearance(updates = ALL, mob/living/carbon/human/user) + . = ..() if(ishuman(user) && !colored_before) add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY) colored_before = TRUE diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 48297c5499e0..0179d0fb6b95 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -105,11 +105,12 @@ /obj/item/clothing/head/collectable/kitty/equipped(mob/living/carbon/human/user, slot) if(ishuman(user) && slot == ITEM_SLOT_HEAD) - update_icon(user) + update_appearance(UPDATE_ICON, user) user.update_inv_head() //Color might have been changed by update_icon. ..() -/obj/item/clothing/head/collectable/kitty/update_icon(mob/living/carbon/human/user) +/obj/item/clothing/head/collectable/kitty/update_appearance(updates = ALL, mob/living/carbon/human/user) + . = ..() if(ishuman(user)) add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index b03a89a16c10..f7b2b7e61d21 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -134,7 +134,7 @@ /obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot) if(ishuman(user) && slot == ITEM_SLOT_HEAD) - update_icon(user) + update_appearance(UPDATE_ICON, user) user.update_inv_head() //Color might have been changed by update_icon. var/datum/language_holder/LH = user.get_language_holder() if(!LH.has_language(/datum/language/felinid) || !LH.can_speak_language(/datum/language/felinid)) @@ -150,7 +150,8 @@ LH.remove_language(/datum/language/felinid,TRUE,TRUE,LANGUAGE_CATEARS) -/obj/item/clothing/head/kitty/update_icon(mob/living/carbon/human/user) +/obj/item/clothing/head/kitty/update_appearance(updates = ALL, mob/living/carbon/human/user) + . = ..() if(ishuman(user)) add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 30ba60f29546..56da5dd2f5e1 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -61,7 +61,7 @@ helmet_on = !helmet_on icon_state = "[initial(icon_state)][helmet_on ? "-light":""]" item_state = icon_state - update_icon(user) + update_appearance(UPDATE_ICON, user) set_light_on(helmet_on) @@ -78,9 +78,10 @@ saved_style = "enviro[GLOB.plasmaman_helmet_list[style]]" add_overlay(mutable_appearance('icons/obj/clothing/hats.dmi', saved_style)) helmet_mob_overlay = mutable_appearance('icons/mob/clothing/head/head.dmi', saved_style) - update_icon(user) + update_appearance(UPDATE_ICON, user) -/obj/item/clothing/head/helmet/space/plasmaman/update_icon(mob/living/carbon/human/user) +/obj/item/clothing/head/helmet/space/plasmaman/update_appearance(updates = ALL, mob/living/carbon/human/user) + . = ..() if(!user) return user.cut_overlay(helmet_mob_overlay) @@ -95,7 +96,7 @@ if(slot != ITEM_SLOT_HEAD) user.cut_overlay(helmet_mob_overlay) return - update_icon(user) + update_appearance(UPDATE_ICON, user) /obj/item/clothing/head/helmet/space/plasmaman/dropped(mob/living/user) user.cut_overlay(helmet_mob_overlay) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index a89f8d6d2de1..c6784ffbcf96 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -115,7 +115,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( if(target.client) target.client.images |= current_image -/obj/effect/hallucination/simple/update_icon(new_state,new_icon,new_px=0,new_py=0) +/obj/effect/hallucination/simple/update_appearance(updates = ALL, new_state,new_icon,new_px=0,new_py=0) + . = ..() image_state = new_state if(new_icon) image_icon = new_icon @@ -217,7 +218,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( name = "alien hunter ([rand(1, 1000)])" /obj/effect/hallucination/simple/xeno/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) - update_icon("alienh_pounce") + update_appearance(UPDATE_ICON, "alienh_pounce") if(hit_atom == target && target.stat!=DEAD) target.Paralyze(100) target.visible_message(span_danger("[target] flails around wildly."),"[name] pounces on you!") @@ -239,10 +240,10 @@ GLOBAL_LIST_INIT(hallucination_list, list( feedback_details += "Vent Coords: [pump.x],[pump.y],[pump.z]" xeno = new(pump.loc,target) sleep(1 SECONDS) - xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) + xeno.update_appearance(UPDATE_ICON,"alienh_leap",'icons/mob/alienleap.dmi',-32,-32) xeno.throw_at(target,7,1, xeno, FALSE, TRUE) sleep(1 SECONDS) - xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) + xeno.update_appearance(UPDATE_ICON,"alienh_leap",'icons/mob/alienleap.dmi',-32,-32) xeno.throw_at(pump,7,1, xeno, FALSE, TRUE) sleep(1 SECONDS) var/xeno_name = xeno.name diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm index e39207ffde59..a84f7467ae6a 100644 --- a/code/modules/mob/dead/observer/login.dm +++ b/code/modules/mob/dead/observer/login.dm @@ -16,5 +16,5 @@ if (isturf(T)) update_z(T.z) - update_icon(preferred_form) + update_appearance(UPDATE_ICON, preferred_form) updateghostimages() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d90fa8e39163..f111f8559a8f 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -188,7 +188,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) /* * This proc will update the icon of the ghost itself, with hair overlays, as well as the ghost image. - * Please call update_icon(icon_state) from now on when you want to update the icon_state of the ghost, + * Please call update_appearance(UPDATE_ICON, icon_state) from now on when you want to update the icon_state of the ghost, * or you might end up with hair on a sprite that's not supposed to get it. * Hair will always update its dir, so if your sprite has no dirs the haircut will go all over the place. * |- Ricotez diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index a68eecac6df6..a86dc055bc42 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -15,6 +15,7 @@ desc = "Or the A.S.S. Bot for short." icon = 'icons/mob/aibots.dmi' icon_state = "atmosbot0" + base_icon_state = "atmosbot" density = FALSE anchored = FALSE health = 25 @@ -122,10 +123,9 @@ /mob/living/simple_animal/bot/atmosbot/proc/deploy_smartmetal() if(emagged == 2) explosion(src.loc,1,2,4,flame_range = 2) - qdel(src) else deployed_smartmetal = WEAKREF(new /obj/effect/particle_effect/fluid/foam/metal/smart(get_turf(src))) - qdel(src) + qdel(src) return //Analyse the atmosphere to see if there is a potential breach nearby @@ -194,10 +194,11 @@ return breached_pressure = new_breach_pressure update_controls() - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) -/mob/living/simple_animal/bot/atmosbot/update_appearance(updates = ALL) - icon_state = "atmosbot[on][on?"_[action]":""]" +/mob/living/simple_animal/bot/atmosbot/update_icon_state() + . = ..() + icon_state = "[base_icon_state][on][on ? "_[action]" : ""]" /mob/living/simple_animal/bot/atmosbot/UnarmedAttack(atom/A, proximity) if(isturf(A) && A == get_turf(src)) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index a518aa2fcfdd..7d8e1f22e3b0 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -130,7 +130,7 @@ on = TRUE update_mobility() set_light_on(on) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) diag_hud_set_botstat() return TRUE @@ -139,7 +139,7 @@ update_mobility() set_light_on(on) bot_reset() //Resets an AI's call, should it exist. - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/Initialize(mapload) . = ..() @@ -400,7 +400,7 @@ if(istype(dropped_item, /obj/item/stock_parts/cell)) var/obj/item/stock_parts/cell/dropped_cell = dropped_item dropped_cell.charge = 0 - dropped_cell.update_appearance(updates = ALL) + dropped_cell.update_appearance(UPDATE_ICON) else if(istype(dropped_item, /obj/item/storage)) var/obj/item/storage/S = dropped_item @@ -409,7 +409,7 @@ else if(istype(dropped_item, /obj/item/gun/energy)) var/obj/item/gun/energy/dropped_gun = dropped_item dropped_gun.cell.charge = 0 - dropped_gun.update_appearance(updates = ALL) + dropped_gun.update_appearance(UPDATE_ICON) //Generalized behavior code, override where needed! @@ -855,8 +855,9 @@ Pass a positive integer as an argument to override a bot's default speed. ejectpai(usr) update_controls() -/mob/living/simple_animal/bot/update_appearance(updates = ALL) - icon_state = "[initial(icon_state)][on]" +/mob/living/simple_animal/bot/update_icon_state() + icon_state = "[isnull(base_icon_state) ? initial(icon_state) : base_icon_state][on]" + return ..() // Machinery to simplify topic and access calls /obj/machinery/bot_core diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 77de074503d1..f7c3c7a8d498 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -214,17 +214,28 @@ . = ..() update_appearance(updates = ALL) -/obj/item/bot_assembly/floorbot/update_appearance(updates = ALL) - ..() +/obj/item/bot_assembly/floorbot/update_name() + . = ..() switch(build_step) - if(ASSEMBLY_FIRST_STEP) - desc = initial(desc) + if(ASSEMBLY_SECOND_STEP) + name = "incomplete floorbot assembly" + else name = initial(name) - icon_state = "[toolbox_color]toolbox_tiles" +/obj/item/bot_assembly/floorbot/update_desc() + . = ..() + switch(build_step) if(ASSEMBLY_SECOND_STEP) desc = "It's a toolbox with tiles sticking out the top and a sensor attached." - name = "incomplete floorbot assembly" + else + desc = initial(desc) + +/obj/item/bot_assembly/floorbot/update_icon_state() + . = ..() + switch(build_step) + if(ASSEMBLY_FIRST_STEP) + icon_state = "[toolbox_color]toolbox_tiles" + if(ASSEMBLY_SECOND_STEP) icon_state = "[toolbox_color]toolbox_tiles_sensor" /obj/item/bot_assembly/floorbot/attackby(obj/item/W, mob/user, params) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 7663c8410d13..9d7347f35e07 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -286,16 +286,15 @@ flick("firebot1_use", user) internal_ext.afterattack(target, user, null) -/mob/living/simple_animal/bot/firebot/update_appearance(updates = ALL) +mob/living/simple_animal/bot/firebot/update_icon_state() + . = ..() if(!on) icon_state = "firebot0" return - if(IsStun() || IsParalyzed()) - icon_state = "firebots1" - else if(stationary_mode) //Bot has yellow light to indicate stationary mode. + if(IsStun() || IsParalyzed() || stationary_mode) //Bot has yellow light to indicate stationary mode. icon_state = "firebots1" - else - icon_state = "firebot1" + return + icon_state = "firebot1" /mob/living/simple_animal/bot/firebot/explode() diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 6e4c0737f29a..998fcf5fa9e9 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -359,7 +359,8 @@ anchored = FALSE target = null -/mob/living/simple_animal/bot/floorbot/update_appearance(updates = ALL) +/mob/living/simple_animal/bot/floorbot/update_icon_state() + . = ..() icon_state = "[toolbox_color]floorbot[on]" diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 9120a5b89fd5..12b89731e3cd 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -15,6 +15,7 @@ desc = "A little medical robot. He looks somewhat underwhelmed." icon = 'icons/mob/aibots.dmi' icon_state = "medibot0" + base_icon_state = "medibot" density = FALSE anchored = FALSE health = 20 @@ -91,23 +92,23 @@ treatment_tox_avoid = null treatment_tox = /datum/reagent/toxin/sodium_thiopental -/mob/living/simple_animal/bot/medbot/update_appearance(updates = ALL) - cut_overlays() - if(skin) - add_overlay("medskin_[skin]") +/mob/living/simple_animal/bot/medbot/update_icon_state() + . = ..() if(!on) - icon_state = "medibot0" + icon_state = "[base_icon_state]0" return if(IsStun() || IsParalyzed()) - icon_state = "medibota" + icon_state = "[base_icon_state]a" return if(mode == BOT_HEALING) - icon_state = "medibots[stationary_mode]" + icon_state = "[base_icon_state]s[stationary_mode]" return - else if(stationary_mode) //Bot has yellow light to indicate stationary mode. - icon_state = "medibot2" - else - icon_state = "medibot1" + icon_state = "[base_icon_state][stationary_mode ? 2 : 1]" //Bot has yellow light to indicate stationary mode. + +/mob/living/simple_animal/bot/medbot/update_overlays() + . = ..() + if(skin) + . += "medskin_[skin]" /mob/living/simple_animal/bot/medbot/Initialize(mapload, new_skin) . = ..() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index f4ade2ff8842..ea75ba067372 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -12,6 +12,7 @@ name = "\improper MULEbot" desc = "A Multiple Utility Load Effector bot." icon_state = "mulebot0" + base_icon_state = "mulebot" density = TRUE move_resist = MOVE_FORCE_STRONG animate_movement = 1 @@ -121,21 +122,20 @@ if(!open) locked = !locked to_chat(user, span_notice("You [locked ? "lock" : "unlock"] [src]'s controls!")) - flick("mulebot-emagged", src) + flick("[base_icon_state]-emagged", src) playsound(src, "sparks", 100, 0) -/mob/living/simple_animal/bot/mulebot/update_appearance(updates = ALL) - if(open) - icon_state="mulebot-hatch" - else - icon_state = "mulebot[wires.is_cut(WIRE_AVOIDANCE)]" - cut_overlays() - if(load && !ismob(load))//buckling handles the mob offsets - load.pixel_y = initial(load.pixel_y) + 9 - if(load.layer < layer) - load.layer = layer + 0.01 - add_overlay(load) - return +/mob/living/simple_animal/bot/mulebot/update_icon_state() //if you change the icon_state names, please make sure to update /datum/wires/mulebot/on_pulse() as well. <3 + . = ..() + icon_state = "[base_icon_state][open ? "-hatch" : wires.is_cut(WIRE_AVOIDANCE)]" + +/mob/living/simple_animal/bot/mulebot/update_overlays() + . = ..() + if(!load || ismob(load)) //mob offsets and such are handled by the riding component / buckling + return + var/mutable_appearance/load_overlay = mutable_appearance(load.icon, load.icon_state, layer + 0.01) + load_overlay.pixel_y = initial(load.pixel_y) + 9 + . += load_overlay /mob/living/simple_animal/bot/mulebot/ex_act(severity) unload(0) @@ -338,6 +338,7 @@ if(DELIGHT) audible_message("[src] makes a delighted ping!", span_italics("You hear a ping.")) playsound(loc, 'sound/machines/ping.ogg', 50, 0) + flick("[base_icon_state]1", src) // mousedrop a crate to load the bot diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 8be3d38844e9..723c986fac36 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -143,13 +143,14 @@ /mob/living/simple_animal/slime/proc/set_colour(new_colour) colour = new_colour - update_name() + update_appearance(UPDATE_NAME) slime_mutation = mutation_table(colour) var/sanitizedcolour = replacetext(colour, " ", "") coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]") regenerate_icons() /mob/living/simple_animal/slime/update_name() + . = ..() if(slime_name_regex.Find(name)) number = rand(1, 1000) name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7de785e346b4..931c1ce7594f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -674,15 +674,11 @@ ///Update the pulling hud icon /mob/proc/update_pull_hud_icon() - if(hud_used) - if(hud_used.pull_icon) - hud_used.pull_icon.update_icon(src) + hud_used?.pull_icon?.update_appearance() ///Update the resting hud icon /mob/proc/update_rest_hud_icon() - if(hud_used) - if(hud_used.rest_icon) - hud_used.rest_icon.update_icon(src) + hud_used?.rest_icon?.update_appearance() /** * Verb to activate the object in your held hand diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index b2368a0ba2a1..23358ad4cdc8 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -495,7 +495,7 @@ m_intent = MOVE_INTENT_RUN if(hud_used && hud_used.static_inventory) for(var/atom/movable/screen/mov_intent/selector in hud_used.static_inventory) - selector.update_icon(src) + selector.update_appearance(UPDATE_ICON,src) ///Moves a mob upwards in z level /mob/verb/up() diff --git a/code/modules/pai/hud.dm b/code/modules/pai/hud.dm index 52df720e507e..3c53c96395a3 100644 --- a/code/modules/pai/hud.dm +++ b/code/modules/pai/hud.dm @@ -179,57 +179,57 @@ var/mob/living/silicon/pai/mypai = mymob // Software menu - using = new /atom/movable/screen/pai/software + using = new /atom/movable/screen/pai/software(src) using.screen_loc = ui_pai_software static_inventory += using // Holoform - using = new /atom/movable/screen/pai/shell + using = new /atom/movable/screen/pai/shell(src) using.screen_loc = ui_pai_shell static_inventory += using // Chassis Select Menu - using = new /atom/movable/screen/pai/chassis + using = new /atom/movable/screen/pai/chassis(src) using.screen_loc = ui_pai_chassis static_inventory += using // Rest - using = new /atom/movable/screen/pai/rest + using = new /atom/movable/screen/pai/rest(src) using.screen_loc = ui_pai_rest static_inventory += using // Integrated Light - using = new /atom/movable/screen/pai/light + using = new /atom/movable/screen/pai/light(src) using.screen_loc = ui_pai_light static_inventory += using // Newscaster - using = new /atom/movable/screen/pai/newscaster + using = new /atom/movable/screen/pai/newscaster(src) using.screen_loc = ui_pai_newscaster static_inventory += using // Language menu - using = new /atom/movable/screen/language_menu + using = new /atom/movable/screen/language_menu(src) using.screen_loc = ui_pai_language_menu static_inventory += using // Host Monitor - using = new /atom/movable/screen/pai/host_monitor() + using = new /atom/movable/screen/pai/host_monitor(src) using.screen_loc = ui_pai_host_monitor static_inventory += using // Crew Manifest - using = new /atom/movable/screen/pai/crew_manifest() + using = new /atom/movable/screen/pai/crew_manifest(src) using.screen_loc = ui_pai_crew_manifest static_inventory += using // Laws - using = new /atom/movable/screen/pai/state_laws() + using = new /atom/movable/screen/pai/state_laws(src) using.screen_loc = ui_pai_state_laws static_inventory += using // Modular Interface - using = new /atom/movable/screen/pai/modpc() + using = new /atom/movable/screen/pai/modpc(src) using.screen_loc = ui_pai_mod_int static_inventory += using mypai.pda_button = using @@ -237,22 +237,22 @@ tablet_button.pAI = mypai // Internal GPS - using = new /atom/movable/screen/pai/internal_gps() + using = new /atom/movable/screen/pai/internal_gps(src) using.screen_loc = ui_pai_internal_gps static_inventory += using // Take image - using = new /atom/movable/screen/pai/image_take() + using = new /atom/movable/screen/pai/image_take(src) using.screen_loc = ui_pai_take_picture static_inventory += using // View images - using = new /atom/movable/screen/pai/image_view() + using = new /atom/movable/screen/pai/image_view(src) using.screen_loc = ui_pai_view_images static_inventory += using // Radio - using = new /atom/movable/screen/pai/radio() + using = new /atom/movable/screen/pai/radio(src) using.screen_loc = ui_pai_radio static_inventory += using diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index d615970a0664..15a926af4c89 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -77,7 +77,7 @@ . |= COMPONENT_ITEM_BURNT_OUT charge = maxcharge - update_icon() + update_appearance() // Guns need to process their chamber when we've been charged if(isgun(loc)) @@ -86,7 +86,7 @@ // The thing we're in might have overlays or icon states for whether the cell is charged if(!ismob(loc)) - loc.update_icon() + loc.update_appearance() return . diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index f451e9b3128b..637fb8e052b8 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -22,7 +22,9 @@ default_unfasten_wrench(user, W, 0) else return ..() -/obj/machinery/the_singularitygen/update_icon(power) + +/obj/machinery/the_singularitygen/update_appearance(updates = ALL, power) + . = ..() if(power) if(power>150) animate(src, icon_state = "[initial(icon_state)]_3", 10) @@ -43,4 +45,4 @@ qdel(src) else energy -= delta_time * 0.5 - update_icon(energy) + update_appearance(UPDATE_ICON, energy) diff --git a/code/modules/projectiles/ammunition/reusable/arrow.dm b/code/modules/projectiles/ammunition/reusable/arrow.dm index 38fb4d329ce3..c20184471aeb 100644 --- a/code/modules/projectiles/ammunition/reusable/arrow.dm +++ b/code/modules/projectiles/ammunition/reusable/arrow.dm @@ -40,7 +40,7 @@ if(LAZYLEN(new_parts)) CheckParts(new_parts) -/obj/item/ammo_casing/reusable/arrow/update_icon(force_update) +/obj/item/ammo_casing/reusable/arrow/update_appearance(updates = ALL, force_update) ..() cut_overlays() if(istype(explosive)) @@ -442,7 +442,7 @@ update_appearance(updates = ALL) ..() -/obj/item/ammo_casing/reusable/arrow/singulo/update_icon(force_update) +/obj/item/ammo_casing/reusable/arrow/singulo/update_appearance(updates = ALL,force_update) ..() if(istype(shard)) add_overlay(mutable_appearance(icon, "[icon_state]_[shard.icon_state]"), TRUE) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index eb8866e4b8c8..8a7024ff8930 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -647,7 +647,7 @@ attachment_overlays += M att_position += 1 - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) for(var/datum/action/A as anything in actions) A.build_all_button_icons() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 7043b283ca81..f02e3b0195e8 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -156,10 +156,10 @@ to_chat(user, span_notice("[src] is now set to [shot.select_name].")) chambered = null recharge_newshot(TRUE) - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) return -/obj/item/gun/energy/update_icon(force_update) +/obj/item/gun/energy/update_appearance(updates = ALL, force_update) if(QDELETED(src)) return ..() diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 14db367eafdd..2217d06451c6 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -175,7 +175,7 @@ to_chat(user,span_notice("You switch [src] setting to [setting] mode.")) update_appearance(updates = ALL) -/obj/item/gun/energy/dueling/update_icon(force_update) +/obj/item/gun/energy/dueling/update_appearance(updates = ALL, force_update) . = ..() if(setting_overlay) cut_overlay(setting_overlay) diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index da09c88e40cd..a50e067aa0ed 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -163,7 +163,7 @@ I.use(1) cell.give(250*charge_multiplier) user.radiation += (75*charge_multiplier) //You are putting you hand into a nuclear reactor to put more uranium in it - update_icon(TRUE) + update_appearance(UPDATE_ICON, TRUE) else if(!(previous_loc == user.loc)) to_chat(user, span_boldwarning("You move, bumping your hand on [src]'s nulear reactor's core!")) //when I said devoid of ANY safety measures I meant it diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index ac1287b8ddd7..a38c172de01f 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -49,7 +49,7 @@ . |= COMPONENT_ITEM_BURNT_OUT charges = max_charges - update_icon() + update_appearance() recharge_newshot() return . diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 0db2e85e71bd..2a678b699666 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -137,7 +137,7 @@ GLOBAL_VAR_INIT(emergency_access, FALSE) for(var/turf/in_area as anything in A.get_contained_turfs()) for(var/obj/machinery/door/airlock/D in in_area) D.emergency = TRUE - D.update_icon(ALL, 0) + D.update_appearance(ALL, 0) minor_announce("Access restrictions on maintenance and external airlocks have been lifted.", "Attention! Station-wide emergency declared!",1) GLOB.emergency_access = TRUE SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "enabled")) @@ -147,7 +147,7 @@ GLOBAL_VAR_INIT(emergency_access, FALSE) for(var/turf/in_area as anything in A.get_contained_turfs()) for(var/obj/machinery/door/airlock/D in in_area) D.emergency = FALSE - D.update_icon(ALL, 0) + D.update_appearance(ALL, 0) minor_announce("Access restrictions in maintenance areas have been restored.", "Attention! Station-wide emergency rescinded:") GLOB.emergency_access = FALSE SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "disabled")) diff --git a/code/modules/vending/security_armaments.dm b/code/modules/vending/security_armaments.dm index 4c7d2ceb86a1..5c8bda2a8a07 100644 --- a/code/modules/vending/security_armaments.dm +++ b/code/modules/vending/security_armaments.dm @@ -82,7 +82,7 @@ var/list/items = list() for(var/obj/item/wep in inventory) var/obj/item/gun/weapon = wep - weapon.update_icon(TRUE) + weapon.update_appearance(UPDATE_ICON, TRUE) var/icon/gun_icon = getFlatIcon(wep) var/list/details = list() diff --git a/yogstation/code/game/gamemodes/darkspawn/darkspawn_hud.dm b/yogstation/code/game/gamemodes/darkspawn/darkspawn_hud.dm index 13890fcc370e..553f99906dd7 100644 --- a/yogstation/code/game/gamemodes/darkspawn/darkspawn_hud.dm +++ b/yogstation/code/game/gamemodes/darkspawn/darkspawn_hud.dm @@ -3,13 +3,13 @@ /datum/hud/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi') . = ..() - psi_counter = new /atom/movable/screen/darkspawn_psi + psi_counter = new /atom/movable/screen/darkspawn_psi(src) /datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi') . = ..() - psi_counter = new /atom/movable/screen/darkspawn_psi + psi_counter = new /atom/movable/screen/darkspawn_psi(src) infodisplay += psi_counter /datum/hud/Destroy() . = ..() - psi_counter = null \ No newline at end of file + psi_counter = null diff --git a/yogstation/code/game/gamemodes/vampire/vampire_hud.dm b/yogstation/code/game/gamemodes/vampire/vampire_hud.dm index c1bbbefae04c..f43b025c1d78 100644 --- a/yogstation/code/game/gamemodes/vampire/vampire_hud.dm +++ b/yogstation/code/game/gamemodes/vampire/vampire_hud.dm @@ -3,13 +3,13 @@ /datum/hud/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi') . = ..() - vamp_blood_display = new /atom/movable/screen/vampire() + vamp_blood_display = new /atom/movable/screen/vampire(src) /datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi') . = ..() - vamp_blood_display = new /atom/movable/screen/vampire() + vamp_blood_display = new /atom/movable/screen/vampire(src) infodisplay += vamp_blood_display /datum/hud/Destroy() . = ..() - vamp_blood_display = null \ No newline at end of file + vamp_blood_display = null diff --git a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm index 560406da89fd..b362ea5c6abb 100644 --- a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm +++ b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm @@ -49,7 +49,8 @@ GLOBAL_LIST_EMPTY(bluespace_pipe_networks) /obj/machinery/atmospherics/pipe/bluespace/hide() update_appearance(updates = ALL) -/obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe) +/obj/machinery/atmospherics/pipe/bluespace/update_appearance(updates = ALL, showpipe) + . = ..() underlays.Cut() var/turf/T = loc diff --git a/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm b/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm index 091daa91b1b9..29662f0bdf65 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm @@ -14,9 +14,9 @@ speak_chance = 2 turns_per_move = 5 butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2) - response_help = "pets" + response_help = "pets" response_disarm = "gently pushes aside" - response_harm = "kicks" + response_harm = "kicks" attacktext = "kicks" health = 60 maxHealth = 60 @@ -33,7 +33,7 @@ if(random_color) var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) var/datum/component/riding/D = LoadComponent(/datum/component/riding) D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 8, MOB_LAYER), TEXT_SOUTH = list(0, 8, MOB_LAYER), TEXT_EAST = list(0, 8, MOB_LAYER), TEXT_WEST = list( 0, 8, MOB_LAYER))) D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER) @@ -44,7 +44,7 @@ /mob/living/simple_animal/chocobo/death(gibbed) . = ..() - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) for(var/mob/living/N in buckled_mobs) unbuckle_mob(N) can_buckle = FALSE @@ -53,17 +53,12 @@ . = ..() if(.) can_buckle = initial(can_buckle) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) -/mob/living/simple_animal/chocobo/update_appearance(updates = ALL) +/mob/living/simple_animal/chocobo/update_overlays() + . = ..() if(!random_color) //icon override return - cut_overlays() - if(stat == DEAD) - var/mutable_appearance/base_overlay = mutable_appearance(icon, "chocobo_limbs_dead") - base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) - else - var/mutable_appearance/base_overlay = mutable_appearance(icon, "chocobo_limbs") - base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + var/mutable_appearance/base_overlay = mutable_appearance(icon, "chocobo_limbs[(stat == DEAD) ? "_dead" : ""]") + base_overlay.appearance_flags = RESET_COLOR + . += base_overlay diff --git a/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm b/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm index df03f7078439..9d2ebd5f8596 100644 --- a/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm +++ b/yogstation/code/modules/mob/living/simple_animal/hostile/retaliate/king_of_goats.dm @@ -251,11 +251,10 @@ Difficulty: Insanely Hard player.music_path = /datum/music/sourced/battle/king_goat_2 player.do_range_check(0) stun_chance = 10 - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) visible_message(span_cult("\The [src]' wounds close with a flash, and when he emerges, he's even larger than before!")) - -/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/update_appearance(updates = ALL) +/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/update_icon_state() var/matrix/M = new if(phase3) icon_state = "king_goat3" @@ -265,6 +264,7 @@ Difficulty: Insanely Hard M.Scale(1.25) transform = M pixel_y = 10 + return ..() /mob/living/simple_animal/hostile/retaliate/goat/king/phase2/Life(seconds_per_tick = SSMOBS_DT, times_fired) . = ..() diff --git a/yogstation/code/modules/xenoarch/loot/guns.dm b/yogstation/code/modules/xenoarch/loot/guns.dm index 5c59228e29a1..35bb996e009a 100644 --- a/yogstation/code/modules/xenoarch/loot/guns.dm +++ b/yogstation/code/modules/xenoarch/loot/guns.dm @@ -17,7 +17,7 @@ . = ..() playsound(src, 'yogstation/sound/weapons/spur_spawn.ogg') -/obj/item/gun/energy/polarstar/update_icon(force_update) +/obj/item/gun/energy/polarstar/update_appearance(updates = ALL, force_update) var/maxcharge = cell.maxcharge var/charge = cell.charge From e75b1d1169b518132621968b4cc022d477073049 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Sun, 18 Jun 2023 22:34:38 -0300 Subject: [PATCH 06/18] dibidy doo --- code/_onclick/telekinesis.dm | 19 ++++++------- .../components/storage/concrete/_concrete.dm | 13 ++++----- code/datums/components/storage/storage.dm | 4 +-- code/datums/martial/sleeping_carp.dm | 4 +-- .../game/gamemodes/clown_ops/bananium_bomb.dm | 1 + code/game/machinery/Sleeper.dm | 1 + code/game/machinery/ai_slipper.dm | 3 +- code/game/machinery/airlock_control.dm | 11 ++------ code/game/machinery/announcement_system.dm | 12 ++++---- code/game/machinery/aug_manipulator.dm | 1 + code/game/machinery/bounty_board.dm | 4 +-- code/game/machinery/buttons.dm | 28 +++++++++++-------- code/game/machinery/camera/camera.dm | 3 +- code/game/machinery/camera/camera_assembly.dm | 1 + code/game/machinery/cell_charger.dm | 20 +++++++------ code/game/machinery/computer/_computer.dm | 1 + code/game/machinery/computer/aifixer.dm | 1 + code/game/machinery/computer/arcade.dm | 1 + code/game/machinery/computer/atmos_alert.dm | 1 + code/game/machinery/computer/atmos_control.dm | 1 + code/game/machinery/computer/camera.dm | 1 + code/game/machinery/computer/station_alert.dm | 1 + code/game/machinery/dance_machine.dm | 8 ++---- code/game/machinery/decontamination.dm | 4 +-- code/game/machinery/defibrillator_mount.dm | 1 + code/game/machinery/dna_scanner.dm | 1 + code/game/machinery/doors/brigdoors.dm | 1 + code/game/machinery/doors/firedoor.dm | 1 + code/game/machinery/doors/passworddoor.dm | 1 + code/game/machinery/doors/poddoor.dm | 1 + code/game/machinery/doppler_array.dm | 1 + code/game/machinery/droneDispenser.dm | 1 + code/game/machinery/electrolyzer.dm | 1 + .../embedded_controller/access_controller.dm | 2 ++ .../embedded_controller/airlock_controller.dm | 1 + .../embedded_controller_base.dm | 1 + .../simple_vent_controller.dm | 1 + code/game/machinery/fat_sucker.dm | 1 + code/game/machinery/flasher.dm | 1 + code/game/machinery/gulag_processor.dm | 1 + code/game/machinery/gulag_teleporter.dm | 1 + code/game/machinery/holosign.dm | 1 + code/game/machinery/igniter.dm | 2 ++ code/game/machinery/magnet.dm | 1 + code/game/machinery/medical_kiosk.dm | 1 + code/game/machinery/navbeacon.dm | 1 + .../machinery/porta_turret/portable_turret.dm | 2 ++ code/game/machinery/rechargestation.dm | 1 + code/game/machinery/sci_bombardment.dm | 1 + code/game/machinery/shieldgen.dm | 1 + code/game/machinery/slotmachine.dm | 1 + code/game/machinery/spaceheater.dm | 1 + code/game/machinery/suit_storage_unit.dm | 1 + code/game/machinery/syndicatebomb.dm | 1 + .../telecomms/machines/broadcaster.dm | 3 +- .../telecomms/machines/message_server.dm | 1 + .../machinery/telecomms/telecomunications.dm | 1 + code/game/machinery/teleporter.dm | 2 ++ code/game/machinery/transformer.dm | 1 + code/game/machinery/washing_machine.dm | 1 + code/game/mecha/mech_bay.dm | 1 + code/game/mecha/mecha.dm | 1 + code/game/mecha/working/ripley.dm | 1 + .../effects/decals/cleanable/humans.dm | 1 + .../temporary_visuals/miscellaneous.dm | 2 ++ code/game/objects/items/RCD.dm | 2 ++ code/game/objects/items/ashtray.dm | 1 + code/game/objects/items/candle.dm | 1 + code/game/objects/items/chrono_eraser.dm | 1 + code/game/objects/items/cigs_lighters.dm | 2 ++ code/game/objects/items/crayons.dm | 2 ++ code/game/objects/items/credit_holochip.dm | 1 + code/game/objects/items/defib.dm | 2 ++ code/game/objects/items/devices/PDA/PDA.dm | 1 + code/game/objects/items/devices/aicard.dm | 1 + .../objects/items/devices/lightreplacer.dm | 1 + code/game/objects/items/devices/multitool.dm | 1 + code/game/objects/items/devices/powersink.dm | 1 + .../objects/items/devices/quantum_keycard.dm | 1 + .../objects/items/devices/taperecorder.dm | 1 + .../objects/items/devices/transfer_valve.dm | 1 + code/game/objects/items/dice.dm | 1 + code/game/objects/items/discoball.dm | 1 + code/game/objects/items/etherealdiscoball.dm | 1 + code/game/objects/items/flamethrower.dm | 1 + code/game/objects/items/grenades/plastic.dm | 1 + code/game/objects/items/handcuffs.dm | 1 + code/game/objects/items/hot_potato.dm | 1 + code/game/objects/items/hourglass.dm | 1 + .../objects/items/implants/implantcase.dm | 1 + .../objects/items/implants/implantchair.dm | 1 + code/game/objects/items/implants/implanter.dm | 1 + .../game/objects/items/implants/implantpad.dm | 1 + code/game/objects/items/inducer.dm | 1 + code/game/objects/items/laser_level.dm | 1 + code/game/objects/items/pet_carrier.dm | 1 + code/game/objects/items/pinpointer.dm | 1 + code/game/objects/items/pneumaticCannon.dm | 1 + code/game/objects/items/robot/robot_items.dm | 2 ++ code/game/objects/items/robot/robot_parts.dm | 1 + .../objects/items/robot/robot_upgrades.dm | 1 + code/game/objects/items/singularityhammer.dm | 6 ++-- code/game/objects/items/stacks/medical.dm | 2 ++ code/game/objects/items/stacks/rods.dm | 1 + code/game/objects/items/stacks/stack.dm | 1 + code/game/objects/items/stacks/tickets.dm | 1 + code/game/objects/items/storage/bags.dm | 2 ++ code/game/objects/items/storage/belt.dm | 3 ++ code/game/objects/items/storage/boxes.dm | 1 + code/game/objects/items/storage/fancy.dm | 4 +++ code/game/objects/items/storage/lockbox.dm | 2 ++ code/game/objects/items/storage/toolbox.dm | 1 + code/game/objects/items/storage/wallets.dm | 1 + code/game/objects/items/stunbaton.dm | 1 + .../objects/items/supermatter_delaminator.dm | 2 ++ .../objects/items/syndicateReverseCard.dm | 1 + code/game/objects/items/tanks/jetpack.dm | 1 + code/game/objects/items/theft_tools.dm | 1 + code/game/objects/items/tools/screwdriver.dm | 1 + code/game/objects/items/tools/weldingtool.dm | 1 + code/game/objects/items/tools/wirecutters.dm | 1 + code/game/objects/items/toys.dm | 7 +++++ code/game/objects/items/twohanded.dm | 20 +++++++++++-- code/game/objects/structures/aliens.dm | 1 + code/game/objects/structures/artstuff.dm | 1 + code/game/objects/structures/bedsheet_bin.dm | 1 + .../closets/bluespace_locker.dm | 1 + .../crates_lockers/closets/bodybag.dm | 1 + .../structures/crates_lockers/crates.dm | 1 + .../structures/crates_lockers/crates/bins.dm | 1 + .../crates_lockers/crates/critter.dm | 1 + .../crates_lockers/crates/secure.dm | 1 + code/game/objects/structures/displaycase.dm | 1 + code/game/objects/structures/divine.dm | 1 + code/game/objects/structures/door_assembly.dm | 1 + code/game/objects/structures/extinguisher.dm | 1 + code/game/objects/structures/false_walls.dm | 3 +- code/game/objects/structures/fireaxe.dm | 1 + code/game/objects/structures/fireplace.dm | 1 + code/game/objects/structures/grille.dm | 1 + code/game/objects/structures/guncase.dm | 1 + code/game/objects/structures/headpike.dm | 1 + code/game/objects/structures/holosign.dm | 1 + code/game/objects/structures/janicart.dm | 1 + code/game/objects/structures/ladders.dm | 1 + code/game/objects/structures/life_candle.dm | 1 + code/game/objects/structures/mineral_doors.dm | 1 + code/game/objects/structures/mop_bucket.dm | 1 + code/game/objects/structures/morgue.dm | 2 ++ code/game/objects/structures/safe.dm | 1 + code/game/objects/structures/stairs.dm | 1 + code/game/objects/structures/tables_racks.dm | 1 + .../game/objects/structures/tank_dispenser.dm | 1 + .../transit_tubes/transit_tube_cargo_pod.dm | 1 + .../transit_tubes/transit_tube_pod.dm | 1 + code/game/objects/structures/watercloset.dm | 2 ++ .../objects/structures/windoor_assembly.dm | 1 + code/game/objects/structures/window.dm | 2 ++ code/game/turfs/simulated/floor.dm | 1 + .../game/turfs/simulated/floor/fancy_floor.dm | 1 + .../game/turfs/simulated/floor/light_floor.dm | 1 + .../turfs/simulated/floor/mineral_floor.dm | 1 + code/game/turfs/simulated/floor/misc_floor.dm | 1 + .../turfs/simulated/floor/plasteel_floor.dm | 1 + code/game/turfs/simulated/floor/plating.dm | 1 + code/game/turfs/simulated/minerals.dm | 1 + code/game/turfs/simulated/wall/reinf_walls.dm | 1 + code/game/turfs/space/transit.dm | 1 + code/modules/NTNet/relays.dm | 1 + code/modules/VR/vr_sleeper.dm | 1 + code/modules/antagonists/_common/antag_hud.dm | 1 + .../abductor/equipment/abduction_gear.dm | 1 + .../abductor/machinery/experiment.dm | 1 + .../antagonists/blob/structures/_blob.dm | 4 ++- .../antagonists/blob/structures/core.dm | 1 + .../antagonists/blob/structures/node.dm | 1 + .../antagonists/blob/structures/shield.dm | 1 + .../structures/bloodsucker_crypt.dm | 3 ++ .../clockcult/clock_effects/clock_sigils.dm | 1 + code/modules/antagonists/cult/cult_items.dm | 2 ++ .../antagonists/cult/cult_structures.dm | 1 + .../nukeop/equipment/nuclearbomb.dm | 1 + .../antagonists/zombie/abilities/spit.dm | 1 + code/modules/assembly/bomb.dm | 1 + code/modules/assembly/holder.dm | 1 + code/modules/assembly/mousetrap.dm | 1 + code/modules/assembly/proximity.dm | 1 + code/modules/assembly/signaler.dm | 1 + code/modules/assembly/timer.dm | 1 + .../atmospherics/machinery/airalarm.dm | 1 + .../atmospherics/machinery/atmosmachinery.dm | 1 + .../components/binary_devices/circulator.dm | 1 + .../machinery/components/components_base.dm | 1 + .../machinery/components/fusion/hfr_parts.dm | 1 + .../components/trinary_devices/filter.dm | 1 + .../components/trinary_devices/mixer.dm | 1 + .../components/unary_devices/cryo.dm | 1 + .../unary_devices/heat_exchanger.dm | 1 + .../components/unary_devices/thermomachine.dm | 1 + .../atmospherics/machinery/other/miner.dm | 1 + .../machinery/pipes/heat_exchange/junction.dm | 1 + .../machinery/pipes/heat_exchange/manifold.dm | 1 + .../pipes/heat_exchange/manifold4w.dm | 1 + .../machinery/pipes/heat_exchange/simple.dm | 1 + .../machinery/pipes/layermanifold.dm | 3 +- .../atmospherics/machinery/pipes/manifold.dm | 1 + .../machinery/pipes/manifold4w.dm | 1 + .../atmospherics/machinery/pipes/simple.dm | 1 + .../machinery/portable/canister.dm | 1 + .../atmospherics/machinery/portable/pump.dm | 1 + .../machinery/portable/scrubber.dm | 2 ++ code/modules/awaymissions/gateway.dm | 3 ++ code/modules/cargo/supplypod.dm | 1 + code/modules/cargo/supplypod_beacon.dm | 1 + code/modules/clothing/ears/_ears.dm | 1 + .../clothing/glasses/engine_goggles.dm | 1 + code/modules/clothing/head/hardhat.dm | 2 ++ code/modules/clothing/head/helmet.dm | 1 + code/modules/clothing/head/misc_special.dm | 1 + code/modules/clothing/neck/bodycamera.dm | 1 + code/modules/clothing/shoes/bananashoes.dm | 1 + code/modules/clothing/spacesuits/hardsuit.dm | 1 + code/modules/events/pirates.dm | 1 + .../food_and_drinks/drinks/drinks/bottle.dm | 1 + .../food_and_drinks/food/customizables.dm | 1 + .../food_and_drinks/food/snacks_pastry.dm | 1 + .../kitchen_machinery/gibber.dm | 1 + .../kitchen_machinery/grill.dm | 1 + .../kitchen_machinery/microwave.dm | 1 + .../food_and_drinks/kitchen_machinery/oven.dm | 1 + .../kitchen_machinery/smartfridge.dm | 2 ++ code/modules/food_and_drinks/pizzabox.dm | 1 + code/modules/games/cas.dm | 2 ++ code/modules/goals/station_goals/shield.dm | 1 + code/modules/holodeck/items.dm | 1 + code/modules/holodeck/turfs.dm | 1 + .../hydroponics/beekeeping/honeycomb.dm | 1 + code/modules/hydroponics/biogenerator.dm | 1 + code/modules/hydroponics/fermenting_barrel.dm | 1 + code/modules/hydroponics/gene_modder.dm | 2 ++ code/modules/hydroponics/hydroponics.dm | 1 + code/modules/library/lib_items.dm | 1 + code/modules/library/soapstone.dm | 1 + code/modules/mapping/minimap.dm | 1 + .../modules/mining/equipment/explorer_gear.dm | 1 + .../mining/equipment/kinetic_crusher.dm | 4 ++- .../mining/equipment/marker_beacons.dm | 2 ++ .../mining/equipment/regenerative_core.dm | 1 + code/modules/mining/equipment/survival_pod.dm | 1 + code/modules/mining/lavaland/ash_flora.dm | 1 + .../mining/lavaland/necropolis_chests.dm | 2 ++ code/modules/mining/lavaland/world_anvil.dm | 1 + code/modules/mining/machine_redemption.dm | 1 + code/modules/mining/machine_vending.dm | 1 + code/modules/mining/ores_coins.dm | 2 ++ code/modules/mob/living/brain/MMI.dm | 1 + code/modules/mob/living/brain/posibrain.dm | 1 + .../silicon/ai/decentralized/ai_data_core.dm | 1 + .../ai/decentralized/server_cabinet.dm | 1 + .../mob/living/simple_animal/bot/secbot.dm | 1 + .../living/simple_animal/eldritch_demons.dm | 12 ++++---- .../simple_animal/friendly/spiderbot.dm | 1 + .../computers/item/computer.dm | 1 + .../computers/item/laptop/laptop.dm | 1 + .../computers/item/tablet/tablet.dm | 1 + .../computers/machinery/modular_computer.dm | 1 + code/modules/paperwork/carbonpaper.dm | 1 + code/modules/paperwork/clipboard.dm | 1 + code/modules/paperwork/filingcabinet.dm | 1 + code/modules/paperwork/folders.dm | 1 + code/modules/paperwork/inspector_booth.dm | 1 + code/modules/paperwork/paper.dm | 1 + code/modules/paperwork/paper_bundle.dm | 1 + code/modules/paperwork/paper_cutter.dm | 1 + code/modules/paperwork/paperbin.dm | 1 + code/modules/paperwork/paperplane.dm | 1 + code/modules/paperwork/papershredder.dm | 1 + code/modules/paperwork/pen.dm | 1 + code/modules/paperwork/ticketmachine.dm | 2 ++ code/modules/photography/photos/frame.dm | 2 ++ code/modules/photography/photos/photo.dm | 1 + code/modules/plumbing/ducts.dm | 4 ++- code/modules/power/apc.dm | 1 + code/modules/power/cable.dm | 2 ++ code/modules/power/cell.dm | 1 + code/modules/power/generator.dm | 1 + code/modules/power/gravitygenerator.dm | 2 ++ code/modules/power/lighting.dm | 1 + code/modules/power/port_gen.dm | 1 + code/modules/power/singularity/collector.dm | 1 + code/modules/power/singularity/emitter.dm | 1 + .../power/singularity/field_generator.dm | 1 + .../particle_accelerator.dm | 1 + .../particle_accelerator/particle_control.dm | 1 + code/modules/power/smes.dm | 1 + code/modules/power/solar.dm | 2 ++ .../projectiles/ammunition/_ammunition.dm | 1 + .../projectiles/ammunition/reusable/foam.dm | 1 + .../projectiles/attachments/_attachment.dm | 1 + .../boxes_magazines/_box_magazine.dm | 1 + .../boxes_magazines/external/grenade.dm | 1 + .../boxes_magazines/external/lmg.dm | 1 + .../boxes_magazines/external/pistol.dm | 3 ++ .../boxes_magazines/external/rechargable.dm | 4 +++ .../boxes_magazines/external/rifle.dm | 5 ++++ .../boxes_magazines/external/shotgun.dm | 1 + .../boxes_magazines/external/smg.dm | 7 ++++- .../boxes_magazines/external/sniper.dm | 1 + .../boxes_magazines/external/toy.dm | 3 ++ code/modules/projectiles/gun.dm | 1 + code/modules/projectiles/guns/ballistic.dm | 1 + .../projectiles/guns/ballistic/automatic.dm | 2 ++ .../modules/projectiles/guns/ballistic/bow.dm | 2 ++ .../guns/ballistic/laser_gatling.dm | 1 + .../projectiles/guns/ballistic/minigun.dm | 1 + .../projectiles/guns/ballistic/rifle.dm | 1 + .../projectiles/guns/ballistic/shotgun.dm | 1 + .../projectiles/guns/energy/dueling.dm | 1 + .../projectiles/guns/energy/energy_gun.dm | 1 + .../guns/energy/kinetic_accelerator.dm | 1 + .../projectiles/guns/energy/special.dm | 2 ++ code/modules/projectiles/guns/magic/wand.dm | 1 + .../projectiles/guns/misc/beam_rifle.dm | 1 + .../projectiles/guns/misc/blastcannon.dm | 1 + .../chemistry/machinery/chem_dispenser.dm | 1 + .../chemistry/machinery/chem_heater.dm | 1 + .../chemistry/machinery/chem_master.dm | 1 + .../reagents/chemistry/machinery/pandemic.dm | 1 + .../chemistry/machinery/reagentgrinder.dm | 1 + .../chemistry/machinery/smoke_machine.dm | 1 + .../reagents/reagent_containers/blood_pack.dm | 1 + .../reagents/reagent_containers/borghypo.dm | 1 + .../reagents/reagent_containers/bottle.dm | 1 + .../reagents/reagent_containers/dropper.dm | 1 + .../reagents/reagent_containers/glass.dm | 3 ++ .../reagents/reagent_containers/hypospray.dm | 2 ++ .../reagents/reagent_containers/syringes.dm | 1 + code/modules/recycling/conveyor2.dm | 2 ++ code/modules/recycling/disposal/bin.dm | 1 + .../recycling/disposal/construction.dm | 1 + code/modules/religion/religion_structures.dm | 1 + code/modules/research/destructive_analyzer.dm | 1 + code/modules/research/experimentor.dm | 1 + .../research/nanites/nanite_chamber.dm | 1 + .../research/nanites/public_chamber.dm | 1 + code/modules/research/server.dm | 1 + code/modules/shuttle/manipulator.dm | 3 +- .../shuttle/spaceship_navigation_beacon.dm | 1 + code/modules/shuttle/special.dm | 1 + code/modules/surgery/anesthesia_machine.dm | 1 + code/modules/surgery/organs/appendix.dm | 2 ++ code/modules/surgery/organs/augment_legs.dm | 1 + code/modules/surgery/organs/augments_arms.dm | 1 + code/modules/surgery/organs/augments_chest.dm | 2 ++ code/modules/surgery/organs/heart.dm | 1 + code/modules/vehicles/pimpin_ride.dm | 1 + code/modules/vending/_vending.dm | 1 + .../code/game/gamemodes/gangs/dominator.dm | 1 + .../code/game/gamemodes/gangs/gangtool.dm | 1 + yogstation/code/game/objects/items/brace.dm | 1 + .../code/game/objects/items/fishing/rods.dm | 1 + .../game/objects/items/holotool/holotool.dm | 1 + .../code/game/objects/items/sharpener.dm | 1 + yogstation/code/modules/assembly/signaler.dm | 1 + .../code/modules/clothing/head/helmet.dm | 1 + yogstation/code/modules/power/validhunter.dm | 1 + .../reagents/reagent_containers/hypospray.dm | 2 ++ .../recycling/disposal/pipe_sorting.dm | 1 + yogstation/code/modules/spacepods/spacepod.dm | 1 + 369 files changed, 530 insertions(+), 84 deletions(-) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 1204d09cc6b3..5b939df19f09 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -183,16 +183,15 @@ return new /obj/effect/temp_visual/telekinesis(get_turf(focus)) -/obj/item/tk_grab/update_appearance(updates = ALL) - cut_overlays() - if(focus) - var/old_layer = focus.layer - var/old_plane = focus.plane - focus.layer = layer+0.01 - focus.plane = ABOVE_HUD_PLANE - add_overlay(focus) //this is kind of ick, but it's better than using icon() - focus.layer = old_layer - focus.plane = old_plane +/obj/item/tk_grab/update_overlays() + . = ..() + if(!focus) + return + + var/mutable_appearance/focus_overlay = new(focus) + focus_overlay.layer = layer + 0.01 + focus_overlay.plane = ABOVE_HUD_PLANE + . += focus_overlay /obj/item/tk_grab/suicide_act(mob/user) user.visible_message(span_suicide("[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!")) diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 57397013caba..507f24292d0b 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -140,7 +140,7 @@ SEND_SIGNAL(parent, COMSIG_STORAGE_REMOVED, AM, new_location) if(isobj(parent)) var/obj/O = parent - O.update_appearance(updates = ALL) + O.update_appearance() return TRUE /datum/component/storage/concrete/proc/slave_can_insert_object(datum/component/storage/slave, obj/item/I, stop_messages = FALSE, mob/M) @@ -191,13 +191,12 @@ if(!prevent_warning) mob_item_insertion_feedback(usr, M, I) SEND_SIGNAL(parent, COMSIG_STORAGE_INSERTED, I, M) - update_appearance(updates = ALL) + update_icons() return TRUE -/datum/component/storage/concrete/update_appearance(updates = ALL) +/datum/component/storage/concrete/update_icons() if(isobj(parent)) var/obj/O = parent - O.update_appearance(updates = ALL) - for(var/i in slaves) - var/datum/component/storage/slave = i - slave.update_appearance(updates = ALL) + O.update_appearance() + for(var/datum/component/storage/slave as anything in slaves) + slave.update_icons() diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 6a2c397a6c8b..1eac549f30dc 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -688,10 +688,10 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance... viewing.show_message(span_notice("[M] puts [I] [insert_preposition]to [parent]."), MSG_VISUAL) -/datum/component/storage/proc/update_appearance(updates = ALL) +/datum/component/storage/proc/update_icons() if(isobj(parent)) var/obj/O = parent - O.update_appearance(updates = ALL) + O.update_appearance() /datum/component/storage/proc/signal_insertion_attempt(datum/source, obj/item/I, mob/M, silent = FALSE, force = FALSE) if((!force && !can_be_inserted(I, TRUE, M)) || (I == parent)) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index db0de0c7777f..25e957c32f44 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -181,9 +181,9 @@ righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' block_chance = 50 -/obj/item/twohanded/bostaff/update_appearance(updates = ALL) +/obj/item/twohanded/bostaff/update_icon_state() icon_state = "bostaff[wielded]" - return + return ..() /obj/item/twohanded/bostaff/attack(mob/target, mob/living/user) add_fingerprint(user) diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index 6270d4494951..13106b020650 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -5,6 +5,7 @@ icon_state = "bananiumbomb_base" /obj/machinery/nuclearbomb/syndicate/bananium/update_appearance(updates = ALL) + . = ..() if(deconstruction_state == NUKESTATE_INTACT) switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 515f4c174114..d41944ec70fc 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -70,6 +70,7 @@ stasis = (I >= 4) /obj/machinery/sleeper/update_appearance(updates = ALL) + . = ..() if(state_open) icon_state = "[initial(icon_state)]-open" else diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 5527f0746485..6f8e7f9a43e5 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -17,13 +17,14 @@ . = ..() . += span_notice("It has [uses] uses of foam remaining.") -/obj/machinery/ai_slipper/update_appearance(updates = ALL) +/obj/machinery/ai_slipper/update_icon_state() if(stat & BROKEN) return if((stat & NOPOWER) || cooldown_time > world.time || !uses) icon_state = "ai-slipper0" else icon_state = "ai-slipper1" + return ..() /obj/machinery/ai_slipper/interact(mob/user) if(!allowed(user)) diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index f17d6f15623e..c420ad12fa5e 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -113,14 +113,9 @@ id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER -/obj/machinery/airlock_sensor/update_appearance(updates = ALL) - if(on) - if(alert) - icon_state = "airlock_sensor_alert" - else - icon_state = "airlock_sensor_standby" - else - icon_state = "airlock_sensor_off" +/obj/machinery/airlock_sensor/update_icon_state() + icon_state = "airlock_sensor_[on ? "[alert ? "alert" : "standby"]" : "off"]" + return ..() /obj/machinery/airlock_sensor/attack_hand(mob/user) . = ..() diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index b62ac76f829f..0c1f3def8f4d 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -32,23 +32,23 @@ GLOBAL_LIST_EMPTY(announcement_systems) radio = new /obj/item/radio/headset/silicon/ai(src) update_appearance(updates = ALL) -/obj/machinery/announcement_system/update_appearance(updates = ALL) - cut_overlays() +/obj/machinery/announcement_system/update_overlays() + . = ..() if(is_operational()) var/mutable_appearance/on_app = mutable_appearance(icon, "AAS_on") - add_overlay(on_app) + . += on_app if(arrivalToggle) var/mutable_appearance/arriving = mutable_appearance(icon, greenlight) - add_overlay(arriving) + . += arriving if(newheadToggle) var/mutable_appearance/newhead = mutable_appearance(icon, pinklight) - add_overlay(newhead) + . += newhead if(stat & BROKEN) var/mutable_appearance/icecream = mutable_appearance(icon, errorlight) - add_overlay(icecream) + . += icecream /obj/machinery/announcement_system/Destroy() QDEL_NULL(radio) diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 51af57cef9de..eacb61be45f4 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -20,6 +20,7 @@ return ..() /obj/machinery/aug_manipulator/update_appearance(updates = ALL) + . = ..() cut_overlays() if(stat & BROKEN) diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index 79e1ffb2296d..a54e4a6f3f6c 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -31,12 +31,12 @@ GLOBAL_LIST_EMPTY(request_list) GLOB.allbountyboards -= src . = ..() -/obj/machinery/bounty_board/update_appearance(updates = ALL) - ..() +/obj/machinery/bounty_board/update_icon_state() if(stat & (NOPOWER|BROKEN)) icon_state = "request_kiosk_off" else icon_state = "request_kiosk" + return /obj/machinery/bounty_board/attackby(obj/item/I, mob/living/user, params) . = ..() diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index b3ffce316465..948cb200dc3b 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -42,20 +42,26 @@ board.accesses = req_one_access -/obj/machinery/button/update_appearance(updates = ALL) - cut_overlays() +/obj/machinery/button/update_icon_state() if(panel_open) icon_state = "button-open" - if(device) - add_overlay("button-device") - if(board) - add_overlay("button-board") + return ..() + if(stat & (NOPOWER|BROKEN)) + icon_state = "[skin]-p" + return ..() + icon_state = skin + return ..() - else - if(stat & (NOPOWER|BROKEN)) - icon_state = "[skin]-p" - else - icon_state = skin +/obj/machinery/button/update_overlays() + . = ..() +// if(light_mask && !(machine_stat & (NOPOWER|BROKEN)) && !panel_open) +// . += emissive_appearance(icon, light_mask, src, alpha = alpha) + if(!panel_open) + return + if(device) + . += "button-device" + if(board) + . += "button-board" /obj/machinery/button/attackby(obj/item/W, mob/user, params) if(W.tool_behaviour == TOOL_SCREWDRIVER) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index b9d5072c49a7..fd4dbaa382c4 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -354,7 +354,8 @@ new /obj/item/stack/cable_coil(loc, 2) qdel(src) -/obj/machinery/camera/update_appearance(updates = ALL) //TO-DO: Make panel open states, xray camera, and indicator lights overlays instead. +/obj/machinery/camera/update_appearance(updates = ALL) + . = ..() //TO-DO: Make panel open states, xray camera, and indicator lights overlays instead. var/xray_module if(isXRay(TRUE)) xray_module = "xray" diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 4e9e75b1edd2..fe098f2dbd68 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -68,6 +68,7 @@ setDir(ndir) /obj/structure/camera_assembly/update_appearance(updates = ALL) + . = ..() icon_state = "[xray_module ? "xray" : null][initial(icon_state)]" /obj/structure/camera_assembly/handle_atom_del(atom/A) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index b3132647474e..7ddb89201d1d 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -13,15 +13,17 @@ var/chargelevel = -1 var/charge_rate = 250 -/obj/machinery/cell_charger/update_appearance(updates = ALL) - cut_overlays() - if(charging) - add_overlay(image(charging.icon, charging.icon_state)) - add_overlay("ccharger-on") - if(!(stat & (BROKEN|NOPOWER))) - var/newlevel = round(charging.percent() * 4 / 100) - chargelevel = newlevel - add_overlay("ccharger-o[newlevel]") +/obj/machinery/cell_charger/update_overlays() + . = ..() + if(!charging) + return + + . += image(charging.icon, charging.icon_state) + . += "ccharger-on" + if(!(stat & (BROKEN|NOPOWER))) + var/newlevel = round(charging.percent() * 4 / 100) + chargelevel = newlevel + . += "ccharger-o[newlevel]" /obj/machinery/cell_charger/examine(mob/user) . = ..() diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm index 100aae7c15dd..ac668106d71f 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -55,6 +55,7 @@ update_appearance(updates = ALL) /obj/machinery/computer/update_appearance(updates = ALL) + . = ..() cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index d9e7896f7db6..3be1b1dd4b8e 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -78,6 +78,7 @@ update_appearance(updates = ALL) /obj/machinery/computer/aifixer/update_appearance(updates = ALL) + . = ..() ..() if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 27b3ab0878fb..2b820eb18dc2 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -84,6 +84,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( Reset() /obj/machinery/computer/arcade/update_appearance(updates = ALL) + . = ..() if(dir == 2) icon_screen = "invaders" else diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index d7f67d356a44..2f1a8213499f 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -78,6 +78,7 @@ return /obj/machinery/computer/atmos_alert/update_appearance(updates = ALL) + . = ..() ..() if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index f94fe808a40e..519c44c2b993 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -43,6 +43,7 @@ id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR /obj/machinery/air_sensor/update_appearance(updates = ALL) + . = ..() icon_state = "gsensor[on]" /obj/machinery/air_sensor/process_atmos() diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 5c8148851cf7..46c4a8ef62dc 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -261,6 +261,7 @@ light_power = 0 /obj/machinery/computer/security/telescreen/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) if(stat & BROKEN) icon_state += "b" diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index a848bc171255..c206143445ca 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -75,6 +75,7 @@ return !cleared /obj/machinery/computer/station_alert/update_appearance(updates = ALL) + . = ..() ..() if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index bd5c8576eed8..ef4fd2fda0bd 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -80,11 +80,9 @@ return return ..() -/obj/machinery/jukebox/update_appearance(updates = ALL) - if(active) - icon_state = "[initial(icon_state)]-active" - else - icon_state = "[initial(icon_state)]" +/obj/machinery/jukebox/update_icon_state() + icon_state = "[initial(icon_state)][active ? "-active" : null]" + return ..() /obj/machinery/jukebox/ui_status(mob/user) if(!anchored) diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index be144691e02d..92074f633560 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -37,9 +37,9 @@ decon_emagged = new(list(src), FALSE) update_appearance(updates = ALL) -/obj/machinery/decontamination_unit/update_appearance(updates = ALL) - . = ..() +/obj/machinery/decontamination_unit/update_icon_state() icon_state = uv? "tube_on" : (state_open? "tube_open" : "tube") + return ..() /obj/machinery/decontamination_unit/proc/store_items() var/atom/pickup_zone = drop_location() diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index 274e5ab515a3..2f1952cef4a2 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -39,6 +39,7 @@ update_appearance(updates = ALL) /obj/machinery/defibrillator_mount/update_appearance(updates = ALL) + . = ..() cut_overlays() if(defib) add_overlay("defib") diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 8924655dfbcb..f4feda3fcda7 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -36,6 +36,7 @@ . += "Scanner has been upgraded to support autoprocessing." /obj/machinery/dna_scannernew/update_appearance(updates = ALL) + . = ..() //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 538703dfe950..d7407b43d3f4 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -315,6 +315,7 @@ // if BROKEN, display blue screen of death icon AI uses // if timing=true, run update display function /obj/machinery/door_timer/update_appearance(updates = ALL) + . = ..() if(stat & (NOPOWER)) icon_state = "frame" return diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 1cb61a63cad9..9b36050a65d3 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -475,6 +475,7 @@ . += span_notice("There are no firelock electronics in the frame. The frame could be cut apart.") /obj/structure/firelock_frame/update_appearance(updates = ALL) + . = ..() ..() icon_state = "frame[constructionStep]" diff --git a/code/game/machinery/doors/passworddoor.dm b/code/game/machinery/doors/passworddoor.dm index b5617da2591a..e3d55b528382 100644 --- a/code/game/machinery/doors/passworddoor.dm +++ b/code/game/machinery/doors/passworddoor.dm @@ -43,6 +43,7 @@ do_animate("deny") /obj/machinery/door/password/update_appearance(updates = ALL) + . = ..() if(density) icon_state = "closed" else diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 843d8ec763d3..623a47bc208d 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -90,6 +90,7 @@ playsound(src, 'sound/machines/blastdoor.ogg', 30, 1) /obj/machinery/door/poddoor/update_appearance(updates = ALL) + . = ..() if(density) icon_state = "closed" else diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 7a7906435f80..67e4ba6d8edb 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -82,6 +82,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays) return ..() /obj/machinery/doppler_array/update_appearance(updates = ALL) + . = ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else if(powered()) diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 4b4bef2f413e..abf2e341f77d 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -170,6 +170,7 @@ .++ /obj/machinery/droneDispenser/update_appearance(updates = ALL) + . = ..() if(stat & (BROKEN|NOPOWER)) icon_state = icon_off else if(mode == DRONE_RECHARGING) diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index 54710c30259f..64a1e97d2e65 100644 --- a/code/game/machinery/electrolyzer.dm +++ b/code/game/machinery/electrolyzer.dm @@ -55,6 +55,7 @@ . += "There is no power cell installed." /obj/machinery/electrolyzer/update_appearance(updates = ALL) + . = ..() cut_overlays() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" if(panel_open) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 94202b4e1e66..849a5849bcf1 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -85,6 +85,7 @@ update_appearance(updates = ALL) /obj/machinery/doorButtons/access_button/update_appearance(updates = ALL) + . = ..() if(stat & NOPOWER) icon_state = "access_button_off" else @@ -244,6 +245,7 @@ exteriorAirlock = A /obj/machinery/doorButtons/airlock_controller/update_appearance(updates = ALL) + . = ..() if(stat & NOPOWER) icon_state = "access_control_off" return diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index 91e97a8da01a..260ad8d555a8 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -256,6 +256,7 @@ program = new_prog /obj/machinery/embedded_controller/radio/airlock_controller/update_appearance(updates = ALL) + . = ..() if(on && program) if(program.memory["processing"]) icon_state = "airlock_control_process" diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 17831b25a90e..6fbfc6e5ef39 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -33,6 +33,7 @@ popup.open() /obj/machinery/embedded_controller/update_appearance(updates = ALL) + . = ..() /obj/machinery/embedded_controller/proc/return_text() diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index de009453eae0..1bb9ac69dae1 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -55,6 +55,7 @@ program = new_prog /obj/machinery/embedded_controller/radio/simple_vent_controller/update_appearance(updates = ALL) + . = ..() if(on && program) icon_state = "airlock_control_standby" else diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index 6d086dc06bd6..b7ed5685c531 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -107,6 +107,7 @@ to_chat(user, span_notice("Safety hatch [free_exit ? "unlocked" : "locked"].")) /obj/machinery/fat_sucker/update_appearance(updates = ALL) + . = ..() overlays.Cut() if(!state_open) if(processing) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index f5adf3a10b90..1d361e713664 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -47,6 +47,7 @@ return ..() /obj/machinery/flasher/update_appearance(updates = ALL) + . = ..() if (powered()) if(bulb.burnt_out) icon_state = "[base_state]1-p" diff --git a/code/game/machinery/gulag_processor.dm b/code/game/machinery/gulag_processor.dm index cfccc94fb20c..0f7036d6e4d3 100644 --- a/code/game/machinery/gulag_processor.dm +++ b/code/game/machinery/gulag_processor.dm @@ -95,6 +95,7 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( return ..() /obj/machinery/gulag_processor/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 3ce78bed938a..c87e759578f8 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -65,6 +65,7 @@ The console is located at computer/gulag_teleporter.dm return ..() /obj/machinery/gulag_teleporter/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 320f8f3d4310..6f5cb74d25c5 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -17,6 +17,7 @@ update_appearance(updates = ALL) /obj/machinery/holosign/update_appearance(updates = ALL) + . = ..() if(!lit) icon_state = initial(icon_state) set_light(0) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 25865f77ce75..737b29aab5c2 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -70,6 +70,7 @@ icon_state = "igniter[on]" /obj/machinery/igniter/update_appearance(updates = ALL) + . = ..() if(stat & NOPOWER) icon_state = "igniter0" else @@ -102,6 +103,7 @@ return ..() /obj/machinery/sparker/update_appearance(updates = ALL) + . = ..() if(disable) icon_state = "[initial(icon_state)]-d" else if(powered()) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 13fc400f415b..3d7782c751c6 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -50,6 +50,7 @@ // update the icon_state /obj/machinery/magnetic_module/update_appearance(updates = ALL) + . = ..() var/state="floor_magnet" var/onstate="" if(!on) diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index c1a746e9d953..54481583f2a8 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -71,6 +71,7 @@ return /obj/machinery/medical_kiosk/update_appearance(updates = ALL) + . = ..() if(is_operational()) icon_state = "kiosk_off" else diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index a2af8716c9fc..de69f35df4ac 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -76,6 +76,7 @@ // update the icon_state /obj/machinery/navbeacon/update_appearance(updates = ALL) + . = ..() var/state="navbeacon[open]" if(invisibility) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 7a539d6d3886..c240f0815455 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -98,6 +98,7 @@ INVOKE_ASYNC(src, PROC_REF(popUp)) /obj/machinery/porta_turret/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!anchored) icon_state = "turretCover" @@ -938,6 +939,7 @@ update_appearance(updates = ALL) /obj/machinery/turretid/update_appearance(updates = ALL) + . = ..() ..() if(stat & NOPOWER) icon_state = "control_off" diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 062a40b5ab99..c722a1e03b0a 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -95,6 +95,7 @@ add_fingerprint(occupant) /obj/machinery/recharge_station/update_appearance(updates = ALL) + . = ..() if(is_operational()) if(state_open) icon_state = "borgcharger0" diff --git a/code/game/machinery/sci_bombardment.dm b/code/game/machinery/sci_bombardment.dm index a6d4616a3c88..a49f8c19ccb4 100644 --- a/code/game/machinery/sci_bombardment.dm +++ b/code/game/machinery/sci_bombardment.dm @@ -60,6 +60,7 @@ return ..() /obj/machinery/sci_bombardment/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!powered(power_channel)) add_overlay("LAM_radar0") diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 9909eb2c70e4..cf86b90840f9 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -204,6 +204,7 @@ to_chat(user, span_warning("You short out the access controller.")) /obj/machinery/shieldgen/update_appearance(updates = ALL) + . = ..() if(active) icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon" else diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index f87d2063566b..e822e9a33aa7 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -66,6 +66,7 @@ money += round(delta_time / 2) //SPESSH MAJICKS /obj/machinery/computer/slot_machine/update_appearance(updates = ALL) + . = ..() if(stat & NOPOWER) icon_state = "slots0" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index c2fcec4950d9..df55cb38b0c8 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -58,6 +58,7 @@ . += "The status display reads: Temperature range at [settableTemperatureRange]°C.
    Heating power at [heatingPower*0.001]kJ.
    Power consumption at [(efficiency*-0.0025)+150]%." //100%, 75%, 50%, 25% /obj/machinery/space_heater/update_appearance(updates = ALL) + . = ..() icon_state = "sheater-[on ? "[mode]" : "off"]" cut_overlays() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index c959d19d114d..0a129623a160 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -145,6 +145,7 @@ return ..() /obj/machinery/suit_storage_unit/update_appearance(updates = ALL) + . = ..() cut_overlays() if(uv) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 56bb449d873e..a9a3e789767d 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -104,6 +104,7 @@ . += {"A digital display on it reads "[seconds_remaining()]"."} /obj/machinery/syndicatebomb/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" /obj/machinery/syndicatebomb/proc/seconds_remaining() diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm index 03c1e05c42e5..f0865c7de865 100644 --- a/code/game/machinery/telecomms/machines/broadcaster.dm +++ b/code/game/machinery/telecomms/machines/broadcaster.dm @@ -57,7 +57,8 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages var/mutable_appearance/sending = mutable_appearance(icon, "broadcaster_send", 1) flick(sending, src) -/obj/machinery/telecomms/broadcaster/update_appearance(updates = ALL) // Special fuckery +/obj/machinery/telecomms/broadcaster/update_appearance(updates = ALL) + . = ..() // Special fuckery cut_overlays() if(on) var/mutable_appearance/on_overlay = mutable_appearance(icon, on_icon, 0) diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index 24b4f026b60a..d02baca48ee7 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -158,6 +158,7 @@ relay_information(signal, /obj/machinery/telecomms/broadcaster) /obj/machinery/telecomms/message_server/update_appearance(updates = ALL) + . = ..() cut_overlays() if(calibrating && on) var/mutable_appearance/calibrate = mutable_appearance(icon, "message_server_disabled") diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 87c300b97853..a0d7a71d6ce5 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -121,6 +121,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) /obj/machinery/telecomms/update_appearance(updates = ALL) + . = ..() cut_overlays() if(on) var/mutable_appearance/on_overlay diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index a714bbef20d5..6c639b1f5a5f 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -88,6 +88,7 @@ return /obj/machinery/teleport/hub/update_appearance(updates = ALL) + . = ..() if(panel_open) icon_state = "tele-o" else if(is_ready()) @@ -218,6 +219,7 @@ teleporter_hub.update_appearance(updates = ALL) /obj/machinery/teleport/station/update_appearance(updates = ALL) + . = ..() if(panel_open) icon_state = "controller-o" else if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index f2e0422e9acf..7c048c703ffc 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -35,6 +35,7 @@ . = ..() /obj/machinery/transformer/update_appearance(updates = ALL) + . = ..() ..() if(stat & (BROKEN|NOPOWER) || cooldown == 1) icon_state = "separator-AO0" diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 4978611fe5ac..c756887f7965 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -259,6 +259,7 @@ GLOBAL_LIST_INIT(dye_registry, list( open_machine() /obj/machinery/washing_machine/update_appearance(updates = ALL) + . = ..() cut_overlays() if(busy) icon_state = "wm_running_[bloody_mess]" diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index e4e4aabefbd0..0a3b41f0a22e 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -144,6 +144,7 @@ recharge_port = null /obj/machinery/computer/mech_bay_power_console/update_appearance(updates = ALL) + . = ..() ..() if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN)) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 793b13c8169e..5e5da054aef6 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -170,6 +170,7 @@ diag_hud_set_mechstat() /obj/mecha/update_appearance(updates = ALL) + . = ..() if (silicon_pilot && silicon_icon_state) icon_state = silicon_icon_state . = ..() diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index bf5ea6d2d352..fcc4ec4711cd 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -40,6 +40,7 @@ update_appearance(updates = ALL) /obj/mecha/working/ripley/update_appearance(updates = ALL) + . = ..() ..() var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) if (C.amount) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 30d39385beb7..55321be4b2eb 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -186,6 +186,7 @@ /obj/effect/decal/cleanable/blood/footprints/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/Ddir in GLOB.cardinals) diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index cf04fdcf3d3a..ba7b90f1e613 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -184,6 +184,7 @@ icon_state = "beam_splash_e" /obj/item/projectile/curse_hand/update_appearance(updates = ALL) + . = ..() icon_state = "[icon_state][handedness]" /obj/effect/temp_visual/wizard @@ -534,6 +535,7 @@ update_appearance(updates = ALL) /obj/effect/constructing_effect/update_appearance(updates = ALL) + . = ..() icon_state = "rcd" if (delay < 10) icon_state += "_shortest" diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 48e7509967e3..87b8b1e29259 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -737,6 +737,7 @@ RLD qdel(src) /obj/item/construction/rcd/update_appearance(updates = ALL) + . = ..() ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) @@ -876,6 +877,7 @@ RLD ..() /obj/item/construction/rld/update_appearance(updates = ALL) + . = ..() icon_state = "rld-[round(matter/35)]" ..() diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 7409614e2a29..89ab959ac610 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -6,6 +6,7 @@ var/max_butts = 10 /obj/item/ashtray/update_appearance(updates = ALL) + . = ..() ..() overlays.Cut() if(contents.len == max_butts) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index c1e4c2772189..edc18b3e0244 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -101,6 +101,7 @@ candle_type = "resin" /obj/item/candle/resin/update_appearance(updates = ALL) + . = ..() icon_state = "resincandle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]" #undef CANDLE_LUMINOSITY diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 24a6139cf107..5eb12bd42ea3 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -202,6 +202,7 @@ return ..() /obj/structure/chrono_field/update_appearance(updates = ALL) + . = ..() var/ttk_frame = 1 - (timetokill / initial(timetokill)) ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT) if(ttk_frame != RPpos) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index a3d71116e6e5..d4f3dbc81fb0 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -588,6 +588,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM return BRUTELOSS /obj/item/lighter/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" @@ -722,6 +723,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM update_appearance(updates = ALL) /obj/item/lighter/greyscale/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index f9795cf8e3b5..d8a31abe616f 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -551,6 +551,7 @@ update_appearance(updates = ALL) /obj/item/storage/crayons/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/obj/item/toy/crayon/crayon in contents) add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.crayon_color)) @@ -703,6 +704,7 @@ . = ..() /obj/item/toy/crayon/spraycan/update_appearance(updates = ALL) + . = ..() icon_state = is_capped ? icon_capped : icon_uncapped if(use_overlays) cut_overlays() diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index cb8968b2b1e1..87b68ab7390e 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -23,6 +23,7 @@ return credits /obj/item/holochip/update_appearance(updates = ALL) + . = ..() name = "\improper [credits] credit holochip" var/rounded_credits = credits switch(credits) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index e6b9f88edfc4..b2069abc7c08 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -51,6 +51,7 @@ paddles.extinguish() /obj/item/defibrillator/update_appearance(updates = ALL) + . = ..() update_power() update_overlays() update_charge() @@ -363,6 +364,7 @@ update_appearance(updates = ALL) /obj/item/twohanded/shockpaddles/update_appearance(updates = ALL) + . = ..() icon_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]" if(cooldown) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 71db4752b621..b9b1567adc9d 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -198,6 +198,7 @@ GLOBAL_LIST_EMPTY(PDAs) return FALSE /obj/item/pda/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/overlay = new() overlay.pixel_x = overlays_x_offset diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 8b9293f3ff18..ccae94196435 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -41,6 +41,7 @@ update_appearance(updates = ALL) //Whatever happened, update the card's state (icon, name) to match. /obj/item/aicard/update_appearance(updates = ALL) + . = ..() cut_overlays() if(AI) name = "[initial(name)] - [AI.name]" diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index fb621364322d..479e6dd67570 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -153,6 +153,7 @@ to_chat(user, status_string()) /obj/item/lightreplacer/update_appearance(updates = ALL) + . = ..() icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" /obj/item/lightreplacer/proc/status_string() diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 39936faff32b..73dd04ae304e 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -78,6 +78,7 @@ remove_hud(user) /obj/item/multitool/ai_detect/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][detect_state]" /obj/item/multitool/ai_detect/process() diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 2c297d6048a4..af79b4ca18e3 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -27,6 +27,7 @@ var/obj/structure/cable/attached // the attached cable /obj/item/powersink/update_appearance(updates = ALL) + . = ..() icon_state = "powersink[mode == OPERATING]" /obj/item/powersink/proc/set_mode(value) diff --git a/code/game/objects/items/devices/quantum_keycard.dm b/code/game/objects/items/devices/quantum_keycard.dm index 60c988d81008..092424749c29 100644 --- a/code/game/objects/items/devices/quantum_keycard.dm +++ b/code/game/objects/items/devices/quantum_keycard.dm @@ -26,6 +26,7 @@ qpad = null /obj/item/quantum_keycard/update_appearance(updates = ALL) + . = ..() if(qpad) icon_state = "quantum_keycard_on" else diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 74aa45bc4cba..bd981167f051 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -104,6 +104,7 @@ /obj/item/taperecorder/update_appearance(updates = ALL) + . = ..() if(!mytape) icon_state = "taperecorder_empty" else if(recording) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index a6d9fd16301a..3f18775cd324 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -97,6 +97,7 @@ toggle = TRUE /obj/item/transfer_valve/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!tank_one && !tank_two && !attached_device) diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index 482ce7f78ffd..3e76b27ffb27 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -209,6 +209,7 @@ visible_message(span_notice("[src] rolls to a stop, landing on [result]. [comment]")) /obj/item/dice/update_appearance(updates = ALL) + . = ..() cut_overlays() add_overlay("[src.icon_state]-[src.result]") diff --git a/code/game/objects/items/discoball.dm b/code/game/objects/items/discoball.dm index fc09faee745c..dbdef247b827 100644 --- a/code/game/objects/items/discoball.dm +++ b/code/game/objects/items/discoball.dm @@ -73,6 +73,7 @@ TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors /obj/structure/discoball/update_appearance(updates = ALL) + . = ..() cut_overlays() icon_state = "disco_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") diff --git a/code/game/objects/items/etherealdiscoball.dm b/code/game/objects/items/etherealdiscoball.dm index d50c47bd9daa..72c75a70fe33 100644 --- a/code/game/objects/items/etherealdiscoball.dm +++ b/code/game/objects/items/etherealdiscoball.dm @@ -66,6 +66,7 @@ TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors /obj/structure/etherealball/update_appearance(updates = ALL) + . = ..() cut_overlays() icon_state = "ethdisco_head_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 2dd87fb62df5..8f8738735442 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -55,6 +55,7 @@ /obj/item/flamethrower/update_appearance(updates = ALL) + . = ..() cut_overlays() if(igniter) add_overlay("+igniter[status]") diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 50fc4a079069..6db078962692 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -168,6 +168,7 @@ qdel(src) /obj/item/grenade/plastic/update_appearance(updates = ALL) + . = ..() if(nadeassembly) icon_state = "[item_state]1" else diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 2a79108c266c..0471950468b8 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -267,6 +267,7 @@ update_appearance(updates = ALL) /obj/item/restraints/legcuffs/beartrap/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][armed]" /obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user) diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm index 74970329e6b7..350187e5e3d1 100644 --- a/code/game/objects/items/hot_potato.dm +++ b/code/game/objects/items/hot_potato.dm @@ -158,6 +158,7 @@ active = FALSE /obj/item/hot_potato/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)]" + "[active ? "_active" : ""]" /obj/item/hot_potato/syndicate diff --git a/code/game/objects/items/hourglass.dm b/code/game/objects/items/hourglass.dm index 5180839fea29..dfe3ec7ecb25 100644 --- a/code/game/objects/items/hourglass.dm +++ b/code/game/objects/items/hourglass.dm @@ -30,6 +30,7 @@ stop() /obj/item/hourglass/update_appearance(updates = ALL) + . = ..() if(timing_id) icon_state = "hourglass_active" else diff --git a/code/game/objects/items/implants/implantcase.dm b/code/game/objects/items/implants/implantcase.dm index 273ea3edef3e..37ef34642dd2 100644 --- a/code/game/objects/items/implants/implantcase.dm +++ b/code/game/objects/items/implants/implantcase.dm @@ -15,6 +15,7 @@ /obj/item/implantcase/update_appearance(updates = ALL) + . = ..() if(imp) icon_state = "implantcase-[imp.implant_color]" reagents = imp.reagents diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 42ea4e4a4acf..8135895097aa 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -100,6 +100,7 @@ return TRUE /obj/machinery/implantchair/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) if(state_open) icon_state += "_open" diff --git a/code/game/objects/items/implants/implanter.dm b/code/game/objects/items/implants/implanter.dm index 3d82043cc834..c8b6568a9bf0 100644 --- a/code/game/objects/items/implants/implanter.dm +++ b/code/game/objects/items/implants/implanter.dm @@ -16,6 +16,7 @@ /obj/item/implanter/update_appearance(updates = ALL) + . = ..() if(imp) icon_state = "implanter1" else diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index 9ac7f754e019..47bdf0bcc3df 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -12,6 +12,7 @@ var/obj/item/implantcase/case = null /obj/item/implantpad/update_appearance(updates = ALL) + . = ..() icon_state = "implantpad-[!QDELETED(case)]" /obj/item/implantpad/examine(mob/user) diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index 65e01b39a5aa..a30ada95d50e 100644 --- a/code/game/objects/items/inducer.dm +++ b/code/game/objects/items/inducer.dm @@ -195,6 +195,7 @@ . += span_notice("Its battery compartment is open.") /obj/item/inducer/update_appearance(updates = ALL) + . = ..() cut_overlays() if(opened) if(!cell) diff --git a/code/game/objects/items/laser_level.dm b/code/game/objects/items/laser_level.dm index 72dbd6d64be4..1a73ef90238b 100644 --- a/code/game/objects/items/laser_level.dm +++ b/code/game/objects/items/laser_level.dm @@ -30,6 +30,7 @@ update_overlay(user) /obj/item/laserlevel/update_appearance(updates = ALL) + . = ..() cut_overlays() add_overlay("[initial(icon_state)][lightlevel]") return diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 2a0be73b2ced..697bc44a46c9 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -142,6 +142,7 @@ remove_occupant(user) /obj/item/pet_carrier/update_appearance(updates = ALL) + . = ..() cut_overlay("unlocked") cut_overlay("locked") if(open) diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index 1e85b7b57188..5c5f8ed6e668 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -55,6 +55,7 @@ return /obj/item/pinpointer/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!active) return diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index fc01ce2f2fb2..c58e88fee87b 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -253,6 +253,7 @@ update_appearance(updates = ALL) /obj/item/pneumatic_cannon/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!tank) return diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index bcdd585f71b6..5aff16f9bb4b 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -180,6 +180,7 @@ . = ..() /obj/item/borg/charger/update_appearance(updates = ALL) + . = ..() ..() icon_state = "charger_[mode]" @@ -611,6 +612,7 @@ to_chat(user, span_boldnotice("You [active? "activate":"deactivate"] [src].")) /obj/item/borg/projectile_dampen/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][active]" /obj/item/borg/projectile_dampen/proc/activate_field() diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index decb4935c2f0..c0fd3b943323 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -52,6 +52,7 @@ chest.cell = new /obj/item/stock_parts/cell/high/plus(chest) /obj/item/robot_suit/update_appearance(updates = ALL) + . = ..() cut_overlays() if(l_arm) add_overlay("[l_arm.icon_state]+o") diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 6f1a645961a8..ffd2fb164d0c 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -455,6 +455,7 @@ update_appearance(updates = ALL) /obj/item/borg/upgrade/selfrepair/update_appearance(updates = ALL) + . = ..() if(cyborg) icon_state = "selfrepair_[on ? "on" : "off"]" for(var/X in actions) diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 6894ef22c9ed..b9d83345c549 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -30,7 +30,8 @@ charged++ return -/obj/item/twohanded/singularityhammer/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/singularityhammer/update_appearance(updates = ALL) + . = ..() //Currently only here to fuck with the on-mob icons. icon_state = "singhammer[wielded]" return @@ -119,6 +120,7 @@ else shock(hit_atom) -/obj/item/twohanded/mjollnir/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/mjollnir/update_appearance(updates = ALL) + . = ..() //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 100e43b7a7b5..b99c63767f26 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -357,6 +357,7 @@ update_appearance(updates = ALL) /obj/item/stack/medical/mesh/update_appearance(updates = ALL) + . = ..() if(is_open) return ..() icon_state = "regen_mesh_closed" @@ -412,6 +413,7 @@ grind_results = list(/datum/reagent/consumable/aloejuice = 1) /obj/item/stack/medical/mesh/advanced/update_appearance(updates = ALL) + . = ..() if(is_open) return ..() icon_state = "aloe_mesh_closed" diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 07cf41671c5f..86c4dd97b6dc 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -45,6 +45,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ update_appearance(updates = ALL) /obj/item/stack/rods/update_appearance(updates = ALL) + . = ..() var/amount = get_amount() if((amount <= 5) && (amount > 0)) icon_state = "rods-[amount]" diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index b5402a62a061..017ba711a850 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -75,6 +75,7 @@ w_class = full_w_class /obj/item/stack/update_appearance(updates = ALL) + . = ..() if(novariants) return ..() if(amount <= (max_amount * (1/3))) diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm index 49644ccecc30..a13351ba8fc5 100644 --- a/code/game/objects/items/stacks/tickets.dm +++ b/code/game/objects/items/stacks/tickets.dm @@ -13,6 +13,7 @@ update_appearance(updates = ALL) /obj/item/stack/arcadeticket/update_appearance(updates = ALL) + . = ..() var/amount = get_amount() if((amount >= 12) && (amount > 0)) icon_state = "arcade-ticket_4" diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 3eb91eefada1..c2dc5373e846 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -56,6 +56,7 @@ return (TOXLOSS) /obj/item/storage/bag/trash/update_appearance(updates = ALL) + . = ..() //yogs start if(icon_state == "[initial(icon_state)]_broken") return @@ -385,6 +386,7 @@ update_appearance(updates = ALL) /obj/item/storage/bag/tray/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/obj/item/I in contents) add_overlay(new /mutable_appearance(I)) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 3ee873cf5863..43d099b8ed49 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -18,6 +18,7 @@ return BRUTELOSS /obj/item/storage/belt/update_appearance(updates = ALL) + . = ..() cut_overlays() if(content_overlays) for(var/obj/item/I in contents) @@ -820,6 +821,7 @@ slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK /obj/item/storage/belt/quiver/update_appearance(updates = ALL) + . = ..() ..() if(content_overlays && ismob(loc)) var/mob/M = loc @@ -1191,6 +1193,7 @@ to_chat(user, "[src] is empty.") /obj/item/storage/belt/sabre/update_appearance(updates = ALL) + . = ..() icon_state = "sheath" item_state = "sheath" if(contents.len) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index c394c11f841c..418d07ff6dcf 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -996,6 +996,7 @@ var/design = NODESIGN /obj/item/storage/box/papersack/update_appearance(updates = ALL) + . = ..() if(contents.len == 0) icon_state = "[item_state]" else icon_state = "[item_state]_closed" diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index cde83cd87425..54b9326c00e1 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -30,6 +30,7 @@ new spawn_type(src) /obj/item/storage/box/fancy/update_appearance(updates = ALL) + . = ..() if(fancy_open) icon_state = "[icon_type]box[contents.len]" else @@ -177,6 +178,7 @@ to_chat(user, span_notice("There are no [icon_type]s left in the pack.")) /obj/item/storage/box/fancy/cigarettes/update_appearance(updates = ALL) + . = ..() if(fancy_open || !contents.len) cut_overlays() if(!contents.len) @@ -305,6 +307,7 @@ STR.set_holdable(list(/obj/item/rollingpaper)) /obj/item/storage/box/fancy/rollingpapers/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!contents.len) add_overlay("[icon_state]_empty") @@ -329,6 +332,7 @@ STR.set_holdable(list(/obj/item/clothing/mask/cigarette/cigar)) /obj/item/storage/box/fancy/cigarettes/cigars/update_appearance(updates = ALL) + . = ..() cut_overlays() if(fancy_open) icon_state = "[initial(icon_state)]_open" diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index fb9c722b7bb4..9665f3de119d 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -155,6 +155,7 @@ new /obj/item/clothing/accessory/medal/conduct(src) /obj/item/storage/lockbox/medal/update_appearance(updates = ALL) + . = ..() cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) @@ -243,6 +244,7 @@ icon_broken = "vialbox" /obj/item/storage/lockbox/vialbox/update_appearance(updates = ALL) + . = ..() cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) var/slot = 1 diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index e853b4875cb4..141ee833ce0b 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -31,6 +31,7 @@ update_appearance(updates = ALL) /obj/item/storage/toolbox/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if(has_latches) diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 166d631a02df..4893b54dc6ab 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -62,6 +62,7 @@ refreshID() /obj/item/storage/wallet/update_appearance(updates = ALL) + . = ..() var/new_state = "wallet" if(front_id) new_state = "wallet_[front_id.icon_state]" diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 3264ae92db4e..2fe4cc8954e8 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -103,6 +103,7 @@ /obj/item/melee/baton/update_appearance(updates = ALL) + . = ..() if(status) icon_state = "[initial(icon_state)]_active" else if(!cell) diff --git a/code/game/objects/items/supermatter_delaminator.dm b/code/game/objects/items/supermatter_delaminator.dm index fb211d4d4f8a..a36b5c4d0a5a 100644 --- a/code/game/objects/items/supermatter_delaminator.dm +++ b/code/game/objects/items/supermatter_delaminator.dm @@ -139,6 +139,7 @@ to_chat(user, span_warning("[user] seals the [src].")) /obj/item/antinoblium_container/update_appearance(updates = ALL) + . = ..() if(sealed) icon_state = "antinoblium_container_sealed" else if (shard) @@ -161,6 +162,7 @@ return ..() /obj/item/hemostat/antinoblium/update_appearance(updates = ALL) + . = ..() if(shard) icon_state = "antinoblium_tongs_loaded" else diff --git a/code/game/objects/items/syndicateReverseCard.dm b/code/game/objects/items/syndicateReverseCard.dm index 0640b9d12231..fa5ba202bb84 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -15,6 +15,7 @@ icon_state = "sc_[cardColor] Reverse_uno" /obj/item/syndicateReverseCard/update_appearance(updates = ALL) + . = ..() ..() if (used) cut_overlays() diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index c7c8bd87afaa..3a1f8792e90f 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -61,6 +61,7 @@ user.add_movespeed_modifier(MOVESPEED_ID_JETPACK, priority=100, multiplicative_slowdown=jetspeed, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK) /obj/item/tank/jetpack/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) if(!classic && on) //does the jetpack have its own on sprite? icon_state = "[initial(icon_state)]-on" diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 28c27f703857..435b75436119 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -224,6 +224,7 @@ return ..() /obj/item/hemostat/supermatter/update_appearance(updates = ALL) + . = ..() if(sliver) icon_state = "supermatter_tongs_loaded" else diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 3b966acf03a5..89d3364604fc 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -49,6 +49,7 @@ pixel_y = rand(0, 16) /obj/item/screwdriver/update_appearance(updates = ALL) + . = ..() if(!random_color) //icon override return cut_overlays() diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 50a5479fce1f..6526eac41ef9 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -58,6 +58,7 @@ /obj/item/weldingtool/update_appearance(updates = ALL) + . = ..() cut_overlays() if(change_icons) var/ratio = get_fuel() / max_fuel diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index b54d60537fa3..fea697e2bbea 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -43,6 +43,7 @@ update_appearance(updates = ALL) /obj/item/wirecutters/update_appearance(updates = ALL) + . = ..() if(!random_color) //icon override return cut_overlays() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 1fefe448e545..d2532c2edb9c 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -104,6 +104,7 @@ qdel(src) /obj/item/toy/balloon/update_appearance(updates = ALL) + . = ..() if(src.reagents.total_volume >= 1) icon_state = "waterballoon" item_state = "balloon" @@ -239,6 +240,7 @@ var/amount_left = 7 /obj/item/toy/ammo/gun/update_appearance(updates = ALL) + . = ..() src.icon_state = text("357OLD-[]", src.amount_left) /obj/item/toy/ammo/gun/examine(mob/user) @@ -408,6 +410,7 @@ update_appearance(updates = ALL) /obj/item/twohanded/vxtvulhammer/toy/update_appearance(updates = ALL) + . = ..() if(!pirated) icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" else @@ -806,6 +809,7 @@ draw_card(L,drawsize) /obj/item/toy/cards/deck/update_appearance(updates = ALL) + . = ..() if(cards.len > 26) icon_state = "deck_[deckstyle]_full" else if(cards.len > 10) @@ -978,6 +982,7 @@ . += "This hand has [currenthand.len] cards in it." /obj/item/toy/cards/cardhand/update_appearance(updates = ALL) + . = ..() if(src.currenthand.len > 4) src.icon_state = "[deckstyle]_hand5" else @@ -1142,6 +1147,7 @@ cards += "Wild Draw Four" /obj/item/toy/cards/deck/uno/update_appearance(updates = ALL) + . = ..() if(cards.len > 54) icon_state = "deck_[deckstyle]_full" else if(cards.len > 25) @@ -1682,6 +1688,7 @@ obj/item/toy/turn_tracker update_appearance(updates = ALL) /obj/item/toy/eldritch_book/update_appearance(updates = ALL) + . = ..() icon_state = book_open ? "book_open" : "book" /* diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index a21944990b20..797a491d4335 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -255,7 +255,8 @@ . = ..() AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools -/obj/item/twohanded/fireaxe/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/fireaxe/update_appearance(updates = ALL) + . = ..() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" return @@ -290,7 +291,8 @@ desc = "A large, menacing axe made of an unknown substance that the most elder atmosians call Metallic Hydrogen. Truly an otherworldly weapon." force_wielded = 18 -/obj/item/twohanded/fireaxe/metal_h2_axe/update_appearance(updates = ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/fireaxe/metal_h2_axe/update_appearance(updates = ALL) + . = ..() //Currently only here to fuck with the on-mob icons. icon_state = "metalh2_axe[wielded]" return @@ -350,6 +352,7 @@ O.take_damage(force, BRUTE, MELEE, FALSE, null, armour_penetration) /obj/item/twohanded/fireaxe/energy/update_appearance(updates = ALL) + . = ..() icon_state = "energy-fireaxe[wielded]" SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_TYPE_BLOOD) @@ -457,6 +460,7 @@ . = ..() /obj/item/twohanded/dualsaber/update_appearance(updates = ALL) + . = ..() if(wielded) icon_state = "dualsaber[saber_color][wielded]" else @@ -626,6 +630,7 @@ AddComponent(/datum/component/jousting) /obj/item/twohanded/spear/update_appearance(updates = ALL) + . = ..() icon_state = "[icon_prefix][wielded]" /obj/item/twohanded/spear/deconstruct() //we drop our rod and maybe the glass shard used @@ -688,6 +693,7 @@ . += span_notice("Alt-click to set your war cry.") /obj/item/twohanded/spear/explosive/update_appearance(updates = ALL) + . = ..() icon_state = "spearbomb[wielded]" /obj/item/twohanded/spear/explosive/AltClick(mob/user) @@ -872,6 +878,7 @@ force_wielded = 500000 // Kills you DEAD. /obj/item/twohanded/pitchfork/update_appearance(updates = ALL) + . = ..() icon_state = "pitchfork[wielded]" /obj/item/twohanded/pitchfork/suicide_act(mob/user) @@ -948,6 +955,7 @@ return 0 /obj/item/twohanded/vibro_weapon/update_appearance(updates = ALL) + . = ..() icon_state = "hfrequency[wielded]" /obj/item/twohanded/vibro_weapon/wizard @@ -973,6 +981,7 @@ force_wielded = 18 /obj/item/twohanded/fireaxe/boneaxe/update_appearance(updates = ALL) + . = ..() icon_state = "bone_axe[wielded]" /* @@ -1001,6 +1010,7 @@ sharpness = SHARP_EDGED /obj/item/twohanded/bonespear/update_appearance(updates = ALL) + . = ..() icon_state = "bone_spear[wielded]" /obj/item/twohanded/bonespear/chitinspear //like a mix of a bone spear and bone axe, but more like a bone spear. And better. @@ -1014,6 +1024,7 @@ attack_verb = list("attacked", "poked", "jabbed", "torn", "gored", "sliced", "ripped", "cut") /obj/item/twohanded/bonespear/chitinspear/update_appearance(updates = ALL) + . = ..() icon_state = "chitin_spear[wielded]" /obj/item/twohanded/binoculars @@ -1081,6 +1092,7 @@ sharpness = SHARP_EDGED /obj/item/twohanded/bamboospear/update_appearance(updates = ALL) + . = ..() icon_state = "bamboo_spear[wielded]" /* @@ -1144,6 +1156,7 @@ return ..() /obj/item/twohanded/vxtvulhammer/update_appearance(updates = ALL) + . = ..() icon_state = "vxtvul_hammer[wielded]-[supercharged]" /obj/item/twohanded/vxtvulhammer/examine(mob/living/carbon/user) @@ -1287,6 +1300,7 @@ While wielded in two hands, the user can charge a massive blow that will shatter construction and hurl bodies." /obj/item/twohanded/vxtvulhammer/pirate/update_appearance(updates = ALL) + . = ..() icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" // Baseball Bats @@ -1392,6 +1406,7 @@ slot_flags = ITEM_SLOT_BACK /obj/item/twohanded/bigspoon/update_appearance(updates = ALL) + . = ..() hitsound = wielded ? 'yogstation/sound/weapons/bat_hit.ogg' : 'sound/items/trayhit1.ogg' //big donk if wielded item_state = "bigspoon[wielded]" //i don't know why it's item_state rather than icon_state like every other wielded weapon return @@ -1419,6 +1434,7 @@ Broom resistance_flags = FLAMMABLE /obj/item/twohanded/broom/update_appearance(updates = ALL) + . = ..() icon_state = "broom[wielded]" /obj/item/twohanded/broom/wield(mob/user) diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index deec6ca0518f..5cbdda41d62c 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -239,6 +239,7 @@ obj_integrity = integrity_failure /obj/structure/alien/egg/update_appearance(updates = ALL) + . = ..() ..() switch(status) if(GROWING) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index de673110899a..dfee49234193 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -133,6 +133,7 @@ try_rename(user) /obj/item/canvas/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!icon_generated) if(used) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index a58327c63454..6627711bebeb 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -351,6 +351,7 @@ LINEN BINS /obj/structure/bedsheetbin/update_appearance(updates = ALL) + . = ..() switch(amount) if(0) icon_state = "linenbin-empty" diff --git a/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm b/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm index 64852df94b8a..73981bdd8019 100644 --- a/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm +++ b/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm @@ -88,6 +88,7 @@ return ..() /obj/structure/closet/bluespace/internal/update_appearance(updates = ALL) + . = ..() cut_overlays() var/obj/structure/closet/other = get_other_locker() if(!other) diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index 886731816f5e..d9a92e780dd5 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -49,6 +49,7 @@ update_appearance(updates = ALL) /obj/structure/closet/body_bag/update_appearance(updates = ALL) + . = ..() ..() if (tagged) add_overlay("bodybag_label") diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 8494998006df..06e858bbb1c9 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -36,6 +36,7 @@ return TRUE /obj/structure/closet/crate/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][opened ? "open" : ""]" cut_overlays() diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index 1e48ec1e496e..16020885a12c 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -13,6 +13,7 @@ update_appearance(updates = ALL) /obj/structure/closet/crate/bin/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if(contents.len == 0) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index a9ce3bf413e7..e9f4bede20d0 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -22,6 +22,7 @@ return ..() /obj/structure/closet/crate/critter/update_appearance(updates = ALL) + . = ..() cut_overlays() if(opened) add_overlay("crittercrate_door_open") diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index 9f640d7f79eb..964ff9166c8a 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -14,6 +14,7 @@ . = ..() /obj/structure/closet/crate/secure/update_appearance(updates = ALL) + . = ..() ..() if(broken) add_overlay("securecrateemag") diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index fadb7095c30e..5c2f644d2e91 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -86,6 +86,7 @@ playsound(src, 'sound/effects/alert.ogg', 50, TRUE) /obj/structure/displaycase/update_appearance(updates = ALL) + . = ..() var/icon/I if(open) I = icon('icons/obj/stationobjs.dmi',"glassbox_open") diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index 6feaf846926e..2ff48587c96e 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -45,6 +45,7 @@ /obj/structure/healingfountain/update_appearance(updates = ALL) + . = ..() if(last_process + time_between_uses > world.time) icon_state = "fountain" else diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 9ea637aa66a4..dcd1ddfd451a 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -263,6 +263,7 @@ update_appearance(updates = ALL) /obj/structure/door_assembly/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!glass) add_overlay(get_airlock_overlay("fill_construction", icon)) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index fea1907e1871..e1aaf16b2d75 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -121,6 +121,7 @@ update_appearance(updates = ALL) /obj/structure/extinguisher_cabinet/update_appearance(updates = ALL) + . = ..() if(!opened) icon_state = "extinguisher_closed" return diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index edb9fbe612cf..d1f2d1407fbf 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -70,7 +70,8 @@ update_appearance(updates = ALL) air_update_turf(TRUE) -/obj/structure/falsewall/update_appearance(updates = ALL)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open +/obj/structure/falsewall/update_appearance(updates = ALL) + . = ..()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open if(opening) if(density) icon_state = "fwall_opening" diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 69d422ebd9ef..b0ee79a4b09f 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -195,6 +195,7 @@ return /obj/structure/fireaxecabinet/update_appearance(updates = ALL) + . = ..() cut_overlays() if(fireaxe) add_overlay("axe") diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index e1737adad212..0475fc4e3b76 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -70,6 +70,7 @@ . = ..() /obj/structure/fireplace/update_appearance(updates = ALL) + . = ..() cut_overlays() if(lit) switch(burn_time_remaining()) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 79af4c26608b..63a4560bf3d5 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -42,6 +42,7 @@ update_appearance(updates = ALL) /obj/structure/grille/update_appearance(updates = ALL) + . = ..() if(QDELETED(src)) return for(var/i = 0; i < 5; i++) diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 2b8d06d9d913..cfd4346a3081 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -23,6 +23,7 @@ return ..() /obj/structure/guncase/update_appearance(updates = ALL) + . = ..() cut_overlays() if(case_type && LAZYLEN(contents)) var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type) diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index 5c3a6e0f3733..bb7fbddd01f4 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -39,6 +39,7 @@ pixel_x = rand(-8, 8) /obj/structure/headpike/update_appearance(updates = ALL) + . = ..() ..() var/obj/item/bodypart/head/H = locate() in contents var/mutable_appearance/MA = new() diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 09a20781dc1c..81e84d533f20 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -216,6 +216,7 @@ playsound(loc, 'sound/weapons/egloves.ogg', 80, 1) /obj/structure/holobed/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][stasis ? "" : "_off"]" /obj/structure/holobed/AltClick(mob/living/user) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 865b7fcfdf1f..7676d452e812 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -224,6 +224,7 @@ return TRUE /obj/structure/janitorialcart/update_appearance(updates = ALL) + . = ..() cut_overlays() if(mybag) add_overlay("cart_garbage") diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 22f486688795..4ccf516aa9a0 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -56,6 +56,7 @@ up = down = null /obj/structure/ladder/update_appearance(updates = ALL) + . = ..() if(up && down) icon_state = "ladder11" diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm index 8f1e92d90d3f..cc293407bacf 100644 --- a/code/game/objects/structures/life_candle.dm +++ b/code/game/objects/structures/life_candle.dm @@ -47,6 +47,7 @@ set_light(0) /obj/structure/life_candle/update_appearance(updates = ALL) + . = ..() if(linked_minds.len) icon_state = icon_state_active else diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 6169527307e6..87ec0efe70f1 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -120,6 +120,7 @@ isSwitchingStates = FALSE /obj/structure/mineral_door/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][door_opened ? "open":""]" /obj/structure/mineral_door/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 1981056448bb..f99f7ac55089 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -40,6 +40,7 @@ return ..() /obj/structure/mopbucket/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents.total_volume > 0) add_overlay("mopbucket_water") diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 2b23cf34a09e..bbf5610e1a2e 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -172,6 +172,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an to_chat(user, span_notice("You turn the speaker function [beeper ? "on" : "off"].")) /obj/structure/bodycontainer/morgue/update_appearance(updates = ALL) + . = ..() if (!connected || connected.loc != src) // Open or tray is gone. icon_state = "morgue0" else @@ -231,6 +232,7 @@ GLOBAL_LIST_EMPTY(crematoriums) connected.connected = src /obj/structure/bodycontainer/crematorium/update_appearance(updates = ALL) + . = ..() if(!connected || connected.loc != src) icon_state = "crema0" else diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 232a36327c3c..6a47c8bb1423 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -57,6 +57,7 @@ FLOOR SAFES I.forceMove(src) /obj/structure/safe/update_appearance(updates = ALL) + . = ..() if(open) icon_state = "[initial(icon_state)]-open" else diff --git a/code/game/objects/structures/stairs.dm b/code/game/objects/structures/stairs.dm index 60b914b4e63d..3b25ba231e01 100644 --- a/code/game/objects/structures/stairs.dm +++ b/code/game/objects/structures/stairs.dm @@ -55,6 +55,7 @@ return ..() /obj/structure/stairs/update_appearance(updates = ALL) + . = ..() if(isTerminator()) icon_state = "stairs_t" else diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 4cd0f47a257d..7fa74a74bb3e 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -77,6 +77,7 @@ return span_notice("The top is screwed on, but the main bolts are also visible.") /obj/structure/table/update_appearance(updates = ALL) + . = ..() if(smooth) queue_smooth(src) queue_smooth_neighbors(src) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 630017bfee9a..9beef0f2ea83 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -26,6 +26,7 @@ update_appearance(updates = ALL) /obj/structure/tank_dispenser/update_appearance(updates = ALL) + . = ..() cut_overlays() switch(oxygentanks) if(1 to 3) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm index 96e6a71bee93..ef6a0d40c5e3 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm @@ -5,6 +5,7 @@ name = "transit tube cargo pod" /obj/structure/transit_tube_pod/cargo/update_appearance(updates = ALL) + . = ..() if(contents.len) icon_state = "pod_cargo_occupied" else diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index e88146a644df..4aa98fb62bfa 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -20,6 +20,7 @@ return ..() /obj/structure/transit_tube_pod/update_appearance(updates = ALL) + . = ..() if(contents.len) icon_state = "pod_occupied" else diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 6013940243fd..911dced2f7d7 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -71,6 +71,7 @@ /obj/structure/toilet/update_appearance(updates = ALL) + . = ..() icon_state = "toilet[open][cistern]" @@ -395,6 +396,7 @@ update_appearance(updates = ALL) /obj/structure/curtain/update_appearance(updates = ALL) + . = ..() if(!open) icon_state = "closed" layer = WALL_OBJ_LAYER diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 085f19bd0527..5d4170c98cb9 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -48,6 +48,7 @@ move_update_air(T) /obj/structure/windoor_assembly/update_appearance(updates = ALL) + . = ..() icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]" /obj/structure/windoor_assembly/CanAllowThrough(atom/movable/mover, turf/target) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 426d572b54d3..27df59aaffdd 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -332,6 +332,7 @@ //merges adjacent full-tile windows into one /obj/structure/window/update_appearance(updates = ALL) + . = ..() if(!QDELETED(src)) if(!fulltile) return @@ -953,6 +954,7 @@ update_appearance(updates = ALL) /obj/structure/cloth_curtain/update_appearance(updates = ALL) + . = ..() if(!open) icon_state = "curtain_closed" layer = WALL_OBJ_LAYER diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 7d09ead97354..d0e9054c2b9c 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -116,6 +116,7 @@ return /turf/open/floor/update_appearance(updates = ALL) + . = ..() update_visuals() return 1 diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 19696ce3b567..d8f74784169e 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -296,6 +296,7 @@ update_appearance(updates = ALL) /turf/open/floor/carpet/update_appearance(updates = ALL) + . = ..() if(!..()) return 0 if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index ec1db86787ab..4f57af8b0b4e 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -44,6 +44,7 @@ update_light() /turf/open/floor/light/update_appearance(updates = ALL) + . = ..() ..() if(on) switch(state) diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index 939f49dcf055..9ce69e08083b 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -24,6 +24,7 @@ /turf/open/floor/mineral/update_appearance(updates = ALL) + . = ..() if(!..()) return 0 if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index c8f1a830b57d..e1346b073418 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -28,6 +28,7 @@ return ..() /turf/open/floor/circuit/update_appearance(updates = ALL) + . = ..() if(on) if(LAZYLEN(SSmapping.nuke_threats)) icon_state = "rcircuitanim" diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index 610317fe2975..f4fbbe00c59c 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -14,6 +14,7 @@ ChangeTurf(/turf/open/floor/plating/rust) /turf/open/floor/plasteel/update_appearance(updates = ALL) + . = ..() if(!..()) return 0 if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 0c835fe22571..9aa6b2f19443 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -45,6 +45,7 @@ icon_plating = initial(icon_state) /turf/open/floor/plating/update_appearance(updates = ALL) + . = ..() if(!..()) return if(!broken && !burnt) diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 3e2d29ebbb76..7ada3ecffa3b 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -96,6 +96,7 @@ update_appearance(updates = ALL) /turf/closed/mineral/update_appearance(updates = ALL) + . = ..() if(hardness != initial(hardness)) var/mutable_appearance/cracks = mutable_appearance('icons/turf/mining.dmi',"rock_cracks",ON_EDGED_TURF_LAYER) var/matrix/M = new diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index 5375b213faf4..eea5255b0c31 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -192,6 +192,7 @@ return 0 /turf/closed/wall/r_wall/update_appearance(updates = ALL) + . = ..() if(d_state != INTACT) smooth = SMOOTH_FALSE clear_smooth_overlays() diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index c4debfcb6a4f..e619e898b3fc 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -68,6 +68,7 @@ dir = EAST /turf/open/space/transit/update_appearance(updates = ALL) + . = ..() icon_state = "speedspace_ns_[get_transit_state(src)]" transform = turn(matrix(), get_transit_angle(src)) diff --git a/code/modules/NTNet/relays.dm b/code/modules/NTNet/relays.dm index 710e307dbc26..9fc7fae6473e 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -33,6 +33,7 @@ return TRUE /obj/machinery/ntnet_relay/update_appearance(updates = ALL) + . = ..() cut_overlays() if(is_operational()) var/mutable_appearance/on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 9f2d48c9c508..98cc19615109 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -62,6 +62,7 @@ addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) /obj/machinery/vr_sleeper/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" /obj/machinery/vr_sleeper/open_machine() diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 0949c859fd1e..4d311cc37888 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -78,6 +78,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc return final_antag_hud_images /datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_appearance(updates = ALL) + . = ..() if (antag_hud_images.len == 0) image.icon = icon('icons/blanks/32x32.dmi', "nothing") else diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 50c1dcaee93c..db71a730d399 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -446,6 +446,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} update_appearance(updates = ALL) /obj/item/abductor/baton/update_appearance(updates = ALL) + . = ..() switch(mode) if(BATON_STUN) icon_state = "wonderprodStun" diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index 156cc8147300..3161e519810b 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -184,6 +184,7 @@ return /obj/machinery/abductor/experiment/update_appearance(updates = ALL) + . = ..() if(state_open) icon_state = "experiment-open" else diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index 850589fa57b9..92ecaada29fd 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -82,7 +82,8 @@ var/atom/movable/mover = caller . = . || (mover.pass_flags & PASSBLOB) -/obj/structure/blob/update_appearance(updates = ALL) //Updates color based on overmind color if we have an overmind. +/obj/structure/blob/update_appearance(updates = ALL) + . = ..() //Updates color based on overmind color if we have an overmind. if(overmind) add_atom_colour(overmind.blobstrain.color, FIXED_COLOUR_PRIORITY) else @@ -345,6 +346,7 @@ return "N/A" /obj/structure/blob/normal/update_appearance(updates = ALL) + . = ..() ..() if(obj_integrity <= 15) icon_state = "blob_damaged" diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index 7975250657b0..cc255fe9e6df 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -26,6 +26,7 @@ return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts." /obj/structure/blob/core/update_appearance(updates = ALL) + . = ..() cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") diff --git a/code/modules/antagonists/blob/structures/node.dm b/code/modules/antagonists/blob/structures/node.dm index b3bef3827eb8..94e96ad43502 100644 --- a/code/modules/antagonists/blob/structures/node.dm +++ b/code/modules/antagonists/blob/structures/node.dm @@ -19,6 +19,7 @@ return "Gradually expands and sustains nearby blob spores and blobbernauts." /obj/structure/blob/node/update_appearance(updates = ALL) + . = ..() cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") diff --git a/code/modules/antagonists/blob/structures/shield.dm b/code/modules/antagonists/blob/structures/shield.dm index 8392fa8c53ab..300c5619b032 100644 --- a/code/modules/antagonists/blob/structures/shield.dm +++ b/code/modules/antagonists/blob/structures/shield.dm @@ -20,6 +20,7 @@ point_return = 0 /obj/structure/blob/shield/update_appearance(updates = ALL) + . = ..() ..() if(obj_integrity < max_integrity * 0.5) icon_state = "[initial(icon_state)]_damaged" diff --git a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm index b22be84a8af9..28c933a28272 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -396,6 +396,7 @@ anchored = FALSE /obj/structure/bloodsucker/moldingstone/update_appearance(updates = ALL) + . = ..() cut_overlays() switch(metal) if(1 to 5) @@ -811,6 +812,7 @@ #undef MEATLIMIT /obj/structure/bloodsucker/vassalrack/update_appearance(updates = ALL) + . = ..() cut_overlays() if(bigmeat) add_overlay("bigmeat_[bigmeat]") @@ -1184,6 +1186,7 @@ return ..() /obj/structure/bloodsucker/candelabrum/update_appearance(updates = ALL) + . = ..() icon_state = "candelabrum[lit ? "_lit" : ""]" return ..() diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 0adce5ee94b0..1ef4914ac900 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -243,6 +243,7 @@ return TRUE /obj/effect/clockwork/sigil/transmission/update_appearance(updates = ALL) + . = ..() var/power_charge = get_clockwork_power() if(GLOB.ratvar_awakens) alpha = 255 diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index 42db7386285e..67c98ef4917a 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -385,6 +385,7 @@ prefix = "darkened" /obj/item/sharpener/cult/update_appearance(updates = ALL) + . = ..() icon_state = "cult_sharpener[used ? "_used" : ""]" /obj/item/clothing/suit/hooded/cultrobes/cult_shield @@ -691,6 +692,7 @@ GLOBAL_VAR_INIT(curselimit, 0) ..() /obj/item/twohanded/cult_spear/update_appearance(updates = ALL) + . = ..() icon_state = "bloodspear[wielded]" /obj/item/twohanded/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 058f6f1c11a0..a5effdd25bea 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -472,6 +472,7 @@ T.narsie_act(TRUE, TRUE) /obj/structure/destructible/cult/bloodstone/update_appearance(updates = ALL) + . = ..() icon_state = "bloodstone-[current_fullness]" cut_overlays() var/image/I_base = image('icons/obj/cult_64x64.dmi',"bloodstone-base") diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 8705af2bee3b..735f9be9bf0d 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -180,6 +180,7 @@ return NUKE_OFF_UNLOCKED /obj/machinery/nuclearbomb/update_appearance(updates = ALL) + . = ..() if(deconstruction_state == NUKESTATE_INTACT) switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) diff --git a/code/modules/antagonists/zombie/abilities/spit.dm b/code/modules/antagonists/zombie/abilities/spit.dm index d6995eec3c59..669f4b003ca3 100644 --- a/code/modules/antagonists/zombie/abilities/spit.dm +++ b/code/modules/antagonists/zombie/abilities/spit.dm @@ -13,6 +13,7 @@ add_ranged_ability(user, span_notice("You open your neurotoxin reserves. Left-click to fire at a target!"), TRUE) /obj/effect/proc_holder/zombie/spit/update_appearance(updates = ALL) + . = ..() action.button_icon_state = "alien_neurotoxin_[active]" action.build_all_button_icons() diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index de8c31b7403c..c22578c59073 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -17,6 +17,7 @@ return bombtank.examine(user) /obj/item/onetankbomb/update_appearance(updates = ALL) + . = ..() cut_overlays() if(bombtank) icon = bombtank.icon diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 484f559c14ae..91fc9e58d28e 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -41,6 +41,7 @@ A.holder_movement() /obj/item/assembly_holder/update_appearance(updates = ALL) + . = ..() cut_overlays() if(a_left) add_overlay("[a_left.icon_state]_left") diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 43ac7c36b13d..328c0a063213 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -26,6 +26,7 @@ playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) /obj/item/assembly/mousetrap/update_appearance(updates = ALL) + . = ..() if(armed) icon_state = "mousetraparmed" else diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 519da9700c69..7749d7249037 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -93,6 +93,7 @@ sense() /obj/item/assembly/prox_sensor/update_appearance(updates = ALL) + . = ..() cut_overlays() attached_overlays = list() if(timing) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 9d88d4efd246..3250e98958e2 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -45,6 +45,7 @@ return TRUE /obj/item/assembly/signaler/update_appearance(updates = ALL) + . = ..() if(holder) holder.update_appearance(updates = ALL) return diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index d284a9cbbeef..deebf77724aa 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -77,6 +77,7 @@ /obj/item/assembly/timer/update_appearance(updates = ALL) + . = ..() cut_overlays() attached_overlays = list() if(timing) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index fb2a7a3388bb..d6b4e01d3f98 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -631,6 +631,7 @@ ), signal_source) /obj/machinery/airalarm/update_appearance(updates = ALL) + . = ..() if(panel_open) switch(buildstage) if(2) diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 6de36eee0450..d83999b115bf 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -124,6 +124,7 @@ GLOBAL_LIST_EMPTY(pipeimages) update_appearance(updates = ALL) /obj/machinery/atmospherics/update_appearance(updates = ALL) + . = ..() layer = initial(layer) + piping_layer / 1000 return ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index 59a8325ef036..ea72556b0683 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -80,6 +80,7 @@ update_icon_nopipes() /obj/machinery/atmospherics/components/binary/circulator/update_appearance(updates = ALL) + . = ..() cut_overlays() if(anchored) diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index a7b78dd105fe..4adad2671650 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -25,6 +25,7 @@ return /obj/machinery/atmospherics/components/update_appearance(updates = ALL) + . = ..() update_icon_nopipes() underlays.Cut() diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index f5896b78ac89..9ea729d5d44c 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -153,6 +153,7 @@ return ..() /obj/machinery/hypertorus/update_appearance(updates = ALL) + . = ..() if(panel_open) icon_state = icon_state_open else if(active) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index ec9322d4a703..39e99f35ed7b 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -45,6 +45,7 @@ return ..() /obj/machinery/atmospherics/components/trinary/filter/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index fdbe577c0f6e..ae04f51ecc38 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -32,6 +32,7 @@ return ..() /obj/machinery/atmospherics/components/trinary/mixer/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 932172910029..07bedf3ba94f 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -103,6 +103,7 @@ beaker = null /obj/machinery/atmospherics/components/unary/cryo_cell/update_appearance(updates = ALL) + . = ..() cut_overlays() if(panel_open) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm index 1ec97f060ac5..49b9a11a04ad 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm @@ -24,6 +24,7 @@ icon_state = "he_map-4" /obj/machinery/atmospherics/components/unary/heat_exchanger/update_appearance(updates = ALL) + . = ..() if(nodes[1]) icon_state = "he1" var/obj/machinery/atmospherics/node = nodes[1] diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index e6111d85ffee..5e1b1524ec30 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -40,6 +40,7 @@ heat_capacity = 5000 * ((B - 1) ** 2) /obj/machinery/atmospherics/components/unary/thermomachine/update_appearance(updates = ALL) + . = ..() cut_overlays() if(panel_open) diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index 9ae25bc44408..83fc480c432e 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -109,6 +109,7 @@ return FALSE /obj/machinery/atmospherics/miner/update_appearance(updates = ALL) + . = ..() cut_overlays() if(broken) add_overlay("broken") diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm index e7dd1a664de5..075d37dc9ee8 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm @@ -31,6 +31,7 @@ return ..(target, given_layer, TRUE) /obj/machinery/atmospherics/pipe/heat_exchanging/junction/update_appearance(updates = ALL) + . = ..() icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm index 753261b4c46d..4fe3d4832434 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm @@ -27,6 +27,7 @@ initialize_directions &= ~dir /obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_appearance(updates = ALL) + . = ..() cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm index 64bbf3cf97e2..f451b690827d 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm @@ -25,6 +25,7 @@ initialize_directions = initial(initialize_directions) /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_appearance(updates = ALL) + . = ..() cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm index 417bfb58740a..4e25131645e0 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm @@ -25,6 +25,7 @@ initialize_directions = EAST|WEST /obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_appearance(updates = ALL) + . = ..() icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index 187ecc91d3fe..cca7d01a40a4 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -42,7 +42,8 @@ /obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes() return front_nodes + back_nodes + nodes -/obj/machinery/atmospherics/pipe/layer_manifold/update_appearance(updates = ALL) //HEAVILY WIP FOR UPDATE ICONS!! +/obj/machinery/atmospherics/pipe/layer_manifold/update_appearance(updates = ALL) + . = ..() //HEAVILY WIP FOR UPDATE ICONS!! cut_overlays() layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else. diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index 5738b5cef2c3..cd2935e4b593 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -36,6 +36,7 @@ initialize_directions &= ~dir /obj/machinery/atmospherics/pipe/manifold/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index e5802bd39baa..09b3d681ce69 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -30,6 +30,7 @@ initialize_directions = initial(initialize_directions) /obj/machinery/atmospherics/pipe/manifold4w/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") diff --git a/code/modules/atmospherics/machinery/pipes/simple.dm b/code/modules/atmospherics/machinery/pipes/simple.dm index db30a39d3442..fad19101a2ab 100644 --- a/code/modules/atmospherics/machinery/pipes/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple.dm @@ -33,6 +33,7 @@ initialize_directions = EAST|WEST /obj/machinery/atmospherics/pipe/simple/update_appearance(updates = ALL) + . = ..() icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index abd835579767..ea935ecaf89a 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -307,6 +307,7 @@ #define CANISTER_LIGHT_POWER 0.5 /obj/machinery/portable_atmospherics/canister/update_appearance(updates = ALL) + . = ..() if(stat & BROKEN) cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index cbc3f2dd1222..9f1de8d484ee 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -30,6 +30,7 @@ return ..() /obj/machinery/portable_atmospherics/pump/update_appearance(updates = ALL) + . = ..() icon_state = "psiphon:[on]" cut_overlays() diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 6d6c6498a24c..923da8360818 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -37,6 +37,7 @@ return ..() /obj/machinery/portable_atmospherics/scrubber/update_appearance(updates = ALL) + . = ..() icon_state = "pscrubber:[on]" cut_overlays() @@ -150,6 +151,7 @@ movable = TRUE /obj/machinery/portable_atmospherics/scrubber/huge/update_appearance(updates = ALL) + . = ..() icon_state = "scrubber:[on]" /obj/machinery/portable_atmospherics/scrubber/huge/process_atmos() diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 5912af2faa01..9a397eda7578 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -54,6 +54,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) return ready /obj/machinery/gateway/update_appearance(updates = ALL) + . = ..() if(active) icon_state = "on" return @@ -101,6 +102,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) can_link = TRUE /obj/machinery/gateway/centerstation/update_appearance(updates = ALL) + . = ..() if(active) icon_state = "oncenter" return @@ -184,6 +186,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/machinery/gateway/centeraway/update_appearance(updates = ALL) + . = ..() if(active) icon_state = "oncenter" return diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 6e07b3cb284f..85ffe9fd7df6 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -126,6 +126,7 @@ update_appearance(updates = ALL) /obj/structure/closet/supplypod/update_appearance(updates = ALL) + . = ..() var/list/new_overlays = update_overlays() if(managed_overlays) cut_overlay(managed_overlays) diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index a410ace73ea0..2eeed5cb818e 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -32,6 +32,7 @@ update_appearance(updates = ALL) /obj/item/supplypod_beacon/update_appearance(updates = ALL) + . = ..() cut_overlays() if (launched) add_overlay("sp_green") diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index 1295be4a160f..d62ec497efc7 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -38,6 +38,7 @@ update_appearance(updates = ALL) /obj/item/clothing/ears/headphones/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 05e15801d70f..cd647cea5805 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -115,6 +115,7 @@ flick_overlay(pic, list(user.client), 8) /obj/item/clothing/glasses/meson/engine/update_appearance(updates = ALL) + . = ..() icon_state = "trayson-[mode]" update_mob() diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 00be0b4ca9ce..a7b4b69ee2f1 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -34,6 +34,7 @@ update_appearance(updates = ALL) /obj/item/clothing/head/hardhat/update_appearance(updates = ALL) + . = ..() icon_state = "hardhat[on]_[hat_type]" item_state = "hardhat[on]_[hat_type]" if(ishuman(loc)) @@ -157,6 +158,7 @@ . += mutable_appearance(mob_overlay_icon, "weldvisor") /obj/item/clothing/head/hardhat/weldhat/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!up) add_overlay("weldvisor") diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 506afc858525..0a7d790a6f8c 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -369,6 +369,7 @@ //LightToggle /obj/item/clothing/head/helmet/update_appearance(updates = ALL) + . = ..() var/state = "[initial(icon_state)]" if(attached_light) if(attached_light.on) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index f7b2b7e61d21..ad1e8a220e27 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -211,6 +211,7 @@ update_appearance(updates = ALL) /obj/item/clothing/head/wig/update_appearance(updates = ALL) + . = ..() cut_overlays() icon_state = "" var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style] diff --git a/code/modules/clothing/neck/bodycamera.dm b/code/modules/clothing/neck/bodycamera.dm index b816ab351457..805d599b54d7 100644 --- a/code/modules/clothing/neck/bodycamera.dm +++ b/code/modules/clothing/neck/bodycamera.dm @@ -55,6 +55,7 @@ update_appearance(updates = ALL) /obj/item/clothing/neck/bodycam/update_appearance(updates = ALL) + . = ..() ..() var/suffix = "off" if(bodcam.status) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index d0c4b4c7994b..755feba632fc 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -56,6 +56,7 @@ to_chat(user, span_warning("You need bananium to turn the prototype shoes on!")) /obj/item/clothing/shoes/clown_shoes/banana_shoes/update_appearance(updates = ALL) + . = ..() if(on) icon_state = "clown_prototype_on" else diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 8a9b6dcb3d0a..88c3053962d7 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -306,6 +306,7 @@ visor_flags = STOPSPRESSUREDAMAGE /obj/item/clothing/head/helmet/space/hardsuit/syndi/update_appearance(updates = ALL) + . = ..() icon_state = "hardsuit[on]-[hardsuit_type]" /obj/item/clothing/head/helmet/space/hardsuit/syndi/Initialize(mapload) diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 920c92c777e9..a7f299e8cc86 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -196,6 +196,7 @@ STOP_PROCESSING(SSobj,src) /obj/machinery/shuttle_scrambler/update_appearance(updates = ALL) + . = ..() if(active) icon_state = "dominator-blue" else diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index c2ed1e8b27aa..242fa5d284a7 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -26,6 +26,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/food/drinks/bottle/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents.total_volume) diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index d3b9ccafe343..4bad522bf983 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -337,6 +337,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/glass/bowl/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/food/soupsalad.dmi', "fullbowl") diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 91edd84a7d06..b85cf4546b81 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -654,6 +654,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/food/snacks/pancakes/update_appearance(updates = ALL) + . = ..() if(contents.len) name = "stack of pancakes" else diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index a5d3851bd3cb..8fd117153362 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -39,6 +39,7 @@ . += "Gibber has been upgraded to process inorganic materials." /obj/machinery/gibber/update_appearance(updates = ALL) + . = ..() cut_overlays() if (dirty) add_overlay("grbloody") diff --git a/code/modules/food_and_drinks/kitchen_machinery/grill.dm b/code/modules/food_and_drinks/kitchen_machinery/grill.dm index c8657cdc37e3..cb2f72737c12 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/grill.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/grill.dm @@ -21,6 +21,7 @@ grill_loop = new(list(src), FALSE) /obj/machinery/grill/update_appearance(updates = ALL) + . = ..() if(grilled_item) icon_state = "grill" else if(grill_fuel > 0) diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index bae3cfb5be01..53ded31239d2 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -88,6 +88,7 @@ span_notice("- Cook time reduced by [(efficiency - 1) * 25]%.") /obj/machinery/microwave/update_appearance(updates = ALL) + . = ..() if(broken) icon_state = "mwb" else if(dirty_anim_playing) diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 105a74f18ab5..becc21b02e15 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -43,6 +43,7 @@ . = ..() /obj/machinery/oven/update_appearance(updates = ALL) + . = ..() update_overlays() if(panel_open) icon_state = "oven_o" diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 414b867914c3..8dfa11cf7443 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -150,6 +150,7 @@ ..(damage_flag) /obj/machinery/smartfridge/update_appearance(updates = ALL) + . = ..() var/startstate = initial(icon_state) if(stat & BROKEN) icon_state = "[startstate]-broken" @@ -477,6 +478,7 @@ update_appearance(updates = ALL) /obj/machinery/smartfridge/drying_rack/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if(drying) diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index f4e186139498..2b8419ca10e8 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -39,6 +39,7 @@ return ..() /obj/item/pizzabox/update_appearance(updates = ALL) + . = ..() // Description desc = initial(desc) if(open) diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm index 5121d0cded74..b05285a18fdc 100644 --- a/code/modules/games/cas.dm +++ b/code/modules/games/cas.dm @@ -96,6 +96,7 @@ update_appearance(updates = ALL) /obj/item/toy/cards/deck/cas/update_appearance(updates = ALL) + . = ..() if(cards.len < 26) icon_state = "deck_[deckstyle]_low" @@ -137,6 +138,7 @@ Flip() /obj/item/toy/cards/singlecard/cas/update_appearance(updates = ALL) + . = ..() if(flipped) icon_state = "[card_face]_flipped" else diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index 823b6dae5c1b..7c0cc745bebc 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -119,6 +119,7 @@ update_appearance(updates = ALL) /obj/machinery/satellite/update_appearance(updates = ALL) + . = ..() icon_state = active ? "sat_active" : "sat_inactive" /obj/machinery/satellite/multitool_act(mob/living/user, obj/item/I) diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index 62065cd2d4d0..613037217dc3 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -200,6 +200,7 @@ begin_event() /obj/machinery/readybutton/update_appearance(updates = ALL) + . = ..() if(ready) icon_state = "auth_on" else diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 270af7c7a0dc..3109e3bdde37 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -120,6 +120,7 @@ addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), 1) /turf/open/floor/holofloor/carpet/update_appearance(updates = ALL) + . = ..() if(!..()) return 0 if(intact) diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm index c3b980e2eb77..6b40933d2bc0 100644 --- a/code/modules/hydroponics/beekeeping/honeycomb.dm +++ b/code/modules/hydroponics/beekeeping/honeycomb.dm @@ -21,6 +21,7 @@ /obj/item/reagent_containers/honeycomb/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/honey_overlay = mutable_appearance(icon, /datum/reagent/consumable/honey) if(honey_color) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index ca22e8c27c58..cd68db406ec7 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -66,6 +66,7 @@ update_appearance(updates = ALL) /obj/machinery/biogenerator/update_appearance(updates = ALL) + . = ..() if(panel_open) icon_state = "biogen-empty-o" else if(!src.beaker) diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 61815820d656..aab59cc4af07 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -66,6 +66,7 @@ update_appearance(updates = ALL) /obj/structure/fermenting_barrel/update_appearance(updates = ALL) + . = ..() if(open) icon_state = "barrel_open" else diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 1b6b7c04aa4d..7d02ca4a11c1 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -56,6 +56,7 @@ min_wrate = 0 /obj/machinery/plantgenes/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if((stat & (BROKEN|NOPOWER))) @@ -441,6 +442,7 @@ src.pixel_y = rand(-5, 5) /obj/item/disk/plantgene/update_appearance(updates = ALL) + . = ..() cut_overlays() if(gene) add_overlay("datadisk_gene") diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 294c914f653d..1f4ba90927c3 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -238,6 +238,7 @@ return /obj/machinery/hydroponics/update_appearance(updates = ALL) + . = ..() //Refreshes the icon and sets the luminosity cut_overlays() diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 6f906fd900a2..3ac70bf3e644 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -140,6 +140,7 @@ /obj/structure/bookcase/update_appearance(updates = ALL) + . = ..() if(contents.len < 5) icon_state = "book-[contents.len]" else diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index ad4b1b45e7f6..ed8db6f9c489 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -148,6 +148,7 @@ update_appearance(updates = ALL) /obj/structure/chisel_message/update_appearance(updates = ALL) + . = ..() ..() var/hash = md5(hidden_message) var/newcolor = copytext_char(hash, 1, 7) diff --git a/code/modules/mapping/minimap.dm b/code/modules/mapping/minimap.dm index 60fcd9e3c1fe..c2ed5ffbd93f 100644 --- a/code/modules/mapping/minimap.dm +++ b/code/modules/mapping/minimap.dm @@ -108,6 +108,7 @@ update_appearance(updates = ALL) /obj/item/map/update_appearance(updates = ALL) + . = ..() cut_overlays() var/datum/minimap/map = minimaps[1] if(!map) return diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 3c13393b90da..5ca98fa43f18 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -127,6 +127,7 @@ update_appearance(updates = ALL) /obj/item/clothing/head/helmet/space/hostile_environment/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hostile_env_glass") diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index d04f14570f09..cf5bb8fc6822 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -28,7 +28,8 @@ var/detonation_damage = 50 var/backstab_bonus = 30 -/obj/item/twohanded/kinetic_crusher/update_appearance(updates = ALL) //Updates the sprite for in-hand and on-mob. +/obj/item/twohanded/kinetic_crusher/update_appearance(updates = ALL) + . = ..() //Updates the sprite for in-hand and on-mob. icon_state = "mining_hammer[wielded]" return @@ -509,6 +510,7 @@ /obj/item/twohanded/kinetic_crusher/mega/update_appearance(updates = ALL) + . = ..() icon_state = "magmite_crusher[wielded]" return diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index ba04f19df1d9..34dca7a708e6 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -41,6 +41,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( "Alt-click to select a color. Current color is [picked_color]." /obj/item/stack/marker_beacon/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][lowertext(picked_color)]" /obj/item/stack/marker_beacon/attack_self(mob/user) @@ -97,6 +98,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( . += span_notice("Alt-click to select a color. Current color is [picked_color].") /obj/structure/marker_beacon/update_appearance(updates = ALL) + . = ..() while(!picked_color || !GLOB.marker_beacon_colors[picked_color]) picked_color = pick(GLOB.marker_beacon_colors) icon_state = "[initial(icon_state)][lowertext(picked_color)]-on" diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 680774bab79c..5181990fd899 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -137,6 +137,7 @@ update_appearance(updates = ALL) /obj/item/organ/regenerative_core/update_appearance(updates = ALL) + . = ..() icon_state = inert ? "legion_soul_inert" : "legion_soul" cut_overlays() if(!inert && !preserved) diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 791fa486fac0..106cbb6a0e06 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -139,6 +139,7 @@ icon_state = "sleeper" /obj/machinery/sleeper/survival_pod/update_appearance(updates = ALL) + . = ..() if(state_open) cut_overlays() else diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 0db1d983f30c..017d66433f9d 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -301,6 +301,7 @@ icon_state = "mushroom_bowl" /obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/lavaland/ash_flora.dmi', "fullbowl") diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 353d0a1a212a..2536b6e0f9de 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -684,6 +684,7 @@ GLOBAL_LIST_EMPTY(aide_list) list_reagents = list(/datum/reagent/flightpotion = 5) /obj/item/reagent_containers/glass/bottle/potion/update_appearance(updates = ALL) + . = ..() if(reagents.total_volume) icon_state = initial(icon_state) desc = initial(desc) @@ -1505,6 +1506,7 @@ GLOBAL_LIST_EMPTY(aide_list) blast_range -= round(health_percent * 10) //one additional range for each missing 10% of health /obj/item/hierophant_club/update_appearance(updates = ALL) + . = ..() icon_state = "hierophant_club[timer <= world.time ? "_ready":""][(beacon && !QDELETED(beacon)) ? "":"_beacon"]" item_state = icon_state if(ismob(loc)) diff --git a/code/modules/mining/lavaland/world_anvil.dm b/code/modules/mining/lavaland/world_anvil.dm index 376a6de9f1a2..e0d31ddc29df 100644 --- a/code/modules/mining/lavaland/world_anvil.dm +++ b/code/modules/mining/lavaland/world_anvil.dm @@ -28,6 +28,7 @@ . = ..() /obj/structure/world_anvil/update_appearance(updates = ALL) + . = ..() icon_state = forge_charges > 0 ? "anvil_a" : "anvil" if(forge_charges > 0) set_light(4,1,LIGHT_COLOR_ORANGE) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 8e2457b03a6d..a44d5972d78a 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -346,6 +346,7 @@ ..() /obj/machinery/mineral/ore_redemption/update_appearance(updates = ALL) + . = ..() if(powered()) icon_state = initial(icon_state) else diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 2478133be5d9..9156452293ac 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -106,6 +106,7 @@ GLOB.vending_products[M.equipment_path] = 1 /obj/machinery/mineral/equipment_vendor/update_appearance(updates = ALL) + . = ..() if(powered()) icon_state = initial(icon_state) else diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 245693d1ffd4..06a6f2097824 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -23,6 +23,7 @@ var/edible = FALSE //can a preternis eat it for some funny effect? /obj/item/stack/ore/update_appearance(updates = ALL) + . = ..() var/difference = min(ORESTACK_OVERLAYS_MAX, amount) - (LAZYLEN(stack_overlays)+1) if(difference == 0) return @@ -627,6 +628,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ . += span_info("But they told me I could only have one at a time...") /obj/item/coinstack/update_appearance(updates = ALL) + . = ..() cut_overlays() for(var/i in 1 to length(coins)) var/obj/item/coin/C = coins[i] diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 4b9b28dac93c..f2e332062579 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -25,6 +25,7 @@ Being placed in a mech does not slave you to any laws." /obj/item/mmi/update_appearance(updates = ALL) + . = ..() if(!brain) icon_state = "mmi_off" return diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index fb3a5be508fb..9c5d7245f545 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -205,6 +205,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) /obj/item/mmi/posibrain/update_appearance(updates = ALL) + . = ..() if(searching) icon_state = "[initial(icon_state)]-searching" return diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm index 60be171dfdb4..0e7654796770 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm @@ -215,6 +215,7 @@ GLOBAL_VAR_INIT(primary_data_core, null) AI.eyeobj.forceMove(get_turf(src)) /obj/machinery/ai/data_core/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!(stat & (BROKEN|EMPED)) && has_power()) diff --git a/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm b/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm index 842fc7c5b6e3..07e36a74daca 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm @@ -97,6 +97,7 @@ GLOBAL_LIST_EMPTY(server_cabinets) /obj/machinery/ai/server_cabinet/update_appearance(updates = ALL) + . = ..() cut_overlays() if(installed_racks.len > 0) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 02041425feb7..6a45ac38fd83 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -84,6 +84,7 @@ russian = TRUE // imported from Russia /mob/living/simple_animal/bot/secbot/update_appearance(updates = ALL) + . = ..() if(mode == BOT_HUNT) icon_state = "[initial(icon_state)]-c" return diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index 7fb6cc08a64e..12813a6e9459 100644 --- a/code/modules/mob/living/simple_animal/eldritch_demons.dm +++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm @@ -317,12 +317,12 @@ ) /mob/living/simple_animal/hostile/eldritch/rust_spirit/setDir(newdir) - . = ..() - if(newdir == NORTH) - icon_state = "rust_walker_n" - else if(newdir == SOUTH) - icon_state = "rust_walker_s" - //update_appearance(updates = ALL) + . = ..() + if(newdir == NORTH) + icon_state = "rust_walker_n" + else if(newdir == SOUTH) + icon_state = "rust_walker_s" + //update_appearance(updates = ALL) /mob/living/simple_animal/hostile/eldritch/rust_spirit/Moved() . = ..() diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index d07d3b7f59be..cfd0b1a219a9 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -132,6 +132,7 @@ death() /mob/living/simple_animal/spiderbot/update_appearance(updates = ALL) + . = ..() if(mmi) if(istype(mmi, /obj/item/mmi/posibrain)) icon_state = "spiderbot-chassis-posi" diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 884f764901bc..bfa8c73c46b9 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -263,6 +263,7 @@ . += get_modular_computer_parts_examine(user) /obj/item/modular_computer/update_appearance(updates = ALL) + . = ..() if(!physical) return diff --git a/code/modules/modular_computers/computers/item/laptop/laptop.dm b/code/modules/modular_computers/computers/item/laptop/laptop.dm index a44268271ec2..49a9af2f4b7b 100644 --- a/code/modules/modular_computers/computers/item/laptop/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop/laptop.dm @@ -34,6 +34,7 @@ toggle_open() /obj/item/modular_computer/laptop/update_appearance(updates = ALL) + . = ..() if(screen_on) ..() else diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index 8fdc1b4fd83a..318f33df8a3c 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -61,6 +61,7 @@ return ..() /obj/item/modular_computer/tablet/update_appearance(updates = ALL) + . = ..() ..() if (!isnull(variants)) if(!finish_color) diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 43959c3ba01a..802d0b887418 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -76,6 +76,7 @@ return (cpu.emag_act(user)) /obj/machinery/modular_computer/update_appearance(updates = ALL) + . = ..() cpu.update_appearance(updates = ALL) /obj/machinery/modular_computer/AltClick(mob/user) diff --git a/code/modules/paperwork/carbonpaper.dm b/code/modules/paperwork/carbonpaper.dm index 59f858a3fb8f..5c38cbb3bef3 100644 --- a/code/modules/paperwork/carbonpaper.dm +++ b/code/modules/paperwork/carbonpaper.dm @@ -8,6 +8,7 @@ /obj/item/paper/carbon/update_appearance(updates = ALL) + . = ..() if(iscopy) if(written.len) icon_state = "cpaper_words" diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 4e808a219f1b..ea39309be758 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -26,6 +26,7 @@ return ..() /obj/item/clipboard/update_appearance(updates = ALL) + . = ..() cut_overlays() var/list/dat = list() if(toppaper) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 0dcfc60a8391..ae398634f6cb 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -61,6 +61,7 @@ name = "colored cabinet" /obj/structure/filingcabinet/colored/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/cab = mutable_appearance(icon, "coloredcabinet_trim") cab.color = colour diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index fdb1040cfd0f..24f77c0a89dd 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -29,6 +29,7 @@ /obj/item/folder/update_appearance(updates = ALL) + . = ..() cut_overlays() if(contents.len) add_overlay("folder_paper") diff --git a/code/modules/paperwork/inspector_booth.dm b/code/modules/paperwork/inspector_booth.dm index 8c66d854e16b..7cd9016bb451 100644 --- a/code/modules/paperwork/inspector_booth.dm +++ b/code/modules/paperwork/inspector_booth.dm @@ -58,6 +58,7 @@ update_appearance(updates = ALL) /obj/machinery/inspector_booth/update_appearance(updates = ALL) + . = ..() if (stat & NOPOWER) icon_state = "booth_off" else if (panel_open || stat & MAINT) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index fb451fc60a67..50f5182fd099 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -79,6 +79,7 @@ /obj/item/paper/update_appearance(updates = ALL) + . = ..() if(resistance_flags & ON_FIRE) icon_state = "paper_onfire" diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index f823b5576f01..f6f1f67df1e3 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -206,6 +206,7 @@ unbundle() /obj/item/paper_bundle/update_appearance(updates = ALL) + . = ..() cut_overlays() var/obj/item/paper/P = src[1] icon_state = P.icon_state diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 848fafbd8673..3d3eae64687f 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -35,6 +35,7 @@ /obj/item/papercutter/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 76a820b95d06..3f04fa272af5 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -132,6 +132,7 @@ . += "It doesn't contain anything." /obj/item/paper_bin/update_appearance(updates = ALL) + . = ..() if(total_paper < 1) icon_state = "paper_bin0" else diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 6c330a49adde..ecece6048356 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -53,6 +53,7 @@ return (BRUTELOSS) /obj/item/paperplane/update_appearance(updates = ALL) + . = ..() cut_overlays() var/list/stamped = internalPaper.stamped if(stamped) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 0294135e4d57..b7d92a601cda 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -119,6 +119,7 @@ emptypaper() /obj/machinery/papershredder/update_appearance(updates = ALL) + . = ..() if(paperamount == 0) icon_state = "papershredder0" if(paperamount == 1||paperamount == 2) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index c32b6d10b9ab..9d986f495826 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -230,6 +230,7 @@ update_appearance(updates = ALL) /obj/item/pen/edagger/update_appearance(updates = ALL) + . = ..() if(on) icon_state = "edagger" item_state = "edagger" diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 0201dd59bc35..7720a582f752 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -21,6 +21,7 @@ update_appearance(updates = ALL) /obj/machinery/ticket_machine/update_appearance(updates = ALL) + . = ..() var/Temp = screenNum //This whole thing breaks down a 3 digit number into 3 seperate digits, aka "69" becomes "0","6" and "9" var/Digit1 = round(Temp%10)//The remainder of any number/10 is always that number's rightmost digit var/Digit2 = round(((Temp-Digit1)*0.1)%10) //Same idea, but divided by ten, to find the middle digit @@ -145,6 +146,7 @@ var/ticket_number /obj/item/ticket_machine_ticket/update_appearance(updates = ALL) + . = ..() var/Temp = ticket_number //this stuff is a repeat from the other update_icon, but with new image files and the like var/Digit1 = round(Temp%10) var/Digit2 = round(((Temp-Digit1)*0.1)%10) diff --git a/code/modules/photography/photos/frame.dm b/code/modules/photography/photos/frame.dm index 8f5d7c7a4912..88b31296e9ee 100644 --- a/code/modules/photography/photos/frame.dm +++ b/code/modules/photography/photos/frame.dm @@ -45,6 +45,7 @@ return ..() /obj/item/wallframe/picture/update_appearance(updates = ALL) + . = ..() cut_overlays() if(displayed) add_overlay(image(displayed)) @@ -149,6 +150,7 @@ framed.show(user) /obj/structure/sign/picture_frame/update_appearance(updates = ALL) + . = ..() cut_overlays() if(framed) add_overlay(image(framed)) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index 5dea309e7766..91839f855ed4 100644 --- a/code/modules/photography/photos/photo.dm +++ b/code/modules/photography/photos/photo.dm @@ -33,6 +33,7 @@ desc = P.picture_desc /obj/item/photo/update_appearance(updates = ALL) + . = ..() if(!istype(picture) || !picture.picture_image) return var/icon/I = picture.get_small_icon() diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index a5d28bf42960..9ab6d9a04d1f 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -160,7 +160,8 @@ All the important duct code: adjacents += D return adjacents -/obj/machinery/duct/update_appearance(updates = ALL) //setting connects isnt a parameter because sometimes we make more than one change, overwrite it completely or just add it to the bitfield +/obj/machinery/duct/update_appearance(updates = ALL) + . = ..() //setting connects isnt a parameter because sometimes we make more than one change, overwrite it completely or just add it to the bitfield var/temp_icon = initial(icon_state) for(var/D in GLOB.cardinals) if(D & connects) @@ -263,6 +264,7 @@ All the important duct code: /obj/machinery/duct/multilayered/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) if((connects & NORTH) || (connects & SOUTH)) icon_state += "_vertical" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index def4fc712343..fa4606ded5fb 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -326,6 +326,7 @@ // update the APC icon to show the three base states // also add overlays for indicator lights /obj/machinery/power/apc/update_appearance(updates = ALL) + . = ..() var/update = check_updates() //returns 0 if no need to update icons. // 1 if we need to update the icon_state // 2 if we need to update the overlays diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e4caa57f3c08..165594b73b58 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -120,6 +120,7 @@ By design, d1 is the smallest direction and d2 is the highest update_appearance(updates = ALL) /obj/structure/cable/update_appearance(updates = ALL) + . = ..() icon_state = "[d1]-[d2]" color = null add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY) @@ -563,6 +564,7 @@ By design, d1 is the smallest direction and d2 is the highest return ..() /obj/item/stack/cable_coil/update_appearance(updates = ALL) + . = ..() if(novariants) return icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 15a926af4c89..2ccc32836a10 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -97,6 +97,7 @@ return PROCESS_KILL /obj/item/stock_parts/cell/update_appearance(updates = ALL) + . = ..() cut_overlays() if(grown_battery) add_overlay(image('icons/obj/power.dmi',"grown_wires")) diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 5b009baae9f3..f322e5b460b1 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -32,6 +32,7 @@ return ..() /obj/machinery/power/generator/update_appearance(updates = ALL) + . = ..() cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 60ca9f7c275b..34a3eb306a7b 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -44,6 +44,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne qdel(src)//like the singulo, tesla deletes it. stops it from exploding over and over /obj/machinery/gravity_generator/update_appearance(updates = ALL) + . = ..() ..() icon_state = "[get_status()]_[sprite_number]" @@ -260,6 +261,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne return on || charging_state != POWER_IDLE ? "on" : "off" /obj/machinery/gravity_generator/main/update_appearance(updates = ALL) + . = ..() ..() for(var/obj/O in parts) O.update_appearance(updates = ALL) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 4664be24270f..946185c240ed 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -340,6 +340,7 @@ return ..() /obj/machinery/light/update_appearance(updates = ALL) + . = ..() cut_overlays() switch(status) // set icon_states if(LIGHT_OK) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index be7fd5007a9e..4529a18fbc11 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -54,6 +54,7 @@ soundloop.start() /obj/machinery/power/port_gen/update_appearance(updates = ALL) + . = ..() icon_state = "[base_icon]_[active]" /obj/machinery/power/port_gen/process() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 38b6209c5601..6b3b959b4502 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -302,6 +302,7 @@ stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT*(machine_tier+power_bonus) /obj/machinery/power/rad_collector/update_appearance(updates = ALL) + . = ..() cut_overlays() if(loaded_tank) add_overlay("ptank") diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index e6cb21d25aaa..aa80e9051e3f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -121,6 +121,7 @@ return ..() /obj/machinery/power/emitter/update_appearance(updates = ALL) + . = ..() if(active && powernet) icon_state = avail(active_power_usage) ? icon_state_on : icon_state_underpowered else diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 7dcd25374def..fdb83a680963 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -45,6 +45,7 @@ field_generator power level display var/clean_up = 0 /obj/machinery/field/generator/update_appearance(updates = ALL) + . = ..() cut_overlays() if(warming_up) add_overlay("+a[warming_up]") diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 871693965c32..f14b47742b75 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -122,6 +122,7 @@ /obj/structure/particle_accelerator/update_appearance(updates = ALL) + . = ..() switch(construction_state) if(PA_CONSTRUCTION_UNSECURED,PA_CONSTRUCTION_UNWIRED) icon_state="[reference]" diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 4cf77f58bdf4..44fdab118abd 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -63,6 +63,7 @@ connected_parts.Cut() /obj/machinery/particle_accelerator/control_box/update_appearance(updates = ALL) + . = ..() if(active) icon_state = "control_boxp[strength]" //yogs- fix sprite not updating (note that /tg/ PA power 2 sprite is incomplete) else diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index b4a8c977acdb..12eb8bceec42 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -206,6 +206,7 @@ /obj/machinery/power/smes/update_appearance(updates = ALL) + . = ..() cut_overlays() if(stat & BROKEN) return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index e9de450d040a..96016b810c62 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -114,6 +114,7 @@ qdel(src) /obj/machinery/power/solar/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() var/matrix/turner = matrix() @@ -373,6 +374,7 @@ T.set_control(src) /obj/machinery/power/solar_control/update_appearance(updates = ALL) + . = ..() cut_overlays() if(stat & NOPOWER) add_overlay("[icon_keyboard]_off") diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index 0f3cf49d02c6..3e727e415146 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -36,6 +36,7 @@ update_appearance(updates = ALL) /obj/item/ammo_casing/update_appearance(updates = ALL) + . = ..() ..() icon_state = "[initial(icon_state)][BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? "-live" : ""]" desc = "[initial(desc)][!BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? " This one is spent." : ""]" diff --git a/code/modules/projectiles/ammunition/reusable/foam.dm b/code/modules/projectiles/ammunition/reusable/foam.dm index b0af19d2b809..523fb32afbbb 100644 --- a/code/modules/projectiles/ammunition/reusable/foam.dm +++ b/code/modules/projectiles/ammunition/reusable/foam.dm @@ -11,6 +11,7 @@ var/obj/item/pen/pen /obj/item/ammo_casing/reusable/foam_dart/update_appearance(updates = ALL) + . = ..() ..() if (modified) icon_state = "foamdart_empty" diff --git a/code/modules/projectiles/attachments/_attachment.dm b/code/modules/projectiles/attachments/_attachment.dm index 43728cbc75fd..38d6743c5388 100644 --- a/code/modules/projectiles/attachments/_attachment.dm +++ b/code/modules/projectiles/attachments/_attachment.dm @@ -36,6 +36,7 @@ var/list/actions_list = list() /obj/item/attachment/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][is_on ? "_on" : ""]" . = ..() attached_gun?.update_attachments() diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index c9fa3614e102..7366de34d678 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -170,6 +170,7 @@ update_appearance(updates = ALL) /obj/item/ammo_box/update_appearance(updates = ALL) + . = ..() var/rounds_left = stored_ammo.len switch(multiple_sprites) if(AMMO_BOX_PER_BULLET) diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index 2712eba4a447..9aa96d55736e 100644 --- a/code/modules/projectiles/boxes_magazines/external/grenade.dm +++ b/code/modules/projectiles/boxes_magazines/external/grenade.dm @@ -6,6 +6,7 @@ max_ammo = 8 /obj/item/ammo_box/magazine/m75/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "75-8" diff --git a/code/modules/projectiles/boxes_magazines/external/lmg.dm b/code/modules/projectiles/boxes_magazines/external/lmg.dm index d58903e067df..34cbd6fdf303 100644 --- a/code/modules/projectiles/boxes_magazines/external/lmg.dm +++ b/code/modules/projectiles/boxes_magazines/external/lmg.dm @@ -33,5 +33,6 @@ sprite_designation = "I" /obj/item/ammo_box/magazine/mm712x82/update_appearance(updates = ALL) + . = ..() ..() icon_state = "a762[sprite_designation]-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/boxes_magazines/external/pistol.dm b/code/modules/projectiles/boxes_magazines/external/pistol.dm index bb1a9749cb55..f9766f3aeae9 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -65,6 +65,7 @@ max_ammo = 8 /obj/item/ammo_box/magazine/m45/update_appearance(updates = ALL) + . = ..() ..() if (ammo_count() >= 8) icon_state = "45-8" @@ -82,6 +83,7 @@ max_ammo = 15 /obj/item/ammo_box/magazine/pistolm9mm/update_appearance(updates = ALL) + . = ..() ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" @@ -113,6 +115,7 @@ max_ammo = 8 /obj/item/ammo_box/magazine/v38/update_appearance(updates = ALL) + . = ..() ..() if (ammo_count() >= 8) icon_state = "v38[sprite_designation]-8" diff --git a/code/modules/projectiles/boxes_magazines/external/rechargable.dm b/code/modules/projectiles/boxes_magazines/external/rechargable.dm index 23754c87a826..477fd92b8950 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -9,6 +9,7 @@ max_ammo = 20 /obj/item/ammo_box/magazine/recharge/update_appearance(updates = ALL) + . = ..() ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." cut_overlays() @@ -30,6 +31,7 @@ desc = "A rechargeable, detachable battery that serves as a magazine for las weaponry." /obj/item/ammo_box/magazine/recharge/lasgun/update_appearance(updates = ALL) + . = ..() ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) @@ -75,6 +77,7 @@ ) /obj/item/gun/ballistic/automatic/pistol/ntusp/update_appearance(updates = ALL) + . = ..() icon_state = initial(icon_state) if(istype(magazine, /obj/item/ammo_box/magazine/recharge/ntusp/laser)) // Tricks the parent proc into thinking we have a skin so it uses the laser-variant icon_state @@ -136,6 +139,7 @@ max_ammo = 8 /obj/item/ammo_box/magazine/recharge/ntusp/laser/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() var/cur_ammo = ammo_count() diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index 64a07035bf35..87fbcdecaa48 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -9,6 +9,7 @@ max_ammo = 10 /obj/item/ammo_box/magazine/m10mm/rifle/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "75-8" @@ -26,6 +27,7 @@ max_ammo = 30 /obj/item/ammo_box/magazine/m556/update_appearance(updates = ALL) + . = ..() ..() icon_state = "5.56m[sprite_designation]-[round(ammo_count(),5)]" @@ -56,6 +58,7 @@ max_ammo = 30 /obj/item/ammo_box/magazine/r556/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "arg556[sprite_designation]" @@ -97,6 +100,7 @@ max_ammo = 15 /obj/item/ammo_box/magazine/m308/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "m308[sprite_designation]" @@ -131,6 +135,7 @@ max_ammo = 11 /obj/item/ammo_box/magazine/ks762/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "ks762[sprite_designation]" diff --git a/code/modules/projectiles/boxes_magazines/external/shotgun.dm b/code/modules/projectiles/boxes_magazines/external/shotgun.dm index 49fd92d40e08..a267f28e9093 100644 --- a/code/modules/projectiles/boxes_magazines/external/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/external/shotgun.dm @@ -11,6 +11,7 @@ sprite_designation = "b" /obj/item/ammo_box/magazine/m12g/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "m12g[sprite_designation]-8" diff --git a/code/modules/projectiles/boxes_magazines/external/smg.dm b/code/modules/projectiles/boxes_magazines/external/smg.dm index 1d9e6a3d10de..c280f4fff7e2 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -9,6 +9,7 @@ max_ammo = 20 /obj/item/ammo_box/magazine/wt550m9/update_appearance(updates = ALL) + . = ..() ..() switch(ammo_count()) if(17 to 21) //Considers the extra bullet in the chamber @@ -75,7 +76,8 @@ sprite_designation = "B" max_ammo = 10 -/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_appearance(updates = ALL) // Snowflake code snowflake code +/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_appearance(updates = ALL) + . = ..() // Snowflake code snowflake code ..() switch(ammo_count()) if(9 to 11) //Considers the extra bullet in the chamber @@ -102,6 +104,7 @@ max_ammo = 32 /obj/item/ammo_box/magazine/uzim9mm/update_appearance(updates = ALL) + . = ..() ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" @@ -116,6 +119,7 @@ max_ammo = 21 /obj/item/ammo_box/magazine/smgm9mm/update_appearance(updates = ALL) + . = ..() ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" @@ -146,6 +150,7 @@ max_ammo = 24 /obj/item/ammo_box/magazine/smgm45/update_appearance(updates = ALL) + . = ..() ..() icon_state = "c20r45[sprite_designation]-[round(ammo_count(),2)]" diff --git a/code/modules/projectiles/boxes_magazines/external/sniper.dm b/code/modules/projectiles/boxes_magazines/external/sniper.dm index 1930d1d4eb80..653c6cd50fb7 100644 --- a/code/modules/projectiles/boxes_magazines/external/sniper.dm +++ b/code/modules/projectiles/boxes_magazines/external/sniper.dm @@ -10,6 +10,7 @@ caliber = ".50bmg" /obj/item/ammo_box/magazine/sniper_rounds/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "[initial(icon_state)]-ammo" diff --git a/code/modules/projectiles/boxes_magazines/external/toy.dm b/code/modules/projectiles/boxes_magazines/external/toy.dm index 6878f71663fc..fe9464112592 100644 --- a/code/modules/projectiles/boxes_magazines/external/toy.dm +++ b/code/modules/projectiles/boxes_magazines/external/toy.dm @@ -10,6 +10,7 @@ max_ammo = 20 /obj/item/ammo_box/magazine/toy/smg/update_appearance(updates = ALL) + . = ..() ..() if(ammo_count()) icon_state = "smg9mm-42" @@ -36,6 +37,7 @@ max_ammo = 20 /obj/item/ammo_box/magazine/toy/smgm45/update_appearance(updates = ALL) + . = ..() ..() icon_state = "c20r45-[round(ammo_count(),2)]" @@ -51,6 +53,7 @@ max_ammo = 50 /obj/item/ammo_box/magazine/toy/m762/update_appearance(updates = ALL) + . = ..() ..() icon_state = "a762-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 8a7024ff8930..8bcecf4469be 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -420,6 +420,7 @@ return TRUE /obj/item/gun/update_appearance(updates = ALL) + . = ..() ..() diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index fded1ae8529b..bf57cfc9a886 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -189,6 +189,7 @@ /obj/item/gun/ballistic/update_appearance(updates = ALL) + . = ..() if (QDELETED(src)) return ..() diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 3a14bd3a3819..220178e09c03 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -28,6 +28,7 @@ pin = /obj/item/firing_pin /obj/item/gun/ballistic/automatic/update_appearance(updates = ALL) + . = ..() ..() if(!select) add_overlay("[initial(icon_state)]_semi") @@ -158,6 +159,7 @@ ..() /obj/item/gun/ballistic/automatic/m90/update_appearance(updates = ALL) + . = ..() ..() switch(select) if(0) diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm index 8052afbb61ef..45eed69f4d4b 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -134,6 +134,7 @@ update_appearance(updates = ALL) /obj/item/gun/ballistic/bow/update_appearance(updates = ALL) + . = ..() cut_overlay(arrow_overlay, TRUE) icon_state = "[initial(icon_state)][chambered ? "_firing" : ""]" if(get_ammo()) @@ -452,6 +453,7 @@ . += span_warning("It is currently recharging!") /obj/item/gun/ballistic/bow/energy/update_appearance(updates = ALL) + . = ..() cut_overlay(arrow_overlay, TRUE) if(folded) diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index 5c72f62bb7cf..ff4419eeca37 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -82,6 +82,7 @@ /obj/item/minigunpack/update_appearance(updates = ALL) + . = ..() if(armed) icon_state = "notholstered" else diff --git a/code/modules/projectiles/guns/ballistic/minigun.dm b/code/modules/projectiles/guns/ballistic/minigun.dm index fc8e2b1863d4..f0b4beb2becb 100644 --- a/code/modules/projectiles/guns/ballistic/minigun.dm +++ b/code/modules/projectiles/guns/ballistic/minigun.dm @@ -82,6 +82,7 @@ /obj/item/minigunbackpack/update_appearance(updates = ALL) + . = ..() if(armed) icon_state = "notholstered" else diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 7a596a139817..3e6a16f0ca6c 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -16,6 +16,7 @@ tac_reloads = FALSE obj/item/gun/ballistic/rifle/update_appearance(updates = ALL) + . = ..() ..() add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 4d82b74cb529..6602be3b40ab 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -233,6 +233,7 @@ to_chat(user, span_warning("You need at least ten lengths of cable if you want to make a sling!")) /obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_appearance(updates = ALL) + . = ..() ..() if(slung) icon_state = "ishotgunsling" diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 2217d06451c6..d3454f3ebade 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -324,6 +324,7 @@ STR.set_holdable(list(/obj/item/gun/energy/dueling)) /obj/item/storage/lockbox/dueling/update_appearance(updates = ALL) + . = ..() cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index a50e067aa0ed..d8ea1f6d7fd3 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -31,6 +31,7 @@ return ..() /obj/item/gun/energy/e_gun/mini/update_appearance(updates = ALL) + . = ..() ..() if(gun_light && gun_light.on) add_overlay("mini-light") diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index f4ea29b21b3c..47d9e9a9193a 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -146,6 +146,7 @@ overheat = FALSE /obj/item/gun/energy/kinetic_accelerator/update_appearance(updates = ALL) + . = ..() ..() if(!can_shoot()) add_overlay("[icon_state]_empty") diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7d6ba492dc37..ed89c3531d45 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -35,6 +35,7 @@ ammo_x_offset = 1 /obj/item/gun/energy/decloner/update_appearance(updates = ALL) + . = ..() ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) @@ -304,6 +305,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/wormhole/upgraded, /obj/item/ammo_casing/energy/wormhole/orange/upgraded) /obj/item/gun/energy/wormhole_projector/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][select]" item_state = icon_state diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 924f3f8042f8..e854503dd31a 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -22,6 +22,7 @@ . += "Has [charges] charge\s remaining." /obj/item/gun/magic/wand/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" /obj/item/gun/magic/wand/attack(atom/target, mob/living/user) diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index f6639a5174ec..b34ae4ce3d6b 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -149,6 +149,7 @@ current_zoom_y = 0 /obj/item/gun/energy/beam_rifle/update_appearance(updates = ALL) + . = ..() cut_overlays() var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1] if(!QDELETED(cell) && (cell.charge >= primary_ammo.e_cost)) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index eb9202166e24..32ed87ae43f2 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -45,6 +45,7 @@ return ..() /obj/item/gun/blastcannon/update_appearance(updates = ALL) + . = ..() if(bomb) icon_state = icon_state_loaded name = "blast cannon" diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 1d35ee710cf1..133d53987c2b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -146,6 +146,7 @@ flick(working_state,src) /obj/machinery/chem_dispenser/update_appearance(updates = ALL) + . = ..() cut_overlays() icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]" if(has_panel_overlay && panel_open) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 2727fa68a2e1..06dc4a322e50 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -24,6 +24,7 @@ update_appearance(updates = ALL) /obj/machinery/chem_heater/update_appearance(updates = ALL) + . = ..() icon_state = "mixer[beaker ? 1 : 0][on ? "a" : "b"]" /obj/machinery/chem_heater/CtrlClick(mob/user) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 1e54c7b41760..3ef4dff44827 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -70,6 +70,7 @@ bottle = null /obj/machinery/chem_master/update_appearance(updates = ALL) + . = ..() cut_overlays() if (stat & BROKEN) add_overlay("waitlight") diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 373e5cc0715a..7e37deac3a93 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -126,6 +126,7 @@ playsound(src, 'sound/machines/ping.ogg', 30, TRUE) /obj/machinery/computer/pandemic/update_appearance(updates = ALL) + . = ..() if(stat & BROKEN) icon_state = (beaker ? "mixer1_b" : "mixer0_b") return diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 1f9361357e5d..bf1c0a77b400 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -100,6 +100,7 @@ holdingitems = list() /obj/machinery/reagentgrinder/update_appearance(updates = ALL) + . = ..() if(!container) icon_state = "juicer" return diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index 5e5c4820da33..ebde6133275e 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -37,6 +37,7 @@ reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating /obj/machinery/smoke_machine/update_appearance(updates = ALL) + . = ..() if((!is_operational()) || (!on) || (reagents.total_volume == 0)) if (panel_open) icon_state = "smoke0-o" diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 532c7be49934..9772b346649f 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -79,6 +79,7 @@ name = "blood pack" /obj/item/reagent_containers/blood/update_appearance(updates = ALL) + . = ..() cut_overlays() var/v = min(round(reagents.total_volume / volume * 10), 10) diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm index cdecfa564182..58dbd975bc3e 100644 --- a/code/modules/reagents/reagent_containers/borghypo.dm +++ b/code/modules/reagents/reagent_containers/borghypo.dm @@ -56,6 +56,7 @@ Borg Hypospray charge_timer = 0 //update_appearance(updates = ALL) + . = ..() return 1 // Use this to add more chemicals for the borghypo to produce. diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index eb111d7bb023..61a12f6d5d99 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -21,6 +21,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/glass/bottle/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!filling_icon_state) filling_icon_state = icon_state diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 38216c4f798b..479640f689ea 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -101,6 +101,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/dropper/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper") diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 26c522509993..048b7f6a3e2b 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -128,6 +128,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/glass/beaker/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents.total_volume) @@ -178,6 +179,7 @@ possible_transfer_amounts = list(5,10,15,20,25,30,60,120) /obj/item/reagent_containers/glass/beaker/plastic/update_appearance(updates = ALL) + . = ..() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states ..() icon_state = "beakerwhite" @@ -425,6 +427,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/glass/mixbowl/update_appearance(updates = ALL) + . = ..() cut_overlays() if(reagents.total_volume) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 939e578cdbc4..9aa88e5f5464 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -137,6 +137,7 @@ update_appearance(updates = ALL) /obj/item/reagent_containers/autoinjector/medipen/update_appearance(updates = ALL) + . = ..() if(reagents.total_volume > 0) icon_state = initial(icon_state) else @@ -307,6 +308,7 @@ update_appearance(updates = ALL) /obj/item/hypospray/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if(ismob(loc)) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index f6555460a6bf..620849bc06b7 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -169,6 +169,7 @@ /obj/item/reagent_containers/syringe/update_appearance(updates = ALL) + . = ..() cut_overlays() var/rounded_vol if(reagents && reagents.total_volume) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 76a6871e754e..a89b7666249d 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -122,6 +122,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) update() /obj/machinery/conveyor/update_appearance(updates = ALL) + . = ..() if(!operating) icon_state = "conveyor[inverted ? "-0" : "0"]" else @@ -272,6 +273,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) // update the icon depending on the position /obj/machinery/conveyor_switch/update_appearance(updates = ALL) + . = ..() if(position<0) if(invert_icon) icon_state = "switch-fwd" diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index d9859663293e..5f75094c080d 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -361,6 +361,7 @@ update_appearance(updates = ALL) /obj/machinery/disposal/bin/update_appearance(updates = ALL) + . = ..() cut_overlays() if(stat & BROKEN) pressure_charging = FALSE diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index fccbcddc8a79..df4cd45c443b 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -41,6 +41,7 @@ // update iconstate and dpdir due to dir and type /obj/structure/disposalconstruct/update_appearance(updates = ALL) + . = ..() icon_state = initial(pipe_type.icon_state) if(is_pipe()) icon_state = "con[icon_state]" diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm index d04124a16756..e9ababcaef9d 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -69,6 +69,7 @@ /obj/structure/holyfountain/update_appearance(updates = ALL) + . = ..() if(last_process + time_between_uses > world.time) icon_state = "fountain" else diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index ba62f348480c..637d742ba362 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -52,6 +52,7 @@ Note: Must be placed within 3 tiles of the R&D Console reset_busy() /obj/machinery/rnd/destructive_analyzer/update_appearance(updates = ALL) + . = ..() if(loaded_item) icon_state = "d_analyzer_l" else diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index dccb27d623e1..636c34a2d18c 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -570,6 +570,7 @@ do_experiment() /obj/machinery/rnd/experimentor/update_appearance(updates = ALL) + . = ..() icon_state = "h_lathe" /obj/machinery/rnd/experimentor/proc/warn_admins(user, ReactionName) diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index c7661d2fb1be..69c69d154f9b 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -105,6 +105,7 @@ SEND_SIGNAL(occupant, COMSIG_NANITE_DELETE) /obj/machinery/nanite_chamber/update_appearance(updates = ALL) + . = ..() cut_overlays() if((stat & MAINT) || panel_open) diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 32a34f90a195..aac29f13cc32 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -61,6 +61,7 @@ occupant.AddComponent(/datum/component/nanites, 75, cloud_id) /obj/machinery/public_nanite_chamber/update_appearance(updates = ALL) + . = ..() cut_overlays() if((stat & MAINT) || panel_open) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index f7a95f200940..b802145d6276 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -40,6 +40,7 @@ heat_gen /= max(1, tot_rating) /obj/machinery/rnd/server/update_appearance(updates = ALL) + . = ..() if(panel_open) icon_state = "server_t" return diff --git a/code/modules/shuttle/manipulator.dm b/code/modules/shuttle/manipulator.dm index e5e7378b1139..82a3fcdffd47 100644 --- a/code/modules/shuttle/manipulator.dm +++ b/code/modules/shuttle/manipulator.dm @@ -12,7 +12,8 @@ density = TRUE -/obj/machinery/shuttle_manipulator/update_appearance(updates = ALL) +/obj/machinery/shuttle_manipulator/update_appearance(updates = ALL) + . = ..() cut_overlays() var/mutable_appearance/hologram_projection = mutable_appearance(icon, "hologram_on") hologram_projection.pixel_y = 22 diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index 061b99baeac6..d8944c1c28d5 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -30,6 +30,7 @@ obj/machinery/spaceship_navigation_beacon/emp_act() // update the icon_state /obj/machinery/spaceship_navigation_beacon/update_appearance(updates = ALL) + . = ..() if(powered()) icon_state = "core" else diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index c8065c9aafe6..3a22ffbf99cf 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -22,6 +22,7 @@ update_appearance(updates = ALL) /obj/machinery/power/emitter/energycannon/magical/update_appearance(updates = ALL) + . = ..() if(active) icon_state = icon_state_on else diff --git a/code/modules/surgery/anesthesia_machine.dm b/code/modules/surgery/anesthesia_machine.dm index 2cc546a6146f..bd8ea6a475a7 100644 --- a/code/modules/surgery/anesthesia_machine.dm +++ b/code/modules/surgery/anesthesia_machine.dm @@ -23,6 +23,7 @@ update_appearance(updates = ALL) /obj/machinery/anesthetic_machine/update_appearance(updates = ALL) + . = ..() cut_overlays() if(mask_out) add_overlay("mask_off") diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index d12c63c94703..e0ca3414422a 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -11,6 +11,7 @@ var/inflamed /obj/item/organ/appendix/update_appearance(updates = ALL) + . = ..() if(inflamed) icon_state = "appendixinflamed" name = "inflamed appendix" @@ -65,6 +66,7 @@ M.emote("chuckle") //you really think that will stop me? /obj/item/organ/appendix/cybernetic/update_appearance(updates = ALL) + . = ..() icon_state = "implant-filter" name = "cybernetic appendix" diff --git a/code/modules/surgery/organs/augment_legs.dm b/code/modules/surgery/organs/augment_legs.dm index 7164331c7f9d..e12b2317c884 100644 --- a/code/modules/surgery/organs/augment_legs.dm +++ b/code/modules/surgery/organs/augment_legs.dm @@ -60,6 +60,7 @@ CRASH("Invalid zone for [type]") /obj/item/organ/cyberimp/leg/update_appearance(updates = ALL) + . = ..() if(zone == BODY_ZONE_R_LEG) transform = null else // Mirroring the icon diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 657c3c6bd469..b60a8cbc80a2 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -32,6 +32,7 @@ CRASH("Invalid zone for [type]") /obj/item/organ/cyberimp/arm/update_appearance(updates = ALL) + . = ..() if(zone == BODY_ZONE_R_ARM) transform = null else // Mirroring the icon diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index b1a7dc55bc17..fdc1754664fa 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -172,6 +172,7 @@ update_appearance(updates = ALL) /obj/item/organ/cyberimp/chest/thrusters/update_appearance(updates = ALL) + . = ..() if(on) icon_state = "imp_jetpack-on" else @@ -276,6 +277,7 @@ update_appearance(updates = ALL) /obj/item/organ/cyberimp/chest/spinalspeed/update_appearance(updates = ALL) + . = ..() if(on) icon_state = "imp_spinal-on" else diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 5ce92e5947d9..eadd9bc23bb3 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -31,6 +31,7 @@ update_appearance(updates = ALL) /obj/item/organ/heart/update_appearance(updates = ALL) + . = ..() if(beating) icon_state = "[icon_base]-on" else diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index f212c2b3cf34..876edecd4b59 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -56,6 +56,7 @@ return ..() /obj/vehicle/ridden/janicart/update_appearance(updates = ALL) + . = ..() cut_overlays() if(mybag) add_overlay("cart_garbage") diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index db759839aa13..3c1a9ec1272a 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -266,6 +266,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C ..() /obj/machinery/vending/update_appearance(updates = ALL) + . = ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else diff --git a/yogstation/code/game/gamemodes/gangs/dominator.dm b/yogstation/code/game/gamemodes/gangs/dominator.dm index 8494119e35b0..133ba8ad08c0 100644 --- a/yogstation/code/game/gamemodes/gangs/dominator.dm +++ b/yogstation/code/game/gamemodes/gangs/dominator.dm @@ -55,6 +55,7 @@ qdel(src) /obj/machinery/dominator/update_appearance(updates = ALL) + . = ..() cut_overlays() if(!(stat & BROKEN)) icon_state = "dominator-active" diff --git a/yogstation/code/game/gamemodes/gangs/gangtool.dm b/yogstation/code/game/gamemodes/gangs/gangtool.dm index 2392789d13f2..3bf7e5b41780 100644 --- a/yogstation/code/game/gamemodes/gangs/gangtool.dm +++ b/yogstation/code/game/gamemodes/gangs/gangtool.dm @@ -139,6 +139,7 @@ attack_self(usr) /obj/item/gangtool/update_appearance(updates = ALL) + . = ..() overlays.Cut() var/image/I = new(icon, "[icon_state]-overlay") if(gang) diff --git a/yogstation/code/game/objects/items/brace.dm b/yogstation/code/game/objects/items/brace.dm index ecfd8bf60124..381bb7a27659 100644 --- a/yogstation/code/game/objects/items/brace.dm +++ b/yogstation/code/game/objects/items/brace.dm @@ -24,6 +24,7 @@ var/cover_open = FALSE /obj/structure/deployed_brace/update_appearance(updates = ALL) + . = ..() ..() cut_overlays() if(cover_open) diff --git a/yogstation/code/game/objects/items/fishing/rods.dm b/yogstation/code/game/objects/items/fishing/rods.dm index 6d503d8b9640..6ecd237de0e6 100644 --- a/yogstation/code/game/objects/items/fishing/rods.dm +++ b/yogstation/code/game/objects/items/fishing/rods.dm @@ -204,6 +204,7 @@ user.regenerate_icons() /obj/item/twohanded/fishingrod/collapsible/update_appearance(updates = ALL) + . = ..() item_state = opened ? "fishing_rod" : "" icon_state = "[rod_icon_state][opened ? "" : "_c"]" diff --git a/yogstation/code/game/objects/items/holotool/holotool.dm b/yogstation/code/game/objects/items/holotool/holotool.dm index 56803ed309b2..857484441946 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -102,6 +102,7 @@ qdel(M) /obj/item/holotool/update_appearance(updates = ALL) + . = ..() cut_overlays() if(current_tool) var/mutable_appearance/holo_item = mutable_appearance(icon, current_tool.name) diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index c043770e6959..746ec52e3e26 100644 --- a/yogstation/code/game/objects/items/sharpener.dm +++ b/yogstation/code/game/objects/items/sharpener.dm @@ -1,2 +1,3 @@ /obj/item/sharpener/update_appearance(updates = ALL) + . = ..() icon_state = "[initial(icon_state)]_used" diff --git a/yogstation/code/modules/assembly/signaler.dm b/yogstation/code/modules/assembly/signaler.dm index 1e11e00b7a34..889c0eac2cbd 100644 --- a/yogstation/code/modules/assembly/signaler.dm +++ b/yogstation/code/modules/assembly/signaler.dm @@ -8,6 +8,7 @@ update_appearance(updates = ALL) /obj/item/assembly/signaler/update_appearance(updates = ALL) + . = ..() if(label_color) cut_overlays() attached_overlays = list() diff --git a/yogstation/code/modules/clothing/head/helmet.dm b/yogstation/code/modules/clothing/head/helmet.dm index 70390f2236e6..071e0ba69fe0 100644 --- a/yogstation/code/modules/clothing/head/helmet.dm +++ b/yogstation/code/modules/clothing/head/helmet.dm @@ -6,6 +6,7 @@ initial_state = "[initial(icon_state)]" /obj/item/clothing/head/helmet/update_appearance(updates = ALL) + . = ..() var/state = "[initial_state]" if(attached_light) if(attached_light.on) diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 2f7feda280d6..ca33a87da00d 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -16,6 +16,7 @@ return ..() /obj/machinery/power/validhunter_engine/update_appearance(updates = ALL) + . = ..() if(operating) icon_state = "throw_me_in_the_trash_and_feed_my_remains_to_the_devil_operating" else diff --git a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm index 1f0f1f348fdc..82126b794a7f 100644 --- a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm +++ b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm @@ -24,6 +24,7 @@ list_reagents = list(/datum/reagent/medicine/stimulants = 75) /obj/item/reagent_containers/autoinjector/medipen/stimpack/large/update_appearance(updates = ALL) + . = ..() if(reagents.total_volume > 25) icon_state = initial(icon_state) else if(reagents.total_volume) @@ -46,6 +47,7 @@ to_chat(M, span_notice("[enlightenment]")) /obj/item/reagent_containers/autoinjector/medipen/stimpack/large/redpill/update_appearance(updates = ALL) + . = ..() if(reagents.total_volume > 25) icon_state = initial(icon_state) else if(reagents.total_volume) diff --git a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm index b0ff21ac5790..9c18917f9436 100644 --- a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm +++ b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm @@ -28,6 +28,7 @@ sort_scan = TRUE /obj/structure/disposalpipe/sorting/update_appearance(updates = ALL) + . = ..() cut_overlays() . = ..() if(panel_open) diff --git a/yogstation/code/modules/spacepods/spacepod.dm b/yogstation/code/modules/spacepods/spacepod.dm index b3c50ab3fcfb..429ee471e3ce 100644 --- a/yogstation/code/modules/spacepods/spacepod.dm +++ b/yogstation/code/modules/spacepods/spacepod.dm @@ -397,6 +397,7 @@ GLOBAL_LIST_INIT(spacepods_list, list()) qdel(src) /obj/spacepod/update_appearance(updates = ALL) + . = ..() cut_overlays() if(construction_state != SPACEPOD_ARMOR_WELDED) icon = 'goon/icons/obj/spacepods/construction_2x2.dmi' From 85fc69773a8b21b02f3cec365b03c990a3a378a5 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Sun, 18 Jun 2023 23:42:08 -0300 Subject: [PATCH 07/18] g --- code/game/machinery/computer/aifixer.dm | 1 - code/game/machinery/computer/atmos_alert.dm | 1 - code/game/machinery/computer/station_alert.dm | 1 - code/game/machinery/doors/firedoor.dm | 1 - .../game/machinery/porta_turret/portable_turret.dm | 1 - code/game/machinery/transformer.dm | 1 - code/game/mecha/equipment/weapons/mecha_ammo.dm | 14 ++++++++++---- code/game/mecha/mech_bay.dm | 1 - code/game/mecha/working/ripley.dm | 1 - code/game/objects/items/RCD.dm | 1 - code/game/objects/items/ashtray.dm | 1 - code/game/objects/items/robot/robot_items.dm | 1 - code/game/objects/items/storage/belt.dm | 1 - code/game/objects/items/storage/toolbox.dm | 1 - code/game/objects/items/syndicateReverseCard.dm | 1 - code/game/objects/structures/aliens.dm | 1 - .../structures/crates_lockers/closets/bodybag.dm | 1 - .../structures/crates_lockers/crates/bins.dm | 1 - .../structures/crates_lockers/crates/secure.dm | 1 - code/game/objects/structures/headpike.dm | 1 - code/game/turfs/simulated/floor/light_floor.dm | 1 - code/modules/antagonists/blob/structures/_blob.dm | 1 - code/modules/antagonists/blob/structures/shield.dm | 1 - code/modules/assembly/flash.dm | 1 + code/modules/clothing/neck/bodycamera.dm | 1 - code/modules/food_and_drinks/food/customizables.dm | 6 +++--- code/modules/food_and_drinks/food/snacks.dm | 2 +- code/modules/food_and_drinks/food/snacks_pastry.dm | 6 +++--- .../kitchen_machinery/smartfridge.dm | 1 - code/modules/hydroponics/gene_modder.dm | 1 - code/modules/library/soapstone.dm | 1 - code/modules/mining/equipment/explorer_gear.dm | 1 - .../computers/item/tablet/tablet.dm | 1 - code/modules/paperwork/paper_cutter.dm | 1 - code/modules/power/gravitygenerator.dm | 2 -- code/modules/power/solar.dm | 1 - code/modules/projectiles/ammunition/_ammunition.dm | 1 - .../projectiles/ammunition/reusable/foam.dm | 1 - .../boxes_magazines/external/grenade.dm | 1 - .../projectiles/boxes_magazines/external/lmg.dm | 1 - .../projectiles/boxes_magazines/external/pistol.dm | 3 --- .../boxes_magazines/external/rechargable.dm | 3 --- .../projectiles/boxes_magazines/external/rifle.dm | 5 ----- .../boxes_magazines/external/shotgun.dm | 1 - .../projectiles/boxes_magazines/external/smg.dm | 4 ---- .../projectiles/boxes_magazines/external/sniper.dm | 1 - .../projectiles/boxes_magazines/external/toy.dm | 3 --- code/modules/projectiles/gun.dm | 1 - .../projectiles/guns/ballistic/automatic.dm | 2 -- code/modules/projectiles/guns/ballistic/rifle.dm | 1 - code/modules/projectiles/guns/ballistic/shotgun.dm | 1 - code/modules/projectiles/guns/energy/energy_gun.dm | 1 - .../projectiles/guns/energy/kinetic_accelerator.dm | 1 - code/modules/projectiles/guns/energy/special.dm | 1 - .../reagents/reagent_containers/hypospray.dm | 1 - yogstation/code/game/objects/items/brace.dm | 1 - yogstation/code/modules/xenoarch/loot/guns.dm | 1 + 57 files changed, 19 insertions(+), 77 deletions(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 3be1b1dd4b8e..df89017a011b 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -79,7 +79,6 @@ /obj/machinery/computer/aifixer/update_appearance(updates = ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return else diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 2f1a8213499f..0ea40e8b0b9a 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -79,7 +79,6 @@ /obj/machinery/computer/atmos_alert/update_appearance(updates = ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return if(priority_alarms.len) diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index c206143445ca..bb0b718b5c21 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -76,7 +76,6 @@ /obj/machinery/computer/station_alert/update_appearance(updates = ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return var/active_alarms = FALSE diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 9b36050a65d3..a856f8e1fe5d 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -476,7 +476,6 @@ /obj/structure/firelock_frame/update_appearance(updates = ALL) . = ..() - ..() icon_state = "frame[constructionStep]" /obj/structure/firelock_frame/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index c240f0815455..c196d7e1dffe 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -940,7 +940,6 @@ /obj/machinery/turretid/update_appearance(updates = ALL) . = ..() - ..() if(stat & NOPOWER) icon_state = "control_off" else if (enabled) diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 7c048c703ffc..59d39fff3e4c 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -36,7 +36,6 @@ /obj/machinery/transformer/update_appearance(updates = ALL) . = ..() - ..() if(stat & (BROKEN|NOPOWER) || cooldown == 1) icon_state = "separator-AO0" else diff --git a/code/game/mecha/equipment/weapons/mecha_ammo.dm b/code/game/mecha/equipment/weapons/mecha_ammo.dm index 2d7821bfe2ca..eccc9f4567f1 100644 --- a/code/game/mecha/equipment/weapons/mecha_ammo.dm +++ b/code/game/mecha/equipment/weapons/mecha_ammo.dm @@ -18,10 +18,16 @@ var/ammo_type /obj/item/mecha_ammo/update_name() - if(!rounds) - name = "empty ammo box" - desc = "An exosuit ammuniton box that has since been emptied. Please recycle." - icon_state = "empty" + . = ..() + name = "[rounds ? null : "empty "][initial(name)]" + +/obj/item/mecha_ammo/update_desc() + . = ..() + desc = rounds ? initial(desc) : "An exosuit ammuniton box that has since been emptied. It can be safely folded for recycling." + +/obj/item/mecha_ammo/update_icon_state() + icon_state = rounds ? initial(icon_state) : "empty" + return ..() /obj/item/mecha_ammo/attack_self(mob/user) ..() diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 0a3b41f0a22e..87a778c02d61 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -145,7 +145,6 @@ /obj/machinery/computer/mech_bay_power_console/update_appearance(updates = ALL) . = ..() - ..() if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN)) return add_overlay("recharge_comp_on") diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index fcc4ec4711cd..4616a9bbe2fe 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -41,7 +41,6 @@ /obj/mecha/working/ripley/update_appearance(updates = ALL) . = ..() - ..() var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) if (C.amount) cut_overlays() diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 87b8b1e29259..d44e84e3e5fe 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -738,7 +738,6 @@ RLD /obj/item/construction/rcd/update_appearance(updates = ALL) . = ..() - ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) cut_overlays() //To prevent infinite stacking of overlays diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 89ab959ac610..018700fe40ff 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -7,7 +7,6 @@ /obj/item/ashtray/update_appearance(updates = ALL) . = ..() - ..() overlays.Cut() if(contents.len == max_butts) add_overlay(image('icons/obj/objects.dmi',"ashtray_full")) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5aff16f9bb4b..fefd4429c3d4 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -181,7 +181,6 @@ /obj/item/borg/charger/update_appearance(updates = ALL) . = ..() - ..() icon_state = "charger_[mode]" /obj/item/borg/charger/attack_self(mob/user) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 43d099b8ed49..b7b1f3f1a4be 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -822,7 +822,6 @@ /obj/item/storage/belt/quiver/update_appearance(updates = ALL) . = ..() - ..() if(content_overlays && ismob(loc)) var/mob/M = loc M.update_inv_belt() diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 141ee833ce0b..f369b6aa5483 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -32,7 +32,6 @@ /obj/item/storage/toolbox/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if(has_latches) add_overlay(latches) diff --git a/code/game/objects/items/syndicateReverseCard.dm b/code/game/objects/items/syndicateReverseCard.dm index fa5ba202bb84..a2845031d8aa 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -16,7 +16,6 @@ /obj/item/syndicateReverseCard/update_appearance(updates = ALL) . = ..() - ..() if (used) cut_overlays() add_overlay(image('icons/obj/toy.dmi', icon_state = "reverse_overlay")) diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 5cbdda41d62c..32025fa8ef17 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -240,7 +240,6 @@ /obj/structure/alien/egg/update_appearance(updates = ALL) . = ..() - ..() switch(status) if(GROWING) icon_state = "[base_icon]_growing" diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index d9a92e780dd5..b71083690c81 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -50,7 +50,6 @@ /obj/structure/closet/body_bag/update_appearance(updates = ALL) . = ..() - ..() if (tagged) add_overlay("bodybag_label") diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index 16020885a12c..b88d63f5b9a7 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -14,7 +14,6 @@ /obj/structure/closet/crate/bin/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if(contents.len == 0) add_overlay("largebing") diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index 964ff9166c8a..92ecc4fbc5a9 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -15,7 +15,6 @@ /obj/structure/closet/crate/secure/update_appearance(updates = ALL) . = ..() - ..() if(broken) add_overlay("securecrateemag") else if(locked) diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index bb7fbddd01f4..6d0a49ade7e8 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -40,7 +40,6 @@ /obj/structure/headpike/update_appearance(updates = ALL) . = ..() - ..() var/obj/item/bodypart/head/H = locate() in contents var/mutable_appearance/MA = new() if(H) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 4f57af8b0b4e..096f44898e63 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -45,7 +45,6 @@ /turf/open/floor/light/update_appearance(updates = ALL) . = ..() - ..() if(on) switch(state) if(0) diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index 92ecaada29fd..372486ad86d2 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -347,7 +347,6 @@ /obj/structure/blob/normal/update_appearance(updates = ALL) . = ..() - ..() if(obj_integrity <= 15) icon_state = "blob_damaged" name = "fragile blob" diff --git a/code/modules/antagonists/blob/structures/shield.dm b/code/modules/antagonists/blob/structures/shield.dm index 300c5619b032..1c80da669c48 100644 --- a/code/modules/antagonists/blob/structures/shield.dm +++ b/code/modules/antagonists/blob/structures/shield.dm @@ -21,7 +21,6 @@ /obj/structure/blob/shield/update_appearance(updates = ALL) . = ..() - ..() if(obj_integrity < max_integrity * 0.5) icon_state = "[initial(icon_state)]_damaged" name = "weakened [initial(name)]" diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 7d7db1c887c6..cdecaa9271e2 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -46,6 +46,7 @@ return FIRELOSS /obj/item/assembly/flash/update_icon(updates = ALL, flash = FALSE) + . = ..() cut_overlays() attached_overlays = list() if(burnt_out) diff --git a/code/modules/clothing/neck/bodycamera.dm b/code/modules/clothing/neck/bodycamera.dm index 805d599b54d7..864bdd99c29c 100644 --- a/code/modules/clothing/neck/bodycamera.dm +++ b/code/modules/clothing/neck/bodycamera.dm @@ -56,7 +56,6 @@ /obj/item/clothing/neck/bodycam/update_appearance(updates = ALL) . = ..() - ..() var/suffix = "off" if(bodcam.status) suffix = "on" diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 4bad522bf983..4376ef724682 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -53,7 +53,7 @@ mix_filling_color(S) S.reagents.trans_to(src,min(S.reagents.total_volume, 15), transfered_by = user) //limit of 15, we don't want our custom food to be completely filled by just one ingredient with large reagent volume. foodtype |= S.foodtype - update_overlays(S) + update_food_overlays(S) to_chat(user, span_notice("You add the [I.name] to the [name].")) update_name(S) else @@ -102,7 +102,7 @@ rgbcolor[4] = (customcolor[4]+ingcolor[4])/2 filling_color = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3], rgbcolor[4]) -/obj/item/reagent_containers/food/snacks/customizable/update_overlays(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/customizable/update_food_overlays(obj/item/reagent_containers/food/snacks/S) var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling") if(S.filling_color == "#FFFFFF") filling.color = pick("#FF0000","#0000FF","#008000","#FFFF00") @@ -138,7 +138,7 @@ /obj/item/reagent_containers/food/snacks/customizable/initialize_slice(obj/item/reagent_containers/food/snacks/slice, reagents_per_slice) ..() slice.filling_color = filling_color - slice.update_overlays(src) + slice.update_food_overlays(src) /obj/item/reagent_containers/food/snacks/customizable/Destroy() diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 12e3033a300b..03d903129a1e 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -247,7 +247,7 @@ All foods are distributed among various categories. Use common sense. trash = null return -/obj/item/reagent_containers/food/snacks/update_overlays(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/proc/update_food_overlays(obj/item/reagent_containers/food/snacks/S) cut_overlays() var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling") if(S.filling_color == "#FFFFFF") diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index b85cf4546b81..285c8a17e61d 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -698,13 +698,13 @@ to_chat(user, span_notice("You add the [I] to the [name].")) P.name = initial(P.name) contents += P - update_overlays(P) + update_food_overlays(P) if (P.contents.len) for(var/V in P.contents) P = V P.name = initial(P.name) contents += P - update_overlays(P) + update_food_overlays(P) P = I LAZYCLEARLIST(P.contents) return @@ -713,7 +713,7 @@ return O.attackby(I, user, params) ..() -/obj/item/reagent_containers/food/snacks/pancakes/update_overlays(obj/item/reagent_containers/food/snacks/P) +/obj/item/reagent_containers/food/snacks/pancakes/update_food_overlays(obj/item/reagent_containers/food/snacks/P) var/mutable_appearance/pancake = mutable_appearance(icon, "[P.item_state]_[rand(1,3)]") pancake.pixel_x = rand(-1,1) pancake.pixel_y = 3 * contents.len - 1 diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 8dfa11cf7443..415dbe9f32e0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -479,7 +479,6 @@ /obj/machinery/smartfridge/drying_rack/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if(drying) add_overlay("drying_rack_drying") diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 7d02ca4a11c1..72a1f31b8091 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -57,7 +57,6 @@ /obj/machinery/plantgenes/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if((stat & (BROKEN|NOPOWER))) icon_state = "dnamod-off" diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index ed8db6f9c489..22d64efe709b 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -149,7 +149,6 @@ /obj/structure/chisel_message/update_appearance(updates = ALL) . = ..() - ..() var/hash = md5(hidden_message) var/newcolor = copytext_char(hash, 1, 7) add_atom_colour("#[newcolor]", FIXED_COLOUR_PRIORITY) diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 5ca98fa43f18..85c0447a6b0c 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -128,7 +128,6 @@ /obj/item/clothing/head/helmet/space/hostile_environment/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hostile_env_glass") glass_overlay.appearance_flags = RESET_COLOR diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index 318f33df8a3c..184ddf1af02b 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -62,7 +62,6 @@ /obj/item/modular_computer/tablet/update_appearance(updates = ALL) . = ..() - ..() if (!isnull(variants)) if(!finish_color) finish_color = pick(variants) diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 3d3eae64687f..1c15ab5da29d 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -36,7 +36,6 @@ /obj/item/papercutter/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") if(storedpaper) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 34a3eb306a7b..eff6ed564ede 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -45,7 +45,6 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne /obj/machinery/gravity_generator/update_appearance(updates = ALL) . = ..() - ..() icon_state = "[get_status()]_[sprite_number]" /obj/machinery/gravity_generator/proc/get_status() @@ -262,7 +261,6 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne /obj/machinery/gravity_generator/main/update_appearance(updates = ALL) . = ..() - ..() for(var/obj/O in parts) O.update_appearance(updates = ALL) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 96016b810c62..d9f678356683 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -115,7 +115,6 @@ /obj/machinery/power/solar/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() var/matrix/turner = matrix() turner.Turn(azimuth_current) diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index 3e727e415146..dfb5891e82fc 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -37,7 +37,6 @@ /obj/item/ammo_casing/update_appearance(updates = ALL) . = ..() - ..() icon_state = "[initial(icon_state)][BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? "-live" : ""]" desc = "[initial(desc)][!BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? " This one is spent." : ""]" diff --git a/code/modules/projectiles/ammunition/reusable/foam.dm b/code/modules/projectiles/ammunition/reusable/foam.dm index 523fb32afbbb..6aa656a4de31 100644 --- a/code/modules/projectiles/ammunition/reusable/foam.dm +++ b/code/modules/projectiles/ammunition/reusable/foam.dm @@ -12,7 +12,6 @@ /obj/item/ammo_casing/reusable/foam_dart/update_appearance(updates = ALL) . = ..() - ..() if (modified) icon_state = "foamdart_empty" else diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index 9aa96d55736e..3488ed3b1228 100644 --- a/code/modules/projectiles/boxes_magazines/external/grenade.dm +++ b/code/modules/projectiles/boxes_magazines/external/grenade.dm @@ -7,7 +7,6 @@ /obj/item/ammo_box/magazine/m75/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "75-8" else diff --git a/code/modules/projectiles/boxes_magazines/external/lmg.dm b/code/modules/projectiles/boxes_magazines/external/lmg.dm index 34cbd6fdf303..da029f992be0 100644 --- a/code/modules/projectiles/boxes_magazines/external/lmg.dm +++ b/code/modules/projectiles/boxes_magazines/external/lmg.dm @@ -34,5 +34,4 @@ /obj/item/ammo_box/magazine/mm712x82/update_appearance(updates = ALL) . = ..() - ..() icon_state = "a762[sprite_designation]-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/boxes_magazines/external/pistol.dm b/code/modules/projectiles/boxes_magazines/external/pistol.dm index f9766f3aeae9..1bcb572bda27 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -66,7 +66,6 @@ /obj/item/ammo_box/magazine/m45/update_appearance(updates = ALL) . = ..() - ..() if (ammo_count() >= 8) icon_state = "45-8" else @@ -84,7 +83,6 @@ /obj/item/ammo_box/magazine/pistolm9mm/update_appearance(updates = ALL) . = ..() - ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" //Desert Eagle @@ -116,7 +114,6 @@ /obj/item/ammo_box/magazine/v38/update_appearance(updates = ALL) . = ..() - ..() if (ammo_count() >= 8) icon_state = "v38[sprite_designation]-8" else diff --git a/code/modules/projectiles/boxes_magazines/external/rechargable.dm b/code/modules/projectiles/boxes_magazines/external/rechargable.dm index 477fd92b8950..810b02435a2e 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -10,7 +10,6 @@ /obj/item/ammo_box/magazine/recharge/update_appearance(updates = ALL) . = ..() - ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." cut_overlays() var/cur_ammo = ammo_count() @@ -32,7 +31,6 @@ /obj/item/ammo_box/magazine/recharge/lasgun/update_appearance(updates = ALL) . = ..() - ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) icon_state = "[initial(icon_state)]" @@ -140,7 +138,6 @@ /obj/item/ammo_box/magazine/recharge/ntusp/laser/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() var/cur_ammo = ammo_count() if(cur_ammo) diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index 87fbcdecaa48..13cc090a55ba 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -10,7 +10,6 @@ /obj/item/ammo_box/magazine/m10mm/rifle/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "75-8" else @@ -28,7 +27,6 @@ /obj/item/ammo_box/magazine/m556/update_appearance(updates = ALL) . = ..() - ..() icon_state = "5.56m[sprite_designation]-[round(ammo_count(),5)]" /obj/item/ammo_box/magazine/m556/ap @@ -59,7 +57,6 @@ /obj/item/ammo_box/magazine/r556/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "arg556[sprite_designation]" else @@ -101,7 +98,6 @@ /obj/item/ammo_box/magazine/m308/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "m308[sprite_designation]" else @@ -136,7 +132,6 @@ /obj/item/ammo_box/magazine/ks762/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "ks762[sprite_designation]" else diff --git a/code/modules/projectiles/boxes_magazines/external/shotgun.dm b/code/modules/projectiles/boxes_magazines/external/shotgun.dm index a267f28e9093..3eef509e94cc 100644 --- a/code/modules/projectiles/boxes_magazines/external/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/external/shotgun.dm @@ -12,7 +12,6 @@ /obj/item/ammo_box/magazine/m12g/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "m12g[sprite_designation]-8" else diff --git a/code/modules/projectiles/boxes_magazines/external/smg.dm b/code/modules/projectiles/boxes_magazines/external/smg.dm index c280f4fff7e2..e6231a9b8cb0 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -10,7 +10,6 @@ /obj/item/ammo_box/magazine/wt550m9/update_appearance(updates = ALL) . = ..() - ..() switch(ammo_count()) if(17 to 21) //Considers the extra bullet in the chamber icon_state = "46x30mmt[sprite_designation]-20" @@ -105,7 +104,6 @@ /obj/item/ammo_box/magazine/uzim9mm/update_appearance(updates = ALL) . = ..() - ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" //NT Saber SMG @@ -120,7 +118,6 @@ /obj/item/ammo_box/magazine/smgm9mm/update_appearance(updates = ALL) . = ..() - ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" /obj/item/ammo_box/magazine/smgm9mm/ap @@ -151,7 +148,6 @@ /obj/item/ammo_box/magazine/smgm45/update_appearance(updates = ALL) . = ..() - ..() icon_state = "c20r45[sprite_designation]-[round(ammo_count(),2)]" /obj/item/ammo_box/magazine/smgm45/ap diff --git a/code/modules/projectiles/boxes_magazines/external/sniper.dm b/code/modules/projectiles/boxes_magazines/external/sniper.dm index 653c6cd50fb7..6ebdb7c66402 100644 --- a/code/modules/projectiles/boxes_magazines/external/sniper.dm +++ b/code/modules/projectiles/boxes_magazines/external/sniper.dm @@ -11,7 +11,6 @@ /obj/item/ammo_box/magazine/sniper_rounds/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "[initial(icon_state)]-ammo" else diff --git a/code/modules/projectiles/boxes_magazines/external/toy.dm b/code/modules/projectiles/boxes_magazines/external/toy.dm index fe9464112592..fdf850d9e34a 100644 --- a/code/modules/projectiles/boxes_magazines/external/toy.dm +++ b/code/modules/projectiles/boxes_magazines/external/toy.dm @@ -11,7 +11,6 @@ /obj/item/ammo_box/magazine/toy/smg/update_appearance(updates = ALL) . = ..() - ..() if(ammo_count()) icon_state = "smg9mm-42" else @@ -38,7 +37,6 @@ /obj/item/ammo_box/magazine/toy/smgm45/update_appearance(updates = ALL) . = ..() - ..() icon_state = "c20r45-[round(ammo_count(),2)]" /obj/item/ammo_box/magazine/toy/smgm45/riot @@ -54,7 +52,6 @@ /obj/item/ammo_box/magazine/toy/m762/update_appearance(updates = ALL) . = ..() - ..() icon_state = "a762-[round(ammo_count(),10)]" /obj/item/ammo_box/magazine/toy/m762/riot diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 8bcecf4469be..c47b62ff1571 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -421,7 +421,6 @@ /obj/item/gun/update_appearance(updates = ALL) . = ..() - ..() /obj/item/gun/proc/reset_semicd() diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 220178e09c03..2d4cc0390a79 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -29,7 +29,6 @@ /obj/item/gun/ballistic/automatic/update_appearance(updates = ALL) . = ..() - ..() if(!select) add_overlay("[initial(icon_state)]_semi") if(select == 1) @@ -160,7 +159,6 @@ /obj/item/gun/ballistic/automatic/m90/update_appearance(updates = ALL) . = ..() - ..() switch(select) if(0) add_overlay("[initial(icon_state)]_semi") diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 3e6a16f0ca6c..8ac34aaaa930 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -17,7 +17,6 @@ obj/item/gun/ballistic/rifle/update_appearance(updates = ALL) . = ..() - ..() add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") obj/item/gun/ballistic/rifle/rack(mob/user = null) diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 6602be3b40ab..41a0cf2f21bb 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -234,7 +234,6 @@ /obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_appearance(updates = ALL) . = ..() - ..() if(slung) icon_state = "ishotgunsling" diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index d8ea1f6d7fd3..e130e67e277f 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -32,7 +32,6 @@ /obj/item/gun/energy/e_gun/mini/update_appearance(updates = ALL) . = ..() - ..() if(gun_light && gun_light.on) add_overlay("mini-light") diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 47d9e9a9193a..35a68a4397a6 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -147,7 +147,6 @@ /obj/item/gun/energy/kinetic_accelerator/update_appearance(updates = ALL) . = ..() - ..() if(!can_shoot()) add_overlay("[icon_state]_empty") else diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index ed89c3531d45..d7f624965426 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -36,7 +36,6 @@ /obj/item/gun/energy/decloner/update_appearance(updates = ALL) . = ..() - ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) add_overlay("decloner_spin") diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 9aa88e5f5464..f40b080a711a 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -309,7 +309,6 @@ /obj/item/hypospray/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if(ismob(loc)) var/mob/M = loc diff --git a/yogstation/code/game/objects/items/brace.dm b/yogstation/code/game/objects/items/brace.dm index 381bb7a27659..3e94576a18fe 100644 --- a/yogstation/code/game/objects/items/brace.dm +++ b/yogstation/code/game/objects/items/brace.dm @@ -25,7 +25,6 @@ /obj/structure/deployed_brace/update_appearance(updates = ALL) . = ..() - ..() cut_overlays() if(cover_open) add_overlay("cover_open") diff --git a/yogstation/code/modules/xenoarch/loot/guns.dm b/yogstation/code/modules/xenoarch/loot/guns.dm index 35bb996e009a..b9b43fefcbe0 100644 --- a/yogstation/code/modules/xenoarch/loot/guns.dm +++ b/yogstation/code/modules/xenoarch/loot/guns.dm @@ -18,6 +18,7 @@ playsound(src, 'yogstation/sound/weapons/spur_spawn.ogg') /obj/item/gun/energy/polarstar/update_appearance(updates = ALL, force_update) + . = ..() var/maxcharge = cell.maxcharge var/charge = cell.charge From c01364240380c3c8f259241347179fecc79f6a98 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Mon, 19 Jun 2023 00:46:20 -0300 Subject: [PATCH 08/18] e --- code/_onclick/hud/alert.dm | 5 ++--- code/game/machinery/airlock_cycle_control.dm | 1 + code/game/machinery/bounty_board.dm | 2 +- code/game/machinery/doors/airlock.dm | 1 + code/game/objects/items/defib.dm | 12 ++++++------ code/modules/antagonists/_common/antag_hud.dm | 3 +-- .../machinery/components/fusion/hfr_parts.dm | 1 + code/modules/hydroponics/gene_modder.dm | 6 ++---- code/modules/projectiles/guns/energy/special.dm | 1 + yogstation/code/game/objects/items/sharpener.dm | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index eb581c634975..03d82f36d597 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -525,8 +525,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." /atom/movable/screen/alert/emptycell name = "Out of Power" - desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \ -Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." + desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged." icon_state = "emptycell" /atom/movable/screen/alert/emptycell/Initialize(mapload) @@ -541,7 +540,7 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the /atom/movable/screen/alert/lowcell name = "Low Charge" - desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." + desc = "Unit's power cell is running low." icon_state = "lowcell" /atom/movable/screen/alert/lowcell/Initialize(mapload) diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index 76f7e868ede4..2e664c5b6086 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -135,6 +135,7 @@ airlock.bolt() /obj/machinery/advanced_airlock_controller/update_appearance(updates = ALL, use_hash = FALSE) + . = ..() var/turf/location = get_turf(src) if(!location) return diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index a54e4a6f3f6c..0b5ac1266bc5 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -36,7 +36,7 @@ GLOBAL_LIST_EMPTY(request_list) icon_state = "request_kiosk_off" else icon_state = "request_kiosk" - return + return ..() /obj/machinery/bounty_board/attackby(obj/item/I, mob/living/user, params) . = ..() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index bd904df6202b..b533e0b0aaf1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -595,6 +595,7 @@ return FALSE /obj/machinery/door/airlock/update_appearance(updates, state=0, override=0) + . = ..() cut_overlays() if(operating && !override) return diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index b2069abc7c08..b94aaaba987b 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -53,7 +53,7 @@ /obj/item/defibrillator/update_appearance(updates = ALL) . = ..() update_power() - update_overlays() + update_appearance(UPDATE_OVERLAYS) update_charge() /obj/item/defibrillator/proc/update_power() @@ -66,15 +66,15 @@ powered = FALSE /obj/item/defibrillator/update_overlays() - cut_overlays() + . = ..() if(!on) - add_overlay("[initial(icon_state)]-paddles") + . += "[initial(icon_state)]-paddles" if(powered) - add_overlay("[initial(icon_state)]-powered") + . += "[initial(icon_state)]-powered" if(!cell) - add_overlay("[initial(icon_state)]-nocell") + . += "[initial(icon_state)]-nocell" if(!safety) - add_overlay("[initial(icon_state)]-emagged") + . += "[initial(icon_state)]-emagged" /obj/item/defibrillator/proc/update_charge() if(powered) //so it doesn't show charge if it's unpowered diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 4d311cc37888..63955d3bc3d9 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -77,8 +77,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc return final_antag_hud_images -/datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_appearance(updates = ALL) - . = ..() +/datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_appearance() if (antag_hud_images.len == 0) image.icon = icon('icons/blanks/32x32.dmi', "nothing") else diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index 9ea729d5d44c..3278ea82ca0a 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -81,6 +81,7 @@ icon_state = icon_state_off /obj/machinery/atmospherics/components/unary/hypertorus/update_overlays() + . = ..() if(!cracked) return diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 72a1f31b8091..c770e919ceda 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -447,10 +447,8 @@ add_overlay("datadisk_gene") /obj/item/disk/plantgene/update_name() - if(gene) - name = "[gene.get_name()] (plant data disk)" - else - name = "plant data disk" + . = ..() + name = gene ? "[gene.get_name()] (plant data disk)" : "plant data disk" /obj/item/disk/plantgene/attack_self(mob/user) read_only = !read_only diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index d7f624965426..4219410763e6 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -384,6 +384,7 @@ /obj/item/gun/energy/printer/Initialize(mapload) AddElement(/datum/element/update_icon_blocker) + . = ..() /obj/item/gun/energy/printer/emp_act() return diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index 746ec52e3e26..3b05c683ea47 100644 --- a/yogstation/code/game/objects/items/sharpener.dm +++ b/yogstation/code/game/objects/items/sharpener.dm @@ -1,3 +1,3 @@ /obj/item/sharpener/update_appearance(updates = ALL) . = ..() - icon_state = "[initial(icon_state)]_used" + icon_state = "[initial(icon_state)]_used" From bc0ea849472da63c0e161990e21ed1a90f5a1c59 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:40:02 -0300 Subject: [PATCH 09/18] catches up somewhere --- code/game/machinery/harvester.dm | 1 + code/modules/antagonists/_common/antag_hud.dm | 4 ++-- code/modules/food_and_drinks/food/customizables.dm | 4 ++-- code/modules/hydroponics/hydroponics.dm | 6 ++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 5f0c30858eb1..c2c28b76d4f4 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -28,6 +28,7 @@ interval = max(max_time,1) /obj/machinery/harvester/update_appearance(updates = ALL, warming_up) + . = ..() if(warming_up) icon_state = initial(icon_state)+"-charging" return diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 63955d3bc3d9..98c35ef20fd8 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc /datum/atom_hud/alternate_appearance/basic/antagonist_hud/process(delta_time) index += 1 - update_appearance(updates = ALL) + update_appearance() /datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/check_processing() if (antag_hud_images.len > 1 && !(DF_ISPROCESSING in datum_flags)) @@ -88,5 +88,5 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc antag_hud_images = get_antag_hud_images(source) index = clamp(index, 1, antag_hud_images.len) - update_appearance(updates = ALL) + update_appearance() check_processing() diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 4376ef724682..6d4075499750 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -55,12 +55,12 @@ foodtype |= S.foodtype update_food_overlays(S) to_chat(user, span_notice("You add the [I.name] to the [name].")) - update_name(S) + update_food_name(S) else . = ..() -/obj/item/reagent_containers/food/snacks/customizable/update_name(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/customizable/update_food_name(obj/item/reagent_containers/food/snacks/S) for(var/obj/item/I in ingredients) if(!istype(S, I.type)) customname = "custom" diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 1f4ba90927c3..1adc5d9df247 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -969,10 +969,8 @@ update_appearance(updates = ALL) /obj/machinery/hydroponics/update_name() - if(myseed) - name = "[initial(name)] ([myseed.plantname])" - else - name = initial(name) + . = ..() + name = myseed ? "[initial(name)] ([myseed.plantname])" : initial(name) /////////////////////////////////////////////////////////////////////////////// /obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk! From 5f99f29ed65cc20dd06b2ee6c78c1ed2eef75b44 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:52:16 -0300 Subject: [PATCH 10/18] song 1 --- code/modules/food_and_drinks/food/customizables.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 78bede619520..67f98dd27d10 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -60,7 +60,7 @@ . = ..() -/obj/item/reagent_containers/food/snacks/customizable/update_food_name(obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/customizable/proc/update_food_name(obj/item/reagent_containers/food/snacks/S) for(var/obj/item/I in ingredients) if(!istype(S, I.type)) customname = "custom" From ef2187827bbab71f618a631e78f9f9c3ca9991a3 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Wed, 28 Jun 2023 17:54:02 -0300 Subject: [PATCH 11/18] sz --- code/game/machinery/doors/airlock.dm | 32 +++++++++++++++---- code/game/machinery/iv_drip.dm | 3 -- code/game/objects/items/defib.dm | 4 +-- code/game/objects/items/devices/aicard.dm | 28 ++++++++-------- code/game/objects/structures/door_assembly.dm | 14 ++++---- code/modules/cargo/supplypod.dm | 13 ++------ .../food_and_drinks/kitchen_machinery/oven.dm | 8 ++--- .../security_levels/level_interface.dm | 17 +++++----- 8 files changed, 62 insertions(+), 57 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index b533e0b0aaf1..7208587e9873 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -725,13 +725,31 @@ SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_opening", FLOAT_LAYER, FLOAT_PLANE, dir) check_unres() -/proc/get_airlock_overlay(icon_state, icon_file) - var/obj/machinery/door/airlock/A - pass(A) //suppress unused warning - var/list/airlock_overlays = A.airlock_overlays - var/iconkey = "[icon_state][icon_file]" - if((!(. = airlock_overlays[iconkey]))) - . = airlock_overlays[iconkey] = mutable_appearance(icon_file, icon_state) +/// Overlay cache. Why isn't this just in /obj/machinery/door/airlock? Because its used just a +/// tiny bit in door_assembly.dm Refactored so you don't have to make a null copy of airlock +/// to get to the damn thing +/// Someone, for the love of god, profile this. Is there a reason to cache mutable_appearance +/// if so, why are we JUST doing the airlocks when we can put this in mutable_appearance.dm for +/// everything +/proc/get_airlock_overlay(icon_state, icon_file, atom/offset_spokesman, em_block) + var/static/list/airlock_overlays = list() + + var/base_icon_key = "[icon_state][REF(icon_file)]" + if(!(. = airlock_overlays[base_icon_key])) + . = airlock_overlays[base_icon_key] = mutable_appearance(icon_file, icon_state) + + if(isnull(em_block)) + return + +// var/turf/our_turf = get_turf(offset_spokesman) + +// var/em_block_key = "[base_icon_key][em_block][GET_TURF_PLANE_OFFSET(our_turf)]" +// var/mutable_appearance/em_blocker = airlock_overlays[em_block_key] +// if(!em_blocker) +// em_blocker = airlock_overlays[em_block_key] = mutable_appearance(icon_file, icon_state, offset_spokesman = offset_spokesman, plane = EMISSIVE_PLANE, appearance_flags = EMISSIVE_APPEARANCE_FLAGS) +// em_blocker.color = em_block ? GLOB.em_block_color : GLOB.emissive_color + + return list(., /*em_blocker*/) /obj/machinery/door/airlock/proc/check_unres() //unrestricted sides. This overlay indicates which directions the player can access even without an ID if(hasPower() && unres_sides) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 52e819099c63..76433e46f3ae 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -235,9 +235,6 @@ AddElement(/datum/element/update_icon_blocker) . = ..() -/obj/machinery/iv_drip/saline/update_icon_state() - return - /obj/machinery/iv_drip/saline/eject_beaker() return /obj/machinery/iv_drip/saline/toggle_mode() diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index b94aaaba987b..4fdb24925208 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -363,8 +363,7 @@ busy = FALSE update_appearance(updates = ALL) -/obj/item/twohanded/shockpaddles/update_appearance(updates = ALL) - . = ..() +/obj/item/twohanded/shockpaddles/update_icon_state() icon_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]" if(cooldown) @@ -372,6 +371,7 @@ if(iscarbon(loc)) var/mob/living/carbon/C = loc C.update_held_items() + return ..() /obj/item/twohanded/shockpaddles/suicide_act(mob/user) if(req_defib && !defib.deductcharge(revivecost)) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index ccae94196435..d1a17cbb42d3 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -40,21 +40,23 @@ log_combat(user, AI, "carded", src) update_appearance(updates = ALL) //Whatever happened, update the card's state (icon, name) to match. -/obj/item/aicard/update_appearance(updates = ALL) +/obj/item/aicard/update_name() . = ..() - cut_overlays() - if(AI) - name = "[initial(name)] - [AI.name]" - if(AI.stat == DEAD) - icon_state = "[initial(icon_state)]-404" - else - icon_state = "[initial(icon_state)]-full" - if(!AI.control_disabled) - add_overlay("[initial(icon_state)]-on") - AI.cancel_camera() - else - name = initial(name) + name = "[initial(name)][AI ? " - [AI.name]" : null]" + +/obj/item/aicard/update_icon_state() + if(!AI) icon_state = initial(icon_state) + return ..() + icon_state = "[initial(icon_state)]-[AI.stat == DEAD ? "404" : "full"]" + AI.cancel_camera() + return ..() + +/obj/item/aicard/update_overlays() + . = ..() + if(!AI?.control_disabled) + return + . += "[initial(icon_state)]-on" /obj/item/aicard/ui_state(mob/user) return GLOB.hands_state diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index dcd1ddfd451a..4b628b3f4325 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -23,7 +23,6 @@ /obj/structure/door_assembly/Initialize(mapload) . = ..() update_appearance(updates = ALL) - update_name() /obj/structure/door_assembly/examine(mob/user) . = ..() @@ -259,17 +258,15 @@ qdel(src) else return ..() - update_name() update_appearance(updates = ALL) -/obj/structure/door_assembly/update_appearance(updates = ALL) +/obj/structure/door_assembly/update_overlays() . = ..() - cut_overlays() if(!glass) - add_overlay(get_airlock_overlay("fill_construction", icon)) - else if(glass) - add_overlay(get_airlock_overlay("glass_construction", overlays_file)) - add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file)) + . += get_airlock_overlay("fill_construction", icon, src, /*TRUE*/) + else + . += get_airlock_overlay("glass_construction", overlays_file, src, /*TRUE*/) + . += get_airlock_overlay("panel_c[state+1]", overlays_file, src, /*TRUE*/) /obj/structure/door_assembly/update_name() name = "" @@ -282,6 +279,7 @@ if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER) name = "near finished " name += "[heat_proof_finished ? "heat-proofed " : ""][glass ? "window " : ""][base_name] assembly" + return ..() /obj/structure/door_assembly/proc/transfer_assembly_vars(obj/structure/door_assembly/source, obj/structure/door_assembly/target, previous = FALSE) target.glass = source.glass diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 85ffe9fd7df6..c491d07c682a 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -125,18 +125,11 @@ transform = matrix() update_appearance(updates = ALL) -/obj/structure/closet/supplypod/update_appearance(updates = ALL) - . = ..() - var/list/new_overlays = update_overlays() - if(managed_overlays) - cut_overlay(managed_overlays) - managed_overlays = null - if(length(new_overlays)) - managed_overlays = new_overlays - add_overlay(new_overlays) +/obj/structure/closet/supplypod/closet_update_overlays(list/new_overlays) + return /obj/structure/closet/supplypod/update_overlays() - . = list() + . = ..() if(style == STYLE_INVISIBLE) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index becc21b02e15..13a3a94ada0e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -42,9 +42,7 @@ QDEL_NULL(particles) . = ..() -/obj/machinery/oven/update_appearance(updates = ALL) - . = ..() - update_overlays() +/obj/machinery/oven/update_icon_state() if(panel_open) icon_state = "oven_o" return ..() @@ -55,14 +53,14 @@ return ..() /obj/machinery/oven/update_overlays() - cut_overlays() + . = ..() var/mutable_appearance/door_overlay if(open) door_overlay = mutable_appearance(icon, "oven_lid_open") door_overlay.pixel_y = OVEN_LID_Y_OFFSET else door_overlay = mutable_appearance(icon, "oven_lid_closed") - add_overlay(door_overlay); + . += door_overlay /obj/machinery/oven/process(delta_time) ..() diff --git a/code/modules/security_levels/level_interface.dm b/code/modules/security_levels/level_interface.dm index 11fff53c633e..d7bdd68aac03 100644 --- a/code/modules/security_levels/level_interface.dm +++ b/code/modules/security_levels/level_interface.dm @@ -28,27 +28,26 @@ radio.independent = TRUE radio.recalculateChannels() -/obj/machinery/level_interface/update_icon() - cut_overlays() +/obj/machinery/level_interface/update_overlays() + . = ..() if(!is_operational()) set_light_on(FALSE) - return else set_light_on(TRUE) switch(GLOB.security_level) if(SEC_LEVEL_GREEN) - add_overlay("alert-level-green") + . += "alert-level-green" if(SEC_LEVEL_BLUE) - add_overlay("alert-level-blue") + . += "alert-level-blue" if(SEC_LEVEL_RED) - add_overlay("alert-level-red") + . += "alert-level-red" if(SEC_LEVEL_GAMMA) - add_overlay("alert-level-gamma") + . += "alert-level-gamma" if(SEC_LEVEL_EPSILON) - add_overlay("alert-level-epsilon") + . += "alert-level-epsilon" if(SEC_LEVEL_DELTA) - add_overlay("alert-level-delta") + . += "alert-level-delta" /obj/machinery/level_interface/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) From ee49a7699d432cc44167054b624f635ae337ae12 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 29 Jun 2023 17:23:36 -0300 Subject: [PATCH 12/18] zzzz --- _maps/map_files/YogStation/YogStation.dmm | 4 ++-- code/game/atoms.dm | 3 +-- code/game/objects/items/weaponry.dm | 4 ++-- code/game/objects/objs.dm | 3 +-- .../structures/crates_lockers/crates/critter.dm | 11 +++++------ code/modules/mob/living/carbon/carbon_defense.dm | 2 +- code/modules/ninja/energy_katana.dm | 2 +- code/modules/spells/spell_types/touch/_touch.dm | 2 +- yogstation/code/game/objects/items/weaponry.dm | 4 ++-- yogstation/code/modules/donor/unique_donator_items.dm | 2 +- 10 files changed, 17 insertions(+), 20 deletions(-) diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm index 93dc747c75de..fdcb0108a96a 100644 --- a/_maps/map_files/YogStation/YogStation.dmm +++ b/_maps/map_files/YogStation/YogStation.dmm @@ -26328,7 +26328,7 @@ /obj/structure/rack, /obj/effect/spawner/lootdrop/maintenance, /obj/item/storage/box/lights/mixed, -/obj/item/latexballon, +/obj/item/latexballoon, /turf/open/floor/plating, /area/maintenance/port) "gCF" = ( @@ -61055,7 +61055,7 @@ lootcount = 2; name = "2maintenance loot spawner" }, -/obj/item/latexballon, +/obj/item/latexballoon, /obj/structure/disposalpipe/segment{ dir = 4 }, diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 97b90a9485e4..ab311c6ad9fd 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -371,8 +371,7 @@ /atom/proc/return_air() if(loc) return loc.return_air() - else - return null + return null /atom/proc/return_analyzable_air() return null diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0ea32fd47df9..d01ed19801a2 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -734,7 +734,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 name = "slapper" desc = "This is how real men fight." icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = "nothing" force = 0 throwforce = 0 @@ -828,7 +828,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 name = "raised hands" desc = "What are you, French?" icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = "nothing" force = 0 throwforce = 0 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 8203dbca94c3..fde9d84a512b 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -107,8 +107,7 @@ /obj/return_air() if(loc) return loc.return_air() - else - return null + return null /obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request) //Return: (NONSTANDARD) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index e9f4bede20d0..5980d7e45b95 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -21,19 +21,18 @@ return ..() -/obj/structure/closet/crate/critter/update_appearance(updates = ALL) +/obj/structure/closet/crate/critter/update_overlays() . = ..() - cut_overlays() if(opened) - add_overlay("crittercrate_door_open") + . += "crittercrate_door_open" else - add_overlay("crittercrate_door") + . += "crittercrate_door" if(manifest) - add_overlay("manifest") + . += "manifest" /obj/structure/closet/crate/critter/return_air() if(tank) - return tank.air_contents + return tank.return_air() else return loc.return_air() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 1b55e20a9ce4..aec64a832f6d 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -623,7 +623,7 @@ name = "self-grasp" desc = "Sometimes all you can do is slow the bleeding." icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = "nothing" force = 0 throwforce = 0 diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index 83d559175094..8c8d040cb6e1 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -86,7 +86,7 @@ /obj/item/energy_katana/dropped(mob/user) . = ..() - jaunt.Remove(user) + jaunt?.Remove(user) user.update_icons() //If we hit the Ninja who owns this Katana, they catch it. diff --git a/code/modules/spells/spell_types/touch/_touch.dm b/code/modules/spells/spell_types/touch/_touch.dm index 7f37068be5ac..05f56d952c15 100644 --- a/code/modules/spells/spell_types/touch/_touch.dm +++ b/code/modules/spells/spell_types/touch/_touch.dm @@ -322,7 +322,7 @@ icon = 'icons/obj/wizard.dmi' lefthand_file = 'icons/mob/inhands/misc/touchspell_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/touchspell_righthand.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = null item_flags = NEEDS_PERMIT | ABSTRACT | HAND_ITEM w_class = WEIGHT_CLASS_HUGE diff --git a/yogstation/code/game/objects/items/weaponry.dm b/yogstation/code/game/objects/items/weaponry.dm index 44169c7604fd..18fb522737a7 100644 --- a/yogstation/code/game/objects/items/weaponry.dm +++ b/yogstation/code/game/objects/items/weaponry.dm @@ -2,7 +2,7 @@ name = "raised hand" desc = "Slap my hand." icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = "nothing" hitsound = 'sound/weapons/punchmiss.ogg' force = 0 @@ -29,7 +29,7 @@ name = "hand for holding" desc = "You rapscallion, how scandalous!" icon = 'icons/obj/toy.dmi' - icon_state = "latexballon" + icon_state = "latexballoon" item_state = "nothing" hitsound = 'sound/weapons/punchmiss.ogg' force = 0 diff --git a/yogstation/code/modules/donor/unique_donator_items.dm b/yogstation/code/modules/donor/unique_donator_items.dm index 65a656deffc5..c19a4129f300 100644 --- a/yogstation/code/modules/donor/unique_donator_items.dm +++ b/yogstation/code/modules/donor/unique_donator_items.dm @@ -553,7 +553,7 @@ Uncomment this and use atomproccall as necessary, then copypaste the output into /datum/donator_gear/saxophone name = "saxophone" unlock_path = /obj/item/instrument/saxophone -/datum/donator_gear/latexballon +/datum/donator_gear/latexballoon name = "latex glove" unlock_path = /obj/item/latexballoon /datum/donator_gear/zippo From f6dbcacd6603e84490f7894f27453a0082609fe7 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Thu, 29 Jun 2023 20:27:48 -0300 Subject: [PATCH 13/18] =?UTF-8?q?e=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/objects/items/tanks/tanks.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 435e63756c0d..98f70e811e5d 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -313,12 +313,13 @@ // ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ---------- -/obj/item/tank/update_icon() - cut_overlays() - if(tank_assembly) - add_overlay(tank_assembly.icon_state) - copy_overlays(tank_assembly) - add_overlay("bomb_assembly") +/obj/item/tank/update_overlays() + . = ..() + if(!tank_assembly) + return + . += tank_assembly.icon_state + copy_overlays(tank_assembly) + . += "bomb_assembly" /obj/item/tank/wrench_act(mob/living/user, obj/item/I) if(tank_assembly) From c3fb5be63adc84e79de5386094ea616e4e6bc374 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 30 Jun 2023 01:01:12 -0400 Subject: [PATCH 14/18] update icon in some places --- code/__DEFINES/atmospherics.dm | 2 +- code/__DEFINES/layers.dm | 4 ++-- code/_onclick/hud/alien.dm | 2 +- code/_onclick/hud/drones.dm | 2 +- code/_onclick/hud/generic_dextrous.dm | 2 +- code/_onclick/hud/guardian.dm | 2 +- code/_onclick/hud/hud.dm | 2 +- code/_onclick/hud/human.dm | 2 +- code/_onclick/hud/lavaland_elite.dm | 2 +- code/_onclick/hud/living.dm | 2 +- code/_onclick/hud/monkey.dm | 2 +- code/_onclick/hud/revenanthud.dm | 2 +- code/_onclick/hud/slime.dm | 2 +- code/_onclick/telekinesis.dm | 10 +++++----- code/controllers/subsystem/air.dm | 3 ++- code/controllers/subsystem/communications.dm | 2 +- code/controllers/subsystem/mapping.dm | 2 +- code/datums/components/grillable.dm | 10 +++++----- code/datums/status_effects/debuffs/debuffs.dm | 6 +++--- 19 files changed, 31 insertions(+), 30 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 56188d3ee8f0..ea7c98d075c9 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -420,7 +420,7 @@ //MULTIPIPES //IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH. -//layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap +//layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap #define PIPING_LAYER_MIN 1 #define PIPING_LAYER_MAX 5 #define PIPING_LAYER_DEFAULT 3 diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 2d0c8e29af04..48621b85f3ad 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -30,13 +30,13 @@ #define ABOVE_NORMAL_TURF_LAYER 2.08 #define LATTICE_LAYER 2.2 #define DISPOSAL_PIPE_LAYER 2.25 -#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap +#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap #define WIRE_LAYER 2.4 #define WIRE_TERMINAL_LAYER 2.45 #define UNDER_CATWALK 2.454 #define CATWALK_LAYER 2.455 #define GAS_SCRUBBER_LAYER 2.46 -#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_appearance(updates = ALL) to determine order of pipe overlap +#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 #define LOW_OBJ_LAYER 2.5 diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index f450fdce1a5d..14821f021fcf 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -107,7 +107,7 @@ if(inv.slot_id) inv.hud = src inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv - inv.update_appearance(updates = ALL) + inv.update_appearance(UPDATE_ICON) /datum/hud/alien/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index 764afc810f36..e853c01826ad 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -24,7 +24,7 @@ if(inv.slot_id) inv.hud = src inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv - inv.update_appearance(updates = ALL) + inv.update_appearance(UPDATE_ICON) /datum/hud/dextrous/drone/persistent_inventory_update() diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm index 75a83b8b432a..315a65ac3492 100644 --- a/code/_onclick/hud/generic_dextrous.dm +++ b/code/_onclick/hud/generic_dextrous.dm @@ -54,7 +54,7 @@ if(inv.slot_id) inv.hud = src inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv - inv.update_appearance(updates = ALL) + inv.update_appearance(UPDATE_ICON) /datum/hud/dextrous/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm index b3eced779e0f..de8866e5172e 100644 --- a/code/_onclick/hud/guardian.dm +++ b/code/_onclick/hud/guardian.dm @@ -7,7 +7,7 @@ pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_appearance(updates = ALL) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index ac788889cf16..61aed71beb91 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -310,7 +310,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( hand_box.held_index = i hand_slots["[i]"] = hand_box static_inventory += hand_box - hand_box.update_appearance(updates = ALL) + hand_box.update_appearance(UPDATE_ICON) var/i = 1 for(var/atom/movable/screen/swap_hand/SH in static_inventory) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index c946a0f856cc..f5a979309741 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -304,7 +304,7 @@ if(inv.slot_id) inv.hud = src inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv - inv.update_appearance(updates = ALL) + inv.update_appearance(UPDATE_ICON) update_locked_slots() diff --git a/code/_onclick/hud/lavaland_elite.dm b/code/_onclick/hud/lavaland_elite.dm index 19f6e1ba81e3..9523e4fb4592 100644 --- a/code/_onclick/hud/lavaland_elite.dm +++ b/code/_onclick/hud/lavaland_elite.dm @@ -5,7 +5,7 @@ ..() pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_appearance(updates = ALL) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/living.dm b/code/_onclick/hud/living.dm index 27431e958b3e..66cf1f648147 100644 --- a/code/_onclick/hud/living.dm +++ b/code/_onclick/hud/living.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_appearance(updates = ALL) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 79be8e15de1b..2e020499a6ec 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -103,7 +103,7 @@ if(inv.slot_id) inv.hud = src inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv - inv.update_appearance(updates = ALL) + inv.update_appearance(UPDATE_ICON) /datum/hud/monkey/persistent_inventory_update() if(!mymob) diff --git a/code/_onclick/hud/revenanthud.dm b/code/_onclick/hud/revenanthud.dm index 24fbda2059c0..2a64d7593385 100644 --- a/code/_onclick/hud/revenanthud.dm +++ b/code/_onclick/hud/revenanthud.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_appearance(updates = ALL) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/hud/slime.dm b/code/_onclick/hud/slime.dm index e07f6cbe250b..e4f0bf0a2ed2 100644 --- a/code/_onclick/hud/slime.dm +++ b/code/_onclick/hud/slime.dm @@ -6,7 +6,7 @@ pull_icon = new /atom/movable/screen/pull(src) pull_icon.icon = ui_style - pull_icon.update_appearance(updates = ALL) + pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_living_pull pull_icon.hud = src static_inventory += pull_icon diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 5b939df19f09..26489fe5537f 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -92,7 +92,7 @@ /obj/item/tk_grab/process() if(check_if_focusable(focus)) //if somebody grabs your thing, no waiting for them to put it down and hitting them again. - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) /obj/item/tk_grab/dropped(mob/user) if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item @@ -120,7 +120,7 @@ qdel(src) return focus.attack_self_tk(user) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) /obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity, params)//TODO: go over this . = ..() @@ -135,7 +135,7 @@ if(target == focus) target.attack_self_tk(user) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) return @@ -149,7 +149,7 @@ apply_focus_overlay() focus.throw_at(target, 10, 1,user) user.changeNext_move(CLICK_CD_MELEE) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) /proc/tkMaxRangeCheck(mob/user, atom/target) var/d = get_dist(user, target) @@ -165,7 +165,7 @@ if(!check_if_focusable(target)) return focus = target - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) apply_focus_overlay() return TRUE diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 8e1ddea754c4..b914f0ac9617 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -371,7 +371,8 @@ SUBSYSTEM_DEF(air) var/starting_ats = active_turfs.len sleep(world.tick_lag) var/timer = world.timeofday - log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).") + log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. \ + You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).") for(var/turf/T in active_turfs) GLOB.active_turfs_startlist += T diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm index 5395eb69cee5..616572e33999 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/controllers/subsystem/communications.dm @@ -48,7 +48,7 @@ SUBSYSTEM_DEF(communications) var/obj/item/paper/P = new /obj/item/paper(C.loc) P.name = "paper - '[sending.title]'" P.info = sending.content - P.update_appearance(updates = ALL) + P.update_appearance(UPDATE_ICON) #undef COMMUNICATION_COOLDOWN #undef COMMUNICATION_COOLDOWN_AI diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 448371ba0a3f..2fe87a4d8e97 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -220,7 +220,7 @@ SUBSYSTEM_DEF(mapping) for(var/N in nuke_tiles) var/turf/open/floor/circuit/C = N - C.update_appearance(updates = ALL) + C.update_appearance(UPDATE_ICON) /datum/controller/subsystem/mapping/Recover() flags |= SS_NO_INIT diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index 47717a22faae..19227596f879 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -45,8 +45,8 @@ RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(OnMoved),TRUE) AddGrilledItemOverlay(parent) - //var/atom/A = parent - //A.update_appearance(updates = ALL) + var/atom/A = parent + A.update_appearance(updates = ALL) ///Ran when an object finished grilling /datum/component/grillable/proc/FinishGrilling(atom/grill_source) @@ -78,11 +78,11 @@ ///Ran when an object moves from the grill /datum/component/grillable/proc/OnMoved(atom/A, atom/OldLoc, Dir, Forced) currently_grilling = FALSE - var/obj/O = parent; + var/obj/O = parent O.cut_overlays() - //UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS) + UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS) UnregisterSignal(parent, COMSIG_MOVABLE_MOVED) - //A.update_appearance(updates = ALL) + A.update_appearance(updates = ALL) /datum/component/grillable/proc/AddGrilledItemOverlay(obj/source) diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm index 7da89d1c946b..9b07ff911bbc 100644 --- a/code/datums/status_effects/debuffs/debuffs.dm +++ b/code/datums/status_effects/debuffs/debuffs.dm @@ -1087,7 +1087,7 @@ /datum/status_effect/eldritch/on_apply() if(owner.mob_size >= MOB_SIZE_HUMAN) owner.underlays |= marked_underlay - //owner.update_appearance(updates = ALL) + owner.update_appearance(updates = ALL) return TRUE return FALSE @@ -1235,7 +1235,7 @@ /datum/status_effect/cloudstruck/on_apply() mob_overlay = mutable_appearance('icons/effects/eldritch.dmi', "cloud_swirl", ABOVE_MOB_LAYER) owner.overlays += mob_overlay - //owner.update_appearance(updates = ALL) + owner.update_appearance(updates = ALL) ADD_TRAIT(owner, TRAIT_BLIND, "cloudstruck") return TRUE @@ -1246,7 +1246,7 @@ REMOVE_TRAIT(owner, TRAIT_BLIND, "cloudstruck") if(owner) owner.overlays -= mob_overlay - //owner.update_appearance(updates = ALL) + owner.update_appearance(updates = ALL) /datum/status_effect/cloudstruck/Destroy() . = ..() From ecdc471a8676c4b63c50d66e992992ddb6ec5215 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 30 Jun 2023 01:45:58 -0400 Subject: [PATCH 15/18] i cant fucking review this shit --- code/controllers/subsystem/air.dm | 9 ++++----- code/game/area/areas.dm | 6 +++--- code/game/machinery/dna_scanner.dm | 11 +++++------ code/game/machinery/firealarm.dm | 2 +- code/game/objects/effects/mines.dm | 10 +++++----- code/game/objects/items/tanks/jetpack.dm | 9 ++++----- code/game/turfs/simulated/floor.dm | 3 +-- code/modules/mob/living/init_signals.dm | 4 ++-- code/modules/research/server.dm | 4 ++-- 9 files changed, 27 insertions(+), 31 deletions(-) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index b914f0ac9617..7f014fe3be49 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -354,17 +354,16 @@ SUBSYSTEM_DEF(air) /datum/controller/subsystem/air/proc/setup_allturfs() var/list/active_turfs = src.active_turfs - var/times_fired = ++src.times_fired + times_fired++ // Clear active turfs - faster than removing every single turf in the world // one-by-one, and Initalize_Atmos only ever adds `src` back in. active_turfs.Cut() - for(var/thing in ALL_TURFS()) - var/turf/T = thing - if (T.blocks_air) + for(var/turf/setup as anything in ALL_TURFS()) + if (setup.blocks_air) continue - T.Initalize_Atmos(times_fired) + setup.Initalize_Atmos(times_fired) CHECK_TICK if(active_turfs.len) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index da6cfa30cbfc..c6213fcf47ed 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) ModifyFiredoors(FALSE) for(var/item in firealarms) var/obj/machinery/firealarm/F = item - F.update_appearance(updates = ALL) + F.update_appearance(UPDATE_ICON) for (var/item in GLOB.alert_consoles) var/obj/machinery/computer/station_alert/a = item @@ -412,7 +412,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) ModifyFiredoors(TRUE) for(var/item in firealarms) var/obj/machinery/firealarm/F = item - F.update_appearance(updates = ALL) + F.update_appearance(UPDATE_ICON) for (var/item in GLOB.silicon_mobs) var/mob/living/silicon/aiPlayer = item @@ -578,7 +578,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) /area/proc/power_change() for(var/obj/machinery/M in src) // for each machine in the area M.power_change() // reverify power status (to update icons etc.) - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) /** * Return the usage of power per channel diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index f4feda3fcda7..4e0d559bc1c3 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -35,25 +35,24 @@ if(scan_level >= 3) . += "Scanner has been upgraded to support autoprocessing." -/obj/machinery/dna_scannernew/update_appearance(updates = ALL) - . = ..() - +/obj/machinery/dna_scannernew/update_icon_state() //no power or maintenance if(stat & (NOPOWER|BROKEN)) icon_state = initial(icon_state)+ (state_open ? "_open" : "") + "_unpowered" - return + return ..() if((stat & MAINT) || panel_open) icon_state = initial(icon_state)+ (state_open ? "_open" : "") + "_maintenance" - return + return ..() //running and someone in there if(occupant) icon_state = initial(icon_state)+ "_occupied" - return + return ..() //running icon_state = initial(icon_state)+ (state_open ? "_open" : "") + return ..() /obj/machinery/dna_scannernew/proc/toggle_open(mob/user) if(panel_open) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index bf3d8e2ebe76..e6667b04be2a 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -112,7 +112,7 @@ if(obj_flags & EMAGGED) return obj_flags |= EMAGGED - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON) if(user) user.visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its thermal sensors.")) diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index cba4eaae241d..2f65621a85ce 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -94,7 +94,7 @@ /obj/effect/mine/Initialize(mapload) . = ..() layer = ABOVE_MOB_LAYER -// update_appearance(UPDATE_ICON_STATE) + update_appearance(UPDATE_ICON_STATE) /obj/effect/mine/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/multitool)) @@ -106,12 +106,12 @@ return return ..() -/*/obj/effect/mine/update_icon_state() +/obj/effect/mine/update_icon_state() . = ..() - if(armed) + if(triggered) icon_state = base_icon_state - else - icon_state = "[base_icon_state]-inactive"*/ +// else +// icon_state = "[base_icon_state]-inactive" /obj/effect/mine/proc/mineEffect(mob/victim) to_chat(victim, span_danger("*click*")) diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index 3a1f8792e90f..0d8bbe14ce0f 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -54,17 +54,16 @@ /obj/item/tank/jetpack/proc/turn_on(mob/user) on = TRUE - update_appearance(updates = ALL) + update_icon(UPDATE_ICON_STATE) ion_trail.start() RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(move_react)) if(full_speed) user.add_movespeed_modifier(MOVESPEED_ID_JETPACK, priority=100, multiplicative_slowdown=jetspeed, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK) -/obj/item/tank/jetpack/update_appearance(updates = ALL) +/obj/item/tank/jetpack/update_icon_state() . = ..() - icon_state = initial(icon_state) if(!classic && on) //does the jetpack have its own on sprite? - icon_state = "[initial(icon_state)]-on" + icon_state = "[initial(icon_state)][on ? "-on" : ""]" else //or does it use the classic overlay cut_overlays() if(on) @@ -73,7 +72,7 @@ /obj/item/tank/jetpack/proc/turn_off(mob/user) on = FALSE stabilizers = FALSE - update_appearance(updates = ALL) + update_icon(UPDATE_ICON_STATE) ion_trail.stop() UnregisterSignal(user, COMSIG_MOVABLE_MOVED) user.remove_movespeed_modifier(MOVESPEED_ID_JETPACK) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index d0e9054c2b9c..ea45a43bb7cb 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -115,10 +115,9 @@ /turf/open/floor/blob_act(obj/structure/blob/B) return -/turf/open/floor/update_appearance(updates = ALL) +/turf/open/floor/update_icon() . = ..() update_visuals() - return 1 /turf/open/floor/attack_paw(mob/user) return attack_hand(user) diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index 0c27ab1cb14d..cfcf7a395198 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -173,13 +173,13 @@ /mob/living/proc/on_incapacitated_trait_gain(datum/source) SIGNAL_HANDLER add_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED) -// update_appearance() + update_appearance() /// Called when [TRAIT_INCAPACITATED] is removed from the mob. /mob/living/proc/on_incapacitated_trait_loss(datum/source) SIGNAL_HANDLER remove_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED) -// update_appearance() + update_appearance() /// Called when [TRAIT_RESTRAINED] is added to the mob. diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index b802145d6276..588e5ab947d2 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -53,7 +53,7 @@ icon_state = "RD-server-on" /obj/machinery/rnd/server/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I) - .=..() + . = ..() update_appearance(updates = ALL) /obj/machinery/rnd/server/power_change() @@ -66,7 +66,7 @@ working = FALSE else working = TRUE - update_appearance(updates = ALL) + update_appearance(UPDATE_ICON_STATE) /obj/machinery/rnd/server/emp_act() . = ..() From 58516dfb4991a2654e1ba4ff71481936a721998c Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 30 Jun 2023 02:16:52 -0400 Subject: [PATCH 16/18] makes some things do the job properly --- code/_onclick/hud/action_button.dm | 4 +- code/game/machinery/buttons.dm | 2 +- code/game/machinery/doors/airlock.dm | 55 +++++++------------ code/game/machinery/electrolyzer.dm | 10 ++-- .../embedded_controller/access_controller.dm | 26 ++++----- .../embedded_controller/airlock_controller.dm | 13 ++--- .../embedded_controller_base.dm | 3 - code/game/machinery/flasher.dm | 12 +--- code/game/machinery/gulag_teleporter.dm | 12 ++-- code/game/machinery/harvester.dm | 27 +++++---- 10 files changed, 69 insertions(+), 95 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index dfd012b78518..93ed71d04b0a 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -262,7 +262,7 @@ /atom/movable/screen/button_palette/Initialize(mapload) . = ..() - update_appearance(updates = ALL) + update_appearance() /atom/movable/screen/button_palette/proc/set_hud(datum/hud/our_hud) src.our_hud = our_hud @@ -358,7 +358,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6, expanded = new_expanded our_group.refresh_actions() - update_appearance(updates = ALL) + update_appearance() if(!usr.client) return diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 948cb200dc3b..d86949fa7d2f 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -54,7 +54,7 @@ /obj/machinery/button/update_overlays() . = ..() -// if(light_mask && !(machine_stat & (NOPOWER|BROKEN)) && !panel_open) +// if(light_mask && !(stat & (NOPOWER|BROKEN)) && !panel_open) // . += emissive_appearance(icon, light_mask, src, alpha = alpha) if(!panel_open) return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 7208587e9873..99655163b82a 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -594,7 +594,7 @@ else return FALSE -/obj/machinery/door/airlock/update_appearance(updates, state=0, override=0) +/obj/machinery/door/airlock/update_icon(updates=ALL, state=0, override=0) . = ..() cut_overlays() if(operating && !override) @@ -725,30 +725,13 @@ SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_opening", FLOAT_LAYER, FLOAT_PLANE, dir) check_unres() -/// Overlay cache. Why isn't this just in /obj/machinery/door/airlock? Because its used just a -/// tiny bit in door_assembly.dm Refactored so you don't have to make a null copy of airlock -/// to get to the damn thing -/// Someone, for the love of god, profile this. Is there a reason to cache mutable_appearance -/// if so, why are we JUST doing the airlocks when we can put this in mutable_appearance.dm for -/// everything -/proc/get_airlock_overlay(icon_state, icon_file, atom/offset_spokesman, em_block) - var/static/list/airlock_overlays = list() - - var/base_icon_key = "[icon_state][REF(icon_file)]" - if(!(. = airlock_overlays[base_icon_key])) - . = airlock_overlays[base_icon_key] = mutable_appearance(icon_file, icon_state) - - if(isnull(em_block)) - return - -// var/turf/our_turf = get_turf(offset_spokesman) - -// var/em_block_key = "[base_icon_key][em_block][GET_TURF_PLANE_OFFSET(our_turf)]" -// var/mutable_appearance/em_blocker = airlock_overlays[em_block_key] -// if(!em_blocker) -// em_blocker = airlock_overlays[em_block_key] = mutable_appearance(icon_file, icon_state, offset_spokesman = offset_spokesman, plane = EMISSIVE_PLANE, appearance_flags = EMISSIVE_APPEARANCE_FLAGS) -// em_blocker.color = em_block ? GLOB.em_block_color : GLOB.emissive_color - +/proc/get_airlock_overlay(icon_state, icon_file) + var/obj/machinery/door/airlock/A + pass(A) //suppress unused warning + var/list/airlock_overlays = A.airlock_overlays + var/iconkey = "[icon_state][icon_file]" + if((!(. = airlock_overlays[iconkey]))) + . = airlock_overlays[iconkey] = mutable_appearance(icon_file, icon_state) return list(., /*em_blocker*/) /obj/machinery/door/airlock/proc/check_unres() //unrestricted sides. This overlay indicates which directions the player can access even without an ID @@ -783,15 +766,15 @@ /obj/machinery/door/airlock/do_animate(animation) switch(animation) if("opening") - update_appearance(UPDATE_ICON, AIRLOCK_OPENING) + update_icon(ALL, AIRLOCK_OPENING) if("closing") - update_appearance(UPDATE_ICON, AIRLOCK_CLOSING) + update_appearance(ALL, AIRLOCK_CLOSING) if("deny") if(!stat) - update_appearance(UPDATE_ICON, AIRLOCK_DENY) + update_icon(ALL, AIRLOCK_DENY) playsound(src,doorDeni,50,0,3) sleep(0.6 SECONDS) - update_appearance(UPDATE_ICON, AIRLOCK_CLOSED) + update_icon(ALL, AIRLOCK_CLOSED) /obj/machinery/door/airlock/examine(mob/user) . = ..() @@ -1411,7 +1394,7 @@ if(welded) welded = !welded operating = TRUE - update_appearance(UPDATE_ICON, AIRLOCK_OPENING, 1) + update_icon(ALL, AIRLOCK_OPENING, 1) sleep(0.1 SECONDS) set_opacity(0) update_freelook_sight() @@ -1421,7 +1404,7 @@ air_update_turf(1) sleep(0.1 SECONDS) layer = OPEN_DOOR_LAYER - update_appearance(UPDATE_ICON, AIRLOCK_OPEN, 1) + update_icon(ALL, AIRLOCK_OPEN, 1) operating = FALSE if(delayed_close_requested) delayed_close_requested = FALSE @@ -1456,7 +1439,7 @@ SSexplosions.med_mov_atom += killthis operating = TRUE - update_appearance(UPDATE_ICON, AIRLOCK_CLOSING, 1) + update_icon(ALL, AIRLOCK_CLOSING, 1) layer = CLOSED_DOOR_LAYER if(air_tight) density = TRUE @@ -1472,7 +1455,7 @@ set_opacity(1) update_freelook_sight() sleep(0.1 SECONDS) - update_appearance(UPDATE_ICON, AIRLOCK_CLOSED, 1) + update_icon(ALL, AIRLOCK_CLOSED, 1) operating = FALSE delayed_close_requested = FALSE if(safe) @@ -1522,13 +1505,13 @@ /obj/machinery/door/airlock/emag_act(mob/user) if(!operating && density && hasPower() && !(obj_flags & EMAGGED)) operating = TRUE - update_appearance(UPDATE_ICON, AIRLOCK_EMAG, 1) + update_icon(ALL, AIRLOCK_EMAG, 1) sleep(0.6 SECONDS) if(QDELETED(src)) return operating = FALSE if(!open()) - update_appearance(UPDATE_ICON, AIRLOCK_CLOSED, 1) + update_icon(ALL, AIRLOCK_CLOSED, 1) obj_flags |= EMAGGED lights = FALSE locked = TRUE @@ -1833,7 +1816,7 @@ /obj/machinery/door/airlock/proc/blow_charge() panel_open = TRUE - update_appearance(UPDATE_ICON, AIRLOCK_OPENING) + update_icon(ALL, AIRLOCK_OPENING) visible_message(span_warning("[src]'s panel is blown off in a spray of deadly shrapnel!")) charge.forceMove(drop_location()) charge.ex_act(EXPLODE_DEVASTATE) diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index 64a1e97d2e65..68d2ba9449a4 100644 --- a/code/game/machinery/electrolyzer.dm +++ b/code/game/machinery/electrolyzer.dm @@ -54,12 +54,14 @@ else . += "There is no power cell installed." -/obj/machinery/electrolyzer/update_appearance(updates = ALL) - . = ..() - cut_overlays() +/obj/machinery/electrolyzer/update_icon_state() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" + return ..() + +/obj/machinery/electrolyzer/update_overlays() + . = ..() if(panel_open) - add_overlay("electrolyzer-open") + . += "electrolyzer-open" /obj/machinery/electrolyzer/process(delta_time) if((stat & (BROKEN|MAINT)) && on) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 849a5849bcf1..ae51fdcb4644 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -40,6 +40,7 @@ /obj/machinery/doorButtons/access_button icon = 'icons/obj/airlock_machines.dmi' icon_state = "access_button_standby" + base_icon_state = "access_button" name = "access button" desc = "A button used for the explicit purpose of opening an airlock." var/idDoor @@ -84,15 +85,12 @@ busy = FALSE update_appearance(updates = ALL) -/obj/machinery/doorButtons/access_button/update_appearance(updates = ALL) - . = ..() +/obj/machinery/doorButtons/access_button/update_icon_state() if(stat & NOPOWER) - icon_state = "access_button_off" - else - if(busy) - icon_state = "access_button_cycle" - else - icon_state = "access_button_standby" + icon_state = "[base_icon_state]_off" + return ..() + icon_state = "[base_icon_state]_[busy ? "cycle" : "standby"]" + return ..() /obj/machinery/doorButtons/access_button/removeMe(obj/O) if(O == door) @@ -103,6 +101,7 @@ /obj/machinery/doorButtons/airlock_controller icon = 'icons/obj/airlock_machines.dmi' icon_state = "access_control_standby" + base_icon_state = "access_control" name = "access console" desc = "A small console that can cycle opening between two airlocks." var/obj/machinery/door/airlock/interiorAirlock @@ -244,15 +243,12 @@ else if(A.id_tag == idExterior) exteriorAirlock = A -/obj/machinery/doorButtons/airlock_controller/update_appearance(updates = ALL) - . = ..() +/obj/machinery/doorButtons/airlock_controller/update_icon_state() if(stat & NOPOWER) icon_state = "access_control_off" - return - if(busy || lostPower) - icon_state = "access_control_process" - else - icon_state = "access_control_standby" + return ..() + icon_state = "[base_icon_state]_[(busy || lostPower) ? "process" : "standby"]" + return ..() /obj/machinery/doorButtons/airlock_controller/ui_interact(mob/user) var/datum/browser/popup = new(user, "computer", name) diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index 260ad8d555a8..eeddaae84f7d 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -196,6 +196,7 @@ /obj/machinery/embedded_controller/radio/airlock_controller icon = 'icons/obj/airlock_machines.dmi' icon_state = "airlock_control_standby" + base_icon_state = "airlock_control" name = "airlock console" density = FALSE @@ -255,15 +256,9 @@ new_prog.master = src program = new_prog -/obj/machinery/embedded_controller/radio/airlock_controller/update_appearance(updates = ALL) - . = ..() - if(on && program) - if(program.memory["processing"]) - icon_state = "airlock_control_process" - else - icon_state = "airlock_control_standby" - else - icon_state = "airlock_control_off" +/obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state() + icon_state = "[base_icon_state]_[program?.memory["processing"] ? "process" : "standby"]" + return ..() /obj/machinery/embedded_controller/radio/airlock_controller/return_text() diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 6fbfc6e5ef39..24996bb79d99 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -32,9 +32,6 @@ popup.set_content(return_text()) popup.open() -/obj/machinery/embedded_controller/update_appearance(updates = ALL) - . = ..() - /obj/machinery/embedded_controller/proc/return_text() /obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 1d361e713664..796ee51775e8 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -46,15 +46,9 @@ return FALSE return ..() -/obj/machinery/flasher/update_appearance(updates = ALL) - . = ..() - if (powered()) - if(bulb.burnt_out) - icon_state = "[base_state]1-p" - else - icon_state = "[base_state]1" - else - icon_state = "[base_state]1-p" +/obj/machinery/flasher/update_icon_state() + icon_state = "[base_icon_state]1[(bulb?.burnt_out || !powered()) ? "-p" : null]" + return ..() //Don't want to render prison breaks impossible /obj/machinery/flasher/attackby(obj/item/W, mob/user, params) diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index c87e759578f8..76f6c159b23a 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -11,6 +11,7 @@ The console is located at computer/gulag_teleporter.dm desc = "A bluespace teleporter used for teleporting prisoners to the labor camp." icon = 'icons/obj/machines/implantchair.dmi' icon_state = "implantchair" + base_icon_state = "implantchair" state_open = FALSE density = TRUE use_power = IDLE_POWER_USE @@ -64,24 +65,23 @@ The console is located at computer/gulag_teleporter.dm return ..() -/obj/machinery/gulag_teleporter/update_appearance(updates = ALL) - . = ..() - icon_state = initial(icon_state) + (state_open ? "_open" : "") +/obj/machinery/gulag_teleporter/update_icon_state() + icon_state = "[base_icon_state][state_open ? "_open" : null]" //no power or maintenance if(stat & (NOPOWER|BROKEN)) icon_state += "_unpowered" if((stat & MAINT) || panel_open) icon_state += "_maintenance" - return + return ..() if((stat & MAINT) || panel_open) icon_state += "_maintenance" - return + return ..() //running and someone in there if(occupant) icon_state += "_occupied" - return + return ..() /obj/machinery/gulag_teleporter/relaymove(mob/user) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index c2c28b76d4f4..535b6221c87c 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -4,6 +4,7 @@ density = TRUE icon = 'icons/obj/machines/harvester.dmi' icon_state = "harvester" + base_icon_state = "harvester" verb_say = "states" state_open = FALSE idle_power_usage = 50 @@ -11,6 +12,7 @@ light_color = LIGHT_COLOR_BLUE var/interval = 20 var/harvesting = FALSE + var/warming_up = FALSE var/list/operation_order = list() //Order of wich we harvest limbs. var/allow_clothing = FALSE var/allow_living = FALSE @@ -27,22 +29,24 @@ max_time -= L.rating interval = max(max_time,1) -/obj/machinery/harvester/update_appearance(updates = ALL, warming_up) - . = ..() - if(warming_up) - icon_state = initial(icon_state)+"-charging" - return +/obj/machinery/harvester/update_icon_state() if(state_open) - icon_state = initial(icon_state)+"-open" - else if(harvesting) - icon_state = initial(icon_state)+"-active" - else - icon_state = initial(icon_state) + icon_state = "[base_icon_state]-open" + return ..() + if(warming_up) + icon_state = "[base_icon_state]-charging" + return ..() + if(harvesting) + icon_state = "[base_icon_state]-active" + return ..() + icon_state = base_icon_state + return ..() /obj/machinery/harvester/open_machine(drop = TRUE) if(panel_open) return . = ..() + warming_up = FALSE harvesting = FALSE /obj/machinery/harvester/attack_hand(mob/user) @@ -85,6 +89,7 @@ return var/mob/living/carbon/C = occupant operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more + warming_up = TRUE harvesting = TRUE visible_message(span_notice("The [name] begins warming up!")) say("Initializing harvest protocol.") @@ -92,6 +97,7 @@ addtimer(CALLBACK(src, PROC_REF(harvest)), interval) /obj/machinery/harvester/proc/harvest() + warming_up = FALSE update_appearance(updates = ALL) if(!harvesting || state_open || !powered(AREA_USAGE_EQUIP) || !occupant || !iscarbon(occupant)) return @@ -116,6 +122,7 @@ addtimer(CALLBACK(src, PROC_REF(harvest)), interval) /obj/machinery/harvester/proc/end_harvesting() + warming_up = FALSE harvesting = FALSE open_machine() say("Subject has been successfully harvested.") From 31decbd74e2ae915469d00f6b0995bed8fef91d5 Mon Sep 17 00:00:00 2001 From: tattax <71668564+tattax@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:17:29 -0300 Subject: [PATCH 17/18] seconded --- _maps/map_files/YogStation/YogStation.dmm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm index 0af82d398641..8340656e1e06 100644 --- a/_maps/map_files/YogStation/YogStation.dmm +++ b/_maps/map_files/YogStation/YogStation.dmm @@ -26329,7 +26329,7 @@ /obj/structure/rack, /obj/effect/spawner/lootdrop/maintenance, /obj/item/storage/box/lights/mixed, -/obj/item/latexballon, +/obj/item/latexballoon, /turf/open/floor/plating, /area/maintenance/port) "gCF" = ( @@ -61071,7 +61071,7 @@ lootcount = 2; name = "2maintenance loot spawner" }, -/obj/item/latexballon, +/obj/item/latexballoon, /obj/structure/disposalpipe/segment{ dir = 4 }, From 35c6f172b5dfa41aeb0bac89f865e0fc78a40ef1 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:02:15 -0400 Subject: [PATCH 18/18] a --- code/game/machinery/doors/door.dm | 2 +- code/game/objects/items/tanks/jetpack.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index d72567ad3989..56aa007bd92e 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -359,7 +359,7 @@ sleep(open_speed) density = TRUE sleep(open_speed) - update_icon(UPDATE_ICON) + update_appearance(UPDATE_ICON) if(visible && !glass) set_opacity(1) operating = FALSE diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index 0d8bbe14ce0f..e674c9b384c6 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -54,7 +54,7 @@ /obj/item/tank/jetpack/proc/turn_on(mob/user) on = TRUE - update_icon(UPDATE_ICON_STATE) + update_appearance(UPDATE_ICON) ion_trail.start() RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(move_react)) if(full_speed) @@ -72,7 +72,7 @@ /obj/item/tank/jetpack/proc/turn_off(mob/user) on = FALSE stabilizers = FALSE - update_icon(UPDATE_ICON_STATE) + update_appearance(UPDATE_ICON) ion_trail.stop() UnregisterSignal(user, COMSIG_MOVABLE_MOVED) user.remove_movespeed_modifier(MOVESPEED_ID_JETPACK)