From c67624339753a2aa43ad1eaf64a3779e62f03d48 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 01:30:10 -0400 Subject: [PATCH 01/50] update icon and update appearance --- code/__DEFINES/flags.dm | 16 +++ code/_onclick/hud/action_button.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/robot.dm | 5 +- code/_onclick/hud/screen_objects.dm | 6 +- code/_onclick/hud/slime.dm | 2 +- code/_onclick/telekinesis.dm | 13 +- code/controllers/subsystem/communications.dm | 2 +- code/controllers/subsystem/mapping.dm | 2 +- code/controllers/subsystem/persistence.dm | 2 +- code/datums/components/acid.dm | 4 +- code/datums/components/armor_plate.dm | 2 +- code/datums/components/grillable.dm | 4 +- .../components/storage/concrete/_concrete.dm | 11 +- code/datums/components/storage/storage.dm | 5 +- code/datums/diseases/appendicitis.dm | 2 +- code/datums/martial/sleeping_carp.dm | 3 +- 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 | 12 +- code/game/atoms.dm | 73 ++++++++++- code/game/gamemodes/clock_cult/clock_cult.dm | 2 +- .../game/gamemodes/clown_ops/bananium_bomb.dm | 3 +- code/game/gamemodes/cult/cult.dm | 2 +- code/game/gamemodes/events.dm | 6 +- code/game/golf/golf.dm | 2 +- code/game/machinery/PDApainter.dm | 11 +- code/game/machinery/Sleeper.dm | 5 +- code/game/machinery/_machinery.dm | 8 +- code/game/machinery/ai_slipper.dm | 3 +- code/game/machinery/airlock_control.dm | 15 +-- code/game/machinery/airlock_cycle_control.dm | 46 +++---- code/game/machinery/announcement_system.dm | 13 +- code/game/machinery/aug_manipulator.dm | 11 +- code/game/machinery/autolathe.dm | 4 +- code/game/machinery/bounty_board.dm | 3 +- code/game/machinery/buttons.dm | 11 +- code/game/machinery/camera/camera.dm | 14 +-- code/game/machinery/camera/camera_assembly.dm | 9 +- code/game/machinery/camera/presets.dm | 4 +- code/game/machinery/cell_charger.dm | 11 +- code/game/machinery/cloning.dm | 4 +- code/game/machinery/computer/_computer.dm | 9 +- code/game/machinery/computer/aifixer.dm | 9 +- code/game/machinery/computer/apc_control.dm | 8 +- code/game/machinery/computer/arcade.dm | 5 +- code/game/machinery/computer/atmos_alert.dm | 9 +- code/game/machinery/computer/atmos_control.dm | 3 +- code/game/machinery/computer/camera.dm | 3 +- code/game/machinery/computer/medical.dm | 2 +- code/game/machinery/computer/security.dm | 2 +- code/game/machinery/computer/station_alert.dm | 3 +- code/game/machinery/computer/teleporter.dm | 12 +- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/dance_machine.dm | 7 +- code/game/machinery/decontamination.dm | 15 +-- code/game/machinery/defibrillator_mount.dm | 13 +- 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 | 13 +- code/game/machinery/doors/door.dm | 7 +- code/game/machinery/doors/firedoor.dm | 26 ++-- code/game/machinery/doors/passworddoor.dm | 5 +- code/game/machinery/doors/poddoor.dm | 3 +- code/game/machinery/doors/windowdoor.dm | 5 +- code/game/machinery/doppler_array.dm | 3 +- code/game/machinery/droneDispenser.dm | 11 +- code/game/machinery/electrolyzer.dm | 19 +-- .../embedded_controller/access_controller.dm | 18 +-- .../embedded_controller/airlock_controller.dm | 3 +- .../embedded_controller_base.dm | 4 +- .../simple_vent_controller.dm | 3 +- code/game/machinery/fat_sucker.dm | 11 +- code/game/machinery/firealarm.dm | 25 ++-- code/game/machinery/flasher.dm | 3 +- code/game/machinery/gulag_processor.dm | 7 +- code/game/machinery/gulag_teleporter.dm | 5 +- code/game/machinery/harvester.dm | 2 +- code/game/machinery/hologram.dm | 7 +- code/game/machinery/holosign.dm | 7 +- code/game/machinery/igniter.dm | 12 +- code/game/machinery/iv_drip.dm | 25 ++-- code/game/machinery/lightswitch.dm | 9 +- code/game/machinery/magnet.dm | 7 +- code/game/machinery/medical_kiosk.dm | 3 +- code/game/machinery/navbeacon.dm | 7 +- code/game/machinery/newscaster.dm | 17 +-- 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 | 11 +- code/game/machinery/recharger.dm | 16 +-- code/game/machinery/rechargestation.dm | 7 +- code/game/machinery/recycler.dm | 13 +- code/game/machinery/requests_console.dm | 21 ++-- code/game/machinery/sci_bombardment.dm | 15 +-- code/game/machinery/shieldgen.dm | 9 +- code/game/machinery/slotmachine.dm | 7 +- code/game/machinery/spaceheater.dm | 21 ++-- code/game/machinery/stasis.dm | 11 +- code/game/machinery/suit_storage_unit.dm | 15 +-- code/game/machinery/syndicatebomb.dm | 13 +- .../telecomms/machine_interactions.dm | 4 +- .../telecomms/machines/broadcaster.dm | 2 +- .../telecomms/machines/message_server.dm | 10 +- .../machinery/telecomms/telecomunications.dm | 5 +- code/game/machinery/teleporter.dm | 16 +-- code/game/machinery/transformer.dm | 7 +- code/game/machinery/washing_machine.dm | 17 +-- .../mecha/equipment/tools/medical_tools.dm | 4 +- code/game/mecha/equipment/tools/work_tools.dm | 4 +- code/game/mecha/mech_bay.dm | 11 +- code/game/mecha/mecha.dm | 9 +- code/game/mecha/working/ripley.dm | 7 +- code/game/objects/effects/decals/cleanable.dm | 2 +- .../effects/decals/cleanable/humans.dm | 7 +- .../fluid_spread/effects_foam.dm | 2 +- .../fluid_spread/effects_smoke.dm | 2 +- .../objects/effects/spawners/bombspawner.dm | 2 +- .../temporary_visuals/miscellaneous.dm | 10 +- code/game/objects/items/RCD.dm | 12 +- code/game/objects/items/RCL.dm | 18 +-- code/game/objects/items/RPD.dm | 2 +- code/game/objects/items/ashtray.dm | 7 +- code/game/objects/items/bodybag.dm | 2 +- code/game/objects/items/candle.dm | 12 +- code/game/objects/items/cards_ids.dm | 9 +- code/game/objects/items/chrono_eraser.dm | 10 +- code/game/objects/items/cigs_lighters.dm | 14 ++- code/game/objects/items/clown_items.dm | 2 +- code/game/objects/items/crayons.dm | 16 +-- code/game/objects/items/credit_holochip.dm | 9 +- code/game/objects/items/defib.dm | 73 +++++------ code/game/objects/items/devices/PDA/PDA.dm | 27 ++-- code/game/objects/items/devices/aicard.dm | 7 +- code/game/objects/items/devices/flashlight.dm | 7 +- .../objects/items/devices/geiger_counter.dm | 15 +-- .../objects/items/devices/lightreplacer.dm | 7 +- code/game/objects/items/devices/megaphone.dm | 7 +- code/game/objects/items/devices/multitool.dm | 5 +- code/game/objects/items/devices/powersink.dm | 5 +- .../objects/items/devices/quantum_keycard.dm | 3 +- .../objects/items/devices/taperecorder.dm | 19 +-- .../objects/items/devices/traitordevices.dm | 2 +- .../objects/items/devices/transfer_valve.dm | 11 +- code/game/objects/items/dice.dm | 16 ++- code/game/objects/items/discoball.dm | 9 +- code/game/objects/items/documents.dm | 2 +- code/game/objects/items/etherealdiscoball.dm | 9 +- code/game/objects/items/flamethrower.dm | 19 +-- .../granters/martial_arts/plasma_fist.dm | 5 +- .../granters/martial_arts/sleeping_carp.dm | 2 +- code/game/objects/items/grenades/plastic.dm | 7 +- code/game/objects/items/handcuffs.dm | 9 +- code/game/objects/items/holy_weapons.dm | 9 +- code/game/objects/items/hot_potato.dm | 7 +- code/game/objects/items/hourglass.dm | 7 +- .../objects/items/implants/implantcase.dm | 13 +- .../objects/items/implants/implantchair.dm | 9 +- code/game/objects/items/implants/implanter.dm | 7 +- .../game/objects/items/implants/implantpad.dm | 9 +- code/game/objects/items/inducer.dm | 23 ++-- code/game/objects/items/laser_level.dm | 7 +- code/game/objects/items/mail.dm | 10 +- code/game/objects/items/melee/misc.dm | 11 +- code/game/objects/items/mop.dm | 2 +- code/game/objects/items/pet_carrier.dm | 13 +- code/game/objects/items/pinpointer.dm | 7 +- code/game/objects/items/plushes.dm | 2 +- code/game/objects/items/pneumaticCannon.dm | 7 +- code/game/objects/items/robot/robot_items.dm | 14 ++- code/game/objects/items/robot/robot_parts.dm | 19 +-- .../objects/items/robot/robot_upgrades.dm | 7 +- code/game/objects/items/sharpener.dm | 2 +- code/game/objects/items/shields.dm | 13 +- code/game/objects/items/singularityhammer.dm | 4 +- code/game/objects/items/stacks/cash.dm | 2 +- .../objects/items/stacks/license_plates.dm | 3 +- code/game/objects/items/stacks/medical.dm | 10 +- code/game/objects/items/stacks/rods.dm | 10 +- code/game/objects/items/stacks/stack.dm | 9 +- code/game/objects/items/stacks/tickets.dm | 5 +- code/game/objects/items/storage/bags.dm | 14 ++- code/game/objects/items/storage/belt.dm | 21 ++-- code/game/objects/items/storage/boxes.dm | 8 +- code/game/objects/items/storage/fancy.dm | 20 +-- code/game/objects/items/storage/lockbox.dm | 18 +-- code/game/objects/items/storage/toolbox.dm | 7 +- code/game/objects/items/storage/wallets.dm | 7 +- code/game/objects/items/stunbaton.dm | 17 +-- .../objects/items/supermatter_delaminator.dm | 24 ++-- .../objects/items/syndicateReverseCard.dm | 5 +- code/game/objects/items/tanks/jetpack.dm | 7 +- code/game/objects/items/tanks/tank_types.dm | 2 +- code/game/objects/items/tanks/tanks.dm | 7 +- code/game/objects/items/theft_tools.dm | 9 +- code/game/objects/items/tools/screwdriver.dm | 5 +- code/game/objects/items/tools/weldingtool.dm | 19 +-- code/game/objects/items/tools/wirecutters.dm | 5 +- code/game/objects/items/toys.dm | 49 ++++---- code/game/objects/items/twohanded.dm | 65 ++++++---- code/game/objects/structures/aliens.dm | 9 +- code/game/objects/structures/artstuff.dm | 16 +-- code/game/objects/structures/bedsheet_bin.dm | 11 +- .../structures/crates_lockers/closets.dm | 19 +-- .../closets/bluespace_locker.dm | 3 +- .../crates_lockers/closets/bodybag.dm | 17 +-- .../crates_lockers/closets/secure/personal.dm | 2 +- .../structures/crates_lockers/crates.dm | 9 +- .../structures/crates_lockers/crates/bins.dm | 9 +- .../crates_lockers/crates/critter.dm | 3 +- .../crates_lockers/crates/secure.dm | 5 +- code/game/objects/structures/displaycase.dm | 19 +-- code/game/objects/structures/divine.dm | 5 +- code/game/objects/structures/door_assembly.dm | 11 +- code/game/objects/structures/extinguisher.dm | 15 +-- code/game/objects/structures/false_walls.dm | 6 +- code/game/objects/structures/fireaxe.dm | 29 ++--- code/game/objects/structures/fireplace.dm | 9 +- code/game/objects/structures/grille.dm | 9 +- code/game/objects/structures/guncase.dm | 15 +-- code/game/objects/structures/headpike.dm | 5 +- code/game/objects/structures/holosign.dm | 5 +- code/game/objects/structures/janicart.dm | 15 +-- code/game/objects/structures/ladders.dm | 25 ++-- code/game/objects/structures/life_candle.dm | 5 +- code/game/objects/structures/mineral_doors.dm | 7 +- code/game/objects/structures/mop_bucket.dm | 11 +- code/game/objects/structures/morgue.dm | 23 ++-- code/game/objects/structures/safe.dm | 5 +- code/game/objects/structures/shower.dm | 5 +- .../structures/signs/signs_interactive.dm | 5 +- code/game/objects/structures/stairs.dm | 7 +- code/game/objects/structures/tables_racks.dm | 3 +- .../game/objects/structures/tank_dispenser.dm | 9 +- .../structures/transit_tubes/station.dm | 4 +- .../transit_tubes/transit_tube_cargo_pod.dm | 3 +- .../transit_tubes/transit_tube_pod.dm | 7 +- code/game/objects/structures/watercloset.dm | 14 ++- .../objects/structures/windoor_assembly.dm | 9 +- code/game/objects/structures/window.dm | 23 ++-- code/game/turfs/open.dm | 2 +- code/game/turfs/simulated/floor.dm | 9 +- .../game/turfs/simulated/floor/fancy_floor.dm | 11 +- .../game/turfs/simulated/floor/light_floor.dm | 11 +- .../turfs/simulated/floor/mineral_floor.dm | 3 +- code/game/turfs/simulated/floor/misc_floor.dm | 5 +- .../turfs/simulated/floor/plasteel_floor.dm | 3 +- code/game/turfs/simulated/floor/plating.dm | 3 +- code/game/turfs/simulated/minerals.dm | 5 +- code/game/turfs/simulated/wall/reinf_walls.dm | 27 ++-- code/game/turfs/space/transit.dm | 5 +- code/modules/NTNet/relays.dm | 13 +- code/modules/VR/vr_sleeper.dm | 5 +- code/modules/admin/verbs/debug.dm | 4 +- code/modules/admin/verbs/manipulate_organs.dm | 2 +- code/modules/antagonists/_common/antag_hud.dm | 2 +- .../abductor/equipment/abduction_gear.dm | 8 +- .../antagonists/abductor/equipment/gland.dm | 3 +- .../abductor/machinery/experiment.dm | 3 +- .../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 | 17 +-- .../antagonists/blob/structures/core.dm | 7 +- .../antagonists/blob/structures/node.dm | 3 +- .../antagonists/blob/structures/shield.dm | 3 +- .../bloodsuckers/powers/targeted/lasombra.dm | 2 +- .../structures/bloodsucker_coffin.dm | 2 +- .../structures/bloodsucker_crypt.dm | 33 ++--- .../clockcult/clock_effects/clock_sigils.dm | 5 +- .../clock_helpers/clock_powerdrain.dm | 6 +- .../clockcult/clock_helpers/power_helpers.dm | 2 +- .../ark_of_the_clockwork_justicar.dm | 2 +- code/modules/antagonists/cult/cult_items.dm | 6 +- .../antagonists/cult/cult_structures.dm | 14 ++- .../eldritch_cult/eldritch_book.dm | 2 +- .../eldritch_cult/eldritch_magic.dm | 2 +- .../nukeop/equipment/nuclearbomb.dm | 29 ++--- .../antagonists/revolution/revolution.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 3 +- .../traitor/equipment/Malf_Modules.dm | 2 +- .../antagonists/zombie/abilities/spit.dm | 3 +- code/modules/assembly/assembly.dm | 4 +- code/modules/assembly/doorcontrol.dm | 2 +- code/modules/assembly/flash.dm | 4 +- code/modules/assembly/health.dm | 2 +- code/modules/assembly/holder.dm | 7 +- code/modules/assembly/infrared.dm | 11 +- code/modules/assembly/mousetrap.dm | 13 +- code/modules/assembly/proximity.dm | 13 +- code/modules/assembly/signaler.dm | 11 +- code/modules/assembly/timer.dm | 13 +- .../atmospherics/machinery/airalarm.dm | 25 ++-- .../atmospherics/machinery/atmosmachinery.dm | 9 +- .../binary_devices/binary_devices.dm | 2 +- .../components/binary_devices/circulator.dm | 11 +- .../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 | 3 +- .../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 | 9 +- .../components/trinary_devices/mixer.dm | 9 +- .../components/unary_devices/cryo.dm | 23 ++-- .../unary_devices/heat_exchanger.dm | 3 +- .../unary_devices/outlet_injector.dm | 10 +- .../components/unary_devices/thermomachine.dm | 7 +- .../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 | 7 +- .../machinery/pipes/heat_exchange/junction.dm | 3 +- .../machinery/pipes/heat_exchange/manifold.dm | 3 +- .../pipes/heat_exchange/manifold4w.dm | 3 +- .../machinery/pipes/heat_exchange/simple.dm | 3 +- .../machinery/pipes/layermanifold.dm | 6 +- .../atmospherics/machinery/pipes/manifold.dm | 5 +- .../machinery/pipes/manifold4w.dm | 3 +- .../atmospherics/machinery/pipes/pipes.dm | 7 +- .../atmospherics/machinery/pipes/simple.dm | 3 +- .../machinery/portable/canister.dm | 13 +- .../portable/portable_atmospherics.dm | 12 +- .../atmospherics/machinery/portable/pump.dm | 11 +- .../machinery/portable/scrubber.dm | 16 +-- code/modules/awaymissions/gateway.dm | 29 +++-- .../awaymissions/mission_code/Academy.dm | 3 +- code/modules/awaymissions/pamphlet.dm | 3 +- code/modules/buildmode/buildmode.dm | 4 +- code/modules/buildmode/buttons.dm | 10 +- 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 | 7 +- code/modules/cargo/order.dm | 6 +- code/modules/cargo/supplypod.dm | 22 ++-- code/modules/cargo/supplypod_beacon.dm | 5 +- code/modules/client/preferences/ghost.dm | 2 +- code/modules/clothing/chameleon.dm | 2 +- code/modules/clothing/ears/_ears.dm | 7 +- .../clothing/glasses/engine_goggles.dm | 7 +- code/modules/clothing/head/hardhat.dm | 12 +- code/modules/clothing/head/helmet.dm | 11 +- code/modules/clothing/head/misc_special.dm | 9 +- code/modules/clothing/neck/bodycamera.dm | 11 +- code/modules/clothing/shoes/bananashoes.dm | 7 +- code/modules/clothing/spacesuits/hardsuit.dm | 7 +- code/modules/detectivework/scanner.dm | 2 +- code/modules/events/pirates.dm | 7 +- 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 | 5 +- .../food_and_drinks/food/customizables.dm | 5 +- .../food_and_drinks/food/snacks_pastry.dm | 9 +- .../kitchen_machinery/gibber.dm | 11 +- .../kitchen_machinery/griddle.dm | 9 +- .../kitchen_machinery/grill.dm | 13 +- .../kitchen_machinery/microwave.dm | 17 +-- .../food_and_drinks/kitchen_machinery/oven.dm | 12 +- .../kitchen_machinery/smartfridge.dm | 26 ++-- code/modules/food_and_drinks/pizzabox.dm | 33 ++--- code/modules/food_and_drinks/plate.dm | 2 +- code/modules/games/cas.dm | 12 +- code/modules/goals/station_goals/bsa.dm | 2 +- code/modules/goals/station_goals/shield.dm | 5 +- code/modules/holodeck/area_copy.dm | 2 +- code/modules/holodeck/items.dm | 5 +- code/modules/holodeck/turfs.dm | 5 +- .../hydroponics/beekeeping/honeycomb.dm | 7 +- code/modules/hydroponics/biogenerator.dm | 21 ++-- code/modules/hydroponics/fermenting_barrel.dm | 5 +- code/modules/hydroponics/gene_modder.dm | 24 ++-- code/modules/hydroponics/hydroponics.dm | 33 ++--- 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 | 17 +-- code/modules/library/random_books.dm | 6 +- code/modules/library/soapstone.dm | 7 +- code/modules/mapping/mapping_helpers.dm | 2 +- code/modules/mapping/minimap.dm | 5 +- .../modules/mining/equipment/explorer_gear.dm | 5 +- .../mining/equipment/kinetic_crusher.dm | 5 +- .../mining/equipment/marker_beacons.dm | 18 +-- .../mining/equipment/regenerative_core.dm | 9 +- code/modules/mining/equipment/survival_pod.dm | 9 +- code/modules/mining/lavaland/ash_flora.dm | 3 +- .../mining/lavaland/necropolis_chests.dm | 13 +- code/modules/mining/lavaland/world_anvil.dm | 7 +- code/modules/mining/machine_redemption.dm | 3 +- code/modules/mining/machine_vending.dm | 3 +- code/modules/mining/ores_coins.dm | 12 +- .../modules/mob/dead/new_player/new_player.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 4 +- code/modules/mob/living/brain/MMI.dm | 9 +- code/modules/mob/living/brain/death.dm | 2 +- code/modules/mob/living/brain/posibrain.dm | 9 +- code/modules/mob/living/carbon/carbon.dm | 4 +- .../mob/living/carbon/human/human_movement.dm | 2 +- .../human/species_types/shadowpeople.dm | 5 +- .../mob/living/carbon/human/update_icons.dm | 28 ++--- .../modules/mob/living/carbon/update_icons.dm | 10 +- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../silicon/ai/decentralized/ai_data_core.dm | 9 +- .../management/ai_controlpanel.dm | 4 +- .../ai/decentralized/server_cabinet.dm | 11 +- .../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 | 4 +- .../mob/living/simple_animal/bot/atmosbot.dm | 11 +- .../mob/living/simple_animal/bot/bot.dm | 13 +- .../living/simple_animal/bot/construction.dm | 7 +- .../mob/living/simple_animal/bot/ed209bot.dm | 6 +- .../mob/living/simple_animal/bot/firebot.dm | 15 +-- .../mob/living/simple_animal/bot/floorbot.dm | 13 +- .../mob/living/simple_animal/bot/honkbot.dm | 4 +- .../mob/living/simple_animal/bot/medbot.dm | 21 ++-- .../mob/living/simple_animal/bot/mulebot.dm | 17 +-- .../mob/living/simple_animal/bot/secbot.dm | 7 +- .../living/simple_animal/eldritch_demons.dm | 2 +- .../simple_animal/friendly/spiderbot.dm | 9 +- .../living/simple_animal/guardian/guardian.dm | 3 +- .../hostile/megafauna/colossus.dm | 3 +- .../mob/living/simple_animal/hostile/mimic.dm | 8 +- .../mob/living/simple_animal/simple_animal.dm | 4 +- .../computers/item/computer.dm | 17 +-- .../computers/item/computer_components.dm | 2 +- .../computers/item/computer_ui.dm | 6 +- .../computers/item/laptop/laptop.dm | 5 +- .../computers/item/processor.dm | 2 +- .../computers/item/tablet/tablet.dm | 5 +- .../machinery/console/modular_console.dm | 5 +- .../computers/machinery/modular_computer.dm | 9 +- .../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 | 9 +- 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 | 7 +- code/modules/paperwork/clipboard.dm | 11 +- code/modules/paperwork/contract.dm | 5 +- code/modules/paperwork/faxmachine.dm | 2 +- code/modules/paperwork/filingcabinet.dm | 7 +- code/modules/paperwork/folders.dm | 15 +-- code/modules/paperwork/inspector_booth.dm | 5 +- code/modules/paperwork/paper.dm | 15 +-- code/modules/paperwork/paper_bundle.dm | 9 +- code/modules/paperwork/paper_cutter.dm | 13 +- code/modules/paperwork/paperbin.dm | 15 +-- code/modules/paperwork/paperplane.dm | 7 +- code/modules/paperwork/papershredder.dm | 13 +- code/modules/paperwork/pen.dm | 5 +- code/modules/paperwork/photocopier.dm | 4 +- code/modules/paperwork/ticketmachine.dm | 18 +-- code/modules/photography/photos/frame.dm | 16 +-- code/modules/photography/photos/photo.dm | 5 +- code/modules/plumbing/ducts.dm | 13 +- code/modules/power/apc.dm | 67 +++++----- code/modules/power/apc/apc_appearance.dm | 119 ++++++++++++++++++ code/modules/power/cable.dm | 32 ++--- code/modules/power/cell.dm | 26 ++-- code/modules/power/generator.dm | 17 +-- code/modules/power/gravitygenerator.dm | 22 ++-- code/modules/power/lighting.dm | 9 +- code/modules/power/port_gen.dm | 7 +- code/modules/power/power.dm | 2 +- code/modules/power/singularity/collector.dm | 9 +- code/modules/power/singularity/emitter.dm | 11 +- .../power/singularity/field_generator.dm | 13 +- .../particle_accelerator.dm | 5 +- .../particle_accelerator/particle_control.dm | 19 +-- code/modules/power/smes.dm | 21 ++-- code/modules/power/solar.dm | 12 +- .../projectiles/ammunition/_ammunition.dm | 9 +- .../modules/projectiles/ammunition/_firing.dm | 2 +- .../ammunition/reusable/_reusable.dm | 2 +- .../projectiles/ammunition/reusable/arrow.dm | 12 +- .../projectiles/ammunition/reusable/foam.dm | 5 +- .../projectiles/attachments/_attachment.dm | 3 +- .../projectiles/attachments/laser_sight.dm | 2 +- .../modules/projectiles/attachments/scopes.dm | 2 +- .../boxes_magazines/_box_magazine.dm | 17 +-- .../boxes_magazines/external/grenade.dm | 3 +- .../boxes_magazines/external/lmg.dm | 3 +- .../boxes_magazines/external/pistol.dm | 12 +- .../boxes_magazines/external/rechargable.dm | 14 ++- .../boxes_magazines/external/rifle.dm | 15 ++- .../boxes_magazines/external/shotgun.dm | 3 +- .../boxes_magazines/external/smg.dm | 14 ++- .../boxes_magazines/external/sniper.dm | 3 +- .../boxes_magazines/external/toy.dm | 9 +- .../boxes_magazines/internal/_cylinder.dm | 2 +- code/modules/projectiles/gun.dm | 13 +- code/modules/projectiles/guns/ballistic.dm | 43 +++---- .../projectiles/guns/ballistic/automatic.dm | 23 ++-- .../modules/projectiles/guns/ballistic/bow.dm | 26 ++-- .../guns/ballistic/laser_gatling.dm | 7 +- .../projectiles/guns/ballistic/minigun.dm | 7 +- .../projectiles/guns/ballistic/revolver.dm | 4 +- .../projectiles/guns/ballistic/rifle.dm | 5 +- .../projectiles/guns/ballistic/shotgun.dm | 7 +- .../modules/projectiles/guns/ballistic/toy.dm | 12 +- code/modules/projectiles/guns/energy.dm | 12 +- .../projectiles/guns/energy/dueling.dm | 15 ++- .../projectiles/guns/energy/energy_gun.dm | 3 +- .../guns/energy/kinetic_accelerator.dm | 7 +- .../projectiles/guns/energy/special.dm | 12 +- code/modules/projectiles/guns/magic.dm | 5 +- code/modules/projectiles/guns/magic/wand.dm | 5 +- .../projectiles/guns/misc/beam_rifle.dm | 3 +- .../projectiles/guns/misc/blastcannon.dm | 9 +- .../projectiles/guns/misc/syringe_gun.dm | 11 +- code/modules/projectiles/projectile/magic.dm | 6 +- .../projectiles/projectile/reusable/arrow.dm | 2 +- .../chemistry/machinery/chem_dispenser.dm | 13 +- .../chemistry/machinery/chem_heater.dm | 13 +- .../chemistry/machinery/chem_master.dm | 9 +- .../chemistry/machinery/chem_synthesizer.dm | 2 +- .../reagents/chemistry/machinery/pandemic.dm | 17 +-- .../chemistry/machinery/reagentgrinder.dm | 11 +- .../chemistry/machinery/smoke_machine.dm | 11 +- .../reagents/chemistry/recipes/special.dm | 2 +- .../reagents/reagent_containers/blood_pack.dm | 9 +- .../reagents/reagent_containers/borghypo.dm | 3 +- .../reagents/reagent_containers/bottle.dm | 7 +- .../reagents/reagent_containers/dropper.dm | 9 +- .../reagents/reagent_containers/glass.dm | 15 ++- .../reagents/reagent_containers/hypospray.dm | 18 +-- .../reagents/reagent_containers/syringes.dm | 19 +-- code/modules/reagents/reagent_dispenser.dm | 2 +- code/modules/recycling/conveyor2.dm | 18 +-- code/modules/recycling/disposal/bin.dm | 40 +++--- .../recycling/disposal/construction.dm | 11 +- code/modules/religion/religion_structures.dm | 5 +- code/modules/research/destructive_analyzer.dm | 9 +- code/modules/research/experimentor.dm | 5 +- .../research/nanites/nanite_chamber.dm | 7 +- .../nanites/nanite_chamber_computer.dm | 2 +- .../modules/research/nanites/nanite_remote.dm | 9 +- .../research/nanites/public_chamber.dm | 7 +- code/modules/research/server.dm | 9 +- .../security_levels/level_interface.dm | 3 +- .../security_levels/security_levels.dm | 4 +- code/modules/shuttle/emergency.dm | 3 +- 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 | 5 +- code/modules/shuttle/special.dm | 7 +- .../spells/spell_types/self/summonitem.dm | 2 +- code/modules/surgery/anesthesia_machine.dm | 13 +- .../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 | 8 +- code/modules/surgery/organs/augment_legs.dm | 7 +- code/modules/surgery/organs/augments_arms.dm | 7 +- code/modules/surgery/organs/augments_chest.dm | 10 +- code/modules/surgery/organs/autosurgeon.dm | 6 +- code/modules/surgery/organs/heart.dm | 9 +- code/modules/surgery/organs/tongue.dm | 5 +- code/modules/vehicles/motorized_wheelchair.dm | 4 +- code/modules/vehicles/pimpin_ride.dm | 11 +- code/modules/vending/_vending.dm | 5 +- tgui/docs/tutorial-and-examples.md | 4 +- .../controllers/subsystem/bluespace_locker.dm | 4 +- yogstation/code/controllers/subsystem/yogs.dm | 4 +- .../code/game/gamemodes/gangs/dominator.dm | 11 +- .../code/game/gamemodes/gangs/gangtool.dm | 7 +- .../code/game/mecha/makeshift/lockermech.dm | 4 +- yogstation/code/game/objects/items/brace.dm | 5 +- yogstation/code/game/objects/items/crayons.dm | 2 +- .../code/game/objects/items/fishing/rods.dm | 5 +- .../game/objects/items/holotool/holotool.dm | 7 +- .../code/game/objects/items/premadepapers.dm | 48 +++---- .../code/game/objects/items/sharpener.dm | 2 +- yogstation/code/game/objects/items/tools.dm | 8 +- .../code/game/objects/structures/fireaxe.dm | 6 +- .../game/objects/structures/toilet_bong.dm | 5 +- .../darkspawn_objects/umbral_tendrils.dm | 2 +- .../shadowling/shadowling_abilities.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 3 +- yogstation/code/modules/assembly/signaler.dm | 5 +- .../atmospherics/machinery/pipes/bluespace.dm | 4 +- .../code/modules/clothing/head/helmet.dm | 3 +- .../code/modules/clothing/suits/nerd.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 | 9 +- .../hostile/retaliate/king_of_goats.dm | 7 +- .../particle_accelerator/particle_control.dm | 2 +- yogstation/code/modules/power/validhunter.dm | 9 +- .../projectiles/guns/ballistic/launchers.dm | 3 +- .../reagents/reagent_containers/hypospray.dm | 6 +- .../recycling/disposal/pipe_sorting.dm | 5 +- .../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 | 13 +- .../code/modules/xenoarch/loot/gigadrill.dm | 7 +- 637 files changed, 3234 insertions(+), 2482 deletions(-) create mode 100644 code/modules/power/apc/apc_appearance.dm diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 0375106e0f2b..d04a6c5c5a82 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -72,6 +72,22 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter) #define NOTELEPORT (1<<6) +// 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) + /* These defines are used specifically with the atom/pass_flags bitmask the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index b422622ecc75..5e4cf84d785a 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_icon() + update_appearance(UPDATE_ICON) /atom/movable/screen/button_palette/proc/set_hud(datum/hud/our_hud) src.our_hud = our_hud @@ -357,7 +357,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(UPDATE_ICON) if(!usr.client) return diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 7473d74e5e5a..da3c51ca94ba 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_icon() + 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 a2cae8986443..edc7ef4eb90e 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_icon() + 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 85077ac2c398..4e86148f2e24 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_icon() + 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 6ea4b233d5c2..fb71364191b6 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(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 3dcce9b09a83..42d3d79ee228 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(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 a887012f4cb6..2ee4fba344f3 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_icon() + 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 fd3957f27f44..7f5a6fdf20de 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(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 90022ec028f9..9942ddfca996 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(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 3789aff2e3df..f171e2d9f58f 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_icon() + 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 dc801fe89871..df8d610b357b 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(UPDATE_ICON) 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..39b24e8ab827 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -281,9 +281,10 @@ if(.) return robot?.toggle_headlamp() - update_icon() + update_appearance(UPDATE_ICON) -/atom/movable/screen/robot/lamp/update_icon() +/atom/movable/screen/robot/lamp/update_icon(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 bb48dba1daa4..17514001cea6 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -181,7 +181,8 @@ cut_overlay(object_overlays) object_overlays.Cut() -/atom/movable/screen/inventory/update_icon() +/atom/movable/screen/inventory/update_icon(updates=ALL) + . = ..() if(!icon_empty) icon_empty = icon_state @@ -216,7 +217,8 @@ 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_icon(updates=ALL) + . = ..() . = ..() if(!handcuff_overlay) diff --git a/code/_onclick/hud/slime.dm b/code/_onclick/hud/slime.dm index 20b72312db97..a13532b86f38 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(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 c622cefd7656..334c220a0081 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(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_icon() + 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_icon() + 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_icon() + 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_icon() + update_appearance(UPDATE_ICON) apply_focus_overlay() return TRUE @@ -183,7 +183,8 @@ return new /obj/effect/temp_visual/telekinesis(get_turf(focus)) -/obj/item/tk_grab/update_icon() +/obj/item/tk_grab/update_icon(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..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_icon() + 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 b8b3396a129c..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_icon() + C.update_appearance(UPDATE_ICON) /datum/controller/subsystem/mapping/Recover() flags |= SS_NO_INIT diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index ed5e8892ee4a..af60ef44f74b 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -141,7 +141,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(UPDATE_ICON) /datum/controller/subsystem/persistence/proc/CollectData() CollectChiselMessages() diff --git a/code/datums/components/acid.dm b/code/datums/components/acid.dm index 35709d6bb4bc..e870ae19faf0 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(UPDATE_ICON) 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(UPDATE_ICON) 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..83e24af5ce58 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(UPDATE_ICON) 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/grillable.dm b/code/datums/components/grillable.dm index 9ff014753aa7..825ae90383ae 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(UPDATE_ICON) ///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(UPDATE_ICON) /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..8ac3a89c6a90 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(UPDATE_ICON) 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,14 @@ if(!prevent_warning) mob_item_insertion_feedback(usr, M, I) SEND_SIGNAL(parent, COMSIG_STORAGE_INSERTED, I, M) - update_icon() + update_appearance(UPDATE_ICON) return TRUE -/datum/component/storage/concrete/update_icon() +/datum/component/storage/concrete/update_icon(updates=ALL) + . = ..() if(isobj(parent)) var/obj/O = parent - O.update_icon() + O.update_appearance(UPDATE_ICON) for(var/i in slaves) var/datum/component/storage/slave = i - slave.update_icon() + slave.update_appearance(UPDATE_ICON) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 14dbd5abd8d9..4ae6bc76b1bf 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -688,10 +688,11 @@ 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_icon(updates=ALL) + . = ..() if(isobj(parent)) var/obj/O = parent - O.update_icon() + O.update_appearance(UPDATE_ICON) /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..7a701d672bde 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(UPDATE_ICON) 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/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 0f303e307b86..bac014a77627 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -181,7 +181,8 @@ righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' block_chance = 50 -/obj/item/twohanded/bostaff/update_icon() +/obj/item/twohanded/bostaff/update_icon(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 c8d6e3884832..de8d1d06bfd2 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /datum/status_effect/cloudstruck/Destroy() . = ..() diff --git a/code/datums/wires/airalarm.dm b/code/datums/wires/airalarm.dm index f6c166c59676..972a73ca4374 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 09f3a4f5d260..54d1af89ca65 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) 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..b9b61fbaf4a3 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(UPDATE_ICON) 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(UPDATE_ICON) if(WIRE_IDSCAN) if(!mend) A.locked = TRUE diff --git a/code/datums/wires/igniter.dm b/code/datums/wires/igniter.dm index 46f7e28732af..1134ba7f3a5c 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(UPDATE_ICON) if(WIRE_POWER) // Toggle power A.on = !A.on - A.update_icon() + A.update_appearance(UPDATE_ICON) /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(UPDATE_ICON) if(WIRE_SAFETY) // Stop it from being turned on A.on = FALSE A.safety = FALSE - A.update_icon() + A.update_appearance(UPDATE_ICON) diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm index 3c448934b589..3605b1d1f3e9 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(UPDATE_ICON) 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(UPDATE_ICON) /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 c269471969de..72891722b54a 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(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_icon() + F.update_appearance(UPDATE_ICON) for (var/item in GLOB.silicon_mobs) var/mob/living/silicon/aiPlayer = item @@ -524,7 +524,8 @@ 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_icon() +/area/update_icon(updates=ALL) + . = ..() var/weather_icon for(var/V in SSweather.processing) var/datum/weather/W = V @@ -537,7 +538,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) /** * Update the icon of the area (overridden to always be null for space */ -/area/space/update_icon() +/area/space/update_icon(updates=ALL) + . = ..() icon_state = null @@ -577,7 +579,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(UPDATE_ICON) /** * Return the usage of power per channel diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 6e828d26c9bc..920f17854b1a 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -544,8 +544,77 @@ if(!LAZYLEN(.)) // lol ..length return FALSE -/atom/proc/update_icon() - return +/** + * 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) + 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, .) + /** * 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 2a1f65a8f938..91e838b7d6c0 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -308,7 +308,7 @@ Credit where due: H.equip_to_slot_if_possible(PDA, ITEM_SLOT_ID) PDA.update_label() - PDA.update_icon() + PDA.update_appearance(UPDATE_ICON) 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 5101251b0aec..d9a0f3551179 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -4,7 +4,8 @@ icon = 'icons/obj/machines/nuke.dmi' icon_state = "bananiumbomb_base" -/obj/machinery/nuclearbomb/syndicate/bananium/update_icon() +/obj/machinery/nuclearbomb/syndicate/bananium/update_icon(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 0178bbce4697..00530fe4d1e5 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -189,7 +189,7 @@ return //We're done here else B.current_fullness++ - B.update_icon() + B.update_appearance(UPDATE_ICON) 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..8f22fff39f1d 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) S.power_change() diff --git a/code/game/golf/golf.dm b/code/game/golf/golf.dm index 1cd8f3aa189e..df7ed8493e30 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(UPDATE_ICON) 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 d195ef17ae52..dcc43cc9cd73 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -9,7 +9,8 @@ var/list/colorlist = list() -/obj/machinery/pdapainter/update_icon() +/obj/machinery/pdapainter/update_icon(updates=ALL) + . = ..() cut_overlays() if(stat & BROKEN) @@ -61,7 +62,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 +77,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 +92,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 +137,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 b424d63e5818..d02d6285ef82 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -51,7 +51,7 @@ /obj/machinery/sleeper/Initialize(mapload) . = ..() occupant_typecache = GLOB.typecache_living - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/sleeper/RefreshParts() var/E @@ -69,7 +69,8 @@ available_treatments |= treatments[i] stasis = (I >= 4) -/obj/machinery/sleeper/update_icon() +/obj/machinery/sleeper/update_icon(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 23af50b89a50..9af7bc57ec4e 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(UPDATE_ICON) updateUsrDialog() /obj/machinery/proc/dropContents(list/subset = null) @@ -227,7 +227,7 @@ Class Procs: occupant = target target.forceMove(src) updateUsrDialog() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) return TRUE return FALSE @@ -437,7 +437,7 @@ Class Procs: /obj/machinery/handle_atom_del(atom/A) if(A == occupant) occupant = null - update_icon() + update_appearance(UPDATE_ICON) 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..1d01a43d851b 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -17,7 +17,8 @@ . = ..() . += span_notice("It has [uses] uses of foam remaining.") -/obj/machinery/ai_slipper/update_icon() +/obj/machinery/ai_slipper/update_icon(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 f192e398cb1a..b399ab860ef1 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(UPDATE_ICON) if("lock") locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) if("secure_open") locked = FALSE - update_icon() + update_appearance(UPDATE_ICON) sleep(0.2 SECONDS) open(1) locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) if("secure_close") locked = FALSE @@ -45,7 +45,7 @@ locked = TRUE sleep(0.2 SECONDS) - update_icon() + update_appearance(UPDATE_ICON) send_status() @@ -113,7 +113,8 @@ id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER -/obj/machinery/airlock_sensor/update_icon() +/obj/machinery/airlock_sensor/update_icon(updates=ALL) + . = ..() if(on) if(alert) icon_state = "airlock_sensor_alert" @@ -148,7 +149,7 @@ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) - update_icon() + update_appearance(UPDATE_ICON) /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 d3d2639d7a83..7523ff307734 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else vent.on = FALSE - vent.update_icon() + vent.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) return if(istype(W, /obj/item/stack/cable_coil)) @@ -486,14 +486,14 @@ cut_links() shorted = 0 buildstage = 2 - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) /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 8136c6135a7c..c928b1415502 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -30,9 +30,10 @@ GLOBAL_LIST_EMPTY(announcement_systems) . = ..() GLOB.announcement_systems += src radio = new /obj/item/radio/headset/silicon/ai(src) - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/announcement_system/update_icon() +/obj/machinery/announcement_system/update_icon(updates=ALL) + . = ..() cut_overlays() if(is_operational()) var/mutable_appearance/on_app = mutable_appearance(icon, "AAS_on") @@ -60,13 +61,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(UPDATE_ICON) 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(UPDATE_ICON) else return ..() @@ -141,10 +142,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(UPDATE_ICON) if("ArrivalToggle") arrivalToggle = !arrivalToggle - update_icon() + update_appearance(UPDATE_ICON) 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 ce4a02d70946..1132d623f6d0 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -19,7 +19,8 @@ initial_icon_state = initial(icon_state) return ..() -/obj/machinery/aug_manipulator/update_icon() +/obj/machinery/aug_manipulator/update_icon(updates=ALL) + . = ..() cut_overlays() if(stat & BROKEN) @@ -50,7 +51,7 @@ /obj/machinery/aug_manipulator/handle_atom_del(atom/A) if(A == storedpart) storedpart = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/aug_manipulator/attackby(obj/item/O, mob/user, params) if(default_unfasten_wrench(user, O)) @@ -71,7 +72,7 @@ return storedpart = O O.add_fingerprint(user) - update_icon() + update_appearance(UPDATE_ICON) else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) if(obj_integrity < max_integrity) @@ -88,7 +89,7 @@ to_chat(user, span_notice("You repair [src].")) stat &= ~BROKEN obj_integrity = max(obj_integrity, max_integrity) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_notice("[src] does not need repairs.")) else @@ -118,7 +119,7 @@ if(storedpart) storedpart.forceMove(get_turf(src)) storedpart = null - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_notice("[src] is empty.")) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 429e68cf5682..662394bc1061 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(UPDATE_ICON) /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(UPDATE_ICON) 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 3cc9a8f31be6..e4ae95e52be6 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -31,7 +31,8 @@ GLOBAL_LIST_EMPTY(request_list) GLOB.allbountyboards -= src . = ..() -/obj/machinery/bounty_board/update_icon() +/obj/machinery/bounty_board/update_icon(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 52df5d0a383e..73d3b3f7498b 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(UPDATE_ICON) if(!built && !device && device_type) @@ -42,7 +42,8 @@ board.accesses = req_one_access -/obj/machinery/button/update_icon() +/obj/machinery/button/update_icon(updates=ALL) + . = ..() cut_overlays() if(panel_open) icon_state = "button-open" @@ -61,7 +62,7 @@ if(W.tool_behaviour == TOOL_SCREWDRIVER) if(panel_open || allowed(user)) default_deconstruction_screwdriver(user, "button-open", "[skin]",W) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_danger("Maintenance Access Denied")) flick("[skin]-denied", src) @@ -118,7 +119,7 @@ to_chat(user, span_notice("You wipe the button's ID.")) id = null - update_icon() + update_appearance(UPDATE_ICON) return if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON)) @@ -167,7 +168,7 @@ req_access = list() req_one_access = list() board = null - update_icon() + update_appearance(UPDATE_ICON) to_chat(user, span_notice("You remove electronics from the button frame.")) else diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 4961d1dc4754..1c278a55e234 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(UPDATE_ICON) /obj/machinery/camera/Destroy() if(can_use()) @@ -147,14 +147,14 @@ return if(!(. & EMP_PROTECT_SELF)) if(prob(150/severity)) - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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_icon(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(mapload) if you remove this. + update_appearance(UPDATE_ICON) //update Initialize(mapload) 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..87bd1edddc15 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -67,13 +67,14 @@ if(building) setDir(ndir) -/obj/structure/camera_assembly/update_icon() +/obj/structure/camera_assembly/update_icon(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(UPDATE_ICON) 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 +110,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(UPDATE_ICON) else if(I == emp_module) emp_module = null @@ -174,7 +175,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(UPDATE_ICON) 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 41dbd102f53f..4dace11731fa 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(UPDATE_ICON) /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(UPDATE_ICON) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 7bd231e9afb9..fcb631e4587f 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -13,7 +13,8 @@ var/chargelevel = -1 var/charge_rate = 250 -/obj/machinery/cell_charger/update_icon() +/obj/machinery/cell_charger/update_icon(updates=ALL) + . = ..() cut_overlays() if(charging) add_overlay(image(charging.icon, charging.icon_state)) @@ -61,7 +62,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(UPDATE_ICON) else if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W)) return @@ -81,10 +82,10 @@ return ..() /obj/machinery/cell_charger/proc/removecell() - charging.update_icon() + charging.update_appearance(UPDATE_ICON) charging = null chargelevel = -1 - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/cell_charger/attack_hand(mob/user) . = ..() @@ -141,4 +142,4 @@ use_power(charge_rate * delta_time) charging.give(charge_rate * delta_time) //this is 2558, efficient batteries exist - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 3bc95103097b..bf8621f5ef17 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(UPDATE_ICON) 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(UPDATE_ICON) 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..b3d7094dc4cb 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/machinery/computer/narsie_act() if(clockwork && clockwork != initial(clockwork)) //if it's clockwork but isn't normally clockwork @@ -52,9 +52,10 @@ icon_screen = initial(icon_screen) icon_keyboard = initial(icon_keyboard) icon_state = initial(icon_state) - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/computer/update_icon() +/obj/machinery/computer/update_icon(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..ae650ce99584 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -75,9 +75,10 @@ var/oldstat = occupier.stat restoring = Fix() if(oldstat != occupier.stat) - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/computer/aifixer/update_icon() +/obj/machinery/computer/aifixer/update_icon(updates=ALL) + . = ..() ..() if(stat & (NOPOWER|BROKEN)) return @@ -108,7 +109,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(UPDATE_ICON) else //Uploading AI from terminal to card if(occupier && !restoring) @@ -117,7 +118,7 @@ occupier.forceMove(card) card.AI = occupier occupier = null - update_icon() + update_appearance(UPDATE_ICON) 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..9150858e5757 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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 b5ca55cbf96c..fe8e5f123194 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -83,7 +83,8 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( return INITIALIZE_HINT_QDEL Reset() -/obj/machinery/computer/arcade/update_icon() +/obj/machinery/computer/arcade/update_icon(updates=ALL) + . = ..() if(dir == 2) icon_screen = "invaders" else @@ -141,7 +142,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( return prizevend(user) T.pay_tickets() - T.update_icon() + T.update_appearance(UPDATE_ICON) 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 fb4283d89c4f..f302a1a9ab59 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(UPDATE_ICON) /obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency) SSradio.remove_object(src, receive_frequency) @@ -74,14 +74,15 @@ priority_alarms += zone else if (severity == "minor") minor_alarms += zone - update_icon() + update_appearance(UPDATE_ICON) return -/obj/machinery/computer/atmos_alert/update_icon() +/obj/machinery/computer/atmos_alert/update_icon(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 451b4f03a7a9..ae1bacc53438 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -42,7 +42,8 @@ name = "incinerator chamber gas sensor" id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR -/obj/machinery/air_sensor/update_icon() +/obj/machinery/air_sensor/update_icon(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 b88a5b396976..6ef0348ea21f 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -260,7 +260,8 @@ clockwork = TRUE //it'd look very weird light_power = 0 -/obj/machinery/computer/security/telescreen/update_icon() +/obj/machinery/computer/security/telescreen/update_icon(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..cf7ed783af0b 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(UPDATE_ICON) src.printing = null src.add_fingerprint(usr) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index caa218a0c869..9af8a6cfab08 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(UPDATE_ICON) printing = FALSE if("print_poster") diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 8f06417778a1..49125f2bbdff 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -74,7 +74,8 @@ L -= I return !cleared -/obj/machinery/computer/station_alert/update_icon() +/obj/machinery/computer/station_alert/update_icon(updates=ALL) + . = ..() ..() if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index f0900240f1d7..ab4d425e3192 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) . = 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(UPDATE_ICON) if(target_station.teleporter_console) target_station.teleporter_console.stat &= ~NOPOWER - target_station.teleporter_console.update_icon() + target_station.teleporter_console.update_appearance(UPDATE_ICON) /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 d6b03e1198de..b8112fb735e7 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(UPDATE_ICON) 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 8078a7c1986d..4e41d093a45d 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -80,7 +80,8 @@ return return ..() -/obj/machinery/jukebox/update_icon() +/obj/machinery/jukebox/update_icon(updates=ALL) + . = ..() if(active) icon_state = "[initial(icon_state)]-active" else @@ -174,7 +175,7 @@ /obj/machinery/jukebox/proc/activate_music() active = TRUE - update_icon() + update_appearance(UPDATE_ICON) START_PROCESSING(SSobj, src) var/sound/song_played = sound(selection.song_path) var/list/close = range(10,src) @@ -465,7 +466,7 @@ STOP_PROCESSING(SSobj, src) dance_over() playsound(src,'sound/machines/terminal_off.ogg',50,TRUE) - update_icon() + update_appearance(UPDATE_ICON) stop = world.time + 100 /obj/machinery/jukebox/disco/process() diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index 7e858278f3cc..8d06a634d8e7 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -35,9 +35,10 @@ . = ..() decon = new(list(src), FALSE) decon_emagged = new(list(src), FALSE) - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/decontamination_unit/update_icon() +/obj/machinery/decontamination_unit/update_icon(updates=ALL) + . = ..() . = ..() icon_state = uv? "tube_on" : (state_open? "tube_open" : "tube") @@ -52,7 +53,7 @@ open_machine() dump_mob() playsound(src, 'sound/machines/decon/decon-open.ogg', 50, TRUE) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/decontamination_unit/proc/dump_mob() var/turf/T = get_turf(src) @@ -97,7 +98,7 @@ uv_cycles-- uv = TRUE locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) if(uv_emagged) radiation_pulse(src, 500, 5) decon_emagged.start() @@ -309,7 +310,7 @@ return FALSE visible_message(span_notice("[user] inserts [I] into [src]."), span_notice("You load [I] into [src].")) - update_icon() + update_appearance(UPDATE_ICON) return if(!state_open && !uv) @@ -441,7 +442,7 @@ dispense(O, usr) desired-- return TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/decontamination_unit/proc/load(obj/item/O) if(ismob(O.loc)) @@ -489,4 +490,4 @@ if(!user.canUseTopic(src, !issilicon(user)) || state_open) return locked = !locked - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index 500389f6e5e5..ece2e8774a76 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -36,9 +36,10 @@ 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(UPDATE_ICON) -/obj/machinery/defibrillator_mount/update_icon() +/obj/machinery/defibrillator_mount/update_icon(updates=ALL) + . = ..() cut_overlays() if(defib) add_overlay("defib") @@ -76,7 +77,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(UPDATE_ICON) return else if(defib && I == defib.paddles) defib.paddles.snap_back() @@ -89,7 +90,7 @@ return clamps_locked = !clamps_locked to_chat(user, span_notice("Clamps [clamps_locked ? "" : "dis"]engaged.")) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("Insufficient access.")) return @@ -111,7 +112,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(UPDATE_ICON) return TRUE /obj/machinery/defibrillator_mount/AltClick(mob/living/carbon/user) @@ -130,7 +131,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(UPDATE_ICON) //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 1e410913b7cd..7e8cc521ae0c 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(UPDATE_ICON) 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..ff787276b660 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_icon(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(UPDATE_ICON)//..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 a85a6d3dbddc..fdbd50f1c5c2 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -214,7 +214,7 @@ welded = TRUE if(24 to 30) panel_open = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/proc/rebuild_parts() if(part_overlays) @@ -371,7 +371,7 @@ return emergency = !emergency - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/lock() bolt() @@ -382,7 +382,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(UPDATE_ICON) /obj/machinery/door/airlock/unlock() unbolt() @@ -393,7 +393,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(UPDATE_ICON) /obj/machinery/door/airlock/narsie_act() var/turf/T = get_turf(src) @@ -456,7 +456,7 @@ /obj/machinery/door/airlock/handle_atom_del(atom/A) if(A == note) note = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/Bumped(atom/movable/AM) if(operating || (obj_flags & EMAGGED)) @@ -530,7 +530,7 @@ /obj/machinery/door/airlock/proc/regainMainPower() if(secondsMainPowerLost > 0) secondsMainPowerLost = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/proc/handlePowerRestore() var/cont = TRUE @@ -551,7 +551,7 @@ cont = TRUE spawnPowerRestoreRunning = FALSE updateDialog() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/proc/loseMainPower() if(secondsMainPowerLost <= 0) @@ -561,7 +561,7 @@ if(!spawnPowerRestoreRunning) spawnPowerRestoreRunning = TRUE INVOKE_ASYNC(src, PROC_REF(handlePowerRestore)) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/proc/loseBackupPower() if(secondsBackupPowerLost < 60) @@ -569,12 +569,12 @@ if(!spawnPowerRestoreRunning) spawnPowerRestoreRunning = TRUE INVOKE_ASYNC(src, PROC_REF(handlePowerRestore)) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/proc/regainBackupPower() if(secondsBackupPowerLost > 0) secondsBackupPowerLost = 0 - update_icon() + update_appearance(UPDATE_ICON) // shock user with probability prb (if all connections & power are working) // returns TRUE if shocked, FALSE otherwise @@ -975,7 +975,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(UPDATE_ICON) return else if(istype(C, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/S = C @@ -991,7 +991,7 @@ security_level = AIRLOCK_SECURITY_PLASTEEL modify_max_integrity(normal_integrity * AIRLOCK_INTEGRITY_MULTIPLIER) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R - update_icon() + update_appearance(UPDATE_ICON) return if(AIRLOCK_SECURITY_METAL) if(C.tool_behaviour == TOOL_WELDER) @@ -1006,7 +1006,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(UPDATE_ICON) return if(AIRLOCK_SECURITY_PLASTEEL_I_S) if(C.tool_behaviour == TOOL_CROWBAR) @@ -1023,7 +1023,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(UPDATE_ICON) return if(AIRLOCK_SECURITY_PLASTEEL_I) if(C.tool_behaviour == TOOL_WELDER) @@ -1083,13 +1083,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(UPDATE_ICON) 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(UPDATE_ICON) else if(is_wire_tool(C) && panel_open) attempt_wire_interaction(user) return @@ -1115,7 +1115,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(UPDATE_ICON) user.transferItemToLoc(C, src, TRUE) charge = C else if(istype(C,/obj/item/electronics/airlock)) @@ -1141,7 +1141,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(UPDATE_ICON) else if(istype(C, /obj/item/brace)) //yogs apply_brace(C, user) //yogs else if(istype(C, /obj/item/umbral_tendrils)) @@ -1218,7 +1218,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(UPDATE_ICON) else if(obj_integrity < max_integrity) if(!W.tool_start_check(user, amount=0)) @@ -1231,7 +1231,7 @@ stat &= ~BROKEN user.visible_message("[user.name] has repaired [src].", \ span_notice("You finish repairing the airlock.")) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_notice("The airlock doesn't need repairing.")) @@ -1494,7 +1494,7 @@ assemblytype = initial(airlock.assemblytype) anim_parts = initial(airlock.anim_parts) rebuild_parts() - update_icon() + update_appearance(UPDATE_ICON) /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) @@ -1581,7 +1581,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(UPDATE_ICON) /obj/machinery/door/airlock/deconstruct(disassembled = TRUE, mob/user) @@ -1599,7 +1599,7 @@ A.created_name = name A.previous_assembly = previous_airlock A.update_name() - A.update_icon() + A.update_appearance(UPDATE_ICON) if(!disassembled) if(A) @@ -1703,14 +1703,14 @@ if("disrupt-main") if(!secondsMainPowerLost) loseMainPower() - update_icon() + update_appearance(UPDATE_ICON) else to_chat(usr, "Main power is already offline.") . = TRUE if("disrupt-backup") if(!secondsBackupPowerLost) loseBackupPower() - update_icon() + update_appearance(UPDATE_ICON) else to_chat(usr, "Backup power is already offline.") . = TRUE @@ -1737,7 +1737,7 @@ . = TRUE if("light-toggle") lights = !lights - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("safe-toggle") safe = !safe @@ -1798,7 +1798,7 @@ if(!user_allowed(user)) return emergency = !emergency - update_icon() + update_appearance(UPDATE_ICON) /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 aaf51356776c..5c5dbb706619 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(UPDATE_ICON) DA.update_name() qdel(src) @@ -501,7 +501,7 @@ name = "airlock" desc = "It opens and closes." stealthy = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/door/airlock/cult/proc/reveal() icon = initial(icon) @@ -509,7 +509,7 @@ name = initial(name) desc = initial(desc) stealthy = initial(stealthy) - update_icon() + update_appearance(UPDATE_ICON) /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 4aa7e893bfac..a12c9c52c7e6 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(UPDATE_ICON) /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(UPDATE_ICON) // 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(UPDATE_ICON) 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(UPDATE_ICON) var/datum/data/record/R = find_record("name", desired_name, GLOB.data_core.security) if(R) R.fields["criminal"] = WANTED_DISCHARGED @@ -190,7 +190,7 @@ if(C.opened) continue C.locked = FALSE - C.update_icon() + C.update_appearance(UPDATE_ICON) desired_crime = null desired_name = null @@ -314,7 +314,8 @@ // 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_icon(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 85a2e91e470f..6dbb75f60b31 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -294,7 +294,8 @@ /obj/machinery/door/proc/unelectrify() secondsElectrified = MACHINE_NOT_ELECTRIFIED -/obj/machinery/door/update_icon() +/obj/machinery/door/update_icon(updates=ALL) + . = ..() if(density) icon_state = "door1" else @@ -329,7 +330,7 @@ density = FALSE sleep(open_speed) layer = initial(layer) - update_icon() + update_appearance(UPDATE_ICON) set_opacity(0) operating = FALSE air_update_turf(1) @@ -360,7 +361,7 @@ sleep(open_speed) density = TRUE sleep(open_speed) - update_icon() + update_appearance(UPDATE_ICON) 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 511d85a947c4..a3815f66cd9b 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -157,7 +157,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(UPDATE_ICON) /obj/machinery/door/firedoor/try_to_crowbar(obj/item/I, mob/user) if(welded || operating) @@ -215,7 +215,8 @@ if("closing") flick("door_closing", src) -/obj/machinery/door/firedoor/update_icon() +/obj/machinery/door/firedoor/update_icon(updates=ALL) + . = ..() cut_overlays() if(density) icon_state = "door_closed" @@ -294,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(UPDATE_ICON) qdel(src) @@ -472,7 +473,8 @@ 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_icon(updates=ALL) + . = ..() ..() icon_state = "frame[constructionStep]" @@ -503,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(UPDATE_ICON) 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 @@ -574,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(UPDATE_ICON) return if(C.tool_behaviour == TOOL_CROWBAR) C.play_tool_sound(src) @@ -588,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(UPDATE_ICON) return if(CONSTRUCTION_GUTTED) if(C.tool_behaviour == TOOL_CROWBAR) @@ -602,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(UPDATE_ICON) return if(istype(C, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/B = C @@ -620,7 +622,7 @@ playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1) B.use(5) constructionStep = CONSTRUCTION_WIRES_EXPOSED - update_icon() + update_appearance(UPDATE_ICON) return if(CONSTRUCTION_NOCIRCUIT) if(C.tool_behaviour == TOOL_WELDER) @@ -653,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(UPDATE_ICON) return if(istype(C, /obj/item/electroadaptive_pseudocircuit)) var/obj/item/electroadaptive_pseudocircuit/P = C @@ -662,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(UPDATE_ICON) return return ..() @@ -677,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(UPDATE_ICON) return TRUE return FALSE diff --git a/code/game/machinery/doors/passworddoor.dm b/code/game/machinery/doors/passworddoor.dm index ee8a4ec57627..54b3b3d4dacd 100644 --- a/code/game/machinery/doors/passworddoor.dm +++ b/code/game/machinery/doors/passworddoor.dm @@ -42,7 +42,8 @@ else do_animate("deny") -/obj/machinery/door/password/update_icon() +/obj/machinery/door/password/update_icon(updates=ALL) + . = ..() if(density) icon_state = "closed" else @@ -70,4 +71,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..9965fa29e7b6 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -89,7 +89,8 @@ flick("closing", src) playsound(src, 'sound/machines/blastdoor.ogg', 30, 1) -/obj/machinery/door/poddoor/update_icon() +/obj/machinery/door/poddoor/update_icon(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 5a85886a7616..fcaa2fe9f0e5 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -45,7 +45,8 @@ electronics = null return ..() -/obj/machinery/door/window/update_icon() +/obj/machinery/door/window/update_icon(updates=ALL) + . = ..() if(density) icon_state = base_state else @@ -261,7 +262,7 @@ WA.state= "02" WA.setDir(dir) WA.ini_dir = dir - WA.update_icon() + WA.update_appearance(UPDATE_ICON) 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 3047bcf6a838..f1cd200f232b 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -81,7 +81,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays) return FALSE return ..() -/obj/machinery/doppler_array/update_icon() +/obj/machinery/doppler_array/update_icon(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 671516ebfb73..6077da46a9fc 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(UPDATE_ICON) if(DRONE_PRODUCTION) materials.use_materials(using_materials) @@ -152,7 +152,7 @@ mode = DRONE_RECHARGING timer = world.time + cooldownTime - update_icon() + update_appearance(UPDATE_ICON) if(DRONE_RECHARGING) if(recharge_sound) @@ -161,7 +161,7 @@ visible_message(span_notice("[src] [recharge_message]")) mode = DRONE_READY - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/droneDispenser/proc/count_shells() . = 0 @@ -169,7 +169,8 @@ if(istype(a, dispense_type)) .++ -/obj/machinery/droneDispenser/update_icon() +/obj/machinery/droneDispenser/update_icon(updates=ALL) + . = ..() if(stat & (BROKEN|NOPOWER)) icon_state = icon_off else if(mode == DRONE_RECHARGING) @@ -207,7 +208,7 @@ stat &= ~BROKEN obj_integrity = max_integrity - update_icon() + update_appearance(UPDATE_ICON) else return ..() diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index 5a71154aecbc..0f2ce774db9e 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(UPDATE_ICON) /obj/machinery/electrolyzer/Destroy() if(cell) @@ -54,7 +54,8 @@ else . += "There is no power cell installed." -/obj/machinery/electrolyzer/update_icon() +/obj/machinery/electrolyzer/update_icon(updates=ALL) + . = ..() cut_overlays() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" if(panel_open) @@ -65,26 +66,26 @@ on = FALSE if(!on) active_power_usage = 0 - update_icon() + update_appearance(UPDATE_ICON) return PROCESS_KILL if((stat & NOPOWER) && (!cell || cell.charge <= 0)) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) return FALSE var/turf/L = loc if(!istype(L)) if(mode != ELECTROLYZER_MODE_STANDBY) mode = ELECTROLYZER_MODE_STANDBY - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) if(mode == ELECTROLYZER_MODE_STANDBY) return @@ -114,7 +115,7 @@ if (!cell.use((5 * proportion) / (efficiency + workingPower))) //automatically turn off machine when cell depletes on = FALSE - update_icon() + update_appearance(UPDATE_ICON) working = FALSE else active_power_usage = (5 * proportion) / (efficiency + workingPower) @@ -167,7 +168,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(UPDATE_ICON) return if(default_deconstruction_crowbar(I)) return @@ -200,7 +201,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(UPDATE_ICON) 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 2a19b4055e65..0ce9f901b360 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(UPDATE_ICON) if(door.density) if(!controller.exteriorAirlock || !controller.interiorAirlock) controller.onlyOpen(door) @@ -82,9 +82,10 @@ /obj/machinery/doorButtons/access_button/proc/not_busy() busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/doorButtons/access_button/update_icon() +/obj/machinery/doorButtons/access_button/update_icon(updates=ALL) + . = ..() if(stat & NOPOWER) icon_state = "access_button_off" else @@ -148,7 +149,7 @@ /obj/machinery/doorButtons/airlock_controller/proc/onlyOpen(obj/machinery/door/airlock/A) if(A) busy = CLOSING - update_icon() + update_appearance(UPDATE_ICON) openDoor(A) /obj/machinery/doorButtons/airlock_controller/proc/onlyClose(obj/machinery/door/airlock/A) @@ -160,7 +161,7 @@ if(A.density) goIdle() return FALSE - update_icon() + update_appearance(UPDATE_ICON) 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 +180,7 @@ if(exteriorAirlock.density == interiorAirlock.density || !A.density) return busy = CYCLE - update_icon() + update_appearance(UPDATE_ICON) if(A == interiorAirlock) if(closeDoor(exteriorAirlock)) busy = CYCLE_INTERIOR @@ -217,7 +218,7 @@ lostPower = FALSE busy = FALSE if(update) - update_icon() + update_appearance(UPDATE_ICON) updateUsrDialog() /obj/machinery/doorButtons/airlock_controller/process() @@ -243,7 +244,8 @@ else if(A.id_tag == idExterior) exteriorAirlock = A -/obj/machinery/doorButtons/airlock_controller/update_icon() +/obj/machinery/doorButtons/airlock_controller/update_icon(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..80adb9aaa755 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -255,7 +255,8 @@ new_prog.master = src program = new_prog -/obj/machinery/embedded_controller/radio/airlock_controller/update_icon() +/obj/machinery/embedded_controller/radio/airlock_controller/update_icon(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 e923b8a2f7e5..08d2f19ee8b9 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_icon(updates=ALL) /obj/machinery/embedded_controller/proc/return_text() @@ -58,7 +58,7 @@ if(program) program.process(delta_time) - update_icon() + update_appearance(UPDATE_ICON) 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..75548575886a 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -54,7 +54,8 @@ 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_icon(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 2f77b31a8209..17f01f8c84fc 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -30,7 +30,7 @@ /obj/machinery/fat_sucker/Initialize(mapload) . = ..() soundloop = new(list(src), FALSE) - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) /obj/machinery/fat_sucker/open_machine(mob/user) make_meat() @@ -106,7 +106,8 @@ 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_icon(updates=ALL) + . = ..() overlays.Cut() if(!state_open) if(processing) @@ -158,7 +159,7 @@ if(C.nutrition > start_at) processing = TRUE soundloop.start() - update_icon() + update_appearance(UPDATE_ICON) set_light(2, 1, "#ff0000") else say("Subject not fat enough.") @@ -195,7 +196,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(UPDATE_ICON) return return FALSE diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 303562183071..14610658e278 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(UPDATE_ICON) myarea = get_area(src) LAZYADD(myarea.firealarms, src) @@ -52,7 +52,8 @@ LAZYREMOVE(myarea.firealarms, src) return ..() -/obj/machinery/firealarm/update_icon() +/obj/machinery/firealarm/update_icon(updates=ALL) + . = ..() cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) @@ -109,7 +110,7 @@ if(obj_flags & EMAGGED) return obj_flags |= EMAGGED - update_icon() + 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.")) @@ -161,7 +162,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(UPDATE_ICON) return if(panel_open) @@ -194,7 +195,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(UPDATE_ICON) return else if(W.force) //hit and turn it on @@ -213,7 +214,7 @@ coil.use(5) buildstage = 2 to_chat(user, span_notice("You wire \the [src].")) - update_icon() + update_appearance(UPDATE_ICON) return else if(W.tool_behaviour == TOOL_CROWBAR) @@ -228,14 +229,14 @@ to_chat(user, span_notice("You pry out the circuit.")) new /obj/item/electronics/firealarm(user.loc) buildstage = 0 - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) return else if(istype(W, /obj/item/electroadaptive_pseudocircuit)) @@ -245,7 +246,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(UPDATE_ICON) return else if(W.tool_behaviour == TOOL_WRENCH) @@ -271,7 +272,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(UPDATE_ICON) return TRUE return FALSE @@ -310,10 +311,10 @@ return // do nothing if we're already active if(fire) set_light(l_power = 0.8) - update_icon() + update_appearance(UPDATE_ICON) else set_light(l_power = 0) - update_icon() + update_appearance(UPDATE_ICON) /* * Return of the Return of the Party button diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 425f1ce08590..7e8f72ae4244 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -46,7 +46,8 @@ return FALSE return ..() -/obj/machinery/flasher/update_icon() +/obj/machinery/flasher/update_icon(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 cfa0ccdcedb4..da1fc55e151c 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(UPDATE_ICON) /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(UPDATE_ICON) return if(default_deconstruction_crowbar(I)) @@ -94,7 +94,8 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( return ..() -/obj/machinery/gulag_processor/update_icon() +/obj/machinery/gulag_processor/update_icon(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 7291c8ea0d93..3220300426d1 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(UPDATE_ICON) return if(default_deconstruction_crowbar(I)) @@ -64,7 +64,8 @@ The console is located at computer/gulag_teleporter.dm return ..() -/obj/machinery/gulag_teleporter/update_icon() +/obj/machinery/gulag_teleporter/update_icon(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 8ded6b016160..f8ac55315e11 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(UPDATE_ICON) 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 1e1e6157e2f5..fb91ed1c25d7 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -399,7 +399,7 @@ obj/machinery/holopad/secure/Initialize(mapload) playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring! ringing = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/holopad/proc/activate_holo(mob/living/user) var/mob/living/silicon/ai/AI = user @@ -467,9 +467,10 @@ 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(UPDATE_ICON) -/obj/machinery/holopad/update_icon() +/obj/machinery/holopad/update_icon(updates=ALL) + . = ..() var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls) if(ringing) icon_state = "holopad_ringing" diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 70b15d62e138..8d381e2b4752 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -14,9 +14,10 @@ lit = FALSE else lit = !lit - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/holosign/update_icon() +/obj/machinery/holosign/update_icon(updates=ALL) + . = ..() if(!lit) icon_state = initial(icon_state) set_light(0) @@ -27,7 +28,7 @@ /obj/machinery/holosign/power_change() if(!is_operational()) lit = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/holosign/surgery name = "surgery holosign" diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 8ffe8f0b9eaa..e214ad3a6254 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(UPDATE_ICON) /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(UPDATE_ICON) return if (src.on && !(stat & NOPOWER)) var/turf/location = src.loc @@ -69,7 +69,8 @@ wires = new /datum/wires/igniter(src) icon_state = "igniter[on]" -/obj/machinery/igniter/update_icon() +/obj/machinery/igniter/update_icon(updates=ALL) + . = ..() if(stat & NOPOWER) icon_state = "igniter0" else @@ -101,7 +102,8 @@ QDEL_NULL(spark_system) return ..() -/obj/machinery/sparker/update_icon() +/obj/machinery/sparker/update_icon(updates=ALL) + . = ..() if(disable) icon_state = "[initial(icon_state)]-d" else if(powered()) @@ -122,7 +124,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(UPDATE_ICON) else return ..() diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 4985dcf70aea..3ac9af7afed1 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -18,14 +18,15 @@ /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(updates=ALL) + . = ..() if(attached) if(mode) icon_state = "injecting" @@ -75,7 +76,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 +90,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 +106,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 +126,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 +140,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 +157,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 +168,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 +189,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 +204,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) . = ..() @@ -248,7 +249,7 @@ . = ..() beaker = new /obj/item/reagent_containers/glass/saline(src) -/obj/machinery/iv_drip/saline/update_icon() +/obj/machinery/iv_drip/saline/update_icon(updates=ALL) return /obj/machinery/iv_drip/saline/eject_beaker() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 1e4f95bdba62..abef6031bb9a 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -25,9 +25,10 @@ if(!name) name = "light switch ([area.name])" - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/light_switch/update_icon() +/obj/machinery/light_switch/update_icon(updates=ALL) + . = ..() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) if(!(stat & NOPOWER)) if(area.lightswitch) @@ -47,10 +48,10 @@ . = ..() area.lightswitch = !area.lightswitch - area.update_icon() + area.update_appearance(UPDATE_ICON) for(var/obj/machinery/light_switch/L in area) - L.update_icon() + L.update_appearance(UPDATE_ICON) area.power_change() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index f0e96fda4894..4c12ac77c90a 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -46,10 +46,11 @@ // update the invisibility and icon /obj/machinery/magnetic_module/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(UPDATE_ICON) // update the icon_state -/obj/machinery/magnetic_module/update_icon() +/obj/machinery/magnetic_module/update_icon(updates=ALL) + . = ..() var/state="floor_magnet" var/onstate="" if(!on) @@ -161,7 +162,7 @@ else use_power = NO_POWER_USE - update_icon() + update_appearance(UPDATE_ICON) /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 ab55420206f1..ab8abc026d10 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -70,7 +70,8 @@ scan_active_4 = FALSE return -/obj/machinery/medical_kiosk/update_icon() +/obj/machinery/medical_kiosk/update_icon(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 22b4e48f2560..cecc67b290a9 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -72,10 +72,11 @@ // hide the object if turf is intact /obj/machinery/navbeacon/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() + update_appearance(UPDATE_ICON) // update the icon_state -/obj/machinery/navbeacon/update_icon() +/obj/machinery/navbeacon/update_icon(updates=ALL) + . = ..() var/state="navbeacon[open]" if(invisibility) @@ -94,7 +95,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(UPDATE_ICON) else if(I.GetID()) if(open) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 1e49c5f35e0f..9f78a19cff83 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(UPDATE_ICON) /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(UPDATE_ICON) /datum/newscaster/feed_network/proc/save_photo(icon/photo) var/photo_file = copytext_char(md5("\icon[photo]"), 1, 6) @@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(allCasters) GLOB.allCasters += src unit_no = GLOB.allCasters.len - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/newscaster/Destroy() GLOB.allCasters -= src @@ -226,7 +226,8 @@ GLOBAL_LIST_EMPTY(allCasters) picture = null return ..() -/obj/machinery/newscaster/update_icon() +/obj/machinery/newscaster/update_icon(updates=ALL) + . = ..() cut_overlays() if(stat & (NOPOWER|BROKEN)) icon_state = "newscaster_off" @@ -250,7 +251,7 @@ GLOBAL_LIST_EMPTY(allCasters) /obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/newscaster/ui_interact(mob/user) . = ..() @@ -732,7 +733,7 @@ GLOBAL_LIST_EMPTY(allCasters) to_chat(user, span_notice("You repair [src].")) obj_integrity = max_integrity stat &= ~BROKEN - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_notice("[src] does not need repairs.")) else @@ -827,13 +828,13 @@ GLOBAL_LIST_EMPTY(allCasters) /obj/machinery/newscaster/proc/remove_alert() alert = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/newscaster/proc/newsAlert(channel) if(channel) say("Breaking news from [channel]!") alert = TRUE - update_icon() + update_appearance(UPDATE_ICON) 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..2fbde8399a12 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(UPDATE_ICON) 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 3b8aa2b67cb1..25234acde09f 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -81,7 +81,7 @@ . = ..() if(!base) base = src - update_icon() + update_appearance(UPDATE_ICON) //Sets up a spark system spark_system = new /datum/effect_system/spark_spread spark_system.set_up(5, 0, src) @@ -97,7 +97,8 @@ if(!has_cover) INVOKE_ASYNC(src, PROC_REF(popUp)) -/obj/machinery/porta_turret/update_icon() +/obj/machinery/porta_turret/update_icon(updates=ALL) + . = ..() cut_overlays() if(!anchored) icon_state = "turretCover" @@ -143,7 +144,7 @@ if(gun_properties["reqpower"]) reqpower = gun_properties["reqpower"] - update_icon() + update_appearance(UPDATE_ICON) return gun_properties /obj/machinery/porta_turret/Destroy() @@ -220,7 +221,7 @@ /obj/machinery/porta_turret/power_change() . = ..() if(!anchored || (stat & BROKEN) || !powered()) - update_icon() + update_appearance(UPDATE_ICON) remove_control() /obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params) @@ -250,7 +251,7 @@ if(!anchored && !isinspace()) setAnchored(TRUE) invisibility = INVISIBILITY_MAXIMUM - update_icon() + update_appearance(UPDATE_ICON) 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 +287,7 @@ obj_flags |= EMAGGED controllock = TRUE on = FALSE //turns off the turret temporarily - update_icon() + update_appearance(UPDATE_ICON) 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 +462,7 @@ cover.icon_state = "turretCover" raised = 0 invisibility = 2 - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp) var/threatcount = 0 //the integer returned @@ -541,7 +542,7 @@ T = closer break - update_icon() + update_appearance(UPDATE_ICON) var/obj/item/projectile/A //any emagged turrets drains 2x power and uses a different projectile? if(mode == TURRET_STUN) @@ -935,9 +936,10 @@ /obj/machinery/turretid/proc/updateTurrets() for (var/obj/machinery/porta_turret/aTurret in turrets) aTurret.setState(enabled, lethal) - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/turretid/update_icon() +/obj/machinery/turretid/update_icon(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..fcfdad3df641 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(UPDATE_ICON) 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(UPDATE_ICON) qdel(src) else if(I.GetID()) diff --git a/code/game/machinery/prisonlabor.dm b/code/game/machinery/prisonlabor.dm index e74a55019e2f..a42674fb4d4a 100644 --- a/code/game/machinery/prisonlabor.dm +++ b/code/game/machinery/prisonlabor.dm @@ -9,7 +9,8 @@ var/obj/item/stack/license_plates/empty/current_plate var/pressing = FALSE -/obj/machinery/plate_press/update_icon() +/obj/machinery/plate_press/update_icon(updates=ALL) + . = ..() . = ..() if(!is_operational()) icon_state = "offline" @@ -35,7 +36,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(UPDATE_ICON) else return ..() @@ -48,12 +49,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(UPDATE_ICON) to_chat(user, "You start pressing a new license plate!") if(!do_after(user, 4 SECONDS, src)) pressing = FALSE - update_icon() + update_appearance(UPDATE_ICON) return FALSE use_power(100) @@ -61,6 +62,6 @@ pressing = FALSE QDEL_NULL(current_plate) - update_icon() + update_appearance(UPDATE_ICON) 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..c30851531cb4 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) return else if(charging) - charging.update_icon() + charging.update_appearance(UPDATE_ICON) charging.forceMove(drop_location()) setCharging(null) return PROCESS_KILL @@ -175,7 +175,7 @@ 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. +/obj/machinery/recharger/update_icon(updates=ALL) //we have an update_appearance(UPDATE_ICON) in addition to the stuff in process to make it feel a tiny bit snappier. cut_overlays() if(charging) var/mutable_appearance/scan = mutable_appearance(icon, "[initial(icon_state)]filled") diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index b67e6fcde40a..7f8ef2aece14 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -16,7 +16,7 @@ /obj/machinery/recharge_station/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/recharge_station/RefreshParts() recharge_speed = 0 @@ -88,7 +88,8 @@ 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_icon(updates=ALL) + . = ..() if(is_operational()) if(state_open) icon_state = "borgcharger0" @@ -107,7 +108,7 @@ /obj/machinery/recharge_station/fullupgrade/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) 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 12b2b5d2398b..5267227997e0 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,11 +67,12 @@ obj_flags |= EMAGGED if(safety_mode) safety_mode = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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(updates=ALL) + . = ..() ..() var/is_powered = !(stat & (BROKEN|NOPOWER)) if(safety_mode) @@ -160,13 +161,13 @@ /obj/machinery/recycler/proc/emergency_stop() playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE) safety_mode = TRUE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/machinery/recycler/proc/crush_living(mob/living/L) @@ -184,7 +185,7 @@ if(!bloody && !issilicon(L)) bloody = TRUE - update_icon() + update_appearance(UPDATE_ICON) // 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 97d232260848..41cd612a416e 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -69,7 +69,8 @@ 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_icon(updates=ALL) + . = ..() if(stat & NOPOWER) set_light(0) else @@ -174,10 +175,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(UPDATE_ICON) newmessagepriority = REQ_NO_NEW_MESSAGE - update_icon() + update_appearance(UPDATE_ICON) var/messageComposite = "" for(var/msg in messages) // This puts more recent messages at the *top*, where they belong. messageComposite = "
[msg]
" + messageComposite @@ -288,7 +289,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(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(clear_emergency)), 5 MINUTES) if(href_list["send"] && message && to_department && priority) @@ -351,7 +352,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) /obj/machinery/requests_console/proc/clear_emergency() emergency = null - update_icon() + update_appearance(UPDATE_ICON) //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 +375,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(UPDATE_ICON) 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(UPDATE_ICON) if(REQ_EXTREME_MESSAGE_PRIORITY) header = "[span_bad("!!!Extreme Priority!!!")]
[header]" @@ -389,7 +390,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(UPDATE_ICON) messages += "[header][sending]" @@ -409,7 +410,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(UPDATE_ICON) return if(O.tool_behaviour == TOOL_SCREWDRIVER) if(open) @@ -418,7 +419,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(UPDATE_ICON) 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 0e512e199cb6..8410e13f00b6 100644 --- a/code/game/machinery/sci_bombardment.dm +++ b/code/game/machinery/sci_bombardment.dm @@ -53,13 +53,14 @@ break radio = new /obj/item/radio/(src) radio.frequency = radio_freq - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/sci_bombardment/Destroy() QDEL_NULL(radio) return ..() -/obj/machinery/sci_bombardment/update_icon() +/obj/machinery/sci_bombardment/update_icon(updates=ALL) + . = ..() cut_overlays() if(!powered(power_channel)) add_overlay("LAM_radar0") @@ -80,7 +81,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(UPDATE_ICON) else to_chat(usr, span_warning("There is already a transfer valve loaded in the firing mechanism!")) else @@ -132,7 +133,7 @@ targetdest = initial(dest) tcoords = initial(tcoords) scibomb = initial(scibomb) - update_icon() + update_appearance(UPDATE_ICON) . = TRUE /** @@ -144,7 +145,7 @@ */ /obj/machinery/sci_bombardment/proc/reset_lam() target_delay = !target_delay - update_icon() + update_appearance(UPDATE_ICON) if(target_delay) spawn(100) reset_lam() @@ -202,7 +203,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(UPDATE_ICON) . = TRUE if("count")//Prompts user to change countdown timer (Minimum based on mincount) if(locked) @@ -222,7 +223,7 @@ to_chat(usr, span_notice("[scibomb] is ejected from the loading chamber.")) scibomb.forceMove(drop_location()) scibomb = null - update_icon() + update_appearance(UPDATE_ICON) . = 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 0935ae2d7828..f01647435f57 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) else if(W.tool_behaviour == TOOL_WRENCH) if(locked) @@ -203,7 +203,8 @@ 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_icon(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 ae39ff35f466..438eb61614ed 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -65,7 +65,8 @@ money += round(delta_time / 2) //SPESSH MAJICKS -/obj/machinery/computer/slot_machine/update_icon() +/obj/machinery/computer/slot_machine/update_icon(updates=ALL) + . = ..() if(stat & NOPOWER) icon_state = "slots0" @@ -205,7 +206,7 @@ working = 1 toggle_reel_spin(1) - update_icon() + update_appearance(UPDATE_ICON) updateDialog() spawn(0) @@ -218,7 +219,7 @@ toggle_reel_spin(0, REEL_DEACTIVATE_DELAY) working = 0 give_prizes(the_name, user) - update_icon() + update_appearance(UPDATE_ICON) 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 d6d8b435ca83..97aa6d149e5c 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -32,13 +32,13 @@ /obj/machinery/space_heater/Initialize(mapload) . = ..() cell = new(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/space_heater/on_construction() qdel(cell) cell = null panel_open = TRUE - update_icon() + update_appearance(UPDATE_ICON) return ..() /obj/machinery/space_heater/on_deconstruction() @@ -57,7 +57,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "sheater-[on ? "[mode]" : "off"]" cut_overlays() @@ -69,19 +70,19 @@ if (on) // If it's broken, turn it off too on = FALSE active_power_usage = 0 - update_icon() + update_appearance(UPDATE_ICON) return PROCESS_KILL if((stat & NOPOWER) && (!cell || cell.charge <= 0)) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) return PROCESS_KILL var/turf/L = loc if(!istype(L)) if(mode != HEATER_MODE_STANDBY) mode = HEATER_MODE_STANDBY - update_icon() + update_appearance(UPDATE_ICON) return var/datum/gas_mixture/env = L.return_air() @@ -94,7 +95,7 @@ if(mode != newMode) mode = newMode - update_icon() + update_appearance(UPDATE_ICON) if(mode == HEATER_MODE_STANDBY) return @@ -119,7 +120,7 @@ if (!cell.use(requiredEnergy / efficiency)) //automatically turn off machine when cell depletes on = FALSE - update_icon() + update_appearance(UPDATE_ICON) working = FALSE else active_power_usage = requiredEnergy / efficiency @@ -180,7 +181,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(UPDATE_ICON) else if(default_deconstruction_crowbar(I)) return else @@ -262,7 +263,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(UPDATE_ICON) if (on) START_PROCESSING(SSmachines, src) diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index d60265b3bfef..fab87f1e154f 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -97,7 +97,7 @@ stasis_can_toggle = world.time + stasis_cooldown playsound(src, 'sound/machines/click.ogg', 60, TRUE) play_power_sound() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/stasis/Exited(atom/movable/AM, atom/newloc) if(AM == occupant) @@ -109,7 +109,8 @@ /obj/machinery/stasis/proc/stasis_running() return stasis_enabled && is_operational() -/obj/machinery/stasis/update_icon() +/obj/machinery/stasis/update_icon(updates=ALL) + . = ..() . = ..() var/_running = stasis_running() var/list/overlays_to_remove = managed_vis_overlays @@ -166,13 +167,13 @@ occupant = L if(stasis_running() && check_nap_violations()) chill_out(L) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/stasis/post_unbuckle_mob(mob/living/L) thaw_them(L) if(L == occupant) occupant = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/stasis/process() if( !( occupant && isliving(occupant) && check_nap_violations() ) ) @@ -189,7 +190,7 @@ /obj/machinery/stasis/screwdriver_act(mob/living/user, obj/item/I) . = default_deconstruction_screwdriver(user, "stasis_maintenance", "stasis", I) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/stasis/wrench_act(mob/living/user, obj/item/I) if(default_change_direction_wrench(user, I)) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 5754b48ec1f5..10edade5b42c 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(UPDATE_ICON) /obj/machinery/suit_storage_unit/Destroy() QDEL_NULL(suit) @@ -144,7 +144,8 @@ QDEL_NULL(storage) return ..() -/obj/machinery/suit_storage_unit/update_icon() +/obj/machinery/suit_storage_unit/update_icon(updates=ALL) + . = ..() cut_overlays() if(uv) @@ -173,7 +174,7 @@ if(!is_operational() && state_open) open_machine() dump_contents() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/suit_storage_unit/proc/dump_contents() dropContents() @@ -222,7 +223,7 @@ uv_cycles-- uv = TRUE locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) if(occupant) if(uv_super) mob_occupant.adjustFireLoss(rand(20, 36)) @@ -365,7 +366,7 @@ storage = I visible_message(span_notice("[user] inserts [I] into [src]."), span_notice("You load [I] into [src].")) - update_icon() + update_appearance(UPDATE_ICON) return if(panel_open && is_wire_tool(I)) @@ -472,7 +473,7 @@ if(I) I.forceMove(loc) . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/suit_storage_unit/AltClick(mob/user) if(!user.canUseTopic(src, !issilicon(user))) @@ -496,4 +497,4 @@ if(!user.canUseTopic(src, !issilicon(user)) || state_open) return locked = !locked - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index ba80fbf25317..b7c1a0c3eb0b 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(UPDATE_ICON) try_detonate(TRUE) /obj/machinery/syndicatebomb/Initialize(mapload) @@ -89,7 +89,7 @@ wires = new /datum/wires/syndicatebomb(src) if(payload) payload = new payload(src) - update_icon() + update_appearance(UPDATE_ICON) countdown = new(src) STOP_PROCESSING(SSfastprocess, src) @@ -103,7 +103,8 @@ . = ..() . += {"A digital display on it reads "[seconds_remaining()]"."} -/obj/machinery/syndicatebomb/update_icon() +/obj/machinery/syndicatebomb/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" /obj/machinery/syndicatebomb/proc/seconds_remaining() @@ -133,7 +134,7 @@ else if(I.tool_behaviour == TOOL_SCREWDRIVER) open_panel = !open_panel - update_icon() + update_appearance(UPDATE_ICON) to_chat(user, span_notice("You [open_panel ? "open" : "close"] the wire panel.")) else if(is_wire_tool(I) && open_panel) @@ -203,7 +204,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(UPDATE_ICON) add_fingerprint(user) if(payload && !istype(payload, /obj/item/bombcore/training)) @@ -313,7 +314,7 @@ holder.delayedbig = FALSE holder.delayedlittle = FALSE holder.explode_now = FALSE - holder.update_icon() + holder.update_appearance(UPDATE_ICON) 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..77068e1f460c 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(UPDATE_ICON) 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(UPDATE_ICON) 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..11594fd2a263 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_icon(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 a67deadf7a2c..adbf5f9531a6 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(UPDATE_ICON) 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(UPDATE_ICON) return ..() return ..() @@ -53,7 +53,8 @@ new /obj/effect/decal/cleanable/oil(loc) return ..() -/obj/machinery/blackbox_recorder/update_icon() +/obj/machinery/blackbox_recorder/update_icon(updates=ALL) + . = ..() . = ..() if(!stored) icon_state = "blackbox_b" @@ -157,7 +158,8 @@ 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_icon(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..1777f32b66db 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -120,7 +120,8 @@ GLOBAL_LIST_EMPTY(telecomms_list) T.links |= src -/obj/machinery/telecomms/update_icon() +/obj/machinery/telecomms/update_icon(updates=ALL) + . = ..() cut_overlays() if(on) var/mutable_appearance/on_overlay @@ -177,7 +178,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) update_power() // Update the icon - update_icon() + update_appearance(UPDATE_ICON) update_speed() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 71b2b2629471..1d44550334e0 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(UPDATE_ICON) return if(default_deconstruction_crowbar(W)) return @@ -87,7 +87,8 @@ calibrated = 0 return -/obj/machinery/teleport/hub/update_icon() +/obj/machinery/teleport/hub/update_icon(updates=ALL) + . = ..() if(panel_open) icon_state = "tele-o" else if(is_ready()) @@ -154,7 +155,7 @@ /obj/machinery/teleport/station/Destroy() if(teleporter_hub) teleporter_hub.power_station = null - teleporter_hub.update_icon() + teleporter_hub.update_appearance(UPDATE_ICON) teleporter_hub = null if (teleporter_console) teleporter_console.power_station = null @@ -179,7 +180,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(UPDATE_ICON) return else if(default_deconstruction_crowbar(W)) @@ -209,15 +210,16 @@ else to_chat(user, span_alert("No target detected.")) engaged = FALSE - teleporter_hub.update_icon() + teleporter_hub.update_appearance(UPDATE_ICON) add_fingerprint(user) /obj/machinery/teleport/station/power_change() . = ..() if(teleporter_hub) - teleporter_hub.update_icon() + teleporter_hub.update_appearance(UPDATE_ICON) -/obj/machinery/teleport/station/update_icon() +/obj/machinery/teleport/station/update_icon(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 59e95d83ffff..6445347cc9c2 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -34,7 +34,8 @@ QDEL_NULL(countdown) . = ..() -/obj/machinery/transformer/update_icon() +/obj/machinery/transformer/update_icon(updates=ALL) + . = ..() ..() if(stat & (BROKEN|NOPOWER) || cooldown == 1) icon_state = "separator-AO0" @@ -66,7 +67,7 @@ /obj/machinery/transformer/process() if(cooldown && (cooldown_timer <= world.time)) cooldown = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H) if(stat & (BROKEN|NOPOWER)) @@ -81,7 +82,7 @@ // Activate the cooldown cooldown = 1 cooldown_timer = world.time + cooldown_duration - update_icon() + update_appearance(UPDATE_ICON) 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..b26b1dacce4d 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(UPDATE_ICON) 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(UPDATE_ICON) . = 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(UPDATE_ICON) /obj/item/proc/dye_item(dye_color) if(undyeable) @@ -258,7 +258,8 @@ GLOBAL_LIST_INIT(dye_registry, list( add_fingerprint(user) open_machine() -/obj/machinery/washing_machine/update_icon() +/obj/machinery/washing_machine/update_icon(updates=ALL) + . = ..() cut_overlays() if(busy) icon_state = "wm_running_[bloody_mess]" @@ -275,7 +276,7 @@ GLOBAL_LIST_INIT(dye_registry, list( return if(default_deconstruction_screwdriver(user, null, null, W)) - update_icon() + update_appearance(UPDATE_ICON) return else if(user.a_intent != INTENT_HARM) @@ -298,7 +299,7 @@ GLOBAL_LIST_INIT(dye_registry, list( if(W.dye_color) color_source = W - update_icon() + update_appearance(UPDATE_ICON) else return ..() @@ -318,14 +319,14 @@ GLOBAL_LIST_INIT(dye_registry, list( if(state_open) if(iscorgi(L)) L.forceMove(src) - update_icon() + update_appearance(UPDATE_ICON) return if(!state_open) open_machine() else state_open = FALSE //close the door - update_icon() + update_appearance(UPDATE_ICON) /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 e79736180bee..27d1f9cb077e 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(UPDATE_ICON) break else mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) - mechsyringe.update_icon() + mechsyringe.update_appearance(UPDATE_ICON) 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 ff2540a446b2..5015322867d2 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -496,13 +496,13 @@ var/obj/structure/cable/NC = new(new_turf, "red") NC.d1 = 0 NC.d2 = fdirn - NC.update_icon() + NC.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) PN = last_piece.powernet if(!PN) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 6856bf252b10..53d381035fc8 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -58,17 +58,17 @@ if(!recharging_mech) recharging_mech = locate(/obj/mecha) in recharging_turf if(recharging_mech) - recharge_console.update_icon() + recharge_console.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) if(recharging_mech.loc != recharging_turf) recharging_mech = null - recharge_console.update_icon() + recharge_console.update_appearance(UPDATE_ICON) /obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user, params) @@ -105,7 +105,7 @@ if("reconnect") reconnect() . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/computer/mech_bay_power_console/ui_data(mob/user) var/list/data = list() @@ -138,7 +138,8 @@ else recharge_port = null -/obj/machinery/computer/mech_bay_power_console/update_icon() +/obj/machinery/computer/mech_bay_power_console/update_icon(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 2dd6d04dc012..145e489702b1 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -170,7 +170,8 @@ diag_hud_set_mechcell() diag_hud_set_mechstat() -/obj/mecha/update_icon() +/obj/mecha/update_icon(updates=ALL) + . = ..() if (silicon_pilot && silicon_icon_state) icon_state = silicon_icon_state . = ..() @@ -914,7 +915,7 @@ occupant = AI silicon_pilot = TRUE icon_state = initial(icon_state) - update_icon() + update_appearance(UPDATE_ICON) playsound(src, 'sound/machines/windowdoor.ogg', 50, 1) if(!internal_damage) SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50)) @@ -1097,7 +1098,7 @@ brainmob.update_mobility() brainmob.update_mouse_pointer() icon_state = initial(icon_state) - update_icon() + update_appearance(UPDATE_ICON) 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 @@ -1190,7 +1191,7 @@ L.forceMove(mmi) L.reset_perspective() mmi.mecha = null - mmi.update_icon() + mmi.update_appearance(UPDATE_ICON) 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 281768bcb5ed..a1f25d5e1826 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -33,13 +33,14 @@ /obj/mecha/working/ripley/go_out() ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H) ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/mecha/working/ripley/update_icon() +/obj/mecha/working/ripley/update_icon(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 cc8431e6b7da..4c0c8eb5cb25 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -101,7 +101,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(UPDATE_ICON) 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 a2201e36b820..ea10fd0cf923 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -210,7 +210,7 @@ shoe_types |= S.type if (!(entered_dirs & H.dir)) entered_dirs |= H.dir - update_icon() + update_appearance(UPDATE_ICON) /obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O) ..() @@ -222,10 +222,11 @@ shoe_types |= S.type if (!(exited_dirs & H.dir)) exited_dirs |= H.dir - update_icon() + update_appearance(UPDATE_ICON) -/obj/effect/decal/cleanable/blood/footprints/update_icon() +/obj/effect/decal/cleanable/blood/footprints/update_icon(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 ceb1508bdc9e..b08830ac1bee 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 @@ -400,7 +400,7 @@ for(var/obj/machinery/atmospherics/components/unary/comp in location) if(!comp.welded) comp.welded = TRUE - comp.update_icon() + comp.update_appearance(UPDATE_ICON) 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..86444e15915b 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(UPDATE_ICON) comp.visible_message(span_danger("[comp] is frozen shut!")) // Extinguishes everything in the turf diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index ef4a9eda4c6c..40bd2405fda6 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(UPDATE_ICON) 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 575a9938b457..53c64b8f0a78 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(UPDATE_ICON) /obj/effect/temp_visual/bsa_splash name = "\improper Bluespace energy wave" @@ -183,7 +183,8 @@ if(EAST) icon_state = "beam_splash_e" -/obj/item/projectile/curse_hand/update_icon() +/obj/item/projectile/curse_hand/update_icon(updates=ALL) + . = ..() icon_state = "[icon_state][handedness]" /obj/effect/temp_visual/wizard @@ -534,9 +535,10 @@ delay -= 11 icon_state = "rcd_end_reverse" else - update_icon() + update_appearance(UPDATE_ICON) -/obj/effect/constructing_effect/update_icon() +/obj/effect/constructing_effect/update_icon(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 51da17397150..6e424f8525a3 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(UPDATE_ICON) //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(UPDATE_ICON) return TRUE else if(silo_mats.on_hold()) @@ -736,7 +736,8 @@ RLD explosion(src, 0, 0, 3, 1, flame_range = 1) qdel(src) -/obj/item/construction/rcd/update_icon() +/obj/item/construction/rcd/update_icon(updates=ALL) + . = ..() ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) @@ -745,7 +746,7 @@ RLD /obj/item/construction/rcd/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/construction/rcd/borg no_ammo_message = span_warning("Insufficient charge.") @@ -875,7 +876,8 @@ RLD else ..() -/obj/item/construction/rld/update_icon() +/obj/item/construction/rld/update_icon(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 431d6ed997d4..a40f5f1bf14f 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -42,7 +42,7 @@ loaded.amount += transfer_amount else return - update_icon() + update_appearance(UPDATE_ICON) 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 +74,7 @@ loaded.forceMove(get_turf(user)) loaded = null - update_icon() + update_appearance(UPDATE_ICON) else ..() @@ -90,7 +90,8 @@ QDEL_NULL(wiring_gui_menu) return ..() -/obj/item/twohanded/rcl/update_icon() +/obj/item/twohanded/rcl/update_icon(updates=ALL) + . = ..() if(!loaded) icon_state = "rcl-0" item_state = "rcl-0" @@ -110,7 +111,7 @@ item_state = "rcl-0" /obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1) - update_icon() + update_appearance(UPDATE_ICON) if(!loaded || !loaded.amount) if(loud) to_chat(user, span_notice("The last of the cables unreel from [src].")) @@ -193,7 +194,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) //searches the current tile for a stub cable of the same colour @@ -286,11 +287,11 @@ loaded = new() loaded.max_amount = max_amount loaded.amount = max_amount - update_icon() + update_appearance(UPDATE_ICON) /obj/item/twohanded/rcl/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/twohanded/rcl/ui_action_click(mob/user, action) if(istype(action, /datum/action/item_action/rcl_col)) @@ -315,7 +316,8 @@ name = "makeshift rapid cable layer" ghetto = TRUE -/obj/item/twohanded/rcl/ghetto/update_icon() +/obj/item/twohanded/rcl/ghetto/update_icon(updates=ALL) + . = ..() if(!loaded) icon_state = "rclg-0" item_state = "rclg-0" diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 2c15f37f7aca..7ba11e540493 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(UPDATE_ICON) 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..9b2d4eb4a708 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -5,7 +5,8 @@ icon_state = "ashtray" var/max_butts = 10 -/obj/item/ashtray/update_icon() +/obj/item/ashtray/update_icon(updates=ALL) + . = ..() ..() overlays.Cut() if(contents.len == max_butts) @@ -32,7 +33,7 @@ if(user.transferItemToLoc(W, src)) visible_message(span_notice("[user] places [W] in [src].")) - update_icon() + update_appearance(UPDATE_ICON) return ..() @@ -42,5 +43,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(UPDATE_ICON) return ..() diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index eda41ee6e58b..4946fe32939b 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(UPDATE_ICON) 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 a4192a0ccc97..9e30789111b3 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(updates=ALL) + . = ..() 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) /obj/item/candle/proc/put_out_candle() if(!lit) return lit = FALSE - update_icon() + update_appearance(UPDATE_ICON) set_light_on(FALSE) return TRUE @@ -75,7 +76,7 @@ else new /obj/item/trash/candle(loc) qdel(src) - update_icon() + update_appearance(UPDATE_ICON) open_flame() /obj/item/candle/attack_self(mob/user) @@ -99,7 +100,8 @@ wax = 2000 candle_type = "resin" -/obj/item/candle/resin/update_icon() +/obj/item/candle/resin/update_icon(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 ef5817c0b0da..0197ac2b0fff 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -38,9 +38,10 @@ /obj/item/card/data/Initialize(mapload) .=..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/card/data/update_icon() +/obj/item/card/data/update_icon(updates=ALL) + . = ..() cut_overlays() if(detail_color == COLOR_FLOORTILE_GRAY) return @@ -614,7 +615,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(UPDATE_ICON) //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) @@ -622,7 +623,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(UPDATE_ICON) 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 6a966ba8fb84..38cc17bfee92 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -65,7 +65,8 @@ TED = new(src.loc) return INITIALIZE_HINT_QDEL -/obj/item/gun/energy/chrono_gun/update_icon() +/obj/item/gun/energy/chrono_gun/update_icon(updates=ALL) + . = ..() return /obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) @@ -192,7 +193,7 @@ cached_icon.Insert(mob_icon, "frame[i]") mob_underlay = mutable_appearance(cached_icon, "frame1") - update_icon() + update_appearance(UPDATE_ICON) desc = initial(desc) + "
[span_info("It appears to contain [target.name].")]" START_PROCESSING(SSobj, src) @@ -203,7 +204,8 @@ gun.field_disconnect(src) return ..() -/obj/structure/chrono_field/update_icon() +/obj/structure/chrono_field/update_icon(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 +234,7 @@ captured.Unconscious(80) if(captured.loc != src) captured.forceMove(src) - update_icon() + update_appearance(UPDATE_ICON) 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 49b113d4b35e..18a0b8e8ae08 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(UPDATE_ICON) /obj/item/match/proc/matchburnout() if(lit) @@ -571,7 +571,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM . = ..() if(!overlay_state) overlay_state = pick(overlay_list) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/lighter/cyborg_unequip(mob/user) if(!lit) @@ -587,7 +587,8 @@ 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_icon(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 +615,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(UPDATE_ICON) /obj/item/lighter/extinguish() set_lit(FALSE) @@ -719,9 +720,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM . = ..() if(!lighter_color) lighter_color = pick(color_list) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/lighter/greyscale/update_icon() +/obj/item/lighter/greyscale/update_icon(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 db9f88b54758..f3ae6e3a40cf 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(UPDATE_ICON) qdel(src) /obj/item/bikehorn/Initialize(mapload) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 0cc21547a31f..13867edb9cb2 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(UPDATE_ICON) /obj/item/toy/crayon/proc/staticDrawables() @@ -262,7 +262,7 @@ . = TRUE paint_mode = PAINT_NORMAL drawtype = "a" - update_icon() + update_appearance(UPDATE_ICON) /obj/item/toy/crayon/proc/crayon_text_strip(text) var/static/regex/crayon_r = new /regex(@"[^\w!?,.=%#&+\/\-]") @@ -548,9 +548,10 @@ 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(UPDATE_ICON) -/obj/item/storage/crayons/update_icon() +/obj/item/storage/crayons/update_icon(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 +616,7 @@ playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) if(can_change_colour) paint_color = "#C0C0C0" - update_icon() + update_appearance(UPDATE_ICON) if(actually_paints) H.lip_style = "spray_face" H.lip_color = paint_color @@ -634,7 +635,7 @@ paint_color = pick("#DA0000","#FF9300","#FFF200","#A8E61D","#00B7EF", "#DA00FF") refill() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/toy/crayon/spraycan/examine(mob/user) @@ -702,7 +703,8 @@ . = ..() -/obj/item/toy/crayon/spraycan/update_icon() +/obj/item/toy/crayon/spraycan/update_icon(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..a06718e09df1 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(UPDATE_ICON) /obj/item/holochip/examine(mob/user) . = ..() @@ -22,7 +22,8 @@ /obj/item/holochip/get_item_credit_value() return credits -/obj/item/holochip/update_icon() +/obj/item/holochip/update_icon(updates=ALL) + . = ..() name = "\improper [credits] credit holochip" var/rounded_credits = credits switch(credits) @@ -65,7 +66,7 @@ credits -= amount if(credits == 0) qdel(src) - update_icon() + update_appearance(UPDATE_ICON) return amount else if(pay_anyway) qdel(src) @@ -79,7 +80,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(UPDATE_ICON) 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 46ffad89b726..6147d62e25a6 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -30,14 +30,14 @@ /obj/item/defibrillator/Initialize(mapload) //starts without a cell for rnd . = ..() paddles = make_paddles() - update_icon() + update_appearance(UPDATE_ICON) return /obj/item/defibrillator/loaded/Initialize(mapload) //starts with hicap . = ..() paddles = make_paddles() cell = new(src) - update_icon() + update_appearance(UPDATE_ICON) return /obj/item/defibrillator/fire_act(exposed_temperature, exposed_volume) @@ -50,7 +50,8 @@ if(paddles?.loc == src) paddles.extinguish() -/obj/item/defibrillator/update_icon() +/obj/item/defibrillator/update_icon(updates=ALL) + . = ..() update_power() update_overlays() update_charge() @@ -65,6 +66,7 @@ powered = FALSE /obj/item/defibrillator/proc/update_overlays() + . = ..() cut_overlays() if(!on) add_overlay("[initial(icon_state)]-paddles") @@ -85,7 +87,7 @@ /obj/item/defibrillator/CheckParts(list/parts_list) ..() cell = locate(/obj/item/stock_parts/cell) in contents - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/ui_action_click() toggle_paddles() @@ -133,15 +135,15 @@ return cell = W to_chat(user, span_notice("You install a cell in [src].")) - update_icon() + update_appearance(UPDATE_ICON) else if(W.tool_behaviour == TOOL_SCREWDRIVER) if(cell) - cell.update_icon() + cell.update_appearance(UPDATE_ICON) cell.forceMove(get_turf(src)) cell = null to_chat(user, span_notice("You remove the cell from [src].")) - update_icon() + update_appearance(UPDATE_ICON) else return ..() @@ -169,7 +171,7 @@ else visible_message(span_notice("[src] buzzes: Surge detected!")) playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/proc/toggle_paddles() set name = "Toggle Paddles" @@ -182,14 +184,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(UPDATE_ICON) return else //Remove from their hands and back onto the defib unit paddles.unwield() remove_paddles(user) - update_icon() + update_appearance(UPDATE_ICON) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -201,7 +203,7 @@ ..() if((slot_flags == ITEM_SLOT_BACK && slot != ITEM_SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != ITEM_SLOT_BELT)) remove_paddles(user) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/item_action_slot_check(slot, mob/user) if(slot == user.getBackSlot()) @@ -219,18 +221,18 @@ remove_paddles(M) QDEL_NULL(paddles) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/proc/deductcharge(chrgdeductamt) if(cell) if(cell.charge < (paddles.revivecost+chrgdeductamt)) powered = FALSE - update_icon() + update_appearance(UPDATE_ICON) if(cell.use(chrgdeductamt)) - update_icon() + update_appearance(UPDATE_ICON) return TRUE else - update_icon() + update_appearance(UPDATE_ICON) return FALSE /obj/item/defibrillator/proc/cooldowncheck(mob/user) @@ -243,8 +245,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(UPDATE_ICON) + update_appearance(UPDATE_ICON) /obj/item/defibrillator/compact name = "compact defibrillator" @@ -263,7 +265,7 @@ . = ..() paddles = make_paddles() cell = new(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/compact/combat name = "combat defibrillator" @@ -275,13 +277,13 @@ . = ..() paddles = make_paddles() cell = new /obj/item/stock_parts/cell/infinite(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params) if(W == paddles) paddles.unwield() toggle_paddles() - update_icon() + update_appearance(UPDATE_ICON) return //paddles @@ -346,13 +348,13 @@ if(req_defib || !time) return cooldown = TRUE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/twohanded/shockpaddles/New(mainunit) ..() @@ -360,9 +362,10 @@ defib = mainunit forceMove(defib) busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/twohanded/shockpaddles/update_icon() +/obj/item/twohanded/shockpaddles/update_icon(updates=ALL) + . = ..() icon_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]" if(cooldown) @@ -397,7 +400,7 @@ return defib.on = FALSE forceMove(defib) - defib.update_icon() + defib.update_appearance(UPDATE_ICON) /obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O) if(!req_defib) @@ -491,7 +494,7 @@ defib.deductcharge(revivecost) cooldown = TRUE busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) if(req_defib) defib.cooldowncheck(user) else @@ -505,7 +508,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(UPDATE_ICON) 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 +521,13 @@ if(do_after(user, 3 SECONDS, H)) //Takes longer due to overcharging if(!H) busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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 +547,18 @@ defib.deductcharge(revivecost) cooldown = TRUE busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) if(!req_defib) recharge(6 SECONDS) if(req_defib && (defib.cooldowncheck(user))) return busy = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) 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 +576,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(UPDATE_ICON) return if(H.stat == DEAD) H.visible_message(span_warning("[H]'s body convulses a bit.")) @@ -640,7 +643,7 @@ if(req_defib) defib.deductcharge(revivecost) cooldown = 1 - update_icon() + update_appearance(UPDATE_ICON) if(req_defib) defib.cooldowncheck(user) else @@ -660,7 +663,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(UPDATE_ICON) /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 33f9eeb9899e..219fe8d1b084 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(UPDATE_ICON) /obj/item/pda/Destroy() GLOB.PDAs -= src @@ -197,7 +197,8 @@ GLOBAL_LIST_EMPTY(PDAs) return TRUE return FALSE -/obj/item/pda/update_icon() +/obj/item/pda/update_icon(updates=ALL) + . = ..() cut_overlays() var/mutable_appearance/overlay = new() overlay.pixel_x = overlays_x_offset @@ -349,7 +350,7 @@ GLOBAL_LIST_EMPTY(PDAs) if (pai) if(pai.loc != src) pai = null - update_icon() + update_appearance(UPDATE_ICON) else dat += "
  • pAI Device Configuration
  • " dat += "
  • Eject pAI Device
  • " @@ -529,7 +530,7 @@ GLOBAL_LIST_EMPTY(PDAs) scanmode = PDA_SCANNER_NONE cartridge.host_pda = null cartridge = null - update_icon() + update_appearance(UPDATE_ICON) //MENU FUNCTIONS=================================== @@ -722,7 +723,7 @@ GLOBAL_LIST_EMPTY(PDAs) //EXTRA FUNCTIONS=================================== if (mode == 2 || mode == 21)//To clear message overlays. - update_icon() + update_appearance(UPDATE_ICON) if ((honkamt > 0) && (prob(60)))//For clown virus. honkamt-- @@ -753,7 +754,7 @@ GLOBAL_LIST_EMPTY(PDAs) . = id id = null - update_icon() + update_appearance(UPDATE_ICON) if(ishuman(loc)) var/mob/living/carbon/human/H = loc @@ -856,7 +857,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(UPDATE_ICON) add_overlay(icon_alert) /obj/item/pda/proc/receive_ping(message) @@ -949,7 +950,7 @@ GLOBAL_LIST_EMPTY(PDAs) set_light_on(FALSE) else if(light_range) set_light_on(TRUE) - update_icon() + update_appearance(UPDATE_ICON) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -962,7 +963,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(UPDATE_ICON) else to_chat(usr, span_warning("This PDA does not have a pen in it!")) @@ -981,7 +982,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(!user.transferItemToLoc(I, src)) return FALSE insert_id(I, user) - update_icon() + update_appearance(UPDATE_ICON) return TRUE @@ -1007,7 +1008,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(UPDATE_ICON) else if(istype(C, /obj/item/card/id)) var/obj/item/card/id/idcard = C @@ -1033,7 +1034,7 @@ GLOBAL_LIST_EMPTY(PDAs) return pai = C to_chat(user, span_notice("You slot \the [C] into [src].")) - update_icon() + update_appearance(UPDATE_ICON) updateUsrDialog() else if(is_type_in_list(C, contained_item)) //Checks if there is a pen if(inserted_item) @@ -1043,7 +1044,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(UPDATE_ICON) 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..de7373a868ba 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -38,9 +38,10 @@ 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(UPDATE_ICON) //Whatever happened, update the card's state (icon, name) to match. -/obj/item/aicard/update_icon() +/obj/item/aicard/update_icon(updates=ALL) + . = ..() cut_overlays() if(AI) name = "[initial(name)] - [AI.name]" @@ -104,4 +105,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(UPDATE_ICON) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 37892b2b45ef..b3c923b9524a 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -530,13 +530,14 @@ if(fuel <= 0) turn_off() STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/flashlight/glowstick/proc/turn_off() on = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/flashlight/glowstick/update_icon() +/obj/item/flashlight/glowstick/update_icon(updates=ALL) + . = ..() item_state = "glowstick" cut_overlays() if(fuel <= 0) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 11a22a8d7bc9..ff9713892dcc 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,7 +78,8 @@ . += span_notice("The last radiation amount detected was [last_tick_amount]") -/obj/item/geiger_counter/update_icon() +/obj/item/geiger_counter/update_icon(updates=ALL) + . = ..() if(!scanning) icon_state = "geiger_off" return 1 @@ -116,11 +117,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 +164,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 +177,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 +197,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 69a308e2dabf..24eb9a93e843 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -152,7 +152,8 @@ ReplaceLight(target, user) to_chat(user, status_string()) -/obj/item/lightreplacer/update_icon() +/obj/item/lightreplacer/update_icon(updates=ALL) + . = ..() icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" /obj/item/lightreplacer/proc/status_string() @@ -225,7 +226,7 @@ name = "shortcircuited [initial(name)]" else name = initial(name) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/lightreplacer/proc/CanUse(mob/living/user) src.add_fingerprint(user) @@ -255,7 +256,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(UPDATE_ICON) /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 2a101fbef0bb..36661fe3d9f0 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/megaphone/equipped(mob/M, slot) . = ..() @@ -42,11 +42,12 @@ if(last_used > world.time) return FALSE last_used = world.time + recharge_time - update_icon() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), recharge_time) return TRUE -/obj/item/megaphone/update_icon() +/obj/item/megaphone/update_icon(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 a7c9cc6c68da..5eda5888dd8e 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -77,7 +77,8 @@ if(hud_on) remove_hud(user) -/obj/item/multitool/ai_detect/update_icon() +/obj/item/multitool/ai_detect/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][detect_state]" /obj/item/multitool/ai_detect/process() @@ -86,7 +87,7 @@ eye.setLoc(get_turf(src)) multitool_detect() if(detect_state != old_detect_state) - update_icon() + update_appearance(UPDATE_ICON) /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..561d58433616 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -26,7 +26,8 @@ var/obj/structure/cable/attached // the attached cable -/obj/item/powersink/update_icon() +/obj/item/powersink/update_icon(updates=ALL) + . = ..() icon_state = "powersink[mode == OPERATING]" /obj/item/powersink/proc/set_mode(value) @@ -56,7 +57,7 @@ density = TRUE mode = value - update_icon() + update_appearance(UPDATE_ICON) 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..92e1ff5deb01 100644 --- a/code/game/objects/items/devices/quantum_keycard.dm +++ b/code/game/objects/items/devices/quantum_keycard.dm @@ -25,7 +25,8 @@ 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_icon(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 fdd1b6386b1d..272cf3ddf1ba 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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/taperecorder/proc/eject(mob/user) @@ -71,7 +71,7 @@ stop() user.put_in_hands(mytape) mytape = null - update_icon() + update_appearance(UPDATE_ICON) /obj/item/taperecorder/fire_act(exposed_temperature, exposed_volume) mytape.ruin() //Fires destroy the tape @@ -103,7 +103,8 @@ eject(usr) -/obj/item/taperecorder/update_icon() +/obj/item/taperecorder/update_icon(updates=ALL) + . = ..() if(!mytape) icon_state = "taperecorder_empty" else if(recording) @@ -136,7 +137,7 @@ if(mytape.used_capacity < mytape.max_capacity) to_chat(usr, span_notice("Recording started.")) recording = 1 - update_icon() + update_appearance(UPDATE_ICON) 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 +147,7 @@ used++ sleep(1 SECONDS) recording = 0 - update_icon() + update_appearance(UPDATE_ICON) else to_chat(usr, span_notice("The tape is full.")) @@ -168,7 +169,7 @@ playing = 0 var/turf/T = get_turf(src) T.visible_message("Tape Recorder: Playback stopped.") - update_icon() + update_appearance(UPDATE_ICON) /obj/item/taperecorder/verb/play() @@ -185,7 +186,7 @@ return playing = 1 - update_icon() + update_appearance(UPDATE_ICON) 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 +211,7 @@ i++ playing = 0 - update_icon() + update_appearance(UPDATE_ICON) /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 eb7dba3b8602..b5c0c60f85ab 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(UPDATE_ICON) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index f8cc8bfc3f33..f41f32d3a7b0 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -35,7 +35,7 @@ tank_two = item to_chat(user, span_notice("You attach the tank to the transfer valve.")) - update_icon() + update_appearance(UPDATE_ICON) //TODO: Have this take an assemblyholder else if(isassembly(item)) var/obj/item/assembly/A = item @@ -50,7 +50,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(UPDATE_ICON), which calls update_appearance(UPDATE_ICON) on the holder (i.e. the bomb). log_bomber(user, "attached a [item.name] to a ttv -", src, null, FALSE) attacher = user return @@ -96,7 +96,8 @@ /obj/item/transfer_valve/proc/toggle_off() toggle = TRUE -/obj/item/transfer_valve/update_icon() +/obj/item/transfer_valve/update_icon(updates=ALL) + . = ..() cut_overlays() if(!tank_one && !tank_two && !attached_device) @@ -191,7 +192,7 @@ else if(valve_open && tank_one && tank_two) split_gases() valve_open = FALSE - update_icon() + update_appearance(UPDATE_ICON) // 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 @@ -247,4 +248,4 @@ attached_device = null . = TRUE - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index 1274c8f6efe1..d9c4d8a49566 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(UPDATE_ICON) /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,7 +142,8 @@ w_class = WEIGHT_CLASS_SMALL sides = 100 -/obj/item/dice/d100/update_icon() +/obj/item/dice/d100/update_icon(updates=ALL) + . = ..() return /obj/item/dice/eightbd20 @@ -152,7 +153,8 @@ 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() +/obj/item/dice/eightbd20/update_icon(updates=ALL) + . = ..() return /obj/item/dice/fourdd6 @@ -162,7 +164,8 @@ 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() +/obj/item/dice/fourdd6/update_icon(updates=ALL) + . = ..() return /obj/item/dice/attack_self(mob/user) @@ -188,7 +191,7 @@ comment = "NAT 20!" else if(sides == 20 && result == 1) comment = "Ouch, bad luck." - update_icon() + update_appearance(UPDATE_ICON) if(initial(icon_state) == "d00") result = (result - 1)*10 if(special_faces.len == sides) @@ -205,7 +208,8 @@ 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_icon(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 89050035ff53..d35724a8a00b 100644 --- a/code/game/objects/items/discoball.dm +++ b/code/game/objects/items/discoball.dm @@ -28,7 +28,7 @@ /obj/structure/discoball/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) if(TimerID) deltimer(TimerID) over() @@ -69,10 +69,11 @@ current_color = random_color() set_light_color(current_color) add_atom_colour("#[current_color]", FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(UPDATE_ICON) 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_icon(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..9c741bf3078a 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(UPDATE_ICON) diff --git a/code/game/objects/items/etherealdiscoball.dm b/code/game/objects/items/etherealdiscoball.dm index a2bff00767c0..df7e609215cd 100644 --- a/code/game/objects/items/etherealdiscoball.dm +++ b/code/game/objects/items/etherealdiscoball.dm @@ -25,7 +25,7 @@ /obj/structure/etherealball/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) if(TimerID) deltimer(TimerID) @@ -62,10 +62,11 @@ current_color = random_color() set_light(range, power, current_color) add_atom_colour("#[current_color]", FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(UPDATE_ICON) 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_icon(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..16db8231e2a5 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -54,7 +54,8 @@ igniter.flamethrower_process(location) -/obj/item/flamethrower/update_icon() +/obj/item/flamethrower/update_icon(updates=ALL) + . = ..() cut_overlays() if(igniter) add_overlay("+igniter[status]") @@ -104,7 +105,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(UPDATE_ICON) return else if(isigniter(W)) @@ -116,7 +117,7 @@ if(!user.transferItemToLoc(W, src)) return igniter = I - update_icon() + update_appearance(UPDATE_ICON) return else if(istype(W, /obj/item/tank/internals/plasma)) @@ -129,7 +130,7 @@ if(!user.transferItemToLoc(W, src)) return ptank = W - update_icon() + update_appearance(UPDATE_ICON) return else @@ -150,7 +151,7 @@ user.put_in_hands(ptank) ptank = null to_chat(user, span_notice("You remove the plasma tank from [src]!")) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/flamethrower/examine(mob/user) . = ..() @@ -178,7 +179,7 @@ playsound(loc, deac_sound, 50, TRUE) STOP_PROCESSING(SSobj,src) set_light_on(lit) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/flamethrower/CheckParts(list/parts_list) ..() @@ -187,7 +188,7 @@ weldtool.status = FALSE igniter.secured = FALSE status = TRUE - update_icon() + update_appearance(UPDATE_ICON) //Called from turf.dm turf/dblclick /obj/item/flamethrower/proc/flame_turf(turflist) @@ -265,7 +266,7 @@ set_light(0) playsound(loc, deac_sound, 50, TRUE) STOP_PROCESSING(SSobj,src) - update_icon() + update_appearance(UPDATE_ICON) return FALSE //Burn it @@ -302,7 +303,7 @@ status = TRUE if(create_with_tank) ptank = new /obj/item/tank/internals/plasma/full(src) - update_icon() + update_appearance(UPDATE_ICON) /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..cac0d918d85b 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,10 @@ /obj/item/book/granter/martial/plasma_fist/on_reading_finished(mob/living/carbon/user) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/book/granter/martial/plasma_fist/update_icon() +/obj/item/book/granter/martial/plasma_fist/update_icon(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..5f8a32215505 100644 --- a/code/game/objects/items/granters/martial_arts/sleeping_carp.dm +++ b/code/game/objects/items/granters/martial_arts/sleeping_carp.dm @@ -21,7 +21,7 @@ /obj/item/book/granter/martial/carp/on_reading_finished(mob/living/carbon/user) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/book/granter/martial/carp/update_icon(updates) . = ..() diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 9fd496e03565..38bf7e2bd3d7 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -42,14 +42,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(UPDATE_ICON) 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(UPDATE_ICON) return ..() @@ -167,7 +167,8 @@ user.gib(1, 1) qdel(src) -/obj/item/grenade/plastic/update_icon() +/obj/item/grenade/plastic/update_icon(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 ab87e548e670..05f9080ae1c9 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -264,9 +264,10 @@ /obj/item/restraints/legcuffs/beartrap/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/restraints/legcuffs/beartrap/update_icon() +/obj/item/restraints/legcuffs/beartrap/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][armed]" /obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user) @@ -281,12 +282,12 @@ ..() if(ishuman(user) && !user.stat && !user.restrained()) armed = !armed - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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 733066766591..4b48192e07dc 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(UPDATE_ICON) /obj/item/nullrod/dualsword/attackby(obj/item/I, mob/living/user, params) . = ..() @@ -511,9 +511,10 @@ user.balloon_alert(user, "You sheathe \the [src].") playsound(user, 'sound/items/sheath.ogg', 25, TRUE) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/nullrod/dualsword/update_icon() +/obj/item/nullrod/dualsword/update_icon(updates=ALL) + . = ..() . = ..() item_state = swords ? "fulldual" : "emptydual" icon_state = item_state @@ -566,7 +567,7 @@ sheath.swordleft.forceMove(sheath) if(!sheath.swords) user.balloon_alert(user, "you sheathe \the [sheath].") - sheath.update_icon() + sheath.update_appearance(UPDATE_ICON) 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..c033174d2c63 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(UPDATE_ICON) if(sticky) ADD_TRAIT(src, TRAIT_NODROP, HOT_POTATO_TRAIT) name = "primed [name]" @@ -150,14 +150,15 @@ active = TRUE /obj/item/hot_potato/proc/deactivate() - update_icon() + update_appearance(UPDATE_ICON) 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_icon(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..4e1eefb28c8b 100644 --- a/code/game/objects/items/hourglass.dm +++ b/code/game/objects/items/hourglass.dm @@ -29,7 +29,8 @@ 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_icon(updates=ALL) + . = ..() if(timing_id) icon_state = "hourglass_active" else @@ -54,7 +55,7 @@ countdown.stop() finish_time = null animate(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/hourglass/proc/finish() visible_message(span_notice("[src] stops.")) @@ -79,4 +80,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..f95e83b7c4ce 100644 --- a/code/game/objects/items/implants/implantcase.dm +++ b/code/game/objects/items/implants/implantcase.dm @@ -14,7 +14,8 @@ var/imp_type -/obj/item/implantcase/update_icon() +/obj/item/implantcase/update_icon(updates=ALL) + . = ..() if(imp) icon_state = "implantcase-[imp.implant_color]" reagents = imp.reagents @@ -45,8 +46,8 @@ I.imp.forceMove(src) imp = I.imp I.imp = null - update_icon() - I.update_icon() + update_appearance(UPDATE_ICON) + I.update_appearance(UPDATE_ICON) else if(imp) if(I.imp) @@ -54,8 +55,8 @@ imp.forceMove(I) I.imp = imp imp = null - update_icon() - I.update_icon() + update_appearance(UPDATE_ICON) + I.update_appearance(UPDATE_ICON) else return ..() @@ -64,7 +65,7 @@ . = ..() if(imp_type) imp = new imp_type(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/implantcase/tracking diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index be5eee920a42..7d9be4626039 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(mapload) . = ..() open_machine() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) /obj/machinery/implantchair/proc/implant_action(mob/living/M) var/obj/item/I = new implant_type @@ -99,7 +99,8 @@ visible_message(span_warning("[M] has been implanted by [src].")) return TRUE -/obj/machinery/implantchair/update_icon() +/obj/machinery/implantchair/update_icon(updates=ALL) + . = ..() icon_state = initial(icon_state) if(state_open) icon_state += "_open" @@ -120,7 +121,7 @@ /obj/machinery/implantchair/proc/set_ready() ready = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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..4efe3267bfe4 100644 --- a/code/game/objects/items/implants/implanter.dm +++ b/code/game/objects/items/implants/implanter.dm @@ -15,7 +15,8 @@ var/imp_type = null -/obj/item/implanter/update_icon() +/obj/item/implanter/update_icon(updates=ALL) + . = ..() if(imp) icon_state = "implanter1" else @@ -38,7 +39,7 @@ else M.visible_message("[user] has implanted [M].", span_notice("[user] implants you.")) imp = null - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("[src] fails to implant [M].")) @@ -63,4 +64,4 @@ . = ..() if(imp_type) imp = new imp_type(src) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index a713a85584f3..7969f898eead 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -11,7 +11,8 @@ w_class = WEIGHT_CLASS_SMALL var/obj/item/implantcase/case = null -/obj/item/implantpad/update_icon() +/obj/item/implantpad/update_icon(updates=ALL) + . = ..() icon_state = "implantpad-[!QDELETED(case)]" /obj/item/implantpad/examine(mob/user) @@ -27,7 +28,7 @@ /obj/item/implantpad/handle_atom_del(atom/A) if(A == case) case = null - update_icon() + update_appearance(UPDATE_ICON) updateSelfDialog() . = ..() @@ -46,7 +47,7 @@ case = null updateSelfDialog() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user, params) if(istype(C, /obj/item/implantcase) && !case) @@ -54,7 +55,7 @@ return case = C updateSelfDialog() - update_icon() + update_appearance(UPDATE_ICON) else return ..() diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index bd4cbb3fbd1b..6e90966b932a 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(UPDATE_ICON) + target.update_appearance(UPDATE_ICON) /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(UPDATE_ICON) return else to_chat(user, span_notice("You close the battery compartment.")) opened = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) user.put_in_hands(cell) cell = null - update_icon() + update_appearance(UPDATE_ICON) /obj/item/inducer/examine(mob/living/M) @@ -194,7 +194,8 @@ if(opened) . += span_notice("Its battery compartment is open.") -/obj/item/inducer/update_icon() +/obj/item/inducer/update_icon(updates=ALL) + . = ..() cut_overlays() if(opened) if(!cell) @@ -212,4 +213,4 @@ /obj/item/inducer/sci/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/laser_level.dm b/code/game/objects/items/laser_level.dm index d6f9b5b7bc63..bb9be77f5012 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/laserlevel/attack_self(mob/user) lightlevel--; @@ -26,10 +26,11 @@ set_light(l_range = lightlevel / 2, l_power = (lightlevel / 4), l_color = "#00ff00") else set_light(0) - update_icon() + update_appearance(UPDATE_ICON) update_overlay(user) -/obj/item/laserlevel/update_icon() +/obj/item/laserlevel/update_icon(updates=ALL) + . = ..() cut_overlays() add_overlay("[initial(icon_state)][lightlevel]") return diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index f9cec544e499..5fc9a083fee1 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -71,9 +71,10 @@ 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(UPDATE_ICON) -/obj/item/mail/update_icon() +/obj/item/mail/update_icon(updates=ALL) + . = ..() . = ..() var/bonus_stamp_offset = 0 for(var/stamp in stamps) @@ -217,7 +218,8 @@ desc = "A certified post crate from CentCom." icon_state = "mail" -/obj/structure/closet/crate/mail/update_icon() +/obj/structure/closet/crate/mail/update_icon(updates=ALL) + . = ..() . = ..() if(opened) icon_state = "[initial(icon_state)]open" @@ -255,7 +257,7 @@ else if(prob(MAIL_JUNK_CHANCE)) new_mail.junk_mail() - update_icon() + update_appearance(UPDATE_ICON) return mail_count diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 80e4a74d4a0e..906729a5f60f 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -728,16 +728,17 @@ held_sausage = target else to_chat(user, span_warning("[target] doesn't seem to want to get on [src]!")) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/melee/roastingstick/attack_hand(mob/user) ..() if (held_sausage) user.put_in_hands(held_sausage) held_sausage = null - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/melee/roastingstick/update_icon() +/obj/item/melee/roastingstick/update_icon(updates=ALL) + . = ..() . = ..() cut_overlays() if (held_sausage) @@ -759,7 +760,7 @@ /obj/item/melee/roastingstick/handle_atom_del(atom/target) if (target == held_sausage) held_sausage = null - update_icon() + update_appearance(UPDATE_ICON) /obj/item/melee/roastingstick/afterattack(atom/target, mob/user, proximity) . = ..() @@ -790,4 +791,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(UPDATE_ICON) diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index 1b30148a6be8..80275184e206 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(UPDATE_ICON) 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..d5dc0c99fea6 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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) 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,11 @@ 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(UPDATE_ICON) remove_occupant(user) -/obj/item/pet_carrier/update_icon() +/obj/item/pet_carrier/update_icon(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 b9b0f901ffdf..4d6f64e9e3cd 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -43,18 +43,19 @@ else target = null STOP_PROCESSING(SSfastprocess, src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/pinpointer/process() if(!active) return PROCESS_KILL scan_for_target() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/pinpointer/proc/scan_for_target() return -/obj/item/pinpointer/update_icon() +/obj/item/pinpointer/update_icon(updates=ALL) + . = ..() cut_overlays() if(!active) return diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index cedef7937a18..965c971fe4a1 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -357,7 +357,7 @@ mood_message = null cheer_up() -/obj/item/toy/plush/proc/update_desc() +/obj/item/toy/plush/update_desc(updates=ALL) 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 f0342d8bb99c..a878d06733c1 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(UPDATE_ICON) /obj/item/pneumatic_cannon/ghetto //Obtainable by improvised methods; more gas per use, less capacity name = "improvised pneumatic cannon" @@ -250,9 +250,10 @@ return to_chat(user, span_notice("You hook \the [thetank] up to \the [src].")) tank = thetank - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/pneumatic_cannon/update_icon() +/obj/item/pneumatic_cannon/update_icon(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 b03a6ae36e00..4c234490334c 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -180,7 +180,8 @@ /obj/item/borg/charger/Initialize(mapload) . = ..() -/obj/item/borg/charger/update_icon() +/obj/item/borg/charger/update_icon(updates=ALL) + . = ..() ..() icon_state = "charger_[mode]" @@ -190,7 +191,7 @@ else mode = "draw" to_chat(user, span_notice("You toggle [src] to \"[mode]\" mode.")) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag) . = ..() @@ -253,7 +254,7 @@ break if(!user.cell.give(draw)) break - target.update_icon() + target.update_appearance(UPDATE_ICON) to_chat(user, span_notice("You stop charging yourself.")) @@ -291,7 +292,7 @@ break if(!cell.give(draw)) break - target.update_icon() + target.update_appearance(UPDATE_ICON) to_chat(user, span_notice("You stop charging [target].")) @@ -608,10 +609,11 @@ 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(UPDATE_ICON) to_chat(user, span_boldnotice("You [active? "activate":"deactivate"] [src].")) -/obj/item/borg/projectile_dampen/update_icon() +/obj/item/borg/projectile_dampen/update_icon(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 702eaa9836de..bba7cf456488 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/robot_suit/prebuilt/Initialize(mapload) . = ..() @@ -51,7 +51,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() if(l_arm) add_overlay("[l_arm.icon_state]+o") @@ -108,7 +109,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(UPDATE_ICON) /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 +173,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() l_leg = W - update_icon() + update_appearance(UPDATE_ICON) else if(istype(W, /obj/item/bodypart/r_leg/robot)) var/obj/item/bodypart/r_leg/robot/L = W @@ -186,7 +187,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() r_leg = W - update_icon() + update_appearance(UPDATE_ICON) else if(istype(W, /obj/item/bodypart/l_arm/robot)) var/obj/item/bodypart/l_leg/robot/L = W @@ -200,7 +201,7 @@ W.icon_state = initial(W.icon_state) W.cut_overlays() l_arm = W - update_icon() + update_appearance(UPDATE_ICON) else if(istype(W, /obj/item/bodypart/r_arm/robot)) if(r_arm) @@ -210,7 +211,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(UPDATE_ICON) else if(istype(W, /obj/item/bodypart/chest/robot)) var/obj/item/bodypart/chest/robot/CH = W @@ -222,7 +223,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(UPDATE_ICON) else if(!CH.wired) to_chat(user, span_warning("You need to attach wires to it first!")) else @@ -242,7 +243,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(UPDATE_ICON) 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..bf77acf0a988 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -452,9 +452,10 @@ else to_chat(cyborg, span_notice("You deactivate the self-repair module.")) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/borg/upgrade/selfrepair/update_icon() +/obj/item/borg/upgrade/selfrepair/update_icon(updates=ALL) + . = ..() if(cyborg) icon_state = "selfrepair_[on ? "on" : "off"]" for(var/X in actions) @@ -466,7 +467,7 @@ /obj/item/borg/upgrade/selfrepair/proc/deactivate_sr() STOP_PROCESSING(SSobj, src) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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..cbea82512bec 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(UPDATE_ICON) /obj/item/sharpener/super name = "super whetstone" diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index b3041e42b3ef..aa76df7536e7 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -155,17 +155,17 @@ /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,16 +183,17 @@ qdel(embedded_flash) embedded_flash = flash flash.forceMove(src) - update_icon() + update_appearance(UPDATE_ICON) return ..() /obj/item/shield/riot/flash/emp_act(severity) . = ..() embedded_flash.emp_act(severity) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/shield/riot/flash/update_icon() +/obj/item/shield/riot/flash/update_icon(updates=ALL) + . = ..() if(!embedded_flash || embedded_flash.burnt_out) icon_state = "riot" item_state = "riot" diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index bff05696d0e1..97688897e5e4 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_icon(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_icon(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 05b108612065..530b7246cec5 100644 --- a/code/game/objects/items/stacks/cash.dm +++ b/code/game/objects/items/stacks/cash.dm @@ -18,7 +18,7 @@ . = ..() update_desc() -/obj/item/stack/spacecash/proc/update_desc() +/obj/item/stack/spacecash/update_desc(updates=ALL) var/total_worth = get_item_credit_value() desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]" diff --git a/code/game/objects/items/stacks/license_plates.dm b/code/game/objects/items/stacks/license_plates.dm index 03970a9af37f..e58247ffffc4 100644 --- a/code/game/objects/items/stacks/license_plates.dm +++ b/code/game/objects/items/stacks/license_plates.dm @@ -23,7 +23,8 @@ 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_icon(updates=ALL) + . = ..() . = ..() if(novariants) return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index ae0f7e2f7f14..f9567d95f287 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -360,9 +360,10 @@ . = ..() if(amount == max_amount) //only seal full mesh packs is_open = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/stack/medical/mesh/update_icon() +/obj/item/stack/medical/mesh/update_icon(updates=ALL) + . = ..() if(is_open) return ..() icon_state = "regen_mesh_closed" @@ -399,7 +400,7 @@ if(!is_open) is_open = TRUE to_chat(user, span_notice("You open the sterile mesh package.")) - update_icon() + update_appearance(UPDATE_ICON) playsound(src, 'sound/items/poster_ripped.ogg', 20, TRUE) return . = ..() @@ -417,7 +418,8 @@ 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_icon(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..80358e6e495c 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -42,9 +42,10 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ . = ..() recipes = GLOB.rod_recipes - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/stack/rods/update_icon() +/obj/item/stack/rods/update_icon(updates=ALL) + . = ..() var/amount = get_amount() if((amount <= 5) && (amount > 0)) icon_state = "rods-[amount]" @@ -80,7 +81,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(UPDATE_ICON) else return ..() @@ -89,7 +90,8 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ is_cyborg = 1 cost = 250 -/obj/item/stack/rods/cyborg/update_icon() +/obj/item/stack/rods/cyborg/update_icon(updates=ALL) + . = ..() return /obj/item/stack/rods/ten diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 5905792f3906..50b506c54fc8 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(UPDATE_ICON) /obj/item/stack/proc/update_weight() if(amount <= (max_amount * (1/3))) @@ -74,7 +74,8 @@ else w_class = full_w_class -/obj/item/stack/update_icon() +/obj/item/stack/update_icon(updates=ALL) + . = ..() if(novariants) return ..() if(amount <= (max_amount * (1/3))) @@ -312,7 +313,7 @@ amount -= used if(check) zero_amount() - update_icon() + update_appearance(UPDATE_ICON) update_weight() return TRUE @@ -343,7 +344,7 @@ source.add_charge(amount * cost) else src.amount += amount - update_icon() + update_appearance(UPDATE_ICON) 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..02f0faebb2ad 100644 --- a/code/game/objects/items/stacks/tickets.dm +++ b/code/game/objects/items/stacks/tickets.dm @@ -10,9 +10,10 @@ /obj/item/stack/arcadeticket/Initialize(mapload, new_amount, merge = TRUE) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/stack/arcadeticket/update_icon() +/obj/item/stack/arcadeticket/update_icon(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 d6b5f7f8475a..71ecddb82d21 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -55,7 +55,8 @@ playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1) return (TOXLOSS) -/obj/item/storage/bag/trash/update_icon() +/obj/item/storage/bag/trash/update_icon(updates=ALL) + . = ..() //yogs start if(icon_state == "[initial(icon_state)]_broken") return @@ -75,7 +76,7 @@ if(insertable) J.put_in_cart(src, user) J.mybag=src - J.update_icon() + J.update_appearance(UPDATE_ICON) else to_chat(user, span_warning("You are unable to fit your [name] into the [J.name].")) return @@ -382,20 +383,21 @@ if(ishuman(M) || ismonkey(M)) if(prob(10)) M.Paralyze(40) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/storage/bag/tray/update_icon() +/obj/item/storage/bag/tray/update_icon(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(UPDATE_ICON) /obj/item/storage/bag/tray/Exited() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /* * Chemistry bag diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 946e12df997a..a7ac6b5fcf8c 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -17,7 +17,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() if(content_overlays) for(var/obj/item/I in contents) @@ -27,7 +28,7 @@ /obj/item/storage/belt/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/belt/utility name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing. @@ -353,7 +354,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(UPDATE_ICON) /obj/item/storage/belt/security/chief name = "\improper Head of Security's toolbelt" @@ -375,7 +376,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(UPDATE_ICON) /obj/item/storage/belt/security/webbing name = "security webbing" @@ -815,7 +816,8 @@ content_overlays = TRUE slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK -/obj/item/storage/belt/quiver/update_icon() +/obj/item/storage/belt/quiver/update_icon(updates=ALL) + . = ..() ..() if(content_overlays && ismob(loc)) var/mob/M = loc @@ -908,7 +910,7 @@ if(bow.chambered == arrow) bow.chambered = null bow.update_slowdown() - bow.update_icon() + bow.update_appearance(UPDATE_ICON) if(!SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, arrow, null, TRUE, TRUE)) return @@ -1182,11 +1184,12 @@ 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(UPDATE_ICON) else to_chat(user, "[src] is empty.") -/obj/item/storage/belt/sabre/update_icon() +/obj/item/storage/belt/sabre/update_icon(updates=ALL) + . = ..() icon_state = "sheath" item_state = "sheath" if(contents.len) @@ -1199,7 +1202,7 @@ /obj/item/storage/belt/sabre/PopulateContents() new /obj/item/melee/sabre(src) - update_icon() + update_appearance(UPDATE_ICON) /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 d2b51453ced9..37cbcd0586cd 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(UPDATE_ICON) /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,8 @@ 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_icon(updates=ALL) + . = ..() . = ..() if(illustration) cut_overlays() @@ -984,7 +985,8 @@ foldable = null var/design = NODESIGN -/obj/item/storage/box/papersack/update_icon() +/obj/item/storage/box/papersack/update_icon(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 129e4a26aba8..01f501ddebdc 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -29,7 +29,8 @@ 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_icon(updates=ALL) + . = ..() if(fancy_open) icon_state = "[icon_type]box[contents.len]" else @@ -45,18 +46,18 @@ /obj/item/storage/box/fancy/attack_self(mob/user) fancy_open = !fancy_open - update_icon() + update_appearance(UPDATE_ICON) . = ..() /obj/item/storage/box/fancy/Exited() . = ..() fancy_open = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/box/fancy/Entered() . = ..() fancy_open = TRUE - update_icon() + update_appearance(UPDATE_ICON) /* * Donut Box @@ -142,7 +143,7 @@ /obj/item/storage/box/fancy/candle_box/attack_self(mob_user) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/box/fancy/candle_box/Initialize(mapload) . = ..() @@ -196,7 +197,8 @@ 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_icon(updates=ALL) + . = ..() if(fancy_open || !contents.len) cut_overlays() if(!contents.len) @@ -376,7 +378,8 @@ for(var/i in 1 to 10) new /obj/item/rollingpaper(src) -/obj/item/storage/box/fancy/rollingpapers/update_icon() +/obj/item/storage/box/fancy/rollingpapers/update_icon(updates=ALL) + . = ..() cut_overlays() if(!contents.len) add_overlay("[icon_state]_empty") @@ -404,7 +407,8 @@ for(var/i in 1 to 5) new /obj/item/clothing/mask/cigarette/cigar(src) -/obj/item/storage/box/fancy/cigarettes/cigars/update_icon() +/obj/item/storage/box/fancy/cigarettes/cigars/update_icon(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 5b0334e841c8..2938abb1d3d7 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(UPDATE_ICON) /obj/item/storage/lockbox/Exited() . = ..() open = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) ..() /obj/item/storage/lockbox/medal/PopulateContents() @@ -154,7 +154,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) @@ -242,7 +243,8 @@ icon_closed = "vialbox" icon_broken = "vialbox" -/obj/item/storage/lockbox/vialbox/update_icon() +/obj/item/storage/lockbox/vialbox/update_icon(updates=ALL) + . = ..() cut_overlays() var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) var/slot = 1 @@ -270,7 +272,7 @@ /obj/item/storage/lockbox/vialbox/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/lockbox/vialbox/Initialize(mapload) . = ..() @@ -283,11 +285,11 @@ /obj/item/storage/lockbox/vialbox/attackby(obj/item/W, mob/user, params) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/storage/lockbox/vialbox/AltClick(mob/user) ..() - update_icon() + update_appearance(UPDATE_ICON) /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 54c223a2d08e..e966a9cbb2e2 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -28,9 +28,10 @@ latches = "double_latch" if(prob(1)) latches = "triple_latch" - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/storage/toolbox/update_icon() +/obj/item/storage/toolbox/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if(has_latches) @@ -309,7 +310,7 @@ if(/obj/item/storage/toolbox/syndicate) B.toolbox_color = "s" user.put_in_hands(B) - B.update_icon() + B.update_appearance(UPDATE_ICON) 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 e365b45a8f5a..3190b821b880 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -55,13 +55,14 @@ 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_icon(updates=ALL) + . = ..() var/new_state = "wallet" if(front_id) new_state = "wallet_[front_id.icon_state]" @@ -97,4 +98,4 @@ /obj/item/storage/wallet/random/PopulateContents() new /obj/item/holochip(src, rand(5,30)) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 9c096cb43d4d..d59da31c60c6 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(UPDATE_ICON) /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(UPDATE_ICON) else thrown = FALSE @@ -97,12 +97,13 @@ if(status && cell.charge < hitcost) //we're below minimum, turn off status = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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_icon(updates=ALL) + . = ..() if(status) icon_state = "[initial(icon_state)]_active" else if(!cell) @@ -137,16 +138,16 @@ return cell = W to_chat(user, span_notice("You install a cell in [src].")) - update_icon() + update_appearance(UPDATE_ICON) else if(W.tool_behaviour == TOOL_SCREWDRIVER) if(cell) - cell.update_icon() + cell.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else return ..() @@ -169,7 +170,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(UPDATE_ICON) 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 b537ca44393d..9ae2374228f8 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(UPDATE_ICON) 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(UPDATE_ICON) + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) say("Hermetic locks re-engaged; [shard] is safely recontained.") /obj/item/antinoblium_container/proc/unseal() if(!sealed) return sealed = FALSE - update_icon() + update_appearance(UPDATE_ICON) say("Hermetic locks disengaged; [shard] is available for use.") /obj/item/antinoblium_container/attackby(obj/item/hemostat/antinoblium/tongs, mob/user) @@ -138,7 +138,8 @@ seal() to_chat(user, span_warning("[user] seals the [src].")) -/obj/item/antinoblium_container/update_icon() +/obj/item/antinoblium_container/update_icon(updates=ALL) + . = ..() if(sealed) icon_state = "antinoblium_container_sealed" else if (shard) @@ -160,7 +161,8 @@ QDEL_NULL(shard) return ..() -/obj/item/hemostat/antinoblium/update_icon() +/obj/item/hemostat/antinoblium/update_icon(updates=ALL) + . = ..() if(shard) icon_state = "antinoblium_tongs_loaded" else @@ -178,7 +180,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(UPDATE_ICON) ..() /obj/item/hemostat/antinoblium/proc/Consume(atom/movable/AM, mob/user) @@ -203,7 +205,7 @@ empulse(src, 5, 10) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) QDEL_NULL(shard) - update_icon() + update_appearance(UPDATE_ICON) /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 d210e7cf92cb..f0b2ff3b5184 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -14,7 +14,8 @@ name = "[cardColor] Reverse" icon_state = "sc_[cardColor] Reverse_uno" -/obj/item/syndicateReverseCard/update_icon() +/obj/item/syndicateReverseCard/update_icon(updates=ALL) + . = ..() ..() if (used) cut_overlays() @@ -45,7 +46,7 @@ user.put_in_hands(target_gun) firer.put_in_hands(src) used = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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 fa7e7f08792a..6eb3436d6007 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -54,13 +54,14 @@ /obj/item/tank/jetpack/proc/turn_on(mob/user) on = TRUE - update_icon() + update_appearance(UPDATE_ICON) 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_icon(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 +73,7 @@ /obj/item/tank/jetpack/proc/turn_off(mob/user) on = FALSE stabilizers = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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..2263449f35ba 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(UPDATE_ICON) else return ..() diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 435e63756c0d..05e38a20e687 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -313,7 +313,8 @@ // ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ---------- -/obj/item/tank/update_icon() +/obj/item/tank/update_icon(updates=ALL) + . = ..() cut_overlays() if(tank_assembly) add_overlay(tank_assembly.icon_state) @@ -402,7 +403,7 @@ throw_speed = max(2, throw_speed) //Make it a bit harder to throw - update_icon() + update_appearance(UPDATE_ICON) user.balloon_alert(user, "[assembly.name] attached") return @@ -415,7 +416,7 @@ bomb_status = FALSE throw_speed = initial(throw_speed) user.balloon_alert(user, "disassembled") - update_icon() + update_appearance(UPDATE_ICON) /obj/item/tank/proc/ignite() //This happens when a bomb is told to explode var/fuel_moles = air_contents.get_moles(/datum/gas/tritium) + air_contents.get_moles(/datum/gas/hydrogen) + air_contents.get_moles(/datum/gas/plasma) + air_contents.get_moles(/datum/gas/oxygen)/6 diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 6095106a1aac..69b6092b201e 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(UPDATE_ICON) 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,8 @@ QDEL_NULL(sliver) return ..() -/obj/item/hemostat/supermatter/update_icon() +/obj/item/hemostat/supermatter/update_icon(updates=ALL) + . = ..() if(sliver) icon_state = "supermatter_tongs_loaded" else @@ -241,7 +242,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(UPDATE_ICON) ..() /obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user) @@ -263,4 +264,4 @@ radiation_pulse(src, 500, 2) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) QDEL_NULL(sliver) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index a404a46d00ba..4cbba3c3c472 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -44,11 +44,12 @@ icon_state = "screwdriver" var/our_color = pick(screwdriver_colors) add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(UPDATE_ICON) if(prob(75)) pixel_y = rand(0, 16) -/obj/item/screwdriver/update_icon() +/obj/item/screwdriver/update_icon(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 9fc431828538..2dde3457c955 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(UPDATE_ICON) /obj/item/weldingtool/proc/update_torch() @@ -57,7 +57,8 @@ item_state = "[initial(item_state)]" -/obj/item/weldingtool/update_icon() +/obj/item/weldingtool/update_icon(updates=ALL) + . = ..() cut_overlays() if(change_icons) var/ratio = get_fuel() / max_fuel @@ -72,7 +73,7 @@ if(0) force = 3 damtype = "brute" - update_icon() + update_appearance(UPDATE_ICON) if(!can_off_process) STOP_PROCESSING(SSobj, src) return @@ -83,7 +84,7 @@ burned_fuel_for += delta_time if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) use(1) - update_icon() + update_appearance(UPDATE_ICON) //This is to start fires. process() is only called if the welder is on. open_flame() @@ -145,7 +146,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(UPDATE_ICON) if(isOn()) use(1) var/turf/location = get_turf(user) @@ -166,7 +167,7 @@ explode() switched_on(user) - update_icon() + update_appearance(UPDATE_ICON) /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) @@ -206,7 +207,7 @@ if(get_fuel() <= 0 && welding) set_light_on(FALSE) switched_on(user) - update_icon() + update_appearance(UPDATE_ICON) //mob icon update if(ismob(loc)) var/mob/M = loc @@ -228,7 +229,7 @@ force = 15 damtype = BURN hitsound = 'sound/items/welder.ogg' - update_icon() + update_appearance(UPDATE_ICON) START_PROCESSING(SSobj, src) else to_chat(user, span_warning("You need more fuel!")) @@ -245,7 +246,7 @@ force = 3 damtype = "brute" hitsound = "swing_hit" - update_icon() + update_appearance(UPDATE_ICON) /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 4784c3f6f8ca..cb01578e97b2 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -40,9 +40,10 @@ icon_state = "cutters" var/our_color = pick(wirecutter_colors) add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/wirecutters/update_icon() +/obj/item/wirecutters/update_icon(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 b7dbd2c8e38e..a37bb98c1219 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -67,7 +67,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(UPDATE_ICON) /obj/item/toy/balloon/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) @@ -80,7 +80,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(UPDATE_ICON) else if(I.is_sharp()) balloon_burst() else @@ -104,7 +104,8 @@ icon_state = "burst" qdel(src) -/obj/item/toy/balloon/update_icon() +/obj/item/toy/balloon/update_icon(updates=ALL) + . = ..() if(src.reagents.total_volume >= 1) icon_state = "waterballoon" item_state = "balloon" @@ -207,7 +208,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(UPDATE_ICON) return 1 else return ..() @@ -239,7 +240,8 @@ 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_icon(updates=ALL) + . = ..() src.icon_state = text("357OLD-[]", src.amount_left) /obj/item/toy/ammo/gun/examine(mob/user) @@ -406,9 +408,10 @@ 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(UPDATE_ICON) -/obj/item/twohanded/vxtvulhammer/toy/update_icon() +/obj/item/twohanded/vxtvulhammer/toy/update_icon(updates=ALL) + . = ..() if(!pirated) icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" else @@ -777,7 +780,7 @@ C.deckstyle = deckstyle cards.Cut(1,2) user.put_in_hands(C) - update_icon() + update_appearance(UPDATE_ICON) 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()) @@ -791,9 +794,9 @@ H.deckstyle=deckstyle src.cards.Cut(1,drawnumber+1) user.put_in_hands(H) - update_icon() + update_appearance(UPDATE_ICON) H.interact(user) - H.update_icon() + H.update_appearance(UPDATE_ICON) /obj/item/toy/cards/deck/AltClick(mob/living/L) if(!(L.mobility_flags & MOBILITY_PICKUP)) @@ -806,7 +809,8 @@ 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_icon(updates=ALL) + . = ..() if(cards.len > 26) icon_state = "deck_[deckstyle]_full" else if(cards.len > 10) @@ -840,7 +844,7 @@ qdel(SC) else to_chat(user, span_warning("You can't mix cards from other decks!")) - update_icon() + update_appearance(UPDATE_ICON) else if(istype(I, /obj/item/toy/cards/cardhand)) var/obj/item/toy/cards/cardhand/CH = I if(CH.parentdeck == src) @@ -852,7 +856,7 @@ qdel(CH) else to_chat(user, span_warning("You can't mix cards from other decks!")) - update_icon() + update_appearance(UPDATE_ICON) else return ..() @@ -912,7 +916,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(UPDATE_ICON) if(length(currenthand) == 1) var/obj/item/toy/cards/singlecard/N = new/obj/item/toy/cards/singlecard(loc) N.parentdeck = parentdeck @@ -929,7 +933,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(UPDATE_ICON) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -944,7 +948,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(UPDATE_ICON) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -978,7 +982,8 @@ . = ..() . += "This hand has [currenthand.len] cards in it." -/obj/item/toy/cards/cardhand/update_icon() +/obj/item/toy/cards/cardhand/update_icon(updates=ALL) + . = ..() if(src.currenthand.len > 4) src.icon_state = "[deckstyle]_hand5" else @@ -1055,7 +1060,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(UPDATE_ICON) else to_chat(user, span_warning("You can't mix cards from other decks!")) else @@ -1142,7 +1147,8 @@ cards += "Wildcard" cards += "Wild Draw Four" -/obj/item/toy/cards/deck/uno/update_icon() +/obj/item/toy/cards/deck/uno/update_icon(updates=ALL) + . = ..() if(cards.len > 54) icon_state = "deck_[deckstyle]_full" else if(cards.len > 25) @@ -1680,9 +1686,10 @@ obj/item/toy/turn_tracker /obj/item/toy/eldritch_book/attack_self(mob/user) book_open = !book_open - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/toy/eldritch_book/update_icon() +/obj/item/toy/eldritch_book/update_icon(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 e0aa00007926..c97b6666fe21 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -45,7 +45,7 @@ name = copytext(name, 1, sf) else //something wrong name = "[initial(name)]" - update_icon() + update_appearance(UPDATE_ICON) if(user.get_item_by_slot(ITEM_SLOT_BACK) == src) user.update_inv_back() else @@ -86,7 +86,7 @@ if(force_wielded) force += force_wielded name = "[name] (Wielded)" - update_icon() + update_appearance(UPDATE_ICON) if(iscyborg(user)) to_chat(user, span_notice("You dedicate your module to [src].")) else @@ -108,7 +108,8 @@ return unwield(user) -/obj/item/twohanded/update_icon() +/obj/item/twohanded/update_icon(updates=ALL) + . = ..() return /obj/item/twohanded/attack_self(mob/user) @@ -254,7 +255,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_icon(updates=ALL) //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" return @@ -289,7 +290,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_icon(updates=ALL) //Currently only here to fuck with the on-mob icons. icon_state = "metalh2_axe[wielded]" return @@ -348,7 +349,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "energy-fireaxe[wielded]" SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_TYPE_BLOOD) @@ -455,7 +457,8 @@ STOP_PROCESSING(SSobj, src) . = ..() -/obj/item/twohanded/dualsaber/update_icon() +/obj/item/twohanded/dualsaber/update_icon(updates=ALL) + . = ..() if(wielded) icon_state = "dualsaber[saber_color][wielded]" else @@ -565,7 +568,7 @@ hacked = TRUE to_chat(user, span_warning("2XRNBW_ENGAGE")) saber_color = "rainbow" - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("It's starting to look like a triple rainbow - no, nevermind.")) else @@ -624,7 +627,8 @@ . = ..() AddComponent(/datum/component/jousting) -/obj/item/twohanded/spear/update_icon() +/obj/item/twohanded/spear/update_icon(updates=ALL) + . = ..() icon_state = "[icon_prefix][wielded]" /obj/item/twohanded/spear/deconstruct() //we drop our rod and maybe the glass shard used @@ -646,7 +650,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(UPDATE_ICON) qdel(tip) var/obj/item/grenade/G = locate() in parts_list if(G) @@ -671,7 +675,7 @@ G.forceMove(src) explosive = G desc = "A makeshift spear with [G] attached to it" - update_icon() + update_appearance(UPDATE_ICON) /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!")) @@ -686,7 +690,8 @@ . = ..() . += span_notice("Alt-click to set your war cry.") -/obj/item/twohanded/spear/explosive/update_icon() +/obj/item/twohanded/spear/explosive/update_icon(updates=ALL) + . = ..() icon_state = "spearbomb[wielded]" /obj/item/twohanded/spear/explosive/AltClick(mob/user) @@ -870,7 +875,8 @@ throwforce = 100 force_wielded = 500000 // Kills you DEAD. -/obj/item/twohanded/pitchfork/update_icon() +/obj/item/twohanded/pitchfork/update_icon(updates=ALL) + . = ..() icon_state = "pitchfork[wielded]" /obj/item/twohanded/pitchfork/suicide_act(mob/user) @@ -946,7 +952,8 @@ return 1 return 0 -/obj/item/twohanded/vibro_weapon/update_icon() +/obj/item/twohanded/vibro_weapon/update_icon(updates=ALL) + . = ..() icon_state = "hfrequency[wielded]" /obj/item/twohanded/vibro_weapon/wizard @@ -971,7 +978,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "bone_axe[wielded]" /* @@ -999,7 +1007,8 @@ attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") sharpness = SHARP_EDGED -/obj/item/twohanded/bonespear/update_icon() +/obj/item/twohanded/bonespear/update_icon(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. @@ -1012,7 +1021,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "chitin_spear[wielded]" /obj/item/twohanded/binoculars @@ -1079,7 +1089,8 @@ attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") sharpness = SHARP_EDGED -/obj/item/twohanded/bamboospear/update_icon() +/obj/item/twohanded/bamboospear/update_icon(updates=ALL) + . = ..() icon_state = "bamboo_spear[wielded]" /* @@ -1142,7 +1153,8 @@ QDEL_NULL(spark_system) return ..() -/obj/item/twohanded/vxtvulhammer/update_icon() +/obj/item/twohanded/vxtvulhammer/update_icon(updates=ALL) + . = ..() icon_state = "vxtvul_hammer[wielded]-[supercharged]" /obj/item/twohanded/vxtvulhammer/examine(mob/living/carbon/user) @@ -1182,7 +1194,7 @@ set_light_on(FALSE) force = initial(force) + (wielded ? force_wielded : 0) armour_penetration = initial(armour_penetration) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/twohanded/vxtvulhammer/proc/charge_hammer(mob/living/carbon/user) if(!wielded) @@ -1285,7 +1297,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" // Baseball Bats @@ -1390,7 +1403,8 @@ w_class = WEIGHT_CLASS_HUGE slot_flags = ITEM_SLOT_BACK -/obj/item/twohanded/bigspoon/update_icon() +/obj/item/twohanded/bigspoon/update_icon(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 @@ -1417,7 +1431,8 @@ Broom attack_verb = list("swept", "brushed off", "bludgeoned", "whacked") resistance_flags = FLAMMABLE -/obj/item/twohanded/broom/update_icon() +/obj/item/twohanded/broom/update_icon(updates=ALL) + . = ..() icon_state = "broom[wielded]" /obj/item/twohanded/broom/wield(mob/user) @@ -1457,14 +1472,14 @@ Broom break if (i > 1) if (target_bin) - target_bin.update_icon() + target_bin.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/twohanded/broom/cyborg name = "robotic push broom" diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 20f17484332a..f975c514e2a0 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(UPDATE_ICON) if(status == GROWING || status == GROWN) child = new(src) if(status == GROWING) @@ -238,7 +238,8 @@ if(status == BURST) obj_integrity = integrity_failure -/obj/structure/alien/egg/update_icon() +/obj/structure/alien/egg/update_icon(updates=ALL) + . = ..() ..() switch(status) if(GROWING) @@ -279,7 +280,7 @@ /obj/structure/alien/egg/proc/Grow() status = GROWN - update_icon() + update_appearance(UPDATE_ICON) proximity_monitor.SetRange(1) //drops and kills the hugger if any is remaining @@ -287,7 +288,7 @@ if(status == GROWN || status == GROWING) proximity_monitor.SetRange(0) status = BURST - update_icon() + update_appearance(UPDATE_ICON) 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 9d07af715228..2eb79672cea6 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(UPDATE_ICON) . = TRUE if("finalize") . = TRUE @@ -132,7 +132,8 @@ generate_proper_overlay() try_rename(user) -/obj/item/canvas/update_icon() +/obj/item/canvas/update_icon(updates=ALL) + . = ..() cut_overlays() if(!icon_generated) if(used) @@ -155,7 +156,7 @@ CRASH("Error generating painting png : [result]") generated_icon = new(png_filename) icon_generated = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/item/canvas/proc/get_data_string() var/list/data = list() @@ -281,7 +282,7 @@ C.forceMove(drop_location()) C = null to_chat(user, span_notice("You remove the painting from the frame.")) - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas) @@ -290,13 +291,14 @@ if(!C.finalized) C.finalize(user) to_chat(user,span_notice("You frame [C].")) - update_icon() + update_appearance(UPDATE_ICON) /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_icon(updates=ALL) + . = ..() . = ..() if(C && C.generated_icon) @@ -356,7 +358,7 @@ new_canvas.author_ckey = author new_canvas.name = "painting - [title]" C = new_canvas - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/sign/painting/proc/save_persistent() if(!persistence_id || !C || C.no_save) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 747009d314d1..5c5cebf9683f 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -350,7 +350,8 @@ LINEN BINS . += "There are [amount] bed sheets in the bin." -/obj/structure/bedsheetbin/update_icon() +/obj/structure/bedsheetbin/update_icon(updates=ALL) + . = ..() switch(amount) if(0) icon_state = "linenbin-empty" @@ -362,7 +363,7 @@ LINEN BINS /obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume) if(amount) amount = 0 - update_icon() + update_appearance(UPDATE_ICON) ..() /obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params) @@ -372,7 +373,7 @@ LINEN BINS sheets.Add(I) amount++ to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(UPDATE_ICON) else if(default_unfasten_wrench(user, I, 5)) return @@ -421,7 +422,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(UPDATE_ICON) if(hidden) hidden.forceMove(drop_location()) @@ -444,7 +445,7 @@ LINEN BINS B.forceMove(drop_location()) to_chat(user, span_notice("You telekinetically remove [B] from [src].")) - update_icon() + update_appearance(UPDATE_ICON) 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 d72f1cac07c1..b0e91c7bd1af 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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(UPDATE_ICON) PopulateContents() var/static/list/loc_connections = list( COMSIG_ATOM_MAGICALLY_UNLOCKED = PROC_REF(on_magic_unlock), @@ -78,7 +78,8 @@ GLOBAL_LIST_EMPTY(lockers) GLOB.lockers -= src return ..() -/obj/structure/closet/update_icon() +/obj/structure/closet/update_icon(updates=ALL) + . = ..() cut_overlays() if(!opened) layer = OBJ_LAYER @@ -131,7 +132,7 @@ GLOBAL_LIST_EMPTY(lockers) /obj/structure/closet/proc/end_door_animation() is_animating_door = FALSE vis_contents -= door_obj - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/proc/get_door_transform(angle) var/matrix/M = matrix() @@ -211,7 +212,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(UPDATE_ICON) update_airtightness() return 1 @@ -265,7 +266,7 @@ GLOBAL_LIST_EMPTY(lockers) opened = FALSE density = TRUE animate_door(TRUE) - update_icon() + update_appearance(UPDATE_ICON) update_airtightness() close_storage(user) return TRUE @@ -339,7 +340,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(UPDATE_ICON) else if(W.tool_behaviour == TOOL_WRENCH && anchorable) if(isinspace() && !anchored) return @@ -516,7 +517,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(UPDATE_ICON) else if(!silent) to_chat(user, span_notice("Access Denied")) else if(secure && broken) @@ -530,7 +531,7 @@ GLOBAL_LIST_EMPTY(lockers) playsound(src, "sparks", 50, 1) broken = TRUE locked = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) @@ -546,7 +547,7 @@ GLOBAL_LIST_EMPTY(lockers) if(secure && !broken && !(. & EMP_PROTECT_SELF)) if(prob(50 / severity)) locked = !locked - update_icon() + update_appearance(UPDATE_ICON) 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 0b3cdd9700d0..56d8c9e08cf4 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,8 @@ else return ..() -/obj/structure/closet/bluespace/internal/update_icon() +/obj/structure/closet/bluespace/internal/update_icon(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 7ef203bd313c..30617e266037 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(UPDATE_ICON) else name = initial(name) return @@ -46,9 +46,10 @@ to_chat(user, span_notice("You cut the tag off [src].")) name = initial(name) tagged = 0 - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/closet/body_bag/update_icon() +/obj/structure/closet/body_bag/update_icon(updates=ALL) + . = ..() ..() if (tagged) add_overlay("bodybag_label") @@ -190,7 +191,8 @@ 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_icon(updates=ALL) + . = ..() . = ..() if(sinched) icon_state = initial(icon_state) + "_sinched" @@ -216,7 +218,7 @@ if(!dense_when_open) density = FALSE dump_contents() - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/structure/closet/body_bag/environmental/prisoner/container_resist(mob/living/user) @@ -278,7 +280,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(UPDATE_ICON) /obj/structure/closet/body_bag/environmental/prisoner/syndicate name = "syndicate prisoner transport bag" @@ -292,7 +294,8 @@ 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_icon(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..e2fc4320778c 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(UPDATE_ICON) 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 faadb6fba554..7993fdc36118 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(UPDATE_ICON) /obj/structure/closet/crate/CanAllowThrough(atom/movable/mover, turf/target) . = ..() @@ -35,7 +35,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][opened ? "open" : ""]" cut_overlays() @@ -56,7 +57,7 @@ playsound(src, 'sound/items/poster_ripped.ogg', 75, 1) manifest.forceMove(get_turf(src)) manifest = null - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/crate/proc/tear_manifest(mob/user) to_chat(user, span_notice("You tear the manifest off of [src].")) @@ -66,7 +67,7 @@ if(ishuman(user)) user.put_in_hands(manifest) manifest = null - update_icon() + update_appearance(UPDATE_ICON) /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 f5dcce0f0782..b8a9136366de 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -10,9 +10,10 @@ /obj/structure/closet/crate/bin/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/closet/crate/bin/update_icon() +/obj/structure/closet/crate/bin/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if(contents.len == 0) @@ -28,7 +29,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(UPDATE_ICON) do_animate() else if(istype(W, /obj/item/wrench)) anchored = !anchored @@ -41,4 +42,4 @@ flick("animate_largebins", src) spawn(13) playsound(loc, close_sound, 15, 1, -3) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index 74b9e7827d31..7b0f479a7510 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -21,7 +21,8 @@ return ..() -/obj/structure/closet/crate/critter/update_icon() +/obj/structure/closet/crate/critter/update_icon(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..abe953ff338a 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -13,7 +13,8 @@ return 0 . = ..() -/obj/structure/closet/crate/secure/update_icon() +/obj/structure/closet/crate/secure/update_icon(updates=ALL) + . = ..() ..() if(broken) add_overlay("securecrateemag") @@ -131,4 +132,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(UPDATE_ICON) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 06feb41fda5b..1d8475e52b77 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(UPDATE_ICON) /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(UPDATE_ICON) trigger_alarm() /obj/structure/displaycase/proc/trigger_alarm() @@ -85,7 +85,8 @@ alarmed.burglaralert(src) playsound(src, 'sound/effects/alert.ogg', 50, TRUE) -/obj/structure/displaycase/update_icon() +/obj/structure/displaycase/update_icon(updates=ALL) + . = ..() var/icon/I if(open) I = icon('icons/obj/stationobjs.dmi',"glassbox_open") @@ -115,7 +116,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(UPDATE_ICON) to_chat(user, span_notice("You repair [src].")) else to_chat(user, span_warning("[src] is already in good condition!")) @@ -139,7 +140,7 @@ if(user.transferItemToLoc(W, src)) showpiece = W to_chat(user, span_notice("You put [W] on display.")) - update_icon() + update_appearance(UPDATE_ICON) 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 +151,13 @@ G.use(2) broken = 0 obj_integrity = max_integrity - update_icon() + update_appearance(UPDATE_ICON) else return ..() /obj/structure/displaycase/proc/toggle_lock(mob/user) open = !open - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/displaycase/attack_paw(mob/user) return attack_hand(user) @@ -171,7 +172,7 @@ log_combat(user, src, "deactivates the hover field of") dump() src.add_fingerprint(user) - update_icon() + update_appearance(UPDATE_ICON) return else //prevents remote "kicks" with TK @@ -306,7 +307,7 @@ to_chat(user, span_notice("You insert [W] into the case.")) showpiece = W added_roundstart = FALSE - update_icon() + update_appearance(UPDATE_ICON) placer_key = user.ckey diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index 3599e70c7a8f..ee7ea814b8a8 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -40,11 +40,12 @@ 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() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), time_between_uses) -/obj/structure/healingfountain/update_icon() +/obj/structure/healingfountain/update_icon(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 f7756fab8ffd..be1abe21b0a5 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) update_name() /obj/structure/door_assembly/examine(mob/user) @@ -255,14 +255,15 @@ door.name = base_name door.previous_airlock = previous_assembly electronics.forceMove(door) - door.update_icon() + door.update_appearance(UPDATE_ICON) qdel(src) else return ..() update_name() - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/door_assembly/update_icon() +/obj/structure/door_assembly/update_icon(updates=ALL) + . = ..() cut_overlays() if(!glass) add_overlay(get_airlock_overlay("fill_construction", icon)) @@ -293,7 +294,7 @@ if(electronics) target.electronics = source.electronics source.electronics.forceMove(target) - target.update_icon() + target.update_appearance(UPDATE_ICON) target.update_name() qdel(source) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 0d3f46a82036..4c3e74295a34 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) else toggle_cabinet(user) @@ -118,9 +118,10 @@ else playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) opened = !opened - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/extinguisher_cabinet/update_icon() +/obj/structure/extinguisher_cabinet/update_icon(updates=ALL) + . = ..() if(!opened) icon_state = "extinguisher_closed" return @@ -139,7 +140,7 @@ if(stored_extinguisher) stored_extinguisher.forceMove(loc) stored_extinguisher = null - update_icon() + update_appearance(UPDATE_ICON) /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 ebe4f37d2b2d..97c5303a09d6 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(UPDATE_ICON) 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(UPDATE_ICON) 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_icon(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 49548bf352c4..2c7453df1cdd 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -21,7 +21,7 @@ /obj/structure/fireaxecabinet/Initialize(mapload) . = ..() fireaxe = new - update_icon() + update_appearance(UPDATE_ICON) //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(UPDATE_ICON) 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(UPDATE_ICON) //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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) return else if(!broken) //open the cabinet normally. @@ -131,11 +131,11 @@ return . = ..() if(.) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/fireaxecabinet/obj_break(damage_flag) if(!broken && !(flags_1 & NODECONSTRUCT_1)) - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) return toggle_open()//yogs - consolidates opening code return @@ -194,7 +194,8 @@ toggle_open()//yogs - consolidates opening code return -/obj/structure/fireaxecabinet/update_icon() +/obj/structure/fireaxecabinet/update_icon(updates=ALL) + . = ..() cut_overlays() if(fireaxe) add_overlay("axe") @@ -231,7 +232,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(UPDATE_ICON) /obj/structure/fireaxecabinet/verb/toggle_open() set name = "Open/Close" @@ -247,7 +248,7 @@ else playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)//yogs - adds open/close sound open = !open - update_icon() + update_appearance(UPDATE_ICON) return /obj/structure/fireaxecabinet/proc/trigger_alarm() @@ -270,7 +271,7 @@ . = ..() fireaxe = null spareid = new(src) - update_icon() + update_appearance(UPDATE_ICON) /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 +309,4 @@ . = ..() fireaxe = null olreliable = new(src) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index 51c919119ce3..16511808dffd 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -69,7 +69,8 @@ else . = ..() -/obj/structure/fireplace/update_icon() +/obj/structure/fireplace/update_icon(updates=ALL) + . = ..() cut_overlays() if(lit) switch(burn_time_remaining()) @@ -112,7 +113,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(UPDATE_ICON) adjust_light() /obj/structure/fireplace/extinguish() @@ -142,11 +143,11 @@ desc = "A large stone brick fireplace, warm and cozy." flame_expiry_timer = world.time + fuel_added fuel_added = 0 - update_icon() + update_appearance(UPDATE_ICON) adjust_light() /obj/structure/fireplace/proc/put_out() lit = FALSE - update_icon() + update_appearance(UPDATE_ICON) adjust_light() desc = initial(desc) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index fa60e3d5d10a..2e359c7aa2e1 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -34,14 +34,15 @@ if(broken) holes = (holes | 16) //16 is the biggest hole - update_icon() + update_appearance(UPDATE_ICON) return holes = (holes | (1 << rand(0,3))) //add random holes between 1 and 8 - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/grille/update_icon() +/obj/structure/grille/update_icon(updates=ALL) + . = ..() if(QDELETED(src)) return for(var/i = 0; i < 5; i++) @@ -303,7 +304,7 @@ /obj/structure/grille/broken/Initialize(mapload) . = ..() holes = (holes | 16) - update_icon() + update_appearance(UPDATE_ICON) /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..a18b95f09b25 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -19,10 +19,11 @@ I.forceMove(src) if(contents.len >= capacity) break - update_icon() + update_appearance(UPDATE_ICON) return ..() -/obj/structure/guncase/update_icon() +/obj/structure/guncase/update_icon(updates=ALL) + . = ..() cut_overlays() if(case_type && LAZYLEN(contents)) var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type) @@ -42,14 +43,14 @@ if(!user.transferItemToLoc(I, src)) return to_chat(user, span_notice("You place [I] in [src].")) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("[src] is full.")) return else if(user.a_intent != INTENT_HARM) open = !open - update_icon() + update_appearance(UPDATE_ICON) else return ..() @@ -63,7 +64,7 @@ ShowWindow(user) else open = !open - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/guncase/proc/ShowWindow(mob/user) var/dat = {"
    @@ -89,10 +90,10 @@ if(ishuman(usr)) if(!usr.put_in_hands(O)) O.forceMove(get_turf(src)) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/guncase/handle_atom_del(atom/A) - update_icon() + update_appearance(UPDATE_ICON) /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 258ef6579213..140f6995e1fb 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(UPDATE_ICON) /obj/structure/headpike/glass/CheckParts(list/parts_list) spear = locate(/obj/item/twohanded/spear) in parts_list @@ -38,7 +38,8 @@ . = ..() pixel_x = rand(-8, 8) -/obj/structure/headpike/update_icon() +/obj/structure/headpike/update_icon(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 57844bb77b00..4ea0b0d19792 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -215,14 +215,15 @@ /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_icon(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(UPDATE_ICON) 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 37bb885f2d59..b88b37271265 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /* check_menu: Checks if we are allowed to interact with a radial menu @@ -223,7 +223,8 @@ return FALSE return TRUE -/obj/structure/janitorialcart/update_icon() +/obj/structure/janitorialcart/update_icon(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 e894818d15bc..34a5273dde71 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(UPDATE_ICON) if (down) src.down = down down.up = src - down.update_icon() + down.update_appearance(UPDATE_ICON) return INITIALIZE_HINT_LATELOAD /obj/structure/ladder/Destroy(force) @@ -36,26 +36,27 @@ if (L) down = L L.up = src // Don't waste effort looping the other way - L.update_icon() + L.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/ladder/proc/disconnect() if(up && up.down == src) up.down = null - up.update_icon() + up.update_appearance(UPDATE_ICON) if(down && down.up == src) down.up = null - down.update_icon() + down.update_appearance(UPDATE_ICON) up = down = null -/obj/structure/ladder/update_icon() +/obj/structure/ladder/update_icon(updates=ALL) + . = ..() if(up && down) icon_state = "ladder11" @@ -160,7 +161,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(UPDATE_ICON) return for (var/O in GLOB.ladders) @@ -170,17 +171,17 @@ if (!down && L.height == height - 1) down = L L.up = src - L.update_icon() + L.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) if (down) break // break if both our connections are filled - update_icon() + update_appearance(UPDATE_ICON) /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..29da139fcb06 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(UPDATE_ICON) float(linked_minds.len) if(linked_minds.len) START_PROCESSING(SSobj, src) @@ -46,7 +46,8 @@ STOP_PROCESSING(SSobj, src) set_light(0) -/obj/structure/life_candle/update_icon() +/obj/structure/life_candle/update_icon(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 3dbc37c7fb3b..5032b7177460 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(UPDATE_ICON) isSwitchingStates = FALSE if(close_delay != -1) @@ -116,10 +116,11 @@ door_opened = FALSE layer = initial(layer) air_update_turf(1) - update_icon() + update_appearance(UPDATE_ICON) isSwitchingStates = FALSE -/obj/structure/mineral_door/update_icon() +/obj/structure/mineral_door/update_icon(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 300cc049d6c4..fdfe4ab452d1 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -19,27 +19,28 @@ if(!user.transferItemToLoc(M, src)) return ourmop = M - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) else . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) return return ..() -/obj/structure/mopbucket/update_icon() +/obj/structure/mopbucket/update_icon(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 f02d14fe7fe4..c07dbbce1426 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -43,9 +43,10 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/on_log(login) ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/bodycontainer/update_icon() +/obj/structure/bodycontainer/update_icon(updates=ALL) + . = ..() return /obj/structure/bodycontainer/relaymove(mob/user) @@ -130,7 +131,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(UPDATE_ICON) /obj/structure/bodycontainer/proc/close() playsound(src, 'sound/effects/roll.ogg', 5, 1) @@ -140,7 +141,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(UPDATE_ICON) /obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) @@ -173,7 +174,8 @@ 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_icon(updates=ALL) + . = ..() if (!connected || connected.loc != src) // Open or tray is gone. icon_state = "morgue0" else @@ -232,7 +234,8 @@ 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_icon(updates=ALL) + . = ..() if(!connected || connected.loc != src) icon_state = "crema0" else @@ -260,7 +263,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(UPDATE_ICON) cremate_timer = addtimer(CALLBACK(src, PROC_REF(finish_cremate), user), (breakout_time + cremate_time ), TIMER_STOPPABLE) @@ -271,7 +274,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(UPDATE_ICON) /obj/structure/bodycontainer/crematorium/proc/finish_cremate(mob/user) var/list/conts = get_all_contents() - src - connected @@ -327,7 +330,7 @@ GLOBAL_LIST_EMPTY(crematoriums) if(!QDELETED(src)) locked = FALSE - update_icon() + update_appearance(UPDATE_ICON) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people /obj/structure/bodycontainer/crematorium/creamatorium @@ -362,7 +365,7 @@ GLOBAL_LIST_EMPTY(crematoriums) /obj/structure/tray/Destroy() if(connected) connected.connected = null - connected.update_icon() + connected.update_appearance(UPDATE_ICON) connected = null return ..() diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 8913505ecbf4..8d305e0addac 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -56,7 +56,8 @@ FLOOR SAFES space += I.w_class I.forceMove(src) -/obj/structure/safe/update_icon() +/obj/structure/safe/update_icon(updates=ALL) + . = ..() if(open) icon_state = "[initial(icon_state)]-open" else @@ -147,7 +148,7 @@ FLOOR SAFES return to_chat(user, span_notice("You [open ? "close" : "open"] [src].")) open = !open - update_icon() + update_appearance(UPDATE_ICON) return TRUE if("turnright") if(open) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 5f691e267775..8e63a2859bb8 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(UPDATE_ICON) handle_mist() add_fingerprint(M) if(on) @@ -69,7 +69,8 @@ . = ..() . += span_notice("You can alt-click to change the temperature.") -/obj/machinery/shower/update_icon() +/obj/machinery/shower/update_icon(updates=ALL) + . = ..() . = ..() cut_overlays() if(on) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 589f1e251033..5934bc9b63d4 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -18,9 +18,10 @@ 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() +/obj/structure/sign/delamination_counter/update_icon(updates=ALL) + . = ..() cut_overlays() var/ones = since_last % 10 diff --git a/code/game/objects/structures/stairs.dm b/code/game/objects/structures/stairs.dm index 40e2517985d8..bc91cd528b12 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/structure/stairs/Uncross(atom/movable/AM, atom/newloc) if(!newloc || !AM) @@ -54,7 +54,8 @@ return FALSE return ..() -/obj/structure/stairs/update_icon() +/obj/structure/stairs/update_icon(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 e8e0eee656b0..69a258c05d18 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -76,7 +76,8 @@ /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_icon(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 d2b91fa512e7..9ccfc3f65880 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -23,9 +23,10 @@ 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(UPDATE_ICON) -/obj/structure/tank_dispenser/update_icon() +/obj/structure/tank_dispenser/update_icon(updates=ALL) + . = ..() cut_overlays() switch(oxygentanks) if(1 to 3) @@ -69,7 +70,7 @@ if(!user.transferItemToLoc(I, src)) return to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/tank_dispenser/ui_state(mob/user) return GLOB.physical_state @@ -109,7 +110,7 @@ usr.put_in_hands(tank) oxygentanks-- . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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..96b932d81924 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(UPDATE_ICON) return @@ -152,7 +152,7 @@ continue S.forceMove(pod) playsound(src, 'sound/mecha/mechturn.ogg', 25 ,1) - pod.update_icon() + pod.update_appearance(UPDATE_ICON) 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..1e6b5a6575f5 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,8 @@ cargo = TRUE name = "transit tube cargo pod" -/obj/structure/transit_tube_pod/cargo/update_icon() +/obj/structure/transit_tube_pod/cargo/update_icon(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 99e985c417c3..67c13c99e0f6 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,8 @@ empty_pod() return ..() -/obj/structure/transit_tube_pod/update_icon() +/obj/structure/transit_tube_pod/update_icon(updates=ALL) + . = ..() if(contents.len) icon_state = "pod_occupied" else @@ -88,7 +89,7 @@ location = get_turf(src) for(var/atom/movable/M in contents) M.forceMove(location) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/transit_tube_pod/Process_Spacemove() if(moving) //No drifting while moving in the tubes @@ -176,7 +177,7 @@ if(direction == turn(station.boarding_dir,180)) if(station.open_status == STATION_TUBE_OPEN) mob.forceMove(loc) - update_icon() + update_appearance(UPDATE_ICON) else station.open_animation() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index d1c3f214b08d..e55d2ebd8db1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -14,7 +14,7 @@ /obj/structure/toilet/Initialize(mapload) . = ..() open = round(rand(0, 1)) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/toilet/attack_hand(mob/living/user) @@ -67,10 +67,11 @@ w_items -= I.w_class else open = !open - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/toilet/update_icon() +/obj/structure/toilet/update_icon(updates=ALL) + . = ..() icon_state = "toilet[open][cistern]" @@ -81,7 +82,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(UPDATE_ICON) else if(cistern) if(user.a_intent != INTENT_HARM) @@ -392,9 +393,10 @@ /obj/structure/curtain/proc/toggle() open = !open - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/curtain/update_icon() +/obj/structure/curtain/update_icon(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 f96d2a764bc1..1b65c2095d05 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -47,7 +47,8 @@ setDir(ini_dir) move_update_air(T) -/obj/structure/windoor_assembly/update_icon() +/obj/structure/windoor_assembly/update_icon(updates=ALL) + . = ..() icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]" /obj/structure/windoor_assembly/CanAllowThrough(atom/movable/mover, turf/target) @@ -309,7 +310,7 @@ return ..() //Update to reflect changes(if applicable) - update_icon() + update_appearance(UPDATE_ICON) @@ -339,7 +340,7 @@ /obj/structure/windoor_assembly/proc/after_rotation(mob/user) ini_dir = dir - update_icon() + update_appearance(UPDATE_ICON) //Flips the windoor assembly, determines whather the door opens to the left or the right /obj/structure/windoor_assembly/verb/flip() @@ -361,5 +362,5 @@ facing = "l" to_chat(usr, span_notice("The windoor will now slide to the left.")) - update_icon() + update_appearance(UPDATE_ICON) return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a1efbe1afd29..5c306ddcd2d7 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -326,12 +326,13 @@ //This proc is used to update the icons of nearby windows. /obj/structure/window/proc/update_nearby_icons() - update_icon() + update_appearance(UPDATE_ICON) if(smooth) queue_smooth_neighbors(src) //merges adjacent full-tile windows into one -/obj/structure/window/update_icon() +/obj/structure/window/update_icon(updates=ALL) + . = ..() if(!QDELETED(src)) if(!fulltile) return @@ -807,7 +808,7 @@ /obj/structure/window/reinforced/clockwork/ratvar_act() if(GLOB.ratvar_awakens) obj_integrity = max_integrity - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/window/reinforced/clockwork/narsie_act() take_damage(rand(25, 75), BRUTE) @@ -873,7 +874,7 @@ /obj/structure/window/paperframe/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/window/paperframe/examine(mob/user) . = ..() @@ -899,9 +900,10 @@ playsound(src, hitsound, 50, 1) if(!QDELETED(src)) user.visible_message(span_danger("[user] tears a hole in [src].")) - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/window/paperframe/update_icon() +/obj/structure/window/paperframe/update_icon(updates=ALL) + . = ..() if(obj_integrity < max_integrity) cut_overlay(paper) add_overlay(torn) @@ -926,10 +928,10 @@ qdel(W) user.visible_message("[user] patches some of the holes in \the [src].") if(obj_integrity == max_integrity) - update_icon() + update_appearance(UPDATE_ICON) return ..() - update_icon() + update_appearance(UPDATE_ICON) @@ -950,9 +952,10 @@ /obj/structure/cloth_curtain/proc/toggle() open = !open - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/cloth_curtain/update_icon() +/obj/structure/cloth_curtain/update_icon(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 8a361f3306a9..c7e25756775c 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -317,7 +317,7 @@ /turf/open/floor/grass/fairy/Initialize(mapload) . = ..() icon_state = "fairygrass[rand(1,4)]" - update_icon() + update_appearance(UPDATE_ICON) /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 64fe6c622ee7..d2c354833aa7 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -115,7 +115,8 @@ /turf/open/floor/blob_act(obj/structure/blob/B) return -/turf/open/floor/update_icon() +/turf/open/floor/update_icon(updates=ALL) + . = ..() update_visuals() return 1 @@ -164,7 +165,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(UPDATE_ICON) return W /turf/open/floor/attackby(obj/item/C, mob/user, params) @@ -285,7 +286,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(UPDATE_ICON) 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 +305,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(UPDATE_ICON) 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 3ae163c2e448..64cfc6ad6a27 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(UPDATE_ICON) /turf/open/floor/grass/attackby(obj/item/C, mob/user, params) if((C.tool_behaviour == TOOL_SHOVEL) && params) @@ -293,9 +293,10 @@ /turf/open/floor/carpet/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/turf/open/floor/carpet/update_icon() +/turf/open/floor/carpet/update_icon(updates=ALL) + . = ..() if(!..()) return 0 if(!broken && !burnt) @@ -402,11 +403,11 @@ /turf/open/floor/carpet/break_tile() broken = TRUE - update_icon() + update_appearance(UPDATE_ICON) /turf/open/floor/carpet/burn_tile() burnt = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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 75b94e76ea9c..0b33a56f5970 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) if(!length(lighttile_designs)) populate_lighttile_designs() @@ -43,7 +43,8 @@ light_range = 0 update_light() -/turf/open/floor/light/update_icon() +/turf/open/floor/light/update_icon(updates=ALL) + . = ..() ..() if(on) switch(state) @@ -79,7 +80,7 @@ if(!choice) return FALSE currentcolor = choice - update_icon() + update_appearance(UPDATE_ICON) /turf/open/floor/light/attack_ai(mob/user) if(!can_modify_colour) @@ -88,7 +89,7 @@ if(!choice) return FALSE currentcolor = choice - update_icon() + update_appearance(UPDATE_ICON) return attack_hand(user) /turf/open/floor/light/attackby(obj/item/C, mob/user, params) @@ -98,7 +99,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(UPDATE_ICON) 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 d575fdfb7347..eeef805e9ea7 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -23,7 +23,8 @@ icons = typelist("icons", icons) -/turf/open/floor/mineral/update_icon() +/turf/open/floor/mineral/update_icon(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 69254b140a13..b3b4ee14f990 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -20,14 +20,15 @@ /turf/open/floor/circuit/Initialize(mapload) SSmapping.nuke_tiles += src - update_icon() + update_appearance(UPDATE_ICON) . = ..() /turf/open/floor/circuit/Destroy() SSmapping.nuke_tiles -= src return ..() -/turf/open/floor/circuit/update_icon() +/turf/open/floor/circuit/update_icon(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..d47d9e49b5d2 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -13,7 +13,8 @@ new /obj/effect/glowing_rune(src) ChangeTurf(/turf/open/floor/plating/rust) -/turf/open/floor/plasteel/update_icon() +/turf/open/floor/plasteel/update_icon(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 a4907cbc81de..b639e4b35807 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -44,7 +44,8 @@ else icon_plating = initial(icon_state) -/turf/open/floor/plating/update_icon() +/turf/open/floor/plating/update_icon(updates=ALL) + . = ..() if(!..()) return if(!broken && !burnt) diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index e092293e435a..45c84de560fc 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -93,9 +93,10 @@ if(hardness <= 0) gets_drilled(user,triggered_by_explosion) else - update_icon() + update_appearance(UPDATE_ICON) -/turf/closed/mineral/update_icon() +/turf/closed/mineral/update_icon(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 5b87b9094dfd..a410cde0af7e 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) to_chat(user, span_notice("You tighten the bolts anchoring the support rods.")) return 1 @@ -186,12 +186,13 @@ if(!istype(src, /turf/closed/wall/r_wall) || d_state != SHEATH) return TRUE d_state = SUPPORT_RODS - update_icon() + update_appearance(UPDATE_ICON) to_chat(user, span_notice("You weld the support rods back together.")) return 1 return 0 -/turf/closed/wall/r_wall/update_icon() +/turf/closed/wall/r_wall/update_icon(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 fbd722e33640..7b5274c70453 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(UPDATE_ICON) RegisterSignal(src, COMSIG_TURF_RESERVATION_RELEASED, PROC_REF(launch_contents)) /turf/open/space/transit/Destroy() @@ -67,7 +67,8 @@ /turf/open/space/transit/east dir = EAST -/turf/open/space/transit/update_icon() +/turf/open/space/transit/update_icon(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 edaf2ed31fe9..ccfdb6b73a3f 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -32,7 +32,8 @@ return FALSE return TRUE -/obj/machinery/ntnet_relay/update_icon() +/obj/machinery/ntnet_relay/update_icon(updates=ALL) + . = ..() cut_overlays() if(is_operational()) var/mutable_appearance/on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") @@ -49,7 +50,7 @@ else use_power = IDLE_POWER_USE - update_icon() + update_appearance(UPDATE_ICON) if(dos_overload > 0) dos_overload = max(0, dos_overload - dos_dissipate * delta_time) @@ -57,12 +58,12 @@ // If DoS traffic exceeded capacity, crash. if((dos_overload > dos_capacity) && !dos_failure) dos_failure = 1 - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) SSnetworks.station_network.add_log("Quantum relay switched from overload recovery mode to normal operation mode.") ..() @@ -89,13 +90,13 @@ if("restart") dos_overload = 0 dos_failure = 0 - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) return TRUE /obj/machinery/ntnet_relay/Initialize(mapload) diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 154cbd61fd30..e2f9eab725c0 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(UPDATE_ICON) /obj/machinery/vr_sleeper/attackby(obj/item/I, mob/user, params) if(!state_open && !occupant) @@ -61,7 +61,8 @@ sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) -/obj/machinery/vr_sleeper/update_icon() +/obj/machinery/vr_sleeper/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" /obj/machinery/vr_sleeper/open_machine() diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 1e05e75f80c2..d02738d80ecd 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(UPDATE_ICON) else H.equip_to_slot(id,ITEM_SLOT_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(UPDATE_ICON) 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..5d2c9bf6563d 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(UPDATE_ICON) diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 9fcca9388dbf..5592fadc16e8 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -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/update_icon() 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 567636e03180..dbcdbd8075be 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -405,7 +405,8 @@
    Congratulations! You are now trained for invasive xenobiology research!"} -/obj/item/paper/guides/antag/abductor/update_icon() +/obj/item/paper/guides/antag/abductor/update_icon(updates=ALL) + . = ..() return /obj/item/paper/guides/antag/abductor/AltClick() @@ -442,9 +443,10 @@ 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(UPDATE_ICON) -/obj/item/abductor/baton/update_icon() +/obj/item/abductor/baton/update_icon(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 74fd4e93cdff..a0a6dcbfc614 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -50,7 +50,8 @@ else holder.icon_state = "hudgland_spent" -/obj/item/organ/heart/gland/update_icon() +/obj/item/organ/heart/gland/update_icon(updates=ALL) + . = ..() return // stop it from switching to the non existent heart_on sprite /obj/item/organ/heart/gland/proc/mind_control(command, mob/living/user) diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index af79d3d5e118..4dc494e2c95c 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -183,7 +183,8 @@ SSjob.SendToLateJoin(H, FALSE) return -/obj/machinery/abductor/experiment/update_icon() +/obj/machinery/abductor/experiment/update_icon(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 fb81ebac4274..3698fdeafc78 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(UPDATE_ICON) 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 73ffff293882..3a089efc6474 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(UPDATE_ICON) return ..() diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index eb3d55cdad08..2d00eb9ab763 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(UPDATE_ICON) 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(UPDATE_ICON) //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..214cb9dcd6c7 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(UPDATE_ICON) 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(UPDATE_ICON) 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 5482732d13b7..edf7fe0db559 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(UPDATE_ICON) 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_icon(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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) B.setDir(dir) qdel(src) return B @@ -344,7 +344,8 @@ return "Currently weak to brute damage." return "N/A" -/obj/structure/blob/normal/update_icon() +/obj/structure/blob/normal/update_icon(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 1cecdc9f8e16..7c260ae5f88e 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -15,17 +15,18 @@ GLOB.blob_cores += src START_PROCESSING(SSobj, src) GLOB.poi_list |= src - update_icon() //so it atleast appears + update_appearance(UPDATE_ICON) //so it atleast appears if(!placed && !overmind) return INITIALIZE_HINT_QDEL if(overmind) - update_icon() + update_appearance(UPDATE_ICON) return ..() /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_icon(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 f9c3b48eb84b..b0a4cf4093b9 100644 --- a/code/modules/antagonists/blob/structures/node.dm +++ b/code/modules/antagonists/blob/structures/node.dm @@ -18,7 +18,8 @@ /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_icon(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..d2ec0c51037e 100644 --- a/code/modules/antagonists/blob/structures/shield.dm +++ b/code/modules/antagonists/blob/structures/shield.dm @@ -19,7 +19,8 @@ /obj/structure/blob/shield/core point_return = 0 -/obj/structure/blob/shield/update_icon() +/obj/structure/blob/shield/update_icon(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..5e5d7ab1fc40 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(UPDATE_ICON) 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 fe9b83f2c7d6..029e73b6dd11 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(UPDATE_ICON) 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 c639c21c7b33..16eec3661a74 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -316,7 +316,7 @@ return icon_state = initial(icon_state) + (awoken ? "_idle" : "_awaken") - update_icon() + update_appearance(UPDATE_ICON) var/rankspent switch(bloodsuckerdatum.clanprogress) if(0) @@ -395,7 +395,8 @@ . = ..() anchored = FALSE -/obj/structure/bloodsucker/moldingstone/update_icon() +/obj/structure/bloodsucker/moldingstone/update_icon(updates=ALL) + . = ..() cut_overlays() switch(metal) if(1 to 5) @@ -427,7 +428,7 @@ balloon_alert(user, "added [metal] metal") if(istype(I, /obj/item/bloodsucker/chisel)) start_sculpiting(user) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/bloodsucker/moldingstone/proc/start_sculpiting(mob/living/artist) if(metal < 10) @@ -440,7 +441,7 @@ if(!do_after(artist, 10 SECONDS, src)) artist.balloon_alert(artist, "ruined!") metal -= rand(5, 10) - update_icon() + update_appearance(UPDATE_ICON) return artist.balloon_alert(artist, "done, a masterpiece!") @@ -464,7 +465,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(UPDATE_ICON) #undef METALLIMIT /obj/structure/bloodsucker/bloodstatue @@ -710,7 +711,7 @@ playsound(loc, 'sound/effects/pop_expl.ogg', 25, 1) density = TRUE - update_icon() + update_appearance(UPDATE_ICON) // Set up Torture stuff now convert_progress = 3 @@ -746,7 +747,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(UPDATE_ICON) return TRUE /obj/structure/bloodsucker/vassalrack/attack_hand(mob/user, list/modifiers) @@ -807,10 +808,11 @@ smallmeat++ meat_amount = bigmeat + intermeat + mediummeat + smallmeat qdel(I) - update_icon() + update_appearance(UPDATE_ICON) #undef MEATLIMIT -/obj/structure/bloodsucker/vassalrack/update_icon() +/obj/structure/bloodsucker/vassalrack/update_icon(updates=ALL) + . = ..() cut_overlays() if(bigmeat) add_overlay("bigmeat_[bigmeat]") @@ -849,7 +851,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(UPDATE_ICON) /** * Step One: Tick Down Conversion from 3 to 0 @@ -1149,7 +1151,7 @@ if(bigmeat && meatlost == 4) bigmeat-- meatlost -= 4 - update_icon() + update_appearance(UPDATE_ICON) meat_amount = bigmeat + intermeat + mediummeat + smallmeat //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1183,7 +1185,8 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/structure/bloodsucker/candelabrum/update_icon() +/obj/structure/bloodsucker/candelabrum/update_icon(updates=ALL) + . = ..() icon_state = "candelabrum[lit ? "_lit" : ""]" return ..() @@ -1208,7 +1211,7 @@ else set_light(0) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/bloodsucker/candelabrum/process() if(!lit) @@ -1284,7 +1287,7 @@ if(!buckle_mob(target)) return - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/bloodsucker/candelabrum/proc/remove_loyalties(mob/living/target, mob/living/user) // Find Mindshield implant & destroy, takes a good while. @@ -1296,7 +1299,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(UPDATE_ICON) /// 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/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 400a1f0cba1a..04e4265543d7 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/effect/clockwork/sigil/transmission/ex_act(severity) if(severity == 3) @@ -242,7 +242,8 @@ return FALSE return TRUE -/obj/effect/clockwork/sigil/transmission/update_icon() +/obj/effect/clockwork/sigil/transmission/update_icon(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..9049148c6098 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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/stock_parts/cell/power_drain(clockcult_user) if(charge) . = min(charge, MIN_CLOCKCULT_POWER*3) charge = use(.) - update_icon() + update_appearance(UPDATE_ICON) /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..1f59ddc1c2cb 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(UPDATE_ICON) 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_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm index 35d628814b22..3314555dfc43 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(UPDATE_ICON) 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 74c0b5bd29c7..e432d48eb1e7 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -384,7 +384,8 @@ max = 40 prefix = "darkened" -/obj/item/sharpener/cult/update_icon() +/obj/item/sharpener/cult/update_icon(updates=ALL) + . = ..() icon_state = "cult_sharpener[used ? "_used" : ""]" /obj/item/clothing/suit/hooded/cultrobes/cult_shield @@ -690,7 +691,8 @@ GLOBAL_VAR_INIT(curselimit, 0) qdel(spear_act) ..() -/obj/item/twohanded/cult_spear/update_icon() +/obj/item/twohanded/cult_spear/update_icon(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 d1d13d45a883..359c3d9674e5 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(UPDATE_ICON) /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_icon(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(UPDATE_ICON) /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(UPDATE_ICON) /obj/structure/destructible/cult/bloodstone/ex_act(severity) switch(severity) @@ -470,7 +471,8 @@ else T.narsie_act(TRUE, TRUE) -/obj/structure/destructible/cult/bloodstone/update_icon() +/obj/structure/destructible/cult/bloodstone/update_icon(updates=ALL) + . = ..() icon_state = "bloodstone-[current_fullness]" cut_overlays() var/image/I_base = image('icons/obj/cult_64x64.dmi',"bloodstone-base") @@ -500,7 +502,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(UPDATE_ICON) /obj/structure/destructible/cult/bloodstone/conceal() //lol return diff --git a/code/modules/antagonists/eldritch_cult/eldritch_book.dm b/code/modules/antagonists/eldritch_cult/eldritch_book.dm index 75f4bb92702a..041b056a6533 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(UPDATE_ICON) // 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 5a93e1632aa0..1650f38ac392 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm @@ -759,7 +759,7 @@ pixel_y = rand(-6,6) pixel_x = rand(-6,6) icon_state = "small_rune_[rand(12)]" - update_icon() + update_appearance(UPDATE_ICON) // 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 6477ecc6b202..503e6326003d 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) START_PROCESSING(SSobj, core) return TRUE @@ -179,7 +179,8 @@ else return NUKE_OFF_UNLOCKED -/obj/machinery/nuclearbomb/update_icon() +/obj/machinery/nuclearbomb/update_icon(updates=ALL) + . = ..() if(deconstruction_state == NUKESTATE_INTACT) switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) @@ -197,7 +198,7 @@ update_icon_interior() update_icon_lights() -/obj/machinery/nuclearbomb/proc/update_icon_interior() +/obj/machinery/nuclearbomb/update_icon_interior() cut_overlay(interior) switch(deconstruction_state) if(NUKESTATE_UNSCREWED) @@ -214,7 +215,7 @@ return add_overlay(interior) -/obj/machinery/nuclearbomb/proc/update_icon_lights() +/obj/machinery/nuclearbomb/update_icon_lights() if(lights) cut_overlay(lights) switch(get_nuke_state()) @@ -408,7 +409,7 @@ timing = FALSE detonation_timer = null countdown.stop() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/nuclearbomb/proc/set_active() if(safety) @@ -429,7 +430,7 @@ S.switch_mode_to(initial(S.mode)) S.alert = FALSE countdown.stop() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/nuclearbomb/proc/get_time_left() if(timing) @@ -456,7 +457,7 @@ exploding = TRUE yes_code = FALSE safety = TRUE - update_icon() + update_appearance(UPDATE_ICON) sound_to_playing_players('sound/machines/alarm.ogg') if(SSticker && SSticker.mode) SSticker.roundend_check_paused = TRUE @@ -563,7 +564,7 @@ S.switch_mode_to(initial(S.mode)) S.alert = FALSE countdown.stop() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/nuclearbomb/beer/proc/fizzbuzz() var/datum/reagents/R = new/datum/reagents(1000) diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm index 709cb0f00b29..2d9425074c9d 100644 --- a/code/modules/antagonists/revolution/revolution.dm +++ b/code/modules/antagonists/revolution/revolution.dm @@ -140,7 +140,7 @@ to_chat(admin, span_danger("Repairing flash failed!")) else flash.burnt_out = FALSE - flash.update_icon() + flash.update_appearance(UPDATE_ICON) /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 5493f5eefb60..21032abf8445 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -75,7 +75,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "demon_heart-on" -/obj/item/organ/heart/demon/update_icon() +/obj/item/organ/heart/demon/update_icon(updates=ALL) + . = ..() return //always beating visually /obj/item/organ/heart/demon/attack(mob/M, mob/living/carbon/user, obj/target) diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm index abea49d42908..d9b6d332bd86 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(UPDATE_ICON) 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..51a49364c0b8 100644 --- a/code/modules/antagonists/zombie/abilities/spit.dm +++ b/code/modules/antagonists/zombie/abilities/spit.dm @@ -12,7 +12,8 @@ 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_icon(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 e72de7fe9e5e..43045ad9cb83 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -11,7 +11,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(UPDATE_ICON) var/secured = TRUE var/list/attached_overlays = null var/obj/item/assembly_holder/holder = null @@ -82,7 +82,7 @@ /obj/item/assembly/proc/toggle_secure() secured = !secured - update_icon() + update_appearance(UPDATE_ICON) return secured diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm index 8eff567fcb1a..22399760526a 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(UPDATE_ICON) 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 1fae39be6571..b951a5c59700 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -57,7 +57,7 @@ attached_overlays += flashing_overlay addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), 5) if(holder) - holder.update_icon() + holder.update_appearance(UPDATE_ICON) /obj/item/assembly/flash/proc/clown_check(mob/living/carbon/human/user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) @@ -68,7 +68,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(UPDATE_ICON) 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..4e02aa6ec716 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(UPDATE_ICON) 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 3c983852d139..397f279023e3 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -23,7 +23,7 @@ attach(A,user) attach(A2,user) name = "[A.name]-[A2.name] assembly" - update_icon() + update_appearance(UPDATE_ICON) 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) @@ -40,7 +40,8 @@ a_right = A A.holder_movement() -/obj/item/assembly_holder/update_icon() +/obj/item/assembly_holder/update_icon(updates=ALL) + . = ..() cut_overlays() if(a_left) add_overlay("[a_left.icon_state]_left") @@ -81,7 +82,7 @@ add_overlay(right) if(master) - master.update_icon() + master.update_appearance(UPDATE_ICON) /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 82c6fd03c3e5..434a75546283 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -36,7 +36,7 @@ return FALSE //Cooldown check on = !on refreshBeam() - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/item/assembly/infra/toggle_secure() @@ -47,10 +47,11 @@ else QDEL_LIST(beams) STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) return secured -/obj/item/assembly/infra/update_icon() +/obj/item/assembly/infra/update_icon(updates=ALL) + . = ..() cut_overlays() attached_overlays = list() if(on) @@ -61,7 +62,7 @@ attached_overlays += "infrared_visible" if(holder) - holder.update_icon() + holder.update_appearance(UPDATE_ICON) return /obj/item/assembly/infra/dropped() @@ -204,7 +205,7 @@ visible = !visible . = TRUE - update_icon() + update_appearance(UPDATE_ICON) refreshBeam() /***************************IBeam*********************************/ diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 6266ccaf3595..0d55516b4364 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -22,16 +22,17 @@ 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(UPDATE_ICON) playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) -/obj/item/assembly/mousetrap/update_icon() +/obj/item/assembly/mousetrap/update_icon(updates=ALL) + . = ..() if(armed) icon_state = "mousetraparmed" else icon_state = "mousetrap" if(holder) - holder.update_icon() + holder.update_appearance(UPDATE_ICON) /obj/item/assembly/mousetrap/proc/triggered(mob/target, type = "feet") if(!armed) @@ -42,7 +43,7 @@ if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) playsound(src, 'sound/effects/snap.ogg', 50, TRUE) armed = FALSE - update_icon() + update_appearance(UPDATE_ICON) pulse(FALSE) return FALSE switch(type) @@ -69,7 +70,7 @@ M.splat() playsound(src, 'sound/effects/snap.ogg', 50, TRUE) armed = FALSE - update_icon() + update_appearance(UPDATE_ICON) pulse(FALSE) @@ -87,7 +88,7 @@ return to_chat(user, span_notice("You disarm [src].")) armed = !armed - update_icon() + update_appearance(UPDATE_ICON) playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index ae7b26bef1da..f741cf0d8d08 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/assembly/prox_sensor/proc/sensitivity_change(value) var/sense = min(max(sensitivity + value, 0), 5) @@ -92,7 +92,8 @@ if(scanning && proximity_monitor.SetRange(sense)) sense() -/obj/item/assembly/prox_sensor/update_icon() +/obj/item/assembly/prox_sensor/update_icon(updates=ALL) + . = ..() cut_overlays() attached_overlays = list() if(timing) @@ -102,7 +103,7 @@ add_overlay("prox_scanning") attached_overlays += "prox_scanning" if(holder) - holder.update_icon() + holder.update_appearance(UPDATE_ICON) return /obj/item/assembly/prox_sensor/ui_status(mob/user) @@ -140,7 +141,7 @@ . = TRUE if("time") timing = !timing - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("input") var/value = text2num(params["adjust"]) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index d549dba6d50a..32931ef6f261 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -44,9 +44,10 @@ signal() return TRUE -/obj/item/assembly/signaler/update_icon() +/obj/item/assembly/signaler/update_icon(updates=ALL) + . = ..() if(holder) - holder.update_icon() + holder.update_appearance(UPDATE_ICON) return /obj/item/assembly/signaler/ui_status(mob/user) @@ -104,9 +105,9 @@ else idx++ label_color = label_colors[idx] - update_icon() + update_appearance(UPDATE_ICON) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/assembly/signaler/attackby(obj/item/W, mob/user, params) if(issignaler(W)) @@ -116,7 +117,7 @@ set_frequency(signaler2.frequency) // yogs start - signaller colors label_color = signaler2.label_color - update_icon() + update_appearance(UPDATE_ICON) // 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 0861f88d4eb9..3c2153084960 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(UPDATE_ICON) return TRUE @@ -48,7 +48,7 @@ else timing = FALSE STOP_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/assembly/timer/process(delta_time) @@ -76,14 +76,15 @@ time = saved_time -/obj/item/assembly/timer/update_icon() +/obj/item/assembly/timer/update_icon(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(UPDATE_ICON) /obj/item/assembly/timer/ui_status(mob/user) if(is_secured(user)) @@ -115,7 +116,7 @@ timing = !timing if(timing && istype(holder, /obj/item/transfer_valve)) log_bomber(usr, "activated a", src, "attachment on [holder]") - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("repeat") loop = !loop diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 8b9ba4a59fdc..c1d4ed3203ea 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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) if(WIRE_AI) if(!wires.is_cut(WIRE_AI)) aidisabled = FALSE @@ -630,7 +630,8 @@ "set_internal_pressure" = 0 ), signal_source) -/obj/machinery/airalarm/update_icon() +/obj/machinery/airalarm/update_icon(updates=ALL) + . = ..() if(panel_open) switch(buildstage) if(2) @@ -724,7 +725,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(UPDATE_ICON) /obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) switch(buildstage) @@ -734,13 +735,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(UPDATE_ICON) 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(UPDATE_ICON) return else if(W.GetID())// trying to unlock the interface with an ID card togglelock(user) @@ -759,7 +760,7 @@ new /obj/item/electronics/airalarm( src.loc ) playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) buildstage = 0 - update_icon() + update_appearance(UPDATE_ICON) return if(istype(W, /obj/item/stack/cable_coil)) @@ -780,14 +781,14 @@ shorted = 0 post_alert(0) buildstage = 2 - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) qdel(W) return @@ -798,7 +799,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(UPDATE_ICON) return if(W.tool_behaviour == TOOL_WRENCH) @@ -828,7 +829,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(UPDATE_ICON) return TRUE return FALSE diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index ce6d38b8a42d..aa5d64062e76 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -117,13 +117,14 @@ GLOBAL_LIST_EMPTY(pipeimages) if(can_be_node(target, i)) nodes[i] = target break - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/proc/setPipingLayer(new_layer) piping_layer = (pipe_flags & PIPING_DEFAULT_LAYER_ONLY) ? PIPING_LAYER_DEFAULT : new_layer - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/atmospherics/update_icon() +/obj/machinery/atmospherics/update_icon(updates=ALL) + . = ..() layer = initial(layer) + piping_layer / 1000 return ..() @@ -175,7 +176,7 @@ GLOBAL_LIST_EMPTY(pipeimages) var/obj/machinery/atmospherics/pipe/P = reference P.destroy_network() nodes[nodes.Find(reference)] = null - update_icon() + update_appearance(UPDATE_ICON) /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 861f457062fd..5e1428559345 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(UPDATE_ICON) ..() /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 e4510f592166..0efa3051ad6e 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(UPDATE_ICON) AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) /obj/machinery/atmospherics/components/binary/circulator/Destroy() @@ -79,7 +79,8 @@ ..() update_icon_nopipes() -/obj/machinery/atmospherics/components/binary/circulator/update_icon() +/obj/machinery/atmospherics/components/binary/circulator/update_icon(updates=ALL) + . = ..() cut_overlays() if(anchored) @@ -185,7 +186,7 @@ node2.addMember(src) SSair.add_to_rebuild_queue(src) - update_icon() + update_appearance(UPDATE_ICON) return TRUE @@ -254,7 +255,7 @@ generator.cold_circ = null else generator.hot_circ = null - generator.update_icon() + generator.update_appearance(UPDATE_ICON) generator = null /obj/machinery/atmospherics/components/binary/circulator/setPipingLayer(new_layer) @@ -278,5 +279,5 @@ /obj/machinery/atmospherics/components/binary/circulator/obj_break(damage_flag) if(generator) generator.kill_circs() - generator.update_icon() + generator.update_appearance(UPDATE_ICON) ..() 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..607797d55d5a 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(UPDATE_ICON) /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..01ec68fa1c20 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) /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..7d3c7949b7d7 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/machinery/atmospherics/components/binary/pressure_valve/atmosinit() . = ..() @@ -147,7 +147,7 @@ return broadcast_status() - update_icon() + update_appearance(UPDATE_ICON) /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..76f2b98782d7 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/machinery/atmospherics/components/binary/pump/atmosinit() ..() @@ -168,7 +168,7 @@ return broadcast_status() - update_icon() + update_appearance(UPDATE_ICON) /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..72b17e5a29c6 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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..3a489e3821af 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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..9092deda1252 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) /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 edb0f39239ab..117795926328 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -24,7 +24,8 @@ /obj/machinery/atmospherics/components/proc/update_icon_nopipes() return -/obj/machinery/atmospherics/components/update_icon() +/obj/machinery/atmospherics/components/update_icon(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..62b21c59dffa 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -52,7 +52,7 @@ if(tool.use_tool(src, user, 10 SECONDS, volume=30, amount=5)) balloon_alert(user, "repaired") cracked = FALSE - update_icon() + update_appearance(UPDATE_ICON) update_overlays() /obj/machinery/atmospherics/components/unary/hypertorus/default_change_direction_wrench(mob/user, obj/item/I) @@ -72,7 +72,8 @@ node.addMember(src) SSair.add_to_rebuild_queue(src) -/obj/machinery/atmospherics/components/unary/hypertorus/update_icon() +/obj/machinery/atmospherics/components/unary/hypertorus/update_icon(updates=ALL) + . = ..() . = ..() if(panel_open) icon_state = icon_state_open @@ -82,6 +83,7 @@ icon_state = icon_state_off /obj/machinery/atmospherics/components/unary/hypertorus/proc/update_overlays() + . = ..() if(!cracked) return @@ -153,7 +155,8 @@ return return ..() -/obj/machinery/hypertorus/update_icon() +/obj/machinery/hypertorus/update_icon(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..c6d822718456 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(UPDATE_ICON) linked_interface.active = TRUE - linked_interface.update_icon() + linked_interface.update_appearance(UPDATE_ICON) RegisterSignal(linked_interface, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_input.active = TRUE - linked_input.update_icon() + linked_input.update_appearance(UPDATE_ICON) RegisterSignal(linked_input, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_output.active = TRUE - linked_output.update_icon() + linked_output.update_appearance(UPDATE_ICON) RegisterSignal(linked_output, COMSIG_PARENT_QDELETING, PROC_REF(unregister_signals)) linked_moderator.active = TRUE - linked_moderator.update_icon() + linked_moderator.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) if(linked_interface) linked_interface.active = FALSE - linked_interface.update_icon() + linked_interface.update_appearance(UPDATE_ICON) linked_interface = null if(linked_input) linked_input.active = FALSE - linked_input.update_icon() + linked_input.update_appearance(UPDATE_ICON) linked_input = null if(linked_output) linked_output.active = FALSE - linked_output.update_icon() + linked_output.update_appearance(UPDATE_ICON) linked_output = null if(linked_moderator) linked_moderator.active = FALSE - linked_moderator.update_icon() + linked_moderator.update_appearance(UPDATE_ICON) linked_moderator = null if(corners.len) for(var/obj/machinery/hypertorus/corner/corner in corners) corner.active = FALSE - corner.update_icon() + corner.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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 ec56fa1788a7..590db0133660 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(UPDATE_ICON) 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,13 @@ 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 +93,8 @@ else icon_state = "[base_icon]-off" -/obj/machinery/atmospherics/components/binary/crystallizer/update_icon() +/obj/machinery/atmospherics/components/binary/crystallizer/update_icon(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(UPDATE_ICON) ///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(UPDATE_ICON) #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..38191eb090a0 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(UPDATE_ICON) 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(UPDATE_ICON) return ..() /obj/machinery/atmospherics/components/trinary/filter/proc/set_frequency(new_frequency) @@ -44,7 +44,8 @@ SSradio.remove_object(src,frequency) return ..() -/obj/machinery/atmospherics/components/trinary/filter/update_icon() +/obj/machinery/atmospherics/components/trinary/filter/update_icon(updates=ALL) + . = ..() cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) @@ -194,7 +195,7 @@ investigate_log(msg, INVESTIGATE_ATMOS) investigate_log(msg, INVESTIGATE_SUPERMATTER) // yogs - make supermatter invest useful . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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..3b2381225198 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(UPDATE_ICON) return ..() /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) @@ -28,10 +28,11 @@ 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(UPDATE_ICON) return ..() -/obj/machinery/atmospherics/components/trinary/mixer/update_icon() +/obj/machinery/atmospherics/components/trinary/mixer/update_icon(updates=ALL) + . = ..() cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) @@ -173,7 +174,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(UPDATE_ICON) /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 19a3c017abca..015b1cfad79d 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(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/cryo_cell/on_construction() ..(dir, dir) @@ -102,7 +102,8 @@ beaker.forceMove(drop_location()) beaker = null -/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() +/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon(updates=ALL) + . = ..() cut_overlays() if(panel_open) @@ -181,7 +182,7 @@ return if(!is_operational()) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) return if(!occupant) return @@ -198,7 +199,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(UPDATE_ICON) return var/robotic_limb_damage = 0 // brute and burn damage to robotic limbs @@ -223,7 +224,7 @@ treating_wounds = has_cryo_wound if(!treating_wounds) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors. var/msg = "Patient fully restored." if(robotic_limb_damage) @@ -270,7 +271,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(UPDATE_ICON) return if(occupant) @@ -310,7 +311,7 @@ var/mob/living/L = M L.update_mobility() occupant = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/user) treating_wounds = FALSE @@ -371,7 +372,7 @@ || default_change_direction_wrench(user, I) \ || default_pry_open(I) \ || default_deconstruction_crowbar(I)) - update_icon() + update_appearance(UPDATE_ICON) return else if(I.tool_behaviour == TOOL_SCREWDRIVER) to_chat(user, "You can't access the maintenance panel while the pod is " \ @@ -465,7 +466,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(UPDATE_ICON) /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 +512,7 @@ on = FALSE else if(!state_open) on = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/cryo_cell/AltClick(mob/user) if(!user.canUseTopic(src, !issilicon(user))) @@ -522,6 +523,6 @@ close_machine() else open_machine() - update_icon() + update_appearance(UPDATE_ICON) #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..1ca74980ddd4 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,8 @@ 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_icon(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..368e9274af67 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(UPDATE_ICON) 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(UPDATE_ICON) return ..() /obj/machinery/atmospherics/components/unary/outlet_injector/Destroy() @@ -145,7 +145,7 @@ spawn(2) broadcast_status() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) // mapping diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 62c5ef10b2ad..d8ac5b453adc 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -39,7 +39,8 @@ B += M.rating heat_capacity = 5000 * ((B - 1) ** 2) -/obj/machinery/atmospherics/components/unary/thermomachine/update_icon() +/obj/machinery/atmospherics/components/unary/thermomachine/update_icon(updates=ALL) + . = ..() cut_overlays() if(panel_open) @@ -68,7 +69,7 @@ if(can_interact(user)) on = !on investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - update_icon() + update_appearance(UPDATE_ICON) return ..() /obj/machinery/atmospherics/components/unary/thermomachine/AltClick(mob/living/user) @@ -183,7 +184,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(UPDATE_ICON) /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..db73b2ea8a45 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(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/hide(intact) - update_icon() + update_appearance(UPDATE_ICON) ..(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..986accee0521 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) 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 672fa9af62c9..2729cb4f456a 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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 b6a6290539d9..886c83ceccc1 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(UPDATE_ICON) /obj/machinery/atmospherics/miner/proc/set_broken(setting) if(broken != setting) broken = setting - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/miner/proc/update_power() if(!active) @@ -108,7 +108,8 @@ return TRUE return FALSE -/obj/machinery/atmospherics/miner/update_icon() +/obj/machinery/atmospherics/miner/update_icon(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..90f2cc47bf89 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/junction.dm @@ -30,7 +30,8 @@ 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_icon(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..8f81fafd0ff2 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm @@ -26,7 +26,8 @@ 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_icon(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..0379be8fe355 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm @@ -24,7 +24,8 @@ /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_icon(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..f3f472efb7e1 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/simple.dm @@ -24,7 +24,8 @@ if(EAST, WEST) initialize_directions = EAST|WEST -/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon() +/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon(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 40eeb619ba4f..14b95da4d789 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_icon(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(UPDATE_ICON) 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(UPDATE_ICON) /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 e051cf04f92f..3ecdaa8246e3 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(mapload) because these values are used in update_icon() +/* We use New() instead of Initialize(mapload) because these values are used in update_appearance(UPDATE_ICON) * in the mapping subsystem init before Initialize(mapload) 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,8 @@ initialize_directions = NORTH|SOUTH|EAST|WEST initialize_directions &= ~dir -/obj/machinery/atmospherics/pipe/manifold/update_icon() +/obj/machinery/atmospherics/pipe/manifold/update_icon(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..73030a5698fa 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -29,7 +29,8 @@ /obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections() initialize_directions = initial(initialize_directions) -/obj/machinery/atmospherics/pipe/manifold4w/update_icon() +/obj/machinery/atmospherics/pipe/manifold4w/update_icon(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..22f5650198dc 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(UPDATE_ICON) /obj/machinery/atmospherics/pipe/proc/releaseAirToTurf() if(air_temporary) @@ -98,7 +98,8 @@ qdel(meter) . = ..() -/obj/machinery/atmospherics/pipe/update_icon() +/obj/machinery/atmospherics/pipe/update_icon(updates=ALL) + . = ..() . = ..() update_alpha() @@ -109,7 +110,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(UPDATE_ICON) /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..3ac2daf18e06 100644 --- a/code/modules/atmospherics/machinery/pipes/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple.dm @@ -32,7 +32,8 @@ if(EAST, WEST) initialize_directions = EAST|WEST -/obj/machinery/atmospherics/pipe/simple/update_icon() +/obj/machinery/atmospherics/pipe/simple/update_icon(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 632d2a6ed27c..fb6227a91a20 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -236,7 +236,7 @@ timing = !timing if(timing) valve_timer = world.time + (timer_set * 10) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/canister/proto name = "prototype canister" @@ -274,7 +274,7 @@ /obj/machinery/portable_atmospherics/canister/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/canister/Destroy() qdel(pump) @@ -308,7 +308,8 @@ #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_icon(updates=ALL) + . = ..() if(stat & BROKEN) cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) @@ -476,7 +477,7 @@ if(.) if(close_valve) valve_open = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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) @@ -501,7 +502,7 @@ pump.airs[1] = null pump.airs[2] = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/canister/ui_state(mob/user) return GLOB.physical_state @@ -647,7 +648,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(UPDATE_ICON) /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..53764eb0bc1a 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(UPDATE_ICON) return TRUE /obj/machinery/portable_atmospherics/Move() @@ -86,7 +86,7 @@ connected_port = null pixel_x = 0 pixel_y = 0 - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/portable_atmospherics/AltClick(mob/living/user) @@ -111,7 +111,7 @@ holding = new_tank else holding = null - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) else return ..() diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index c5558ef62a09..d0bf6f63f115 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -29,7 +29,8 @@ QDEL_NULL(pump) return ..() -/obj/machinery/portable_atmospherics/pump/update_icon() +/obj/machinery/portable_atmospherics/pump/update_icon(updates=ALL) + . = ..() icon_state = "psiphon:[on]" cut_overlays() @@ -67,7 +68,7 @@ if(prob(100 / severity)) direction = PUMP_OUT pump.target_pressure = rand(0, 100 * ONE_ATMOSPHERE) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/pump/replace_tank(mob/living/user, close_valve) . = ..() @@ -75,7 +76,7 @@ if(close_valve) if(on) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) else if(on && holding && direction == PUMP_OUT) investigate_log("[key_name(user)] started a transfer into [holding].
    ", INVESTIGATE_ATMOS) @@ -153,10 +154,10 @@ if(holding) replace_tank(usr, FALSE) . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/pump/CtrlShiftClick(mob/user) if(!user.canUseTopic(src, BE_CLOSE)) return on = !on - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 6d9e143dbfcc..6277805c345e 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -36,7 +36,8 @@ air_update_turf() return ..() -/obj/machinery/portable_atmospherics/scrubber/update_icon() +/obj/machinery/portable_atmospherics/scrubber/update_icon(updates=ALL) + . = ..() icon_state = "pscrubber:[on]" cut_overlays() @@ -79,7 +80,7 @@ if(is_operational()) if(prob(50 / severity)) on = !on - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -113,7 +114,7 @@ if(close_valve) if(on) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) else if(on && holding) investigate_log("[key_name(user)] started a transfer into [holding].
    ", INVESTIGATE_ATMOS) @@ -131,7 +132,7 @@ if("toggle_filter") scrubbing ^= gas_id2path(params["val"]) . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/portable_atmospherics/scrubber/huge name = "huge air scrubber" @@ -149,13 +150,14 @@ /obj/machinery/portable_atmospherics/scrubber/huge/movable movable = TRUE -/obj/machinery/portable_atmospherics/scrubber/huge/update_icon() +/obj/machinery/portable_atmospherics/scrubber/huge/update_icon(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(UPDATE_ICON) use_power = on ? ACTIVE_POWER_USE : IDLE_POWER_USE if(!on) return @@ -176,4 +178,4 @@ if(!user.canUseTopic(src, BE_CLOSE)) return on = !on - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index c183a67a633d..278eb22ed8d5 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(mapload) randomspawns = GLOB.awaydestinations - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) active = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/gateway/proc/detect() if(!can_link) @@ -53,7 +53,8 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) ready = TRUE return ready -/obj/machinery/gateway/update_icon() +/obj/machinery/gateway/update_icon(updates=ALL) + . = ..() if(active) icon_state = "on" return @@ -80,7 +81,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) . = ..() if(!GLOB.the_gateway) GLOB.the_gateway = src - update_icon() + update_appearance(UPDATE_ICON) wait = world.time + CONFIG_GET(number/gateway_delay) //+ thirty minutes default awaygate = locate(/obj/machinery/gateway/centeraway) @@ -100,7 +101,8 @@ 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_icon(updates=ALL) + . = ..() if(active) icon_state = "oncenter" return @@ -129,9 +131,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(UPDATE_ICON) active = 1 - update_icon() + update_appearance(UPDATE_ICON) //okay, here's the good teleporting stuff /obj/machinery/gateway/centerstation/Bumped(atom/movable/AM) @@ -179,11 +181,12 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) /obj/machinery/gateway/centeraway/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) stationgate = locate(/obj/machinery/gateway/centerstation) -/obj/machinery/gateway/centeraway/update_icon() +/obj/machinery/gateway/centeraway/update_icon(updates=ALL) + . = ..() if(active) icon_state = "oncenter" return @@ -198,9 +201,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(UPDATE_ICON) active = 1 - update_icon() + update_appearance(UPDATE_ICON) /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 +253,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 b6e9e8ca6ba2..2f5985e8cfa1 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -413,7 +413,8 @@ icon_state = "1" color = rgb(0,0,255) -/obj/structure/ladder/unbreakable/rune/update_icon() +/obj/structure/ladder/unbreakable/rune/update_icon(updates=ALL) + . = ..() return /obj/structure/ladder/unbreakable/rune/show_fluff_message(up,mob/user) diff --git a/code/modules/awaymissions/pamphlet.dm b/code/modules/awaymissions/pamphlet.dm index 7cbbde096d6e..42a8a767c7a2 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() +/obj/item/paper/pamphlet/update_icon(updates=ALL) + . = ..() return diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index a65843e618e0..fc223419f786 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(UPDATE_ICON) /datum/buildmode/proc/change_dir(newdir) build_dir = newdir close_dirswitch() - dirbutton.update_icon() + dirbutton.update_appearance(UPDATE_ICON) 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..258c1a93e7e7 100644 --- a/code/modules/buildmode/buttons.dm +++ b/code/modules/buildmode/buttons.dm @@ -24,10 +24,11 @@ bd.toggle_modeswitch() else if(pa.Find("right")) bd.mode.change_settings(usr.client) - update_icon() + update_appearance(UPDATE_ICON) return 1 -/atom/movable/screen/buildmode/mode/update_icon() +/atom/movable/screen/buildmode/mode/update_icon(updates=ALL) + . = ..() if(bd && bd.mode) icon_state = bd.mode.get_button_iconstate() else @@ -47,13 +48,14 @@ screen_loc = "NORTH,WEST+2" name = "Change Dir" -/atom/movable/screen/buildmode/bdir/update_icon() +/atom/movable/screen/buildmode/bdir/update_icon(updates=ALL) + . = ..() dir = bd.build_dir return /atom/movable/screen/buildmode/bdir/Click() bd.toggle_dirswitch() - update_icon() + update_appearance(UPDATE_ICON) return 1 // used to switch between modes diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index 1059bb18e716..fc6891985393 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(mapload) . = ..() info = "

    Nanotrasen Cargo Bounties


    " - update_icon() + update_appearance(UPDATE_ICON) 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 40bf5def556a..cb49bc4a1135 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(UPDATE_ICON)//we update_appearance(UPDATE_ICON) 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 c9d22a586f26..a0d8c22af791 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(UPDATE_ICON) 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(UPDATE_ICON) 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 7ae9c3426c5e..dd3242739b63 100644 --- a/code/modules/cargo/gondolapod.dm +++ b/code/modules/cargo/gondolapod.dm @@ -29,7 +29,8 @@ name = linked_pod.name . = ..() -/mob/living/simple_animal/pet/gondola/gondolapod/update_icon() +/mob/living/simple_animal/pet/gondola/gondolapod/update_icon(updates=ALL) + . = ..() if(opened) icon_state = "gondolapod_open" else @@ -60,12 +61,12 @@ /mob/living/simple_animal/pet/gondola/gondolapod/setOpened() opened = TRUE - update_icon() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, setClosed)), 50) /mob/living/simple_animal/pet/gondola/gondolapod/setClosed() opened = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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 ca7883ffb2bf..330295e2a226 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(UPDATE_ICON) return P /datum/supply_order/proc/generateManifest(obj/structure/closet/crate/C, owner, packname) //generates-the-manifests. @@ -92,10 +92,10 @@ while(--lost >= 0) qdel(pick(C.contents)) - P.update_icon() + P.update_appearance(UPDATE_ICON) P.forceMove(C) C.manifest = P - C.update_icon() + C.update_appearance(UPDATE_ICON) return P diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index f7c55fc15716..fc365bc33e0b 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -109,7 +109,7 @@ door = "[base]_door" else door = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/proc/SetReverseIcon() fin_mask = "bottomfin" @@ -117,7 +117,7 @@ icon_state = GLOB.podstyles[style][POD_BASE] + "_reverse" pixel_x = initial(pixel_x) transform = matrix() - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/proc/backToNonReverseIcon() fin_mask = initial(fin_mask) @@ -125,9 +125,10 @@ icon_state = GLOB.podstyles[style][POD_BASE] pixel_x = initial(pixel_x) transform = matrix() - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/closet/supplypod/update_icon() +/obj/structure/closet/supplypod/update_icon(updates=ALL) + . = ..() var/list/new_overlays = update_overlays() if(managed_overlays) cut_overlay(managed_overlays) @@ -137,6 +138,7 @@ add_overlay(new_overlays) /obj/structure/closet/supplypod/proc/update_overlays() + . = ..() . = list() if(style == STYLE_INVISIBLE) return @@ -420,17 +422,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(UPDATE_ICON) /obj/structure/closet/supplypod/extractionpod/setOpened() opened = TRUE density = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/setClosed() //Ditto opened = FALSE density = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/proc/tryMakeRubble(turf/T) //Ditto if (rubble_type == RUBBLE_NONE) @@ -443,7 +445,7 @@ return rubble = new /obj/effect/supplypod_rubble(T) rubble.setStyle(rubble_type, src) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/Moved() deleteRubble() @@ -452,7 +454,7 @@ /obj/structure/closet/supplypod/proc/deleteRubble() rubble?.fadeAway() rubble = null - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/supplypod/proc/addGlow() if (GLOB.podstyles[style][POD_SHAPE] != POD_SHAPE_NORML) @@ -599,7 +601,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(UPDATE_ICON) 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 a8464a573325..d19a4cd254de 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -29,9 +29,10 @@ playsound(src,'sound/machines/synth_no.ogg',50,0) if (SP_UNREADY) ready = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/supplypod_beacon/update_icon() +/obj/item/supplypod_beacon/update_icon(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..442e8c8d789e 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(UPDATE_ICON) /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 42490f1d6549..75c006a7b3a1 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(UPDATE_ICON) 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 98ea902107de..a4a9742044f4 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -35,15 +35,16 @@ /obj/item/clothing/ears/headphones/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/clothing/ears/headphones/update_icon() +/obj/item/clothing/ears/headphones/update_icon(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(UPDATE_ICON) 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 bd0d1dba3c7e..63126f58f413 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(mapload) . = ..() START_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -114,7 +114,8 @@ 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_icon(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 09dce2c10e8e..2675ddcde344 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -31,9 +31,10 @@ turn_on(user) else turn_off(user) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/clothing/head/hardhat/update_icon() +/obj/item/clothing/head/hardhat/update_icon(updates=ALL) + . = ..() icon_state = "hardhat[on]_[hat_type]" item_state = "hardhat[on]_[hat_type]" if(ishuman(loc)) @@ -128,7 +129,7 @@ /obj/item/clothing/head/hardhat/weldhat/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/clothing/head/hardhat/weldhat/attack_self(mob/living/user) toggle_helmet_light(user) @@ -147,7 +148,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(UPDATE_ICON) /obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands) . = ..() @@ -156,7 +157,8 @@ if(!up) . += mutable_appearance(mob_overlay_icon, "weldvisor") -/obj/item/clothing/head/hardhat/weldhat/update_icon() +/obj/item/clothing/head/hardhat/weldhat/update_icon(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 015fa6c1949e..bd04b6b9a7c0 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -46,7 +46,7 @@ if(A == attached_light) set_attached_light(null) update_helmlight() - update_icon() + update_appearance(UPDATE_ICON) QDEL_NULL(alight) qdel(A) return ..() @@ -368,7 +368,8 @@ //LightToggle -/obj/item/clothing/head/helmet/update_icon() +/obj/item/clothing/head/helmet/update_icon(updates=ALL) + . = ..() var/state = "[initial(icon_state)]" if(attached_light) if(attached_light.on) @@ -396,7 +397,7 @@ return to_chat(user, span_notice("You click [S] into place on [src].")) set_attached_light(S) - update_icon() + update_appearance(UPDATE_ICON) update_helmlight() alight = new(src) if(loc == user) @@ -416,7 +417,7 @@ var/obj/item/flashlight/removed_light = set_attached_light(null) update_helmlight() removed_light.update_brightness(user) - update_icon() + update_appearance(UPDATE_ICON) user.update_inv_head() QDEL_NULL(alight) return TRUE @@ -441,7 +442,7 @@ /obj/item/clothing/head/helmet/proc/update_helmlight() if(attached_light) - update_icon() + update_appearance(UPDATE_ICON) 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 33b94dd71cbe..6bb1beaa8b55 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -207,9 +207,10 @@ /obj/item/clothing/head/wig/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/clothing/head/wig/update_icon() +/obj/item/clothing/head/wig/update_icon(updates=ALL) + . = ..() cut_overlays() icon_state = "" var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style] @@ -241,7 +242,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(UPDATE_ICON) /obj/item/clothing/head/wig/random/Initialize(mapload) @@ -264,7 +265,7 @@ . = ..() if(ishuman(user) && slot == ITEM_SLOT_HEAD) hair_color = "#[user.hair_color]" - update_icon() + update_appearance(UPDATE_ICON) 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 a73749e00491..bdb6d15adc23 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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/clothing/neck/bodycam/AltClick(mob/user) if(preset) @@ -52,9 +52,10 @@ bodcam.network[1] = temp setup = TRUE bodcam.status = TRUE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/clothing/neck/bodycam/update_icon() +/obj/item/clothing/neck/bodycam/update_icon(updates=ALL) + . = ..() ..() var/suffix = "off" if(bodcam.status) @@ -92,7 +93,7 @@ Disconnect() bodcam.c_tag = null bodcam.network[1] = null //requires a reset - update_icon() + update_appearance(UPDATE_ICON) /obj/item/clothing/neck/bodycam/Destroy() Disconnect() diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index 064b1dc748fc..d3d7b4c12f0d 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(UPDATE_ICON) 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(UPDATE_ICON) to_chat(user, span_notice("You [on ? "activate" : "deactivate"] the prototype shoes.")) if(!always_noslip) if(on) @@ -55,7 +55,8 @@ 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_icon(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 fd422cc78b1e..e8edd0bad877 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -305,7 +305,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "hardsuit[on]-[hardsuit_type]" /obj/item/clothing/head/helmet/space/hardsuit/syndi/Initialize(mapload) @@ -336,7 +337,7 @@ flags_cover &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH) flags_inv &= ~visor_flags_inv cold_protection &= ~HEAD - update_icon() + update_appearance(UPDATE_ICON) playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1) toggle_hardsuit_mode(user) user.update_inv_head() @@ -363,7 +364,7 @@ linkedsuit.cold_protection &= ~(CHEST | GROIN | LEGS | FEET | ARMS | HANDS) linkedsuit.icon_state = "hardsuit[on]-[hardsuit_type]" - linkedsuit.update_icon() + linkedsuit.update_appearance(UPDATE_ICON) 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 5200b8744533..ce806464ec2a 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(UPDATE_ICON) if(ismob(loc)) var/mob/M = loc diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 4fa101792923..0832da7b7b52 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(UPDATE_ICON) /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(UPDATE_ICON) send_notification() else dump_loot(user) @@ -195,7 +195,8 @@ active = FALSE STOP_PROCESSING(SSobj,src) -/obj/machinery/shuttle_scrambler/update_icon() +/obj/machinery/shuttle_scrambler/update_icon(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..28b1f2d0d176 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(UPDATE_ICON) 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 328a3bba45fe..a03c131d4ed8 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(UPDATE_ICON) /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..bd0e32ace46b 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(UPDATE_ICON) 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 0a0d75ec7aaf..549ecd66acf5 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -23,9 +23,10 @@ age_restricted = TRUE /obj/item/reagent_containers/food/drinks/bottle/on_reagent_change(changetype) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/food/drinks/bottle/update_icon() +/obj/item/reagent_containers/food/drinks/bottle/update_icon(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 799324b0f0ca..4e081b85a8a8 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -347,9 +347,10 @@ /obj/item/reagent_containers/glass/bowl/on_reagent_change(changetype) ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/bowl/update_icon() +/obj/item/reagent_containers/glass/bowl/update_icon(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 254025024908..39207c494d3e 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -672,9 +672,10 @@ /obj/item/reagent_containers/food/snacks/pancakes/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/food/snacks/pancakes/update_icon() +/obj/item/reagent_containers/food/snacks/pancakes/update_icon(updates=ALL) + . = ..() if(contents.len) name = "stack of pancakes" else @@ -738,13 +739,13 @@ pancake.pixel_x = rand(-1,1) pancake.pixel_y = 3 * contents.len - 1 add_overlay(pancake) - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) #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 756db185425b..5b478fa3728e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -38,7 +38,8 @@ if(M.rating >= 2) . += "Gibber has been upgraded to process inorganic materials." -/obj/machinery/gibber/update_icon() +/obj/machinery/gibber/update_icon(updates=ALL) + . = ..() cut_overlays() if (dirty) add_overlay("grbloody") @@ -99,7 +100,7 @@ user.visible_message(span_danger("[user] stuffs [C] into the gibber!")) C.forceMove(src) occupant = C - update_icon() + update_appearance(UPDATE_ICON) else startgibbing(user) @@ -133,7 +134,7 @@ /obj/machinery/gibber/proc/go_out() dropContents() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/gibber/proc/startgibbing(mob/user) if(src.operating) @@ -145,7 +146,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(UPDATE_ICON) var/offset = prob(50) ? -2 : 2 animate(src, pixel_x = pixel_x + offset, time = 0.02 SECONDS, loop = 200) //start shaking @@ -221,7 +222,7 @@ pixel_x = initial(pixel_x) //return to its spot after shaking operating = FALSE - update_icon() + update_appearance(UPDATE_ICON) //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 56065b62c0c0..a88ac75caedf 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(UPDATE_ICON) 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(UPDATE_ICON) else return ..() @@ -62,7 +62,7 @@ begin_processing() else end_processing() - update_icon() + update_appearance(UPDATE_ICON) update_grill_audio() @@ -106,7 +106,8 @@ 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_icon(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 ce0259a5c6c0..29a62c32cc1b 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/grill.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/grill.dm @@ -20,7 +20,8 @@ . = ..() grill_loop = new(list(src), FALSE) -/obj/machinery/grill/update_icon() +/obj/machinery/grill/update_icon(updates=ALL) + . = ..() if(grilled_item) icon_state = "grill" else if(grill_fuel > 0) @@ -38,7 +39,7 @@ else grill_fuel += (50 * stackamount) S.use(stackamount) - update_icon() + update_appearance(UPDATE_ICON) return if(I.resistance_flags & INDESTRUCTIBLE) to_chat(user, span_warning("You don't feel it would be wise to grill [I]...")) @@ -59,7 +60,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(UPDATE_ICON) grill_loop.start() return else @@ -67,13 +68,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(UPDATE_ICON) return ..() /obj/machinery/grill/process(delta_time) ..() - update_icon() + update_appearance(UPDATE_ICON) if(grill_fuel <= 0) return else @@ -124,7 +125,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(UPDATE_ICON) 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 c32488db9083..78c4e814ff54 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -87,7 +87,8 @@ "- 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_icon(updates=ALL) + . = ..() if(broken) icon_state = "mwb" else if(dirty_anim_playing) @@ -109,7 +110,7 @@ if(dirty < 100) if(default_deconstruction_screwdriver(user, icon_state, icon_state, O) || default_unfasten_wrench(user, O)) - update_icon() + update_appearance(UPDATE_ICON) return if(panel_open && is_wire_tool(O)) @@ -127,7 +128,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(UPDATE_ICON) return FALSE //to use some fuel else to_chat(user, span_warning("It's broken!")) @@ -141,7 +142,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(UPDATE_ICON) else to_chat(user, span_warning("You need more space cleaner!")) return TRUE @@ -152,7 +153,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(UPDATE_ICON) return TRUE if(dirty == 100) // The microwave is all dirty so can't be used! @@ -258,7 +259,7 @@ set_light(1.5) soundloop.start() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/microwave/proc/spark() visible_message(span_warning("Sparks fly around [src]!")) @@ -282,7 +283,7 @@ turn_on() playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) dirty_anim_playing = TRUE - update_icon() + update_appearance(UPDATE_ICON) loop(MICROWAVE_MUCK, 4) /obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10 @@ -349,7 +350,7 @@ /obj/machinery/microwave/proc/after_finish_loop() set_light(0) soundloop.stop() - update_icon() + update_appearance(UPDATE_ICON) #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..8a6293889681 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -42,7 +42,8 @@ QDEL_NULL(particles) . = ..() -/obj/machinery/oven/update_icon() +/obj/machinery/oven/update_icon(updates=ALL) + . = ..() update_overlays() if(panel_open) icon_state = "oven_o" @@ -54,6 +55,7 @@ return ..() /obj/machinery/oven/proc/update_overlays() + . = ..() cut_overlays() var/mutable_appearance/door_overlay if(open) @@ -87,7 +89,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(UPDATE_ICON) /obj/machinery/oven/attackby(obj/item/I, mob/user, params) @@ -110,7 +112,7 @@ RegisterSignal(used_tray, COMSIG_MOVABLE_MOVED, PROC_REF(ItemMoved)) update_baking_audio() - update_icon() + update_appearance(UPDATE_ICON) ///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 +146,7 @@ if(used_tray) begin_processing() used_tray.vis_flags |= VIS_HIDE - update_icon() + update_appearance(UPDATE_ICON) update_baking_audio() return TRUE @@ -178,7 +180,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(UPDATE_ICON) 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 f85e1aff0663..a50e1a63c76f 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -146,10 +146,11 @@ /obj/machinery/smartfridge/obj_break(damage_flag) if(!(stat & BROKEN)) stat |= BROKEN - update_icon() + update_appearance(UPDATE_ICON) ..(damage_flag) -/obj/machinery/smartfridge/update_icon() +/obj/machinery/smartfridge/update_icon(updates=ALL) + . = ..() var/startstate = initial(icon_state) if(stat & BROKEN) icon_state = "[startstate]-broken" @@ -230,7 +231,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(UPDATE_ICON) updateUsrDialog() if(contents.len >= max_n_of_items) indicate_full() @@ -245,7 +246,7 @@ if(accept_check(G)) load(G) loaded++ - update_icon() + update_appearance(UPDATE_ICON) updateUsrDialog() if(loaded) @@ -272,7 +273,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(UPDATE_ICON) updateUsrDialog() if(contents.len >= max_n_of_items) indicate_full() @@ -377,7 +378,7 @@ if(O.name == params["name"]) dispense(O, usr) break - update_icon() + update_appearance(UPDATE_ICON) cut_overlay(full_indicator_state) animate_dispenser() return TRUE @@ -390,7 +391,7 @@ dispense(O, usr) desired-- - update_icon() + update_appearance(UPDATE_ICON) cut_overlay(full_indicator_state) animate_dispenser() return TRUE @@ -454,7 +455,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(UPDATE_ICON) // 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 +475,10 @@ /obj/machinery/smartfridge/drying_rack/load() //For updating the filled overlay ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/smartfridge/drying_rack/update_icon() +/obj/machinery/smartfridge/drying_rack/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if(drying) @@ -489,7 +491,7 @@ if(drying) if(rack_dry())//no need to update unless something got dried SStgui.update_uis(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/smartfridge/drying_rack/accept_check(obj/item/O) if(istype(O, /obj/item/reagent_containers/food/snacks/)) @@ -507,7 +509,7 @@ else drying = TRUE use_power = ACTIVE_POWER_USE - update_icon() + update_appearance(UPDATE_ICON) /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 15d995943de2..ec6c318fa731 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -31,14 +31,15 @@ /obj/item/pizzabox/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/pizzabox/Destroy() unprocess() return ..() -/obj/item/pizzabox/update_icon() +/obj/item/pizzabox/update_icon(updates=ALL) + . = ..() // Description desc = initial(desc) if(open) @@ -104,7 +105,7 @@ audible_message(span_warning("[icon2html(src, hearers(src))] *beep*")) bomb_active = TRUE START_PROCESSING(SSobj, src) - update_icon() + update_appearance(UPDATE_ICON) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/pizzabox/attack_hand(mob/user) @@ -115,13 +116,13 @@ user.put_in_hands(pizza) to_chat(user, span_notice("You take [pizza] out of [src].")) pizza = null - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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 +137,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(UPDATE_ICON) 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(UPDATE_ICON) + update_appearance(UPDATE_ICON) user.regenerate_icons() /obj/item/pizzabox/attackby(obj/item/I, mob/user, params) @@ -158,8 +159,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(UPDATE_ICON) + update_appearance(UPDATE_ICON) user.regenerate_icons() if(boxes.len >= 5) if(prob(10 * boxes.len)) @@ -179,7 +180,7 @@ return pizza = I to_chat(user, span_notice("You put [I] in [src].")) - update_icon() + update_appearance(UPDATE_ICON) return else if(istype(I, /obj/item/bombcore/miniature/pizza)) if(open && !bomb) @@ -188,7 +189,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(UPDATE_ICON) return else if(bomb) to_chat(user, span_notice("[src] already has a bomb in it!")) @@ -202,7 +203,7 @@ if(!user.canUseTopic(src, BE_CLOSE)) return to_chat(user, span_notice("You write with [I] on [src].")) - update_icon() + update_appearance(UPDATE_ICON) return else if(is_wire_tool(I)) if(wires && bomb) @@ -252,9 +253,9 @@ fall_dir = pick(GLOB.alldirs) step(P.pizza, fall_dir) P.pizza = null - P.update_icon() + P.update_appearance(UPDATE_ICON) boxes -= P - update_icon() + update_appearance(UPDATE_ICON) if(isliving(loc)) var/mob/living/L = loc L.regenerate_icons() @@ -263,7 +264,7 @@ STOP_PROCESSING(SSobj, src) qdel(wires) wires = null - update_icon() + update_appearance(UPDATE_ICON) /obj/item/pizzabox/bomb/Initialize(mapload) . = ..() diff --git a/code/modules/food_and_drinks/plate.dm b/code/modules/food_and_drinks/plate.dm index 5140cd543efb..5741018c6e2b 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(UPDATE_ICON) else return ..() diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm index 9c53e54cc252..7e4f55ac5625 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(UPDATE_ICON) /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,10 @@ 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(UPDATE_ICON) -/obj/item/toy/cards/deck/cas/update_icon() +/obj/item/toy/cards/deck/cas/update_icon(updates=ALL) + . = ..() if(cards.len < 26) icon_state = "deck_[deckstyle]_low" @@ -129,14 +130,15 @@ else if(flipped) name = buffertext flipped = !flipped - update_icon() + update_appearance(UPDATE_ICON) /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_icon(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..887252463c37 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(UPDATE_ICON) /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 f981ad6066a1..08e2b455144b 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -116,9 +116,10 @@ else animate(src, pixel_y = 0, time = 1 SECONDS) anchored = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/satellite/update_icon() +/obj/machinery/satellite/update_icon(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 87d2981dd78c..d0ecd28c9f9f 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(UPDATE_ICON) 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 27220da6be7c..a9852f65155e 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -187,7 +187,7 @@ ready = !ready - update_icon() + update_appearance(UPDATE_ICON) var/numbuttons = 0 var/numready = 0 @@ -199,7 +199,8 @@ if(numbuttons == numready) begin_event() -/obj/machinery/readybutton/update_icon() +/obj/machinery/readybutton/update_icon(updates=ALL) + . = ..() if(ready) icon_state = "auth_on" else diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 94588436d409..5688d03a52c2 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(UPDATE_ICON) /turf/open/floor/holofloor/beach gender = PLURAL @@ -119,7 +119,8 @@ . = ..() addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), 1) -/turf/open/floor/holofloor/carpet/update_icon() +/turf/open/floor/holofloor/carpet/update_icon(updates=ALL) + . = ..() if(!..()) return 0 if(intact) diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm index 1cf097c98ed6..4b2432474af6 100644 --- a/code/modules/hydroponics/beekeeping/honeycomb.dm +++ b/code/modules/hydroponics/beekeeping/honeycomb.dm @@ -17,10 +17,11 @@ . = ..() pixel_x = rand(8,-8) pixel_y = rand(8,-8) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/honeycomb/update_icon() +/obj/item/reagent_containers/honeycomb/update_icon(updates=ALL) + . = ..() cut_overlays() var/mutable_appearance/honey_overlay = mutable_appearance(icon, /datum/reagent/consumable/honey) if(honey_color) @@ -37,4 +38,4 @@ reagents.add_reagent(R.type,5) else honey_color = "" - update_icon() \ No newline at end of file + update_appearance(UPDATE_ICON) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index eb2625ad9658..c919ccbc2295 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(UPDATE_ICON) /obj/machinery/biogenerator/contents_explosion(severity, target) ..() @@ -63,9 +63,10 @@ . += 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(UPDATE_ICON) -/obj/machinery/biogenerator/update_icon() +/obj/machinery/biogenerator/update_icon(updates=ALL) + . = ..() if(panel_open) icon_state = "biogen-empty-o" else if(!src.beaker) @@ -88,7 +89,7 @@ var/obj/item/reagent_containers/glass/B = beaker B.forceMove(drop_location()) beaker = null - update_icon() + update_appearance(UPDATE_ICON) return if(default_deconstruction_crowbar(O)) @@ -104,7 +105,7 @@ return beaker = O to_chat(user, span_notice("You add the container to the machine.")) - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("Close the maintenance panel first.")) return @@ -184,12 +185,12 @@ qdel(I) if(S) processing = TRUE - update_icon() + update_appearance(UPDATE_ICON) playsound(loc, 'sound/machines/blender.ogg', 50, TRUE) use_power(S * 30) sleep(S + 15 / productivity) processing = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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 +200,7 @@ else if(remove_points) points -= materials[getmaterialref(/datum/material/biomass)]*multiplier/efficiency - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1) @@ -240,7 +241,7 @@ beaker.reagents.add_reagent(R, D.make_reagents[R]) . = 1 --i - update_icon() + update_appearance(UPDATE_ICON) return . /obj/machinery/biogenerator/proc/detach(mob/living/user) @@ -250,7 +251,7 @@ else beaker.drop_location(get_turf(src)) beaker = null - update_icon() + update_appearance(UPDATE_ICON) /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 efc99f269478..d2f943866f10 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -63,9 +63,10 @@ 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(UPDATE_ICON) -/obj/structure/fermenting_barrel/update_icon() +/obj/structure/fermenting_barrel/update_icon(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 14f4baaf914b..f72cee9fcba6 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -55,7 +55,8 @@ min_wchance = 0 min_wrate = 0 -/obj/machinery/plantgenes/update_icon() +/obj/machinery/plantgenes/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if((stat & (BROKEN|NOPOWER))) @@ -71,7 +72,7 @@ /obj/machinery/plantgenes/attackby(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) - update_icon() + update_appearance(UPDATE_ICON) return if(default_deconstruction_crowbar(I)) return @@ -261,7 +262,7 @@ seed.verb_pickup() seed = null update_genes() - update_icon() + update_appearance(UPDATE_ICON) else var/obj/item/I = usr.get_active_held_item() if (istype(I, /obj/item/seeds)) @@ -269,7 +270,7 @@ return insert_seed(I) to_chat(usr, span_notice("You add [I] to the machine.")) - update_icon() + update_appearance(UPDATE_ICON) else if(href_list["eject_disk"] && !operation) var/obj/item/I = usr.get_active_held_item() eject_disk() @@ -278,7 +279,7 @@ return disk = I to_chat(usr, span_notice("You add [I] to the machine.")) - update_icon() + update_appearance(UPDATE_ICON) else if(href_list["op"] == "insert" && disk && disk.gene && seed) if(!operation) // Wait for confirmation operation = "insert" @@ -337,10 +338,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(UPDATE_ICON) qdel(seed) seed = null - update_icon() + update_appearance(UPDATE_ICON) if("replace") if(disk && disk.gene && istype(disk.gene, G.type) && istype(G, /datum/plant_gene/core)) seed.genes -= G @@ -372,7 +373,7 @@ S.forceMove(src) seed = S update_genes() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/plantgenes/proc/eject_disk() if (disk && !operation) @@ -383,7 +384,7 @@ disk.forceMove(drop_location()) disk = null update_genes() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/plantgenes/proc/update_genes() core_genes = list() @@ -436,11 +437,12 @@ /obj/item/disk/plantgene/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) src.pixel_x = rand(-5, 5) src.pixel_y = rand(-5, 5) -/obj/item/disk/plantgene/update_icon() +/obj/item/disk/plantgene/update_icon(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 aef012e31693..b344e2836c60 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(UPDATE_ICON) return /obj/machinery/hydroponics/proc/nutrimentMutation() @@ -237,7 +237,8 @@ return return -/obj/machinery/hydroponics/update_icon() +/obj/machinery/hydroponics/update_icon(updates=ALL) + . = ..() //Refreshes the icon and sets the luminosity cut_overlays() @@ -360,7 +361,7 @@ harvest = 0 weedlevel = 0 // Reset pestlevel = 0 // Reset - update_icon() + update_appearance(UPDATE_ICON) visible_message(span_warning("The [oldPlantName] is overtaken by some [myseed.plantname]!")) update_name() @@ -394,7 +395,7 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_icon() + update_appearance(UPDATE_ICON) visible_message(span_warning("[oldPlantName] suddenly mutates into [myseed.plantname]!")) update_name() @@ -414,7 +415,7 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_icon() + update_appearance(UPDATE_ICON) visible_message(span_warning("The mutated weeds in [src] spawn some [myseed.plantname]!")) update_name() else @@ -426,7 +427,7 @@ pestlevel = 0 // Pests die lastproduce = 0 if(!dead) - update_icon() + update_appearance(UPDATE_ICON) dead = 1 @@ -777,9 +778,9 @@ S.clear_reagents() qdel(S) - H.update_icon() + H.update_appearance(UPDATE_ICON) if(reagent_source) // If the source wasn't composted and destroyed - reagent_source.update_icon() + reagent_source.update_appearance(UPDATE_ICON) return 1 else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) @@ -795,7 +796,7 @@ age = 1 plant_health = myseed.endurance lastcycle = world.time - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, span_warning("[src] already has seeds in it!")) @@ -823,7 +824,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(UPDATE_ICON) else to_chat(user, span_warning("This plot is completely devoid of weeds! It doesn't need uprooting.")) @@ -844,7 +845,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(UPDATE_ICON) else if(istype(O, /obj/item/shovel/spade)) if(!myseed && !weedlevel) @@ -864,7 +865,7 @@ myseed = null update_name() weedlevel = 0 //Has a side effect of cleaning up those nasty weeds - update_icon() + update_appearance(UPDATE_ICON) else return ..() @@ -895,7 +896,7 @@ qdel(myseed) myseed = null update_name() - update_icon() + update_appearance(UPDATE_ICON) else if(user) examine(user) @@ -903,7 +904,7 @@ /obj/machinery/hydroponics/AltClick(mob/user) . = ..() if(!anchored) - update_icon() + update_appearance(UPDATE_ICON) 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 +932,7 @@ myseed = null update_name() dead = 0 - update_icon() + update_appearance(UPDATE_ICON) /// 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,7 +966,7 @@ /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(UPDATE_ICON) /obj/machinery/hydroponics/proc/update_name() if(myseed) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index f0acd1979f1f..3d9a7e170a89 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(UPDATE_ICON) //update power meters and such + C.update_appearance(UPDATE_ICON) 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 7394c38f8656..0101ffbe9a02 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /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 ffa127dfe698..b47cc00c4dc9 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -329,7 +329,7 @@ H.equip_to_slot_if_possible(PDA, ITEM_SLOT_ID) PDA.update_label() - PDA.update_icon() + PDA.update_appearance(UPDATE_ICON) PDA.update_filters() else diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index e11fa80ceebc..aba47d985c6e 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/structure/bookcase/deconstruct(disassembled = TRUE) @@ -139,7 +139,8 @@ qdel(src) -/obj/structure/bookcase/update_icon() +/obj/structure/bookcase/update_icon(updates=ALL) + . = ..() if(contents.len < 5) icon_state = "book-[contents.len]" else @@ -152,7 +153,7 @@ /obj/structure/bookcase/manuals/medical/Initialize(mapload) . = ..() new /obj/item/book/manual/wiki/medical_cloning(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/bookcase/manuals/engineering @@ -165,7 +166,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(UPDATE_ICON) /obj/structure/bookcase/manuals/research_and_development @@ -174,7 +175,7 @@ /obj/structure/bookcase/manuals/research_and_development/Initialize(mapload) . = ..() new /obj/item/book/manual/wiki/research_and_development(src) - update_icon() + update_appearance(UPDATE_ICON) /* diff --git a/code/modules/library/random_books.dm b/code/modules/library/random_books.dm index 97f9366e0732..4847689a48b1 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(UPDATE_ICON) return book_count += pick(-1,-1,0,1,1) create_random_books(book_count, src, FALSE, category) - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) return if(prob(25)) category = null diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index ee83c53b4e8b..1c80c99f58f1 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -145,9 +145,10 @@ creator_key = user.ckey realdate = world.realtime map = SSmapping.config.map_name - update_icon() + update_appearance(UPDATE_ICON) -/obj/structure/chisel_message/update_icon() +/obj/structure/chisel_message/update_icon(updates=ALL) + . = ..() ..() var/hash = md5(hidden_message) var/newcolor = copytext_char(hash, 1, 7) @@ -188,7 +189,7 @@ var/turf/newloc = locate(x, y, z) if(isturf(newloc)) forceMove(newloc) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/chisel_message/examine(mob/user) . = ..() diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index 4a8a2064af37..0858fb4ea0dd 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(UPDATE_ICON) qdel(src) /obj/effect/mapping_helpers/teleport_anchor diff --git a/code/modules/mapping/minimap.dm b/code/modules/mapping/minimap.dm index 084a8b3697cd..169c9e1c09f8 100644 --- a/code/modules/mapping/minimap.dm +++ b/code/modules/mapping/minimap.dm @@ -105,9 +105,10 @@ /obj/item/map/station/Initialize(mapload) ..() minimaps += SSmapping.station_minimaps - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/map/update_icon() +/obj/item/map/update_icon(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 aa1adf0be3d4..e23ef87c55ac 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -124,9 +124,10 @@ /obj/item/clothing/head/helmet/space/hostile_environment/Initialize(mapload) . = ..() AddComponent(/datum/component/spraycan_paintable) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/clothing/head/helmet/space/hostile_environment/update_icon() +/obj/item/clothing/head/helmet/space/hostile_environment/update_icon(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 fad185b85682..2c8d7d8a35ca 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_icon(updates=ALL) //Updates the sprite for in-hand and on-mob. icon_state = "mining_hammer[wielded]" return @@ -508,7 +508,8 @@ ..() -/obj/item/twohanded/kinetic_crusher/mega/update_icon() +/obj/item/twohanded/kinetic_crusher/mega/update_icon(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..d55e11f59ac9 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -33,14 +33,15 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/item/stack/marker_beacon/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][lowertext(picked_color)]" /obj/item/stack/marker_beacon/attack_self(mob/user) @@ -64,7 +65,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( return if(input_color) picked_color = input_color - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/marker_beacon name = "marker beacon" @@ -83,20 +84,21 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/structure/marker_beacon/Initialize(mapload, set_color) . = ..() picked_color = set_color - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) 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_icon(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 +112,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(UPDATE_ICON) 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 +145,4 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( return if(input_color) picked_color = input_color - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 2a5a7e004690..ce92bd03525e 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/organ/regenerative_core/ui_action_click() if(inert) @@ -134,9 +134,10 @@ /obj/item/organ/regenerative_core/legion/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/organ/regenerative_core/update_icon() +/obj/item/organ/regenerative_core/update_icon(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 8baa359fe742..dc5b647ebc1d 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -138,7 +138,8 @@ icon = 'icons/obj/lavaland/survival_pod.dmi' icon_state = "sleeper" -/obj/machinery/sleeper/survival_pod/update_icon() +/obj/machinery/sleeper/survival_pod/update_icon(updates=ALL) + . = ..() if(state_open) cut_overlays() else @@ -154,7 +155,8 @@ /obj/machinery/stasis/survival_pod/play_power_sound() return -/obj/machinery/stasis/survival_pod/update_icon() +/obj/machinery/stasis/survival_pod/update_icon(updates=ALL) + . = ..() return //Computer @@ -206,7 +208,8 @@ pitches = FALSE var/empty = FALSE -/obj/machinery/smartfridge/survival_pod/update_icon() +/obj/machinery/smartfridge/survival_pod/update_icon(updates=ALL) + . = ..() 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 4d6908fa6f0b..6e317d5ca45e 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -300,7 +300,8 @@ 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_icon(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 c9192aac2f50..afa11672d5a6 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -683,7 +683,8 @@ 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_icon(updates=ALL) + . = ..() if(reagents.total_volume) icon_state = initial(icon_state) desc = initial(desc) @@ -1504,7 +1505,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "hierophant_club[timer <= world.time ? "_ready":""][(beacon && !QDELETED(beacon)) ? "":"_beacon"]" item_state = icon_state if(ismob(loc)) @@ -1513,9 +1515,9 @@ GLOBAL_LIST_EMPTY(aide_list) M.update_inv_back() /obj/item/hierophant_club/proc/prepare_icon_update() - update_icon() + update_appearance(UPDATE_ICON) sleep(timer - world.time) - update_icon() + update_appearance(UPDATE_ICON) /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 +1745,8 @@ 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_icon(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 acf746ba7888..05673d281cd4 100644 --- a/code/modules/mining/lavaland/world_anvil.dm +++ b/code/modules/mining/lavaland/world_anvil.dm @@ -27,7 +27,8 @@ QDEL_NULL(internal) . = ..() -/obj/structure/world_anvil/update_icon() +/obj/structure/world_anvil/update_icon(updates=ALL) + . = ..() icon_state = forge_charges > 0 ? "anvil_a" : "anvil" if(forge_charges > 0) set_light(4,1,LIGHT_COLOR_ORANGE) @@ -44,7 +45,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(UPDATE_ICON) return if(forge_charges <= 0) to_chat(user,"The World Anvil is not hot enough to be usable!") @@ -70,7 +71,7 @@ forge_charges-- if(forge_charges <= 0) visible_message("The World Anvil cools down.") - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 998142f53fc9..7adc53516bd8 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -345,7 +345,8 @@ do_sparks(5, TRUE, src) ..() -/obj/machinery/mineral/ore_redemption/update_icon() +/obj/machinery/mineral/ore_redemption/update_icon(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 4727e1a51b3b..ecf2607a0c45 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -105,7 +105,8 @@ 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_icon(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 1527ab7d8c16..2543ca87517e 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -22,7 +22,8 @@ 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_icon(updates=ALL) + . = ..() var/difference = min(ORESTACK_OVERLAYS_MAX, amount) - (LAZYLEN(stack_overlays)+1) if(difference == 0) return @@ -620,7 +621,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ /obj/item/coinstack/Initialize(mapload) . = ..() coins = list() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/coinstack/examine(mob/user) . = ..() @@ -634,7 +635,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() for(var/i in 1 to length(coins)) var/obj/item/coin/C = coins[i] @@ -663,7 +665,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(UPDATE_ICON) return TRUE /obj/item/coinstack/proc/remove_from_stack(mob/living/user) //you can only remove the topmost coin from the stack @@ -671,7 +673,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(top_coin) coins -= top_coin user.put_in_active_hand(top_coin) - update_icon() + update_appearance(UPDATE_ICON) 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 ad6b3592ae60..0dc2444d07c1 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -297,7 +297,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(UPDATE_ICON) 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 640270573be5..5fed9d343765 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(UPDATE_ICON) if(!T || is_secret_level(T.z)) var/list/turfs = get_area_turfs(/area/shuttle/arrival) @@ -818,7 +818,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp qdel(species) - update_icon() + update_appearance(UPDATE_ICON) /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/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 57ed3dd01f24..7ad4cbe455a8 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -24,7 +24,8 @@ 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_icon(updates=ALL) + . = ..() if(!brain) icon_state = "mmi_off" return @@ -83,7 +84,7 @@ brain = newbrain name = "[initial(name)]: [brainmob.real_name]" - update_icon() + update_appearance(UPDATE_ICON) SSblackbox.record_feedback("amount", "mmis_filled", 1) @@ -110,7 +111,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(UPDATE_ICON) 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 +160,7 @@ name = "[initial(name)]: [brainmob.real_name]" to_chat(brainmob, welcome_message) - update_icon() + update_appearance(UPDATE_ICON) 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..1e04d944ed97 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(UPDATE_ICON) return ..() diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index 5037d46eb4c6..ac45319e64c0 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -60,12 +60,12 @@ GLOBAL_VAR(posibrain_notify_cooldown) ping_ghosts("requested", FALSE) next_ask = world.time + askDelay searching = TRUE - update_icon() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(check_success)), askDelay) /obj/item/mmi/posibrain/proc/check_success() searching = FALSE - update_icon() + update_appearance(UPDATE_ICON) if(QDELETED(brainmob)) return if(brainmob.client) @@ -131,7 +131,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) brainmob.mind.remove_all_antag() brainmob.mind.wipe_memory() - update_icon() + update_appearance(UPDATE_ICON) return ..() /obj/item/mmi/posibrain/proc/transfer_personality(mob/candidate) @@ -210,7 +210,8 @@ GLOBAL_VAR(posibrain_notify_cooldown) return -/obj/item/mmi/posibrain/update_icon() +/obj/item/mmi/posibrain/update_icon(updates=ALL) + . = ..() if(searching) icon_state = "[initial(icon_state)]-searching" return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 340f9918a803..1993b8ea0862 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(UPDATE_ICON) H = hud_used.hand_slots["[held_index]"] if(H) - H.update_icon() + H.update_appearance(UPDATE_ICON) /mob/living/carbon/activate_hand(selhand) //l/r OR 1-held_items.len diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 2574a5250c22..24508222ca83 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(UPDATE_ICON) update_inv_shoes() //End bloody footprints if(istype(S)) 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 c5fdec856f51..b7d911f694b0 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -179,7 +179,8 @@ /obj/item/organ/heart/nightmare/Stop() return 0 -/obj/item/organ/heart/nightmare/update_icon() +/obj/item/organ/heart/nightmare/update_icon(updates=ALL) + . = ..() return //always beating visually /obj/item/organ/heart/nightmare/process() @@ -261,7 +262,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(UPDATE_ICON) 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 11f673676385..64a179f88e09 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[TOBITSHIFT(ITEM_SLOT_ICLOTHING) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_ID) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_GLOVES) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_GLOVES) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_EYES) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_EARS) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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 && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_FEET) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_SUITSTORE) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_BELT) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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[TOBITSHIFT(ITEM_SLOT_OCLOTHING) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(istype(wear_suit, /obj/item)) wear_suit.screen_loc = ui_oclothing @@ -402,9 +402,9 @@ There are several things that need to be remembered: var/atom/movable/screen/inventory/inv inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_LPOCKET) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_RPOCKET) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(l_store) l_store.screen_loc = ui_storage1 @@ -427,7 +427,7 @@ There are several things that need to be remembered: if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_MASK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_MASK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(wear_mask) var/target_overlay = wear_mask.icon_state @@ -454,7 +454,7 @@ There are several things that need to be remembered: if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(back) update_hud_back(back) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 7d51955714f9..8a829ab51ceb 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -117,7 +117,7 @@ if(client && hud_used?.inv_slots[TOBITSHIFT(ITEM_SLOT_MASK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_MASK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(wear_mask) if(!(ITEM_SLOT_MASK in check_obscured_slots())) @@ -131,7 +131,7 @@ if(client && hud_used?.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) if(wear_neck) if(!(ITEM_SLOT_NECK in check_obscured_slots())) @@ -145,7 +145,7 @@ if(client && hud_used?.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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?.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_HEAD) + 1] - inv.update_icon() + inv.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) //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 b41b16d05d35..5d890506003f 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(UPDATE_ICON) /mob/living/silicon/ai/verb/deploy_to_shell(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 ebf7da491931..d4189f8b325f 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) for(var/mob/living/silicon/ai/AI in contents) if(!AI.is_dying) AI.relocate() @@ -214,7 +214,8 @@ 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_icon(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..682e629b444d 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(UPDATE_ICON) 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(UPDATE_ICON) /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 406632bf187a..4396b205b52f 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(UPDATE_ICON) 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(UPDATE_ICON) was_valid_holder = TRUE if(!hardware_synced) @@ -96,7 +96,8 @@ GLOBAL_LIST_EMPTY(server_cabinets) GLOB.ai_os.update_hardware() -/obj/machinery/ai/server_cabinet/update_icon() +/obj/machinery/ai/server_cabinet/update_icon(updates=ALL) + . = ..() cut_overlays() if(installed_racks.len > 0) @@ -131,7 +132,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(UPDATE_ICON) return FALSE if(W.tool_behaviour == TOOL_CROWBAR) if(installed_racks.len) @@ -145,7 +146,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(UPDATE_ICON) 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 2b5a31dacbcf..5375e0db651b 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) 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 d4ec495f1296..8abcb905b1e7 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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 df5ed87c4484..f722196c2fa2 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(UPDATE_ICON) 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 bd710740f7c7..32c18f9a79b1 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(UPDATE_ICON) 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(UPDATE_ICON) 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 435c369d4016..899663281cdd 100644 --- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm +++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm @@ -60,13 +60,13 @@ return switch(mode) if(BOT_IDLE) // idle - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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..e86f67e520c6 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(UPDATE_ICON) /mob/living/simple_animal/bot/atmosbot/turn_off() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) if(!target) if(auto_patrol) @@ -194,9 +194,10 @@ return breached_pressure = new_breach_pressure update_controls() - update_icon() + update_appearance(UPDATE_ICON) -/mob/living/simple_animal/bot/atmosbot/update_icon() +/mob/living/simple_animal/bot/atmosbot/update_icon(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 b69bf925fc76..a0e812ba5d71 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(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_icon() + 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_icon() + 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_icon() + dropped_gun.update_appearance(UPDATE_ICON) //Generalized behavior code, override where needed! @@ -855,7 +855,8 @@ Pass a positive integer as an argument to override a bot's default speed. ejectpai(usr) update_controls() -/mob/living/simple_animal/bot/update_icon() +/mob/living/simple_animal/bot/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][on]" // Machinery to simplify topic and access calls @@ -968,7 +969,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(UPDATE_ICON) . = 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 52a44ad84592..5e5f30bf570d 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -212,9 +212,10 @@ /obj/item/bot_assembly/floorbot/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/bot_assembly/floorbot/update_icon() +/obj/item/bot_assembly/floorbot/update_icon(updates=ALL) + . = ..() ..() switch(build_step) if(ASSEMBLY_FIRST_STEP) @@ -237,7 +238,7 @@ to_chat(user, span_notice("You add [W] to [src].")) qdel(W) build_step++ - update_icon() + update_appearance(UPDATE_ICON) 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 2e01b58cd734..90441684ade8 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(UPDATE_ICON) else if(lasercolor == "b") var/obj/item/gun/energy/laser/bluetag/G = new (Tsec) G.cell.charge = 0 - G.update_icon() + G.update_appearance(UPDATE_ICON) else if(lasercolor == "r") var/obj/item/gun/energy/laser/redtag/G = new (Tsec) G.cell.charge = 0 - G.update_icon() + G.update_appearance(UPDATE_ICON) 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 cdc1f2e12d42..8997b576225c 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /mob/living/simple_animal/bot/firebot/turn_off() ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) /mob/living/simple_animal/bot/firebot/proc/is_burning(atom/target) if(ismob(target)) @@ -286,7 +286,8 @@ 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_icon(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..76995a260562 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(UPDATE_ICON) 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(UPDATE_ICON) /mob/living/simple_animal/bot/floorbot/turn_off() ..() - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/floorbot/bot_reset() ..() @@ -67,7 +67,7 @@ oldloc = null ignore_list = list() anchored = FALSE - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/floorbot/set_custom_texts() text_hack = "You corrupt [name]'s construction protocols." @@ -355,11 +355,12 @@ if(specialtiles == 0) speak("Requesting refill of custom floortiles to continue replacing.") mode = BOT_IDLE - update_icon() + update_appearance(UPDATE_ICON) anchored = FALSE target = null -/mob/living/simple_animal/bot/floorbot/update_icon() +/mob/living/simple_animal/bot/floorbot/update_icon(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 2965832f658d..7de5fcadff37 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) auto_patrol = TRUE var/datum/job/clown/J = new/datum/job/clown access_card.access += J.get_access() @@ -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(UPDATE_ICON) /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))) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 3cf8e99d2eb6..d8c165849627 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -91,7 +91,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() if(skin) add_overlay("medskin_[skin]") @@ -116,11 +117,11 @@ prev_access = access_card.access qdel(J) skin = new_skin - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/medbot/update_mobility() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/medbot/bot_reset() ..() @@ -129,14 +130,14 @@ oldloc = null last_found = world.time declare_cooldown = 0 - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) /mob/living/simple_animal/bot/medbot/set_custom_texts() @@ -222,7 +223,7 @@ else if(href_list["stationary"]) stationary_mode = !stationary_mode path = list() - update_icon() + update_appearance(UPDATE_ICON) else if(href_list["virus"]) treat_virus = !treat_virus @@ -413,7 +414,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(UPDATE_ICON) frustration = 0 medicate_patient(patient) return @@ -554,9 +555,9 @@ var/mob/living/carbon/C = A patient = C mode = BOT_HEALING - update_icon() + update_appearance(UPDATE_ICON) medicate_patient(C) - update_icon() + update_appearance(UPDATE_ICON) else ..() @@ -664,7 +665,7 @@ if(failed) visible_message("[src] retracts its syringe.") - update_icon() + update_appearance(UPDATE_ICON) 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 361ffc9c733b..98b3a5c7c4b1 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -112,7 +112,7 @@ ..() else ..() - update_icon() + update_appearance(UPDATE_ICON) return /mob/living/simple_animal/bot/mulebot/emag_act(mob/user) @@ -124,7 +124,8 @@ flick("mulebot-emagged", src) playsound(src, "sparks", 100, 0) -/mob/living/simple_animal/bot/mulebot/update_icon() +/mob/living/simple_animal/bot/mulebot/update_icon(updates=ALL) + . = ..() if(open) icon_state="mulebot-hatch" else @@ -386,7 +387,7 @@ load = AM mode = BOT_IDLE - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/bot/mulebot/proc/load_mob(mob/living/M) can_buckle = TRUE @@ -460,7 +461,7 @@ num_steps-- if(!on || client) return - update_icon() + update_appearance(UPDATE_ICON) switch(mode) if(BOT_IDLE) // idle @@ -569,7 +570,7 @@ mode = BOT_GO_HOME else mode = BOT_DELIVER - update_icon() + update_appearance(UPDATE_ICON) get_nav() // starts bot moving to home @@ -580,7 +581,7 @@ spawn(0) set_destination(home_destination) mode = BOT_BLOCKED - update_icon() + update_appearance(UPDATE_ICON) // called when bot reaches current target /mob/living/simple_animal/bot/mulebot/proc/at_target() @@ -688,7 +689,7 @@ loaddir = text2num(direction) else loaddir = 0 - update_icon() + update_appearance(UPDATE_ICON) if(destination) // No need to calculate a path if you do not have a destination set! calc_path() @@ -710,7 +711,7 @@ new /obj/item/stack/cable_coil/cut(Tsec) if(cell) cell.forceMove(Tsec) - cell.update_icon() + cell.update_appearance(UPDATE_ICON) 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 ef3b15ef59d5..ef6110148b79 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) var/datum/job/detective/J = new/datum/job/detective access_card.access += J.get_access() prev_access = access_card.access @@ -83,7 +83,8 @@ if(prob(5)) russian = TRUE // imported from Russia -/mob/living/simple_animal/bot/secbot/update_icon() +/mob/living/simple_animal/bot/secbot/update_icon(updates=ALL) + . = ..() if(mode == BOT_HUNT) icon_state = "[initial(icon_state)]-c" return @@ -209,7 +210,7 @@ Auto Patrol: []"}, oldtarget_name = user.name audible_message(span_danger("[src] buzzes oddly!")) declare_arrests = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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)) diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index 1991868eb855..574f0a5bbf40 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_icon(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 64b0860dc4a7..b4fc54249ac2 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(UPDATE_ICON) return 1 else if(O.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src)) ///Removed needless self repair part @@ -131,7 +131,8 @@ if(!QDELETED(src) && stat != DEAD) death() -/mob/living/simple_animal/spiderbot/update_icon() +/mob/living/simple_animal/spiderbot/update_icon(updates=ALL) + . = ..() if(mmi) if(istype(mmi, /obj/item/mmi/posibrain)) icon_state = "spiderbot-chassis-posi" @@ -150,10 +151,10 @@ else if(key) mmi.brainmob.key = key mmi.forceMove(loc) - mmi.update_icon() + mmi.update_appearance(UPDATE_ICON) mmi = null name = initial(name) - update_icon() + update_appearance(UPDATE_ICON) /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 d95270a0120e..101ece8a3a79 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -636,7 +636,8 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
    "} -/obj/item/paper/guides/antag/guardian/update_icon() +/obj/item/paper/guides/antag/guardian/update_icon(updates=ALL) + . = ..() return /obj/item/paper/guides/antag/guardian/wizard 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 f7946560440d..96773a5aae98 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -300,7 +300,8 @@ Difficulty: Very Hard var/list/stored_items = list() var/list/blacklist = list() -/obj/machinery/smartfridge/black_box/update_icon() +/obj/machinery/smartfridge/black_box/update_icon(updates=ALL) + . = ..() return /obj/machinery/smartfridge/black_box/accept_check(obj/item/O) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 684a7d66b59c..d25d453cef94 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(UPDATE_ICON) ..() else if(Zapstick) if(Zapstick.charges) Zapstick.charges-- - Zapstick.update_icon() + Zapstick.update_appearance(UPDATE_ICON) ..() 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(UPDATE_ICON) ..() 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(UPDATE_ICON) 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 7e56049b2801..b15bbe0233fd 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -536,10 +536,10 @@ var/atom/movable/screen/inventory/hand/H H = hud_used.hand_slots["[hand_index]"] if(H) - H.update_icon() + H.update_appearance(UPDATE_ICON) H = hud_used.hand_slots["[oindex]"] if(H) - H.update_icon() + H.update_appearance(UPDATE_ICON) /mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE) . = ..(I, del_on_fail, merge_stacks) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 8f30343f0aaf..cace6dbe8401 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(UPDATE_ICON) /obj/item/modular_computer/Destroy() kill_program(forced = TRUE) @@ -262,7 +262,8 @@ . += get_modular_computer_parts_examine(user) -/obj/item/modular_computer/update_icon() +/obj/item/modular_computer/update_icon(updates=ALL) + . = ..() if(!physical) return @@ -293,11 +294,11 @@ /obj/item/modular_computer/equipped() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/modular_computer/dropped() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/modular_computer/proc/update_label() @@ -338,7 +339,7 @@ else to_chat(user, span_notice("You press the power button and start up \the [src].")) enabled = TRUE - update_icon() + update_appearance(UPDATE_ICON) play_computer_sound(startup_sound, get_clamped_volume(), FALSE) ui_interact(user) else // Unpowered @@ -480,7 +481,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(UPDATE_ICON) // 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 +505,7 @@ if(loud) physical.visible_message(span_notice("\The [src] shuts down.")) enabled = FALSE - update_icon() + update_appearance(UPDATE_ICON) play_computer_sound(shutdown_sound, get_clamped_volume(), FALSE) /** @@ -517,7 +518,7 @@ if(!has_light) return FALSE set_light_on(!light_on) - update_icon() + update_appearance(UPDATE_ICON) 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..0be41490d652 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(UPDATE_ICON) 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..9af6c1d7edb0 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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 bbdcdb815ae1..ab0806994076 100644 --- a/code/modules/modular_computers/computers/item/laptop/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop/laptop.dm @@ -33,7 +33,8 @@ if(start_open && !screen_on) toggle_open() -/obj/item/modular_computer/laptop/update_icon() +/obj/item/modular_computer/laptop/update_icon(updates=ALL) + . = ..() if(screen_on) ..() else @@ -106,7 +107,7 @@ icon_state = icon_state_unpowered screen_on = !screen_on - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index dd636708bd2f..0720cfe412af 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(UPDATE_ICON) 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 81e483c3dc95..6e711b83f013 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -56,11 +56,12 @@ return to_chat(user, span_notice("You slide \the [C] into \the [src].")) inserted_item = C - update_icon() + update_appearance(UPDATE_ICON) else return ..() -/obj/item/modular_computer/tablet/update_icon() +/obj/item/modular_computer/tablet/update_icon(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 29275d051998..884ab9a5b1d5 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,10 @@ network_card.identification_string = "Unknown Console" if(cpu) cpu.screen_on = 1 - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/modular_computer/console/update_icon() +/obj/machinery/modular_computer/console/update_icon(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 02e8b67c8cc1..721b87d130fe 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -75,8 +75,9 @@ return FALSE return (cpu.emag_act(user)) -/obj/machinery/modular_computer/update_icon() - cpu.update_icon() +/obj/machinery/modular_computer/update_icon(updates=ALL) + . = ..() + cpu.update_appearance(UPDATE_ICON) /obj/machinery/modular_computer/AltClick(mob/user) if(cpu) @@ -105,13 +106,13 @@ if(cpu) cpu.shutdown_computer(0) stat |= NOPOWER - update_icon() + update_appearance(UPDATE_ICON) // 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(UPDATE_ICON) return . = ..() diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index b7d3163581b3..0efcfdb19b62 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(UPDATE_ICON) // 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(UPDATE_ICON) 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 28aa6d769e9c..abff81bd1308 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(UPDATE_ICON) 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..37bcf6bbe17d 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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..c4afd769d205 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(UPDATE_ICON) /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..d0986bc7e206 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(UPDATE_ICON) /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..95bd71cb097b 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(UPDATE_ICON) 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..6f42edf88f70 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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..4251db214748 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(UPDATE_ICON) // 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 4266a46127cd..abb76b538a7c 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(UPDATE_ICON) 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(UPDATE_ICON) 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..0c33b62b46d6 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(UPDATE_ICON) @@ -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(UPDATE_ICON) /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..510b4c6b5afc 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(UPDATE_ICON) 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..59d5b3096d6c 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -58,12 +58,12 @@ 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(UPDATE_ICON) return ..() /obj/item/pai_card/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) SSpai.pai_card_list += src /obj/item/pai_card/suicide_act(mob/living/user) @@ -71,6 +71,7 @@ return OXYLOSS /obj/item/pai_card/proc/update_overlays() + . = ..() . = ..() . += "pai-[emotion_icon]" if(pai?.hacking_cable) @@ -79,7 +80,7 @@ /obj/item/pai_card/vv_edit_var(vname, vval) . = ..() if(vname == NAMEOF(src, emotion_icon)) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/pai_card/ui_interact(mob/user, datum/tgui/ui) . = ..() @@ -253,7 +254,7 @@ return FALSE pai = downloaded emotion_icon = "null" - update_icon() + update_appearance(UPDATE_ICON) 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..2168f46796fb 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(UPDATE_ICON) qdel(src) diff --git a/code/modules/pai/door_jack.dm b/code/modules/pai/door_jack.dm index 50013cf5862c..75cf0fe9b442 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(UPDATE_ICON) 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..ea62ccef1a4e 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(UPDATE_ICON) 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..9fb5cf109e78 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(UPDATE_ICON) return TRUE /** diff --git a/code/modules/paperwork/carbonpaper.dm b/code/modules/paperwork/carbonpaper.dm index d81bbbb5fc2c..90ee059e81d3 100644 --- a/code/modules/paperwork/carbonpaper.dm +++ b/code/modules/paperwork/carbonpaper.dm @@ -7,7 +7,8 @@ var/iscopy = FALSE -/obj/item/paper/carbon/update_icon() +/obj/item/paper/carbon/update_icon(updates=ALL) + . = ..() if(iscopy) if(written.len) icon_state = "cpaper_words" @@ -52,8 +53,8 @@ copied = TRUE copy.copied = TRUE copy.iscopy = TRUE - update_icon() - copy.update_icon() + update_appearance(UPDATE_ICON) + copy.update_appearance(UPDATE_ICON) 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 82cc9c8f249a..4e33a34ad1d7 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(mapload) - update_icon() + update_appearance(UPDATE_ICON) . = ..() /obj/item/clipboard/Destroy() @@ -25,7 +25,8 @@ QDEL_NULL(toppaper) //let movable/Destroy handle the rest return ..() -/obj/item/clipboard/update_icon() +/obj/item/clipboard/update_icon(updates=ALL) + . = ..() cut_overlays() var/list/dat = list() if(toppaper) @@ -43,10 +44,10 @@ return toppaper = W to_chat(user, span_notice("You clip the paper onto \the [src].")) - update_icon() + update_appearance(UPDATE_ICON) else if(toppaper) toppaper.attackby(user.get_active_held_item(), user) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/clipboard/attack_self(mob/user) @@ -126,4 +127,4 @@ //Update everything attack_self(usr) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index f8e59ab8369a..f92fadcb5737 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -10,7 +10,8 @@ /obj/item/paper/contract/proc/update_text() return -/obj/item/paper/contract/update_icon() +/obj/item/paper/contract/update_icon(updates=ALL) + . = ..() return /obj/item/paper/contract/infernal @@ -269,7 +270,7 @@ var/obj/item/storage/wallet/W = worn W.front_id = id id.forceMove(worn) - worn.update_icon() + worn.update_appearance(UPDATE_ICON) 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 311c6a3cfee3..da63fefc3651 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(UPDATE_ICON) 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..ce787e343c1e 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -60,7 +60,8 @@ icon_state = "coloredcabinet_frame" name = "colored cabinet" -/obj/structure/filingcabinet/colored/update_icon() +/obj/structure/filingcabinet/colored/update_icon(updates=ALL) + . = ..() cut_overlays() var/mutable_appearance/cab = mutable_appearance(icon, "coloredcabinet_trim") cab.color = colour @@ -68,7 +69,7 @@ /obj/structure/filingcabinet/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) 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 +186,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(UPDATE_ICON) // reset overlays return diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index df5436db67ad..0ee702fa4e55 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -28,7 +28,8 @@ icon_state = "folder_white" -/obj/item/folder/update_icon() +/obj/item/folder/update_icon(updates=ALL) + . = ..() cut_overlays() if(contents.len) add_overlay("folder_paper") @@ -39,7 +40,7 @@ if(!user.transferItemToLoc(W, src)) return to_chat(user, span_notice("You put [W] into [src].")) - update_icon() + update_appearance(UPDATE_ICON) 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 +95,7 @@ //Update everything attack_self(usr) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/folder/documents name = "folder- 'TOP SECRET'" @@ -103,7 +104,7 @@ /obj/item/folder/documents/Initialize(mapload) . = ..() new /obj/item/documents/nanotrasen(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/folder/syndicate icon_state = "folder_syndie" @@ -116,7 +117,7 @@ /obj/item/folder/syndicate/red/Initialize(mapload) . = ..() new /obj/item/documents/syndicate/red(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/folder/syndicate/blue icon_state = "folder_sblue" @@ -124,9 +125,9 @@ /obj/item/folder/syndicate/blue/Initialize(mapload) . = ..() new /obj/item/documents/syndicate/blue(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/folder/syndicate/mining/Initialize(mapload) . = ..() new /obj/item/documents/syndicate/mining(src) - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/paperwork/inspector_booth.dm b/code/modules/paperwork/inspector_booth.dm index cff2ff91cb79..5f48396efb58 100644 --- a/code/modules/paperwork/inspector_booth.dm +++ b/code/modules/paperwork/inspector_booth.dm @@ -55,9 +55,10 @@ /obj/machinery/inspector_booth/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/inspector_booth/update_icon() +/obj/machinery/inspector_booth/update_icon(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 0442a79569ad..8c34c71035e8 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -76,10 +76,10 @@ pixel_y = rand(-8, 8) pixel_x = rand(-9, 9) written = list() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/paper/update_icon() +/obj/item/paper/update_icon(updates=ALL) if(resistance_flags & ON_FIRE) icon_state = "paper_onfire" @@ -185,7 +185,7 @@ stamps = null LAZYCLEARLIST(stamped) cut_overlays() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/paper/proc/parsepencode(t, obj/item/pen/P, mob/user, iscrayon = 0) @@ -279,7 +279,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(UPDATE_ICON) /obj/item/paper/attackby(obj/item/P, mob/living/carbon/human/user, params) @@ -355,7 +355,7 @@ src.loc = B P.loc = B B.amount = 2 - B.update_icon() + B.update_appearance(UPDATE_ICON) add_fingerprint(user) @@ -368,7 +368,7 @@ /obj/item/paper/extinguish() ..() - update_icon() + update_appearance(UPDATE_ICON) /* * Construction paper @@ -393,7 +393,8 @@ icon_state = "scrap" slot_flags = null -/obj/item/paper/crumpled/update_icon() +/obj/item/paper/crumpled/update_icon(updates=ALL) + . = ..() return /obj/item/paper/crumpled/bloody diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 351e5472cc1c..3c95e72e33d5 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(UPDATE_ICON) 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(UPDATE_ICON) return /obj/item/paper_bundle/proc/update_screen() @@ -165,7 +165,7 @@ page = amount if(page == amount) screen = 2 - update_icon() + update_appearance(UPDATE_ICON) 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,8 @@ /obj/item/paper_bundle/AltClick(mob/living/user) unbundle() -/obj/item/paper_bundle/update_icon() +/obj/item/paper_bundle/update_icon(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 127366ab3b44..4b87641bb37a 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -15,7 +15,7 @@ /obj/item/papercutter/Initialize(mapload) . = ..() storedcutter = new /obj/item/hatchet/cutterblade(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/papercutter/suicide_act(mob/user) @@ -34,7 +34,8 @@ return (BRUTELOSS) -/obj/item/papercutter/update_icon() +/obj/item/papercutter/update_icon(updates=ALL) + . = ..() ..() cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") @@ -49,7 +50,7 @@ playsound(loc, "pageturn", 60, 1) to_chat(user, span_notice("You place [P] in [src].")) storedpaper = P - update_icon() + update_appearance(UPDATE_ICON) return if(istype(P, /obj/item/hatchet/cutterblade) && !storedcutter) if(!user.transferItemToLoc(P, src)) @@ -57,7 +58,7 @@ to_chat(user, span_notice("You replace [src]'s [P].")) P.forceMove(src) storedcutter = P - update_icon() + update_appearance(UPDATE_ICON) return if(P.tool_behaviour == TOOL_SCREWDRIVER && storedcutter) P.play_tool_sound(src) @@ -79,7 +80,7 @@ to_chat(user, span_notice("You remove [src]'s [storedcutter].")) user.put_in_hands(storedcutter) storedcutter = null - update_icon() + update_appearance(UPDATE_ICON) if(storedpaper) playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1) @@ -88,7 +89,7 @@ qdel(storedpaper) new /obj/item/paperslip(get_turf(src)) new /obj/item/paperslip(get_turf(src)) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/papercutter/MouseDrop(atom/over_object) . = ..() diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index c52d915c54b4..fa60d1cbb2be 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(UPDATE_ICON) /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(UPDATE_ICON) ..() /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(UPDATE_ICON) 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(UPDATE_ICON) // 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(UPDATE_ICON) 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(UPDATE_ICON) else return ..() @@ -131,7 +131,8 @@ else . += "It doesn't contain anything." -/obj/item/paper_bin/update_icon() +/obj/item/paper_bin/update_icon(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..68955ea225b9 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(UPDATE_ICON) /obj/item/paperplane/handle_atom_del(atom/A) if(A == internalPaper) @@ -52,7 +52,8 @@ sleep(1 SECONDS) return (BRUTELOSS) -/obj/item/paperplane/update_icon() +/obj/item/paperplane/update_icon(updates=ALL) + . = ..() cut_overlays() var/list/stamped = internalPaper.stamped if(stamped) @@ -75,7 +76,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(UPDATE_ICON) 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..dc55d3dfe2b0 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) return if(shred_amount && try_insert(user, shred_amount)) @@ -113,12 +113,13 @@ if(ran == 3) SP.color = null paperamount -=1 - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/papershredder/AltClick(mob/living/user) emptypaper() -/obj/machinery/papershredder/update_icon() +/obj/machinery/papershredder/update_icon(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 45dd291ba16f..ebdc031366f4 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -227,9 +227,10 @@ 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(UPDATE_ICON) -/obj/item/pen/edagger/update_icon() +/obj/item/pen/edagger/update_icon(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 3733cfb818f1..756b29ca6049 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(UPDATE_ICON) 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(UPDATE_ICON) 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 8cb813ecbc13..081c0f11d821 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -18,9 +18,10 @@ /obj/machinery/ticket_machine/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/ticket_machine/update_icon() +/obj/machinery/ticket_machine/update_icon(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 +51,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(UPDATE_ICON) //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(UPDATE_ICON) return ..() /obj/item/wallframe/picture/attack_self(mob/user) @@ -44,7 +44,8 @@ else return ..() -/obj/item/wallframe/picture/update_icon() +/obj/item/wallframe/picture/update_icon(updates=ALL) + . = ..() cut_overlays() if(displayed) add_overlay(image(displayed)) @@ -106,7 +107,7 @@ else qdel(framed) framed = P - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/sign/picture_frame/examine(mob/user) if(in_range(src, user) && framed) @@ -135,7 +136,7 @@ if(!user.transferItemToLoc(P, src)) return framed = P - update_icon() + update_appearance(UPDATE_ICON) else to_chat(user, "\The [src] already contains a photo.") @@ -148,7 +149,8 @@ if(framed) framed.show(user) -/obj/structure/sign/picture_frame/update_icon() +/obj/structure/sign/picture_frame/update_icon(updates=ALL) + . = ..() cut_overlays() if(framed) add_overlay(image(framed)) @@ -162,5 +164,5 @@ if(contents.len) var/obj/item/I = pick(contents) I.forceMove(F) - F.update_icon() + F.update_appearance(UPDATE_ICON) qdel(src) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index 768367a708ed..dabe93bf4e2d 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(UPDATE_ICON) if(P.caption) scribble = P.caption if(setname && P.picture_name) @@ -32,7 +32,8 @@ if(setdesc && P.picture_desc) desc = P.picture_desc -/obj/item/photo/update_icon() +/obj/item/photo/update_icon(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..2a3c099c9f8a 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) /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_icon(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(UPDATE_ICON) /obj/machinery/duct/multilayered name = "duct layer-manifold" @@ -262,7 +262,8 @@ All the important duct code: dumb = TRUE -/obj/machinery/duct/multilayered/update_icon() +/obj/machinery/duct/multilayered/update_icon(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 5051b5ba8f06..9bbb07a6d4b6 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) make_terminal() @@ -325,7 +325,8 @@ // 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_icon(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 +519,7 @@ else if (opened!=APC_COVER_REMOVED) opened = APC_COVER_CLOSED coverlocked = TRUE //closing cover relocks it - update_icon() + update_appearance(UPDATE_ICON) return else if (!(stat & BROKEN)) if(coverlocked && !(stat & MAINT)) // locked... @@ -529,7 +530,7 @@ return else opened = APC_COVER_OPENED - update_icon() + update_appearance(UPDATE_ICON) return else W.play_tool_sound(src) @@ -538,7 +539,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(UPDATE_ICON) return /obj/machinery/power/apc/screwdriver_act(mob/living/user, obj/item/W) @@ -550,10 +551,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(UPDATE_ICON) cell = null charging = APC_NOT_CHARGING - update_icon() + update_appearance(UPDATE_ICON) return else switch (has_electronics) @@ -570,14 +571,14 @@ else to_chat(user, span_warning("There is nothing to secure!")) return - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/machinery/power/apc/wirecutter_act(mob/living/user, obj/item/W) if (terminal && opened) @@ -626,7 +627,7 @@ "[user.name] has inserted the power cell to [src.name]!",\ span_notice("You insert the power cell.")) chargecount = 0 - update_icon() + update_appearance(UPDATE_ICON) else if (W.GetID()) togglelock(user) else if (istype(W, /obj/item/stack/cable_coil) && opened) @@ -704,7 +705,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(UPDATE_ICON) else to_chat(user, span_warning("[src] has both electronics and a cell.")) return @@ -719,7 +720,7 @@ to_chat(user, span_notice("You replace missing APC's cover.")) qdel(W) opened = APC_COVER_OPENED - update_icon() + update_appearance(UPDATE_ICON) return if (has_electronics) to_chat(user, span_warning("You cannot repair this APC until you remove the electronics still inside!")) @@ -733,7 +734,7 @@ obj_integrity = max_integrity if (opened==APC_COVER_REMOVED) opened = APC_COVER_OPENED - update_icon() + update_appearance(UPDATE_ICON) 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 +743,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(UPDATE_ICON) 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 +760,7 @@ playsound(src, 'sound/machines/clockcult/steam_whoosh.ogg', 50, FALSE) opened = APC_COVER_CLOSED locked = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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 +816,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(UPDATE_ICON) return TRUE else to_chat(user, span_warning("[src] has both electronics and a cell.")) @@ -835,7 +836,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(UPDATE_ICON) updateUsrDialog() else to_chat(user, span_warning("Access denied.")) @@ -866,7 +867,7 @@ opened = APC_COVER_REMOVED coverlocked = FALSE visible_message(span_warning("The APC cover is knocked down!")) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/power/apc/emag_act(mob/user) if(!(obj_flags & EMAGGED) && !malfhack) @@ -882,7 +883,7 @@ obj_flags |= EMAGGED locked = FALSE to_chat(user, span_notice("You emag the APC interface.")) - update_icon() + update_appearance(UPDATE_ICON) // attack with hand - remove cell (if cover open) or interact with the APC @@ -899,10 +900,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(UPDATE_ICON) src.cell = null charging = APC_NOT_CHARGING - src.update_icon() + src.update_appearance(UPDATE_ICON) return if((stat & MAINT) && !opened) //no board; no interface return @@ -1040,7 +1041,7 @@ to_chat(usr, "The APC does not respond to the command.") else locked = !locked - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("cover") coverlocked = !coverlocked @@ -1055,20 +1056,20 @@ chargemode = !chargemode if(!chargemode) charging = APC_NOT_CHARGING - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("channel") if(params["eqp"]) equipment = setsubsystem(text2num(params["eqp"])) - update_icon() + update_appearance(UPDATE_ICON) update() else if(params["lgt"]) lighting = setsubsystem(text2num(params["lgt"])) - update_icon() + update_appearance(UPDATE_ICON) update() else if(params["env"]) environ = setsubsystem(text2num(params["env"])) - update_icon() + update_appearance(UPDATE_ICON) update() . = TRUE if("overload") @@ -1086,7 +1087,7 @@ malfvacate() if("reboot") failure_timer = 0 - update_icon() + update_appearance(UPDATE_ICON) update() if("emergency_lighting") emergency_lights = !emergency_lights @@ -1111,7 +1112,7 @@ add_hiddenprint(user) log_combat(user, src, "turned [operating ? "on" : "off"]") update() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/power/apc/proc/malfhack(mob/living/silicon/ai/malf) if(!istype(malf)) @@ -1252,7 +1253,7 @@ /obj/machinery/power/apc/process() if(icon_update_needed) - update_icon() + update_appearance(UPDATE_ICON) if(stat & (BROKEN|MAINT)) return if(!area.requires_power) @@ -1427,7 +1428,7 @@ if(APC_RESET_EMP) equipment = 3 environ = 3 - update_icon() + update_appearance(UPDATE_ICON) update() // damage and destruction acts @@ -1443,7 +1444,7 @@ lighting = 0 equipment = 0 environ = 0 - update_icon() + update_appearance(UPDATE_ICON) update() addtimer(CALLBACK(src, PROC_REF(reset), APC_RESET_EMP), 600) diff --git a/code/modules/power/apc/apc_appearance.dm b/code/modules/power/apc/apc_appearance.dm new file mode 100644 index 000000000000..4cc22180e224 --- /dev/null +++ b/code/modules/power/apc/apc_appearance.dm @@ -0,0 +1,119 @@ +// update the APC icon to show the three base states +// also add overlays for indicator lights +/obj/machinery/power/apc/update_appearance(updates=check_updates()) + icon_update_needed = FALSE + if(!updates) + return + + . = ..() + // And now, separately for cleanness, the lighting changing + if(!update_state) + switch(charging) + if(APC_NOT_CHARGING) + set_light_color(COLOR_SOFT_RED) + if(APC_CHARGING) + set_light_color(LIGHT_COLOR_BLUE) + if(APC_FULLY_CHARGED) + set_light_color(LIGHT_COLOR_GREEN) + set_light(light_on_range) + return + + if(update_state & UPSTATE_BLUESCREEN) + set_light_color(LIGHT_COLOR_BLUE) + set_light(light_on_range) + return + + set_light(0) + +/obj/machinery/power/apc/update_icon_state() + if(!update_state) + icon_state = "apc0" + return ..() + if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) + var/basestate = "apc[cell ? 2 : 1]" + if(update_state & UPSTATE_OPENED1) + icon_state = (update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) ? "apcmaint" : basestate + else if(update_state & UPSTATE_OPENED2) + icon_state = "[basestate][((update_state & UPSTATE_BROKE) || malfhack) ? "-b" : null]-nocover" + return ..() + if(update_state & UPSTATE_BROKE) + icon_state = "apc-b" + return ..() + if(update_state & UPSTATE_BLUESCREEN) + icon_state = "apcemag" + return ..() + if(update_state & UPSTATE_WIREEXP) + icon_state = "apcewires" + return ..() + if(update_state & UPSTATE_MAINT) + icon_state = "apc0" + return ..() + +/obj/machinery/power/apc/update_overlays() + . = ..() + . = ..() + if((stat & (BROKEN|MAINT)) || update_state) + return + + . += mutable_appearance(icon, "apcox-[locked]") + . += SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir) + . += mutable_appearance(icon, "apco3-[charging]") + . += SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, EMISSIVE_PLANE, dir) + if(!operating) + return + + . += mutable_appearance(icon, "apco0-[equipment]") + . += SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, EMISSIVE_PLANE, dir) + . += mutable_appearance(icon, "apco1-[lighting]") + . += SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, EMISSIVE_PLANE, dir) + . += mutable_appearance(icon, "apco2-[environ]") + . += SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, EMISSIVE_PLANE, dir) + +/// Checks for what icon updates we will need to handle +/obj/machinery/power/apc/proc/check_updates() + SIGNAL_HANDLER + . = NONE + + // Handle icon status: + var/new_update_state = NONE + if(stat & BROKEN) + new_update_state |= UPSTATE_BROKE + if(stat & MAINT) + new_update_state |= UPSTATE_MAINT + + if(opened) + new_update_state |= (opened << UPSTATE_COVER_SHIFT) + if(cell) + new_update_state |= UPSTATE_CELL_IN + + else if((obj_flags & EMAGGED) || malfai) + new_update_state |= UPSTATE_BLUESCREEN + else if(panel_open) + new_update_state |= UPSTATE_WIREEXP + + if(new_update_state != update_state) + update_state = new_update_state + . |= UPDATE_ICON_STATE + + // Handle overlay status: + var/new_update_overlay = NONE + if(operating) + new_update_overlay |= UPOVERLAY_OPERATING + + if(!update_state) + if(locked) + new_update_overlay |= UPOVERLAY_LOCKED + + new_update_overlay |= (charging << UPOVERLAY_CHARGING_SHIFT) + new_update_overlay |= (equipment << UPOVERLAY_EQUIPMENT_SHIFT) + new_update_overlay |= (lighting << UPOVERLAY_LIGHTING_SHIFT) + new_update_overlay |= (environ << UPOVERLAY_ENVIRON_SHIFT) + + if(new_update_overlay != update_overlay) + update_overlay = new_update_overlay + . |= UPDATE_OVERLAYS + + +// Used in process so it doesn't update the icon too much +/obj/machinery/power/apc/proc/queue_icon_update() + icon_update_needed = TRUE diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ff93006eba42..f05e5bcabc19 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(UPDATE_ICON) /obj/structure/cable/Destroy() // called when a cable is deleted if(powernet) @@ -117,9 +117,10 @@ 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(UPDATE_ICON) -/obj/structure/cable/update_icon() +/obj/structure/cable/update_icon(updates=ALL) + . = ..() icon_state = "[d1]-[d2]" color = null add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY) @@ -492,12 +493,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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/stack/cable_coil/suicide_act(mob/user) if(locate(/obj/structure/chair/stool) in get_turf(user)) @@ -537,7 +538,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(UPDATE_ICON) /////////////////////////////////// // General procedures @@ -562,7 +563,8 @@ 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_icon(updates=ALL) + . = ..() if(novariants) return icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" @@ -576,7 +578,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(UPDATE_ICON) //add cables to the stack /obj/item/stack/cable_coil/proc/give(extra) @@ -584,7 +586,7 @@ By design, d1 is the smallest direction and d2 is the highest amount = max_amount else amount += extra - update_icon() + update_appearance(UPDATE_ICON) @@ -633,7 +635,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(UPDATE_ICON) //create a new powernet with the cable, if needed it will be merged later var/datum/powernet/PN = new() @@ -705,7 +707,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(UPDATE_ICON) //create a new powernet with the cable, if needed it will be merged later var/datum/powernet/newPN = new(loc.z) @@ -747,7 +749,7 @@ By design, d1 is the smallest direction and d2 is the highest return - C.update_icon() + C.update_appearance(UPDATE_ICON) C.d1 = nd1 C.d2 = nd2 @@ -755,7 +757,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(UPDATE_ICON) C.mergeConnectedNetworks(C.d1) //merge the powernets... @@ -786,7 +788,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(UPDATE_ICON) ////////////////////////////// // Misc. @@ -848,7 +850,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(UPDATE_ICON) /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 a15b72fca84f..65020462c3e1 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(UPDATE_ICON) RegisterSignal(src, COMSIG_ITEM_MAGICALLY_CHARGED, PROC_REF(on_magic_charge)) var/static/list/loc_connections = list( @@ -77,7 +77,7 @@ . |= COMPONENT_ITEM_BURNT_OUT charge = maxcharge - update_icon() + update_appearance(UPDATE_ICON) // 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(UPDATE_ICON) return . @@ -96,7 +96,8 @@ else return PROCESS_KILL -/obj/item/stock_parts/cell/update_icon() +/obj/item/stock_parts/cell/update_icon(updates=ALL) + . = ..() cut_overlays() if(grown_battery) add_overlay(image('icons/obj/power.dmi',"grown_wires")) @@ -220,7 +221,7 @@ /obj/item/stock_parts/cell/crap/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/upgraded name = "upgraded power cell" @@ -242,7 +243,7 @@ /obj/item/stock_parts/cell/secborg/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/mini_egun name = "miniature energy gun power cell" @@ -278,7 +279,7 @@ /obj/item/stock_parts/cell/high/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/super name = "super-capacity power cell" @@ -290,7 +291,7 @@ /obj/item/stock_parts/cell/super/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/hyper name = "hyper-capacity power cell" @@ -302,7 +303,7 @@ /obj/item/stock_parts/cell/hyper/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/bluespace name = "bluespace power cell" @@ -315,7 +316,7 @@ /obj/item/stock_parts/cell/bluespace/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/infinite name = "infinite-capacity power cell!" @@ -336,7 +337,8 @@ maxcharge = 50000 ratingdesc = FALSE -/obj/item/stock_parts/cell/infinite/abductor/update_icon() +/obj/item/stock_parts/cell/infinite/abductor/update_icon(updates=ALL) + . = ..() return @@ -372,7 +374,7 @@ /obj/item/stock_parts/cell/emproof/empty/Initialize(mapload) . = ..() charge = 0 - update_icon() + update_appearance(UPDATE_ICON) /obj/item/stock_parts/cell/emproof/corrupt() return diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 6a61c3bbf381..0ede6cc0d48c 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(UPDATE_ICON) component_parts = list(new /obj/item/circuitboard/machine/generator) AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) @@ -31,7 +31,8 @@ SSair.atmos_machinery -= src return ..() -/obj/machinery/power/generator/update_icon() +/obj/machinery/power/generator/update_icon(updates=ALL) + . = ..() cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) @@ -106,7 +107,7 @@ var/datum/gas_mixture/cold_circ_air1 = cold_circ.airs[1] cold_circ_air1.merge(cold_air) - update_icon() + update_appearance(UPDATE_ICON) src.updateDialog() @@ -219,7 +220,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(UPDATE_ICON) to_chat(user, span_notice("You disconnect [src]'s circulator links.")) playsound(src, 'sound/misc/box_deploy.ogg', 50) return TRUE @@ -245,7 +246,7 @@ kill_circs() connect_to_network() to_chat(user, span_notice("You [anchored?"secure":"unsecure"] [src].")) - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/power/generator/screwdriver_act(mob/user, obj/item/I) @@ -260,7 +261,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(UPDATE_ICON) return TRUE /obj/machinery/power/generator/crowbar_act(mob/user, obj/item/I) @@ -283,11 +284,11 @@ /obj/machinery/power/generator/proc/kill_circs() if(hot_circ) hot_circ.generator = null - hot_circ.update_icon() + hot_circ.update_appearance(UPDATE_ICON) hot_circ = null if(cold_circ) cold_circ.generator = null - cold_circ.update_icon() + cold_circ.update_appearance(UPDATE_ICON) 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 5e6593c35804..b1001afca118 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -43,7 +43,8 @@ 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_icon(updates=ALL) + . = ..() ..() icon_state = "[get_status()]_[sprite_number]" @@ -154,7 +155,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(UPDATE_ICON) /obj/machinery/gravity_generator/main/proc/connected_parts() return parts.len == 8 @@ -177,7 +178,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(UPDATE_ICON) set_power() // Interaction @@ -190,14 +191,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(UPDATE_ICON) 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(UPDATE_ICON) return if(GRAV_NEEDS_PLASTEEL) if(istype(I, /obj/item/stack/sheet/plasteel)) @@ -207,7 +208,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(UPDATE_ICON) else to_chat(user, span_warning("You need 10 sheets of plasteel!")) return @@ -259,10 +260,11 @@ 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_icon(updates=ALL) + . = ..() ..() for(var/obj/O in parts) - O.update_icon() + O.update_appearance(UPDATE_ICON) // Set the charging state based on power/breaker. /obj/machinery/gravity_generator/main/proc/set_power() @@ -274,7 +276,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(UPDATE_ICON) // Set the state of the gravity. /obj/machinery/gravity_generator/main/proc/set_state(new_state) @@ -295,7 +297,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(UPDATE_ICON) update_list() src.updateUsrDialog() if(alert) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index f8ca79194b24..3d42a34b1952 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(UPDATE_ICON) cell = null add_fingerprint(user) @@ -339,7 +339,8 @@ QDEL_NULL(cell) return ..() -/obj/machinery/light/update_icon() +/obj/machinery/light/update_icon(updates=ALL) + . = ..() cut_overlays() switch(status) // set icon_states if(LIGHT_OK) @@ -413,7 +414,7 @@ else use_power = IDLE_POWER_USE set_light(0) - update_icon() + update_appearance(UPDATE_ICON) active_power_usage = (brightness * 10) if(on != on_gs) @@ -542,7 +543,7 @@ set_light(0) forced_off = !forced_off on = !on - update_icon() + update_appearance(UPDATE_ICON) update() else return ..() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index afe65f073e13..1326d1652960 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -45,15 +45,16 @@ /obj/machinery/power/port_gen/proc/TogglePower() if(active) active = FALSE - update_icon() + update_appearance(UPDATE_ICON) soundloop.stop() else if(HasFuel()) active = TRUE START_PROCESSING(SSmachines, src) - update_icon() + update_appearance(UPDATE_ICON) soundloop.start() -/obj/machinery/power/port_gen/update_icon() +/obj/machinery/power/port_gen/update_icon(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 b23d8adb3cec..878e4821a1c5 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(UPDATE_ICON) // 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..d957f631aa5f 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(UPDATE_ICON) else if(W.GetID()) if(togglelock(user)) return TRUE @@ -294,14 +294,15 @@ if(active) toggle_power() else - update_icon() + update_appearance(UPDATE_ICON) /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_icon(updates=ALL) + . = ..() cut_overlays() if(loaded_tank) add_overlay("ptank") @@ -327,7 +328,7 @@ else icon_state = "ca" flick("ca_deactive", src) - update_icon() + update_appearance(UPDATE_ICON) /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 78e4e045a113..5103c8778bfa 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -120,7 +120,8 @@ QDEL_NULL(sparks) return ..() -/obj/machinery/power/emitter/update_icon() +/obj/machinery/power/emitter/update_icon(updates=ALL) + . = ..() if(active && powernet) icon_state = avail(active_power_usage) ? icon_state_on : icon_state_underpowered else @@ -146,7 +147,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(UPDATE_ICON) else to_chat(user, span_warning("The controls are locked!")) @@ -169,20 +170,20 @@ return if(state != EMITTER_WELDED || (!powernet && active_power_usage)) active = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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 45b2ddb3acca..ac51fc4f09bb 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -44,7 +44,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() if(warming_up) add_overlay("+a[warming_up]") @@ -170,7 +171,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(UPDATE_ICON) /obj/machinery/field/generator/proc/turn_off() active = FG_OFFLINE @@ -179,7 +180,7 @@ field_generator power level display while (warming_up>0 && !active) sleep(5 SECONDS) warming_up-- - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/field/generator/proc/turn_on() active = FG_CHARGING @@ -187,7 +188,7 @@ field_generator power level display while (warming_up<3 && active) sleep(5 SECONDS) warming_up++ - update_icon() + update_appearance(UPDATE_ICON) if(warming_up >= 3) start_fields() @@ -303,7 +304,7 @@ field_generator power level display connected_gens |= G G.connected_gens |= src - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/field/generator/proc/cleanup() @@ -318,7 +319,7 @@ field_generator power level display FG.cleanup() connected_gens -= FG clean_up = 0 - update_icon() + update_appearance(UPDATE_ICON) //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 6bc4f7dc0d8c..87ea3f5140f4 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -106,7 +106,7 @@ construction_state = PA_CONSTRUCTION_PANEL_OPEN update_state() - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/particle_accelerator/deconstruct(disassembled = TRUE) @@ -121,7 +121,8 @@ investigate_log("was moved whilst active; it powered down.", INVESTIGATE_SINGULO) -/obj/structure/particle_accelerator/update_icon() +/obj/structure/particle_accelerator/update_icon(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 a6bc79e0402d..4bc467ac7b80 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(UPDATE_ICON) connected_parts.Cut() return if(!part_scan()) @@ -62,7 +62,8 @@ active = FALSE connected_parts.Cut() -/obj/machinery/particle_accelerator/control_box/update_icon() +/obj/machinery/particle_accelerator/control_box/update_icon(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 +85,7 @@ for(var/CP in connected_parts) var/obj/structure/particle_accelerator/part = CP part.strength = strength - part.update_icon() + part.update_appearance(UPDATE_ICON) /obj/machinery/particle_accelerator/control_box/proc/add_strength(s) if(assembled && (strength < strength_upper_limit)) @@ -120,12 +121,12 @@ if(connected_parts.len < 6) investigate_log("lost a connected part; It powered down.", INVESTIGATE_SINGULO) toggle_power() - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) return //emit some particles for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts) @@ -198,14 +199,14 @@ var/obj/structure/particle_accelerator/part = CP part.strength = strength part.powered = TRUE - part.update_icon() + part.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) return TRUE @@ -269,7 +270,7 @@ if(did_something) user.changeNext_move(CLICK_CD_MELEE) update_state() - update_icon() + update_appearance(UPDATE_ICON) return ..() @@ -365,7 +366,7 @@ to_chat(operator, "You [locked ? "enable" : "disable"] the area restriction."); . = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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 19d5552a8a4c..db39cc10dfc2 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(UPDATE_ICON) /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(UPDATE_ICON) 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(UPDATE_ICON) return //building and linking a terminal @@ -205,7 +205,8 @@ obj_break() -/obj/machinery/power/smes/update_icon() +/obj/machinery/power/smes/update_icon(updates=ALL) + . = ..() cut_overlays() if(stat & BROKEN) return @@ -286,7 +287,7 @@ // only update icon if state changed if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting) - update_icon() + update_appearance(UPDATE_ICON) @@ -316,7 +317,7 @@ output_used -= excess if(clev != chargedisplay() ) //if needed updates the icons overlay - update_icon() + update_appearance(UPDATE_ICON) return @@ -353,12 +354,12 @@ if("tryinput") input_attempt = !input_attempt log_smes(usr) - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("tryoutput") output_attempt = !output_attempt log_smes(usr) - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("input") var/target = params["target"] @@ -420,7 +421,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(UPDATE_ICON) log_smes() /obj/machinery/power/smes/engineering @@ -446,7 +447,7 @@ return output_attempt = !output_attempt log_smes(user) - update_icon() + update_appearance(UPDATE_ICON) #undef SMES_OUTPUTTING #undef SMES_NOT_OUTPUTTING diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index bb9e9457076e..652b2f1d9839 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(UPDATE_ICON) /obj/machinery/power/solar/Destroy() unset_control() //remove from control computer @@ -113,7 +113,8 @@ new /obj/item/shard(src.loc) qdel(src) -/obj/machinery/power/solar/update_icon() +/obj/machinery/power/solar/update_icon(updates=ALL) + . = ..() ..() cut_overlays() var/matrix/turner = matrix() @@ -134,7 +135,7 @@ if(azimuth_current != azimuth_target) azimuth_current = azimuth_target occlusion_setup() - update_icon() + update_appearance(UPDATE_ICON) needs_to_update_solar_exposure = TRUE ///trace towards sun to see if we're in shadow @@ -349,7 +350,7 @@ if(connected_tracker && length(connected_panels)) track = SOLAR_TRACK_AUTO connected_tracker.sun_update(SSsun, SSsun.azimuth) - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/power/solar_control/Destroy() for(var/obj/machinery/power/solar/M in connected_panels) @@ -372,7 +373,8 @@ if(!T.control) //i.e unconnected T.set_control(src) -/obj/machinery/power/solar_control/update_icon() +/obj/machinery/power/solar_control/update_icon(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 5ae45fcc4890..8f523deafe8d 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -33,9 +33,10 @@ pixel_x = rand(-10, 10) pixel_y = rand(-10, 10) setDir(pick(GLOB.alldirs)) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/ammo_casing/update_icon() +/obj/item/ammo_casing/update_icon(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 +60,7 @@ else continue if (boolets > 0) - box.update_icon() + box.update_appearance(UPDATE_ICON) 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 +73,7 @@ . = ..() /obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3) - update_icon() + update_appearance(UPDATE_ICON) 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..85b5374638e6 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(UPDATE_ICON) 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 f34ed497f52a..9344d0e5a102 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(UPDATE_ICON) diff --git a/code/modules/projectiles/ammunition/reusable/arrow.dm b/code/modules/projectiles/ammunition/reusable/arrow.dm index 124516d06256..20af263e22e2 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/ammo_casing/reusable/arrow/proc/add_flame() flaming = TRUE - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) ..() /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..59bfa0b04f13 100644 --- a/code/modules/projectiles/ammunition/reusable/foam.dm +++ b/code/modules/projectiles/ammunition/reusable/foam.dm @@ -10,7 +10,8 @@ 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_icon(updates=ALL) + . = ..() ..() if (modified) icon_state = "foamdart_empty" @@ -26,7 +27,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(UPDATE_ICON) 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..2db87086242d 100644 --- a/code/modules/projectiles/attachments/_attachment.dm +++ b/code/modules/projectiles/attachments/_attachment.dm @@ -35,7 +35,8 @@ /// See code/modules/projectiles/attachments/laser_sight.dm for example. var/list/actions_list = list() -/obj/item/attachment/update_icon() +/obj/item/attachment/update_icon(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..fcc00d98237c 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(UPDATE_ICON) /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..479064cdad1c 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(UPDATE_ICON) /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 b68ca45f49ab..25bc1eed9047 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /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(UPDATE_ICON) + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/ammo_box/AltClick(mob/user) . = ..() @@ -167,9 +167,10 @@ 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(UPDATE_ICON) -/obj/item/ammo_box/update_icon() +/obj/item/ammo_box/update_icon(updates=ALL) + . = ..() var/rounds_left = stored_ammo.len switch(multiple_sprites) if(AMMO_BOX_PER_BULLET) @@ -206,4 +207,4 @@ /obj/item/ammo_box/magazine/handle_atom_del(atom/A) stored_ammo -= A - update_icon() + update_appearance(UPDATE_ICON) diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index 690c880c15a1..2c22ca5bb099 100644 --- a/code/modules/projectiles/boxes_magazines/external/grenade.dm +++ b/code/modules/projectiles/boxes_magazines/external/grenade.dm @@ -5,7 +5,8 @@ caliber = "75" max_ammo = 8 -/obj/item/ammo_box/magazine/m75/update_icon() +/obj/item/ammo_box/magazine/m75/update_icon(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..992c69735e9e 100644 --- a/code/modules/projectiles/boxes_magazines/external/lmg.dm +++ b/code/modules/projectiles/boxes_magazines/external/lmg.dm @@ -32,6 +32,7 @@ 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_icon(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 951b1411d8ef..c3e5f9bfbcf2 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -64,7 +64,8 @@ caliber = ".45" max_ammo = 8 -/obj/item/ammo_box/magazine/m45/update_icon() +/obj/item/ammo_box/magazine/m45/update_icon(updates=ALL) + . = ..() ..() if (ammo_count() >= 8) icon_state = "45-8" @@ -81,7 +82,8 @@ caliber = "9mm" max_ammo = 15 -/obj/item/ammo_box/magazine/pistolm9mm/update_icon() +/obj/item/ammo_box/magazine/pistolm9mm/update_icon(updates=ALL) + . = ..() ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" @@ -95,7 +97,8 @@ caliber = ".50ae" max_ammo = 7 -/obj/item/ammo_box/magazine/m50/update_icon() +/obj/item/ammo_box/magazine/m50/update_icon(updates=ALL) + . = ..() . = ..() if (ammo_count() >= 7) icon_state = "50ae-7" @@ -112,7 +115,8 @@ caliber = "38" max_ammo = 8 -/obj/item/ammo_box/magazine/v38/update_icon() +/obj/item/ammo_box/magazine/v38/update_icon(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..e260d3f80c78 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -8,7 +8,8 @@ caliber = LASER max_ammo = 20 -/obj/item/ammo_box/magazine/recharge/update_icon() +/obj/item/ammo_box/magazine/recharge/update_icon(updates=ALL) + . = ..() ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." cut_overlays() @@ -29,7 +30,8 @@ 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_icon(updates=ALL) + . = ..() ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) @@ -74,7 +76,8 @@ "fire" = 2 ) -/obj/item/gun/ballistic/automatic/pistol/ntusp/update_icon() +/obj/item/gun/ballistic/automatic/pistol/ntusp/update_icon(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 +107,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(UPDATE_ICON) if(isgun(loc)) var/obj/item/gun/ballistic/G = loc if(!G.magazine == src) @@ -135,7 +138,8 @@ 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_icon(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..32f27881dab2 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -8,7 +8,8 @@ caliber = ".45" max_ammo = 10 -/obj/item/ammo_box/magazine/m10mm/rifle/update_icon() +/obj/item/ammo_box/magazine/m10mm/rifle/update_icon(updates=ALL) + . = ..() ..() if(ammo_count()) icon_state = "75-8" @@ -25,7 +26,8 @@ caliber = "a556" max_ammo = 30 -/obj/item/ammo_box/magazine/m556/update_icon() +/obj/item/ammo_box/magazine/m556/update_icon(updates=ALL) + . = ..() ..() icon_state = "5.56m[sprite_designation]-[round(ammo_count(),5)]" @@ -55,7 +57,8 @@ caliber = "a556" max_ammo = 30 -/obj/item/ammo_box/magazine/r556/update_icon() +/obj/item/ammo_box/magazine/r556/update_icon(updates=ALL) + . = ..() ..() if(ammo_count()) icon_state = "arg556[sprite_designation]" @@ -96,7 +99,8 @@ caliber = "m308" max_ammo = 15 -/obj/item/ammo_box/magazine/m308/update_icon() +/obj/item/ammo_box/magazine/m308/update_icon(updates=ALL) + . = ..() ..() if(ammo_count()) icon_state = "m308[sprite_designation]" @@ -130,7 +134,8 @@ caliber = "a762" max_ammo = 11 -/obj/item/ammo_box/magazine/ks762/update_icon() +/obj/item/ammo_box/magazine/ks762/update_icon(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..0777f32191fb 100644 --- a/code/modules/projectiles/boxes_magazines/external/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/external/shotgun.dm @@ -10,7 +10,8 @@ max_ammo = 8 sprite_designation = "b" -/obj/item/ammo_box/magazine/m12g/update_icon() +/obj/item/ammo_box/magazine/m12g/update_icon(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..cd50a4847b83 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -8,7 +8,8 @@ caliber = "4.6x30mm" max_ammo = 20 -/obj/item/ammo_box/magazine/wt550m9/update_icon() +/obj/item/ammo_box/magazine/wt550m9/update_icon(updates=ALL) + . = ..() ..() switch(ammo_count()) if(17 to 21) //Considers the extra bullet in the chamber @@ -75,7 +76,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_icon(updates=ALL) // Snowflake code snowflake code ..() switch(ammo_count()) if(9 to 11) //Considers the extra bullet in the chamber @@ -101,7 +102,8 @@ caliber = "9mm" max_ammo = 32 -/obj/item/ammo_box/magazine/uzim9mm/update_icon() +/obj/item/ammo_box/magazine/uzim9mm/update_icon(updates=ALL) + . = ..() ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" @@ -115,7 +117,8 @@ caliber = "9mm" max_ammo = 21 -/obj/item/ammo_box/magazine/smgm9mm/update_icon() +/obj/item/ammo_box/magazine/smgm9mm/update_icon(updates=ALL) + . = ..() ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" @@ -145,7 +148,8 @@ caliber = ".45" max_ammo = 24 -/obj/item/ammo_box/magazine/smgm45/update_icon() +/obj/item/ammo_box/magazine/smgm45/update_icon(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..3bb49412436c 100644 --- a/code/modules/projectiles/boxes_magazines/external/sniper.dm +++ b/code/modules/projectiles/boxes_magazines/external/sniper.dm @@ -9,7 +9,8 @@ max_ammo = 6 caliber = ".50bmg" -/obj/item/ammo_box/magazine/sniper_rounds/update_icon() +/obj/item/ammo_box/magazine/sniper_rounds/update_icon(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..9be6a9fd1e15 100644 --- a/code/modules/projectiles/boxes_magazines/external/toy.dm +++ b/code/modules/projectiles/boxes_magazines/external/toy.dm @@ -9,7 +9,8 @@ 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_icon(updates=ALL) + . = ..() ..() if(ammo_count()) icon_state = "smg9mm-42" @@ -35,7 +36,8 @@ 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_icon(updates=ALL) + . = ..() ..() icon_state = "c20r45-[round(ammo_count(),2)]" @@ -50,7 +52,8 @@ 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_icon(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..7b47c450a3bd 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(UPDATE_ICON) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d6128dfa15bf..bb9c5b7319b4 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) 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,7 +409,7 @@ shoot_with_empty_chamber(user) return process_chamber() - update_icon() + update_appearance(UPDATE_ICON) semicd = TRUE addtimer(CALLBACK(src, PROC_REF(reset_semicd)), fire_delay) @@ -419,7 +419,8 @@ recent_shoot = world.time return TRUE -/obj/item/gun/update_icon() +/obj/item/gun/update_icon(updates=ALL) + . = ..() ..() @@ -629,7 +630,7 @@ else cut_overlay(flashlight_overlay, TRUE) flashlight_overlay = null - update_icon() + update_appearance(UPDATE_ICON) 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 703e8dfe6a9d..6834aa2444c7 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(UPDATE_ICON) 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(UPDATE_ICON) /obj/item/gun/ballistic/Initialize(mapload) . = ..() @@ -177,7 +177,7 @@ feedback_firing_icon = feedback_original_icon_base if (!spawnwithmagazine) bolt_locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) return if (!magazine) if (!starting_mag_type) @@ -185,10 +185,11 @@ else magazine = new starting_mag_type(src) chamber_round() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/update_icon() +/obj/item/gun/ballistic/update_icon(updates=ALL) + . = ..() if (QDELETED(src)) return ..() @@ -281,7 +282,7 @@ else playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) feedback("slide_close") - update_icon() + update_appearance(UPDATE_ICON) ///Drops the bolt from a locked position /obj/item/gun/ballistic/proc/drop_bolt(mob/user = null) @@ -291,7 +292,7 @@ bolt_locked = FALSE feedback("slide_close") chamber_round() - update_icon() + update_appearance(UPDATE_ICON) ///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 +309,7 @@ feedback("mag_in") if (bolt_type == BOLT_TYPE_OPEN && !bolt_locked) chamber_round(TRUE) - update_icon() + update_appearance(UPDATE_ICON) return TRUE else to_chat(user, span_warning("You cannot seem to get \the [src] out of your hands!")) @@ -340,10 +341,10 @@ else magazine = null user.put_in_hands(old_mag) - old_mag.update_icon() + old_mag.update_appearance(UPDATE_ICON) if (display_message) to_chat(user, span_notice("You pull the [magazine_wording] out of \the [src].")) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/can_shoot() return chambered @@ -376,8 +377,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(UPDATE_ICON) + update_appearance(UPDATE_ICON) return if(istype(A, /obj/item/suppressor)) var/obj/item/suppressor/S = A @@ -420,11 +421,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(UPDATE_ICON) /obj/item/gun/ballistic/proc/install_enloudener(obj/item/enloudener/E) enloudened = E - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/AltClick(mob/user) if (unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) @@ -438,7 +439,7 @@ user.put_in_hands(suppressed) w_class -= suppressed.w_class suppressed = null - update_icon() + update_appearance(UPDATE_ICON) return if(enloudened && can_unsuppress) if(!user.is_holding(src)) @@ -447,7 +448,7 @@ user.put_in_hands(enloudened) w_class -= enloudened.w_class enloudened = null - update_icon() + update_appearance(UPDATE_ICON) return ///Prefire empty checks for the bolt drop @@ -456,7 +457,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(UPDATE_ICON) ///postfire empty checks for bolt locking and sound alarms /obj/item/gun/ballistic/proc/postfire_empty_checks() @@ -464,12 +465,12 @@ if (!alarmed && empty_alarm) playsound(src, empty_alarm_sound, empty_alarm_volume, empty_alarm_vary) alarmed = TRUE - update_icon() + update_appearance(UPDATE_ICON) if (bolt_type == BOLT_TYPE_LOCKING) if(!bolt_locked) feedback("slide_open") bolt_locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/afterattack() prefire_empty_checks() @@ -500,7 +501,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(UPDATE_ICON) else to_chat(user, span_warning("[src] is empty!")) return @@ -630,7 +631,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(UPDATE_ICON) 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 ec4fd862e563..e2c13f426957 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -27,7 +27,8 @@ /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_icon(updates=ALL) + . = ..() ..() if(!select) add_overlay("[initial(icon_state)]_semi") @@ -56,7 +57,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(UPDATE_ICON) for(var/X in actions) var/datum/action/A = X A.build_all_button_icons() @@ -82,7 +83,7 @@ /obj/item/gun/ballistic/automatic/c20r/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/automatic/wt550 name = "\improper security auto carbine" @@ -133,7 +134,7 @@ /obj/item/gun/ballistic/automatic/m90/Initialize(mapload) . = ..() underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/automatic/m90/unrestricted pin = /obj/item/firing_pin @@ -141,7 +142,7 @@ /obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize(mapload) . = ..() underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(src) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/automatic/m90/afterattack(atom/target, mob/living/user, flag, params) if(select == 2) @@ -157,7 +158,8 @@ else ..() -/obj/item/gun/ballistic/automatic/m90/update_icon() +/obj/item/gun/ballistic/automatic/m90/update_icon(updates=ALL) + . = ..() ..() switch(select) if(0) @@ -188,7 +190,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(UPDATE_ICON) return /obj/item/gun/ballistic/automatic/tommygun @@ -262,10 +264,11 @@ playsound(user, 'sound/weapons/sawopen.ogg', 60, 1) else playsound(user, 'sound/weapons/sawopen.ogg', 60, 1) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/automatic/l6_saw/update_icon() +/obj/item/gun/ballistic/automatic/l6_saw/update_icon(updates=ALL) + . = ..() . = ..() add_overlay("l6_door_[cover_open ? "open" : "closed"]") @@ -276,7 +279,7 @@ return else . = ..() - update_icon() + update_appearance(UPDATE_ICON) //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 39598331ba6c..1c3c687a6c5d 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -43,7 +43,7 @@ /obj/item/gun/ballistic/bow/chamber_round() chambered = magazine.get_round(1) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/dropped() . = ..() @@ -61,7 +61,7 @@ chambered = null magazine.give_round(old_chambered) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/equipped(mob/user, slot) ..() @@ -71,7 +71,7 @@ chambered = null magazine.get_round(FALSE) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/attack_self(mob/living/user) if(drawing) @@ -121,7 +121,7 @@ user.put_in_hands(AC) to_chat(user, span_notice("You remove [AC].")) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/ammo_casing)) @@ -131,9 +131,10 @@ to_chat(user, span_notice("You notch [I].")) nerfed = istype(I, /obj/item/ammo_casing/reusable/arrow/toy) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/bow/update_icon() +/obj/item/gun/ballistic/bow/update_icon(updates=ALL) + . = ..() cut_overlay(arrow_overlay, TRUE) icon_state = "[initial(icon_state)][chambered ? "_firing" : ""]" if(get_ammo()) @@ -451,7 +452,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlay(arrow_overlay, TRUE) if(folded) @@ -492,7 +494,7 @@ to_chat(user, span_notice("You fabricate an arrow.")) recharge_arrow() update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/energy/proc/recharge_arrow() if(folded || magazine.get_round(TRUE)) @@ -500,7 +502,7 @@ var/ammo_type = magazine.ammo_type magazine.give_round(new ammo_type()) update_slowdown() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/energy/attackby(obj/item/I, mob/user, params) return @@ -512,7 +514,7 @@ QDEL_NULL(current_round) if(!TIMER_COOLDOWN_CHECK(src, "arrow_recharge")) recharge_arrow() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/ballistic/bow/energy/proc/select_projectile(mob/living/user) var/obj/item/ammo_box/magazine/internal/bow/energy/M = magazine @@ -550,7 +552,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(UPDATE_ICON) /obj/item/gun/ballistic/bow/energy/CtrlClick(mob/living/user) if(!can_fold || !user.is_holding(src)) @@ -580,7 +582,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(UPDATE_ICON) /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 9bca7518e0cc..0c3b290c55b3 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(UPDATE_ICON) user.update_inv_back() else to_chat(user, span_warning("You are already holding the gun!")) @@ -81,7 +81,8 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunpack/update_icon() +/obj/item/minigunpack/update_icon(updates=ALL) + . = ..() if(armed) icon_state = "notholstered" else @@ -96,7 +97,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(UPDATE_ICON) user.update_inv_back() diff --git a/code/modules/projectiles/guns/ballistic/minigun.dm b/code/modules/projectiles/guns/ballistic/minigun.dm index a7c5e9da5701..2fe3991bc177 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(UPDATE_ICON) user.update_inv_back() else to_chat(user, span_warning("You are already holding the gun!")) @@ -81,7 +81,8 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunbackpack/update_icon() +/obj/item/minigunbackpack/update_icon(updates=ALL) + . = ..() if(armed) icon_state = "notholstered" else @@ -96,7 +97,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(UPDATE_ICON) user.update_inv_back() diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 002f16d91691..30a76ee99871 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(UPDATE_ICON) + A.update_appearance(UPDATE_ICON) 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..a93cf2c8afc2 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -15,7 +15,8 @@ bolt_drop_sound = "sound/weapons/mosinboltin.ogg" tac_reloads = FALSE -obj/item/gun/ballistic/rifle/update_icon() +obj/item/gun/ballistic/rifle/update_icon(updates=ALL) + . = ..() ..() add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") @@ -25,7 +26,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(UPDATE_ICON) return drop_bolt(user) diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index e5626fb46520..2aeb79dee741 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -228,11 +228,12 @@ 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(UPDATE_ICON) 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_icon(updates=ALL) + . = ..() ..() if(slung) icon_state = "ishotgunsling" @@ -243,7 +244,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(UPDATE_ICON) /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 c65adaa8a00f..256b25d52ccc 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -13,7 +13,8 @@ item_flags = NONE casing_ejector = FALSE -/obj/item/gun/ballistic/automatic/toy/update_icon() +/obj/item/gun/ballistic/automatic/toy/update_icon(updates=ALL) + . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -56,7 +57,8 @@ casing_ejector = FALSE can_suppress = FALSE -/obj/item/gun/ballistic/shotgun/toy/update_icon() +/obj/item/gun/ballistic/shotgun/toy/update_icon(updates=ALL) + . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -90,7 +92,8 @@ /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_icon(updates=ALL) + . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -110,6 +113,7 @@ /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_icon(updates=ALL) + . = ..() . = ..() add_overlay("[icon_state]_toy") diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index cf7810067b49..1fa4719ab9ab 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(UPDATE_ICON)? 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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) /obj/item/gun/energy/attack_self(mob/living/user as mob) if(ammo_type.len > 1) select_fire(user) - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) 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 d7ede30bf273..9b85ca3dcd5b 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(UPDATE_ICON) /obj/item/gun/energy/dueling/update_icon(force_update) . = ..() @@ -230,7 +230,8 @@ duration = 30 var/setting -/obj/effect/temp_visual/dueling_chaff/update_icon() +/obj/effect/temp_visual/dueling_chaff/update_icon(updates=ALL) + . = ..() . = ..() switch(setting) if(DUEL_SETTING_A) @@ -251,13 +252,13 @@ . = ..() var/obj/item/projectile/energy/duel/D = BB D.setting = setting - D.update_icon() + D.update_appearance(UPDATE_ICON) /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(UPDATE_ICON) //Projectile @@ -268,7 +269,8 @@ homing = TRUE var/setting -/obj/item/projectile/energy/duel/update_icon() +/obj/item/projectile/energy/duel/update_icon(updates=ALL) + . = ..() . = ..() switch(setting) if(DUEL_SETTING_A) @@ -323,7 +325,8 @@ 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_icon(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 f35aff17fee8..5b6b2d251f2f 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -30,7 +30,8 @@ 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_icon(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 563a01fc4b3c..f6db13cb2336 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(UPDATE_ICON) /obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time) if(!cell) @@ -142,10 +142,11 @@ playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) else to_chat(loc, span_warning("[src] silently charges up.")) - update_icon() + update_appearance(UPDATE_ICON) overheat = FALSE -/obj/item/gun/energy/kinetic_accelerator/update_icon() +/obj/item/gun/energy/kinetic_accelerator/update_icon(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 6ac021300bab..5d7134111a6c 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -34,7 +34,8 @@ pin = null ammo_x_offset = 1 -/obj/item/gun/energy/decloner/update_icon() +/obj/item/gun/energy/decloner/update_icon(updates=ALL) + . = ..() ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) @@ -208,7 +209,8 @@ . = ..(amount=1) -/obj/item/gun/energy/plasmacutter/update_icon() +/obj/item/gun/energy/plasmacutter/update_icon(updates=ALL) + . = ..() return /obj/item/gun/energy/plasmacutter/adv @@ -306,7 +308,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][select]" item_state = icon_state @@ -384,7 +387,8 @@ can_charge = FALSE use_cyborg_cell = TRUE -/obj/item/gun/energy/printer/update_icon() +/obj/item/gun/energy/printer/update_icon(updates=ALL) + . = ..() return /obj/item/gun/energy/printer/emp_act() diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 7b08f3da3ab4..785a0bc26720 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(UPDATE_ICON) recharge_newshot() return . @@ -108,7 +108,8 @@ recharge_newshot() return 1 -/obj/item/gun/magic/update_icon() +/obj/item/gun/magic/update_icon(updates=ALL) + . = ..() return /obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 383cb47830c5..efb9ba6b73fd 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -21,7 +21,8 @@ . = ..() . += "Has [charges] charge\s remaining." -/obj/item/gun/magic/wand/update_icon() +/obj/item/gun/magic/wand/update_icon(updates=ALL) + . = ..() icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" /obj/item/gun/magic/wand/attack(atom/target, mob/living/user) @@ -44,7 +45,7 @@ zap_self(user) else . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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 ab196eda9af9..c02bdb51d2ca 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -148,7 +148,8 @@ current_zoom_x = 0 current_zoom_y = 0 -/obj/item/gun/energy/beam_rifle/update_icon() +/obj/item/gun/energy/beam_rifle/update_icon(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 ae5f27377a2b..878bc373ecf5 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -41,10 +41,11 @@ user.put_in_hands(bomb) user.visible_message(span_warning("[user] detaches [bomb] from [src].")) bomb = null - update_icon() + update_appearance(UPDATE_ICON) return ..() -/obj/item/gun/blastcannon/update_icon() +/obj/item/gun/blastcannon/update_icon(updates=ALL) + . = ..() if(bomb) icon_state = icon_state_loaded name = "blast cannon" @@ -65,7 +66,7 @@ return FALSE user.visible_message(span_warning("[user] attaches [T] to [src]!")) bomb = T - update_icon() + update_appearance(UPDATE_ICON) return TRUE return ..() @@ -94,7 +95,7 @@ var/power = bomb? calculate_bomb() : debug_power power = min(power, max_power) QDEL_NULL(bomb) - update_icon() + update_appearance(UPDATE_ICON) 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 9798c722b26a..41fe02823bcf 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -18,7 +18,7 @@ /obj/item/gun/syringe/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) chambered = new /obj/item/ammo_casing/syringegun(src) /obj/item/gun/syringe/handle_atom_del(atom/A) @@ -37,7 +37,7 @@ /obj/item/gun/syringe/process_chamber() if(chambered && !chambered.BB) //we just fired recharge_newshot() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gun/syringe/examine(mob/user) . = ..() @@ -71,14 +71,15 @@ to_chat(user, span_notice("You load [A] into \the [src].")) syringes += A recharge_newshot() - update_icon() + update_appearance(UPDATE_ICON) 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_icon(updates=ALL) + . = ..() . = ..() if(!has_syringe_overlay) return @@ -124,7 +125,7 @@ to_chat(user, span_notice("You load \the [D] into \the [src].")) syringes += D recharge_newshot() - update_icon() + update_appearance(UPDATE_ICON) 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 175a73c951ce..cdb90cfd1447 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -450,7 +450,7 @@ for(var/atom/movable/AM in contents) C.insert(AM) C.welded = weld - C.update_icon() + C.update_appearance(UPDATE_ICON) created = TRUE return ..() @@ -477,7 +477,7 @@ if(!welded) return icon_state = magic_icon - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/closet/decay/after_weld(weld_state) if(weld_state) @@ -497,7 +497,7 @@ /obj/structure/closet/decay/proc/unmagify() icon_state = weakened_icon - update_icon() + update_appearance(UPDATE_ICON) 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..751419a950e1 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(UPDATE_ICON) /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 d5d0914bde36..6b6f210a6cc6 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(UPDATE_ICON) /obj/machinery/chem_dispenser/Destroy() QDEL_NULL(beaker) @@ -145,7 +145,8 @@ if(working_state) flick(working_state,src) -/obj/machinery/chem_dispenser/update_icon() +/obj/machinery/chem_dispenser/update_icon(updates=ALL) + . = ..() cut_overlays() icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]" if(has_panel_overlay && panel_open) @@ -347,7 +348,7 @@ if(default_unfasten_wrench(user, I)) return if(default_deconstruction_screwdriver(user, icon_state, icon_state, I)) - update_icon() + update_appearance(UPDATE_ICON) return if(default_deconstruction_crowbar(I)) return @@ -375,7 +376,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(UPDATE_ICON) 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 +435,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/chem_dispenser/on_deconstruction() @@ -479,7 +480,7 @@ var/old = dir . = ..() if(dir != old) - update_icon() // the beaker needs to be re-positioned if we rotate + update_appearance(UPDATE_ICON) // 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..aa9ec700c085 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -21,16 +21,17 @@ . = ..() if(A == beaker) beaker = null - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/chem_heater/update_icon() +/obj/machinery/chem_heater/update_icon(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(UPDATE_ICON) /obj/machinery/chem_heater/AltClick(mob/living/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) @@ -47,7 +48,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/chem_heater/RefreshParts() @@ -91,7 +92,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(UPDATE_ICON) return return ..() @@ -129,7 +130,7 @@ if("power") on = !on . = TRUE - update_icon() + update_appearance(UPDATE_ICON) 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 177d08bc2404..4ee34c6b780f 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -65,11 +65,12 @@ if(A == beaker) beaker = null reagents.clear_reagents() - update_icon() + update_appearance(UPDATE_ICON) else if(A == bottle) bottle = null -/obj/machinery/chem_master/update_icon() +/obj/machinery/chem_master/update_icon(updates=ALL) + . = ..() cut_overlays() if (stat & BROKEN) add_overlay("waitlight") @@ -103,7 +104,7 @@ replace_beaker(user, B) to_chat(user, span_notice("You add [B] to [src].")) updateUsrDialog() - update_icon() + update_appearance(UPDATE_ICON) 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 +132,7 @@ beaker = new_beaker else beaker = null - update_icon() + update_appearance(UPDATE_ICON) 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..9fcf3822a6e7 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(UPDATE_ICON) /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 59b9f2a427f9..99188da75ac4 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) return ..() /obj/machinery/computer/pandemic/proc/get_by_index(thing, index) @@ -122,10 +122,11 @@ /obj/machinery/computer/pandemic/proc/reset_replicator_cooldown() wait = FALSE - update_icon() + update_appearance(UPDATE_ICON) playsound(src, 'sound/machines/ping.ogg', 30, TRUE) -/obj/machinery/computer/pandemic/update_icon() +/obj/machinery/computer/pandemic/update_icon(updates=ALL) + . = ..() if(stat & BROKEN) icon_state = (beaker ? "mixer1_b" : "mixer0_b") return @@ -140,7 +141,7 @@ if(beaker) beaker.forceMove(drop_location()) beaker = null - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/computer/pandemic/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -215,7 +216,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(UPDATE_ICON) 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 +230,7 @@ B.name = "[D.name] vaccine bottle" B.reagents.add_reagent(/datum/reagent/vaccine, 15, list(id)) wait = TRUE - update_icon() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(reset_replicator_cooldown)), 200) . = TRUE @@ -247,7 +248,7 @@ beaker = I to_chat(user, span_notice("You insert [I] into [src].")) - update_icon() + update_appearance(UPDATE_ICON) else return ..() diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 8be38a4680d0..5ae36d4ea595 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(UPDATE_ICON) /obj/machinery/reagentgrinder/Destroy() if(container) @@ -89,7 +89,7 @@ . = ..() if(A == container) container = null - update_icon() + update_appearance(UPDATE_ICON) if(holdingitems[A]) holdingitems -= A @@ -99,7 +99,8 @@ AM.forceMove(drop_location()) holdingitems = list() -/obj/machinery/reagentgrinder/update_icon() +/obj/machinery/reagentgrinder/update_icon(updates=ALL) + . = ..() if(!container) icon_state = "juicer" return @@ -118,7 +119,7 @@ container = new_container else container = null - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) @@ -142,7 +143,7 @@ return replace_container(user, B) to_chat(user, span_notice("You add [B] to [src].")) - update_icon() + update_appearance(UPDATE_ICON) 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 b883fedc1ed1..18e421308614 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -36,7 +36,8 @@ 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_icon(updates=ALL) + . = ..() if((!is_operational()) || (!on) || (reagents.total_volume == 0)) if (panel_open) icon_state = "smoke0-o" @@ -70,12 +71,12 @@ return if(reagents.total_volume == 0) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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(UPDATE_ICON) 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 +132,7 @@ switch(action) if("purge") reagents.clear_reagents() - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("setting") var/amount = text2num(params["amount"]) @@ -140,7 +141,7 @@ . = TRUE if("power") on = !on - update_icon() + update_appearance(UPDATE_ICON) 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 96054f949928..3419ba010036 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(UPDATE_ICON) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 633b94a1001b..faa875420502 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -57,7 +57,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(UPDATE_ICON) /obj/item/reagent_containers/blood/on_reagent_change(changetype) if(reagents) @@ -69,7 +69,7 @@ else blood_type = null update_pack_name() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/reagent_containers/blood/proc/update_pack_name() if(!labelled) @@ -78,7 +78,8 @@ else name = "blood pack" -/obj/item/reagent_containers/blood/update_icon() +/obj/item/reagent_containers/blood/update_icon(updates=ALL) + . = ..() cut_overlays() var/v = min(round(reagents.total_volume / volume * 10), 10) @@ -141,4 +142,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 31ef33730ecc..161978d3cd4a 100644 --- a/code/modules/reagents/reagent_containers/borghypo.dm +++ b/code/modules/reagents/reagent_containers/borghypo.dm @@ -55,7 +55,8 @@ Borg Hypospray regenerate_reagents() charge_timer = 0 - //update_icon() + //update_icon(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 916c955288e0..f6af3528dfc8 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -15,12 +15,13 @@ . = ..() if(!icon_state) icon_state = "bottle" - update_icon() + update_appearance(UPDATE_ICON) /obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/bottle/update_icon() +/obj/item/reagent_containers/glass/bottle/update_icon(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 640716e6e1b8..f98c021dc380 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(UPDATE_ICON) 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(UPDATE_ICON) else @@ -98,9 +98,10 @@ to_chat(user, span_notice("You fill [src] with [trans] unit\s of the solution.")) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/dropper/update_icon() +/obj/item/reagent_containers/dropper/update_icon(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 0d4d5a14eeae..f720b7c41c6d 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -119,15 +119,16 @@ /obj/item/reagent_containers/glass/beaker/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) -/obj/item/reagent_containers/glass/beaker/update_icon() +/obj/item/reagent_containers/glass/beaker/update_icon(updates=ALL) + . = ..() cut_overlays() if(reagents.total_volume) @@ -177,7 +178,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states ..() icon_state = "beakerwhite" @@ -422,9 +424,10 @@ /obj/item/reagent_containers/glass/mixbowl/on_reagent_change(changetype) ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/mixbowl/update_icon() +/obj/item/reagent_containers/glass/mixbowl/update_icon(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 685083f3619f..20438c495514 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(UPDATE_ICON) 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,10 @@ var/mob/living/silicon/robot/R = user if(R.cell.use(100)) reagents.add_reagent_list(list_reagents) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/autoinjector/medipen/update_icon() +/obj/item/reagent_containers/autoinjector/medipen/update_icon(updates=ALL) + . = ..() if(reagents.total_volume > 0) icon_state = initial(icon_state) else @@ -304,9 +305,10 @@ if(ispath(container)) container = new container antispam = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/hypospray/update_icon() +/obj/item/hypospray/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if(ismob(loc)) @@ -352,7 +354,7 @@ user.put_in_hands(container) to_chat(user, span_notice("You remove [container] from [src].")) container = null - update_icon() + update_appearance(UPDATE_ICON) playsound(loc, pick(eject_sound), 50, 1) else to_chat(user, span_notice("This hypo isn't loaded!")) @@ -373,7 +375,7 @@ unload_hypo(user) 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(UPDATE_ICON) playsound(loc, pick(load_sound), 35, 1) return TRUE else @@ -430,7 +432,7 @@ if(HYPO_DRAW) draw(target, user) antispam = FALSE - update_icon() + update_appearance(UPDATE_ICON) /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 d338a4a87afb..56638d4daa75 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(UPDATE_ICON) RegisterSignal(src, COMSIG_ITEM_EMBED_TICK, PROC_REF(embed_inject)) /obj/item/reagent_containers/syringe/on_reagent_change(changetype) - update_icon() + update_appearance(UPDATE_ICON) /obj/item/reagent_containers/syringe/pickup(mob/user) ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/reagent_containers/syringe/dropped(mob/user) ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/item/reagent_containers/syringe/attack_self(mob/user) mode = !mode - update_icon() + update_appearance(UPDATE_ICON) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/reagent_containers/syringe/attack_hand() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) if(SYRINGE_INJECT) // Always log attemped injections for admins @@ -165,10 +165,11 @@ 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(UPDATE_ICON) -/obj/item/reagent_containers/syringe/update_icon() +/obj/item/reagent_containers/syringe/update_icon(updates=ALL) + . = ..() cut_overlays() var/rounded_vol if(reagents && reagents.total_volume) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 1dcc4bde816d..b0996259367c 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(UPDATE_ICON) 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 f7b15f1ba49c..1798b0dd2a7e 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -121,7 +121,8 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) movedir = backwards update() -/obj/machinery/conveyor/update_icon() +/obj/machinery/conveyor/update_icon(updates=ALL) + . = ..() if(!operating) icon_state = "conveyor[inverted ? "-0" : "0"]" else @@ -132,7 +133,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) if(stat & NOPOWER) operating = FALSE . = FALSE - update_icon() + update_appearance(UPDATE_ICON) // machine process // move items to the target location @@ -197,7 +198,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(UPDATE_ICON) else if(I.tool_behaviour == TOOL_MULTITOOL) switch(conveytime) @@ -253,7 +254,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) . = ..() if (newid) id = newid - update_icon() + update_appearance(UPDATE_ICON) LAZYADD(GLOB.conveyors_by_id[id], src) /obj/machinery/conveyor_switch/Destroy() @@ -271,7 +272,8 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) // update the icon depending on the position -/obj/machinery/conveyor_switch/update_icon() +/obj/machinery/conveyor_switch/update_icon(updates=ALL) + . = ..() if(position<0) if(invert_icon) icon_state = "switch-fwd" @@ -297,7 +299,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(UPDATE_ICON) CHECK_TICK // attack with hand, switch position @@ -318,13 +320,13 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) position = 0 operated = 1 - update_icon() + update_appearance(UPDATE_ICON) // 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(UPDATE_ICON) 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..df0da2e97c0c 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) // 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(UPDATE_ICON) // eject the contents of the disposal unit @@ -173,10 +173,11 @@ for(var/atom/movable/AM in src) AM.forceMove(T) AM.pipe_eject(0) - update_icon() + update_appearance(UPDATE_ICON) // update the icon & overlays to reflect mode & status -/obj/machinery/disposal/update_icon() +/obj/machinery/disposal/update_icon(updates=ALL) + . = ..() return /obj/machinery/disposal/proc/flush() @@ -233,7 +234,7 @@ src.transfer_fingerprints_to(stored) stored.anchored = FALSE stored.density = TRUE - stored.update_icon() + stored.update_appearance(UPDATE_ICON) 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(UPDATE_ICON) + update_appearance(UPDATE_ICON) else return ..() @@ -285,7 +286,7 @@ if(!user.canUseTopic(src, TRUE)) return flush = !flush - update_icon() + update_appearance(UPDATE_ICON) /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(UPDATE_ICON) . = TRUE if("handle-1") if(!panel_open) flush = TRUE - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("pump-0") if(pressure_charging) pressure_charging = FALSE - update_icon() + update_appearance(UPDATE_ICON) . = TRUE if("pump-1") if(!pressure_charging) pressure_charging = TRUE - update_icon() + update_appearance(UPDATE_ICON) . = 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(UPDATE_ICON) else visible_message(span_notice("[AM] bounces off of [src]'s rim!")) return ..() @@ -357,9 +358,10 @@ ..() full_pressure = FALSE pressure_charging = TRUE - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/disposal/bin/update_icon() +/obj/machinery/disposal/bin/update_icon(updates=ALL) + . = ..() cut_overlays() if(stat & BROKEN) pressure_charging = FALSE @@ -435,7 +437,7 @@ if(air_contents.return_pressure() >= SEND_PRESSURE) full_pressure = TRUE pressure_charging = FALSE - update_icon() + update_appearance(UPDATE_ICON) 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 7697a7036590..92cae2b0e2b3 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -32,7 +32,7 @@ if(flip) rotcomp.BaseRot(null,ROTATION_FLIP) - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/disposalconstruct/Move() var/old_dir = dir @@ -40,7 +40,8 @@ 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_icon(updates=ALL) + . = ..() icon_state = initial(pipe_type.icon_state) if(is_pipe()) icon_state = "con[icon_state]" @@ -63,7 +64,7 @@ // change visibility status and force update of icon /obj/structure/disposalconstruct/hide(intact) invisibility = (intact && level==1) ? INVISIBILITY_MAXIMUM: 0 // hide if floor is intact - update_icon() + update_appearance(UPDATE_ICON) /obj/structure/disposalconstruct/proc/get_disposal_dir() if(!is_pipe()) @@ -94,7 +95,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(UPDATE_ICON) /obj/structure/disposalconstruct/proc/can_be_rotated(mob/user,rotation_type) if(anchored) @@ -147,7 +148,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(UPDATE_ICON) 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 c69675312af7..86e92e4b4d23 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -64,11 +64,12 @@ 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() + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), time_between_uses) -/obj/structure/holyfountain/update_icon() +/obj/structure/holyfountain/update_icon(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..52fab6f808f7 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -48,10 +48,11 @@ 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(UPDATE_ICON) reset_busy() -/obj/machinery/rnd/destructive_analyzer/update_icon() +/obj/machinery/rnd/destructive_analyzer/update_icon(updates=ALL) + . = ..() if(loaded_item) icon_state = "d_analyzer_l" else @@ -94,7 +95,7 @@ Note: Must be placed within 3 tiles of the R&D Console else qdel(thing) if (!innermode) - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/machinery/rnd/destructive_analyzer/proc/user_try_decon_id(id, mob/user) @@ -150,5 +151,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(UPDATE_ICON) return TRUE diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 7d6c2fc83e70..5272c537cc39 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -563,12 +563,13 @@ addtimer(CALLBACK(src, PROC_REF(reset_exp)), resetTime) /obj/machinery/rnd/experimentor/proc/reset_exp() - update_icon() + update_appearance(UPDATE_ICON) recentlyExperimented = FALSE if(autoexperiment) do_experiment() -/obj/machinery/rnd/experimentor/update_icon() +/obj/machinery/rnd/experimentor/update_icon(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 305f9711f963..3417d9bd7866 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(UPDATE_ICON) /obj/machinery/nanite_chamber/proc/set_safety(threshold) if(!occupant) @@ -104,7 +104,8 @@ return SEND_SIGNAL(occupant, COMSIG_NANITE_DELETE) -/obj/machinery/nanite_chamber/update_icon() +/obj/machinery/nanite_chamber/update_icon(updates=ALL) + . = ..() cut_overlays() if((stat & MAINT) || panel_open) @@ -188,7 +189,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(UPDATE_ICON)//..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 f244b96d6aee..9fc62c1ce89c 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(UPDATE_ICON) . = 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..835ebcfbd4ec 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(UPDATE_ICON) else to_chat(user, span_warning("Access denied.")) @@ -44,9 +44,10 @@ obj_flags |= EMAGGED if(locked) locked = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/nanite_remote/update_icon() +/obj/item/nanite_remote/update_icon(updates=ALL) + . = ..() . = ..() cut_overlays() if(obj_flags & EMAGGED) @@ -166,7 +167,7 @@ if("lock") if(!(obj_flags & EMAGGED)) locked = TRUE - update_icon() + update_appearance(UPDATE_ICON) . = TRUE diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 5451fdd8e952..6f99898c52d8 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(UPDATE_ICON) /obj/machinery/public_nanite_chamber/proc/inject_nanites(mob/living/attacker) if(stat & (NOPOWER|BROKEN)) @@ -60,7 +60,8 @@ 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_icon(updates=ALL) + . = ..() cut_overlays() if((stat & MAINT) || panel_open) @@ -161,7 +162,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(UPDATE_ICON)//..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 f304969ebc76..40c5581b44b3 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(UPDATE_ICON) /obj/machinery/rnd/server/Destroy() SSresearch.servers -= src @@ -39,7 +39,8 @@ tot_rating += SP.rating heat_gen /= max(1, tot_rating) -/obj/machinery/rnd/server/update_icon() +/obj/machinery/rnd/server/update_icon(updates=ALL) + . = ..() if(panel_open) icon_state = "server_t" return @@ -53,7 +54,7 @@ /obj/machinery/rnd/server/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I) .=..() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/rnd/server/power_change() . = ..() @@ -65,7 +66,7 @@ working = FALSE else working = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/rnd/server/emp_act() . = ..() diff --git a/code/modules/security_levels/level_interface.dm b/code/modules/security_levels/level_interface.dm index 11fff53c633e..e89777c2c3d0 100644 --- a/code/modules/security_levels/level_interface.dm +++ b/code/modules/security_levels/level_interface.dm @@ -28,7 +28,8 @@ radio.independent = TRUE radio.recalculateChannels() -/obj/machinery/level_interface/update_icon() +/obj/machinery/level_interface/update_icon(updates=ALL) + . = ..() cut_overlays() if(!is_operational()) set_light_on(FALSE) diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index e83b789c568b..45fd7b7eef61 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -82,10 +82,10 @@ 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(UPDATE_ICON) for(var/obj/machinery/level_interface/LI in GLOB.machines) - LI.update_icon() + LI.update_appearance(UPDATE_ICON) 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 5d5f8eac070c..de8bfb333a1e 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -498,7 +498,8 @@ density = FALSE clockwork = TRUE //it'd look weird -/obj/machinery/computer/shuttle/pod/update_icon() +/obj/machinery/computer/shuttle/pod/update_icon(updates=ALL) + . = ..() return /obj/machinery/computer/shuttle/pod/emag_act(mob/user) diff --git a/code/modules/shuttle/manipulator.dm b/code/modules/shuttle/manipulator.dm index c82232e217a5..68cddd114902 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_icon(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..99be3d6a1f9a 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(UPDATE_ICON), so we don't need to call it + update_appearance(UPDATE_ICON) /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..c13af51c7769 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(UPDATE_ICON) /************************************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(UPDATE_ICON) //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 8b128e9f886f..0c50f411162c 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -29,7 +29,8 @@ 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_icon(updates=ALL) + . = ..() if(powered()) icon_state = "core" else @@ -37,7 +38,7 @@ obj/machinery/spaceship_navigation_beacon/emp_act() /obj/machinery/spaceship_navigation_beacon/power_change() . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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 d4564362a1e9..481727b56fdf 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -19,9 +19,10 @@ . = ..() if(prob(50)) desc = "Oh no, not again." - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/power/emitter/energycannon/magical/update_icon() +/obj/machinery/power/emitter/energycannon/magical/update_icon(updates=ALL) + . = ..() if(active) icon_state = icon_state_on else @@ -39,7 +40,7 @@ visible_message("\ [src] closes its eyes.") active = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/power/emitter/energycannon/magical/attackby(obj/item/W, mob/user, params) return diff --git a/code/modules/spells/spell_types/self/summonitem.dm b/code/modules/spells/spell_types/self/summonitem.dm index 26d960eb4038..61a2066d0f70 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(UPDATE_ICON) // 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 8fb1b92fac3b..7e2b43103905 100644 --- a/code/modules/surgery/anesthesia_machine.dm +++ b/code/modules/surgery/anesthesia_machine.dm @@ -20,9 +20,10 @@ if(is_roundstart) var/obj/item/tank/T = new /obj/item/tank/internals/anesthetic(src) attached_tank = T - update_icon() + update_appearance(UPDATE_ICON) -/obj/machinery/anesthetic_machine/update_icon() +/obj/machinery/anesthetic_machine/update_icon(updates=ALL) + . = ..() cut_overlays() if(mask_out) add_overlay("mask_off") @@ -44,7 +45,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(UPDATE_ICON) return . = ..() @@ -54,7 +55,7 @@ attached_tank.forceMove(loc) to_chat(user, "You remove the [attached_tank].") attached_tank = null - update_icon() + update_appearance(UPDATE_ICON) if(mask_out) retract_mask() @@ -67,7 +68,7 @@ else attached_mask.forceMove(src) mask_out = FALSE - update_icon() + update_appearance(UPDATE_ICON) return TRUE return FALSE @@ -87,7 +88,7 @@ target.open_internals(attached_tank, TRUE) mask_out = TRUE START_PROCESSING(SSmachines, src) - update_icon() + update_appearance(UPDATE_ICON) 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 c591bf219261..0b3becbd171d 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -231,7 +231,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(UPDATE_ICON) if(C.gloves) C.dropItemToGround(C.gloves, TRUE) C.update_inv_gloves() //to remove the bloody hands overlay @@ -249,7 +249,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(UPDATE_ICON) if(C.gloves) C.dropItemToGround(C.gloves, TRUE) C.update_inv_gloves() //to remove the bloody hands overlay @@ -334,7 +334,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(UPDATE_ICON) 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..89d9c76f975f 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(UPDATE_ICON) /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(UPDATE_ICON) /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..e00d42966643 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(UPDATE_ICON) 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(UPDATE_ICON) 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..65957bfa5f47 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -10,7 +10,8 @@ now_fixed = span_info("The pain in your abdomen has subsided.") var/inflamed -/obj/item/organ/appendix/update_icon() +/obj/item/organ/appendix/update_icon(updates=ALL) + . = ..() if(inflamed) icon_state = "appendixinflamed" name = "inflamed appendix" @@ -30,7 +31,7 @@ for(var/datum/disease/appendicitis/A in M.diseases) A.cure() inflamed = TRUE - update_icon() + update_appearance(UPDATE_ICON) ..() /obj/item/organ/appendix/Insert(mob/living/carbon/M, special = 0) @@ -64,7 +65,8 @@ 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_icon(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 5fa0ea931ed0..94225758f760 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) SetSlotFromZone() /obj/item/organ/cyberimp/leg/emp_act(severity) @@ -59,7 +59,8 @@ else CRASH("Invalid zone for [type]") -/obj/item/organ/cyberimp/leg/update_icon() +/obj/item/organ/cyberimp/leg/update_icon(updates=ALL) + . = ..() if(zone == BODY_ZONE_R_LEG) transform = null else // Mirroring the icon @@ -81,7 +82,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(UPDATE_ICON) /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 c45e71e971ed..3eda6cc71145 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(UPDATE_ICON) SetSlotFromZone() items_list = contents.Copy() @@ -33,7 +33,8 @@ return FALSE return TRUE -/obj/item/organ/cyberimp/arm/update_icon() +/obj/item/organ/cyberimp/arm/update_icon(updates=ALL) + . = ..() if(zone == BODY_ZONE_R_ARM) transform = null else // Mirroring the icon @@ -53,7 +54,7 @@ zone = BODY_ZONE_R_ARM if(SetSlotFromZone()) I.play_tool_sound(src) - update_icon() + update_appearance(UPDATE_ICON) to_chat(user, span_notice("You modify [src] to be installed on the [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.")) else to_chat(user, span_warning("[src] cannot be modified!")) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 8e8318edfab1..7ef1b2c2dfb0 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -169,9 +169,10 @@ if(!silent) to_chat(owner, span_notice("You turn your thrusters set off.")) on = FALSE - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/organ/cyberimp/chest/thrusters/update_icon() +/obj/item/organ/cyberimp/chest/thrusters/update_icon(updates=ALL) + . = ..() if(on) icon_state = "imp_jetpack-on" else @@ -275,9 +276,10 @@ on = !on if(!silent) to_chat(owner, span_notice("You turn your spinal implant [on? "on" : "off"].")) - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/organ/cyberimp/chest/spinalspeed/update_icon() +/obj/item/organ/cyberimp/chest/spinalspeed/update_icon(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 ef4d029470ef..5c36f6392aa0 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(UPDATE_ICON) 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) @@ -148,7 +148,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(UPDATE_ICON) //If for whatever reason, the implant is removed from the autosurgeon after it's switched /obj/item/autosurgeon/arm/syndicate/syndie_mantis uses = 1 @@ -325,7 +325,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(UPDATE_ICON) 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 434931c55e1b..232e54c414fd 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -24,9 +24,10 @@ /obj/item/organ/heart/Initialize(mapload) . = ..() icon_base = icon_state - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/organ/heart/update_icon() +/obj/item/organ/heart/update_icon(updates=ALL) + . = ..() if(beating) icon_state = "[icon_base]-on" else @@ -51,12 +52,12 @@ /obj/item/organ/heart/proc/Stop() beating = 0 - update_icon() + update_appearance(UPDATE_ICON) return TRUE /obj/item/organ/heart/proc/Restart() beating = 1 - update_icon() + update_appearance(UPDATE_ICON) 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 4805c86b9360..1a3121e15ef8 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -39,7 +39,8 @@ . = ..() languages_possible = languages_possible_base -/obj/item/organ/tongue/update_icon() +/obj/item/organ/tongue/update_icon(updates=ALL) + . = ..() . = ..() if(honked) // This tongue has a bike horn inside of it. Let's draw it add_overlay("honked") @@ -75,7 +76,7 @@ /obj/item/organ/tongue/Initialize(mapload) // this only exists to make sure the spawned tongue has a horn inside of it visually . = ..() - update_icon() + update_appearance(UPDATE_ICON) /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..487649cc2d7a 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(UPDATE_ICON) 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(UPDATE_ICON) 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..ccb053ab2df5 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(UPDATE_ICON) 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(UPDATE_ICON) else if(istype(I, /obj/item/janiupgrade)) if(floorbuffer) to_chat(user, span_warning("[src] already has a floor buffer!")) @@ -51,11 +51,12 @@ qdel(I) to_chat(user, span_notice("You upgrade [src] with the floor buffer.")) AddElement(/datum/element/cleaning) - update_icon() + update_appearance(UPDATE_ICON) else return ..() -/obj/vehicle/ridden/janicart/update_icon() +/obj/vehicle/ridden/janicart/update_icon(updates=ALL) + . = ..() cut_overlays() if(mybag) add_overlay("cart_garbage") @@ -70,7 +71,7 @@ mybag.forceMove(get_turf(user)) user.put_in_hands(mybag) mybag = null - update_icon() + update_appearance(UPDATE_ICON) /obj/vehicle/ridden/janicart/upgraded floorbuffer = TRUE diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index ae1970316efb..b73d03236ad2 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -265,7 +265,8 @@ 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_icon(updates=ALL) + . = ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" else @@ -973,7 +974,7 @@ GLOBAL_LIST_EMPTY(vending_products) else stat |= NOPOWER - update_icon() + update_appearance(UPDATE_ICON) //Somebody cut an important wire and now we're following a new definition of "pitch." /** diff --git a/tgui/docs/tutorial-and-examples.md b/tgui/docs/tutorial-and-examples.md index 3dba803c959a..fb553fc07c71 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(UPDATE_ICON) ``` 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(UPDATE_ICON) // Not applicable to all objects. ``` And the template: diff --git a/yogstation/code/controllers/subsystem/bluespace_locker.dm b/yogstation/code/controllers/subsystem/bluespace_locker.dm index e54b407ef0c0..9469d82ed2b3 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(UPDATE_ICON) + external_locker.update_appearance(UPDATE_ICON) /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 2c2903a81988..7abe1b406fc2 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(UPDATE_ICON) 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(UPDATE_ICON) 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 142aba7a87d0..dda2eb53d5d8 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(UPDATE_ICON) .=..() /obj/machinery/dominator/Destroy() @@ -54,7 +54,8 @@ /obj/machinery/dominator/tesla_act() qdel(src) -/obj/machinery/dominator/update_icon() +/obj/machinery/dominator/update_icon(updates=ALL) + . = ..() cut_overlays() if(!(stat & BROKEN)) icon_state = "dominator-active" @@ -137,7 +138,7 @@ spark_system.start() else if(!(stat & BROKEN)) spark_system.start() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/dominator/obj_break(damage_flag) @@ -196,7 +197,7 @@ SSshuttle.registerHostileEnvironment(src) name = "[gang.name] Gang [name]" operating = TRUE - update_icon() + update_appearance(UPDATE_ICON) countdown.color = gang.color countdown.start() @@ -244,7 +245,7 @@ set_light(0) operating = FALSE stat |= BROKEN - update_icon() + update_appearance(UPDATE_ICON) 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 f26843e72475..b56084988d8c 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(mapload) - update_icon() + update_appearance(UPDATE_ICON) if(buyable_items.len) return ..() for(var/i in subtypesof(/datum/gang_item)) @@ -138,7 +138,8 @@ recall(usr) attack_self(usr) -/obj/item/gangtool/update_icon() +/obj/item/gangtool/update_icon(updates=ALL) + . = ..() overlays.Cut() var/image/I = new(icon, "[icon_state]-overlay") if(gang) @@ -174,7 +175,7 @@ if(G) gang = G.gang gang.gangtools += src - update_icon() + update_appearance(UPDATE_ICON) 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..cc2d63696f9c 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(UPDATE_ICON) /obj/mecha/working/makeshift/moved_inside(mob/living/carbon/human/H) ..() - update_icon() + update_appearance(UPDATE_ICON) /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..d937c0376b74 100644 --- a/yogstation/code/game/objects/items/brace.dm +++ b/yogstation/code/game/objects/items/brace.dm @@ -23,7 +23,8 @@ var/obj/machinery/door/airlock/placed_on var/cover_open = FALSE -/obj/structure/deployed_brace/update_icon() +/obj/structure/deployed_brace/update_icon(updates=ALL) + . = ..() ..() cut_overlays() if(cover_open) @@ -53,7 +54,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(UPDATE_ICON) /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 ddee748e0504..cd9fa6acb177 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(UPDATE_ICON) /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 d007f0eab550..27269e1a76a9 100644 --- a/yogstation/code/game/objects/items/fishing/rods.dm +++ b/yogstation/code/game/objects/items/fishing/rods.dm @@ -206,10 +206,11 @@ opened = !opened w_class = opened ? WEIGHT_CLASS_BULKY : WEIGHT_CLASS_SMALL playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) - update_icon() + update_appearance(UPDATE_ICON) user.regenerate_icons() -/obj/item/twohanded/fishingrod/collapsible/update_icon() +/obj/item/twohanded/fishingrod/collapsible/update_icon(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 f85969bcfaf0..586c9d8c4cf9 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(UPDATE_ICON) 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(UPDATE_ICON) user.regenerate_icons() @@ -101,7 +101,8 @@ else qdel(M) -/obj/item/holotool/update_icon() +/obj/item/holotool/update_icon(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/premadepapers.dm b/yogstation/code/game/objects/items/premadepapers.dm index a8add201328f..564b23bbb402 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(UPDATE_ICON) /** @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) //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(UPDATE_ICON) /** * @@ -403,7 +403,7 @@ written += "" written += new/datum/langtext("
    Stamp:",/datum/language/common) written += new/datum/langtext("",/datum/language/common) - update_icon() + update_appearance(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) /** * @@ -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(UPDATE_ICON) // 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(UPDATE_ICON) //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(UPDATE_ICON) @@ -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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) /** * 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(UPDATE_ICON) //turdis bad diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index e30c0094ec3b..21b29989213c 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_icon(updates=ALL) icon_state = "[initial(icon_state)]_used" diff --git a/yogstation/code/game/objects/items/tools.dm b/yogstation/code/game/objects/items/tools.dm index cde82f097b5b..1f26e2a8aa74 100644 --- a/yogstation/code/game/objects/items/tools.dm +++ b/yogstation/code/game/objects/items/tools.dm @@ -66,7 +66,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(UPDATE_ICON) /obj/item/jawsoflife/proc/transform_cutters(mob/user) attack_verb = list("pinched", "nipped") @@ -80,7 +80,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(UPDATE_ICON) //better handdrill /obj/item/handdrill @@ -138,7 +138,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(UPDATE_ICON) /obj/item/handdrill/proc/transform_screwdriver(mob/user) desc = "A simple powered hand drill. It's fitted with a screw bit." @@ -150,7 +150,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(UPDATE_ICON) /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 2ceb921d75bf..183eb87d48b8 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(mapload)//<-- mirrored/overwritten proc . = ..() fireaxe = new - update_icon() + update_appearance(UPDATE_ICON) //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(UPDATE_ICON) /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(UPDATE_ICON) //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 6236ddc89caf..1b8d024b302b 100644 --- a/yogstation/code/game/objects/structures/toilet_bong.dm +++ b/yogstation/code/game/objects/structures/toilet_bong.dm @@ -20,7 +20,8 @@ weed_overlay = mutable_appearance('yogstation/icons/obj/watercloset.dmi', "weed") START_PROCESSING(SSobj, src) -/obj/structure/toilet_bong/update_icon() +/obj/structure/toilet_bong/update_icon(updates=ALL) + . = ..() . = ..() cut_overlays() if (LAZYLEN(contents)) @@ -44,7 +45,7 @@ smoke.set_up(smoke_spread, location = location, carry = boof.reagents, silent = TRUE) smoke.start() qdel(boof) - update_icon() + update_appearance(UPDATE_ICON) // 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..a4f15945230b 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(UPDATE_ICON) 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 bd7bf2d88a81..fa3c739017ff 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(UPDATE_ICON) return TRUE diff --git a/yogstation/code/modules/antagonists/slaughter/slaughter.dm b/yogstation/code/modules/antagonists/slaughter/slaughter.dm index 561a30f50e9d..fed512a52752 100644 --- a/yogstation/code/modules/antagonists/slaughter/slaughter.dm +++ b/yogstation/code/modules/antagonists/slaughter/slaughter.dm @@ -133,7 +133,8 @@ icon_state = "demon_heart-on" decay_factor = 0 -/obj/item/organ/heart/demon/update_icon() +/obj/item/organ/heart/demon/update_icon(updates=ALL) + . = ..() return //always beating visually /obj/item/organ/heart/demon/attack(mob/M, mob/living/carbon/user, obj/target) diff --git a/yogstation/code/modules/assembly/signaler.dm b/yogstation/code/modules/assembly/signaler.dm index 951b9fbb2e83..641a92617de9 100644 --- a/yogstation/code/modules/assembly/signaler.dm +++ b/yogstation/code/modules/assembly/signaler.dm @@ -5,9 +5,10 @@ /obj/item/assembly/signaler/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/item/assembly/signaler/update_icon() +/obj/item/assembly/signaler/update_icon(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..b6d6712def5c 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(UPDATE_ICON) /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 ffd7174204d6..cd6a8274bdde 100644 --- a/yogstation/code/modules/clothing/head/helmet.dm +++ b/yogstation/code/modules/clothing/head/helmet.dm @@ -5,7 +5,8 @@ . = ..() initial_state = "[initial(icon_state)]" -/obj/item/clothing/head/helmet/update_icon() +/obj/item/clothing/head/helmet/update_icon(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 94abc9883b90..a1f1a94c230b 100644 --- a/yogstation/code/modules/clothing/suits/nerd.dm +++ b/yogstation/code/modules/clothing/suits/nerd.dm @@ -57,7 +57,7 @@ . = ..() GC = new(src) GC.scanning = TRUE - update_icon() + update_appearance(UPDATE_ICON) /obj/item/clothing/suit/armor/nerd/Destroy() QDEL_NULL(GC) diff --git a/yogstation/code/modules/guardian/abilities/major/healing.dm b/yogstation/code/modules/guardian/abilities/major/healing.dm index d471a2b1fe89..1683af8a48fb 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(UPDATE_ICON) 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..266bafbc687f 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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..6fc408eca8df 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(UPDATE_ICON) 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 c99a33a04e1d..2bbcdae0b009 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(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_icon() + update_appearance(UPDATE_ICON) for(var/mob/living/N in buckled_mobs) unbuckle_mob(N) can_buckle = FALSE @@ -53,9 +53,10 @@ . = ..() if(.) can_buckle = initial(can_buckle) - update_icon() + update_appearance(UPDATE_ICON) -/mob/living/simple_animal/chocobo/update_icon() +/mob/living/simple_animal/chocobo/update_icon(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 8957c9d389fe..eec57a5a77de 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(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /mob/living/simple_animal/hostile/retaliate/goat/king/Found(atom/A) if(isliving(A)) @@ -251,11 +251,12 @@ 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(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_icon() +/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/update_icon(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..554048023299 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(UPDATE_ICON) diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 63262bd57139..82fdb2b7a994 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -15,7 +15,8 @@ connect_to_network() return ..() -/obj/machinery/power/validhunter_engine/update_icon() +/obj/machinery/power/validhunter_engine/update_icon(updates=ALL) + . = ..() if(operating) icon_state = "throw_me_in_the_trash_and_feed_my_remains_to_the_devil_operating" else @@ -74,7 +75,7 @@ /obj/machinery/power/validhunter_engine/proc/process_mob(mob/living/L, mob/user) operating = TRUE - update_icon() + update_appearance(UPDATE_ICON) playsound(src.loc, 'sound/machines/terminal_on.ogg', 50, 1) L.forceMove(src) @@ -159,7 +160,7 @@ pixel_x = initial(pixel_x) //return to its spot after shaking operating = FALSE - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/power/validhunter_engine/proc/fake_gib(mob/living/L) playsound(src.loc, 'sound/machines/terminal_off.ogg', 50, 1) @@ -167,5 +168,5 @@ dropContents() operating = FALSE - update_icon() + update_appearance(UPDATE_ICON) diff --git a/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm index 9aaa8b623031..5180df57aa3c 100644 --- a/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm @@ -13,7 +13,8 @@ casing_ejector = FALSE internal_magazine = TRUE -/obj/item/gun/ballistic/speargun/update_icon() +/obj/item/gun/ballistic/speargun/update_icon(updates=ALL) + . = ..() return /obj/item/gun/ballistic/speargun/attack_self() diff --git a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm index 64698a74717a..b79f04419b6a 100644 --- a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm +++ b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm @@ -23,7 +23,8 @@ 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_icon(updates=ALL) + . = ..() if(reagents.total_volume > 25) icon_state = initial(icon_state) else if(reagents.total_volume) @@ -45,7 +46,8 @@ 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_icon(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 f62799bbc453..1ebe6292cacb 100644 --- a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm +++ b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm @@ -27,7 +27,8 @@ if(!wires.is_cut(WIRE_SORT_SCAN)) sort_scan = TRUE -/obj/structure/disposalpipe/sorting/update_icon() +/obj/structure/disposalpipe/sorting/update_icon(updates=ALL) + . = ..() cut_overlays() . = ..() if(panel_open) @@ -37,7 +38,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(UPDATE_ICON) 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..02a6e2a13949 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(UPDATE_ICON) diff --git a/yogstation/code/modules/spacepods/equipment.dm b/yogstation/code/modules/spacepods/equipment.dm index aec8c6517d61..54454085cea5 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(UPDATE_ICON) /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..5ba97f85e2d3 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(UPDATE_ICON) /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 769a4112cc45..512df97a4d49 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(UPDATE_ICON) 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(UPDATE_ICON) 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(UPDATE_ICON) /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(UPDATE_ICON) /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(UPDATE_ICON) /obj/spacepod/return_air() return cabin_air @@ -396,7 +396,8 @@ GLOBAL_LIST_INIT(spacepods_list, list()) // there here's your frame pieces back, happy? qdel(src) -/obj/spacepod/update_icon() +/obj/spacepod/update_icon(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 32c252da6d48..5e11e52a92d5 100644 --- a/yogstation/code/modules/xenoarch/loot/gigadrill.dm +++ b/yogstation/code/modules/xenoarch/loot/gigadrill.dm @@ -13,13 +13,14 @@ /obj/vehicle/ridden/gigadrill/after_add_occupant(mob/M) . = ..() - update_icon() + update_appearance(UPDATE_ICON) /obj/vehicle/ridden/gigadrill/after_remove_occupant(mob/M) . = ..() - update_icon() + update_appearance(UPDATE_ICON) -/obj/vehicle/ridden/gigadrill/update_icon() +/obj/vehicle/ridden/gigadrill/update_icon(updates=ALL) + . = ..() . = ..() if(occupant_amount()) icon_state = "gigadrill_mov" From dbd33494031dac37d93812fc5f43b4986df93546 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 01:43:14 -0400 Subject: [PATCH 02/50] update name --- code/_onclick/hud/action_button.dm | 2 +- code/datums/actions/action.dm | 16 +++++------ code/datums/components/bakeable.dm | 3 +- .../components/storage/concrete/_concrete.dm | 4 +-- code/game/atoms.dm | 2 ++ code/game/machinery/doors/airlock.dm | 3 +- code/game/machinery/doors/airlock_types.dm | 3 +- .../mecha/equipment/weapons/mecha_ammo.dm | 3 +- code/game/mecha/mecha.dm | 4 +-- code/game/objects/structures/door_assembly.dm | 12 ++++---- code/modules/antagonists/_common/antag_hud.dm | 2 +- code/modules/antagonists/brother/brother.dm | 1 + code/modules/antagonists/ert/ert.dm | 1 + code/modules/antagonists/official/official.dm | 1 + .../food_and_drinks/food/customizables.dm | 6 ++-- code/modules/food_and_drinks/food/snacks.dm | 3 +- code/modules/hydroponics/gene_modder.dm | 6 ++-- code/modules/hydroponics/hydroponics.dm | 28 +++++++------------ .../carbon/human/species_types/jellypeople.dm | 1 + .../mob/living/simple_animal/slime/death.dm | 2 +- .../mob/living/simple_animal/slime/powers.dm | 2 +- .../mob/living/simple_animal/slime/slime.dm | 5 ++-- .../chemistry/recipes/slime_extracts.dm | 4 +-- 23 files changed, 55 insertions(+), 59 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 5e4cf84d785a..573e0de0fab5 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -268,7 +268,7 @@ 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 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/bakeable.dm b/code/datums/components/bakeable.dm index 3b4382e22974..412d2e0ebda7 100644 --- a/code/datums/components/bakeable.dm +++ b/code/datums/components/bakeable.dm @@ -67,8 +67,7 @@ for(var/obj/O in original.ingredients) BR.ingredients += O BR.mix_filling_color(O) - BR.update_name(O) - BR.update_overlays(O) + BR.update_appearance() if(original_object.custom_materials) diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 8ac3a89c6a90..79cb3f9d0883 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -191,7 +191,7 @@ if(!prevent_warning) mob_item_insertion_feedback(usr, M, I) SEND_SIGNAL(parent, COMSIG_STORAGE_INSERTED, I, M) - update_appearance(UPDATE_ICON) + update_icon() return TRUE /datum/component/storage/concrete/update_icon(updates=ALL) @@ -201,4 +201,4 @@ O.update_appearance(UPDATE_ICON) for(var/i in slaves) var/datum/component/storage/slave = i - slave.update_appearance(UPDATE_ICON) + slave.update_icon() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 920f17854b1a..ed01f05343ed 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 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index fdbd50f1c5c2..5ace29752d09 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1598,8 +1598,7 @@ A.state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS A.created_name = name A.previous_assembly = previous_airlock - A.update_name() - A.update_appearance(UPDATE_ICON) + A.update_appearance() if(!disassembled) if(A) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 5c5dbb706619..5204102cb6c1 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -226,8 +226,7 @@ DA.glass = TRUE if(heat_proof) DA.heat_proof_finished = TRUE - DA.update_appearance(UPDATE_ICON) - DA.update_name() + DA.update_appearance() qdel(src) /obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~ diff --git a/code/game/mecha/equipment/weapons/mecha_ammo.dm b/code/game/mecha/equipment/weapons/mecha_ammo.dm index c3080a16a99e..da3c9dd905be 100644 --- a/code/game/mecha/equipment/weapons/mecha_ammo.dm +++ b/code/game/mecha/equipment/weapons/mecha_ammo.dm @@ -17,7 +17,8 @@ /// 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(updates=ALL) + . = ..() if(!rounds) name = "empty ammo box" desc = "An exosuit ammuniton box that has since been emptied. Please recycle." diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 145e489702b1..14c6919e5b8c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1296,7 +1296,7 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013??? playsound(get_turf(user),A.load_audio,50,1) to_chat(user, span_notice("You add [ammo_needed] [A.round_term][ammo_needed > 1?"s":""] to the [gun.name]")) A.rounds = A.rounds - ammo_needed - A.update_name() + A.update_appearance(UPDATE_NAME) return TRUE else @@ -1307,7 +1307,7 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013??? playsound(get_turf(user),A.load_audio,50,1) to_chat(user, span_notice("You add [A.rounds] [A.round_term][A.rounds > 1?"s":""] to the [gun.name]")) A.rounds = 0 - A.update_name() + A.update_appearance(UPDATE_NAME) return TRUE if(!fail_chat_override) if(found_gun) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index be1abe21b0a5..a3e2addb7676 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -22,8 +22,7 @@ /obj/structure/door_assembly/Initialize(mapload) . = ..() - update_appearance(UPDATE_ICON) - update_name() + update_appearance() /obj/structure/door_assembly/examine(mob/user) . = ..() @@ -259,8 +258,7 @@ qdel(src) else return ..() - update_name() - update_appearance(UPDATE_ICON) + update_appearance() /obj/structure/door_assembly/update_icon(updates=ALL) . = ..() @@ -271,7 +269,8 @@ 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(updates=ALL) + . = ..() name = "" switch(state) if(AIRLOCK_ASSEMBLY_NEEDS_WIRES) @@ -294,8 +293,7 @@ if(electronics) target.electronics = source.electronics source.electronics.forceMove(target) - target.update_appearance(UPDATE_ICON) - target.update_name() + target.update_appearance() qdel(source) /obj/structure/door_assembly/deconstruct(disassembled = TRUE) diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 5592fadc16e8..9fcca9388dbf 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -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/update_icon() +/datum/atom_hud/alternate_appearance/basic/antagonist_hud/proc/update_icon() if (antag_hud_images.len == 0) image.icon = icon('icons/blanks/32x32.dmi', "nothing") else diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm index 53d34e0adbea..d6742eabdee2 100644 --- a/code/modules/antagonists/brother/brother.dm +++ b/code/modules/antagonists/brother/brother.dm @@ -169,6 +169,7 @@ meeting_areas -= meeting_area /datum/team/brother_team/proc/update_name() + . = ..() var/list/last_names = list() for(var/datum/mind/M in members) var/list/split_name = splittext(M.name," ") diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index f5892b008e6e..0b6c53162d2b 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -73,6 +73,7 @@ name_source = GLOB.last_names /datum/antagonist/ert/proc/update_name() + . = ..() owner.current.fully_replace_character_name(owner.current.real_name,"[role] [pick(name_source)]") /datum/antagonist/ert/deathsquad/New() diff --git a/code/modules/antagonists/official/official.dm b/code/modules/antagonists/official/official.dm index 7f7ac455bbc8..d12890a2fc92 100644 --- a/code/modules/antagonists/official/official.dm +++ b/code/modules/antagonists/official/official.dm @@ -43,6 +43,7 @@ name_source = GLOB.last_names /datum/antagonist/centcom/proc/update_name() + . = ..() owner.current.fully_replace_character_name(owner.current.real_name,"[role] [pick(name_source)]") /datum/antagonist/centcom/on_gain() diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 4e081b85a8a8..22a3a740a4f9 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -53,14 +53,14 @@ 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) to_chat(user, span_notice("You add the [I.name] to the [name].")) - update_name(S) + update_overlays(S = S) + update_name(S = S) else . = ..() -/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(updates=ALL, 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/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 9cd1aa6ea9a3..5f26058ab87f 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -255,7 +255,8 @@ 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/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index f72cee9fcba6..02aa0588d5d8 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -337,8 +337,7 @@ gene.value = max(gene.value, min_wrate) else if(istype(G, /datum/plant_gene/core/weed_chance)) gene.value = max(gene.value, min_wchance) - disk.update_name() - disk.update_appearance(UPDATE_ICON) + disk.update_appearance() qdel(seed) seed = null update_appearance(UPDATE_ICON) @@ -447,7 +446,8 @@ if(gene) add_overlay("datadisk_gene") -/obj/item/disk/plantgene/proc/update_name() +/obj/item/disk/plantgene/update_name(updates=ALL) + . = ..() 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 b344e2836c60..1319a2c44d8b 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -361,9 +361,8 @@ harvest = 0 weedlevel = 0 // Reset pestlevel = 0 // Reset - update_appearance(UPDATE_ICON) visible_message(span_warning("The [oldPlantName] is overtaken by some [myseed.plantname]!")) - update_name() + update_appearance() /obj/machinery/hydroponics/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0) // Mutates the current seed if(!myseed) @@ -395,9 +394,8 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_appearance(UPDATE_ICON) visible_message(span_warning("[oldPlantName] suddenly mutates into [myseed.plantname]!")) - update_name() + update_appearance() /obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant if( weedlevel > 5 ) @@ -415,9 +413,8 @@ weedlevel = 0 // Reset sleep(0.5 SECONDS) // Wait a while - update_appearance(UPDATE_ICON) visible_message(span_warning("The mutated weeds in [src] spawn some [myseed.plantname]!")) - update_name() + update_appearance() else to_chat(usr, span_warning("The few weeds in [src] seem to react, but only for a moment...")) @@ -427,10 +424,8 @@ pestlevel = 0 // Pests die lastproduce = 0 if(!dead) + dead = TRUE update_appearance(UPDATE_ICON) - dead = 1 - - /obj/machinery/hydroponics/proc/mutatepest(mob/user) if(pestlevel > 5) @@ -792,11 +787,10 @@ to_chat(user, span_notice("You plant [O].")) dead = 0 myseed = O - update_name() age = 1 plant_health = myseed.endurance lastcycle = world.time - update_appearance(UPDATE_ICON) + update_appearance() else to_chat(user, span_warning("[src] already has seeds in it!")) @@ -863,9 +857,8 @@ harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it qdel(myseed) myseed = null - update_name() weedlevel = 0 //Has a side effect of cleaning up those nasty weeds - update_appearance(UPDATE_ICON) + update_appearance() else return ..() @@ -895,8 +888,7 @@ to_chat(user, span_notice("You remove the dead plant from [src].")) qdel(myseed) myseed = null - update_name() - update_appearance(UPDATE_ICON) + update_appearance() else if(user) examine(user) @@ -930,9 +922,8 @@ if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest)) qdel(myseed) myseed = null - update_name() dead = 0 - update_appearance(UPDATE_ICON) + update_appearance() /// 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) @@ -968,7 +959,8 @@ self_sustaining = TRUE update_appearance(UPDATE_ICON) -/obj/machinery/hydroponics/proc/update_name() +/obj/machinery/hydroponics/update_name(updates=ALL) + . = ..() if(myseed) name = "[initial(name)] ([myseed.plantname])" else diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index b5ec23277559..a089b8509537 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -512,6 +512,7 @@ species = _species /datum/action/innate/integrate_extract/proc/update_name() + . = ..() if(!species || !species.current_extract) name = "Integrate Extract" desc = "Eat a slime extract to use its properties." diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm index 5435ce561ecf..19aa4ec103a1 100644 --- a/code/modules/mob/living/simple_animal/slime/death.dm +++ b/code/modules/mob/living/simple_animal/slime/death.dm @@ -15,7 +15,7 @@ E.Grant(src) revive(full_heal = 1) regenerate_icons() - update_name() + update_appearance(UPDATE_NAME) return if(buckled) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 34a93c979cbf..4490a13da32e 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -152,7 +152,7 @@ for(var/datum/action/innate/slime/evolve/E in actions) E.Remove(src) regenerate_icons() - update_name() + update_appearance(UPDATE_NAME) else to_chat(src, "I am not ready to evolve yet...") else diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 60f16e558944..9d782b06052b 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/proc/update_name() +/mob/living/simple_animal/slime/update_name(updates=ALL) + . = ..() if(slime_name_regex.Find(name)) number = rand(1, 1000) name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 0eb2e1075a5f..1eba0a7713dc 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -438,9 +438,9 @@ if(slime.docile) //Undoes docility, but doesn't make rabid. slime.visible_message(span_danger("[slime] forgets its training, becoming wild once again!")) slime.docile = FALSE - slime.update_name() + slime.update_appearance(UPDATE_NAME) continue - slime.rabid = 1 + slime.rabid = TRUE slime.visible_message(span_danger("The [slime] is driven into a frenzy!")) ..() From 1a4957fbe0f13f378f121944bd3dea831ee951fe Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 01:54:52 -0400 Subject: [PATCH 03/50] fixes --- .../game/gamemodes/clown_ops/bananium_bomb.dm | 6 +- code/game/objects/items/defib.dm | 2 +- code/game/objects/items/plushes.dm | 17 +-- code/game/objects/items/stacks/cash.dm | 7 +- .../nukeop/equipment/nuclearbomb.dm | 16 ++- .../machinery/components/fusion/hfr_parts.dm | 2 +- code/modules/cargo/supplypod.dm | 4 +- .../food_and_drinks/kitchen_machinery/oven.dm | 2 +- code/modules/pai/card.dm | 2 +- code/modules/power/apc/apc_appearance.dm | 119 ------------------ 10 files changed, 27 insertions(+), 150 deletions(-) delete mode 100644 code/modules/power/apc/apc_appearance.dm diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index d9a0f3551179..7feed74d00fd 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -10,8 +10,7 @@ switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) icon_state = "bananiumbomb_base" - update_icon_interior() - update_icon_lights() + update_appearance(UPDATE_ICON) if(NUKE_ON_TIMING) cut_overlays() icon_state = "bananiumbomb_timing" @@ -20,8 +19,7 @@ icon_state = "bananiumbomb_exploding" else icon_state = "bananiumbomb_base" - update_icon_interior() - update_icon_lights() + update_appearance(UPDATE_ICON) /obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station) switch(off_station) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 6147d62e25a6..866df2d71ec6 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -65,7 +65,7 @@ else powered = FALSE -/obj/item/defibrillator/proc/update_overlays() +/obj/item/defibrillator/update_overlays() . = ..() cut_overlays() if(!on) diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 965c971fe4a1..3943dd623d2a 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) @@ -358,6 +358,7 @@ cheer_up() /obj/item/toy/plush/update_desc(updates=ALL) + . = ..() desc = normal_desc if(mood_message) desc += mood_message diff --git a/code/game/objects/items/stacks/cash.dm b/code/game/objects/items/stacks/cash.dm index 530b7246cec5..65ce5efc26b9 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(mapload) . = ..() - update_desc() + update_appearance(UPDATE_DESC) /obj/item/stack/spacecash/update_desc(updates=ALL) + . = ..() 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/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 503e6326003d..42e690a1da2b 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -185,8 +185,7 @@ switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) icon_state = "nuclearbomb_base" - update_icon_interior() - update_icon_lights() + update_appearance(UPDATE_ICON) if(NUKE_ON_TIMING) cut_overlays() icon_state = "nuclearbomb_timing" @@ -195,11 +194,13 @@ icon_state = "nuclearbomb_exploding" else icon_state = "nuclearbomb_base" - update_icon_interior() - update_icon_lights() + update_appearance(UPDATE_ICON) -/obj/machinery/nuclearbomb/update_icon_interior() +/obj/machinery/nuclearbomb/update_overlays() + . = ..() cut_overlay(interior) + if(lights) + cut_overlay(lights) switch(deconstruction_state) if(NUKESTATE_UNSCREWED) interior = "panel-unscrewed" @@ -214,10 +215,6 @@ if(NUKESTATE_INTACT) return add_overlay(interior) - -/obj/machinery/nuclearbomb/update_icon_lights() - if(lights) - cut_overlay(lights) switch(get_nuke_state()) if(NUKE_OFF_LOCKED) lights = "" @@ -230,6 +227,7 @@ lights = "lights-exploding" add_overlay(lights) + /obj/machinery/nuclearbomb/process() if(timing && !exploding) if(detonation_timer < world.time) diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index 62b21c59dffa..b66bc804319c 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -82,7 +82,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 diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index fc365bc33e0b..39e9829f6a5d 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 @@ -137,7 +135,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) diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 8a6293889681..24a1ab565ab4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -54,7 +54,7 @@ icon_state = "oven_off" return ..() -/obj/machinery/oven/proc/update_overlays() +/obj/machinery/oven/update_overlays() . = ..() cut_overlays() var/mutable_appearance/door_overlay diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index 59d5b3096d6c..b82e5c387f78 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -70,7 +70,7 @@ 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]" diff --git a/code/modules/power/apc/apc_appearance.dm b/code/modules/power/apc/apc_appearance.dm deleted file mode 100644 index 4cc22180e224..000000000000 --- a/code/modules/power/apc/apc_appearance.dm +++ /dev/null @@ -1,119 +0,0 @@ -// update the APC icon to show the three base states -// also add overlays for indicator lights -/obj/machinery/power/apc/update_appearance(updates=check_updates()) - icon_update_needed = FALSE - if(!updates) - return - - . = ..() - // And now, separately for cleanness, the lighting changing - if(!update_state) - switch(charging) - if(APC_NOT_CHARGING) - set_light_color(COLOR_SOFT_RED) - if(APC_CHARGING) - set_light_color(LIGHT_COLOR_BLUE) - if(APC_FULLY_CHARGED) - set_light_color(LIGHT_COLOR_GREEN) - set_light(light_on_range) - return - - if(update_state & UPSTATE_BLUESCREEN) - set_light_color(LIGHT_COLOR_BLUE) - set_light(light_on_range) - return - - set_light(0) - -/obj/machinery/power/apc/update_icon_state() - if(!update_state) - icon_state = "apc0" - return ..() - if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) - var/basestate = "apc[cell ? 2 : 1]" - if(update_state & UPSTATE_OPENED1) - icon_state = (update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) ? "apcmaint" : basestate - else if(update_state & UPSTATE_OPENED2) - icon_state = "[basestate][((update_state & UPSTATE_BROKE) || malfhack) ? "-b" : null]-nocover" - return ..() - if(update_state & UPSTATE_BROKE) - icon_state = "apc-b" - return ..() - if(update_state & UPSTATE_BLUESCREEN) - icon_state = "apcemag" - return ..() - if(update_state & UPSTATE_WIREEXP) - icon_state = "apcewires" - return ..() - if(update_state & UPSTATE_MAINT) - icon_state = "apc0" - return ..() - -/obj/machinery/power/apc/update_overlays() - . = ..() - . = ..() - if((stat & (BROKEN|MAINT)) || update_state) - return - - . += mutable_appearance(icon, "apcox-[locked]") - . += SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir) - . += mutable_appearance(icon, "apco3-[charging]") - . += SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, EMISSIVE_PLANE, dir) - if(!operating) - return - - . += mutable_appearance(icon, "apco0-[equipment]") - . += SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, EMISSIVE_PLANE, dir) - . += mutable_appearance(icon, "apco1-[lighting]") - . += SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, EMISSIVE_PLANE, dir) - . += mutable_appearance(icon, "apco2-[environ]") - . += SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, EMISSIVE_PLANE, dir) - -/// Checks for what icon updates we will need to handle -/obj/machinery/power/apc/proc/check_updates() - SIGNAL_HANDLER - . = NONE - - // Handle icon status: - var/new_update_state = NONE - if(stat & BROKEN) - new_update_state |= UPSTATE_BROKE - if(stat & MAINT) - new_update_state |= UPSTATE_MAINT - - if(opened) - new_update_state |= (opened << UPSTATE_COVER_SHIFT) - if(cell) - new_update_state |= UPSTATE_CELL_IN - - else if((obj_flags & EMAGGED) || malfai) - new_update_state |= UPSTATE_BLUESCREEN - else if(panel_open) - new_update_state |= UPSTATE_WIREEXP - - if(new_update_state != update_state) - update_state = new_update_state - . |= UPDATE_ICON_STATE - - // Handle overlay status: - var/new_update_overlay = NONE - if(operating) - new_update_overlay |= UPOVERLAY_OPERATING - - if(!update_state) - if(locked) - new_update_overlay |= UPOVERLAY_LOCKED - - new_update_overlay |= (charging << UPOVERLAY_CHARGING_SHIFT) - new_update_overlay |= (equipment << UPOVERLAY_EQUIPMENT_SHIFT) - new_update_overlay |= (lighting << UPOVERLAY_LIGHTING_SHIFT) - new_update_overlay |= (environ << UPOVERLAY_ENVIRON_SHIFT) - - if(new_update_overlay != update_overlay) - update_overlay = new_update_overlay - . |= UPDATE_OVERLAYS - - -// Used in process so it doesn't update the icon too much -/obj/machinery/power/apc/proc/queue_icon_update() - icon_update_needed = TRUE From 4284e99610c7c79adecc2e0a0f856419aab2b328 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 02:40:36 -0400 Subject: [PATCH 04/50] Removes double parent calls from many things --- code/_onclick/hud/action_button.dm | 1 + code/_onclick/hud/screen_objects.dm | 1 - code/datums/elements/update_icon_blocker.dm | 18 +++++++++++++ code/datums/martial/sleeping_carp.dm | 1 - .../game/gamemodes/clown_ops/bananium_bomb.dm | 2 -- code/game/machinery/bounty_board.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 | 2 +- code/game/machinery/computer/station_alert.dm | 1 - code/game/machinery/decontamination.dm | 1 - code/game/machinery/doors/brigdoors.dm | 2 -- code/game/machinery/doors/firedoor.dm | 2 -- code/game/machinery/iv_drip.dm | 12 ++++----- .../machinery/porta_turret/portable_turret.dm | 1 - code/game/machinery/prisonlabor.dm | 1 - code/game/machinery/recycler.dm | 1 - code/game/machinery/stasis.dm | 1 - .../telecomms/machines/message_server.dm | 1 - code/game/machinery/transformer.dm | 1 - code/game/mecha/mech_bay.dm | 1 - code/game/mecha/mecha.dm | 1 - code/game/mecha/working/ripley.dm | 1 - code/game/objects/items/RCD.dm | 3 --- code/game/objects/items/ashtray.dm | 1 - code/game/objects/items/defib.dm | 1 - .../objects/items/devices/geiger_counter.dm | 1 - code/game/objects/items/devices/megaphone.dm | 1 - code/game/objects/items/dice.dm | 18 ++++++------- .../granters/martial_arts/plasma_fist.dm | 1 - code/game/objects/items/holy_weapons.dm | 1 - code/game/objects/items/laser_level.dm | 2 -- code/game/objects/items/mail.dm | 2 -- code/game/objects/items/melee/misc.dm | 1 - code/game/objects/items/robot/robot_items.dm | 4 --- .../objects/items/stacks/license_plates.dm | 1 - code/game/objects/items/stacks/medical.dm | 2 +- code/game/objects/items/stacks/rods.dm | 6 ++--- code/game/objects/items/stacks/stack.dm | 1 - code/game/objects/items/storage/belt.dm | 3 --- code/game/objects/items/storage/boxes.dm | 4 +-- code/game/objects/items/storage/lockbox.dm | 1 - code/game/objects/items/storage/toolbox.dm | 1 - .../objects/items/syndicateReverseCard.dm | 1 - code/game/objects/items/tools/weldingtool.dm | 1 - code/game/objects/items/twohanded.dm | 6 ----- code/game/objects/structures/aliens.dm | 1 - code/game/objects/structures/artstuff.dm | 1 - .../crates_lockers/closets/bodybag.dm | 3 --- .../structures/crates_lockers/crates/bins.dm | 1 - .../crates_lockers/crates/secure.dm | 1 - code/game/objects/structures/headpike.dm | 1 - code/game/objects/structures/morgue.dm | 26 ++++++++----------- code/game/objects/structures/shower.dm | 1 - code/game/objects/structures/watercloset.dm | 1 - .../game/turfs/simulated/floor/fancy_floor.dm | 2 +- .../game/turfs/simulated/floor/light_floor.dm | 1 - .../turfs/simulated/floor/mineral_floor.dm | 2 +- .../turfs/simulated/floor/plasteel_floor.dm | 2 +- code/game/turfs/simulated/floor/plating.dm | 2 +- .../abductor/equipment/abduction_gear.dm | 6 ++--- .../antagonists/abductor/equipment/gland.dm | 6 ++--- .../antagonists/blob/structures/_blob.dm | 1 - .../antagonists/blob/structures/shield.dm | 1 - .../structures/bloodsucker_crypt.dm | 1 - code/modules/antagonists/brother/brother.dm | 1 - code/modules/antagonists/ert/ert.dm | 1 - code/modules/antagonists/official/official.dm | 1 - .../antagonists/slaughter/slaughter.dm | 6 ++--- code/modules/assembly/infrared.dm | 1 - code/modules/assembly/proximity.dm | 1 - code/modules/assembly/signaler.dm | 1 - .../atmospherics/machinery/atmosmachinery.dm | 1 - .../components/binary_devices/circulator.dm | 2 -- .../machinery/components/components_base.dm | 3 +-- .../machinery/components/fusion/hfr_parts.dm | 1 - .../gas_recipe_machines/crystallizer.dm | 1 - .../components/trinary_devices/filter.dm | 2 -- .../components/trinary_devices/mixer.dm | 2 -- .../atmospherics/machinery/pipes/pipes.dm | 1 - .../awaymissions/mission_code/Academy.dm | 6 ++--- code/modules/awaymissions/pamphlet.dm | 6 ++--- code/modules/buildmode/buttons.dm | 1 - code/modules/clothing/head/hardhat.dm | 2 -- code/modules/clothing/neck/bodycamera.dm | 1 - .../food_and_drinks/food/customizables.dm | 2 ++ .../kitchen_machinery/griddle.dm | 1 - .../food_and_drinks/kitchen_machinery/oven.dm | 1 - .../kitchen_machinery/smartfridge.dm | 1 - code/modules/holodeck/turfs.dm | 2 +- code/modules/hydroponics/gene_modder.dm | 1 - code/modules/library/soapstone.dm | 1 - .../modules/mining/equipment/explorer_gear.dm | 1 - .../mining/equipment/kinetic_crusher.dm | 1 - .../mining/equipment/regenerative_core.dm | 3 +-- code/modules/mining/equipment/survival_pod.dm | 12 ++++----- .../mining/lavaland/necropolis_chests.dm | 1 - code/modules/mining/machine_redemption.dm | 1 - .../carbon/human/species_types/jellypeople.dm | 1 - .../human/species_types/shadowpeople.dm | 7 +++-- .../living/simple_animal/bot/construction.dm | 1 - .../mob/living/simple_animal/bot/mulebot.dm | 1 - .../mob/living/simple_animal/bot/secbot.dm | 1 - .../living/simple_animal/guardian/guardian.dm | 6 ++--- .../computers/item/laptop/laptop.dm | 7 +++-- .../computers/item/tablet/tablet.dm | 1 - .../machinery/console/modular_console.dm | 1 - code/modules/pai/card.dm | 1 - code/modules/paperwork/contract.dm | 6 ++--- code/modules/paperwork/paper.dm | 6 ++--- code/modules/paperwork/paper_cutter.dm | 1 - code/modules/paperwork/papershredder.dm | 1 - code/modules/power/cell.dm | 6 ++--- code/modules/power/gravitygenerator.dm | 2 -- code/modules/power/solar.dm | 1 - .../projectiles/ammunition/_ammunition.dm | 1 - .../projectiles/ammunition/reusable/foam.dm | 1 - .../projectiles/attachments/_attachment.dm | 1 - .../boxes_magazines/external/grenade.dm | 1 - .../boxes_magazines/external/lmg.dm | 1 - .../boxes_magazines/external/pistol.dm | 4 --- .../boxes_magazines/external/rechargable.dm | 4 --- .../boxes_magazines/external/rifle.dm | 5 ---- .../boxes_magazines/external/shotgun.dm | 1 - .../boxes_magazines/external/smg.dm | 3 --- .../boxes_magazines/external/sniper.dm | 1 - .../boxes_magazines/external/toy.dm | 3 --- code/modules/projectiles/gun.dm | 5 ---- code/modules/projectiles/guns/ballistic.dm | 1 - .../projectiles/guns/ballistic/automatic.dm | 2 -- .../guns/ballistic/laser_gatling.dm | 1 + .../projectiles/guns/ballistic/rifle.dm | 1 - .../projectiles/guns/ballistic/shotgun.dm | 1 - .../modules/projectiles/guns/ballistic/toy.dm | 4 --- .../projectiles/guns/energy/dueling.dm | 2 -- .../projectiles/guns/energy/energy_gun.dm | 1 - .../guns/energy/kinetic_accelerator.dm | 1 - .../projectiles/guns/energy/special.dm | 15 ++++------- code/modules/projectiles/guns/magic.dm | 6 ++--- .../projectiles/guns/misc/syringe_gun.dm | 1 - .../chemistry/machinery/smoke_machine.dm | 1 - .../reagents/reagent_containers/borghypo.dm | 2 +- .../reagents/reagent_containers/glass.dm | 3 +-- .../reagents/reagent_containers/hypospray.dm | 1 - code/modules/recycling/disposal/bin.dm | 6 ++--- .../modules/research/nanites/nanite_remote.dm | 1 - code/modules/shuttle/emergency.dm | 6 ++--- code/modules/surgery/organs/tongue.dm | 1 - yogstation.dme | 1 + yogstation/code/game/objects/items/brace.dm | 1 - .../game/objects/structures/toilet_bong.dm | 1 - .../antagonists/slaughter/slaughter.dm | 6 ++--- .../projectiles/guns/ballistic/launchers.dm | 6 ++--- .../recycling/disposal/pipe_sorting.dm | 1 - .../code/modules/xenoarch/loot/gigadrill.dm | 1 - 156 files changed, 124 insertions(+), 279 deletions(-) create mode 100644 code/datums/elements/update_icon_blocker.dm diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 573e0de0fab5..7affa36451bf 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -269,6 +269,7 @@ refresh_owner() /atom/movable/screen/button_palette/update_name(updates) + . = ..() if(expanded) name = "Hide Buttons" else diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 17514001cea6..4c0546673f78 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -219,7 +219,6 @@ /atom/movable/screen/inventory/hand/update_icon(updates=ALL) . = ..() - . = ..() if(!handcuff_overlay) var/ui_style = hud?.mymob?.client?.prefs?.read_preference(/datum/preference/choiced/ui_style) diff --git a/code/datums/elements/update_icon_blocker.dm b/code/datums/elements/update_icon_blocker.dm new file mode 100644 index 000000000000..daeb2759b84d --- /dev/null +++ b/code/datums/elements/update_icon_blocker.dm @@ -0,0 +1,18 @@ +/// Prevents calling anything in update_icon() 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 bac014a77627..178bdce34eac 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -184,7 +184,6 @@ /obj/item/twohanded/bostaff/update_icon(updates=ALL) . = ..() icon_state = "bostaff[wielded]" - 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 7feed74d00fd..20d2b086eb06 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -10,7 +10,6 @@ switch(get_nuke_state()) if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) icon_state = "bananiumbomb_base" - update_appearance(UPDATE_ICON) if(NUKE_ON_TIMING) cut_overlays() icon_state = "bananiumbomb_timing" @@ -19,7 +18,6 @@ icon_state = "bananiumbomb_exploding" else icon_state = "bananiumbomb_base" - update_appearance(UPDATE_ICON) /obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station) switch(off_station) diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index e4ae95e52be6..866d074f5e65 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -33,7 +33,6 @@ GLOBAL_LIST_EMPTY(request_list) /obj/machinery/bounty_board/update_icon(updates=ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) icon_state = "request_kiosk_off" else diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index ae650ce99584..5c58e296dbf1 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -79,7 +79,6 @@ /obj/machinery/computer/aifixer/update_icon(updates=ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return else diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index fe8e5f123194..c792dd3620bb 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -89,7 +89,6 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( icon_screen = "invaders" else icon_screen = "" - . = ..() /obj/machinery/computer/arcade/proc/prizevend(mob/user) SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "arcade", /datum/mood_event/arcade) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index f302a1a9ab59..732e6bfd0316 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_icon(updates=ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return if(priority_alarms.len) diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index ae1bacc53438..cfba2bd58b8d 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -44,7 +44,7 @@ /obj/machinery/air_sensor/update_icon(updates=ALL) . = ..() - icon_state = "gsensor[on]" + icon_state = "gsensor[on]" /obj/machinery/air_sensor/process_atmos() if(on) diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 49125f2bbdff..8b9fc1963c8e 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_icon(updates=ALL) . = ..() - ..() if(stat & (NOPOWER|BROKEN)) return var/active_alarms = FALSE diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index 8d06a634d8e7..d769b5442ac7 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -38,7 +38,6 @@ update_appearance(UPDATE_ICON) /obj/machinery/decontamination_unit/update_icon(updates=ALL) - . = ..() . = ..() icon_state = uv? "tube_on" : (state_open? "tube_open" : "tube") diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index a12c9c52c7e6..9b216e56452b 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -334,8 +334,6 @@ else if(maptext) maptext = "" - return - // Adds an icon in case the screen is broken/off, stolen from status_display.dm /obj/machinery/door_timer/proc/set_picture(state) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index a3815f66cd9b..edf1effbf1c0 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -216,7 +216,6 @@ flick("door_closing", src) /obj/machinery/door/firedoor/update_icon(updates=ALL) - . = ..() cut_overlays() if(density) icon_state = "door_closed" @@ -474,7 +473,6 @@ . += span_notice("There are no firelock electronics in the frame. The frame could be cut apart.") /obj/structure/firelock_frame/update_icon(updates=ALL) - . = ..() ..() icon_state = "frame[constructionStep]" diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 3ac9af7afed1..a716d01deef4 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -246,15 +246,15 @@ can_convert = FALSE /obj/machinery/iv_drip/saline/Initialize(mapload) - . = ..() - beaker = new /obj/item/reagent_containers/glass/saline(src) - -/obj/machinery/iv_drip/saline/update_icon(updates=ALL) - return + AddElement(/datum/element/update_icon_blocker) + . = ..() + beaker = new /obj/item/reagent_containers/glass/saline(src) /obj/machinery/iv_drip/saline/eject_beaker() - return + return + /obj/machinery/iv_drip/saline/toggle_mode() return + #undef IV_TAKING #undef IV_INJECTING diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 25234acde09f..96d47e7b473c 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_icon(updates=ALL) . = ..() - ..() if(stat & NOPOWER) icon_state = "control_off" else if (enabled) diff --git a/code/game/machinery/prisonlabor.dm b/code/game/machinery/prisonlabor.dm index a42674fb4d4a..f291787ede69 100644 --- a/code/game/machinery/prisonlabor.dm +++ b/code/game/machinery/prisonlabor.dm @@ -10,7 +10,6 @@ var/pressing = FALSE /obj/machinery/plate_press/update_icon(updates=ALL) - . = ..() . = ..() if(!is_operational()) icon_state = "offline" diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 5267227997e0..48bb82bac77a 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -73,7 +73,6 @@ /obj/machinery/recycler/update_icon(updates=ALL) . = ..() - ..() var/is_powered = !(stat & (BROKEN|NOPOWER)) if(safety_mode) is_powered = FALSE diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index fab87f1e154f..baaeb3bcaeb3 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -110,7 +110,6 @@ return stasis_enabled && is_operational() /obj/machinery/stasis/update_icon(updates=ALL) - . = ..() . = ..() var/_running = stasis_running() var/list/overlays_to_remove = managed_vis_overlays diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index adbf5f9531a6..bcdd2eaf0c6c 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -54,7 +54,6 @@ return ..() /obj/machinery/blackbox_recorder/update_icon(updates=ALL) - . = ..() . = ..() if(!stored) icon_state = "blackbox_b" diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 6445347cc9c2..47e49818dff2 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -36,7 +36,6 @@ /obj/machinery/transformer/update_icon(updates=ALL) . = ..() - ..() if(stat & (BROKEN|NOPOWER) || cooldown == 1) icon_state = "separator-AO0" else diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 53d381035fc8..87594863927f 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -140,7 +140,6 @@ /obj/machinery/computer/mech_bay_power_console/update_icon(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/mecha.dm b/code/game/mecha/mecha.dm index 14c6919e5b8c..c74ea54c3004 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -174,7 +174,6 @@ . = ..() if (silicon_pilot && silicon_icon_state) icon_state = silicon_icon_state - . = ..() /obj/mecha/get_cell() return cell diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index a1f25d5e1826..4ea3c83a2e1c 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -41,7 +41,6 @@ /obj/mecha/working/ripley/update_icon(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 6e424f8525a3..3d7fb5a5d6f7 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_icon(updates=ALL) . = ..() - ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) cut_overlays() //To prevent infinite stacking of overlays @@ -879,8 +878,6 @@ RLD /obj/item/construction/rld/update_icon(updates=ALL) . = ..() icon_state = "rld-[round(matter/35)]" - ..() - /obj/item/construction/rld/attack_self(mob/user) ..() diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 9b2d4eb4a708..ed5a4aec72ff 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -7,7 +7,6 @@ /obj/item/ashtray/update_icon(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/defib.dm b/code/game/objects/items/defib.dm index 866df2d71ec6..5e4d24e02c17 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -53,7 +53,6 @@ /obj/item/defibrillator/update_icon(updates=ALL) . = ..() update_power() - update_overlays() update_charge() /obj/item/defibrillator/proc/update_power() diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index ff9713892dcc..dda2a31f9e74 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -99,7 +99,6 @@ icon_state = "geiger_on_4" if(RAD_LEVEL_CRITICAL + 1 to INFINITY) icon_state = "geiger_on_5" - ..() /obj/item/geiger_counter/proc/update_sound() var/datum/looping_sound/geiger/loop = soundloop diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 36661fe3d9f0..1a2fddb5c0ea 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -47,7 +47,6 @@ return TRUE /obj/item/megaphone/update_icon(updates=ALL) - . = ..() . = ..() cut_overlays() var/mutable_appearance/base_overlay diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index d9c4d8a49566..fc42205394d5 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -142,9 +142,9 @@ w_class = WEIGHT_CLASS_SMALL sides = 100 -/obj/item/dice/d100/update_icon(updates=ALL) - . = ..() - return +/obj/item/dice/d100/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/eightbd20 name = "strange d20" @@ -153,9 +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(updates=ALL) - . = ..() - return +/obj/item/dice/eightbd20/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/fourdd6 name = "4d d6" @@ -164,9 +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(updates=ALL) - . = ..() - return +/obj/item/dice/fourdd6/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/dice/attack_self(mob/user) diceroll(user) 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 cac0d918d85b..856e5ea66376 100644 --- a/code/game/objects/items/granters/martial_arts/plasma_fist.dm +++ b/code/game/objects/items/granters/martial_arts/plasma_fist.dm @@ -21,7 +21,6 @@ update_appearance(UPDATE_ICON) /obj/item/book/granter/martial/plasma_fist/update_icon(updates=ALL) - . = ..() . = ..() if(uses <= 0) name = "empty scroll" diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 4b48192e07dc..10cd08ea8e55 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -514,7 +514,6 @@ update_appearance(UPDATE_ICON) /obj/item/nullrod/dualsword/update_icon(updates=ALL) - . = ..() . = ..() item_state = swords ? "fulldual" : "emptydual" icon_state = item_state diff --git a/code/game/objects/items/laser_level.dm b/code/game/objects/items/laser_level.dm index bb9be77f5012..e2632c042721 100644 --- a/code/game/objects/items/laser_level.dm +++ b/code/game/objects/items/laser_level.dm @@ -33,8 +33,6 @@ . = ..() cut_overlays() add_overlay("[initial(icon_state)][lightlevel]") - return - /obj/item/laserlevel/proc/update_overlay(mob/user) user.clear_fullscreen("laser",0) diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index 5fc9a083fee1..e8066981d2e9 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -74,7 +74,6 @@ update_appearance(UPDATE_ICON) /obj/item/mail/update_icon(updates=ALL) - . = ..() . = ..() var/bonus_stamp_offset = 0 for(var/stamp in stamps) @@ -219,7 +218,6 @@ icon_state = "mail" /obj/structure/closet/crate/mail/update_icon(updates=ALL) - . = ..() . = ..() if(opened) icon_state = "[initial(icon_state)]open" diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 906729a5f60f..98a08193b6f3 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -738,7 +738,6 @@ update_appearance(UPDATE_ICON) /obj/item/melee/roastingstick/update_icon(updates=ALL) - . = ..() . = ..() cut_overlays() if (held_sausage) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 4c234490334c..caf5a990c7ee 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -177,12 +177,8 @@ var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port)) var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy)) -/obj/item/borg/charger/Initialize(mapload) - . = ..() - /obj/item/borg/charger/update_icon(updates=ALL) . = ..() - ..() icon_state = "charger_[mode]" /obj/item/borg/charger/attack_self(mob/user) diff --git a/code/game/objects/items/stacks/license_plates.dm b/code/game/objects/items/stacks/license_plates.dm index e58247ffffc4..8c9b3b94e31f 100644 --- a/code/game/objects/items/stacks/license_plates.dm +++ b/code/game/objects/items/stacks/license_plates.dm @@ -24,7 +24,6 @@ ///Override to allow for variations /obj/item/stack/license_plates/filled/update_icon(updates=ALL) - . = ..() . = ..() if(novariants) return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index f9567d95f287..11083bcbfd47 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -421,7 +421,7 @@ /obj/item/stack/medical/mesh/advanced/update_icon(updates=ALL) . = ..() if(is_open) - return ..() + return icon_state = "aloe_mesh_closed" /obj/item/stack/medical/aloe diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 80358e6e495c..d096c3a2a055 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -90,9 +90,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ is_cyborg = 1 cost = 250 -/obj/item/stack/rods/cyborg/update_icon(updates=ALL) - . = ..() - return +/obj/item/stack/rods/cyborg/Initialize(mapload, new_amount, merge) + 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 50b506c54fc8..6eaab252f8c7 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -84,7 +84,6 @@ icon_state = "[initial(icon_state)]_2" else icon_state = "[initial(icon_state)]_3" - ..() /obj/item/stack/examine(mob/user) . = ..() diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index a7ac6b5fcf8c..e8b99a0ffb88 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -24,7 +24,6 @@ for(var/obj/item/I in contents) var/mutable_appearance/M = I.get_belt_overlay() add_overlay(M) - ..() /obj/item/storage/belt/Initialize(mapload) . = ..() @@ -818,7 +817,6 @@ /obj/item/storage/belt/quiver/update_icon(updates=ALL) . = ..() - ..() if(content_overlays && ismob(loc)) var/mob/M = loc M.update_inv_belt() @@ -1198,7 +1196,6 @@ if(loc && isliving(loc)) var/mob/living/L = loc L.regenerate_icons() - ..() /obj/item/storage/belt/sabre/PopulateContents() new /obj/item/melee/sabre(src) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 37cbcd0586cd..ab28b67f6e74 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -50,7 +50,6 @@ return SHAME /obj/item/storage/box/update_icon(updates=ALL) - . = ..() . = ..() if(illustration) cut_overlays() @@ -989,7 +988,8 @@ . = ..() if(contents.len == 0) icon_state = "[item_state]" - else icon_state = "[item_state]_closed" + else + icon_state = "[item_state]_closed" /obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/pen)) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 2938abb1d3d7..364a2a65629e 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -268,7 +268,6 @@ if(!broken) var/mutable_appearance/led = mutable_appearance(icon, "led[locked]") add_overlay(led) - ..() /obj/item/storage/lockbox/vialbox/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index e966a9cbb2e2..3dbc8072f82a 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_icon(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 f0b2ff3b5184..0ea8f9ab93e8 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -16,7 +16,6 @@ /obj/item/syndicateReverseCard/update_icon(updates=ALL) . = ..() - ..() if (used) cut_overlays() add_overlay(image('icons/obj/toy.dmi', icon_state = "reverse_overlay")) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 2dde3457c955..5b901dee2655 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -65,7 +65,6 @@ ratio = CEILING(ratio*4, 1) * 25 add_overlay("[initial(icon_state)][ratio]") update_torch() - return /obj/item/weldingtool/process(delta_time) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index c97b6666fe21..a3d59a6fb1d1 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -108,10 +108,6 @@ return unwield(user) -/obj/item/twohanded/update_icon(updates=ALL) - . = ..() - return - /obj/item/twohanded/attack_self(mob/user) . = ..() if(wielded) //Trying to unwield it @@ -1407,8 +1403,6 @@ . = ..() 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 - /* Broom diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index f975c514e2a0..620c9f0a80fd 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -240,7 +240,6 @@ /obj/structure/alien/egg/update_icon(updates=ALL) . = ..() - ..() switch(status) if(GROWING) icon_state = "[base_icon]_growing" diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 2eb79672cea6..2586deeda6f9 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -299,7 +299,6 @@ /obj/structure/sign/painting/update_icon(updates=ALL) . = ..() - . = ..() if(C && C.generated_icon) icon_state = null diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index 30617e266037..dd9a8aead137 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_icon(updates=ALL) . = ..() - ..() if (tagged) add_overlay("bodybag_label") @@ -192,7 +191,6 @@ return ..() /obj/structure/closet/body_bag/environmental/prisoner/update_icon(updates=ALL) - . = ..() . = ..() if(sinched) icon_state = initial(icon_state) + "_sinched" @@ -295,7 +293,6 @@ sinch_time = 4 SECONDS /obj/structure/closet/body_bag/environmental/prisoner/syndicate/update_icon(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/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index b8a9136366de..2107df71268d 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_icon(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 abe953ff338a..37003268a607 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_icon(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 140f6995e1fb..f41dcb984f2a 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -40,7 +40,6 @@ /obj/structure/headpike/update_icon(updates=ALL) . = ..() - ..() var/obj/item/bodypart/head/H = locate() in contents var/mutable_appearance/MA = new() if(H) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index c07dbbce1426..7d608bc59114 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(mapload) + AddElement(/datum/element/update_icon_blocker) . = ..() GLOB.bodycontainers += src recursive_organ_check(src) @@ -45,10 +46,6 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an ..() update_appearance(UPDATE_ICON) -/obj/structure/bodycontainer/update_icon(updates=ALL) - . = ..() - return - /obj/structure/bodycontainer/relaymove(mob/user) if(user.stat || !isturf(loc)) return @@ -160,6 +157,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/morgue/Initialize(mapload) . = ..() + RemoveElement(/datum/element/update_icon_blocker) connected = new/obj/structure/tray/m_tray(src) connected.connected = src @@ -231,6 +229,7 @@ GLOBAL_LIST_EMPTY(crematoriums) /obj/structure/bodycontainer/crematorium/Initialize(mapload) . = ..() + RemoveElement(/datum/element/update_icon_blocker) connected = new /obj/structure/tray/c_tray(src) connected.connected = src @@ -238,17 +237,14 @@ GLOBAL_LIST_EMPTY(crematoriums) . = ..() if(!connected || connected.loc != src) icon_state = "crema0" - else - - if(src.contents.len > 1) - src.icon_state = "crema2" - else - src.icon_state = "crema1" - - if(locked) - src.icon_state = "crema_active" - - return + return + if(locked) + icon_state = "crema_active" + return + if(contents.len > 1) + icon_state = "crema2" + return + icon_state = "crema1" /obj/structure/bodycontainer/crematorium/proc/cremate(mob/user) if(locked) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 8e63a2859bb8..3656fe55525e 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -70,7 +70,6 @@ . += span_notice("You can alt-click to change the temperature.") /obj/machinery/shower/update_icon(updates=ALL) - . = ..() . = ..() cut_overlays() if(on) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index e55d2ebd8db1..fd6a4fc82d11 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -74,7 +74,6 @@ . = ..() icon_state = "toilet[open][cistern]" - /obj/structure/toilet/attackby(obj/item/I, mob/living/user, params) if(I.tool_behaviour == TOOL_CROWBAR) to_chat(user, span_notice("You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...")) diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 64cfc6ad6a27..fc32106cff7d 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -297,7 +297,7 @@ /turf/open/floor/carpet/update_icon(updates=ALL) . = ..() - if(!..()) + if(!.) return 0 if(!broken && !burnt) if(smooth) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 0b33a56f5970..12e4fcbc5d57 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_icon(updates=ALL) . = ..() - ..() if(on) switch(state) if(0) diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index eeef805e9ea7..b6e340a7e304 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -25,7 +25,7 @@ /turf/open/floor/mineral/update_icon(updates=ALL) . = ..() - if(!..()) + if(!.) return 0 if(!broken && !burnt) if( !(icon_state in icons) ) diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index d47d9e49b5d2..5cdcbb103786 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -15,7 +15,7 @@ /turf/open/floor/plasteel/update_icon(updates=ALL) . = ..() - if(!..()) + if(!.) return 0 if(!broken && !burnt) icon = icon_regular_floor diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index b639e4b35807..8940fca47bce 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -46,7 +46,7 @@ /turf/open/floor/plating/update_icon(updates=ALL) . = ..() - if(!..()) + if(!.) return if(!broken && !burnt) icon_state = icon_plating //Because asteroids are 'platings' too. diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index dbcdbd8075be..018b0a87cce5 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -405,9 +405,9 @@
    Congratulations! You are now trained for invasive xenobiology research!"} -/obj/item/paper/guides/antag/abductor/update_icon(updates=ALL) - . = ..() - 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. diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm index a0a6dcbfc614..b791fbd4d78a 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -50,9 +50,9 @@ else holder.icon_state = "hudgland_spent" -/obj/item/organ/heart/gland/update_icon(updates=ALL) - . = ..() - return // stop it from switching to the non existent heart_on sprite +/obj/item/organ/heart/gland/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /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/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index edf7fe0db559..90b542580003 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -346,7 +346,6 @@ /obj/structure/blob/normal/update_icon(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 d2ec0c51037e..0d84e70c206f 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_icon(updates=ALL) . = ..() - ..() if(obj_integrity < max_integrity * 0.5) icon_state = "[initial(icon_state)]_damaged" name = "weakened [initial(name)]" diff --git a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm index 16eec3661a74..43b02245d487 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -1188,7 +1188,6 @@ /obj/structure/bloodsucker/candelabrum/update_icon(updates=ALL) . = ..() icon_state = "candelabrum[lit ? "_lit" : ""]" - return ..() /obj/structure/bloodsucker/candelabrum/examine(mob/user) . = ..() diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm index d6742eabdee2..53d34e0adbea 100644 --- a/code/modules/antagonists/brother/brother.dm +++ b/code/modules/antagonists/brother/brother.dm @@ -169,7 +169,6 @@ meeting_areas -= meeting_area /datum/team/brother_team/proc/update_name() - . = ..() var/list/last_names = list() for(var/datum/mind/M in members) var/list/split_name = splittext(M.name," ") diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index 0b6c53162d2b..f5892b008e6e 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -73,7 +73,6 @@ name_source = GLOB.last_names /datum/antagonist/ert/proc/update_name() - . = ..() owner.current.fully_replace_character_name(owner.current.real_name,"[role] [pick(name_source)]") /datum/antagonist/ert/deathsquad/New() diff --git a/code/modules/antagonists/official/official.dm b/code/modules/antagonists/official/official.dm index d12890a2fc92..7f7ac455bbc8 100644 --- a/code/modules/antagonists/official/official.dm +++ b/code/modules/antagonists/official/official.dm @@ -43,7 +43,6 @@ name_source = GLOB.last_names /datum/antagonist/centcom/proc/update_name() - . = ..() owner.current.fully_replace_character_name(owner.current.real_name,"[role] [pick(name_source)]") /datum/antagonist/centcom/on_gain() diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 21032abf8445..367412be4cdd 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -75,9 +75,9 @@ icon = 'icons/obj/surgery.dmi' icon_state = "demon_heart-on" -/obj/item/organ/heart/demon/update_icon(updates=ALL) - . = ..() - return //always beating visually +/obj/item/organ/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/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 434a75546283..72b732ed6f49 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -63,7 +63,6 @@ if(holder) holder.update_appearance(UPDATE_ICON) - return /obj/item/assembly/infra/dropped() . = ..() diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index f741cf0d8d08..498cc4743f4c 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -104,7 +104,6 @@ attached_overlays += "prox_scanning" if(holder) holder.update_appearance(UPDATE_ICON) - return /obj/item/assembly/prox_sensor/ui_status(mob/user) if(is_secured(user)) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 32931ef6f261..48887ddd4630 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -48,7 +48,6 @@ . = ..() if(holder) holder.update_appearance(UPDATE_ICON) - return /obj/item/assembly/signaler/ui_status(mob/user) if(is_secured(user)) diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index aa5d64062e76..0bc46b3f7045 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -126,7 +126,6 @@ GLOBAL_LIST_EMPTY(pipeimages) /obj/machinery/atmospherics/update_icon(updates=ALL) . = ..() layer = initial(layer) + piping_layer / 1000 - return ..() /obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target, iteration) return connection_check(target, piping_layer) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index 0efa3051ad6e..f3f385d3384f 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -95,8 +95,6 @@ add_overlay(cap) - return ..() - /obj/machinery/atmospherics/components/binary/circulator/update_icon_nopipes() cut_overlays() SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 117795926328..2f213ce0464a 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -33,7 +33,7 @@ plane = showpipe ? GAME_PLANE : FLOOR_PLANE if(!showpipe) - return ..() + return var/connected = 0 //Direction bitset @@ -50,7 +50,6 @@ if(!shift_underlay_only) PIPING_LAYER_SHIFT(src, piping_layer) - return ..() /obj/machinery/atmospherics/components/proc/get_pipe_underlay(state, dir, color = null) if(color) diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index b66bc804319c..2910d03bad60 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -73,7 +73,6 @@ SSair.add_to_rebuild_queue(src) /obj/machinery/atmospherics/components/unary/hypertorus/update_icon(updates=ALL) - . = ..() . = ..() if(panel_open) icon_state = icon_state_open 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 590db0133660..a22c2400f820 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -94,7 +94,6 @@ icon_state = "[base_icon]-off" /obj/machinery/atmospherics/components/binary/crystallizer/update_icon(updates=ALL) - . = ..() . = ..() update_icon_state() update_overlays() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 38191eb090a0..87a2029bf595 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -60,8 +60,6 @@ add_overlay(cap) - return ..() - /obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes() var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational() icon_state = "filter_[on_state ? "on" : "off"]-[set_overlay_offset(piping_layer)][flipped ? "_f" : ""]" diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 3b2381225198..9e9be0dd2f06 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -47,8 +47,6 @@ add_overlay(cap) - return ..() - /obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes() var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational() icon_state = "mixer_[on_state ? "on" : "off"]-[set_overlay_offset(piping_layer)][flipped ? "_f" : ""]" diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 22f5650198dc..bf36ad6a1740 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -99,7 +99,6 @@ . = ..() /obj/machinery/atmospherics/pipe/update_icon(updates=ALL) - . = ..() . = ..() update_alpha() diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm index 2f5985e8cfa1..4cd2f39cf900 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -413,9 +413,9 @@ icon_state = "1" color = rgb(0,0,255) -/obj/structure/ladder/unbreakable/rune/update_icon(updates=ALL) - . = ..() - 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 42a8a767c7a2..b28f517ea93b 100644 --- a/code/modules/awaymissions/pamphlet.dm +++ b/code/modules/awaymissions/pamphlet.dm @@ -35,6 +35,6 @@ environs." //we don't want the silly text overlay! -/obj/item/paper/pamphlet/update_icon(updates=ALL) - . = ..() - return +/obj/item/paper/pamphlet/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() diff --git a/code/modules/buildmode/buttons.dm b/code/modules/buildmode/buttons.dm index 258c1a93e7e7..d88410fc43f5 100644 --- a/code/modules/buildmode/buttons.dm +++ b/code/modules/buildmode/buttons.dm @@ -51,7 +51,6 @@ /atom/movable/screen/buildmode/bdir/update_icon(updates=ALL) . = ..() dir = bd.build_dir - return /atom/movable/screen/buildmode/bdir/Click() bd.toggle_dirswitch() diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 2675ddcde344..f58d3c79c4c6 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -42,7 +42,6 @@ H.update_inv_head() for(var/datum/action/A as anything in actions) A.build_all_button_icons(force = TRUE) - ..() /obj/item/clothing/head/hardhat/proc/turn_on(mob/user) set_light_on(TRUE) @@ -162,7 +161,6 @@ cut_overlays() if(!up) add_overlay("weldvisor") - ..() /obj/item/clothing/head/hardhat/weldhat/orange icon_state = "hardhat0_orange" diff --git a/code/modules/clothing/neck/bodycamera.dm b/code/modules/clothing/neck/bodycamera.dm index bdb6d15adc23..511acab4d9cf 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_icon(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 22a3a740a4f9..777328cfc6ba 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -61,6 +61,7 @@ /obj/item/reagent_containers/food/snacks/customizable/update_name(updates=ALL, obj/item/reagent_containers/food/snacks/S) + . = ..() for(var/obj/item/I in ingredients) if(!istype(S, I.type)) customname = "custom" @@ -103,6 +104,7 @@ 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) + . = ..() var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling") if(S.filling_color == "#FFFFFF") filling.color = pick("#FF0000","#0000FF","#008000","#FFFF00") diff --git a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm index a88ac75caedf..3af46ad12fbf 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm @@ -107,7 +107,6 @@ visible_message("[griddled_item] doesn't seem to be doing too great on the [src]!") /obj/machinery/griddle/update_icon(updates=ALL) - . = ..() . = ..() if(panel_open) icon_state = "griddle[variant]_o" diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 24a1ab565ab4..782408da1719 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -52,7 +52,6 @@ icon_state = "oven_on" else icon_state = "oven_off" - return ..() /obj/machinery/oven/update_overlays() . = ..() diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index a50e1a63c76f..db10bf105bac 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_icon(updates=ALL) . = ..() - ..() cut_overlays() if(drying) add_overlay("drying_rack_drying") diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 5688d03a52c2..7cab5a48b863 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -121,7 +121,7 @@ /turf/open/floor/holofloor/carpet/update_icon(updates=ALL) . = ..() - if(!..()) + if(!.) return 0 if(intact) queue_smooth(src) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 02aa0588d5d8..731969a2e981 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -57,7 +57,6 @@ /obj/machinery/plantgenes/update_icon(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 1c80c99f58f1..119471b4d873 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -149,7 +149,6 @@ /obj/structure/chisel_message/update_icon(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 e23ef87c55ac..6ab45101d717 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_icon(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/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 2c8d7d8a35ca..c80649adfa1a 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -511,7 +511,6 @@ /obj/item/twohanded/kinetic_crusher/mega/update_icon(updates=ALL) . = ..() icon_state = "magmite_crusher[wielded]" - return /obj/item/projectile/destabilizer/mega name = "destabilizing force" diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index ce92bd03525e..796b0832b7e5 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -142,8 +142,7 @@ cut_overlays() if(!inert && !preserved) add_overlay("legion_soul_crackle") - for(var/X in actions) - var/datum/action/A = X + for(var/datum/action/A as anything in actions) A.build_all_button_icons() /obj/item/organ/regenerative_core/legion/go_inert() diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index dc5b647ebc1d..c5288c48e6c0 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -155,9 +155,9 @@ /obj/machinery/stasis/survival_pod/play_power_sound() return -/obj/machinery/stasis/survival_pod/update_icon(updates=ALL) - . = ..() - return +/obj/machinery/stasis/survival_pod/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() //Computer /obj/item/gps/computer @@ -208,9 +208,9 @@ pitches = FALSE var/empty = FALSE -/obj/machinery/smartfridge/survival_pod/update_icon(updates=ALL) - . = ..() - 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/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index afa11672d5a6..e371d42e9f3c 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -1746,7 +1746,6 @@ GLOBAL_LIST_EMPTY(aide_list) resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/twohanded/bonespear/stalwartpike/update_icon(updates=ALL) - . = ..() . = ..() if(wielded) icon_state = "stalwart_spear1" diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 7adc53516bd8..8e5b02716e28 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -351,4 +351,3 @@ icon_state = initial(icon_state) else icon_state = "[initial(icon_state)]-off" - return diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index a089b8509537..b5ec23277559 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -512,7 +512,6 @@ species = _species /datum/action/innate/integrate_extract/proc/update_name() - . = ..() if(!species || !species.current_extract) name = "Integrate Extract" desc = "Eat a slime extract to use its properties." 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 b7d911f694b0..696b7b26b661 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,10 +182,6 @@ /obj/item/organ/heart/nightmare/Stop() return 0 -/obj/item/organ/heart/nightmare/update_icon(updates=ALL) - . = ..() - return //always beating visually - /obj/item/organ/heart/nightmare/process() if(QDELETED(owner) || owner.stat != DEAD || !owner) respawn_progress = 0 diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 5e5f30bf570d..095aa366d125 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -216,7 +216,6 @@ /obj/item/bot_assembly/floorbot/update_icon(updates=ALL) . = ..() - ..() switch(build_step) if(ASSEMBLY_FIRST_STEP) desc = initial(desc) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 98b3a5c7c4b1..6d79cced7647 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -136,7 +136,6 @@ if(load.layer < layer) load.layer = layer + 0.01 add_overlay(load) - return /mob/living/simple_animal/bot/mulebot/ex_act(severity) unload(0) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index ef6110148b79..64d869412897 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -88,7 +88,6 @@ if(mode == BOT_HUNT) icon_state = "[initial(icon_state)]-c" return - ..() /mob/living/simple_animal/bot/secbot/turn_off() ..() diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 101ece8a3a79..5fe89722a06c 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -636,9 +636,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
    "} -/obj/item/paper/guides/antag/guardian/update_icon(updates=ALL) - . = ..() - 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/modular_computers/computers/item/laptop/laptop.dm b/code/modules/modular_computers/computers/item/laptop/laptop.dm index ab0806994076..bdecc7e504cf 100644 --- a/code/modules/modular_computers/computers/item/laptop/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop/laptop.dm @@ -36,10 +36,9 @@ /obj/item/modular_computer/laptop/update_icon(updates=ALL) . = ..() if(screen_on) - ..() - else - SSvis_overlays.remove_vis_overlay(physical, physical.managed_vis_overlays) - icon_state = icon_state_closed + return + SSvis_overlays.remove_vis_overlay(physical, physical.managed_vis_overlays) + icon_state = icon_state_closed /obj/item/modular_computer/laptop/attack_self(mob/user) if(!screen_on) diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index 6e711b83f013..83fda287c284 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_icon(updates=ALL) . = ..() - ..() if (!isnull(variants)) if(!finish_color) finish_color = pick(variants) 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 884ab9a5b1d5..006b8de4eb80 100644 --- a/code/modules/modular_computers/computers/machinery/console/modular_console.dm +++ b/code/modules/modular_computers/computers/machinery/console/modular_console.dm @@ -46,7 +46,6 @@ /obj/machinery/modular_computer/console/update_icon(updates=ALL) . = ..() - . = ..() // this bit of code makes the computer hug the wall its next to var/turf/T = get_turf(src) diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index b82e5c387f78..6ec83b0daa82 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -71,7 +71,6 @@ return OXYLOSS /obj/item/pai_card/update_overlays() - . = ..() . = ..() . += "pai-[emotion_icon]" if(pai?.hacking_cable) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index f92fadcb5737..45e6b403b591 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -10,9 +10,9 @@ /obj/item/paper/contract/proc/update_text() return -/obj/item/paper/contract/update_icon(updates=ALL) - . = ..() - return +/obj/item/paper/contract/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/paper/contract/infernal var/contractType = 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 8c34c71035e8..af9533845905 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -393,9 +393,9 @@ icon_state = "scrap" slot_flags = null -/obj/item/paper/crumpled/update_icon(updates=ALL) - . = ..() - 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_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 4b87641bb37a..8fc213ddfa14 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -36,7 +36,6 @@ /obj/item/papercutter/update_icon(updates=ALL) . = ..() - ..() cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") if(storedpaper) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index dc55d3dfe2b0..7e1334feb002 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -132,7 +132,6 @@ icon_state = "papershredder4" if(paperamount == 9||paperamount == 10) icon_state = "papershredder5" - return /obj/item/shreddedpaper name = "shredded paper" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 65020462c3e1..5861cbfc158e 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -337,9 +337,9 @@ maxcharge = 50000 ratingdesc = FALSE -/obj/item/stock_parts/cell/infinite/abductor/update_icon(updates=ALL) - . = ..() - return +/obj/item/stock_parts/cell/infinite/abductor/Initialize(mapload, override_maxcharge) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/item/stock_parts/cell/potato diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index b1001afca118..1187b3e45c18 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_icon(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_icon(updates=ALL) . = ..() - ..() for(var/obj/O in parts) O.update_appearance(UPDATE_ICON) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 652b2f1d9839..954026a7986b 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -115,7 +115,6 @@ /obj/machinery/power/solar/update_icon(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 8f523deafe8d..a3fe5743d607 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -37,7 +37,6 @@ /obj/item/ammo_casing/update_icon(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 59bfa0b04f13..1da10cfbfa7d 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_icon(updates=ALL) . = ..() - ..() if (modified) icon_state = "foamdart_empty" else diff --git a/code/modules/projectiles/attachments/_attachment.dm b/code/modules/projectiles/attachments/_attachment.dm index 2db87086242d..9f96b0f2b493 100644 --- a/code/modules/projectiles/attachments/_attachment.dm +++ b/code/modules/projectiles/attachments/_attachment.dm @@ -38,7 +38,6 @@ /obj/item/attachment/update_icon(updates=ALL) . = ..() icon_state = "[initial(icon_state)][is_on ? "_on" : ""]" - . = ..() attached_gun?.update_attachments() /obj/item/attachment/Destroy() diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index 2c22ca5bb099..afb3043a122e 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_icon(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 992c69735e9e..9a9cef3e80e4 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_icon(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 c3e5f9bfbcf2..8cf74d43c8bc 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_icon(updates=ALL) . = ..() - ..() if (ammo_count() >= 8) icon_state = "45-8" else @@ -84,7 +83,6 @@ /obj/item/ammo_box/magazine/pistolm9mm/update_icon(updates=ALL) . = ..() - ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" //Desert Eagle @@ -98,7 +96,6 @@ max_ammo = 7 /obj/item/ammo_box/magazine/m50/update_icon(updates=ALL) - . = ..() . = ..() if (ammo_count() >= 7) icon_state = "50ae-7" @@ -117,7 +114,6 @@ /obj/item/ammo_box/magazine/v38/update_icon(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 e260d3f80c78..a7760f29dcc0 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_icon(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_icon(updates=ALL) . = ..() - ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) icon_state = "[initial(icon_state)]" @@ -85,7 +83,6 @@ current_skin = "ntusp-l" unique_reskin = list() unique_reskin[current_skin] = current_skin - ..() current_skin = null unique_reskin = null @@ -140,7 +137,6 @@ /obj/item/ammo_box/magazine/recharge/ntusp/laser/update_icon(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 32f27881dab2..c92d7bb0bda8 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_icon(updates=ALL) . = ..() - ..() if(ammo_count()) icon_state = "75-8" else @@ -28,7 +27,6 @@ /obj/item/ammo_box/magazine/m556/update_icon(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_icon(updates=ALL) . = ..() - ..() if(ammo_count()) icon_state = "arg556[sprite_designation]" else @@ -101,7 +98,6 @@ /obj/item/ammo_box/magazine/m308/update_icon(updates=ALL) . = ..() - ..() if(ammo_count()) icon_state = "m308[sprite_designation]" else @@ -136,7 +132,6 @@ /obj/item/ammo_box/magazine/ks762/update_icon(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 0777f32191fb..188f37e76d7c 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_icon(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 cd50a4847b83..258e2fdd4508 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -104,7 +104,6 @@ /obj/item/ammo_box/magazine/uzim9mm/update_icon(updates=ALL) . = ..() - ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" //NT Saber SMG @@ -119,7 +118,6 @@ /obj/item/ammo_box/magazine/smgm9mm/update_icon(updates=ALL) . = ..() - ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" /obj/item/ammo_box/magazine/smgm9mm/ap @@ -150,7 +148,6 @@ /obj/item/ammo_box/magazine/smgm45/update_icon(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 3bb49412436c..82a20aca5fdf 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_icon(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 9be6a9fd1e15..f6fb0b078a72 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_icon(updates=ALL) . = ..() - ..() if(ammo_count()) icon_state = "smg9mm-42" else @@ -38,7 +37,6 @@ /obj/item/ammo_box/magazine/toy/smgm45/update_icon(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_icon(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 bb9c5b7319b4..e77255d3dddf 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -419,11 +419,6 @@ recent_shoot = world.time return TRUE -/obj/item/gun/update_icon(updates=ALL) - . = ..() - ..() - - /obj/item/gun/proc/reset_semicd() semicd = FALSE diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 6834aa2444c7..24fd47509c72 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -192,7 +192,6 @@ . = ..() if (QDELETED(src)) return - ..() if(current_skin) icon_state = "[unique_reskin[current_skin]][sawn_off ? "_sawn" : ""]" else diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index e2c13f426957..b9111b829bdf 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -160,7 +160,6 @@ /obj/item/gun/ballistic/automatic/m90/update_icon(updates=ALL) . = ..() - ..() switch(select) if(0) add_overlay("[initial(icon_state)]_semi") @@ -268,7 +267,6 @@ /obj/item/gun/ballistic/automatic/l6_saw/update_icon(updates=ALL) - . = ..() . = ..() add_overlay("l6_door_[cover_open ? "open" : "closed"]") diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index 0c3b290c55b3..a10caeb86e66 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -128,6 +128,7 @@ ammo_pack = loc else return INITIALIZE_HINT_QDEL //No pack, no gun + AddElement(/datum/element/update_icon_blocker) return ..() diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index a93cf2c8afc2..e5e68eacca93 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_icon(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 2aeb79dee741..c768a5e14483 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_icon(updates=ALL) . = ..() - ..() if(slung) icon_state = "ishotgunsling" diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index 256b25d52ccc..e2146c4b0eb2 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -14,7 +14,6 @@ casing_ejector = FALSE /obj/item/gun/ballistic/automatic/toy/update_icon(updates=ALL) - . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -58,7 +57,6 @@ can_suppress = FALSE /obj/item/gun/ballistic/shotgun/toy/update_icon(updates=ALL) - . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -93,7 +91,6 @@ mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot /obj/item/gun/ballistic/automatic/c20r/toy/update_icon(updates=ALL) - . = ..() . = ..() add_overlay("[icon_state]_toy") @@ -114,6 +111,5 @@ mag_type = /obj/item/ammo_box/magazine/toy/m762/riot /obj/item/gun/ballistic/automatic/l6_saw/toy/update_icon(updates=ALL) - . = ..() . = ..() add_overlay("[icon_state]_toy") diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 9b85ca3dcd5b..2cee2778a9df 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -231,7 +231,6 @@ var/setting /obj/effect/temp_visual/dueling_chaff/update_icon(updates=ALL) - . = ..() . = ..() switch(setting) if(DUEL_SETTING_A) @@ -270,7 +269,6 @@ var/setting /obj/item/projectile/energy/duel/update_icon(updates=ALL) - . = ..() . = ..() switch(setting) if(DUEL_SETTING_A) diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 5b6b2d251f2f..6429a775012f 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_icon(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 f6db13cb2336..4d2b76bd91e5 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_icon(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 5d7134111a6c..abb300488e82 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_icon(updates=ALL) . = ..() - ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) add_overlay("decloner_spin") @@ -139,6 +138,7 @@ toolspeed = 2 /obj/item/gun/energy/plasmacutter/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) . = ..() AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg') @@ -208,11 +208,6 @@ else . = ..(amount=1) - -/obj/item/gun/energy/plasmacutter/update_icon(updates=ALL) - . = ..() - return - /obj/item/gun/energy/plasmacutter/adv name = "advanced plasma cutter" icon_state = "adv_plasmacutter" @@ -378,6 +373,10 @@ can_charge = FALSE use_cyborg_cell = TRUE +/obj/item/gun/energy/printer/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) + return ..() + /obj/item/gun/energy/printer/flamethrower name = "cyborg flame projector" desc = "Originally intended for cyborgs to assist in atmospherics projects, was soon scrapped due to safety concerns." @@ -387,10 +386,6 @@ can_charge = FALSE use_cyborg_cell = TRUE -/obj/item/gun/energy/printer/update_icon(updates=ALL) - . = ..() - return - /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 785a0bc26720..9d932166f90e 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -108,9 +108,9 @@ recharge_newshot() return 1 -/obj/item/gun/magic/update_icon(updates=ALL) - . = ..() - 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/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index 41fe02823bcf..436a065f0843 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -79,7 +79,6 @@ return FALSE /obj/item/gun/syringe/update_icon(updates=ALL) - . = ..() . = ..() if(!has_syringe_overlay) return diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index 18e421308614..4d1e8d696ea2 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -45,7 +45,6 @@ icon_state = "smoke0" else icon_state = "smoke1" - return ..() /obj/machinery/smoke_machine/RefreshParts() var/new_volume = REAGENTS_BASE_VOLUME diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm index 161978d3cd4a..9568d4d14527 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(updates=ALL) + update_appearance(UPDATE_ICON) . = ..() return 1 diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index f720b7c41c6d..6bc66948106e 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -179,9 +179,8 @@ possible_transfer_amounts = list(5,10,15,20,25,30,60,120) /obj/item/reagent_containers/glass/beaker/plastic/update_icon(updates=ALL) - . = ..() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states - ..() + . = ..() icon_state = "beakerwhite" /obj/item/reagent_containers/glass/beaker/meta diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 20438c495514..928a79e5f310 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_icon(updates=ALL) . = ..() - ..() cut_overlays() if(ismob(loc)) var/mob/M = loc diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index df0da2e97c0c..4c75601b77da 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -176,9 +176,9 @@ update_appearance(UPDATE_ICON) // update the icon & overlays to reflect mode & status -/obj/machinery/disposal/update_icon(updates=ALL) - . = ..() - return +/obj/machinery/disposal/Initialize(mapload, obj/structure/disposalconstruct/make_from) + AddElement(/datum/element/update_icon_blocker) + return ..() /obj/machinery/disposal/proc/flush() flushing = TRUE diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 835ebcfbd4ec..92b15e85dd10 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -47,7 +47,6 @@ update_appearance(UPDATE_ICON) /obj/item/nanite_remote/update_icon(updates=ALL) - . = ..() . = ..() cut_overlays() if(obj_flags & EMAGGED) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index de8bfb333a1e..ada242f152b2 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -498,9 +498,9 @@ density = FALSE clockwork = TRUE //it'd look weird -/obj/machinery/computer/shuttle/pod/update_icon(updates=ALL) - . = ..() - return +/obj/machinery/computer/shuttle/pod/Initialize(mapload, obj/item/circuitboard/C) + 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/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 1a3121e15ef8..a658bb57a18b 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -40,7 +40,6 @@ languages_possible = languages_possible_base /obj/item/organ/tongue/update_icon(updates=ALL) - . = ..() . = ..() if(honked) // This tongue has a bike horn inside of it. Let's draw it add_overlay("honked") diff --git a/yogstation.dme b/yogstation.dme index d6ca39b8e2e2..2df7c7cd33eb 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -641,6 +641,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/game/objects/items/brace.dm b/yogstation/code/game/objects/items/brace.dm index d937c0376b74..3ee9a380db36 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_icon(updates=ALL) . = ..() - ..() cut_overlays() if(cover_open) add_overlay("cover_open") diff --git a/yogstation/code/game/objects/structures/toilet_bong.dm b/yogstation/code/game/objects/structures/toilet_bong.dm index 1b8d024b302b..d3cf8f48e681 100644 --- a/yogstation/code/game/objects/structures/toilet_bong.dm +++ b/yogstation/code/game/objects/structures/toilet_bong.dm @@ -21,7 +21,6 @@ START_PROCESSING(SSobj, src) /obj/structure/toilet_bong/update_icon(updates=ALL) - . = ..() . = ..() cut_overlays() if (LAZYLEN(contents)) diff --git a/yogstation/code/modules/antagonists/slaughter/slaughter.dm b/yogstation/code/modules/antagonists/slaughter/slaughter.dm index fed512a52752..16a114100244 100644 --- a/yogstation/code/modules/antagonists/slaughter/slaughter.dm +++ b/yogstation/code/modules/antagonists/slaughter/slaughter.dm @@ -133,9 +133,9 @@ icon_state = "demon_heart-on" decay_factor = 0 -/obj/item/organ/heart/demon/update_icon(updates=ALL) - . = ..() - return //always beating visually +/obj/item/organ/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/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm index 5180df57aa3c..060b47aee275 100644 --- a/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/yogstation/code/modules/projectiles/guns/ballistic/launchers.dm @@ -13,9 +13,9 @@ casing_ejector = FALSE internal_magazine = TRUE -/obj/item/gun/ballistic/speargun/update_icon(updates=ALL) - . = ..() - 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/recycling/disposal/pipe_sorting.dm b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm index 1ebe6292cacb..20a58d062755 100644 --- a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm +++ b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm @@ -30,7 +30,6 @@ /obj/structure/disposalpipe/sorting/update_icon(updates=ALL) . = ..() cut_overlays() - . = ..() if(panel_open) add_overlay(image('yogstation/icons/obj/atmospherics/pipes/disposal.dmi', "[icon_state]-open")) diff --git a/yogstation/code/modules/xenoarch/loot/gigadrill.dm b/yogstation/code/modules/xenoarch/loot/gigadrill.dm index 5e11e52a92d5..22d6bbbe1298 100644 --- a/yogstation/code/modules/xenoarch/loot/gigadrill.dm +++ b/yogstation/code/modules/xenoarch/loot/gigadrill.dm @@ -20,7 +20,6 @@ update_appearance(UPDATE_ICON) /obj/vehicle/ridden/gigadrill/update_icon(updates=ALL) - . = ..() . = ..() if(occupant_amount()) icon_state = "gigadrill_mov" From fef98c5257fd80ca6c2d1addd31d4adf37224ac3 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 03:05:14 -0400 Subject: [PATCH 05/50] More fixes --- code/_onclick/hud/screen_objects.dm | 73 ++++---- code/game/machinery/airlock_control.dm | 2 + code/game/machinery/doors/airlock.dm | 224 ++++++++++++------------- 3 files changed, 140 insertions(+), 159 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 4c0546673f78..5cba45b63a8a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -181,16 +181,13 @@ cut_overlay(object_overlays) object_overlays.Cut() -/atom/movable/screen/inventory/update_icon(updates=ALL) - . = ..() +/atom/movable/screen/inventory/update_icon_state() if(!icon_empty) icon_empty = icon_state - if(hud && hud.mymob && slot_id && icon_full) - if(hud.mymob.get_item_by_slot(slot_id)) - icon_state = icon_full - else - icon_state = icon_empty + if(hud?.mymob && slot_id && icon_full) + icon_state = hud.mymob.get_item_by_slot(slot_id) ? icon_full : icon_empty + return ..() /atom/movable/screen/inventory/proc/add_overlays() var/mob/user = hud.mymob @@ -217,15 +214,12 @@ 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(updates=ALL) +/atom/movable/screen/inventory/hand/update_overlays() . = ..() if(!handcuff_overlay) - var/ui_style = hud?.mymob?.client?.prefs?.read_preference(/datum/preference/choiced/ui_style) 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() + handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state) if(!hud?.mymob) return @@ -233,14 +227,14 @@ 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) @@ -330,16 +324,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)) @@ -356,13 +347,9 @@ 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 = "[initial(icon_state)][hud?.mymob?.pulling ? null : 0]" + return ..() /atom/movable/screen/resist name = "resist" @@ -388,14 +375,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 = "[initial(icon_state)][user.resting ? 0 : null]" + return ..() /atom/movable/screen/storage name = "storage" @@ -435,6 +420,7 @@ name = "damage zone" icon_state = "zone_sel" screen_loc = ui_zonesel + var/overlay_icon = 'icons/mob/screen_gen.dmi' var/selecting = BODY_ZONE_CHEST var/static/list/hover_overlays_cache = list() var/hovering @@ -536,18 +522,15 @@ update_icon(usr) return 1 -/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' diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index b399ab860ef1..99dda3ad4841 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -2,6 +2,8 @@ // This code allows for airlocks to be controlled externally by setting an id_tag and comm frequency (disables ID access) /obj/machinery/door/airlock + /// The current state of the airlock, used to construct the airlock overlays + var/airlock_state var/id_tag var/frequency var/datum/radio_frequency/radio_connection diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5ace29752d09..c5331693599c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -24,6 +24,18 @@ #define AIRLOCK_DENY 5 #define AIRLOCK_EMAG 6 +#define AIRLOCK_FRAME_CLOSED "closed" +#define AIRLOCK_FRAME_CLOSING "closing" +#define AIRLOCK_FRAME_OPEN "open" +#define AIRLOCK_FRAME_OPENING "opening" + +// Airlock light states, used for generating the light overlays +#define AIRLOCK_LIGHT_BOLTS "bolts" +#define AIRLOCK_LIGHT_EMERGENCY "emergency" +#define AIRLOCK_LIGHT_DENIED "denied" +#define AIRLOCK_LIGHT_CLOSING "closing" +#define AIRLOCK_LIGHT_OPENING "opening" + #define AIRLOCK_SECURITY_NONE 0 //Normal airlock //Wires are not secured #define AIRLOCK_SECURITY_METAL 1 //Medium security airlock //There is a simple metal over wires (use welder) #define AIRLOCK_SECURITY_PLASTEEL_I_S 2 //Sliced inner plating (use crowbar), jumps to 0 @@ -594,135 +606,119 @@ else return FALSE -/obj/machinery/door/airlock/update_icon(state=0, override=0) - cut_overlays() +/obj/machinery/door/airlock/update_icon(updates=ALL, state=0, override=FALSE) if(operating && !override) return - switch(state) - if(0) - if(density) - state = AIRLOCK_CLOSED - else - state = AIRLOCK_OPEN - icon_state = "" + + if(!state) + state = density ? AIRLOCK_CLOSED : AIRLOCK_OPEN + airlock_state = state + + . = ..() + + SSdemo.mark_dirty(src) + +/obj/machinery/door/airlock/update_icon_state() + . = ..() + switch(airlock_state) if(AIRLOCK_OPEN, AIRLOCK_CLOSED) icon_state = "" if(AIRLOCK_DENY, AIRLOCK_OPENING, AIRLOCK_CLOSING, AIRLOCK_EMAG) icon_state = "nonexistenticonstate" //MADNESS - set_airlock_overlays(state) - SSdemo.mark_dirty(src) -/obj/machinery/door/airlock/proc/set_side_overlays(obj/effect/overlay/airlock_part/base, show_lights = FALSE) - var/side = base.side_id - base.icon = icon - base.cut_overlays() +/obj/machinery/door/airlock/update_overlays() + . = ..() + + var/frame_state + var/light_state + switch(airlock_state) + if(AIRLOCK_CLOSED) + frame_state = AIRLOCK_FRAME_CLOSED + if(locked) + light_state = AIRLOCK_LIGHT_BOLTS + else if(emergency) + light_state = AIRLOCK_LIGHT_EMERGENCY + if(AIRLOCK_DENY) + frame_state = AIRLOCK_FRAME_CLOSED + light_state = AIRLOCK_LIGHT_DENIED + if(AIRLOCK_EMAG) + frame_state = AIRLOCK_FRAME_CLOSED + if(AIRLOCK_CLOSING) + frame_state = AIRLOCK_FRAME_CLOSING + light_state = AIRLOCK_LIGHT_CLOSING + if(AIRLOCK_OPEN) + frame_state = AIRLOCK_FRAME_OPEN + if(AIRLOCK_OPENING) + frame_state = AIRLOCK_FRAME_OPENING + light_state = AIRLOCK_LIGHT_OPENING + + . += get_airlock_overlay(frame_state, icon, src, em_block = TRUE) if(airlock_material) - base.add_overlay(get_airlock_overlay("[airlock_material]_[side]", overlays_file)) + . += get_airlock_overlay("[airlock_material]_[frame_state]", overlays_file, src, em_block = TRUE) else - base.add_overlay(get_airlock_overlay("fill_[side]", icon)) - if(panel_open && panel_attachment == side) - if(security_level) - base.add_overlay(get_airlock_overlay("panel_closed_protected", overlays_file)) - else - base.add_overlay(get_airlock_overlay("panel_closed", overlays_file)) - if(show_lights && lights && hasPower()) - base.add_overlay(get_airlock_overlay("lights_[side]", overlays_file)) - - if(note && note_attachment == side) - var/notetype = note_type() - base.add_overlay(get_airlock_overlay(notetype, note_overlay_file)) - -/obj/machinery/door/airlock/proc/set_airlock_overlays(state) - for(var/obj/effect/overlay/airlock_part/part in part_overlays) - set_side_overlays(part, state == AIRLOCK_CLOSING || state == AIRLOCK_OPENING) - if(part.aperture_angle) - var/matrix/T - if(state == AIRLOCK_OPEN || state == AIRLOCK_OPENING || state == AIRLOCK_CLOSING) - T = matrix() - T.Translate(-part.open_px,-part.open_py) - T.Turn(part.aperture_angle) - T.Translate(part.open_px,part.open_py) - switch(state) - if(AIRLOCK_CLOSED, AIRLOCK_DENY, AIRLOCK_EMAG) - part.transform = matrix() - if(AIRLOCK_OPEN) - part.transform = T - if(AIRLOCK_CLOSING) - part.transform = T - animate(part, transform = T, time = 0.5 SECONDS - part.move_end_time, flags = ANIMATION_LINEAR_TRANSFORM) - animate(transform = matrix(), time = part.move_end_time - part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) - if(AIRLOCK_OPENING) - part.transform = matrix() - animate(part, transform = matrix(), time = part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) - animate(transform = T, time = part.move_end_time - part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) - else - switch(state) - if(AIRLOCK_CLOSED, AIRLOCK_DENY, AIRLOCK_EMAG) - part.pixel_x = 0 - part.pixel_y = 0 - if(AIRLOCK_OPEN) - part.pixel_x = part.open_px - part.pixel_y = part.open_py - if(AIRLOCK_CLOSING) - part.pixel_x = part.open_px - part.pixel_y = part.open_py - animate(part, pixel_x = part.open_px, pixel_y = part.open_py, time = 0.5 SECONDS - part.move_end_time) - animate(pixel_x = 0, pixel_y = 0, time = part.move_end_time - part.move_start_time) - if(AIRLOCK_OPENING) - part.pixel_x = 0 - part.pixel_y = 0 - animate(part, pixel_x = 0, pixel_y = 0, time = part.move_start_time) - animate(pixel_x = part.open_px, pixel_y = part.open_py, time = part.move_end_time - part.move_start_time) - - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - SSvis_overlays.add_vis_overlay(src, overlays_file, "frame", FLOAT_LAYER, FLOAT_PLANE, dir) - - switch(state) - if(AIRLOCK_CLOSED) - if(lights && hasPower()) - if(locked) - SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_bolts", FLOAT_LAYER, FLOAT_PLANE, dir) - else if(emergency) - SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_emergency", FLOAT_LAYER, FLOAT_PLANE, dir) - if(welded) - SSvis_overlays.add_vis_overlay(src, overlays_file, "welded", FLOAT_LAYER, FLOAT_PLANE, dir) - if(obj_integrity Date: Tue, 11 Jul 2023 03:10:02 -0400 Subject: [PATCH 06/50] minor fixes --- code/__DEFINES/flags.dm | 4 ---- code/datums/components/storage/storage.dm | 3 +-- code/game/objects/items/pet_carrier.dm | 16 +++++++++------- .../gas_recipe_machines/crystallizer.dm | 1 + 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index d04a6c5c5a82..04d435f54ddb 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -81,10 +81,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #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) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 4ae6bc76b1bf..9b8fbc896533 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -688,8 +688,7 @@ 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(updates=ALL) - . = ..() +/datum/component/storage/proc/update_icon() if(isobj(parent)) var/obj/O = parent O.update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index d5dc0c99fea6..29fcb3a5db8e 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -141,15 +141,17 @@ update_appearance(UPDATE_ICON) remove_occupant(user) -/obj/item/pet_carrier/update_icon(updates=ALL) - . = ..() - cut_overlay("unlocked") - cut_overlay("locked") +/obj/item/pet_carrier/update_icon_state() if(open) icon_state = initial(icon_state) - else - icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]" - add_overlay("[locked ? "" : "un"]locked") + return ..() + icon_state = "[base_icon_state]_[!occupants.len ? "closed" : "occupied"]" + return ..() + +/obj/item/pet_carrier/update_overlays() + . = ..() + if(!open) + . += "[base_icon_state]_[locked ? "" : "un"]locked" /obj/item/pet_carrier/MouseDrop(atom/over_atom) . = ..() 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 a22c2400f820..3c95302122f0 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -86,6 +86,7 @@ add_overlay(getpipeimage(icon, "pipe", turn(dir, 180), COLOR_RED, piping_layer)) /obj/machinery/atmospherics/components/binary/crystallizer/update_icon_state() + . = ..() if(panel_open) icon_state = "[base_icon]-open" else if(on) From 6f5c4aeefc9a6c9f8849734916c52097b38f0a0a Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 03:22:40 -0400 Subject: [PATCH 07/50] fuck --- code/game/machinery/doors/airlock.dm | 22 +++++------ code/game/objects/items/pet_carrier.dm | 4 +- .../nukeop/equipment/nuclearbomb.dm | 37 ++++++++++--------- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c5331693599c..f2ad12a1acce 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -652,35 +652,35 @@ frame_state = AIRLOCK_FRAME_OPENING light_state = AIRLOCK_LIGHT_OPENING - . += get_airlock_overlay(frame_state, icon, src, em_block = TRUE) + . += get_airlock_overlay(frame_state, icon) if(airlock_material) - . += get_airlock_overlay("[airlock_material]_[frame_state]", overlays_file, src, em_block = TRUE) + . += get_airlock_overlay("[airlock_material]_[frame_state]", overlays_file) else - . += get_airlock_overlay("fill_[frame_state]", icon, src, em_block = TRUE) + . += get_airlock_overlay("fill_[frame_state]", icon) if(lights && hasPower()) - . += get_airlock_overlay("lights_[light_state]", overlays_file, src, em_block = FALSE) + . += get_airlock_overlay("lights_[light_state]", overlays_file) if(panel_open) - . += get_airlock_overlay("panel_[frame_state][security_level ? "_protected" : null]", overlays_file, src, em_block = TRUE) + . += get_airlock_overlay("panel_[frame_state][security_level ? "_protected" : null]", overlays_file) if(frame_state == AIRLOCK_FRAME_CLOSED && welded) - . += get_airlock_overlay("welded", overlays_file, src, em_block = TRUE) + . += get_airlock_overlay("welded", overlays_file) if(airlock_state == AIRLOCK_EMAG) - . += get_airlock_overlay("sparks", overlays_file, src, em_block = FALSE) + . += get_airlock_overlay("sparks", overlays_file) if(hasPower()) if(frame_state == AIRLOCK_FRAME_CLOSED) if(obj_integrity < integrity_failure * max_integrity) - . += get_airlock_overlay("sparks_broken", overlays_file, src, em_block = FALSE) + . += get_airlock_overlay("sparks_broken", overlays_file) else if(obj_integrity < (0.75 * max_integrity)) - . += get_airlock_overlay("sparks_damaged", overlays_file, src, em_block = FALSE) + . += get_airlock_overlay("sparks_damaged", overlays_file) else if(frame_state == AIRLOCK_FRAME_OPEN) if(obj_integrity < (0.75 * max_integrity)) - . += get_airlock_overlay("sparks_open", overlays_file, src, em_block = FALSE) + . += get_airlock_overlay("sparks_open", overlays_file) if(note) - . += get_airlock_overlay(get_note_state(frame_state), note_overlay_file, src, em_block = TRUE) + . += get_airlock_overlay(get_note_state(frame_state), note_overlay_file) if(hasPower() && unres_sides) for(var/heading in list(NORTH,SOUTH,EAST,WEST)) diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 29fcb3a5db8e..526bbc748ca8 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -145,13 +145,13 @@ if(open) icon_state = initial(icon_state) return ..() - icon_state = "[base_icon_state]_[!occupants.len ? "closed" : "occupied"]" + icon_state = "[initial(icon_state)]_[!occupants.len ? "closed" : "occupied"]" return ..() /obj/item/pet_carrier/update_overlays() . = ..() if(!open) - . += "[base_icon_state]_[locked ? "" : "un"]locked" + . += "[initial(icon_state)]_[locked ? "" : "un"]locked" /obj/item/pet_carrier/MouseDrop(atom/over_atom) . = ..() diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 42e690a1da2b..45f4b503ab52 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -179,28 +179,28 @@ else return NUKE_OFF_UNLOCKED -/obj/machinery/nuclearbomb/update_icon(updates=ALL) - . = ..() - if(deconstruction_state == NUKESTATE_INTACT) - switch(get_nuke_state()) - if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) - icon_state = "nuclearbomb_base" - update_appearance(UPDATE_ICON) - if(NUKE_ON_TIMING) - cut_overlays() - icon_state = "nuclearbomb_timing" - if(NUKE_ON_EXPLODING) - cut_overlays() - icon_state = "nuclearbomb_exploding" - else +/obj/machinery/nuclearbomb/update_icon_state() + if(deconstruction_state != NUKESTATE_INTACT) icon_state = "nuclearbomb_base" - update_appearance(UPDATE_ICON) + return ..() + + switch(get_nuke_state()) + if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) + icon_state = "nuclearbomb_base" + if(NUKE_ON_TIMING) + icon_state = "nuclearbomb_timing" + if(NUKE_ON_EXPLODING) + icon_state = "nuclearbomb_exploding" + + return ..() /obj/machinery/nuclearbomb/update_overlays() . = ..() - cut_overlay(interior) + if(lights) cut_overlay(lights) + cut_overlay(interior) + switch(deconstruction_state) if(NUKESTATE_UNSCREWED) interior = "panel-unscrewed" @@ -214,7 +214,7 @@ interior = "core-removed" if(NUKESTATE_INTACT) return - add_overlay(interior) + switch(get_nuke_state()) if(NUKE_OFF_LOCKED) lights = "" @@ -225,8 +225,9 @@ lights = "lights-timing" if(NUKE_ON_EXPLODING) lights = "lights-exploding" - add_overlay(lights) + add_overlay(lights) + add_overlay(interior) /obj/machinery/nuclearbomb/process() if(timing && !exploding) From 64cab8a4c5b5e9af6e911a8d333203adbf071283 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 18:33:21 -0400 Subject: [PATCH 08/50] A! --- code/_onclick/telekinesis.dm | 18 +++++----- code/datums/components/grillable.dm | 14 ++++---- code/game/area/areas.dm | 9 +++-- code/game/atoms.dm | 7 ++-- .../game/gamemodes/clown_ops/bananium_bomb.dm | 23 ++++++------- code/game/machinery/airlock_cycle_control.dm | 34 +++++++++---------- code/game/machinery/announcement_system.dm | 11 +++--- code/game/machinery/aug_manipulator.dm | 12 ++++--- code/game/machinery/buttons.dm | 15 ++++---- code/game/machinery/cell_charger.dm | 9 +++-- code/game/machinery/decontamination.dm | 3 +- code/game/machinery/defibrillator_mount.dm | 11 +++--- code/game/machinery/electrolyzer.dm | 6 ++-- code/game/machinery/firealarm.dm | 22 ++++++------ code/game/machinery/gulag_processor.dm | 4 --- code/game/machinery/holosign.dm | 2 +- .../machinery/porta_turret/portable_turret.dm | 3 +- code/game/machinery/suit_storage_unit.dm | 3 +- code/game/objects/items/defib.dm | 20 +++++------ .../gas_recipe_machines/crystallizer.dm | 4 +-- code/modules/cargo/supplypod.dm | 1 - .../food_and_drinks/food/customizables.dm | 13 ++++--- code/modules/food_and_drinks/food/snacks.dm | 5 ++- .../food_and_drinks/food/snacks_pastry.dm | 16 +++++---- .../food_and_drinks/kitchen_machinery/oven.dm | 3 +- .../computers/machinery/modular_computer.dm | 2 +- code/modules/power/power.dm | 1 + code/modules/research/server.dm | 1 - .../shuttle/spaceship_navigation_beacon.dm | 4 --- code/modules/vending/_vending.dm | 2 +- 30 files changed, 129 insertions(+), 149 deletions(-) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 334c220a0081..26489fe5537f 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -183,17 +183,15 @@ return new /obj/effect/temp_visual/telekinesis(get_turf(focus)) -/obj/item/tk_grab/update_icon(updates=ALL) +/obj/item/tk_grab/update_overlays() . = ..() - 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 + 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/grillable.dm b/code/datums/components/grillable.dm index 825ae90383ae..09178440a4bc 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -42,11 +42,11 @@ ///Ran when an object starts grilling on something /datum/component/grillable/proc/StartGrilling(atom/grill_source) currently_grilling = TRUE - RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(OnMoved),TRUE) + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(OnMoved)) AddGrilledItemOverlay(parent) - //var/atom/A = parent - //A.update_appearance(UPDATE_ICON) + var/atom/atom_parent = parent + atom_parent.update_appearance(UPDATE_ICON) ///Ran when an object finished grilling /datum/component/grillable/proc/FinishGrilling(atom/grill_source) @@ -77,12 +77,12 @@ ///Ran when an object moves from the grill /datum/component/grillable/proc/OnMoved(atom/A, atom/OldLoc, Dir, Forced) + SIGNAL_HANDLER + currently_grilling = FALSE - 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(UPDATE_ICON) + A.update_appearance() /datum/component/grillable/proc/AddGrilledItemOverlay(obj/source) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 72891722b54a..d01ce11aaa21 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -519,21 +519,20 @@ GLOBAL_LIST_EMPTY(teleportlocs) L.update() /** - * Update the icon of the area + * Update the icon state of the area * * 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_icon(updates=ALL) - . = ..() +/area/update_icon_state() var/weather_icon - for(var/V in SSweather.processing) - var/datum/weather/W = V + for(var/datum/weather/W as anything in SSweather.processing) if(W.stage != END_STAGE && (src in W.impacted_areas)) W.update_areas() weather_icon = TRUE if(!weather_icon) icon_state = null + return ..() /** * Update the icon of the area (overridden to always be null for space diff --git a/code/game/atoms.dm b/code/game/atoms.dm index ed01f05343ed..9199a9c8e635 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -592,15 +592,12 @@ if(LAZYLEN(managed_vis_overlays)) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - var/list/new_overlays = update_overlays(updates) + var/list/new_overlays = update_overlays() if(managed_overlays) 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 + managed_overlays = new_overlays add_overlay(new_overlays) . |= UPDATE_OVERLAYS diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index 20d2b086eb06..250e53fd6fe2 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -4,20 +4,19 @@ icon = 'icons/obj/machines/nuke.dmi' icon_state = "bananiumbomb_base" -/obj/machinery/nuclearbomb/syndicate/bananium/update_icon(updates=ALL) +/obj/machinery/nuclearbomb/syndicate/bananium/update_icon_state() . = ..() - if(deconstruction_state == NUKESTATE_INTACT) - switch(get_nuke_state()) - if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) - icon_state = "bananiumbomb_base" - if(NUKE_ON_TIMING) - cut_overlays() - icon_state = "bananiumbomb_timing" - if(NUKE_ON_EXPLODING) - cut_overlays() - icon_state = "bananiumbomb_exploding" - else + if(deconstruction_state != NUKESTATE_INTACT) icon_state = "bananiumbomb_base" + return + + switch(get_nuke_state()) + if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED) + icon_state = "bananiumbomb_base" + if(NUKE_ON_TIMING) + icon_state = "bananiumbomb_timing" + if(NUKE_ON_EXPLODING) + icon_state = "bananiumbomb_exploding" /obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station) switch(off_station) diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index 7523ff307734..fc62172ae40e 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_appearance(UPDATE_ICON) + update_cycle_icon() /obj/machinery/advanced_airlock_controller/Destroy() qdel(wires) @@ -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/proc/update_cycle_icon(use_hash = FALSE) var/turf/location = get_turf(src) if(!location) return @@ -193,7 +193,7 @@ if(WIRE_POWER) if(!wires.is_cut(WIRE_POWER)) shorted = FALSE - update_appearance(UPDATE_ICON) + update_cycle_icon() if(WIRE_AI) if(!wires.is_cut(WIRE_AI)) aidisabled = FALSE @@ -292,12 +292,12 @@ /obj/machinery/advanced_airlock_controller/process_atmos() if((stat & (NOPOWER|BROKEN)) || shorted) - update_icon(TRUE) + update_cycle_icon(TRUE) return var/turf/location = get_turf(src) if(!location) - update_icon(TRUE) + update_cycle_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(UPDATE_ICON) - update_icon(TRUE) + update_cycle_icon(TRUE) /obj/machinery/advanced_airlock_controller/attackby(obj/item/W, mob/user, params) switch(buildstage) @@ -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_appearance(UPDATE_ICON) + update_cycle_icon() 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_appearance(UPDATE_ICON) + update_cycle_icon() 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_appearance(UPDATE_ICON) + update_cycle_icon() return if(istype(W, /obj/item/stack/cable_coil)) @@ -486,14 +486,14 @@ cut_links() shorted = 0 buildstage = 2 - update_appearance(UPDATE_ICON) + update_cycle_icon() 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_appearance(UPDATE_ICON) + update_cycle_icon() 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_appearance(UPDATE_ICON) + update_cycle_icon() return if(W.tool_behaviour == TOOL_WRENCH) @@ -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_cycle_icon(TRUE) /obj/machinery/advanced_airlock_controller/proc/request_from_door(airlock) var/role = airlocks[airlock] @@ -775,7 +775,7 @@ else if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked - update_appearance(UPDATE_ICON) + update_cycle_icon() to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] the airlock controller interface.")) updateUsrDialog() else @@ -783,8 +783,8 @@ return /obj/machinery/advanced_airlock_controller/power_change() - ..() - update_appearance(UPDATE_ICON) + . = ..() + update_cycle_icon() /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_appearance(UPDATE_ICON) + update_cycle_icon() /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 c928b1415502..692bf18f87ac 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -32,24 +32,23 @@ GLOBAL_LIST_EMPTY(announcement_systems) radio = new /obj/item/radio/headset/silicon/ai(src) update_appearance(UPDATE_ICON) -/obj/machinery/announcement_system/update_icon(updates=ALL) +/obj/machinery/announcement_system/update_overlays() . = ..() - cut_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 1132d623f6d0..8f686f18065b 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -21,20 +21,22 @@ /obj/machinery/aug_manipulator/update_icon(updates=ALL) . = ..() - cut_overlays() - if(stat & BROKEN) icon_state = "[initial_icon_state]-broken" return - if(storedpart) - add_overlay("[initial_icon_state]-closed") - if(powered()) icon_state = initial_icon_state else icon_state = "[initial_icon_state]-off" +/obj/machinery/aug_manipulator/update_overlays() + . = ..() + if(stat & BROKEN) + return + if(storedpart) + . += "[initial_icon_state]-closed" + /obj/machinery/aug_manipulator/Destroy() QDEL_NULL(storedpart) return ..() diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 73d3b3f7498b..8ccbc8a177c5 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -44,20 +44,23 @@ /obj/machinery/button/update_icon(updates=ALL) . = ..() - cut_overlays() if(panel_open) icon_state = "button-open" - if(device) - add_overlay("button-device") - if(board) - add_overlay("button-board") - else if(stat & (NOPOWER|BROKEN)) icon_state = "[skin]-p" else icon_state = skin +/obj/machinery/button/update_overlays() + . = ..() + 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) if(panel_open || allowed(user)) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index fcb631e4587f..c88200bd3f6c 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -13,16 +13,15 @@ var/chargelevel = -1 var/charge_rate = 250 -/obj/machinery/cell_charger/update_icon(updates=ALL) +/obj/machinery/cell_charger/update_overlays() . = ..() - cut_overlays() if(charging) - add_overlay(image(charging.icon, charging.icon_state)) - add_overlay("ccharger-on") + . += image(charging.icon, charging.icon_state) + . += "ccharger-on" if(!(stat & (BROKEN|NOPOWER))) var/newlevel = round(charging.percent() * 4 / 100) chargelevel = newlevel - add_overlay("ccharger-o[newlevel]") + . += "ccharger-o[newlevel]" /obj/machinery/cell_charger/examine(mob/user) . = ..() diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index d769b5442ac7..b6c54de73878 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -47,12 +47,11 @@ to_pickup.forceMove(src) /obj/machinery/decontamination_unit/power_change() - . = ..() if(!is_operational() && state_open) open_machine() dump_mob() playsound(src, 'sound/machines/decon/decon-open.ogg', 50, TRUE) - update_appearance(UPDATE_ICON) + return ..() /obj/machinery/decontamination_unit/proc/dump_mob() var/turf/T = get_turf(src) diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index ece2e8774a76..63a7a47cf142 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -38,18 +38,17 @@ defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5% update_appearance(UPDATE_ICON) -/obj/machinery/defibrillator_mount/update_icon(updates=ALL) +/obj/machinery/defibrillator_mount/update_overlays() . = ..() - cut_overlays() if(defib) - add_overlay("defib") + . += "defib" if(defib.powered) - add_overlay(defib.safety ? "online" : "emagged") + . += defib.safety ? "online" : "emagged" var/ratio = defib.cell.charge / defib.cell.maxcharge ratio = CEILING(ratio * 4, 1) * 25 - add_overlay("charge[ratio]") + . += "charge[ratio]" if(clamps_locked) - add_overlay("clamps") + . += "clamps" /obj/machinery/defibrillator_mount/get_cell() if(defib) diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index 0f2ce774db9e..f1d8f9eeb8d4 100644 --- a/code/game/machinery/electrolyzer.dm +++ b/code/game/machinery/electrolyzer.dm @@ -56,10 +56,12 @@ /obj/machinery/electrolyzer/update_icon(updates=ALL) . = ..() - cut_overlays() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" + +/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/firealarm.dm b/code/game/machinery/firealarm.dm index 14610658e278..ea3056b75bf8 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -54,30 +54,28 @@ /obj/machinery/firealarm/update_icon(updates=ALL) . = ..() - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(panel_open) icon_state = "fire_b[buildstage]" return - if(stat & BROKEN) icon_state = "firex" return - icon_state = "fire0" - if(stat & NOPOWER) +/obj/machinery/firealarm/update_overlays() + . = ..() + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + if(stat & (NOPOWER|BROKEN)) return - add_overlay("fire_overlay") + . += "fire_overlay" 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) @@ -85,15 +83,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) diff --git a/code/game/machinery/gulag_processor.dm b/code/game/machinery/gulag_processor.dm index da1fc55e151c..6f59248dd0f4 100644 --- a/code/game/machinery/gulag_processor.dm +++ b/code/game/machinery/gulag_processor.dm @@ -60,10 +60,6 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( id = null ..() -/obj/machinery/gulag_processor/power_change() - ..() - update_appearance(UPDATE_ICON) - /obj/machinery/gulag_processor/interact(mob/user) . = ..() toggle_open() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 8d381e2b4752..43933e73bd0e 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -28,7 +28,7 @@ /obj/machinery/holosign/power_change() if(!is_operational()) lit = FALSE - update_appearance(UPDATE_ICON) + return ..() /obj/machinery/holosign/surgery name = "surgery holosign" diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 96d47e7b473c..7dd03435c399 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -219,10 +219,9 @@ interact(usr) /obj/machinery/porta_turret/power_change() - . = ..() if(!anchored || (stat & BROKEN) || !powered()) - update_appearance(UPDATE_ICON) remove_control() + return ..() /obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params) if(stat & BROKEN) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 10edade5b42c..57f04afe1eb5 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -170,11 +170,10 @@ add_overlay("human") /obj/machinery/suit_storage_unit/power_change() - . = ..() if(!is_operational() && state_open) open_machine() dump_contents() - update_appearance(UPDATE_ICON) + return ..() /obj/machinery/suit_storage_unit/proc/dump_contents() dropContents() diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 5e4d24e02c17..7af93fd085b8 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -51,9 +51,8 @@ paddles.extinguish() /obj/item/defibrillator/update_icon(updates=ALL) - . = ..() update_power() - update_charge() + return ..() /obj/item/defibrillator/proc/update_power() if(!QDELETED(cell)) @@ -66,22 +65,19 @@ /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") - if(!cell) - add_overlay("[initial(icon_state)]-nocell") - if(!safety) - add_overlay("[initial(icon_state)]-emagged") - -/obj/item/defibrillator/proc/update_charge() + . += "[initial(icon_state)]-powered" if(powered) //so it doesn't show charge if it's unpowered if(!QDELETED(cell)) var/ratio = cell.charge / cell.maxcharge ratio = CEILING(ratio*4, 1) * 25 - add_overlay("[initial(icon_state)]-charge[ratio]") + . += "[initial(icon_state)]-charge[ratio]" + if(!cell) + . += "[initial(icon_state)]-nocell" + if(!safety) + . += "[initial(icon_state)]-emagged" /obj/item/defibrillator/CheckParts(list/parts_list) ..() 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 3c95302122f0..3961f1aedf44 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -82,8 +82,8 @@ /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)) + . += getpipeimage(icon, "pipe", dir, COLOR_LIME, piping_layer) + . += getpipeimage(icon, "pipe", turn(dir, 180), COLOR_RED, piping_layer) /obj/machinery/atmospherics/components/binary/crystallizer/update_icon_state() . = ..() diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 39e9829f6a5d..7f5de005e982 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -137,7 +137,6 @@ /obj/structure/closet/supplypod/update_overlays() . = ..() - . = list() if(style == STYLE_INVISIBLE) return diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 777328cfc6ba..ed3cbdbc0ae4 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -54,13 +54,13 @@ 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 to_chat(user, span_notice("You add the [I.name] to the [name].")) - update_overlays(S = S) - update_name(S = S) + update_snack_overlays(S) + update_snack_name(S) else . = ..() -/obj/item/reagent_containers/food/snacks/customizable/update_name(updates=ALL, obj/item/reagent_containers/food/snacks/S) +/obj/item/reagent_containers/food/snacks/customizable/proc/update_snack_name(obj/item/reagent_containers/food/snacks/S) . = ..() for(var/obj/item/I in ingredients) if(!istype(S, I.type)) @@ -103,7 +103,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_snack_overlays(obj/item/reagent_containers/food/snacks/S) . = ..() var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling") if(S.filling_color == "#FFFFFF") @@ -140,12 +140,11 @@ /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_snack_overlays(src) /obj/item/reagent_containers/food/snacks/customizable/Destroy() - for(var/ingredient in ingredients) - qdel(ingredient) + QDEL_NULL(ingredients) return ..() diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 5f26058ab87f..49d86418e092 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -255,16 +255,15 @@ 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_snack_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") filling.color = pick("#FF0000","#0000FF","#008000","#FFFF00") else filling.color = S.filling_color - add_overlay(filling) + . += filling // initialize_cooked_food() is called when microwaving the food /obj/item/reagent_containers/food/snacks/proc/initialize_cooked_food(obj/item/reagent_containers/food/snacks/S, cooking_efficiency = 1) diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 39207c494d3e..5454355f9fd3 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -734,12 +734,16 @@ return O.attackby(I, user, params) ..() -/obj/item/reagent_containers/food/snacks/pancakes/update_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 - add_overlay(pancake) - update_appearance(UPDATE_ICON) +/obj/item/reagent_containers/food/snacks/pancakes/update_icon(updates = ALL) + if(!(updates & UPDATE_OVERLAYS)) + return ..() + + updates &= ~UPDATE_OVERLAYS + . = ..() // Don't update overlays. We're doing that here + + if(contents.len < LAZYLEN(overlays)) + overlays -= overlays[overlays.len] + . |= UPDATE_OVERLAYS /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) diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 782408da1719..79e2f187b7af 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -55,14 +55,13 @@ /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/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 721b87d130fe..bd30abb85358 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -112,7 +112,7 @@ /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_appearance(UPDATE_ICON) + update_appearance(UPDATE_ICON) //modPCs should be changed to use powered() instead. return . = ..() diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 878e4821a1c5..f3a553097b6c 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -113,6 +113,7 @@ */ /obj/machinery/proc/power_change() if(stat & BROKEN) + update_appearance(UPDATE_ICON) return if(powered(power_channel)) if(stat & NOPOWER) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 40c5581b44b3..cb12b4782fdf 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -59,7 +59,6 @@ /obj/machinery/rnd/server/power_change() . = ..() refresh_working() - return /obj/machinery/rnd/server/proc/refresh_working() if(stat & EMPED || research_disabled || stat & NOPOWER) diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index 0c50f411162c..72845a00d2af 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -36,10 +36,6 @@ obj/machinery/spaceship_navigation_beacon/emp_act() else icon_state = "core-open" -/obj/machinery/spaceship_navigation_beacon/power_change() - . = ..() - update_appearance(UPDATE_ICON) - /obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/multitool/I) if(panel_open) var/new_name = "Beacon_[input("Enter the custom name for this beacon", "It be Beacon ..your input..") as text]" diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index b73d03236ad2..02b16acf41ff 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -974,7 +974,7 @@ GLOBAL_LIST_EMPTY(vending_products) else stat |= NOPOWER - update_appearance(UPDATE_ICON) + return ..() //Somebody cut an important wire and now we're following a new definition of "pitch." /** From e18b7ae0d0c0269a1faac7b08f53f63ccc2e6e97 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 18:54:51 -0400 Subject: [PATCH 09/50] general annoyances in this PR --- code/controllers/globals.dm | 2 +- code/controllers/subsystem/blackbox.dm | 2 +- code/datums/wires/_wires.dm | 5 +---- code/game/alternate_appearance.dm | 4 ---- code/game/atoms.dm | 3 +++ code/modules/atmospherics/gasmixtures/gas_mixture.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index b029ad215085..a098680ee403 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -35,7 +35,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) return ..() /datum/controller/global_vars/can_vv_get(var_name) - if(var_name == "gvars_datum_protected_varlist") + if(var_name == NAMEOF(src, gvars_datum_protected_varlist)) return FALSE return ..() diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index fe652102534b..68fade5867ea 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -68,7 +68,7 @@ SUBSYSTEM_DEF(blackbox) //no touchie /datum/controller/subsystem/blackbox/vv_get_var(var_name) - if(var_name == "feedback") + if(var_name == NAMEOF(src, feedback)) return debug_variable(var_name, deepCopyList(feedback), 0, src) return ..() diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 10ebab692b1c..5335d652eea0 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -11,9 +11,6 @@ if(A.attachable) return TRUE -/atom - var/datum/wires/wires = null - /atom/proc/attempt_wire_interaction(mob/user) if(!wires) return WIRE_INTERACTION_FAIL @@ -313,4 +310,4 @@ else to_chat(L, span_warning("You need an attachable assembly!")) -#undef MAXIMUM_EMP_WIRES \ No newline at end of file +#undef MAXIMUM_EMP_WIRES diff --git a/code/game/alternate_appearance.dm b/code/game/alternate_appearance.dm index 78a481a97dd8..f9e5fb9181f0 100644 --- a/code/game/alternate_appearance.dm +++ b/code/game/alternate_appearance.dm @@ -1,9 +1,5 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances) - -/atom - var/list/alternate_appearances - /atom/proc/remove_alt_appearance(key) if(alternate_appearances) for(var/K in alternate_appearances) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 9199a9c8e635..1ad0c6a6283e 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -29,6 +29,8 @@ ///HUD images that this atom can provide. var/list/hud_possible + var/list/alternate_appearances + ///Value used to increment ex_act() if reactionary_explosions is on var/explosion_block = 0 @@ -39,6 +41,7 @@ */ var/list/atom_colours + var/datum/wires/wires = null ///overlays that should remain on top and not normally removed when using cut_overlay functions, like c4. var/list/priority_overlays diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 985ed07f7d91..991907fbd814 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -49,7 +49,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) reaction_results = new /datum/gas_mixture/vv_edit_var(var_name, var_value) - if(var_name == "_extools_pointer_gasmixture") + if(var_name == NAMEOF(src, _extools_pointer_gasmixture)) return FALSE // please no. segfaults bad. return ..() /* diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 5fed9d343765..467e0b8987a3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -970,7 +970,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/vv_edit_var(var_name, var_value) . = ..() - if(var_name == "invisibility") + if(var_name == NAMEOF(src, invisibility)) set_invisibility(invisibility) // updates light /proc/set_observer_default_invisibility(amount, message=null) From 50aa00cd58db743d4f032598cdefde336af23504 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 19:09:30 -0400 Subject: [PATCH 10/50] going in specific fixes --- code/_onclick/hud/alien.dm | 4 +- code/_onclick/hud/alien_larva.dm | 4 +- code/_onclick/hud/constructs.dm | 2 +- code/_onclick/hud/devil.dm | 4 +- code/_onclick/hud/generic_dextrous.dm | 4 +- code/_onclick/hud/human.dm | 4 +- code/_onclick/hud/monkey.dm | 4 +- code/_onclick/hud/robot.dm | 4 +- code/_onclick/hud/screen_objects.dm | 2 +- code/datums/martial/sleeping_carp.dm | 2 +- code/game/area/areas.dm | 4 +- code/game/machinery/ai_slipper.dm | 2 +- code/game/machinery/airlock_control.dm | 2 +- code/game/machinery/aug_manipulator.dm | 2 +- code/game/machinery/bounty_board.dm | 2 +- code/game/machinery/buttons.dm | 2 +- code/game/machinery/dance_machine.dm | 2 +- code/game/machinery/decontamination.dm | 2 +- code/game/machinery/dna_scanner.dm | 3 +- code/game/machinery/doppler_array.dm | 2 +- code/game/machinery/droneDispenser.dm | 2 +- code/game/machinery/electrolyzer.dm | 2 +- code/game/machinery/fat_sucker.dm | 23 +++++----- code/game/machinery/firealarm.dm | 2 +- code/game/machinery/flasher.dm | 14 +++--- code/game/machinery/gulag_processor.dm | 2 +- code/game/machinery/gulag_teleporter.dm | 3 +- code/game/machinery/harvester.dm | 8 +++- code/game/machinery/hologram.dm | 2 +- code/game/machinery/igniter.dm | 2 +- code/game/machinery/iv_drip.dm | 61 +++++++++++++------------ code/game/machinery/lightswitch.dm | 14 +++--- 32 files changed, 98 insertions(+), 94 deletions(-) diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index da3c51ca94ba..bc6d08d4b40f 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -83,7 +83,7 @@ pull_icon = new /atom/movable/screen/pull() 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 @@ -100,7 +100,7 @@ infodisplay += alien_queen_finder zone_select = new /atom/movable/screen/zone_sel/alien() - 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/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 5c7062a365f1..b6ce26603f85 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -17,7 +17,7 @@ infodisplay += alien_queen_finder pull_icon = new /atom/movable/screen/pull() 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 @@ -26,5 +26,5 @@ static_inventory += using zone_select = new /atom/movable/screen/zone_sel/alien() - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select diff --git a/code/_onclick/hud/constructs.dm b/code/_onclick/hud/constructs.dm index 4b8fb2838042..b27331a811c7 100644 --- a/code/_onclick/hud/constructs.dm +++ b/code/_onclick/hud/constructs.dm @@ -5,7 +5,7 @@ ..() pull_icon = new /atom/movable/screen/pull() 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 diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm index 3e4b39832322..b553efc1c890 100644 --- a/code/_onclick/hud/devil.dm +++ b/code/_onclick/hud/devil.dm @@ -13,7 +13,7 @@ pull_icon = new /atom/movable/screen/pull() 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 @@ -39,7 +39,7 @@ zone_select = new /atom/movable/screen/zone_sel() 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/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm index 4e86148f2e24..a58a103d9cda 100644 --- a/code/_onclick/hud/generic_dextrous.dm +++ b/code/_onclick/hud/generic_dextrous.dm @@ -10,7 +10,7 @@ pull_icon = new /atom/movable/screen/pull() 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 @@ -41,7 +41,7 @@ zone_select = new /atom/movable/screen/zone_sel() 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 diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 2ee4fba344f3..ff02d32fd88b 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -288,7 +288,7 @@ pull_icon = new /atom/movable/screen/pull() 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 @@ -297,7 +297,7 @@ zone_select = new /atom/movable/screen/zone_sel() 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/monkey.dm b/code/_onclick/hud/monkey.dm index f171e2d9f58f..412cd9e98b1b 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -83,13 +83,13 @@ pull_icon = new /atom/movable/screen/pull() 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.icon = ui_style - zone_select.update_icon(mymob) + zone_select.update_appearance(UPDATE_ICON) static_inventory += zone_select mymob.client.screen = list() diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 39b24e8ab827..7fdf26f94f40 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -169,13 +169,13 @@ pull_icon = new /atom/movable/screen/pull() 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.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 5cba45b63a8a..da21a2c540e5 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -519,7 +519,7 @@ if(choice != selecting) selecting = choice - update_icon(usr) + update_appearance(UPDATE_ICON) return 1 /atom/movable/screen/zone_sel/update_overlays() diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 178bdce34eac..1fc3da8df6de 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(updates=ALL) +/obj/item/twohanded/bostaff/update_icon_state() . = ..() icon_state = "bostaff[wielded]" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index d01ce11aaa21..5f568c6cb7dc 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -537,8 +537,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) /** * Update the icon of the area (overridden to always be null for space */ -/area/space/update_icon(updates=ALL) - . = ..() +/area/space/update_icon_state() + SHOULD_CALL_PARENT(FALSE) icon_state = null diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 1d01a43d851b..dfd10fbb7fb0 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(updates=ALL) +/obj/machinery/ai_slipper/update_icon_state() . = ..() if(stat & BROKEN) return diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 99dda3ad4841..52a878a1de2d 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -115,7 +115,7 @@ id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER -/obj/machinery/airlock_sensor/update_icon(updates=ALL) +/obj/machinery/airlock_sensor/update_icon_state() . = ..() if(on) if(alert) diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 8f686f18065b..732de941f591 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(updates=ALL) +/obj/machinery/aug_manipulator/update_icon_state() . = ..() if(stat & BROKEN) icon_state = "[initial_icon_state]-broken" diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index 866d074f5e65..dbfa874310cc 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(updates=ALL) +/obj/machinery/bounty_board/update_icon_state() . = ..() if(stat & (NOPOWER|BROKEN)) icon_state = "request_kiosk_off" diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 8ccbc8a177c5..fb754a98be52 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -42,7 +42,7 @@ board.accesses = req_one_access -/obj/machinery/button/update_icon(updates=ALL) +/obj/machinery/button/update_icon_state() . = ..() if(panel_open) icon_state = "button-open" diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 4e41d093a45d..0216151d09fb 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(updates=ALL) +/obj/machinery/jukebox/update_icon_state() . = ..() if(active) icon_state = "[initial(icon_state)]-active" diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index b6c54de73878..db881eab3bea 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -37,7 +37,7 @@ decon_emagged = new(list(src), FALSE) update_appearance(UPDATE_ICON) -/obj/machinery/decontamination_unit/update_icon(updates=ALL) +/obj/machinery/decontamination_unit/update_icon_state() . = ..() icon_state = uv? "tube_on" : (state_open? "tube_open" : "tube") diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index ff787276b660..7492975e1ac3 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -35,7 +35,8 @@ if(scan_level >= 3) . += "Scanner has been upgraded to support autoprocessing." -/obj/machinery/dna_scannernew/update_icon(updates=ALL) +/obj/machinery/dna_scannernew/update_icon_state() + . = ..() //no power or maintenance if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index f1cd200f232b..e816b4db95db 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -81,7 +81,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays) return FALSE return ..() -/obj/machinery/doppler_array/update_icon(updates=ALL) +/obj/machinery/doppler_array/update_icon_state() . = ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 6077da46a9fc..0ba3aeeb5ce7 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -169,7 +169,7 @@ if(istype(a, dispense_type)) .++ -/obj/machinery/droneDispenser/update_icon(updates=ALL) +/obj/machinery/droneDispenser/update_icon_state() . = ..() if(stat & (BROKEN|NOPOWER)) icon_state = icon_off diff --git a/code/game/machinery/electrolyzer.dm b/code/game/machinery/electrolyzer.dm index f1d8f9eeb8d4..a3b56108a132 100644 --- a/code/game/machinery/electrolyzer.dm +++ b/code/game/machinery/electrolyzer.dm @@ -54,7 +54,7 @@ else . += "There is no power cell installed." -/obj/machinery/electrolyzer/update_icon(updates=ALL) +/obj/machinery/electrolyzer/update_icon_state() . = ..() icon_state = "electrolyzer-[on ? "[mode]" : "off"]" diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index 17f01f8c84fc..729601badbdf 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -106,27 +106,26 @@ free_exit = !free_exit to_chat(user, span_notice("Safety hatch [free_exit ? "unlocked" : "locked"].")) -/obj/machinery/fat_sucker/update_icon(updates=ALL) +/obj/machinery/fat_sucker/update_overlays() . = ..() - overlays.Cut() if(!state_open) if(processing) - overlays += "[icon_state]_door_on" - overlays += "[icon_state]_stack" - overlays += "[icon_state]_smoke" - overlays += "[icon_state]_green" + . += "[icon_state]_door_on" + . += "[icon_state]_stack" + . += "[icon_state]_smoke" + . += "[icon_state]_green" else - overlays += "[icon_state]_door_off" + . += "[icon_state]_door_off" if(occupant) if(powered(AREA_USAGE_EQUIP)) - overlays += "[icon_state]_stack" - overlays += "[icon_state]_yellow" + . += "[icon_state]_stack" + . += "[icon_state]_yellow" else - overlays += "[icon_state]_red" + . += "[icon_state]_red" else if(powered(AREA_USAGE_EQUIP)) - overlays += "[icon_state]_red" + . += "[icon_state]_red" if(panel_open) - overlays += "[icon_state]_panel" + . += "[icon_state]_panel" /obj/machinery/fat_sucker/process(delta_time) if(!processing) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index ea3056b75bf8..d9fc2f9388b8 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -52,7 +52,7 @@ LAZYREMOVE(myarea.firealarms, src) return ..() -/obj/machinery/firealarm/update_icon(updates=ALL) +/obj/machinery/firealarm/update_icon_state() . = ..() if(panel_open) icon_state = "fire_b[buildstage]" diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 7e8f72ae4244..dc4e0c16da38 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -46,15 +46,15 @@ return FALSE return ..() -/obj/machinery/flasher/update_icon(updates=ALL) +/obj/machinery/flasher/update_icon_state() . = ..() - if (powered()) - if(bulb.burnt_out) - icon_state = "[base_state]1-p" - else - icon_state = "[base_state]1" - else + if(!powered()) icon_state = "[base_state]1-p" + return + if(bulb.burnt_out) + icon_state = "[base_state]1-p" + else + icon_state = "[base_state]1" //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_processor.dm b/code/game/machinery/gulag_processor.dm index 6f59248dd0f4..d0b450f487e7 100644 --- a/code/game/machinery/gulag_processor.dm +++ b/code/game/machinery/gulag_processor.dm @@ -90,7 +90,7 @@ GLOBAL_VAR_INIT(gulag_required_items, typecacheof(list( return ..() -/obj/machinery/gulag_processor/update_icon(updates=ALL) +/obj/machinery/gulag_processor/update_icon_state() . = ..() icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 3220300426d1..4a1e3b111643 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -64,7 +64,7 @@ The console is located at computer/gulag_teleporter.dm return ..() -/obj/machinery/gulag_teleporter/update_icon(updates=ALL) +/obj/machinery/gulag_teleporter/update_icon_state() . = ..() icon_state = initial(icon_state) + (state_open ? "_open" : "") //no power or maintenance @@ -81,7 +81,6 @@ The console is located at computer/gulag_teleporter.dm //running and someone in there if(occupant) icon_state += "_occupied" - return /obj/machinery/gulag_teleporter/relaymove(mob/user) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index f8ac55315e11..f008b7c21f06 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -9,6 +9,7 @@ idle_power_usage = 50 circuit = /obj/item/circuitboard/machine/harvester light_color = LIGHT_COLOR_BLUE + var/warming_up var/interval = 20 var/harvesting = FALSE var/list/operation_order = list() //Order of wich we harvest limbs. @@ -27,7 +28,8 @@ max_time -= L.rating interval = max(max_time,1) -/obj/machinery/harvester/update_icon(warming_up) +/obj/machinery/harvester/update_icon_state() + . = ..() if(warming_up) icon_state = initial(icon_state)+"-charging" return @@ -87,10 +89,12 @@ harvesting = TRUE visible_message(span_notice("The [name] begins warming up!")) say("Initializing harvest protocol.") - update_icon(TRUE) + warming_up = TRUE + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(harvest)), interval) /obj/machinery/harvester/proc/harvest() + warming_up = FALSE update_appearance(UPDATE_ICON) if(!harvesting || state_open || !powered(AREA_USAGE_EQUIP) || !occupant || !iscarbon(occupant)) return diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index fb91ed1c25d7..b9b64536e289 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -469,7 +469,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ set_light_on(FALSE) update_appearance(UPDATE_ICON) -/obj/machinery/holopad/update_icon(updates=ALL) +/obj/machinery/holopad/update_icon_state() . = ..() var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls) if(ringing) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index e214ad3a6254..b40419f65a57 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -102,7 +102,7 @@ QDEL_NULL(spark_system) return ..() -/obj/machinery/sparker/update_icon(updates=ALL) +/obj/machinery/sparker/update_icon_state() . = ..() if(disable) icon_state = "[initial(icon_state)]-d" diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index a716d01deef4..11532de5f553 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -25,7 +25,7 @@ QDEL_NULL(beaker) return ..() -/obj/machinery/iv_drip/update_icon(updates=ALL) +/obj/machinery/iv_drip/update_icon_state() . = ..() if(attached) if(mode) @@ -38,35 +38,36 @@ else icon_state = "donateidle" - cut_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) +/obj/machinery/iv_drip/update_overlays() + . = ..() + if(!beaker) + return + if(attached) + . += "beakeractive" + else + . += "beakeridle" + if(!beaker.reagents.total_volume) + return + 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)) + . += filling_overlay /obj/machinery/iv_drip/MouseDrop(mob/living/target) . = ..() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index abef6031bb9a..85e58ba6fad9 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -27,14 +27,14 @@ update_appearance(UPDATE_ICON) -/obj/machinery/light_switch/update_icon(updates=ALL) +/obj/machinery/light_switch/update_overlays() . = ..() - 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) + if(stat & NOPOWER) + return + if(area.lightswitch) + . += "light1" + else + . += "light0" /obj/machinery/light_switch/examine(mob/user) . = ..() From eac82548d14d8277c1e41cce4931638ce70226eb Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 11 Jul 2023 21:15:33 -0400 Subject: [PATCH 11/50] remove remaining update icons and hud fixes --- code/_onclick/hud/human.dm | 7 ++++++ code/_onclick/hud/screen_objects.dm | 5 ++--- code/game/machinery/PDApainter.dm | 15 ++++++------- code/game/machinery/Sleeper.dm | 2 +- code/game/machinery/doors/airlock.dm | 22 +++++++++---------- code/game/machinery/igniter.dm | 2 +- code/game/machinery/magnet.dm | 7 +++--- code/game/machinery/medical_kiosk.dm | 2 +- code/game/machinery/navbeacon.dm | 9 ++++---- code/game/machinery/newscaster.dm | 18 +++++++++------ code/game/machinery/prisonlabor.dm | 2 +- code/game/machinery/recharger.dm | 6 ++--- code/game/machinery/rechargestation.dm | 2 +- code/game/machinery/recycler.dm | 2 +- code/game/machinery/requests_console.dm | 7 ++++-- code/game/machinery/sci_bombardment.dm | 12 +++++----- code/game/machinery/shieldgen.dm | 6 ++--- code/game/machinery/slotmachine.dm | 5 +---- code/game/machinery/spaceheater.dm | 7 +++--- code/modules/assembly/flash.dm | 8 +++---- code/modules/client/preferences/ghost.dm | 2 +- code/modules/clothing/glasses/_glasses.dm | 2 +- code/modules/clothing/head/collectable.dm | 2 +- code/modules/clothing/head/misc_special.dm | 2 +- code/modules/clothing/spacesuits/plasmamen.dm | 6 ++--- code/modules/flufftext/Hallucination.dm | 6 ++--- code/modules/mob/dead/observer/login.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 4 +++- .../living/simple_animal/eldritch_demons.dm | 12 +++++----- code/modules/mob/mob.dm | 4 ++-- code/modules/mob/mob_movement.dm | 2 +- code/modules/power/singularity/generator.dm | 4 ++-- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/energy.dm | 2 +- .../projectiles/guns/energy/energy_gun.dm | 2 +- .../projectiles/guns/misc/syringe_gun.dm | 2 +- .../security_levels/keycard_authentication.dm | 4 ++-- code/modules/vending/security_armaments.dm | 2 +- 38 files changed, 110 insertions(+), 98 deletions(-) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index ff02d32fd88b..f0761648bd9b 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -109,6 +109,7 @@ using.icon = ui_style using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") using.screen_loc = ui_movi + using.hud = src static_inventory += using using = new /atom/movable/screen/drop() @@ -269,14 +270,17 @@ throw_icon = new /atom/movable/screen/throw_catch() throw_icon.icon = ui_style throw_icon.screen_loc = ui_drop_throw + throw_icon.hud = src hotkeybuttons += throw_icon rest_icon = new /atom/movable/screen/rest() rest_icon.icon = ui_style rest_icon.screen_loc = ui_above_movement + rest_icon.hud = src static_inventory += rest_icon healths = new /atom/movable/screen/healths() + healths.hud = src infodisplay += healths stamina = new /atom/movable/screen/stamina() @@ -284,18 +288,21 @@ infodisplay += stamina healthdoll = new /atom/movable/screen/healthdoll() + healthdoll.hud = src infodisplay += healthdoll pull_icon = new /atom/movable/screen/pull() pull_icon.icon = ui_style pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_intent + pull_icon.hud = src static_inventory += pull_icon devilsouldisplay = new /atom/movable/screen/devil/soul_counter infodisplay += devilsouldisplay zone_select = new /atom/movable/screen/zone_sel() + zone_select.hud = src zone_select.icon = ui_style 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 da21a2c540e5..eef70bfa7e6e 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -421,7 +421,6 @@ icon_state = "zone_sel" screen_loc = ui_zonesel var/overlay_icon = 'icons/mob/screen_gen.dmi' - var/selecting = BODY_ZONE_CHEST var/static/list/hover_overlays_cache = list() var/hovering @@ -517,8 +516,8 @@ if(isobserver(user)) return - if(choice != selecting) - selecting = choice + if(choice != hud.mymob.zone_selected) + hud.mymob.zone_selected = choice update_appearance(UPDATE_ICON) return 1 diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index dcc43cc9cd73..d89241338826 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -8,24 +8,23 @@ var/obj/item/pda/storedpda = null var/list/colorlist = list() - -/obj/machinery/pdapainter/update_icon(updates=ALL) +/obj/machinery/pdapainter/update_icon_state() . = ..() - cut_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 +/obj/machinery/pdapainter/update_overlays() + . = ..() + if(stat & BROKEN) + return + if(storedpda) + . += "[initial(icon_state)]-closed" /obj/machinery/pdapainter/Initialize(mapload) . = ..() diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index d02d6285ef82..7c1c68f09d8d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -69,7 +69,7 @@ available_treatments |= treatments[i] stasis = (I >= 4) -/obj/machinery/sleeper/update_icon(updates=ALL) +/obj/machinery/sleeper/update_icon_state() . = ..() if(state_open) icon_state = "[initial(icon_state)]-open" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f2ad12a1acce..ba0f0f41f2ec 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -760,15 +760,15 @@ /obj/machinery/door/airlock/do_animate(animation) switch(animation) if("opening") - update_icon(AIRLOCK_OPENING) + update_icon(state = AIRLOCK_OPENING) if("closing") - update_icon(AIRLOCK_CLOSING) + update_icon(state=AIRLOCK_CLOSING) if("deny") if(!stat) - update_icon(AIRLOCK_DENY) + update_icon(state = AIRLOCK_DENY) playsound(src,doorDeni,50,0,3) sleep(0.6 SECONDS) - update_icon(AIRLOCK_CLOSED) + update_icon(state = AIRLOCK_CLOSED) /obj/machinery/door/airlock/examine(mob/user) . = ..() @@ -1388,7 +1388,7 @@ if(welded) welded = !welded operating = TRUE - update_icon(AIRLOCK_OPENING, 1) + update_icon(state = AIRLOCK_OPENING, override = TRUE) sleep(0.1 SECONDS) set_opacity(0) update_freelook_sight() @@ -1398,7 +1398,7 @@ air_update_turf(1) sleep(0.1 SECONDS) layer = OPEN_DOOR_LAYER - update_icon(AIRLOCK_OPEN, 1) + update_icon(state = AIRLOCK_OPEN, override = TRUE) operating = FALSE if(delayed_close_requested) delayed_close_requested = FALSE @@ -1433,7 +1433,7 @@ SSexplosions.med_mov_atom += killthis operating = TRUE - update_icon(AIRLOCK_CLOSING, 1) + update_icon(state = AIRLOCK_CLOSING, override = TRUE) layer = CLOSED_DOOR_LAYER if(air_tight) density = TRUE @@ -1449,7 +1449,7 @@ set_opacity(1) update_freelook_sight() sleep(0.1 SECONDS) - update_icon(AIRLOCK_CLOSED, 1) + update_icon(state = AIRLOCK_CLOSED, override = TRUE) operating = FALSE delayed_close_requested = FALSE if(safe) @@ -1499,13 +1499,13 @@ /obj/machinery/door/airlock/emag_act(mob/user) if(!operating && density && hasPower() && !(obj_flags & EMAGGED)) operating = TRUE - update_icon(AIRLOCK_EMAG, 1) + update_icon(state = AIRLOCK_EMAG, override = TRUE) sleep(0.6 SECONDS) if(QDELETED(src)) return operating = FALSE if(!open()) - update_icon(AIRLOCK_CLOSED, 1) + update_icon(state = AIRLOCK_CLOSED, override = TRUE) obj_flags |= EMAGGED lights = FALSE locked = TRUE @@ -1809,7 +1809,7 @@ /obj/machinery/door/airlock/proc/blow_charge() panel_open = TRUE - update_icon(AIRLOCK_OPENING) + update_icon(state = 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/igniter.dm b/code/game/machinery/igniter.dm index b40419f65a57..e9238927e030 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -69,7 +69,7 @@ wires = new /datum/wires/igniter(src) icon_state = "igniter[on]" -/obj/machinery/igniter/update_icon(updates=ALL) +/obj/machinery/igniter/update_icon_state() . = ..() if(stat & NOPOWER) icon_state = "igniter0" diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 4c12ac77c90a..1c5e2c5b055c 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -49,7 +49,7 @@ update_appearance(UPDATE_ICON) // update the icon_state -/obj/machinery/magnetic_module/update_icon(updates=ALL) +/obj/machinery/magnetic_module/update_icon_state() . = ..() var/state="floor_magnet" var/onstate="" @@ -57,8 +57,9 @@ onstate="0" if(invisibility) - icon_state = "[state][onstate]-f" // if invisible, set icon to faded version - // in case of being revealed by T-scanner + // if invisible, set icon to faded version + // in case of being revealed by T-scanner + icon_state = "[state][onstate]-f" else icon_state = "[state][onstate]" diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index ab8abc026d10..d567f70eed7b 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(updates=ALL) +/obj/machinery/medical_kiosk/update_icon_state() . = ..() if(is_operational()) icon_state = "kiosk_off" diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index cecc67b290a9..6e14252d83cd 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -75,13 +75,14 @@ update_appearance(UPDATE_ICON) // update the icon_state -/obj/machinery/navbeacon/update_icon(updates=ALL) +/obj/machinery/navbeacon/update_icon_state() . = ..() - var/state="navbeacon[open]" + var/state = "navbeacon[open]" if(invisibility) - icon_state = "[state]-f" // if invisible, set icon to faded version - // in case revealed by T-scanner + // if invisible, set icon to faded version + // in case revealed by T-scanner + icon_state = "[state]-f" else icon_state = "[state]" diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 9f78a19cff83..51ea193c4cf4 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -226,9 +226,8 @@ GLOBAL_LIST_EMPTY(allCasters) picture = null return ..() -/obj/machinery/newscaster/update_icon(updates=ALL) +/obj/machinery/newscaster/update_icon_state() . = ..() - cut_overlays() if(stat & (NOPOWER|BROKEN)) icon_state = "newscaster_off" else @@ -236,18 +235,23 @@ GLOBAL_LIST_EMPTY(allCasters) icon_state = "newscaster_wanted" else icon_state = "newscaster_normal" - if(alert) - add_overlay("newscaster_alert") + +/obj/machinery/newscaster/update_overlays() + . = ..() var/hp_percent = obj_integrity * 100 /max_integrity switch(hp_percent) if(75 to 100) return if(50 to 75) - add_overlay("crack1") + . += "crack1" if(25 to 50) - add_overlay("crack2") + . += "crack2" else - add_overlay("crack3") + . += "crack3" + if(stat & (NOPOWER|BROKEN)) + return + if(alert) + . += "newscaster_alert" /obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() diff --git a/code/game/machinery/prisonlabor.dm b/code/game/machinery/prisonlabor.dm index f291787ede69..4c7180e2a558 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(updates=ALL) +/obj/machinery/plate_press/update_icon_state() . = ..() if(!is_operational()) icon_state = "offline" diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index c30851531cb4..6c393d6f367b 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -175,8 +175,8 @@ B.cell.charge = 0 -/obj/machinery/recharger/update_icon(updates=ALL) //we have an update_appearance(UPDATE_ICON) in addition to the stuff in process to make it feel a tiny bit snappier. - cut_overlays() +/obj/machinery/recharger/update_overlays() + . = ..() 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 +194,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 7f8ef2aece14..7ac13c1066ed 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -88,7 +88,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(updates=ALL) +/obj/machinery/recharge_station/update_icon_state() . = ..() if(is_operational()) if(state_open) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 48bb82bac77a..1611bef65ea3 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -71,7 +71,7 @@ playsound(src, "sparks", 75, TRUE, -1) to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) -/obj/machinery/recycler/update_icon(updates=ALL) +/obj/machinery/recycler/update_icon_state() . = ..() var/is_powered = !(stat & (BROKEN|NOPOWER)) if(safety_mode) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 41cd612a416e..94b7c67392f8 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -75,11 +75,14 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments) set_light(0) else set_light(1.4,0.7,"#34D352")//green light + +/obj/machinery/requests_console/update_icon_state() + . = ..() if(open) if(!hackState) - icon_state="req_comp_open" + icon_state = "req_comp_open" else - icon_state="req_comp_rewired" + icon_state = "req_comp_rewired" else if(stat & NOPOWER) if(icon_state != "req_comp_off") icon_state = "req_comp_off" diff --git a/code/game/machinery/sci_bombardment.dm b/code/game/machinery/sci_bombardment.dm index 8410e13f00b6..9eedf2ecaefa 100644 --- a/code/game/machinery/sci_bombardment.dm +++ b/code/game/machinery/sci_bombardment.dm @@ -59,19 +59,17 @@ QDEL_NULL(radio) return ..() -/obj/machinery/sci_bombardment/update_icon(updates=ALL) +/obj/machinery/sci_bombardment/update_overlays() . = ..() - cut_overlays() if(!powered(power_channel)) - add_overlay("LAM_radar0") + . += "LAM_radar0" set_light(0) else - add_overlay("LAM_screen[dest && !locked && !target_delay ? "Targ" : "Idle"]") - add_overlay("LAM_radar[target_delay || locked ? "0" : "1"]") + . += "LAM_screen[dest && !locked && !target_delay ? "Targ" : "Idle"]" + . += "LAM_radar[target_delay || locked ? "0" : "1"]" set_light(2) if(scibomb) - add_overlay("LAM_hatch") - return + . += "LAM_hatch" /obj/machinery/sci_bombardment/attackby(obj/item/transfer_valve/B, mob/user, params) if(istype(B, /obj/item/transfer_valve) && B.tank_one && B.tank_two) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index f01647435f57..b7d51370b98c 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -203,12 +203,12 @@ playsound(src, "sparks", 100, 1) to_chat(user, span_warning("You short out the access controller.")) -/obj/machinery/shieldgen/update_icon(updates=ALL) +/obj/machinery/shieldgen/update_icon_state() . = ..() if(active) - icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon" + icon_state = (stat & BROKEN) ? "shieldonbr" : "shieldon" else - icon_state = (stat & BROKEN) ? "shieldoffbr":"shieldoff" + icon_state = (stat & BROKEN) ? "shieldoffbr" : "shieldoff" #define ACTIVE_SETUPFIELDS 1 #define ACTIVE_HASFIELDS 2 diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 438eb61614ed..265fd3106a48 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -65,17 +65,14 @@ money += round(delta_time / 2) //SPESSH MAJICKS -/obj/machinery/computer/slot_machine/update_icon(updates=ALL) +/obj/machinery/computer/slot_machine/update_icon_state() . = ..() if(stat & NOPOWER) icon_state = "slots0" - else if(stat & BROKEN) icon_state = "slotsb" - else if(working) icon_state = "slots2" - else icon_state = "slots1" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 97aa6d149e5c..51d30bc7fd11 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -57,13 +57,14 @@ 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(updates=ALL) +/obj/machinery/space_heater/update_icon_state() . = ..() icon_state = "sheater-[on ? "[mode]" : "off"]" - cut_overlays() +/obj/machinery/space_heater/update_overlays() + . = ..() if(panel_open) - add_overlay("sheater-open") + . += "sheater-open" /obj/machinery/space_heater/process(delta_time) if(!on || stat & (BROKEN|MAINT)) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index b951a5c59700..712374081f32 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) @@ -120,7 +120,7 @@ addtimer(CALLBACK(src, PROC_REF(flash_end)), FLASH_LIGHT_DURATION, TIMER_OVERRIDE|TIMER_UNIQUE) times_used++ flash_recharge() - update_icon(TRUE) + update_icon(flash = TRUE) if(user && !clown_check(user)) return FALSE return TRUE @@ -173,7 +173,7 @@ var/mob/living/silicon/robot/R = M if(!R.sensor_protection) log_combat(user, R, "flashed", src) - update_icon(1) + update_icon(flash = TRUE) R.Paralyze(rand(80,120)) R.set_confusion_if_lower(5 SECONDS * CONFUSION_STACK_MAX_MULTIPLIER) R.flash_act(affect_silicon = 1) @@ -294,7 +294,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_icon(flash = TRUE) return TRUE diff --git a/code/modules/client/preferences/ghost.dm b/code/modules/client/preferences/ghost.dm index 442e8c8d789e..544346d34058 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_icon(ALL, 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..4dbaf236f073 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -338,7 +338,7 @@ /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.update_inv_glasses() //Color might have been changed by update_icon. ..() diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 48297c5499e0..a7af38a5fdce 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -105,7 +105,7 @@ /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.update_inv_head() //Color might have been changed by update_icon. ..() diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 6bb1beaa8b55..34ba105110a2 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.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)) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 30ba60f29546..c18680d16148 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) set_light_on(helmet_on) @@ -78,7 +78,7 @@ 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) /obj/item/clothing/head/helmet/space/plasmaman/update_icon(mob/living/carbon/human/user) if(!user) @@ -95,7 +95,7 @@ if(slot != ITEM_SLOT_HEAD) user.cut_overlay(helmet_mob_overlay) return - update_icon(user) + update_appearance(UPDATE_ICON) /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..b42eae418de3 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -217,7 +217,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_icon(new_state = "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 +239,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_icon(new_state = "alienh_leap", new_icon = 'icons/mob/alienleap.dmi', new_px = -32, new_py = -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_icon(new_state = "alienh_leap", new_icon = 'icons/mob/alienleap.dmi', new_px = -32, new_py = -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..2740d8c89b45 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_icon(new_form = preferred_form) updateghostimages() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 467e0b8987a3..12adf35f59db 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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/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) diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index 574f0a5bbf40..48999f3b2a07 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_icon(updates=ALL) + . = ..() + if(newdir == NORTH) + icon_state = "rust_walker_n" + else if(newdir == SOUTH) + icon_state = "rust_walker_s" + update_appearance(UPDATE_ICON) /mob/living/simple_animal/hostile/eldritch/rust_spirit/Moved() . = ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 12c2fda13881..ae9267b10791 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -676,13 +676,13 @@ /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_ICON) ///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(UPDATE_ICON) /** * 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..e62c604fd91f 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) ///Moves a mob upwards in z level /mob/verb/up() diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index f451e9b3128b..162f1775d5e6 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -22,7 +22,7 @@ default_unfasten_wrench(user, W, 0) else return ..() -/obj/machinery/the_singularitygen/update_icon(power) +/obj/machinery/the_singularitygen/update_icon(updates=ALL, power) if(power) if(power>150) animate(src, icon_state = "[initial(icon_state)]_3", 10) @@ -43,4 +43,4 @@ qdel(src) else energy -= delta_time * 0.5 - update_icon(energy) + update_icon(power = energy) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e77255d3dddf..cb928bdf0c5c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -643,7 +643,7 @@ attachment_overlays += M att_position += 1 - update_icon(TRUE) + update_appearance(UPDATE_ICON) 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 1fa4719ab9ab..83a610fb535d 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -156,7 +156,7 @@ 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) return /obj/item/gun/energy/update_icon(force_update) diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 6429a775012f..5608cc521927 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) 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/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index 436a065f0843..ccd49172f967 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -142,7 +142,7 @@ /obj/item/gun/syringe/blowgun/Initialize(mapload) . = ..() - update_icon() + update_appearance(UPDATE_ICON) chambered = new /obj/item/ammo_casing/blowgun(src) diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 0db2e85e71bd..b48a1295fcfb 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_icon(state=ALL, override=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_icon(state=ALL, override=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..d4e102afc784 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) var/icon/gun_icon = getFlatIcon(wep) var/list/details = list() From de0400b80400d9e7872fea73840285a5c4629f25 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 02:51:42 -0400 Subject: [PATCH 12/50] Mass replace update icon with update icon state/overlays --- code/game/machinery/camera/camera.dm | 3 +- code/game/machinery/camera/camera_assembly.dm | 2 +- code/game/machinery/computer/_computer.dm | 9 ++-- code/game/machinery/computer/aifixer.dm | 23 +++++----- code/game/machinery/computer/arcade.dm | 2 +- code/game/machinery/computer/atmos_alert.dm | 6 +-- code/game/machinery/computer/atmos_control.dm | 2 +- code/game/machinery/computer/camera.dm | 3 +- code/game/machinery/computer/station_alert.dm | 4 +- code/game/machinery/doors/brigdoors.dm | 22 +++++----- code/game/machinery/doors/door.dm | 2 +- code/game/machinery/doors/firedoor.dm | 21 +++++---- code/game/machinery/doors/passworddoor.dm | 2 +- code/game/machinery/doors/poddoor.dm | 2 +- code/game/machinery/doors/windowdoor.dm | 2 +- .../embedded_controller/access_controller.dm | 4 +- .../embedded_controller/airlock_controller.dm | 2 +- .../embedded_controller_base.dm | 2 - .../simple_vent_controller.dm | 2 +- .../machinery/porta_turret/portable_turret.dm | 43 +++++++++---------- code/game/machinery/stasis.dm | 20 +++++---- code/game/machinery/suit_storage_unit.dm | 21 +++++---- code/game/machinery/syndicatebomb.dm | 2 +- .../telecomms/machines/broadcaster.dm | 8 ++-- .../telecomms/machines/message_server.dm | 9 ++-- .../machinery/telecomms/telecomunications.dm | 21 +++++---- code/game/machinery/teleporter.dm | 4 +- code/game/machinery/transformer.dm | 2 +- code/game/machinery/washing_machine.dm | 8 ++-- code/game/mecha/mech_bay.dm | 4 +- code/game/mecha/mecha.dm | 2 +- code/game/mecha/working/ripley.dm | 14 +++--- .../effects/decals/cleanable/humans.dm | 9 ++-- .../temporary_visuals/miscellaneous.dm | 4 +- code/game/objects/items/RCD.dm | 7 ++- code/game/objects/items/RCL.dm | 4 +- code/game/objects/items/ashtray.dm | 7 ++- code/game/objects/items/candle.dm | 4 +- code/game/objects/items/cards_ids.dm | 5 +-- code/game/objects/items/chrono_eraser.dm | 5 +-- code/game/objects/items/cigs_lighters.dm | 10 ++--- code/game/objects/items/crayons.dm | 13 +++--- code/game/objects/items/credit_holochip.dm | 8 ++-- code/game/objects/items/defib.dm | 7 +-- code/game/objects/items/dice.dm | 5 +-- code/game/objects/items/discoball.dm | 5 +-- code/game/objects/items/etherealdiscoball.dm | 5 +-- code/game/objects/items/flamethrower.dm | 9 ++-- code/game/objects/items/handcuffs.dm | 2 +- code/game/objects/items/holy_weapons.dm | 2 +- code/game/objects/items/hot_potato.dm | 2 +- code/game/objects/items/hourglass.dm | 2 +- code/game/objects/items/inducer.dm | 7 ++- code/game/objects/items/laser_level.dm | 5 +-- code/game/objects/items/mail.dm | 2 +- code/game/objects/items/pinpointer.dm | 15 +++---- code/game/objects/items/pneumaticCannon.dm | 5 +-- code/game/objects/items/shields.dm | 2 +- code/game/objects/items/singularityhammer.dm | 4 +- code/game/objects/items/stunbaton.dm | 2 +- .../objects/items/supermatter_delaminator.dm | 4 +- .../objects/items/syndicateReverseCard.dm | 7 ++- code/game/objects/items/theft_tools.dm | 2 +- code/game/objects/items/toys.dm | 29 +++++++------ code/modules/religion/religion_structures.dm | 2 +- 65 files changed, 230 insertions(+), 244 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 1c278a55e234..ad099747c6d1 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_icon(updates=ALL) //TO-DO: Make panel open states, xray camera, and indicator lights overlays instead. +/obj/machinery/camera/update_icon_state() //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 87bd1edddc15..ffe3efbcf9b6 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -67,7 +67,7 @@ if(building) setDir(ndir) -/obj/structure/camera_assembly/update_icon(updates=ALL) +/obj/structure/camera_assembly/update_icon_state() . = ..() icon_state = "[xray_module ? "xray" : null][initial(icon_state)]" diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm index b3d7094dc4cb..a688376830fc 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -54,11 +54,10 @@ icon_state = initial(icon_state) update_appearance(UPDATE_ICON) -/obj/machinery/computer/update_icon(updates=ALL) +/obj/machinery/computer/update_overlays() . = ..() - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) //Prevents fuckery with subtypes that are meant to be pixel shifted or map shifted shit if(pixel_x == 0 && pixel_y == 0) // this bit of code makes the computer hug the wall its next to @@ -86,9 +85,9 @@ pixel_y = offet_matrix[2] if(stat & NOPOWER) - add_overlay("[icon_keyboard]_off") + . += "[icon_keyboard]_off" return - add_overlay(icon_keyboard) + . += icon_keyboard // This whole block lets screens ignore lighting and be visible even in the darkest room var/overlay_state = icon_screen diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 5c58e296dbf1..34ee8b08f8f7 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -77,21 +77,20 @@ if(oldstat != occupier.stat) update_appearance(UPDATE_ICON) -/obj/machinery/computer/aifixer/update_icon(updates=ALL) +/obj/machinery/computer/aifixer/update_overlays() . = ..() if(stat & (NOPOWER|BROKEN)) return - else - if(restoring) - add_overlay("ai-fixer-on") - if (occupier) - switch (occupier.stat) - if (0) - add_overlay("ai-fixer-full") - if (2) - add_overlay("ai-fixer-404") - else - add_overlay("ai-fixer-empty") + if(restoring) + . += "ai-fixer-on" + if(!occupier) + . += "ai-fixer-empty" + return + switch(occupier.stat) + if(0) + . += "ai-fixer-full" + if(2) + . += "ai-fixer-404" /obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card) if(!..()) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index c792dd3620bb..a5c7dea552ab 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(updates=ALL) +/obj/machinery/computer/arcade/update_icon_state() . = ..() if(dir == 2) icon_screen = "invaders" diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 732e6bfd0316..0a54ea2f031e 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -77,11 +77,11 @@ update_appearance(UPDATE_ICON) return -/obj/machinery/computer/atmos_alert/update_icon(updates=ALL) +/obj/machinery/computer/atmos_alert/update_overlays() . = ..() if(stat & (NOPOWER|BROKEN)) return if(priority_alarms.len) - add_overlay("alert:2") + . += "alert:2" else if(minor_alarms.len) - add_overlay("alert:1") + . += "alert:1" diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index cfba2bd58b8d..7474377cc462 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -42,7 +42,7 @@ name = "incinerator chamber gas sensor" id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR -/obj/machinery/air_sensor/update_icon(updates=ALL) +/obj/machinery/air_sensor/update_icon_state() . = ..() icon_state = "gsensor[on]" diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 6ef0348ea21f..43f22a4e2754 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -260,12 +260,11 @@ clockwork = TRUE //it'd look very weird light_power = 0 -/obj/machinery/computer/security/telescreen/update_icon(updates=ALL) +/obj/machinery/computer/security/telescreen/update_icon_state() . = ..() icon_state = initial(icon_state) if(stat & BROKEN) icon_state += "b" - return /obj/machinery/computer/security/telescreen/entertainment name = "entertainment monitor" diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 8b9fc1963c8e..1b203509452c 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(updates=ALL) +/obj/machinery/computer/station_alert/update_overlays() . = ..() if(stat & (NOPOWER|BROKEN)) return @@ -84,4 +84,4 @@ if(L.len) active_alarms = TRUE if(active_alarms) - add_overlay("alert:2") + . += "alert:2" diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 9b216e56452b..927f8d8b0971 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -316,12 +316,10 @@ // if timing=true, run update display function /obj/machinery/door_timer/update_icon(updates=ALL) . = ..() - if(stat & (NOPOWER)) - icon_state = "frame" + if(stat & BROKEN) return - - if(stat & (BROKEN)) - set_picture("ai_bsod") + if(stat & NOPOWER) + icon_state = "frame" return if(timing) @@ -331,16 +329,18 @@ if(length(disp2) > CHARS_PER_LINE) disp2 = "Error" update_display(disp1, disp2) - else - if(maptext) - maptext = "" + return + if(maptext) + maptext = "" // Adds an icon in case the screen is broken/off, stolen from status_display.dm -/obj/machinery/door_timer/proc/set_picture(state) +/obj/machinery/door_timer/update_overlays() + . = ..() + if(!(stat & BROKEN)) + return if(maptext) maptext = "" - cut_overlays() - add_overlay(mutable_appearance('icons/obj/status_display.dmi', state)) + . += mutable_appearance('icons/obj/status_display.dmi', state) //Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 6dbb75f60b31..b16722a44f26 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -294,7 +294,7 @@ /obj/machinery/door/proc/unelectrify() secondsElectrified = MACHINE_NOT_ELECTRIFIED -/obj/machinery/door/update_icon(updates=ALL) +/obj/machinery/door/update_icon_state() . = ..() if(density) icon_state = "door1" diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index edf1effbf1c0..329686d9fea2 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -215,18 +215,23 @@ if("closing") flick("door_closing", src) -/obj/machinery/door/firedoor/update_icon(updates=ALL) - cut_overlays() +/obj/machinery/door/firedoor/update_icon_state() + . = ..() if(density) icon_state = "door_closed" - if(welded) - add_overlay("welded") else icon_state = "door_open" - if(welded) - add_overlay("welded_open") SSdemo.mark_dirty(src) +/obj/machinery/door/firedoor/update_overlays() + . = ..() + if(!welded) + return + if(density) + . += "welded" + else + . += "welded_open" + /obj/machinery/door/firedoor/open() . = ..() latetoggle() @@ -472,8 +477,8 @@ 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(updates=ALL) - ..() +/obj/structure/firelock_frame/update_icon_state() + . = ..() icon_state = "frame[constructionStep]" /obj/structure/firelock_frame/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) diff --git a/code/game/machinery/doors/passworddoor.dm b/code/game/machinery/doors/passworddoor.dm index 54b3b3d4dacd..d91a9c9cfd38 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(updates=ALL) +/obj/machinery/door/password/update_icon_state() . = ..() if(density) icon_state = "closed" diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 9965fa29e7b6..8d5c39cf8c1e 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(updates=ALL) +/obj/machinery/door/poddoor/update_icon_state() . = ..() if(density) icon_state = "closed" diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index fcaa2fe9f0e5..834aa255a5e4 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -45,7 +45,7 @@ electronics = null return ..() -/obj/machinery/door/window/update_icon(updates=ALL) +/obj/machinery/door/window/update_icon_state() . = ..() if(density) icon_state = base_state diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 0ce9f901b360..1a2fb972d1d7 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -84,7 +84,7 @@ busy = FALSE update_appearance(UPDATE_ICON) -/obj/machinery/doorButtons/access_button/update_icon(updates=ALL) +/obj/machinery/doorButtons/access_button/update_icon_state() . = ..() if(stat & NOPOWER) icon_state = "access_button_off" @@ -244,7 +244,7 @@ else if(A.id_tag == idExterior) exteriorAirlock = A -/obj/machinery/doorButtons/airlock_controller/update_icon(updates=ALL) +/obj/machinery/doorButtons/airlock_controller/update_icon_state() . = ..() if(stat & NOPOWER) icon_state = "access_control_off" diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index 80adb9aaa755..04914bc41a3c 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(updates=ALL) +/obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state() . = ..() if(on && program) if(program.memory["processing"]) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 08d2f19ee8b9..4e4c42385a21 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -32,8 +32,6 @@ popup.set_content(return_text()) popup.open() -/obj/machinery/embedded_controller/update_icon(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/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index 75548575886a..a434f61b398b 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(updates=ALL) +/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon_state() . = ..() if(on && program) icon_state = "airlock_control_standby" diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 7dd03435c399..6b9caf3e6f9e 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -97,27 +97,25 @@ if(!has_cover) INVOKE_ASYNC(src, PROC_REF(popUp)) -/obj/machinery/porta_turret/update_icon(updates=ALL) +/obj/machinery/porta_turret/update_icon_state() . = ..() - cut_overlays() if(!anchored) icon_state = "turretCover" return if(stat & BROKEN) icon_state = "[base_icon_state]_broken" - else - if(powered()) - if(on && raised) - switch(mode) - if(TURRET_STUN) - icon_state = "[base_icon_state]_stun" - if(TURRET_LETHAL) - icon_state = "[base_icon_state]_lethal" - else - icon_state = "[base_icon_state]_off" - else - icon_state = "[base_icon_state]_unpowered" - + return + if(!powered()) + icon_state = "[base_icon_state]_unpowered" + return + if(!on || !raised) + icon_state = "[base_icon_state]_off" + return + switch(mode) + if(TURRET_STUN) + icon_state = "[base_icon_state]_stun" + if(TURRET_LETHAL) + icon_state = "[base_icon_state]_lethal" /obj/machinery/porta_turret/proc/setup(obj/item/gun/turret_gun) if(stored_gun) @@ -937,17 +935,18 @@ aTurret.setState(enabled, lethal) update_appearance(UPDATE_ICON) -/obj/machinery/turretid/update_icon(updates=ALL) +/obj/machinery/turretid/update_icon_state() . = ..() if(stat & NOPOWER) icon_state = "control_off" - else if (enabled) - if (lethal) - icon_state = "control_kill" - else - icon_state = "control_stun" - else + return + if(!enabled) icon_state = "control_standby" + return + if(lethal) + icon_state = "control_kill" + else + icon_state = "control_stun" /obj/item/wallframe/turret_control name = "turret control frame" diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index baaeb3bcaeb3..401360aa8d1b 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -109,7 +109,17 @@ /obj/machinery/stasis/proc/stasis_running() return stasis_enabled && is_operational() -/obj/machinery/stasis/update_icon(updates=ALL) +/obj/machinery/stasis/update_icon_state() + . = ..() + if(stat & BROKEN) + icon_state = "stasis_broken" + return + if(panel_open || stat & MAINT) + icon_state = "stasis_maintenance" + return + icon_state = "stasis" + +/obj/machinery/stasis/update_overlays() . = ..() var/_running = stasis_running() var/list/overlays_to_remove = managed_vis_overlays @@ -127,14 +137,6 @@ SSvis_overlays.remove_vis_overlay(src, overlays_to_remove) - if(stat & BROKEN) - icon_state = "stasis_broken" - return - if(panel_open || stat & MAINT) - icon_state = "stasis_maintenance" - return - icon_state = "stasis" - /obj/machinery/stasis/obj_break(damage_flag) . = ..() if(.) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 57f04afe1eb5..598c983ef600 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -144,30 +144,29 @@ QDEL_NULL(storage) return ..() -/obj/machinery/suit_storage_unit/update_icon(updates=ALL) +/obj/machinery/suit_storage_unit/update_overlays() . = ..() - cut_overlays() if(uv) if(uv_super) - add_overlay("super") + . += "super" else if(occupant) - add_overlay("uvhuman") + . += "uvhuman" else - add_overlay("uv") + . += "uv" else if(state_open) if(stat & BROKEN) - add_overlay("broken") + . += "broken" else - add_overlay("open") + . += "open" if(suit) - add_overlay("suit") + . += "suit" if(helmet) - add_overlay("helm") + . += "helm" if(storage) - add_overlay("storage") + . += "storage" else if(occupant) - add_overlay("human") + . += "human" /obj/machinery/suit_storage_unit/power_change() if(!is_operational() && state_open) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index b7c1a0c3eb0b..3799c63845e7 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -103,7 +103,7 @@ . = ..() . += {"A digital display on it reads "[seconds_remaining()]"."} -/obj/machinery/syndicatebomb/update_icon(updates=ALL) +/obj/machinery/syndicatebomb/update_icon_state() . = ..() icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm index 11594fd2a263..e3378014395a 100644 --- a/code/game/machinery/telecomms/machines/broadcaster.dm +++ b/code/game/machinery/telecomms/machines/broadcaster.dm @@ -57,17 +57,17 @@ 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(updates=ALL) // Special fuckery - cut_overlays() +/obj/machinery/telecomms/broadcaster/update_overlays() + . = ..() if(on) var/mutable_appearance/on_overlay = mutable_appearance(icon, on_icon, 0) - add_overlay(on_overlay) + . += on_overlay var/mutable_appearance/base_overlay if(panel_open) base_overlay = mutable_appearance(icon, "[initial(icon_state)]_o") else base_overlay = mutable_appearance(icon, initial(icon_state)) - add_overlay(base_overlay) + . += base_overlay /obj/machinery/telecomms/broadcaster/Destroy() // In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore. diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index bcdd2eaf0c6c..8678a0e9db3c 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -53,7 +53,7 @@ new /obj/effect/decal/cleanable/oil(loc) return ..() -/obj/machinery/blackbox_recorder/update_icon(updates=ALL) +/obj/machinery/blackbox_recorder/update_icon_state() . = ..() if(!stored) icon_state = "blackbox_b" @@ -157,14 +157,11 @@ if(!relay_information(signal, /obj/machinery/telecomms/hub)) relay_information(signal, /obj/machinery/telecomms/broadcaster) -/obj/machinery/telecomms/message_server/update_icon(updates=ALL) +/obj/machinery/telecomms/message_server/update_overlays() . = ..() - cut_overlays() if(calibrating && on) var/mutable_appearance/calibrate = mutable_appearance(icon, "message_server_disabled") - add_overlay(calibrate) - else if (!calibrating && on) - return ..() + . += calibrate // Root messaging signal datum diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 1777f32b66db..1883a21ee23f 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -120,21 +120,24 @@ GLOBAL_LIST_EMPTY(telecomms_list) T.links |= src -/obj/machinery/telecomms/update_icon(updates=ALL) +/obj/machinery/telecomms/update_icon_state() . = ..() - cut_overlays() - if(on) - var/mutable_appearance/on_overlay - if(on_icon) - on_overlay = mutable_appearance(icon, on_icon) - else - on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") - add_overlay(on_overlay) if(panel_open) icon_state = "[initial(icon_state)]_o" else icon_state = initial(icon_state) +/obj/machinery/telecomms/update_overlays() + . = ..() + if(!on) + return + var/mutable_appearance/on_overlay + if(on_icon) + on_overlay = mutable_appearance(icon, on_icon) + else + on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") + . += on_overlay + /obj/machinery/telecomms/proc/update_power() if(toggled) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1d44550334e0..2abfb2067a03 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -87,7 +87,7 @@ calibrated = 0 return -/obj/machinery/teleport/hub/update_icon(updates=ALL) +/obj/machinery/teleport/hub/update_icon_state() . = ..() if(panel_open) icon_state = "tele-o" @@ -218,7 +218,7 @@ if(teleporter_hub) teleporter_hub.update_appearance(UPDATE_ICON) -/obj/machinery/teleport/station/update_icon(updates=ALL) +/obj/machinery/teleport/station/update_icon_state() . = ..() if(panel_open) icon_state = "controller-o" diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 47e49818dff2..aeea168ec50d 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(updates=ALL) +/obj/machinery/transformer/update_icon_state() . = ..() 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 b26b1dacce4d..bc84eeb744a9 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -258,9 +258,8 @@ GLOBAL_LIST_INIT(dye_registry, list( add_fingerprint(user) open_machine() -/obj/machinery/washing_machine/update_icon(updates=ALL) +/obj/machinery/washing_machine/update_icon_state() . = ..() - cut_overlays() if(busy) icon_state = "wm_running_[bloody_mess]" else if(bloody_mess) @@ -268,8 +267,11 @@ GLOBAL_LIST_INIT(dye_registry, list( else var/full = contents.len ? 1 : 0 icon_state = "wm_[state_open]_[full]" + +/obj/machinery/washing_machine/update_overlays() + . = ..() if(panel_open) - add_overlay("wm_panel") + . += "wm_panel" /obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params) if(panel_open && !busy && default_unfasten_wrench(user, W)) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 87594863927f..68301e4458eb 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -138,11 +138,11 @@ else recharge_port = null -/obj/machinery/computer/mech_bay_power_console/update_icon(updates=ALL) +/obj/machinery/computer/mech_bay_power_console/update_overlays() . = ..() 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") + . += "recharge_comp_on" /obj/machinery/computer/mech_bay_power_console/Initialize(mapload) . = ..() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index c74ea54c3004..bb7e139b17ee 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -170,7 +170,7 @@ diag_hud_set_mechcell() diag_hud_set_mechstat() -/obj/mecha/update_icon(updates=ALL) +/obj/mecha/update_icon_state() . = ..() 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 4ea3c83a2e1c..cbcfe2425339 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -39,15 +39,15 @@ ..() update_appearance(UPDATE_ICON) -/obj/mecha/working/ripley/update_icon(updates=ALL) +/obj/mecha/working/ripley/update_overlays() . = ..() var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) - if (C.amount) - cut_overlays() - if(C.amount < 3) - add_overlay(occupant ? "ripley-g" : "ripley-g-open") - else - add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open") + if(!C || !C.amount) + return + if(C.amount < 3) + . += (occupant ? "ripley-g" : "ripley-g-open") + else + . += (occupant ? "ripley-g-full" : "ripley-g-full-open") /obj/mecha/working/ripley/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null) if (!enclosed) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index ea10fd0cf923..f248f581f5e2 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -225,23 +225,22 @@ update_appearance(UPDATE_ICON) -/obj/effect/decal/cleanable/blood/footprints/update_icon(updates=ALL) +/obj/effect/decal/cleanable/blood/footprints/update_overlays() . = ..() - cut_overlays() for(var/Ddir in GLOB.cardinals) if(entered_dirs & Ddir) var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] if(!bloodstep_overlay) GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]1", dir = Ddir) - add_overlay(bloodstep_overlay) + . += bloodstep_overlay if(exited_dirs & Ddir) var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] if(!bloodstep_overlay) GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]2", dir = Ddir) - add_overlay(bloodstep_overlay) + . += bloodstep_overlay - alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness + alpha = BLOODY_FOOTPRINT_BASE_ALPHA + bloodiness /obj/effect/decal/cleanable/blood/footprints/examine(mob/user) diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 53c64b8f0a78..24b09ed785c3 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -183,7 +183,7 @@ if(EAST) icon_state = "beam_splash_e" -/obj/item/projectile/curse_hand/update_icon(updates=ALL) +/obj/item/projectile/curse_hand/update_icon_state() . = ..() icon_state = "[icon_state][handedness]" @@ -537,7 +537,7 @@ else update_appearance(UPDATE_ICON) -/obj/effect/constructing_effect/update_icon(updates=ALL) +/obj/effect/constructing_effect/update_icon_state() . = ..() icon_state = "rcd" if (delay < 10) diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 3d7fb5a5d6f7..3c25133864f1 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -736,12 +736,11 @@ RLD explosion(src, 0, 0, 3, 1, flame_range = 1) qdel(src) -/obj/item/construction/rcd/update_icon(updates=ALL) +/obj/item/construction/rcd/update_overlays() . = ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) - cut_overlays() //To prevent infinite stacking of overlays - add_overlay("[icon_state]_charge[ratio]") + . += "[icon_state]_charge[ratio]" /obj/item/construction/rcd/Initialize(mapload) . = ..() @@ -875,7 +874,7 @@ RLD else ..() -/obj/item/construction/rld/update_icon(updates=ALL) +/obj/item/construction/rld/update_icon_state() . = ..() icon_state = "rld-[round(matter/35)]" diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index a40f5f1bf14f..c0a5aef6eaa9 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -90,7 +90,7 @@ QDEL_NULL(wiring_gui_menu) return ..() -/obj/item/twohanded/rcl/update_icon(updates=ALL) +/obj/item/twohanded/rcl/update_icon_state() . = ..() if(!loaded) icon_state = "rcl-0" @@ -316,7 +316,7 @@ name = "makeshift rapid cable layer" ghetto = TRUE -/obj/item/twohanded/rcl/ghetto/update_icon(updates=ALL) +/obj/item/twohanded/rcl/ghetto/update_icon_state() . = ..() if(!loaded) icon_state = "rclg-0" diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index ed5a4aec72ff..dfd0dda751d4 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -5,13 +5,12 @@ icon_state = "ashtray" var/max_butts = 10 -/obj/item/ashtray/update_icon(updates=ALL) +/obj/item/ashtray/update_overlays() . = ..() - overlays.Cut() if(contents.len == max_butts) - add_overlay(image('icons/obj/objects.dmi',"ashtray_full")) + . += image('icons/obj/objects.dmi', "ashtray_full") else if(contents.len >= max_butts * 0.5) - add_overlay(image('icons/obj/objects.dmi',"ashtray_half")) + . += image('icons/obj/objects.dmi', "ashtray_half") /obj/item/ashtray/attackby(obj/item/W, mob/user) if (user.a_intent == INTENT_HARM) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 9e30789111b3..6d67e937ec36 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -24,7 +24,7 @@ if(start_lit) light() -/obj/item/candle/update_icon(updates=ALL) +/obj/item/candle/update_icon_state() . = ..() icon_state = "candle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]" @@ -100,7 +100,7 @@ wax = 2000 candle_type = "resin" -/obj/item/candle/resin/update_icon(updates=ALL) +/obj/item/candle/resin/update_icon_state() . = ..() icon_state = "resincandle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]" diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 0197ac2b0fff..719f273890e3 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -40,14 +40,13 @@ .=..() update_appearance(UPDATE_ICON) -/obj/item/card/data/update_icon(updates=ALL) +/obj/item/card/data/update_overlays() . = ..() - cut_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." diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 38cc17bfee92..ad8095ffd4fb 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(mapload) + AddElement(/datum/element/update_icon_blocker) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHRONO_GUN_TRAIT) if(istype(loc, /obj/item/chrono_eraser)) @@ -65,10 +66,6 @@ TED = new(src.loc) return INITIALIZE_HINT_QDEL -/obj/item/gun/energy/chrono_gun/update_icon(updates=ALL) - . = ..() - 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) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 18a0b8e8ae08..9a53da7b8034 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -587,12 +587,11 @@ 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(updates=ALL) +/obj/item/lighter/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" - add_overlay(lighter_overlay) + . += lighter_overlay /obj/item/lighter/ignition_effect(atom/A, mob/user) if(is_hot()) @@ -722,13 +721,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM lighter_color = pick(color_list) update_appearance(UPDATE_ICON) -/obj/item/lighter/greyscale/update_icon(updates=ALL) +/obj/item/lighter/greyscale/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]") icon_state = "[initial(icon_state)][lit ? "-on" : ""]" lighter_overlay.color = lighter_color - add_overlay(lighter_overlay) + . += lighter_overlay /obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) if(is_hot()) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 13867edb9cb2..948defd3050f 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -550,11 +550,10 @@ new /obj/item/toy/crayon/black(src) update_appearance(UPDATE_ICON) -/obj/item/storage/crayons/update_icon(updates=ALL) +/obj/item/storage/crayons/update_overlays() . = ..() - cut_overlays() for(var/obj/item/toy/crayon/crayon in contents) - add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.crayon_color)) + . += mutable_appearance('icons/obj/crayons.dmi', crayon.crayon_color) /obj/item/storage/crayons/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/toy/crayon)) @@ -703,14 +702,16 @@ . = ..() -/obj/item/toy/crayon/spraycan/update_icon(updates=ALL) +/obj/item/toy/crayon/spraycan/update_icon_state() . = ..() icon_state = is_capped ? icon_capped : icon_uncapped + +/obj/item/toy/crayon/spraycan/update_overlays() + . = ..() if(use_overlays) - cut_overlays() var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]") spray_overlay.color = paint_color - add_overlay(spray_overlay) + . += spray_overlay /obj/item/toy/crayon/spraycan/attackby(obj/item/S,mob/user) if(S.is_sharp() || istype(S, /obj/item/screwdriver) || istype(S, /obj/item/surgicaldrill)) diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index a06718e09df1..61352b428502 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -22,7 +22,7 @@ /obj/item/holochip/get_item_credit_value() return credits -/obj/item/holochip/update_icon(updates=ALL) +/obj/item/holochip/update_icon_state() . = ..() name = "\improper [credits] credit holochip" var/rounded_credits = credits @@ -38,6 +38,9 @@ if(1000000000 to INFINITY) icon_state = "holochip_giga" rounded_credits = round(rounded_credits * 0.000000001) + +/obj/item/holochip/update_overlays() + . = ..() var/overlay_color = "#914792" switch(rounded_credits) if(0 to 4) @@ -56,10 +59,9 @@ overlay_color = "#0153C1" if(500 to INFINITY) overlay_color = "#2C2C2C" - cut_overlays() var/mutable_appearance/holochip_overlay = mutable_appearance('icons/obj/economy.dmi', "[icon_state]-color") holochip_overlay.color = overlay_color - add_overlay(holochip_overlay) + . += holochip_overlay /obj/item/holochip/proc/spend(amount, pay_anyway = FALSE) if(credits >= amount) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 7af93fd085b8..bb8c8bdbbf60 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -51,10 +51,6 @@ paddles.extinguish() /obj/item/defibrillator/update_icon(updates=ALL) - update_power() - return ..() - -/obj/item/defibrillator/proc/update_power() if(!QDELETED(cell)) if(QDELETED(paddles) || cell.charge < paddles.revivecost) powered = FALSE @@ -62,6 +58,7 @@ powered = TRUE else powered = FALSE + return ..() /obj/item/defibrillator/update_overlays() . = ..() @@ -359,7 +356,7 @@ busy = FALSE update_appearance(UPDATE_ICON) -/obj/item/twohanded/shockpaddles/update_icon(updates=ALL) +/obj/item/twohanded/shockpaddles/update_icon_state() . = ..() icon_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]" diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index fc42205394d5..3776d6dde260 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -208,10 +208,9 @@ 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(updates=ALL) +/obj/item/dice/update_overlays() . = ..() - cut_overlays() - add_overlay("[src.icon_state]-[src.result]") + . += "[src.icon_state]-[src.result]" /obj/item/dice/microwave_act(obj/machinery/microwave/M) if(microwave_riggable) diff --git a/code/game/objects/items/discoball.dm b/code/game/objects/items/discoball.dm index d35724a8a00b..26cbad379cf0 100644 --- a/code/game/objects/items/discoball.dm +++ b/code/game/objects/items/discoball.dm @@ -72,13 +72,12 @@ update_appearance(UPDATE_ICON) TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors -/obj/structure/discoball/update_icon(updates=ALL) +/obj/structure/discoball/update_overlays() . = ..() - cut_overlays() icon_state = "disco_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + . += base_overlay /obj/structure/discoball/wrench_act(mob/living/user, obj/item/I) . = ..() diff --git a/code/game/objects/items/etherealdiscoball.dm b/code/game/objects/items/etherealdiscoball.dm index df7e609215cd..5e85a324024a 100644 --- a/code/game/objects/items/etherealdiscoball.dm +++ b/code/game/objects/items/etherealdiscoball.dm @@ -65,10 +65,9 @@ update_appearance(UPDATE_ICON) TimerID = addtimer(CALLBACK(src, PROC_REF(DiscoFever)), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors -/obj/structure/etherealball/update_icon(updates=ALL) +/obj/structure/etherealball/update_overlays() . = ..() - cut_overlays() icon_state = "ethdisco_head_[TurnedOn]" var/mutable_appearance/base_overlay = mutable_appearance(icon, "ethdisco_base") base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + . += base_overlay diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 16db8231e2a5..995890827d1e 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -54,15 +54,14 @@ igniter.flamethrower_process(location) -/obj/item/flamethrower/update_icon(updates=ALL) +/obj/item/flamethrower/update_overlays() . = ..() - cut_overlays() if(igniter) - add_overlay("+igniter[status]") + . += "+igniter[status]" if(ptank) - add_overlay("+ptank") + . += "+ptank" if(lit) - add_overlay("+lit") + . += "+lit" item_state = "flamethrower_1" else item_state = "flamethrower_0" diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 05f9080ae1c9..bf0a765fc311 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -266,7 +266,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/restraints/legcuffs/beartrap/update_icon(updates=ALL) +/obj/item/restraints/legcuffs/beartrap/update_icon_state() . = ..() icon_state = "[initial(icon_state)][armed]" diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 10cd08ea8e55..553178a463ac 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -513,7 +513,7 @@ playsound(user, 'sound/items/sheath.ogg', 25, TRUE) update_appearance(UPDATE_ICON) -/obj/item/nullrod/dualsword/update_icon(updates=ALL) +/obj/item/nullrod/dualsword/update_icon_state() . = ..() item_state = swords ? "fulldual" : "emptydual" icon_state = item_state diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm index c033174d2c63..ed27fd0b054a 100644 --- a/code/game/objects/items/hot_potato.dm +++ b/code/game/objects/items/hot_potato.dm @@ -157,7 +157,7 @@ colorize(null) active = FALSE -/obj/item/hot_potato/update_icon(updates=ALL) +/obj/item/hot_potato/update_icon_state() . = ..() icon_state = "[initial(icon_state)]" + "[active ? "_active" : ""]" diff --git a/code/game/objects/items/hourglass.dm b/code/game/objects/items/hourglass.dm index 4e1eefb28c8b..f19defba2757 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(updates=ALL) +/obj/item/hourglass/update_icon_state() . = ..() if(timing_id) icon_state = "hourglass_active" diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index 6e90966b932a..d9f86a626614 100644 --- a/code/game/objects/items/inducer.dm +++ b/code/game/objects/items/inducer.dm @@ -194,14 +194,13 @@ if(opened) . += span_notice("Its battery compartment is open.") -/obj/item/inducer/update_icon(updates=ALL) +/obj/item/inducer/update_overlays() . = ..() - cut_overlays() if(opened) if(!cell) - add_overlay("inducer-nobat") + . += "inducer-nobat" else - add_overlay("inducer-bat") + . += "inducer-bat" /obj/item/inducer/sci icon_state = "inducer-sci" diff --git a/code/game/objects/items/laser_level.dm b/code/game/objects/items/laser_level.dm index e2632c042721..12c163ac72b0 100644 --- a/code/game/objects/items/laser_level.dm +++ b/code/game/objects/items/laser_level.dm @@ -29,10 +29,9 @@ update_appearance(UPDATE_ICON) update_overlay(user) -/obj/item/laserlevel/update_icon(updates=ALL) +/obj/item/laserlevel/update_overlays() . = ..() - cut_overlays() - add_overlay("[initial(icon_state)][lightlevel]") + . += "[initial(icon_state)][lightlevel]" /obj/item/laserlevel/proc/update_overlay(mob/user) user.clear_fullscreen("laser",0) diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index e8066981d2e9..c25aaaaeadb7 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -217,7 +217,7 @@ desc = "A certified post crate from CentCom." icon_state = "mail" -/obj/structure/closet/crate/mail/update_icon(updates=ALL) +/obj/structure/closet/crate/mail/update_icon_state() . = ..() if(opened) icon_state = "[initial(icon_state)]open" diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index 4d6f64e9e3cd..af4075932534 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -54,30 +54,29 @@ /obj/item/pinpointer/proc/scan_for_target() return -/obj/item/pinpointer/update_icon(updates=ALL) +/obj/item/pinpointer/update_overlays() . = ..() - cut_overlays() if(!active) return if(!target) - add_overlay("pinon[alert ? "alert" : ""]null") + . += "pinon[alert ? "alert" : ""]null" return var/turf/here = get_turf_global(src) // yogs - replace get_turf with get_turf_global var/turf/there = get_turf_global(target) // yogs - replace get_turf with get_turf_global if(here.z != there.z) - add_overlay("pinon[alert ? "alert" : ""]null") + . += "pinon[alert ? "alert" : ""]null" return if(get_dist_euclidian(here,there) <= minimum_range) - add_overlay("pinon[alert ? "alert" : ""]direct") + . += "pinon[alert ? "alert" : ""]direct" else setDir(get_dir(here, there)) switch(get_dist(here, there)) if(1 to 8) - add_overlay("pinon[alert ? "alert" : "close"]") + . += "pinon[alert ? "alert" : "close"]" if(9 to 16) - add_overlay("pinon[alert ? "alert" : "medium"]") + . += "pinon[alert ? "alert" : "medium"]" if(16 to INFINITY) - add_overlay("pinon[alert ? "alert" : "far"]") + . += "pinon[alert ? "alert" : "far"]" /obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles name = "crew pinpointer" diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index a878d06733c1..90ee810c3345 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -252,12 +252,11 @@ tank = thetank update_appearance(UPDATE_ICON) -/obj/item/pneumatic_cannon/update_icon(updates=ALL) +/obj/item/pneumatic_cannon/update_overlays() . = ..() - cut_overlays() if(!tank) return - add_overlay(tank.icon_state) + . += tank.icon_state /obj/item/pneumatic_cannon/proc/fill_with_type(type, amount) if(!ispath(type, /obj) && !ispath(type, /mob)) diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index aa76df7536e7..1cc2cec7b237 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -192,7 +192,7 @@ embedded_flash.emp_act(severity) update_appearance(UPDATE_ICON) -/obj/item/shield/riot/flash/update_icon(updates=ALL) +/obj/item/shield/riot/flash/update_icon_state() . = ..() if(!embedded_flash || embedded_flash.burnt_out) icon_state = "riot" diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 97688897e5e4..9da50a34615f 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(updates=ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/singularityhammer/update_icon_state() //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(updates=ALL) //Currently only here to fuck with the on-mob icons. +/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" return diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index d59da31c60c6..4679f40530b6 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -102,7 +102,7 @@ STOP_PROCESSING(SSobj, src) // no more charge? stop checking for discharge -/obj/item/melee/baton/update_icon(updates=ALL) +/obj/item/melee/baton/update_icon_state() . = ..() if(status) icon_state = "[initial(icon_state)]_active" diff --git a/code/game/objects/items/supermatter_delaminator.dm b/code/game/objects/items/supermatter_delaminator.dm index 9ae2374228f8..368b366bc4e2 100644 --- a/code/game/objects/items/supermatter_delaminator.dm +++ b/code/game/objects/items/supermatter_delaminator.dm @@ -138,7 +138,7 @@ seal() to_chat(user, span_warning("[user] seals the [src].")) -/obj/item/antinoblium_container/update_icon(updates=ALL) +/obj/item/antinoblium_container/update_icon_state() . = ..() if(sealed) icon_state = "antinoblium_container_sealed" @@ -161,7 +161,7 @@ QDEL_NULL(shard) return ..() -/obj/item/hemostat/antinoblium/update_icon(updates=ALL) +/obj/item/hemostat/antinoblium/update_icon_state() . = ..() if(shard) icon_state = "antinoblium_tongs_loaded" diff --git a/code/game/objects/items/syndicateReverseCard.dm b/code/game/objects/items/syndicateReverseCard.dm index 0ea8f9ab93e8..0b6b33eb017a 100644 --- a/code/game/objects/items/syndicateReverseCard.dm +++ b/code/game/objects/items/syndicateReverseCard.dm @@ -14,11 +14,10 @@ name = "[cardColor] Reverse" icon_state = "sc_[cardColor] Reverse_uno" -/obj/item/syndicateReverseCard/update_icon(updates=ALL) +/obj/item/syndicateReverseCard/update_overlays() . = ..() - if (used) - cut_overlays() - add_overlay(image('icons/obj/toy.dmi', icon_state = "reverse_overlay")) + if(used) + . += image('icons/obj/toy.dmi', icon_state = "reverse_overlay") /obj/item/syndicateReverseCard/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(!(attack_type == PROJECTILE_ATTACK)) diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 69b6092b201e..5b0fc36a9f7a 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -223,7 +223,7 @@ QDEL_NULL(sliver) return ..() -/obj/item/hemostat/supermatter/update_icon(updates=ALL) +/obj/item/hemostat/supermatter/update_icon_state() . = ..() if(sliver) icon_state = "supermatter_tongs_loaded" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index a37bb98c1219..0bb57cb68396 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -104,7 +104,7 @@ icon_state = "burst" qdel(src) -/obj/item/toy/balloon/update_icon(updates=ALL) +/obj/item/toy/balloon/update_icon_state() . = ..() if(src.reagents.total_volume >= 1) icon_state = "waterballoon" @@ -240,9 +240,9 @@ materials = list(/datum/material/iron=10, /datum/material/glass=10) var/amount_left = 7 -/obj/item/toy/ammo/gun/update_icon(updates=ALL) +/obj/item/toy/ammo/gun/update_icon_state() . = ..() - src.icon_state = text("357OLD-[]", src.amount_left) + icon_state = text("357OLD-[]", amount_left) /obj/item/toy/ammo/gun/examine(mob/user) . = ..() @@ -410,7 +410,7 @@ icon_state = "vxtvul_hammer_pirate0-0" update_appearance(UPDATE_ICON) -/obj/item/twohanded/vxtvulhammer/toy/update_icon(updates=ALL) +/obj/item/twohanded/vxtvulhammer/toy/update_icon_state() . = ..() if(!pirated) icon_state = "vxtvul_hammer_pirate[wielded]-[supercharged]" @@ -809,7 +809,7 @@ drawsize=clamp(drawsize,1,min(cards.len,10)) draw_card(L,drawsize) -/obj/item/toy/cards/deck/update_icon(updates=ALL) +/obj/item/toy/cards/deck/update_icon_state() . = ..() if(cards.len > 26) icon_state = "deck_[deckstyle]_full" @@ -982,20 +982,21 @@ . = ..() . += "This hand has [currenthand.len] cards in it." -/obj/item/toy/cards/cardhand/update_icon(updates=ALL) +/obj/item/toy/cards/cardhand/update_icon_state() . = ..() - if(src.currenthand.len > 4) - src.icon_state = "[deckstyle]_hand5" + if(currenthand.len > 4) + icon_state = "[deckstyle]_hand5" else - src.icon_state = "[deckstyle]_hand[currenthand.len]" - //radial menu stuff - cut_overlays() + icon_state = "[deckstyle]_hand[currenthand.len]" + +/obj/item/toy/cards/cardhand/update_overlays() + . = ..() var/overlay_cards = currenthand.len var/k = overlay_cards == 2 ? 1 : overlay_cards - 2 for(var/i = k; i <= overlay_cards; i++) var/card_overlay = image(icon=src.icon,icon_state="sc_[currenthand[i]]_[deckstyle]",pixel_x=(1-i+k)*3,pixel_y=(1-i+k)*3) - add_overlay(card_overlay) + . += card_overlay /obj/item/toy/cards/singlecard name = "card" @@ -1147,7 +1148,7 @@ cards += "Wildcard" cards += "Wild Draw Four" -/obj/item/toy/cards/deck/uno/update_icon(updates=ALL) +/obj/item/toy/cards/deck/uno/update_icon_state() . = ..() if(cards.len > 54) icon_state = "deck_[deckstyle]_full" @@ -1688,7 +1689,7 @@ obj/item/toy/turn_tracker book_open = !book_open update_appearance(UPDATE_ICON) -/obj/item/toy/eldritch_book/update_icon(updates=ALL) +/obj/item/toy/eldritch_book/update_icon_state() . = ..() icon_state = book_open ? "book_open" : "book" diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm index 86e92e4b4d23..8a0879a510bd 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -68,7 +68,7 @@ addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), time_between_uses) -/obj/structure/holyfountain/update_icon(updates=ALL) +/obj/structure/holyfountain/update_icon_state() . = ..() if(last_process + time_between_uses > world.time) icon_state = "fountain" From a56ad40079a35ef8651b8fb3da9b73fd1e40cc97 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 02:57:20 -0400 Subject: [PATCH 13/50] compile --- code/game/machinery/doors/brigdoors.dm | 2 +- code/game/objects/items/credit_holochip.dm | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 927f8d8b0971..83cf0ff55639 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -340,7 +340,7 @@ return if(maptext) maptext = "" - . += mutable_appearance('icons/obj/status_display.dmi', state) + . += mutable_appearance('icons/obj/status_display.dmi', "ai_bsod") //Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index 61352b428502..d5602eba6f80 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -22,7 +22,7 @@ /obj/item/holochip/get_item_credit_value() return credits -/obj/item/holochip/update_icon_state() +/obj/item/holochip/update_icon(updates=ALL) . = ..() name = "\improper [credits] credit holochip" var/rounded_credits = credits @@ -38,9 +38,6 @@ if(1000000000 to INFINITY) icon_state = "holochip_giga" rounded_credits = round(rounded_credits * 0.000000001) - -/obj/item/holochip/update_overlays() - . = ..() var/overlay_color = "#914792" switch(rounded_credits) if(0 to 4) From 3ae6c3d8434ca89acad4937f826bd9f65fa38984 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:36:54 -0400 Subject: [PATCH 14/50] push my work so far --- code/game/objects/items/devices/PDA/PDA.dm | 13 ++-- code/game/objects/items/devices/aicard.dm | 17 +++-- code/game/objects/items/devices/flashlight.dm | 22 +++--- .../objects/items/devices/geiger_counter.dm | 6 +- .../objects/items/devices/lightreplacer.dm | 2 +- code/game/objects/items/devices/megaphone.dm | 5 +- code/game/objects/items/devices/multitool.dm | 2 +- code/game/objects/items/devices/powersink.dm | 2 +- .../objects/items/devices/quantum_keycard.dm | 2 +- .../objects/items/devices/taperecorder.dm | 2 +- .../objects/items/devices/transfer_valve.dm | 12 ++-- .../granters/martial_arts/plasma_fist.dm | 19 +++-- .../granters/martial_arts/sleeping_carp.dm | 18 +++-- code/game/objects/items/grenades/plastic.dm | 2 +- .../objects/items/implants/implantchair.dm | 9 +-- code/game/objects/items/implants/implanter.dm | 2 +- .../game/objects/items/implants/implantpad.dm | 2 +- code/game/objects/items/melee/misc.dm | 5 +- code/game/objects/items/robot/robot_items.dm | 4 +- code/game/objects/items/robot/robot_parts.dm | 15 ++-- .../objects/items/robot/robot_upgrades.dm | 5 +- .../objects/items/stacks/license_plates.dm | 2 +- code/game/objects/items/stacks/medical.dm | 6 +- code/game/objects/items/stacks/rods.dm | 2 +- code/game/objects/items/stacks/stack.dm | 4 +- code/game/objects/items/stacks/tickets.dm | 2 +- code/game/objects/items/storage/bags.dm | 10 +-- code/game/objects/items/storage/belt.dm | 5 +- code/game/objects/items/storage/boxes.dm | 7 +- code/game/objects/items/storage/fancy.dm | 70 +++++++++---------- code/game/objects/items/storage/toolbox.dm | 5 +- code/game/objects/items/storage/wallets.dm | 9 ++- code/game/objects/items/tanks/jetpack.dm | 14 ++-- 33 files changed, 164 insertions(+), 138 deletions(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 219fe8d1b084..51edcb5d3e2f 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -197,27 +197,26 @@ GLOBAL_LIST_EMPTY(PDAs) return TRUE return FALSE -/obj/item/pda/update_icon(updates=ALL) +/obj/item/pda/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/overlay = new() overlay.pixel_x = overlays_x_offset if(id) overlay.icon_state = "id_overlay" - add_overlay(new /mutable_appearance(overlay)) + . += new /mutable_appearance(overlay) if(inserted_item) overlay.icon_state = "insert_overlay" - add_overlay(new /mutable_appearance(overlay)) + . += new /mutable_appearance(overlay) if(light_on) overlay.icon_state = "light_overlay" - add_overlay(new /mutable_appearance(overlay)) + . += new /mutable_appearance(overlay) if(pai) if(pai.pai) overlay.icon_state = "pai_overlay" - add_overlay(new /mutable_appearance(overlay)) + . += new /mutable_appearance(overlay) else overlay.icon_state = "pai_off_overlay" - add_overlay(new /mutable_appearance(overlay)) + . += new /mutable_appearance(overlay) /obj/item/pda/MouseDrop(mob/over, src_location, over_location) var/mob/M = usr diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index de7373a868ba..46ff45536454 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -40,20 +40,27 @@ log_combat(user, AI, "carded", src) update_appearance(UPDATE_ICON) //Whatever happened, update the card's state (icon, name) to match. -/obj/item/aicard/update_icon(updates=ALL) +/obj/item/aicard/update_name(updates) . = ..() - cut_overlays() if(AI) name = "[initial(name)] - [AI.name]" + else + name = initial(name) + +/obj/item/aicard/update_overlays() + . = ..() + if(AI && !AI.control_disabled) + . += "[initial(icon_state)]-on" + +/obj/item/aicard/update_icon_state() + . = ..() + if(AI) 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) icon_state = initial(icon_state) /obj/item/aicard/ui_state(mob/user) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index b3c923b9524a..e880044dcf34 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -538,21 +538,27 @@ /obj/item/flashlight/glowstick/update_icon(updates=ALL) . = ..() - item_state = "glowstick" - cut_overlays() if(fuel <= 0) - icon_state = "glowstick-empty" - cut_overlays() set_light_on(FALSE) else if(on) + set_light_on(TRUE) + +/obj/item/flashlight/glowstick/update_overlays() + . = ..() + if(on) var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow") glowstick_overlay.color = color - add_overlay(glowstick_overlay) - item_state = "glowstick-on" - set_light_on(TRUE) + . += glowstick_overlay + +/obj/item/flashlight/glowstick/update_icon_state() + . = ..() + item_state = "glowstick" //item state + if(fuel <= 0) + icon_state = "glowstick-empty" + else if(on) + item_state = "glowstick-on" //item state else icon_state = "glowstick" - cut_overlays() /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 dda2a31f9e74..215a06b610be 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -78,14 +78,14 @@ . += span_notice("The last radiation amount detected was [last_tick_amount]") -/obj/item/geiger_counter/update_icon(updates=ALL) +/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" diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 24eb9a93e843..4c550782183d 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(updates=ALL) +/obj/item/lightreplacer/update_icon_state() . = ..() icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 1a2fddb5c0ea..7e06311398d4 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -46,15 +46,14 @@ addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), recharge_time) return TRUE -/obj/item/megaphone/update_icon(updates=ALL) +/obj/item/megaphone/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/base_overlay if(last_used > world.time) base_overlay = mutable_appearance(icon, "megaphone_recharging") else base_overlay = mutable_appearance(icon, "megaphone_charged") - add_overlay(base_overlay) + . += base_overlay /obj/item/megaphone/proc/handle_speech(mob/living/carbon/user, list/speech_args) if (user.get_active_held_item() == src) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 5eda5888dd8e..7f47eed73f26 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(updates=ALL) +/obj/item/multitool/ai_detect/update_icon_state() . = ..() icon_state = "[initial(icon_state)][detect_state]" diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 561d58433616..7135a929bc4e 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(updates=ALL) +/obj/item/powersink/update_icon_state() . = ..() icon_state = "powersink[mode == OPERATING]" diff --git a/code/game/objects/items/devices/quantum_keycard.dm b/code/game/objects/items/devices/quantum_keycard.dm index 92e1ff5deb01..a31246a01542 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(updates=ALL) +/obj/item/quantum_keycard/update_icon_state() . = ..() if(qpad) icon_state = "quantum_keycard_on" diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 272cf3ddf1ba..cafa41b6cf9a 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -103,7 +103,7 @@ eject(usr) -/obj/item/taperecorder/update_icon(updates=ALL) +/obj/item/taperecorder/update_icon_state() . = ..() if(!mytape) icon_state = "taperecorder_empty" diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index f41f32d3a7b0..8848dd0e2f28 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -96,17 +96,17 @@ /obj/item/transfer_valve/proc/toggle_off() toggle = TRUE -/obj/item/transfer_valve/update_icon(updates=ALL) +/obj/item/transfer_valve/update_icon_state() . = ..() - cut_overlays() - if(!tank_one && !tank_two && !attached_device) icon_state = "valve_1" return icon_state = "valve" +/obj/item/transfer_valve/update_overlays() + . = ..() if(tank_one) - add_overlay("[tank_one.icon_state]") + . += "[tank_one.icon_state]" if(tank_two) var/mutable_appearance/J = mutable_appearance(icon, icon_state = "[tank_two.icon_state]") var/matrix/T = matrix() @@ -116,11 +116,11 @@ else underlays = null if(attached_device) - add_overlay("device") + . += "device" if(istype(attached_device, /obj/item/assembly/infra)) var/obj/item/assembly/infra/sensor = attached_device if(sensor.on && sensor.visible) - add_overlay("proxy_beam") + . += "proxy_beam" /obj/item/transfer_valve/proc/merge_gases(datum/gas_mixture/target, change_volume = TRUE) var/target_self = FALSE 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 856e5ea66376..6b6da336c4de 100644 --- a/code/game/objects/items/granters/martial_arts/plasma_fist.dm +++ b/code/game/objects/items/granters/martial_arts/plasma_fist.dm @@ -18,19 +18,30 @@ /obj/item/book/granter/martial/plasma_fist/on_reading_finished(mob/living/carbon/user) . = ..() - update_appearance(UPDATE_ICON) + update_appearance() -/obj/item/book/granter/martial/plasma_fist/update_icon(updates=ALL) +/obj/item/book/granter/martial/plasma_fist/update_name(updates) . = ..() if(uses <= 0) name = "empty scroll" - desc = "It's completely blank." - icon_state = "blankscroll" else name = initial(name) + +/obj/item/book/granter/martial/plasma_fist/update_desc(updates) + . = ..() + if(uses <= 0) + desc = "It's completely blank." + else desc = initial(desc) + +/obj/item/book/granter/martial/plasma_fist/update_icon_state() + . = ..() + if(uses <= 0) + icon_state = "blankscroll" + else icon_state = initial(icon_state) + /*/obj/item/book/granter/martial/plasma_fist/nobomb martial = /datum/martial_art/plasma_fist/nobomb */ 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 5f8a32215505..0858bb834de3 100644 --- a/code/game/objects/items/granters/martial_arts/sleeping_carp.dm +++ b/code/game/objects/items/granters/martial_arts/sleeping_carp.dm @@ -21,15 +21,25 @@ /obj/item/book/granter/martial/carp/on_reading_finished(mob/living/carbon/user) . = ..() - update_appearance(UPDATE_ICON) + update_appearance() -/obj/item/book/granter/martial/carp/update_icon(updates) +/obj/item/book/granter/martial/carp/update_name(updates) . = ..() if(!uses) name = "empty scroll" - desc = "It's completely blank." - icon_state = "blankscroll" else name = initial(name) + +/obj/item/book/granter/martial/carp/update_desc(updates) + . = ..() + if(!uses) + desc = "It's completely blank." + else desc = initial(desc) + +/obj/item/book/granter/martial/carp/update_icon_state() + . = ..() + if(!uses) + icon_state = "blankscroll" + else icon_state = initial(icon_state) diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 38bf7e2bd3d7..04edfd4d7ab9 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -167,7 +167,7 @@ user.gib(1, 1) qdel(src) -/obj/item/grenade/plastic/update_icon(updates=ALL) +/obj/item/grenade/plastic/update_icon_state() . = ..() if(nadeassembly) icon_state = "[item_state]1" diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 7d9be4626039..df97c796fc88 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -99,17 +99,18 @@ visible_message(span_warning("[M] has been implanted by [src].")) return TRUE -/obj/machinery/implantchair/update_icon(updates=ALL) +/obj/machinery/implantchair/update_icon_state() . = ..() icon_state = initial(icon_state) if(state_open) icon_state += "_open" if(occupant) icon_state += "_occupied" + +/obj/machinery/implantchair/update_overlays() + . = ..() if(ready) - add_overlay("ready") - else - cut_overlays() + . += "ready" /obj/machinery/implantchair/proc/replenish() if(ready_implants < max_implants) diff --git a/code/game/objects/items/implants/implanter.dm b/code/game/objects/items/implants/implanter.dm index 4efe3267bfe4..7d02ebbdb4fb 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(updates=ALL) +/obj/item/implanter/update_icon_state() . = ..() if(imp) icon_state = "implanter1" diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index 7969f898eead..a2d6659f7981 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(updates=ALL) +/obj/item/implantpad/update_icon_state() . = ..() icon_state = "implantpad-[!QDELETED(case)]" diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 98a08193b6f3..795f7a26cb9f 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -737,12 +737,11 @@ held_sausage = null update_appearance(UPDATE_ICON) -/obj/item/melee/roastingstick/update_icon(updates=ALL) +/obj/item/melee/roastingstick/update_overlays() . = ..() - cut_overlays() if (held_sausage) var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage") - add_overlay(sausage) + . += sausage /obj/item/melee/roastingstick/proc/extend(user) to_chat(user, "You extend [src].") diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index caf5a990c7ee..865d6704136a 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -177,7 +177,7 @@ var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port)) var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy)) -/obj/item/borg/charger/update_icon(updates=ALL) +/obj/item/borg/charger/update_icon_state() . = ..() icon_state = "charger_[mode]" @@ -608,7 +608,7 @@ update_appearance(UPDATE_ICON) to_chat(user, span_boldnotice("You [active? "activate":"deactivate"] [src].")) -/obj/item/borg/projectile_dampen/update_icon(updates=ALL) +/obj/item/borg/projectile_dampen/update_icon_state() . = ..() icon_state = "[initial(icon_state)][active]" diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index bba7cf456488..e336c45e4fce 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -51,21 +51,20 @@ chest.wired = TRUE chest.cell = new /obj/item/stock_parts/cell/high/plus(chest) -/obj/item/robot_suit/update_icon(updates=ALL) +/obj/item/robot_suit/update_overlays() . = ..() - cut_overlays() if(l_arm) - add_overlay("[l_arm.icon_state]+o") + . += "[l_arm.icon_state]+o" if(r_arm) - add_overlay("[r_arm.icon_state]+o") + . += "[r_arm.icon_state]+o" if(chest) - add_overlay("[chest.icon_state]+o") + . += "[chest.icon_state]+o" if(l_leg) - add_overlay("[l_leg.icon_state]+o") + . += "[l_leg.icon_state]+o" if(r_leg) - add_overlay("[r_leg.icon_state]+o") + . += "[r_leg.icon_state]+o" if(head) - add_overlay("[head.icon_state]+o") + . += "[head.icon_state]+o" /obj/item/robot_suit/proc/check_completion() if(src.l_arm && src.r_arm) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index bf77acf0a988..9ce8a8d008d6 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -454,12 +454,11 @@ STOP_PROCESSING(SSobj, src) update_appearance(UPDATE_ICON) -/obj/item/borg/upgrade/selfrepair/update_icon(updates=ALL) +/obj/item/borg/upgrade/selfrepair/update_icon_state() . = ..() if(cyborg) icon_state = "selfrepair_[on ? "on" : "off"]" - for(var/X in actions) - var/datum/action/A = X + for(var/datum/action/A as anything in actions) A.build_all_button_icons() else icon_state = "cyborg_upgrade5" diff --git a/code/game/objects/items/stacks/license_plates.dm b/code/game/objects/items/stacks/license_plates.dm index 8c9b3b94e31f..ece53770f9fa 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(updates=ALL) +/obj/item/stack/license_plates/filled/update_icon_state() . = ..() if(novariants) return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 11083bcbfd47..ae2d4fe26b62 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -362,10 +362,10 @@ is_open = FALSE update_appearance(UPDATE_ICON) -/obj/item/stack/medical/mesh/update_icon(updates=ALL) +/obj/item/stack/medical/mesh/update_icon_state() . = ..() if(is_open) - return ..() + return icon_state = "regen_mesh_closed" /obj/item/stack/medical/mesh/heal(mob/living/M, mob/user) @@ -418,7 +418,7 @@ flesh_regeneration = 3.5 grind_results = list(/datum/reagent/consumable/aloejuice = 1) -/obj/item/stack/medical/mesh/advanced/update_icon(updates=ALL) +/obj/item/stack/medical/mesh/advanced/update_icon_state() . = ..() if(is_open) return diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index d096c3a2a055..8f16951dd3a2 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ recipes = GLOB.rod_recipes update_appearance(UPDATE_ICON) -/obj/item/stack/rods/update_icon(updates=ALL) +/obj/item/stack/rods/update_icon_state() . = ..() var/amount = get_amount() if((amount <= 5) && (amount > 0)) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 6eaab252f8c7..74258fa79e39 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -74,10 +74,10 @@ else w_class = full_w_class -/obj/item/stack/update_icon(updates=ALL) +/obj/item/stack/update_icon_state() . = ..() if(novariants) - return ..() + return if(amount <= (max_amount * (1/3))) icon_state = initial(icon_state) else if (amount <= (max_amount * (2/3))) diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm index 02f0faebb2ad..3b36bf43f4db 100644 --- a/code/game/objects/items/stacks/tickets.dm +++ b/code/game/objects/items/stacks/tickets.dm @@ -12,7 +12,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/stack/arcadeticket/update_icon(updates=ALL) +/obj/item/stack/arcadeticket/update_icon_state() . = ..() var/amount = get_amount() if((amount >= 12) && (amount > 0)) diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 71ecddb82d21..80edf3c998ad 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(updates=ALL) +/obj/item/storage/bag/trash/update_icon_state() . = ..() //yogs start if(icon_state == "[initial(icon_state)]_broken") @@ -67,7 +67,8 @@ icon_state = "[initial(icon_state)]1" else if(contents.len < 21) icon_state = "[initial(icon_state)]2" - else icon_state = "[initial(icon_state)]3" + else + icon_state = "[initial(icon_state)]3" /obj/item/storage/bag/trash/cyborg insertable = FALSE @@ -385,11 +386,10 @@ M.Paralyze(40) update_appearance(UPDATE_ICON) -/obj/item/storage/bag/tray/update_icon(updates=ALL) +/obj/item/storage/bag/tray/update_overlays() . = ..() - cut_overlays() for(var/obj/item/I in contents) - add_overlay(new /mutable_appearance(I)) + . += new /mutable_appearance(I) /obj/item/storage/bag/tray/Entered() . = ..() diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index e8b99a0ffb88..0bbd2b60ea96 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -17,13 +17,12 @@ 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(updates=ALL) +/obj/item/storage/belt/update_overlays() . = ..() - cut_overlays() if(content_overlays) for(var/obj/item/I in contents) var/mutable_appearance/M = I.get_belt_overlay() - add_overlay(M) + . += M /obj/item/storage/belt/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index ab28b67f6e74..3a648bcf24f4 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -49,11 +49,10 @@ 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(updates=ALL) +/obj/item/storage/box/update_overlays() . = ..() if(illustration) - cut_overlays() - add_overlay(illustration) + . += illustration /obj/item/storage/box/attack_self(mob/user) ..() @@ -984,7 +983,7 @@ foldable = null var/design = NODESIGN -/obj/item/storage/box/papersack/update_icon(updates=ALL) +/obj/item/storage/box/papersack/update_icon_state() . = ..() if(contents.len == 0) icon_state = "[item_state]" diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 01f501ddebdc..974649eb50e8 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(updates=ALL) +/obj/item/storage/box/fancy/update_icon_state() . = ..() if(fancy_open) icon_state = "[icon_type]box[contents.len]" @@ -197,31 +197,28 @@ else to_chat(user, span_notice("There are no [icon_type]s left in the pack.")) -/obj/item/storage/box/fancy/cigarettes/update_icon(updates=ALL) +/obj/item/storage/box/fancy/cigarettes/update_overlays() . = ..() - if(fancy_open || !contents.len) - cut_overlays() - if(!contents.len) - icon_state = "[initial(icon_state)]_empty" - else - icon_state = initial(icon_state) - add_overlay("[icon_state]_open") - var/cig_position = 1 - for(var/C in contents) - var/mutable_appearance/inserted_overlay = mutable_appearance(icon) - - if(istype(C, /obj/item/lighter/greyscale)) - inserted_overlay.icon_state = "lighter_in" - else if(istype(C, /obj/item/lighter)) - inserted_overlay.icon_state = "zippo_in" - else - inserted_overlay.icon_state = "cigarette" - - inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]" - add_overlay(inserted_overlay) - cig_position++ + if(!fancy_open && contents.len) + return + if(!contents.len) + icon_state = "[initial(icon_state)]_empty" else - cut_overlays() + icon_state = initial(icon_state) + . += "[icon_state]_open" + var/cig_position = 1 + + for(var/C in contents) + var/mutable_appearance/inserted_overlay = mutable_appearance(icon) + if(istype(C, /obj/item/lighter/greyscale)) + inserted_overlay.icon_state = "lighter_in" + else if(istype(C, /obj/item/lighter)) + inserted_overlay.icon_state = "zippo_in" + else + inserted_overlay.icon_state = "cigarette" + inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]" + . += inserted_overlay + cig_position++ /obj/item/storage/box/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!ismob(M)) @@ -378,11 +375,10 @@ for(var/i in 1 to 10) new /obj/item/rollingpaper(src) -/obj/item/storage/box/fancy/rollingpapers/update_icon(updates=ALL) +/obj/item/storage/box/fancy/rollingpapers/update_overlays() . = ..() - cut_overlays() if(!contents.len) - add_overlay("[icon_state]_empty") + . += "[icon_state]_empty" ///////////// //CIGAR BOX// @@ -407,21 +403,23 @@ for(var/i in 1 to 5) new /obj/item/clothing/mask/cigarette/cigar(src) -/obj/item/storage/box/fancy/cigarettes/cigars/update_icon(updates=ALL) +/obj/item/storage/box/fancy/cigarettes/cigars/update_icon_state() . = ..() - cut_overlays() if(fancy_open) icon_state = "[initial(icon_state)]_open" - - var/cigar_position = 1 //generate sprites for cigars in the box - for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents) - var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]") - add_overlay(cigar_overlay) - cigar_position++ - else icon_state = "[initial(icon_state)]" +/obj/item/storage/box/fancy/cigarettes/cigars/update_overlays() + . = ..() + if(!fancy_open) + return + var/cigar_position = 1 //generate sprites for cigars in the box + for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents) + var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]") + . += cigar_overlay + cigar_position++ + /obj/item/storage/box/fancy/cigarettes/cigars/cohiba name = "\improper Cohiba Robusto cigar case" desc = "A case of imported Cohiba cigars, renowned for their strong flavor. The warning label states that the cigar is extremely potent." diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 3dbc8072f82a..2e49805d3f78 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -30,11 +30,10 @@ latches = "triple_latch" update_appearance(UPDATE_ICON) -/obj/item/storage/toolbox/update_icon(updates=ALL) +/obj/item/storage/toolbox/update_overlays() . = ..() - cut_overlays() if(has_latches) - add_overlay(latches) + . += latches /obj/item/storage/toolbox/suicide_act(mob/user) diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 3190b821b880..ec0e96cd02a6 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -61,13 +61,12 @@ . = ..() refreshID() -/obj/item/storage/wallet/update_icon(updates=ALL) +/obj/item/storage/wallet/update_icon_state() . = ..() - var/new_state = "wallet" if(front_id) - new_state = "wallet_[front_id.icon_state]" - if(new_state != icon_state) //avoid so many icon state changes. - icon_state = new_state + icon_state = "wallet_[front_id.icon_state]" + return + icon_state = "wallet" /obj/item/storage/wallet/GetID() return front_id diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index 6eb3436d6007..53ead5abe5ef 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -60,15 +60,17 @@ 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(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" - else //or does it use the classic overlay - cut_overlays() - if(on) - add_overlay("on_overlay") + else + icon_state = initial(icon_state) + +/obj/item/tank/jetpack/update_overlays() + . = ..() + if(classic && on) + . += "on_overlay" /obj/item/tank/jetpack/proc/turn_off(mob/user) on = FALSE From ea3050958d6eafb305f701acd718e41546baa777 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:02:39 -0400 Subject: [PATCH 15/50] goes back on things I broke --- code/game/machinery/doors/airlock.dm | 187 ++++++++++++--------- code/game/objects/items/credit_holochip.dm | 5 +- code/modules/power/apc.dm | 2 +- 3 files changed, 108 insertions(+), 86 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index ba0f0f41f2ec..839940874d01 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -606,7 +606,7 @@ else return FALSE -/obj/machinery/door/airlock/update_icon(updates=ALL, state=0, override=FALSE) +/obj/machinery/door/airlock/update_icon(updates=ALL, state=0, override=0) if(operating && !override) return @@ -626,99 +626,118 @@ if(AIRLOCK_DENY, AIRLOCK_OPENING, AIRLOCK_CLOSING, AIRLOCK_EMAG) icon_state = "nonexistenticonstate" //MADNESS -/obj/machinery/door/airlock/update_overlays() - . = ..() - - var/frame_state - var/light_state - switch(airlock_state) - if(AIRLOCK_CLOSED) - frame_state = AIRLOCK_FRAME_CLOSED - if(locked) - light_state = AIRLOCK_LIGHT_BOLTS - else if(emergency) - light_state = AIRLOCK_LIGHT_EMERGENCY - if(AIRLOCK_DENY) - frame_state = AIRLOCK_FRAME_CLOSED - light_state = AIRLOCK_LIGHT_DENIED - if(AIRLOCK_EMAG) - frame_state = AIRLOCK_FRAME_CLOSED - if(AIRLOCK_CLOSING) - frame_state = AIRLOCK_FRAME_CLOSING - light_state = AIRLOCK_LIGHT_CLOSING - if(AIRLOCK_OPEN) - frame_state = AIRLOCK_FRAME_OPEN - if(AIRLOCK_OPENING) - frame_state = AIRLOCK_FRAME_OPENING - light_state = AIRLOCK_LIGHT_OPENING - - . += get_airlock_overlay(frame_state, icon) +/obj/machinery/door/airlock/proc/set_side_overlays(obj/effect/overlay/airlock_part/base, show_lights = FALSE) + var/side = base.side_id + base.icon = icon + base.cut_overlays() if(airlock_material) - . += get_airlock_overlay("[airlock_material]_[frame_state]", overlays_file) + base.add_overlay(get_airlock_overlay("[airlock_material]_[side]", overlays_file)) else - . += get_airlock_overlay("fill_[frame_state]", icon) + base.add_overlay(get_airlock_overlay("fill_[side]", icon)) + if(panel_open && panel_attachment == side) + if(security_level) + base.add_overlay(get_airlock_overlay("panel_closed_protected", overlays_file)) + else + base.add_overlay(get_airlock_overlay("panel_closed", overlays_file)) + if(show_lights && lights && hasPower()) + base.add_overlay(get_airlock_overlay("lights_[side]", overlays_file)) - if(lights && hasPower()) - . += get_airlock_overlay("lights_[light_state]", overlays_file) + if(note && note_attachment == side) + var/notetype = note_type() + base.add_overlay(get_airlock_overlay(notetype, note_overlay_file)) - if(panel_open) - . += get_airlock_overlay("panel_[frame_state][security_level ? "_protected" : null]", overlays_file) - if(frame_state == AIRLOCK_FRAME_CLOSED && welded) - . += get_airlock_overlay("welded", overlays_file) +/obj/machinery/door/airlock/update_overlays() + . = ..() + for(var/obj/effect/overlay/airlock_part/part as anything in part_overlays) + set_side_overlays(part, airlock_state == AIRLOCK_CLOSING || airlock_state == AIRLOCK_OPENING) + if(part.aperture_angle) + var/matrix/T + if(airlock_state == AIRLOCK_OPEN || airlock_state == AIRLOCK_OPENING || airlock_state == AIRLOCK_CLOSING) + T = matrix() + T.Translate(-part.open_px,-part.open_py) + T.Turn(part.aperture_angle) + T.Translate(part.open_px,part.open_py) + switch(airlock_state) + if(AIRLOCK_CLOSED, AIRLOCK_DENY, AIRLOCK_EMAG) + part.transform = matrix() + if(AIRLOCK_OPEN) + part.transform = T + if(AIRLOCK_CLOSING) + part.transform = T + animate(part, transform = T, time = 0.5 SECONDS - part.move_end_time, flags = ANIMATION_LINEAR_TRANSFORM) + animate(transform = matrix(), time = part.move_end_time - part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) + if(AIRLOCK_OPENING) + part.transform = matrix() + animate(part, transform = matrix(), time = part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) + animate(transform = T, time = part.move_end_time - part.move_start_time, flags = ANIMATION_LINEAR_TRANSFORM) + else + switch(airlock_state) + if(AIRLOCK_CLOSED, AIRLOCK_DENY, AIRLOCK_EMAG) + part.pixel_x = 0 + part.pixel_y = 0 + if(AIRLOCK_OPEN) + part.pixel_x = part.open_px + part.pixel_y = part.open_py + if(AIRLOCK_CLOSING) + part.pixel_x = part.open_px + part.pixel_y = part.open_py + animate(part, pixel_x = part.open_px, pixel_y = part.open_py, time = 0.5 SECONDS - part.move_end_time) + animate(pixel_x = 0, pixel_y = 0, time = part.move_end_time - part.move_start_time) + if(AIRLOCK_OPENING) + part.pixel_x = 0 + part.pixel_y = 0 + animate(part, pixel_x = 0, pixel_y = 0, time = part.move_start_time) + animate(pixel_x = part.open_px, pixel_y = part.open_py, time = part.move_end_time - part.move_start_time) + + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + SSvis_overlays.add_vis_overlay(src, overlays_file, "frame", FLOAT_LAYER, FLOAT_PLANE, dir) - if(airlock_state == AIRLOCK_EMAG) - . += get_airlock_overlay("sparks", overlays_file) + switch(airlock_state) + if(AIRLOCK_CLOSED) + if(lights && hasPower()) + if(locked) + SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_bolts", FLOAT_LAYER, FLOAT_PLANE, dir) + else if(emergency) + SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_emergency", FLOAT_LAYER, FLOAT_PLANE, dir) + if(welded) + SSvis_overlays.add_vis_overlay(src, overlays_file, "welded", FLOAT_LAYER, FLOAT_PLANE, dir) + if(obj_integrity Date: Wed, 12 Jul 2023 18:02:20 -0400 Subject: [PATCH 16/50] a --- code/__DEFINES/flags.dm | 4 ++ code/game/objects/items/tanks/tanks.dm | 7 ++- code/game/objects/items/tools/screwdriver.dm | 5 +- code/game/objects/items/tools/weldingtool.dm | 23 ++++----- code/game/objects/items/tools/wirecutters.dm | 5 +- code/game/objects/items/twohanded.dm | 1 + code/game/objects/structures/aliens.dm | 2 +- code/game/objects/structures/artstuff.dm | 16 +++---- code/game/objects/structures/bedsheet_bin.dm | 2 +- .../structures/crates_lockers/closets.dm | 44 ++++++++--------- .../structures/crates_lockers/crates.dm | 7 +-- code/game/objects/structures/displaycase.dm | 3 +- code/game/objects/structures/divine.dm | 2 +- code/game/objects/structures/door_assembly.dm | 9 ++-- code/game/objects/structures/extinguisher.dm | 2 +- code/game/objects/structures/false_walls.dm | 3 +- code/game/objects/structures/fireaxe.dm | 47 +++++++++---------- code/game/objects/structures/fireplace.dm | 15 +++--- code/game/objects/structures/guncase.dm | 9 ++-- code/game/objects/structures/headpike.dm | 11 +++-- code/game/objects/structures/holosign.dm | 2 +- code/game/objects/structures/janicart.dm | 24 +++++----- code/game/objects/structures/ladders.dm | 7 +-- code/game/objects/structures/life_candle.dm | 2 +- code/game/objects/structures/mineral_doors.dm | 2 +- code/game/objects/structures/mop_bucket.dm | 7 ++- code/game/objects/structures/morgue.dm | 4 +- code/game/objects/structures/safe.dm | 2 +- code/game/objects/structures/shower.dm | 5 +- code/game/objects/structures/stairs.dm | 2 +- .../game/objects/structures/tank_dispenser.dm | 11 ++--- code/game/objects/structures/watercloset.dm | 4 +- .../objects/structures/windoor_assembly.dm | 2 +- code/game/objects/structures/window.dm | 23 ++++++--- 34 files changed, 157 insertions(+), 157 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 04d435f54ddb..d04a6c5c5a82 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -81,6 +81,10 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #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) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 05e38a20e687..951f8a27fb6a 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -313,13 +313,12 @@ // ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ---------- -/obj/item/tank/update_icon(updates=ALL) +/obj/item/tank/update_overlays() . = ..() - cut_overlays() if(tank_assembly) - add_overlay(tank_assembly.icon_state) + . += tank_assembly.icon_state copy_overlays(tank_assembly) - add_overlay("bomb_assembly") + . += "bomb_assembly" /obj/item/tank/wrench_act(mob/living/user, obj/item/I) if(tank_assembly) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 4cbba3c3c472..2db3040fec34 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -48,14 +48,13 @@ if(prob(75)) pixel_y = rand(0, 16) -/obj/item/screwdriver/update_icon(updates=ALL) +/obj/item/screwdriver/update_overlays() . = ..() if(!random_color) //icon override return - cut_overlays() var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits") base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + . += base_overlay /obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file) . = list() diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 5b901dee2655..1a3b98762402 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -48,24 +48,21 @@ reagents.add_reagent(/datum/reagent/fuel, max_fuel) update_appearance(UPDATE_ICON) - -/obj/item/weldingtool/proc/update_torch() - if(welding) - add_overlay("[initial(icon_state)]-on") - item_state = "[initial(item_state)]1" - else - item_state = "[initial(item_state)]" - - -/obj/item/weldingtool/update_icon(updates=ALL) +/obj/item/weldingtool/update_overlays() . = ..() - cut_overlays() if(change_icons) var/ratio = get_fuel() / max_fuel ratio = CEILING(ratio*4, 1) * 25 - add_overlay("[initial(icon_state)][ratio]") - update_torch() + . += "[initial(icon_state)][ratio]" + if(welding) + . += "[initial(icon_state)]-on" +/obj/item/weldingtool/update_icon_state() + . = ..() + if(welding) + item_state = "[initial(item_state)]1" + else + item_state = "[initial(item_state)]" /obj/item/weldingtool/process(delta_time) switch(welding) diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index cb01578e97b2..71ef647c6171 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -42,14 +42,13 @@ add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY) update_appearance(UPDATE_ICON) -/obj/item/wirecutters/update_icon(updates=ALL) +/obj/item/wirecutters/update_overlays() . = ..() if(!random_color) //icon override return - cut_overlays() var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy") base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + . += base_overlay /obj/item/wirecutters/attack(mob/living/carbon/C, mob/user) if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index a3d59a6fb1d1..f64b9c69dac9 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -287,6 +287,7 @@ force_wielded = 18 /obj/item/twohanded/fireaxe/metal_h2_axe/update_icon(updates=ALL) //Currently only here to fuck with the on-mob icons. + . = ..() icon_state = "metalh2_axe[wielded]" return diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 620c9f0a80fd..7b301ddadc60 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -238,7 +238,7 @@ if(status == BURST) obj_integrity = integrity_failure -/obj/structure/alien/egg/update_icon(updates=ALL) +/obj/structure/alien/egg/update_icon_state() . = ..() switch(status) if(GROWING) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 2586deeda6f9..ae769d5ddf8f 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -132,20 +132,19 @@ generate_proper_overlay() try_rename(user) -/obj/item/canvas/update_icon(updates=ALL) +/obj/item/canvas/update_overlays() . = ..() - cut_overlays() if(!icon_generated) if(used) var/mutable_appearance/detail = mutable_appearance(icon,"[icon_state]wip") detail.pixel_x = 1 detail.pixel_y = 1 - add_overlay(detail) + . += detail else var/mutable_appearance/detail = mutable_appearance(generated_icon) detail.pixel_x = 1 detail.pixel_y = 1 - add_overlay(detail) + . += detail /obj/item/canvas/proc/generate_proper_overlay() if(icon_generated) @@ -297,7 +296,7 @@ if(C.painting_name == initial(C.painting_name)) C.try_rename(user) -/obj/structure/sign/painting/update_icon(updates=ALL) +/obj/structure/sign/painting/update_icon_state() . = ..() if(C && C.generated_icon) @@ -305,16 +304,17 @@ else icon_state = "frame-empty" - cut_overlays() +/obj/structure/sign/painting/update_overlays() + . = ..() if(C && C.generated_icon) var/mutable_appearance/MA = mutable_appearance(C.generated_icon) MA.pixel_x = C.framed_offset_x MA.pixel_y = C.framed_offset_y - add_overlay(MA) + . += MA var/mutable_appearance/frame = mutable_appearance(C.icon,"[C.icon_state]frame") frame.pixel_x = C.framed_offset_x - 1 frame.pixel_y = C.framed_offset_y - 1 - add_overlay(frame) + . += frame /** * Loads a painting from SSpersistence. Called globally by said subsystem when it inits diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 5c5cebf9683f..0368ea11cc23 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(updates=ALL) +/obj/structure/bedsheetbin/update_icon_state() . = ..() switch(amount) if(0) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index b0e91c7bd1af..d20a88cf3c18 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -78,31 +78,31 @@ GLOBAL_LIST_EMPTY(lockers) GLOB.lockers -= src return ..() -/obj/structure/closet/update_icon(updates=ALL) +/obj/structure/closet/update_overlays() . = ..() - 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") - - else + if(opened) layer = BELOW_OBJ_LAYER - if(!is_animating_door) - if(icon_door_override) - add_overlay("[icon_door]_open") + if(is_animating_door) + return + if(icon_door_override) + . += "[icon_door]_open" + else + . += "[icon_state]_open" + return + + layer = OBJ_LAYER + if(!is_animating_door) + if(icon_door) + . += "[icon_door]_door" + else + . += "[icon_state]_door" + if(welded) + . += icon_welded + if(secure && !broken) + if(locked) + . += "locked" else - add_overlay("[icon_state]_open") + . += "unlocked" /obj/structure/closet/proc/animate_door(closing = FALSE) if(!door_anim_time) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 7993fdc36118..9162f6c2e6fd 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -35,13 +35,14 @@ if(!locatedcrate.opened) //otherwise, if the located crate is closed, allow entering return TRUE -/obj/structure/closet/crate/update_icon(updates=ALL) +/obj/structure/closet/crate/update_icon_state() . = ..() icon_state = "[initial(icon_state)][opened ? "open" : ""]" - cut_overlays() +/obj/structure/closet/crate/update_overlays() + . = ..() if(manifest) - add_overlay("manifest") + . += "manifest" /obj/structure/closet/crate/attack_hand(mob/user) . = ..() diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 1d8475e52b77..e63ce8f2dc56 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -98,8 +98,7 @@ var/icon/S = getFlatIcon(showpiece) S.Scale(17,17) I.Blend(S,ICON_UNDERLAY,8,8) - src.icon = I - return + icon = I /obj/structure/displaycase/attackby(obj/item/W, mob/user, params) if(W.GetID() && !broken && openable) diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index ee7ea814b8a8..a8d9d31e8380 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -44,7 +44,7 @@ addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), time_between_uses) -/obj/structure/healingfountain/update_icon(updates=ALL) +/obj/structure/healingfountain/update_icon_state() . = ..() if(last_process + time_between_uses > world.time) icon_state = "fountain" diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index a3e2addb7676..26ffaa271b51 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -260,14 +260,13 @@ return ..() update_appearance() -/obj/structure/door_assembly/update_icon(updates=ALL) +/obj/structure/door_assembly/update_overlays() . = ..() - cut_overlays() if(!glass) - add_overlay(get_airlock_overlay("fill_construction", icon)) + . += 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("glass_construction", overlays_file) + . += get_airlock_overlay("panel_c[state+1]", overlays_file) /obj/structure/door_assembly/update_name(updates=ALL) . = ..() diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 4c3e74295a34..0717cf5c51ed 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -120,7 +120,7 @@ opened = !opened update_appearance(UPDATE_ICON) -/obj/structure/extinguisher_cabinet/update_icon(updates=ALL) +/obj/structure/extinguisher_cabinet/update_icon_state() . = ..() if(!opened) icon_state = "extinguisher_closed" diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 97c5303a09d6..874b1a6c51a8 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -70,7 +70,8 @@ update_appearance(UPDATE_ICON) air_update_turf(TRUE) -/obj/structure/falsewall/update_icon(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_icon_state() + . = ..() 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 2c7453df1cdd..a36e98b7b8e4 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -194,35 +194,34 @@ toggle_open()//yogs - consolidates opening code return -/obj/structure/fireaxecabinet/update_icon(updates=ALL) +/obj/structure/fireaxecabinet/update_overlays() . = ..() - cut_overlays() if(fireaxe) - add_overlay("axe") + . += "axe" if(spareid) - add_overlay("card") + . += "card" if(olreliable) - add_overlay("rod") - if(!open) - var/hp_percent = obj_integrity/max_integrity * 100 - if(broken) - add_overlay("glass4") - else - switch(hp_percent) - if(-INFINITY to 40) - add_overlay("glass3") - if(40 to 60) - add_overlay("glass2") - if(60 to 80) - add_overlay("glass1") - if(80 to INFINITY) - add_overlay("glass") - if(locked) - add_overlay("locked") - else - add_overlay("unlocked") + . += "rod" + if(open) + . += "glass_raised" + return + var/hp_percent = obj_integrity/max_integrity * 100 + if(broken) + . += "glass4" + else + switch(hp_percent) + if(-INFINITY to 40) + . += "glass3" + if(40 to 60) + . += "glass2" + if(60 to 80) + . += "glass1" + if(80 to INFINITY) + . += "glass" + if(locked) + . += "locked" else - add_overlay("glass_raised") + . += "unlocked" //yogs NOTICE - toggle_lock() function MIRRORED to yogstation/code/game/objects/structure/fireaxe.dm //changes made to the below function will have no effect diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index 16511808dffd..ae050322af49 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -69,22 +69,21 @@ else . = ..() -/obj/structure/fireplace/update_icon(updates=ALL) +/obj/structure/fireplace/update_overlays() . = ..() - cut_overlays() if(lit) switch(burn_time_remaining()) if(0 to 500) - add_overlay("fireplace_fire0") + . += "fireplace_fire0" if(500 to 1000) - add_overlay("fireplace_fire1") + . += "fireplace_fire1" if(1000 to 1500) - add_overlay("fireplace_fire2") + . += "fireplace_fire2" if(1500 to 2000) - add_overlay("fireplace_fire3") + . += "fireplace_fire3" if(2000 to MAXIMUM_BURN_TIMER) - add_overlay("fireplace_fire4") - add_overlay("fireplace_glow") + . += "fireplace_fire4" + . += "fireplace_glow" /obj/structure/fireplace/proc/adjust_light() if(!lit) diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index a18b95f09b25..5f457d0d66c4 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -22,18 +22,17 @@ update_appearance(UPDATE_ICON) return ..() -/obj/structure/guncase/update_icon(updates=ALL) +/obj/structure/guncase/update_overlays() . = ..() - cut_overlays() if(case_type && LAZYLEN(contents)) var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type) for(var/i in 1 to contents.len) gun_overlay.pixel_x = 3 * (i - 1) - add_overlay(gun_overlay) + . += gun_overlay if(open) - add_overlay("[icon_state]_open") + . += "[icon_state]_open" else - add_overlay("[icon_state]_door") + . += "[icon_state]_door" /obj/structure/guncase/attackby(obj/item/I, mob/user, params) if(iscyborg(user) || isalien(user)) diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index f41dcb984f2a..7aeaefa09634 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -38,14 +38,15 @@ . = ..() pixel_x = rand(-8, 8) -/obj/structure/headpike/update_icon(updates=ALL) +/obj/structure/headpike/update_overlays() . = ..() var/obj/item/bodypart/head/H = locate() in contents + if(!H) + return var/mutable_appearance/MA = new() - if(H) - MA.copy_overlays(H) - MA.pixel_y = 12 - add_overlay(H) + MA.copy_overlays(H) + MA.pixel_y = 12 + . += MA /obj/structure/headpike/attack_hand(mob/user) . = ..() diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 4ea0b0d19792..21e4f2ba4dfd 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -215,7 +215,7 @@ /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(updates=ALL) +/obj/structure/holobed/update_icon_state() . = ..() icon_state = "[initial(icon_state)][stasis ? "" : "_off"]" diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index b88b37271265..1a3387d984cb 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -223,27 +223,25 @@ return FALSE return TRUE -/obj/structure/janitorialcart/update_icon(updates=ALL) +/obj/structure/janitorialcart/update_overlays() . = ..() - cut_overlays() if(mybag) - add_overlay("cart_garbage") + . += "cart_garbage" if(mymop) - add_overlay("cart_mop") + . += "cart_mop" if(myspray) - add_overlay("cart_spray") + . += "cart_spray" if(myreplacer) - add_overlay("cart_replacer") + . += "cart_replacer" if(myremover) - add_overlay("cart_remover") + . += "cart_remover" if(myswatter) - add_overlay("cart_swatter") + . += "cart_swatter" if(mylight) - add_overlay("cart_light") + . += "cart_light" if(signs) - add_overlay("cart_sign[signs]") + . += "cart_sign[signs]" if(reagents.total_volume > 0) - add_overlay("cart_water") + . += "cart_water" if(mybroom) - add_overlay("cart_broom") - + . += "cart_broom" diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 34a5273dde71..dc6068ac6514 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -55,18 +55,15 @@ down.update_appearance(UPDATE_ICON) up = down = null -/obj/structure/ladder/update_icon(updates=ALL) +/obj/structure/ladder/update_icon_state() . = ..() if(up && down) icon_state = "ladder11" - else if(up) icon_state = "ladder10" - else if(down) icon_state = "ladder01" - - else //wtf make your ladders properly assholes + else //wtf make your ladders properly assholes icon_state = "ladder00" /obj/structure/ladder/singularity_pull() diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm index 29da139fcb06..64f9770d18ee 100644 --- a/code/game/objects/structures/life_candle.dm +++ b/code/game/objects/structures/life_candle.dm @@ -46,7 +46,7 @@ STOP_PROCESSING(SSobj, src) set_light(0) -/obj/structure/life_candle/update_icon(updates=ALL) +/obj/structure/life_candle/update_icon_state() . = ..() if(linked_minds.len) icon_state = icon_state_active diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 5032b7177460..67204afc2eeb 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -119,7 +119,7 @@ update_appearance(UPDATE_ICON) isSwitchingStates = FALSE -/obj/structure/mineral_door/update_icon(updates=ALL) +/obj/structure/mineral_door/update_icon_state() . = ..() icon_state = "[initial(icon_state)][door_opened ? "open":""]" diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index fdfe4ab452d1..6ba389ed11e7 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -39,10 +39,9 @@ return return ..() -/obj/structure/mopbucket/update_icon(updates=ALL) +/obj/structure/mopbucket/update_overlays() . = ..() - cut_overlays() if(reagents.total_volume > 0) - add_overlay("mopbucket_water") + . += "mopbucket_water" if(ourmop) - add_overlay("mopbucket_mop") + . += "mopbucket_mop" diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 7d608bc59114..045bb3fbc9ff 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -172,7 +172,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(updates=ALL) +/obj/structure/bodycontainer/morgue/update_icon_state() . = ..() if (!connected || connected.loc != src) // Open or tray is gone. icon_state = "morgue0" @@ -233,7 +233,7 @@ GLOBAL_LIST_EMPTY(crematoriums) connected = new /obj/structure/tray/c_tray(src) connected.connected = src -/obj/structure/bodycontainer/crematorium/update_icon(updates=ALL) +/obj/structure/bodycontainer/crematorium/update_icon_state() . = ..() if(!connected || connected.loc != src) icon_state = "crema0" diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 8d305e0addac..132df55d8472 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(updates=ALL) +/obj/structure/safe/update_icon_state() . = ..() if(open) icon_state = "[initial(icon_state)]-open" diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 3656fe55525e..e40e4ccbb9cd 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -69,11 +69,10 @@ . = ..() . += span_notice("You can alt-click to change the temperature.") -/obj/machinery/shower/update_icon(updates=ALL) +/obj/machinery/shower/update_overlays() . = ..() - cut_overlays() if(on) - add_overlay(mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER)) + . += mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER) /obj/machinery/shower/proc/handle_mist() // If there is no mist, and the shower was turned on (on a non-freezing temp): make mist in 5 seconds diff --git a/code/game/objects/structures/stairs.dm b/code/game/objects/structures/stairs.dm index bc91cd528b12..94f420f3facd 100644 --- a/code/game/objects/structures/stairs.dm +++ b/code/game/objects/structures/stairs.dm @@ -54,7 +54,7 @@ return FALSE return ..() -/obj/structure/stairs/update_icon(updates=ALL) +/obj/structure/stairs/update_icon_state() . = ..() if(isTerminator()) icon_state = "stairs_t" diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 9ccfc3f65880..0f7c71213efb 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -25,19 +25,18 @@ new /obj/item/tank/internals/plasma(src) update_appearance(UPDATE_ICON) -/obj/structure/tank_dispenser/update_icon(updates=ALL) +/obj/structure/tank_dispenser/update_overlays() . = ..() - cut_overlays() switch(oxygentanks) if(1 to 3) - add_overlay("oxygen-[oxygentanks]") + . += "oxygen-[oxygentanks]" if(4 to TANK_DISPENSER_CAPACITY) - add_overlay("oxygen-4") + . += "oxygen-4" switch(plasmatanks) if(1 to 4) - add_overlay("plasma-[plasmatanks]") + . += "plasma-[plasmatanks]" if(5 to TANK_DISPENSER_CAPACITY) - add_overlay("plasma-5") + . += "plasma-5" /obj/structure/tank_dispenser/attack_ai(mob/user) . = ..() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index fd6a4fc82d11..d722f58b6d44 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -70,7 +70,7 @@ update_appearance(UPDATE_ICON) -/obj/structure/toilet/update_icon(updates=ALL) +/obj/structure/toilet/update_icon_state() . = ..() icon_state = "toilet[open][cistern]" @@ -394,7 +394,7 @@ open = !open update_appearance(UPDATE_ICON) -/obj/structure/curtain/update_icon(updates=ALL) +/obj/structure/curtain/update_icon_state() . = ..() if(!open) icon_state = "closed" diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 1b65c2095d05..5f5c415a1589 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(updates=ALL) +/obj/structure/windoor_assembly/update_icon_state() . = ..() icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]" diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 5c306ddcd2d7..763856851ebb 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -331,7 +331,7 @@ queue_smooth_neighbors(src) //merges adjacent full-tile windows into one -/obj/structure/window/update_icon(updates=ALL) +/obj/structure/window/update_overlays() . = ..() if(!QDELETED(src)) if(!fulltile) @@ -347,7 +347,7 @@ if(ratio > 75) return crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1)) - add_overlay(crack_overlay) + . += crack_overlay /obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) @@ -902,18 +902,30 @@ user.visible_message(span_danger("[user] tears a hole in [src].")) update_appearance(UPDATE_ICON) -/obj/structure/window/paperframe/update_icon(updates=ALL) +/obj/structure/window/paperframe/update_overlays() . = ..() if(obj_integrity < max_integrity) cut_overlay(paper) - add_overlay(torn) + . += torn set_opacity(FALSE) else cut_overlay(torn) - add_overlay(paper) + . += paper set_opacity(TRUE) queue_smooth(src) +/obj/structure/window/paperframe/update_appearance(updates) + . = ..() + set_opacity(obj_integrity >= max_integrity) + +/obj/structure/window/paperframe/update_icon(updates=ALL) + . = ..() + if((updates & UPDATE_SMOOTHING) && (smooth & (SMOOTH_TRUE))) + 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()) @@ -962,7 +974,6 @@ density = TRUE open = FALSE opacity = TRUE - else icon_state = "curtain_open" layer = SIGN_LAYER From f9721518948f7c9c5cbf48172d65745b7d8d0587 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 19:47:31 -0400 Subject: [PATCH 17/50] goes through like 80 more cases --- code/game/objects/items/mail.dm | 6 ++-- .../closets/bluespace_locker.dm | 15 ++++---- .../crates_lockers/closets/bodybag.dm | 10 +++--- .../structures/crates_lockers/crates/bins.dm | 9 +++-- .../crates_lockers/crates/critter.dm | 9 +++-- .../crates_lockers/crates/secure.dm | 8 ++--- .../structures/signs/signs_interactive.dm | 7 ++-- .../transit_tubes/transit_tube_cargo_pod.dm | 2 +- .../transit_tubes/transit_tube_pod.dm | 2 +- code/game/turfs/simulated/floor.dm | 1 - .../turfs/simulated/floor/mineral_floor.dm | 6 ++-- code/game/turfs/simulated/floor/plating.dm | 2 +- code/game/turfs/simulated/minerals.dm | 4 +-- code/game/turfs/space/transit.dm | 2 +- .../abductor/equipment/abduction_gear.dm | 2 +- .../abductor/machinery/experiment.dm | 2 +- .../antagonists/blob/structures/_blob.dm | 2 +- .../antagonists/blob/structures/core.dm | 7 ++-- .../antagonists/blob/structures/node.dm | 7 ++-- .../antagonists/blob/structures/shield.dm | 2 +- .../structures/bloodsucker_crypt.dm | 24 ++++++------- code/modules/antagonists/cult/cult_items.dm | 4 +-- .../antagonists/cult/cult_structures.dm | 12 ++++--- code/modules/assembly/flash.dm | 30 ++++++++++------ code/modules/assembly/holder.dm | 17 +++++----- code/modules/assembly/infrared.dm | 13 +++---- code/modules/assembly/mousetrap.dm | 7 ++-- code/modules/assembly/proximity.dm | 12 ++++--- code/modules/assembly/signaler.dm | 2 +- code/modules/assembly/timer.dm | 11 +++--- .../atmospherics/machinery/airalarm.dm | 2 +- .../components/binary_devices/circulator.dm | 5 ++- .../machinery/components/fusion/hfr_parts.dm | 4 +-- .../gas_recipe_machines/crystallizer.dm | 5 --- .../components/trinary_devices/filter.dm | 5 ++- .../components/trinary_devices/mixer.dm | 5 ++- .../components/unary_devices/cryo.dm | 29 ++++++++-------- .../components/unary_devices/thermomachine.dm | 9 +++-- .../atmospherics/machinery/other/miner.dm | 7 ++-- .../machinery/pipes/heat_exchange/manifold.dm | 7 ++-- .../pipes/heat_exchange/manifold4w.dm | 7 ++-- .../atmospherics/machinery/pipes/manifold.dm | 7 ++-- .../machinery/pipes/manifold4w.dm | 7 ++-- .../atmospherics/machinery/portable/pump.dm | 10 +++--- .../machinery/portable/scrubber.dm | 12 ++++--- code/modules/awaymissions/gateway.dm | 6 ++-- code/modules/buildmode/buttons.dm | 2 +- code/modules/cargo/gondolapod.dm | 2 +- code/modules/cargo/supplypod.dm | 10 ------ code/modules/cargo/supplypod_beacon.dm | 9 +++-- code/modules/clothing/ears/_ears.dm | 2 +- code/modules/clothing/glasses/_glasses.dm | 1 + .../clothing/glasses/engine_goggles.dm | 2 +- code/modules/clothing/head/collectable.dm | 1 + code/modules/clothing/head/hardhat.dm | 7 ++-- code/modules/clothing/head/helmet.dm | 2 +- code/modules/clothing/head/misc_special.dm | 22 +++++++----- code/modules/clothing/neck/bodycamera.dm | 2 +- code/modules/clothing/shoes/bananashoes.dm | 2 +- code/modules/clothing/spacesuits/hardsuit.dm | 2 +- code/modules/clothing/spacesuits/plasmamen.dm | 1 + code/modules/events/pirates.dm | 2 +- code/modules/flufftext/Hallucination.dm | 2 +- .../food_and_drinks/drinks/drinks/bottle.dm | 7 ++-- .../food_and_drinks/food/customizables.dm | 10 +++--- .../food_and_drinks/food/snacks_pastry.dm | 20 +++++++---- .../kitchen_machinery/gibber.dm | 11 +++--- .../kitchen_machinery/griddle.dm | 2 +- .../kitchen_machinery/grill.dm | 2 +- .../kitchen_machinery/microwave.dm | 2 +- .../food_and_drinks/kitchen_machinery/oven.dm | 3 +- .../kitchen_machinery/smartfridge.dm | 9 +++-- code/modules/food_and_drinks/pizzabox.dm | 34 +++++++++++-------- code/modules/games/cas.dm | 4 +-- code/modules/goals/station_goals/shield.dm | 2 +- code/modules/holodeck/items.dm | 2 +- code/modules/holodeck/turfs.dm | 2 +- .../hydroponics/beekeeping/honeycomb.dm | 5 ++- code/modules/hydroponics/biogenerator.dm | 2 +- code/modules/hydroponics/fermenting_barrel.dm | 2 +- code/modules/hydroponics/gene_modder.dm | 17 +++++----- code/modules/library/lib_items.dm | 2 +- code/modules/mapping/minimap.dm | 5 ++- .../modules/mining/equipment/explorer_gear.dm | 5 ++- .../mining/equipment/kinetic_crusher.dm | 4 +-- .../mining/equipment/marker_beacons.dm | 4 +-- .../mining/equipment/regenerative_core.dm | 10 +++--- code/modules/mining/equipment/survival_pod.dm | 8 ++--- code/modules/mining/lavaland/ash_flora.dm | 12 ++++--- code/modules/mining/machine_redemption.dm | 2 +- code/modules/mining/machine_vending.dm | 2 +- code/modules/mining/ores_coins.dm | 11 +++--- code/modules/power/apc.dm | 26 +++++++------- 93 files changed, 333 insertions(+), 329 deletions(-) diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index c25aaaaeadb7..37d8230b04b1 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -73,7 +73,7 @@ stamps += list("stamp_[rand(2, 6)]") update_appearance(UPDATE_ICON) -/obj/item/mail/update_icon(updates=ALL) +/obj/item/mail/update_overlays() . = ..() var/bonus_stamp_offset = 0 for(var/stamp in stamps) @@ -84,7 +84,7 @@ pixel_y = stamp_offset_y + bonus_stamp_offset ) stamp_image.appearance_flags |= RESET_COLOR - add_overlay(stamp_image) + . += stamp_image bonus_stamp_offset -= 5 if(postmarked == TRUE) @@ -95,7 +95,7 @@ pixel_y = stamp_offset_y + rand(bonus_stamp_offset + 3, 1) ) postmark_image.appearance_flags |= RESET_COLOR - add_overlay(postmark_image) + . += postmark_image /obj/item/mail/attackby(obj/item/W, mob/user, params) // Destination tagging 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 56d8c9e08cf4..07592148e1dc 100644 --- a/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm +++ b/code/game/objects/structures/crates_lockers/closets/bluespace_locker.dm @@ -87,9 +87,8 @@ else return ..() -/obj/structure/closet/bluespace/internal/update_icon(updates=ALL) +/obj/structure/closet/bluespace/internal/update_overlays() . = ..() - cut_overlays() var/obj/structure/closet/other = get_other_locker() if(!other) other = src @@ -98,20 +97,20 @@ var/mutable_appearance/masking_icon = mutable_appearance(other.icon, other.icon_state) masking_icon.blend_mode = BLEND_MULTIPLY masked_icon.add_overlay(masking_icon) - //add_overlay(image('yogstation/icons/obj/closet.dmi', "bluespace_locker_frame")) - add_overlay(masked_icon) + //. += image('yogstation/icons/obj/closet.dmi', "bluespace_locker_frame") + . += masked_icon if(!opened) layer = OBJ_LAYER if(other.icon_door) - add_overlay(image(other.icon, "[other.icon_door]_door")) + . += image(other.icon, "[other.icon_door]_door") else - add_overlay(image(other.icon, "[other.icon_state]_door")) + . += image(other.icon, "[other.icon_state]_door") else layer = BELOW_OBJ_LAYER if(other.icon_door_override) - add_overlay(image(other.icon, "[other.icon_door]_open")) + . += image(other.icon, "[other.icon_door]_open") else - add_overlay(image(other.icon, "[other.icon_state]_open")) + . += image(other.icon, "[other.icon_state]_open") /obj/structure/closet/bluespace/external/onTransitZ(old_z,new_z) var/obj/structure/closet/O = get_other_locker() diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index dd9a8aead137..63fdda6bd680 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -48,10 +48,10 @@ tagged = 0 update_appearance(UPDATE_ICON) -/obj/structure/closet/body_bag/update_icon(updates=ALL) +/obj/structure/closet/body_bag/update_overlays() . = ..() if (tagged) - add_overlay("bodybag_label") + . += "bodybag_label" /obj/structure/closet/body_bag/close() if(..()) @@ -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(updates=ALL) +/obj/structure/closet/body_bag/environmental/prisoner/update_icon_state() . = ..() if(sinched) icon_state = initial(icon_state) + "_sinched" @@ -292,11 +292,11 @@ breakout_time = 8 MINUTES sinch_time = 4 SECONDS -/obj/structure/closet/body_bag/environmental/prisoner/syndicate/update_icon(updates=ALL) +/obj/structure/closet/body_bag/environmental/prisoner/syndicate/update_overlays() . = ..() var/obj/item/bodybag/environmental/prisoner/syndicate/inner_bag = foldedbag_instance if(sinched && inner_bag && inner_bag.killing) - add_overlay("kill_flash") + . += "kill_flash" /obj/structure/closet/body_bag/environmental/prisoner/syndicate/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index 2107df71268d..c5e9d9c2fc8e 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -12,15 +12,14 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/structure/closet/crate/bin/update_icon(updates=ALL) +/obj/structure/closet/crate/bin/update_overlays() . = ..() - cut_overlays() if(contents.len == 0) - add_overlay("largebing") + . += "largebing" else if(contents.len >= storage_capacity) - add_overlay("largebinr") + . += "largebinr" else - add_overlay("largebino") + . += "largebino" /obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/storage/bag/trash)) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index 7b0f479a7510..9040f304ed62 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -21,15 +21,14 @@ return ..() -/obj/structure/closet/crate/critter/update_icon(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) diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index 37003268a607..603b108ddf96 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -13,14 +13,14 @@ return 0 . = ..() -/obj/structure/closet/crate/secure/update_icon(updates=ALL) +/obj/structure/closet/crate/secure/update_overlays() . = ..() if(broken) - add_overlay("securecrateemag") + . += "securecrateemag" else if(locked) - add_overlay("securecrater") + . += "securecrater" else - add_overlay("securecrateg") + . += "securecrateg" /obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 5934bc9b63d4..2d7b63f40534 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -20,19 +20,18 @@ GLOBAL_LIST_EMPTY(map_delamination_counters) since_last = min(new_count, 99) update_appearance(UPDATE_ICON) -/obj/structure/sign/delamination_counter/update_icon(updates=ALL) +/obj/structure/sign/delamination_counter/update_overlays() . = ..() - cut_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/transit_tubes/transit_tube_cargo_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_cargo_pod.dm index 1e6b5a6575f5..27c0a7b53171 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(updates=ALL) +/obj/structure/transit_tube_pod/cargo/update_icon_state() . = ..() if(contents.len) icon_state = "pod_cargo_occupied" 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 67c13c99e0f6..843b93e57cc0 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(updates=ALL) +/obj/structure/transit_tube_pod/update_icon_state() . = ..() if(contents.len) icon_state = "pod_occupied" diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index d2c354833aa7..a54d1a2e43f7 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -118,7 +118,6 @@ /turf/open/floor/update_icon(updates=ALL) . = ..() update_visuals() - return 1 /turf/open/floor/attack_paw(mob/user) return attack_hand(user) diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index b6e340a7e304..503b36b3dc14 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -23,12 +23,12 @@ icons = typelist("icons", icons) -/turf/open/floor/mineral/update_icon(updates=ALL) +/turf/open/floor/mineral/update_icon_state() . = ..() if(!.) - return 0 + return if(!broken && !burnt) - if( !(icon_state in icons) ) + if(!(icon_state in icons)) icon_state = initial(icon_state) //PLASMA diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 8940fca47bce..5fdd9fa14468 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(updates=ALL) +/turf/open/floor/plating/update_icon_state() . = ..() if(!.) return diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 45c84de560fc..0bdf3d8c713f 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -95,14 +95,14 @@ else update_appearance(UPDATE_ICON) -/turf/closed/mineral/update_icon(updates=ALL) +/turf/closed/mineral/update_overlays() . = ..() if(hardness != initial(hardness)) var/mutable_appearance/cracks = mutable_appearance('icons/turf/mining.dmi',"rock_cracks",ON_EDGED_TURF_LAYER) var/matrix/M = new M.Translate(4,4) cracks.transform = M - add_overlay(cracks) + . += cracks /turf/closed/mineral/attack_animal(mob/living/simple_animal/user) diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 7b5274c70453..39d0c255272a 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -67,7 +67,7 @@ /turf/open/space/transit/east dir = EAST -/turf/open/space/transit/update_icon(updates=ALL) +/turf/open/space/transit/update_icon_state() . = ..() icon_state = "speedspace_ns_[get_transit_state(src)]" transform = turn(matrix(), get_transit_angle(src)) diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 018b0a87cce5..45b84db7b344 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -445,7 +445,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} to_chat(usr, span_notice("You switch the baton to [txt] mode.")) update_appearance(UPDATE_ICON) -/obj/item/abductor/baton/update_icon(updates=ALL) +/obj/item/abductor/baton/update_icon_state() . = ..() switch(mode) if(BATON_STUN) diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index 4dc494e2c95c..9c29c3516d5b 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(updates=ALL) +/obj/machinery/abductor/experiment/update_icon_state() . = ..() if(state_open) icon_state = "experiment-open" diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index 90b542580003..6e4eea32a376 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -344,7 +344,7 @@ return "Currently weak to brute damage." return "N/A" -/obj/structure/blob/normal/update_icon(updates=ALL) +/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 7c260ae5f88e..b44dbc46ceb7 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -25,15 +25,14 @@ /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(updates=ALL) +/obj/structure/blob/core/update_overlays() . = ..() - cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") if(overmind) blob_overlay.color = overmind.blobstrain.color - add_overlay(blob_overlay) - add_overlay(mutable_appearance('icons/mob/blob.dmi', "blob_core_overlay")) + . += blob_overlay + . += mutable_appearance('icons/mob/blob.dmi', "blob_core_overlay") /obj/structure/blob/core/Destroy() GLOB.blob_cores -= src diff --git a/code/modules/antagonists/blob/structures/node.dm b/code/modules/antagonists/blob/structures/node.dm index b0a4cf4093b9..1d7c6113800c 100644 --- a/code/modules/antagonists/blob/structures/node.dm +++ b/code/modules/antagonists/blob/structures/node.dm @@ -18,15 +18,14 @@ /obj/structure/blob/node/scannerreport() return "Gradually expands and sustains nearby blob spores and blobbernauts." -/obj/structure/blob/node/update_icon(updates=ALL) +/obj/structure/blob/node/update_overlays() . = ..() - cut_overlays() color = null var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob") if(overmind) blob_overlay.color = overmind.blobstrain.color - add_overlay(blob_overlay) - add_overlay(mutable_appearance('icons/mob/blob.dmi', "blob_node_overlay")) + . += blob_overlay + . += mutable_appearance('icons/mob/blob.dmi', "blob_node_overlay") /obj/structure/blob/node/Destroy() GLOB.blob_nodes -= src diff --git a/code/modules/antagonists/blob/structures/shield.dm b/code/modules/antagonists/blob/structures/shield.dm index 0d84e70c206f..72af84d66556 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(updates=ALL) +/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 43b02245d487..dc97c45bdeb4 100644 --- a/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsuckers/structures/bloodsucker_crypt.dm @@ -395,16 +395,15 @@ . = ..() anchored = FALSE -/obj/structure/bloodsucker/moldingstone/update_icon(updates=ALL) +/obj/structure/bloodsucker/moldingstone/update_overlays() . = ..() - cut_overlays() switch(metal) if(1 to 5) - add_overlay("metal") + . += "metal" if(6 to 20) - add_overlay("metal_2") + . += "metal_2" if(21 to 50) - add_overlay("metal_3") + . += "metal_3" /obj/structure/bloodsucker/moldingstone/attackby(obj/item/I, mob/user, params) if(!anchored) @@ -811,18 +810,17 @@ update_appearance(UPDATE_ICON) #undef MEATLIMIT -/obj/structure/bloodsucker/vassalrack/update_icon(updates=ALL) +/obj/structure/bloodsucker/vassalrack/update_overlays() . = ..() - cut_overlays() if(bigmeat) - add_overlay("bigmeat_[bigmeat]") + . += "bigmeat_[bigmeat]" if(intermeat) - add_overlay("mediummeat_[intermeat]") - add_overlay("smallmeat_[intermeat]") + . += "mediummeat_[intermeat]" + . += "smallmeat_[intermeat]" if(mediummeat) - add_overlay("mediummeat_[mediummeat + intermeat]") + . += "mediummeat_[mediummeat + intermeat]" if(smallmeat) - add_overlay("smallmeat_[smallmeat + intermeat]") + . += "smallmeat_[smallmeat + intermeat]" /obj/structure/bloodsucker/vassalrack/CtrlClick(mob/user) if(!anchored) @@ -1185,7 +1183,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/structure/bloodsucker/candelabrum/update_icon(updates=ALL) +/obj/structure/bloodsucker/candelabrum/update_icon_state() . = ..() icon_state = "candelabrum[lit ? "_lit" : ""]" diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index e432d48eb1e7..1ae73e4be031 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(updates=ALL) +/obj/item/sharpener/cult/update_icon_state() . = ..() icon_state = "cult_sharpener[used ? "_used" : ""]" @@ -691,7 +691,7 @@ GLOBAL_VAR_INIT(curselimit, 0) qdel(spear_act) ..() -/obj/item/twohanded/cult_spear/update_icon(updates=ALL) +/obj/item/twohanded/cult_spear/update_icon_state() . = ..() icon_state = "bloodspear[wielded]" diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 359c3d9674e5..4edd5c65cc2b 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -312,7 +312,7 @@ new /obj/effect/decal/cleanable/ash(loc) ..() -/obj/structure/destructible/cult/pillar/update_icon(updates=ALL) +/obj/structure/destructible/cult/pillar/update_icon_state() . = ..() icon_state = "pillar[alt ? "alt": ""]2" if (obj_integrity < max_integrity/3) @@ -471,17 +471,19 @@ else T.narsie_act(TRUE, TRUE) -/obj/structure/destructible/cult/bloodstone/update_icon(updates=ALL) +/obj/structure/destructible/cult/bloodstone/update_icon_state() . = ..() icon_state = "bloodstone-[current_fullness]" - cut_overlays() + +/obj/structure/destructible/cult/bloodstone/update_overlays() + . = ..() var/image/I_base = image('icons/obj/cult_64x64.dmi',"bloodstone-base") I_base.appearance_flags |= RESET_COLOR//we don't want the stone to pulse overlays += I_base if (obj_integrity <= max_integrity/3) - add_overlay("bloodstone_damage2") + . += "bloodstone_damage2" else if (obj_integrity <= 2*max_integrity/3) - add_overlay("bloodstone_damage1") + . += "bloodstone_damage1" set_light(3+current_fullness, 2+current_fullness) /obj/structure/destructible/cult/bloodstone/proc/set_animate() diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 712374081f32..37f0bc3776fb 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -15,6 +15,8 @@ light_power = FLASH_LIGHT_POWER light_on = FALSE fryable = TRUE + /// Whether we currently have the flashing overlay. + var/flashing = FALSE ///flicked when we flash var/flashing_overlay = "flash-f" ///Number of times the flash has been used. @@ -46,18 +48,24 @@ return FIRELOSS /obj/item/assembly/flash/update_icon(updates=ALL, flash = FALSE) - cut_overlays() - attached_overlays = list() + . = ..() + flashing = flash if(burnt_out) - add_overlay("flashburnt") - attached_overlays += "flashburnt" item_state = "flashburnt" if(flash) - add_overlay(flashing_overlay) - attached_overlays += flashing_overlay addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_icon)), 5) if(holder) - holder.update_appearance(UPDATE_ICON) + holder.update_icon(updates) + +/obj/item/assembly/flash/update_overlays() + . = ..() + attached_overlays = list() + if(burnt_out) + . += "flashburnt" + attached_overlays += "flashburnt" + if(flashing) + . += flashing_overlay + attached_overlays += flashing_overlay /obj/item/assembly/flash/proc/clown_check(mob/living/carbon/human/user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) @@ -68,7 +76,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_appearance(UPDATE_ICON) + update_icon(ALL, FALSE) if(ismob(loc)) var/mob/M = loc M.visible_message(span_danger("[src] burns out!"),span_userdanger("[src] burns out!")) @@ -120,7 +128,7 @@ addtimer(CALLBACK(src, PROC_REF(flash_end)), FLASH_LIGHT_DURATION, TIMER_OVERRIDE|TIMER_UNIQUE) times_used++ flash_recharge() - update_icon(flash = TRUE) + update_icon(ALL, flash = TRUE) if(user && !clown_check(user)) return FALSE return TRUE @@ -173,7 +181,7 @@ var/mob/living/silicon/robot/R = M if(!R.sensor_protection) log_combat(user, R, "flashed", src) - update_icon(flash = TRUE) + update_icon(ALL, flash = TRUE) R.Paralyze(rand(80,120)) R.set_confusion_if_lower(5 SECONDS * CONFUSION_STACK_MAX_MULTIPLIER) R.flash_act(affect_silicon = 1) @@ -294,7 +302,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(flash = TRUE) + update_icon(ALL, flash = TRUE) return TRUE diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 397f279023e3..834443155c56 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -40,32 +40,31 @@ a_right = A A.holder_movement() -/obj/item/assembly_holder/update_icon(updates=ALL) +/obj/item/assembly_holder/update_overlays() . = ..() - cut_overlays() if(a_left) - add_overlay("[a_left.icon_state]_left") + . += "[a_left.icon_state]_left" for(var/O in a_left.attached_overlays) // yogs start - signaller colors if(istext(O)) - add_overlay("[O]_l") + . += "[O]_l" else var/mutable_appearance/A = new(O) A.icon_state = "[A.icon_state]_l" - add_overlay(A) + . += A // yogs end if(a_right) if(a_right.is_position_sensitive) - add_overlay("[a_right.icon_state]_right") + . += "[a_right.icon_state]_right" for(var/O in a_right.attached_overlays) // yogs start - signaller colors if(istext(O)) - add_overlay("[O]_r") + . += "[O]_r" else var/mutable_appearance/A = new(O) A.icon_state = "[A.icon_state]_r" - add_overlay(A) + . += A // yogs end else var/mutable_appearance/right = mutable_appearance(icon, "[a_right.icon_state]_left") @@ -79,7 +78,7 @@ A.icon_state = "[A.icon_state]_l" right.add_overlay(A) // yogs end - add_overlay(right) + . += right if(master) master.update_appearance(UPDATE_ICON) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 72b732ed6f49..77ce1dd11cc8 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -52,18 +52,19 @@ /obj/item/assembly/infra/update_icon(updates=ALL) . = ..() - cut_overlays() + if(holder) + holder.update_icon(updates) + +/obj/item/assembly/infra/update_overlays() + . = ..() attached_overlays = list() if(on) - add_overlay("infrared_on") + . += "infrared_on" attached_overlays += "infrared_on" if(visible && secured) - add_overlay("infrared_visible") + . += "infrared_visible" attached_overlays += "infrared_visible" - if(holder) - holder.update_appearance(UPDATE_ICON) - /obj/item/assembly/infra/dropped() . = ..() if(holder) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 0d55516b4364..cd2eb6972683 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -26,13 +26,16 @@ playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) /obj/item/assembly/mousetrap/update_icon(updates=ALL) + . = ..() + if(holder) + holder.update_icon(updates) + +/obj/item/assembly/mousetrap/update_icon_state() . = ..() if(armed) icon_state = "mousetraparmed" else icon_state = "mousetrap" - if(holder) - holder.update_appearance(UPDATE_ICON) /obj/item/assembly/mousetrap/proc/triggered(mob/target, type = "feet") if(!armed) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 498cc4743f4c..99210ec08aee 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -94,16 +94,18 @@ /obj/item/assembly/prox_sensor/update_icon(updates=ALL) . = ..() - cut_overlays() + if(holder) + holder.update_icon(updates) + +/obj/item/assembly/prox_sensor/update_overlays() + . = ..() attached_overlays = list() if(timing) - add_overlay("prox_timing") + . += "prox_timing" attached_overlays += "prox_timing" if(scanning) - add_overlay("prox_scanning") + . += "prox_scanning" attached_overlays += "prox_scanning" - if(holder) - holder.update_appearance(UPDATE_ICON) /obj/item/assembly/prox_sensor/ui_status(mob/user) if(is_secured(user)) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 48887ddd4630..feaf6030757e 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -47,7 +47,7 @@ /obj/item/assembly/signaler/update_icon(updates=ALL) . = ..() if(holder) - holder.update_appearance(UPDATE_ICON) + holder.update_icon(updates) /obj/item/assembly/signaler/ui_status(mob/user) if(is_secured(user)) diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 3c2153084960..5a81ad77623f 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -75,16 +75,17 @@ timer_end() time = saved_time - /obj/item/assembly/timer/update_icon(updates=ALL) . = ..() - cut_overlays() + if(holder) + holder.update_icon(updates) + +/obj/item/assembly/timer/update_overlays() + . = ..() attached_overlays = list() if(timing) - add_overlay("timer_timing") + . += "timer_timing" attached_overlays += "timer_timing" - if(holder) - holder.update_appearance(UPDATE_ICON) /obj/item/assembly/timer/ui_status(mob/user) if(is_secured(user)) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index c1d4ed3203ea..93b23a573536 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -630,7 +630,7 @@ "set_internal_pressure" = 0 ), signal_source) -/obj/machinery/airalarm/update_icon(updates=ALL) +/obj/machinery/airalarm/update_icon_state() . = ..() if(panel_open) switch(buildstage) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index f3f385d3384f..9c9a7203f343 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -79,9 +79,8 @@ ..() update_icon_nopipes() -/obj/machinery/atmospherics/components/binary/circulator/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/binary/circulator/update_overlays() . = ..() - cut_overlays() if(anchored) for(var/direction in GLOB.cardinals) @@ -93,7 +92,7 @@ if(node) cap = getpipeimage(icon, "cap", direction, node.pipe_color, piping_layer = piping_layer) - add_overlay(cap) + . += cap /obj/machinery/atmospherics/components/binary/circulator/update_icon_nopipes() cut_overlays() diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index 2910d03bad60..ce247b40dc3e 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -72,7 +72,7 @@ node.addMember(src) SSair.add_to_rebuild_queue(src) -/obj/machinery/atmospherics/components/unary/hypertorus/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/unary/hypertorus/update_icon_state() . = ..() if(panel_open) icon_state = icon_state_open @@ -154,7 +154,7 @@ return return ..() -/obj/machinery/hypertorus/update_icon(updates=ALL) +/obj/machinery/hypertorus/update_icon_state() . = ..() if(panel_open) icon_state = icon_state_open 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 3961f1aedf44..6c50495de769 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -94,11 +94,6 @@ else icon_state = "[base_icon]-off" -/obj/machinery/atmospherics/components/binary/crystallizer/update_icon(updates=ALL) - . = ..() - update_icon_state() - update_overlays() - /obj/machinery/atmospherics/components/binary/crystallizer/AltClick(mob/user) if(!can_interact(user)) return diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 87a2029bf595..077d38c368b5 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -44,9 +44,8 @@ SSradio.remove_object(src,frequency) return ..() -/obj/machinery/atmospherics/components/trinary/filter/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/trinary/filter/update_overlays() . = ..() - cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) continue @@ -58,7 +57,7 @@ else cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer, trinary = TRUE) - add_overlay(cap) + . += cap /obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes() var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 9e9be0dd2f06..8863b9431f49 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -31,9 +31,8 @@ update_appearance(UPDATE_ICON) return ..() -/obj/machinery/atmospherics/components/trinary/mixer/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/trinary/mixer/update_overlays() . = ..() - cut_overlays() for(var/direction in GLOB.cardinals) if(!(direction & initialize_directions)) continue @@ -45,7 +44,7 @@ else cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer, trinary = TRUE) - add_overlay(cap) + . += cap /obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes() var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 015b1cfad79d..e3ac0838bb39 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -102,16 +102,21 @@ beaker.forceMove(drop_location()) beaker = null -/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon_state() . = ..() - cut_overlays() - - if(panel_open) - add_overlay("pod-panel") - if(state_open) icon_state = "pod-open" return + if(on && is_operational()) + icon_state = "pod-on" + else + icon_state = "pod-off" + +/obj/machinery/atmospherics/components/unary/cryo_cell/update_overlays() + . = ..() + + if(panel_open) + . += "pod-panel" if(occupant) var/image/occupant_overlay @@ -139,20 +144,16 @@ occupant_overlay.pixel_y = 22 if(on && !running_anim && is_operational()) - icon_state = "pod-on" running_anim = TRUE run_anim(TRUE, occupant_overlay) else - icon_state = "pod-off" - add_overlay(occupant_overlay) - add_overlay("cover-off") + . += occupant_overlay + . += "cover-off" else if(on && is_operational()) - icon_state = "pod-on" - add_overlay("cover-on") + . += "cover-on" else - icon_state = "pod-off" - add_overlay("cover-off") + . += "cover-off" /obj/machinery/atmospherics/components/unary/cryo_cell/proc/run_anim(anim_up, image/occupant_overlay) if(!on || !occupant || !is_operational()) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index d8ac5b453adc..bec6967939dd 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -39,10 +39,8 @@ B += M.rating heat_capacity = 5000 * ((B - 1) ** 2) -/obj/machinery/atmospherics/components/unary/thermomachine/update_icon(updates=ALL) +/obj/machinery/atmospherics/components/unary/thermomachine/update_icon_state() . = ..() - cut_overlays() - if(panel_open) icon_state = icon_state_open else if(on && is_operational()) @@ -50,8 +48,9 @@ else icon_state = icon_state_off - add_overlay(getpipeimage(icon, "pipe", dir, , piping_layer)) - +/obj/machinery/atmospherics/components/unary/thermomachine/update_overlays() + . = ..() + . += getpipeimage(icon, "pipe", dir, , piping_layer) /obj/machinery/atmospherics/components/unary/thermomachine/update_icon_nopipes() cut_overlays() diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index 886c83ceccc1..2a6a583ab6de 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -108,15 +108,14 @@ return TRUE return FALSE -/obj/machinery/atmospherics/miner/update_icon(updates=ALL) +/obj/machinery/atmospherics/miner/update_overlays() . = ..() - cut_overlays() if(broken) - add_overlay("broken") + . += "broken" else if(active) var/mutable_appearance/on_overlay = mutable_appearance(icon, "on") on_overlay.color = overlay_color - add_overlay(on_overlay) + . += on_overlay /obj/machinery/atmospherics/miner/process(delta_time) update_power() diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm index 8f81fafd0ff2..a2d057a2f360 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold.dm @@ -26,17 +26,16 @@ initialize_directions = NORTH|SOUTH|EAST|WEST initialize_directions &= ~dir -/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_icon(updates=ALL) +/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_overlays() . = ..() - cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) - add_overlay(center) + . += center //Add non-broken pieces for(var/i in 1 to device_type) if(nodes[i]) - add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) + . += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm index 0379be8fe355..a47421f1a1f2 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/manifold4w.dm @@ -24,17 +24,16 @@ /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections() initialize_directions = initial(initialize_directions) -/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon(updates=ALL) +/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_overlays() . = ..() - cut_overlays() PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) - add_overlay(center) + . += center //Add non-broken pieces for(var/i in 1 to device_type) if(nodes[i]) - add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) + . += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index 3ecdaa8246e3..5d9ed0976564 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -35,18 +35,17 @@ initialize_directions = NORTH|SOUTH|EAST|WEST initialize_directions &= ~dir -/obj/machinery/atmospherics/pipe/manifold/update_icon(updates=ALL) +/obj/machinery/atmospherics/pipe/manifold/update_overlays() . = ..() - cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) - add_overlay(center) + . += center //Add non-broken pieces for(var/i in 1 to device_type) if(nodes[i]) - add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) + . += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index 73030a5698fa..4a88990fa1c8 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -29,18 +29,17 @@ /obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections() initialize_directions = initial(initialize_directions) -/obj/machinery/atmospherics/pipe/manifold4w/update_icon(updates=ALL) +/obj/machinery/atmospherics/pipe/manifold4w/update_overlays() . = ..() - cut_overlays() if(!center) center = mutable_appearance(icon, "manifold_center") PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) - add_overlay(center) + . += center //Add non-broken pieces for(var/i in 1 to device_type) if(nodes[i]) - add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) + . += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) update_layer() update_alpha() diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index d0bf6f63f115..b2224cf9cad8 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -29,15 +29,17 @@ QDEL_NULL(pump) return ..() -/obj/machinery/portable_atmospherics/pump/update_icon(updates=ALL) +/obj/machinery/portable_atmospherics/pump/update_icon_state() . = ..() icon_state = "psiphon:[on]" - cut_overlays() +/obj/machinery/portable_atmospherics/pump/update_overlays() + . = ..() + if(holding) - add_overlay("siphon-open") + . += "siphon-open" if(connected_port) - add_overlay("siphon-connector") + . += "siphon-connector" /obj/machinery/portable_atmospherics/pump/process_atmos() ..() diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 6277805c345e..f0d132d6fe71 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -36,15 +36,17 @@ air_update_turf() return ..() -/obj/machinery/portable_atmospherics/scrubber/update_icon(updates=ALL) +/obj/machinery/portable_atmospherics/scrubber/update_icon_state() . = ..() icon_state = "pscrubber:[on]" - cut_overlays() +/obj/machinery/portable_atmospherics/scrubber/update_overlays() + . = ..() + if(holding) - add_overlay("scrubber-open") + . += "scrubber-open" if(connected_port) - add_overlay("scrubber-connector") + . += "scrubber-connector" /obj/machinery/portable_atmospherics/scrubber/process_atmos() ..() @@ -150,7 +152,7 @@ /obj/machinery/portable_atmospherics/scrubber/huge/movable movable = TRUE -/obj/machinery/portable_atmospherics/scrubber/huge/update_icon(updates=ALL) +/obj/machinery/portable_atmospherics/scrubber/huge/update_icon_state() . = ..() icon_state = "scrubber:[on]" diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 278eb22ed8d5..30b91578560f 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -53,7 +53,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) ready = TRUE return ready -/obj/machinery/gateway/update_icon(updates=ALL) +/obj/machinery/gateway/update_icon_state() . = ..() if(active) icon_state = "on" @@ -101,7 +101,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(updates=ALL) +/obj/machinery/gateway/centerstation/update_icon_state() . = ..() if(active) icon_state = "oncenter" @@ -185,7 +185,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) stationgate = locate(/obj/machinery/gateway/centerstation) -/obj/machinery/gateway/centeraway/update_icon(updates=ALL) +/obj/machinery/gateway/centeraway/update_icon_state() . = ..() if(active) icon_state = "oncenter" diff --git a/code/modules/buildmode/buttons.dm b/code/modules/buildmode/buttons.dm index d88410fc43f5..8468962b9c38 100644 --- a/code/modules/buildmode/buttons.dm +++ b/code/modules/buildmode/buttons.dm @@ -27,7 +27,7 @@ update_appearance(UPDATE_ICON) return 1 -/atom/movable/screen/buildmode/mode/update_icon(updates=ALL) +/atom/movable/screen/buildmode/mode/update_icon_state() . = ..() if(bd && bd.mode) icon_state = bd.mode.get_button_iconstate() diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm index dd3242739b63..adc2988f5594 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/update_icon(updates=ALL) +/mob/living/simple_animal/pet/gondola/gondolapod/update_icon_state() . = ..() if(opened) icon_state = "gondolapod_open" diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 7f5de005e982..5b2f619a0f2f 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -125,16 +125,6 @@ transform = matrix() update_appearance(UPDATE_ICON) -/obj/structure/closet/supplypod/update_icon(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/update_overlays() . = ..() if(style == STYLE_INVISIBLE) diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index d19a4cd254de..51df38fca249 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -31,15 +31,14 @@ ready = FALSE update_appearance(UPDATE_ICON) -/obj/item/supplypod_beacon/update_icon(updates=ALL) +/obj/item/supplypod_beacon/update_overlays() . = ..() - cut_overlays() if (launched) - add_overlay("sp_green") + . += "sp_green" else if (ready) - add_overlay("sp_yellow") + . += "sp_yellow" else if (linked) - add_overlay("sp_orange") + . += "sp_orange" /obj/item/supplypod_beacon/proc/endLaunch() launched = FALSE diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index a4a9742044f4..fb4da9b676de 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -37,7 +37,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/clothing/ears/headphones/update_icon(updates=ALL) +/obj/item/clothing/ears/headphones/update_icon_state() . = ..() 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/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 4dbaf236f073..2bae346ca5d9 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -343,6 +343,7 @@ ..() /obj/item/clothing/glasses/blindfold/white/update_icon(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/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 63126f58f413..1f39b7aeed4c 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -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(updates=ALL) +/obj/item/clothing/glasses/meson/engine/update_icon_state() . = ..() icon_state = "trayson-[mode]" update_mob() diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index a7af38a5fdce..0a334fe88549 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -110,6 +110,7 @@ ..() /obj/item/clothing/head/collectable/kitty/update_icon(mob/living/carbon/human/user) + . = ..() if(ishuman(user)) add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index f58d3c79c4c6..8cc94e149024 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -33,7 +33,7 @@ turn_off(user) update_appearance(UPDATE_ICON) -/obj/item/clothing/head/hardhat/update_icon(updates=ALL) +/obj/item/clothing/head/hardhat/update_icon_state() . = ..() icon_state = "hardhat[on]_[hat_type]" item_state = "hardhat[on]_[hat_type]" @@ -156,11 +156,10 @@ if(!up) . += mutable_appearance(mob_overlay_icon, "weldvisor") -/obj/item/clothing/head/hardhat/weldhat/update_icon(updates=ALL) +/obj/item/clothing/head/hardhat/weldhat/update_overlays() . = ..() - cut_overlays() if(!up) - add_overlay("weldvisor") + . += "weldvisor" /obj/item/clothing/head/hardhat/weldhat/orange icon_state = "hardhat0_orange" diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index bd04b6b9a7c0..a7e0c64a943f 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -368,7 +368,7 @@ //LightToggle -/obj/item/clothing/head/helmet/update_icon(updates=ALL) +/obj/item/clothing/head/helmet/update_icon_state() . = ..() var/state = "[initial(icon_state)]" if(attached_light) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 34ba105110a2..7db8c1207658 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -151,6 +151,7 @@ /obj/item/clothing/head/kitty/update_icon(mob/living/carbon/human/user) + . = ..() if(ishuman(user)) add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) @@ -209,18 +210,23 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/clothing/head/wig/update_icon(updates=ALL) +/obj/item/clothing/head/wig/update_icon_state() . = ..() - cut_overlays() icon_state = "" var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style] + if(S) + return + icon_state = "pwig" + +/obj/item/clothing/head/wig/update_overlays() + . = ..() + var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style] if(!S) - icon_state = "pwig" - else - var/mutable_appearance/M = mutable_appearance(S.icon,S.icon_state) - M.appearance_flags |= RESET_COLOR - M.color = hair_color - add_overlay(M) + return + var/mutable_appearance/M = mutable_appearance(S.icon,S.icon_state) + M.appearance_flags |= RESET_COLOR + M.color = hair_color + . += M /obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, file2use) . = list() diff --git a/code/modules/clothing/neck/bodycamera.dm b/code/modules/clothing/neck/bodycamera.dm index 511acab4d9cf..3cd85f30beb1 100644 --- a/code/modules/clothing/neck/bodycamera.dm +++ b/code/modules/clothing/neck/bodycamera.dm @@ -54,7 +54,7 @@ bodcam.status = TRUE update_appearance(UPDATE_ICON) -/obj/item/clothing/neck/bodycam/update_icon(updates=ALL) +/obj/item/clothing/neck/bodycam/update_icon_state() . = ..() var/suffix = "off" if(bodcam.status) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index d3d7b4c12f0d..e083a186bc28 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -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(updates=ALL) +/obj/item/clothing/shoes/clown_shoes/banana_shoes/update_icon_state() . = ..() if(on) icon_state = "clown_prototype_on" diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index e8edd0bad877..94b27351710c 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(updates=ALL) +/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon_state() . = ..() icon_state = "hardsuit[on]-[hardsuit_type]" diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index c18680d16148..b88d73e5aefa 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -81,6 +81,7 @@ update_appearance(UPDATE_ICON) /obj/item/clothing/head/helmet/space/plasmaman/update_icon(mob/living/carbon/human/user) + . = ..() if(!user) return user.cut_overlay(helmet_mob_overlay) diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 0832da7b7b52..077c1c192479 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -195,7 +195,7 @@ active = FALSE STOP_PROCESSING(SSobj,src) -/obj/machinery/shuttle_scrambler/update_icon(updates=ALL) +/obj/machinery/shuttle_scrambler/update_icon_state() . = ..() if(active) icon_state = "dominator-blue" diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index b42eae418de3..a05e5acfd46a 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -115,7 +115,7 @@ 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_icon(updates=ALL, new_state, new_icon, new_px=0, new_py=0) image_state = new_state if(new_icon) image_icon = new_icon diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 549ecd66acf5..b76deccada55 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -25,9 +25,8 @@ /obj/item/reagent_containers/food/drinks/bottle/on_reagent_change(changetype) update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/food/drinks/bottle/update_icon(updates=ALL) +/obj/item/reagent_containers/food/drinks/bottle/update_overlays() . = ..() - cut_overlays() if(reagents.total_volume) var/fill_name = icon_state @@ -41,9 +40,9 @@ filling.icon_state = "[fill_name][fill_icon_thresholds[i]]" filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + . += filling - add_overlay("[initial(icon_state)]shine") + . += "[initial(icon_state)]shine" /obj/item/reagent_containers/food/drinks/bottle/small name = "small glass bottle" diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index ed3cbdbc0ae4..b883c0814cb5 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -350,14 +350,16 @@ ..() update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/bowl/update_icon(updates=ALL) +/obj/item/reagent_containers/glass/bowl/update_overlays() . = ..() - cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/food/soupsalad.dmi', "fullbowl") filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) - else + . += filling + +/obj/item/reagent_containers/glass/bowl/update_icon_state() + . = ..() + if(!reagents || !reagents.total_volume) icon_state = "bowl" #undef INGREDIENTS_FILL diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 5454355f9fd3..41dfc8d6394c 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -674,14 +674,20 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/food/snacks/pancakes/update_icon(updates=ALL) - . = ..() - if(contents.len) - name = "stack of pancakes" - else - name = initial(name) +/obj/item/reagent_containers/food/snacks/pancakes/update_name() + name = contents.len ? "stack of pancakes" : initial(name) + return ..() + +/obj/item/reagent_containers/food/snacks/pancakes/update_icon(updates = ALL) + if(!(updates & UPDATE_OVERLAYS)) + return ..() + + updates &= ~UPDATE_OVERLAYS + . = ..() // Don't update overlays. We're doing that here + if(contents.len < LAZYLEN(overlays)) - overlays-=overlays[overlays.len] + overlays -= overlays[overlays.len] + . |= UPDATE_OVERLAYS /obj/item/reagent_containers/food/snacks/pancakes/examine(mob/user) var/ingredients_listed = "" diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 5b478fa3728e..c1e1ae5f61f9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -38,19 +38,18 @@ if(M.rating >= 2) . += "Gibber has been upgraded to process inorganic materials." -/obj/machinery/gibber/update_icon(updates=ALL) +/obj/machinery/gibber/update_overlays() . = ..() - cut_overlays() if (dirty) - add_overlay("grbloody") + . += "grbloody" if(stat & (NOPOWER|BROKEN)) return if (!occupant) - add_overlay("grjam") + . += "grjam" else if (operating) - add_overlay("gruse") + . += "gruse" else - add_overlay("gridle") + . += "gridle" /obj/machinery/gibber/attack_paw(mob/user) return attack_hand(user) diff --git a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm index 3af46ad12fbf..d0997899ad18 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm @@ -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(updates=ALL) +/obj/machinery/griddle/update_icon_state() . = ..() 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 29a62c32cc1b..33cec170c196 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(updates=ALL) +/obj/machinery/grill/update_icon_state() . = ..() if(grilled_item) icon_state = "grill" diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 78c4e814ff54..26eaa4c74366 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(updates=ALL) +/obj/machinery/microwave/update_icon_state() . = ..() if(broken) icon_state = "mwb" diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 79e2f187b7af..319c402f3226 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -42,9 +42,8 @@ QDEL_NULL(particles) . = ..() -/obj/machinery/oven/update_icon(updates=ALL) +/obj/machinery/oven/update_icon_state() . = ..() - update_overlays() if(panel_open) icon_state = "oven_o" return ..() diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index db10bf105bac..bf9da2bf7bd9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -149,7 +149,7 @@ update_appearance(UPDATE_ICON) ..(damage_flag) -/obj/machinery/smartfridge/update_icon(updates=ALL) +/obj/machinery/smartfridge/update_icon_state() . = ..() var/startstate = initial(icon_state) if(stat & BROKEN) @@ -477,13 +477,12 @@ ..() update_appearance(UPDATE_ICON) -/obj/machinery/smartfridge/drying_rack/update_icon(updates=ALL) +/obj/machinery/smartfridge/drying_rack/update_overlays() . = ..() - cut_overlays() if(drying) - add_overlay("drying_rack_drying") + . += "drying_rack_drying" if(contents.len) - add_overlay("drying_rack_filled") + . += "drying_rack_filled" /obj/machinery/smartfridge/drying_rack/process() ..() diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index ec6c318fa731..40e0ca66fa31 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -38,9 +38,8 @@ unprocess() return ..() -/obj/item/pizzabox/update_icon(updates=ALL) +/obj/item/pizzabox/update_desc(updates) . = ..() - // Description desc = initial(desc) if(open) if(pizza) @@ -58,34 +57,41 @@ if(box.boxtag != "") desc = "[desc] The [boxes.len ? "top box" : "box"]'s tag reads: [box.boxtag]" - // Icon/Overlays - cut_overlays() - if(open) +/obj/item/pizzabox/update_icon_state() + . = ..() + if(!open) + icon_state = "pizzabox" + return + if(pizza) + icon_state = "pizzabox_messy" + else if(bomb) + bomb.icon_state = "pizzabomb_[bomb_active ? "active" : "inactive"]" + else icon_state = "pizzabox_open" + +/obj/item/pizzabox/update_overlays() + . = ..() + if(open) if(pizza) - icon_state = "pizzabox_messy" var/mutable_appearance/pizza_overlay = mutable_appearance(pizza.icon, pizza.icon_state) pizza_overlay.pixel_y = -3 - add_overlay(pizza_overlay) + . += pizza_overlay if(bomb) - bomb.icon_state = "pizzabomb_[bomb_active ? "active" : "inactive"]" var/mutable_appearance/bomb_overlay = mutable_appearance(bomb.icon, bomb.icon_state) bomb_overlay.pixel_y = 5 - add_overlay(bomb_overlay) + . += bomb_overlay else - icon_state = "pizzabox" var/current_offset = 3 - for(var/V in boxes) - var/obj/item/pizzabox/P = V + for(var/obj/item/pizzabox/P as anything in boxes) var/mutable_appearance/box_overlay = mutable_appearance(P.icon, P.icon_state) box_overlay.pixel_y = current_offset - add_overlay(box_overlay) + . += box_overlay current_offset += 3 var/obj/item/pizzabox/box = boxes.len ? boxes[boxes.len] : src if(box.boxtag != "") var/mutable_appearance/tag_overlay = mutable_appearance(icon, "pizzabox_tag") tag_overlay.pixel_y = boxes.len * 3 - add_overlay(tag_overlay) + . += tag_overlay /obj/item/pizzabox/worn_overlays(isinhands, icon_file) . = list() diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm index 7e4f55ac5625..339b69433c67 100644 --- a/code/modules/games/cas.dm +++ b/code/modules/games/cas.dm @@ -95,7 +95,7 @@ qdel(SC) update_appearance(UPDATE_ICON) -/obj/item/toy/cards/deck/cas/update_icon(updates=ALL) +/obj/item/toy/cards/deck/cas/update_icon_state() . = ..() if(cards.len < 26) icon_state = "deck_[deckstyle]_low" @@ -137,7 +137,7 @@ return Flip() -/obj/item/toy/cards/singlecard/cas/update_icon(updates=ALL) +/obj/item/toy/cards/singlecard/cas/update_icon_state() . = ..() if(flipped) icon_state = "[card_face]_flipped" diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index 08e2b455144b..bbdc0c018aaa 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -118,7 +118,7 @@ anchored = FALSE update_appearance(UPDATE_ICON) -/obj/machinery/satellite/update_icon(updates=ALL) +/obj/machinery/satellite/update_icon_state() . = ..() icon_state = active ? "sat_active" : "sat_inactive" diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index a9852f65155e..c2fbe0a7d693 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -199,7 +199,7 @@ if(numbuttons == numready) begin_event() -/obj/machinery/readybutton/update_icon(updates=ALL) +/obj/machinery/readybutton/update_icon_state() . = ..() if(ready) icon_state = "auth_on" diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 7cab5a48b863..1ac4884134ef 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -122,7 +122,7 @@ /turf/open/floor/holofloor/carpet/update_icon(updates=ALL) . = ..() if(!.) - return 0 + return FALSE if(intact) queue_smooth(src) diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm index 4b2432474af6..7ed0c265abe1 100644 --- a/code/modules/hydroponics/beekeeping/honeycomb.dm +++ b/code/modules/hydroponics/beekeeping/honeycomb.dm @@ -20,14 +20,13 @@ update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/honeycomb/update_icon(updates=ALL) +/obj/item/reagent_containers/honeycomb/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/honey_overlay = mutable_appearance(icon, /datum/reagent/consumable/honey) if(honey_color) honey_overlay.icon_state = "greyscale_honey" honey_overlay.color = honey_color - add_overlay(honey_overlay) + . += honey_overlay /obj/item/reagent_containers/honeycomb/proc/set_reagent(reagent) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index c919ccbc2295..09784f69b812 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -65,7 +65,7 @@ /obj/machinery/biogenerator/on_reagent_change(changetype) //When the reagents change, change the icon as well. update_appearance(UPDATE_ICON) -/obj/machinery/biogenerator/update_icon(updates=ALL) +/obj/machinery/biogenerator/update_icon_state() . = ..() if(panel_open) icon_state = "biogen-empty-o" diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index d2f943866f10..dae9aecdbe9c 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -65,7 +65,7 @@ to_chat(user, span_notice("You close [src], letting you draw from its tap.")) update_appearance(UPDATE_ICON) -/obj/structure/fermenting_barrel/update_icon(updates=ALL) +/obj/structure/fermenting_barrel/update_icon_state() . = ..() if(open) icon_state = "barrel_open" diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 731969a2e981..3e359763d439 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -55,19 +55,21 @@ min_wchance = 0 min_wrate = 0 -/obj/machinery/plantgenes/update_icon(updates=ALL) +/obj/machinery/plantgenes/update_icon_state() . = ..() - cut_overlays() if((stat & (BROKEN|NOPOWER))) icon_state = "dnamod-off" else icon_state = "dnamod" + +/obj/machinery/plantgenes/update_overlays() + . = ..() if(seed) - add_overlay("dnamod-dna") + . += "dnamod-dna" if(disk) - add_overlay("dnamod-disk") + . += "dnamod-disk" if(panel_open) - add_overlay("dnamod-open") + . += "dnamod-open" /obj/machinery/plantgenes/attackby(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) @@ -439,11 +441,10 @@ src.pixel_x = rand(-5, 5) src.pixel_y = rand(-5, 5) -/obj/item/disk/plantgene/update_icon(updates=ALL) +/obj/item/disk/plantgene/update_overlays() . = ..() - cut_overlays() if(gene) - add_overlay("datadisk_gene") + . += "datadisk_gene" /obj/item/disk/plantgene/update_name(updates=ALL) . = ..() diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index aba47d985c6e..0fa649ac58f1 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -139,7 +139,7 @@ qdel(src) -/obj/structure/bookcase/update_icon(updates=ALL) +/obj/structure/bookcase/update_icon_state() . = ..() if(contents.len < 5) icon_state = "book-[contents.len]" diff --git a/code/modules/mapping/minimap.dm b/code/modules/mapping/minimap.dm index 169c9e1c09f8..d802961f84b9 100644 --- a/code/modules/mapping/minimap.dm +++ b/code/modules/mapping/minimap.dm @@ -107,15 +107,14 @@ minimaps += SSmapping.station_minimaps update_appearance(UPDATE_ICON) -/obj/item/map/update_icon(updates=ALL) +/obj/item/map/update_overlays() . = ..() - cut_overlays() var/datum/minimap/map = minimaps[1] if(!map) return var/image/I = image(map.overlay_icon) I.pixel_x = 8 I.pixel_y = 8 - add_overlay(I) + . += I /obj/item/map/interact(mob/user) if(!in_range(user, src) && !isobserver(user)) diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 6ab45101d717..fef73a241e6e 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -126,12 +126,11 @@ AddComponent(/datum/component/spraycan_paintable) update_appearance(UPDATE_ICON) -/obj/item/clothing/head/helmet/space/hostile_environment/update_icon(updates=ALL) +/obj/item/clothing/head/helmet/space/hostile_environment/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hostile_env_glass") glass_overlay.appearance_flags = RESET_COLOR - add_overlay(glass_overlay) + . += glass_overlay /obj/item/clothing/head/helmet/space/hostile_environment/worn_overlays(isinhands) . = ..() diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index c80649adfa1a..8d3bf20498c9 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=ALL) //Updates the sprite for in-hand and on-mob. +/obj/item/twohanded/kinetic_crusher/update_icon_state() //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(updates=ALL) +/obj/item/twohanded/kinetic_crusher/mega/update_icon_state() . = ..() icon_state = "magmite_crusher[wielded]" diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index d55e11f59ac9..6092c14a996d 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -40,7 +40,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( . += "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(updates=ALL) +/obj/item/stack/marker_beacon/update_icon_state() . = ..() icon_state = "[initial(icon_state)][lowertext(picked_color)]" @@ -97,7 +97,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_icon(updates=ALL) +/obj/structure/marker_beacon/update_icon_state() . = ..() while(!picked_color || !GLOB.marker_beacon_colors[picked_color]) picked_color = pick(GLOB.marker_beacon_colors) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 796b0832b7e5..9d37497ef21f 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -136,15 +136,17 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/organ/regenerative_core/update_icon(updates=ALL) +/obj/item/organ/regenerative_core/update_icon_state() . = ..() icon_state = inert ? "legion_soul_inert" : "legion_soul" - cut_overlays() - if(!inert && !preserved) - add_overlay("legion_soul_crackle") for(var/datum/action/A as anything in actions) A.build_all_button_icons() +/obj/item/organ/regenerative_core/update_overlays() + . = ..() + if(!inert && !preserved) + . += "legion_soul_crackle" + /obj/item/organ/regenerative_core/legion/go_inert() ..() desc = "[src] has become inert. It has decayed, and is completely useless." diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index c5288c48e6c0..aca65db28b05 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -138,12 +138,10 @@ icon = 'icons/obj/lavaland/survival_pod.dmi' icon_state = "sleeper" -/obj/machinery/sleeper/survival_pod/update_icon(updates=ALL) +/obj/machinery/sleeper/survival_pod/update_overlays() . = ..() - if(state_open) - cut_overlays() - else - add_overlay("sleeper_cover") + if(!state_open) + . += "sleeper_cover" //Lifeform Stasis Unit /obj/machinery/stasis/survival_pod diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 6e317d5ca45e..9b0e1fbec3df 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -300,15 +300,17 @@ icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_bowl" -/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_icon(updates=ALL) +/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_icon_state() + . = ..() + if(!reagents || !reagents.total_volume) + icon_state = "mushroom_bowl" + +/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_overlays() . = ..() - cut_overlays() if(reagents && reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/lavaland/ash_flora.dmi', "fullbowl") filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) - else - icon_state = "mushroom_bowl" + . += filling /obj/item/reagent_containers/glass/bowl/mushroom_bowl/attackby(obj/item/I,mob/user, params) if(istype(I, /obj/item/reagent_containers/food/snacks)) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 8e5b02716e28..0d1a714d2c28 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(updates=ALL) +/obj/machinery/mineral/ore_redemption/update_icon_state() . = ..() if(powered()) icon_state = initial(icon_state) diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index ecf2607a0c45..199f179584a3 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(updates=ALL) +/obj/machinery/mineral/equipment_vendor/update_icon_state() . = ..() if(powered()) icon_state = initial(icon_state) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 2543ca87517e..c76af3e8265d 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -22,26 +22,24 @@ var/list/stack_overlays var/edible = FALSE //can a preternis eat it for some funny effect? -/obj/item/stack/ore/update_icon(updates=ALL) +/obj/item/stack/ore/update_overlays() . = ..() var/difference = min(ORESTACK_OVERLAYS_MAX, amount) - (LAZYLEN(stack_overlays)+1) if(difference == 0) return else if(difference < 0 && LAZYLEN(stack_overlays)) //amount < stack_overlays, remove excess. - cut_overlays() if (LAZYLEN(stack_overlays)-difference <= 0) stack_overlays = null; else stack_overlays.len += difference else if(difference > 0) //amount > stack_overlays, add some. - cut_overlays() for(var/i in 1 to difference) var/mutable_appearance/newore = mutable_appearance(icon, icon_state) newore.pixel_x = rand(-8,8) newore.pixel_y = rand(-8,8) LAZYADD(stack_overlays, newore) if (stack_overlays) - add_overlay(stack_overlays) + . += stack_overlays /obj/item/stack/ore/welder_act(mob/living/user, obj/item/I) if(!refined_type) @@ -635,12 +633,11 @@ 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(updates=ALL) +/obj/item/coinstack/update_overlays() . = ..() - cut_overlays() for(var/i in 1 to length(coins)) var/obj/item/coin/C = coins[i] - src.add_overlay(image(icon = C.icon,icon_state = C.coin_stack_icon_state, pixel_y = (i-1)*2)) + . += image(icon = C.icon,icon_state = C.coin_stack_icon_state, pixel_y = (i-1)*2) /obj/item/coinstack/attack_hand(mob/user) ///take a coin off the top of the stack remove_from_stack(user) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index e7a9e8e6f6b3..9e19800e8442 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_appearance(UPDATE_ICON) + update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(update)), 5) /obj/machinery/power/apc/Destroy() @@ -322,19 +322,18 @@ cell = best_cell W.play_rped_sound() +#define APC_UPDATE_STATE (1<<0) +#define APC_UPDATE_OVERLAYS (1<<1) // update the APC icon to show the three base states // also add overlays for indicator lights /obj/machinery/power/apc/update_icon(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 - if(!update) - icon_update_needed = FALSE + updates=check_updates() + if(!updates) return - if(update & 1) // Updating the icon state + if(updates & APC_UPDATE_STATE) // Updating the icon state if(update_state & UPSTATE_ALLGOOD) icon_state = "apc0" else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) @@ -361,7 +360,7 @@ if(!(update_state & UPSTATE_ALLGOOD)) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(update & 2) + if(updates & APC_UPDATE_OVERLAYS) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir) @@ -454,15 +453,18 @@ update_overlay |= APC_UPOVERLAY_ENVIRON2 - var/results = 0 + var/results = NONE if(last_update_state == update_state && last_update_overlay == update_overlay) - return 0 + return results if(last_update_state != update_state) - results += 1 + results ^= APC_UPDATE_STATE if(last_update_overlay != update_overlay) - results += 2 + results ^= APC_UPDATE_OVERLAYS return results +#undef APC_UPDATE_STATE +#undef APC_UPDATE_OVERLAYS + // Used in process so it doesn't update the icon too much /obj/machinery/power/apc/proc/queue_icon_update() icon_update_needed = TRUE From e38ea581d14e634d4307cd542203bba324a2bdd8 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:05:18 -0400 Subject: [PATCH 18/50] going through more update icons --- code/modules/NTNet/relays.dm | 8 +++-- .../antagonists/blob/structures/_blob.dm | 1 + .../machinery/pipes/layermanifold.dm | 2 +- code/modules/flufftext/Hallucination.dm | 1 + .../food_and_drinks/food/snacks_pastry.dm | 13 +------ .../mining/lavaland/necropolis_chests.dm | 15 +++++--- code/modules/mob/living/brain/MMI.dm | 9 +++-- code/modules/mob/living/brain/posibrain.dm | 2 +- .../silicon/ai/decentralized/ai_data_core.dm | 3 +- .../ai/decentralized/server_cabinet.dm | 13 ++++--- .../mob/living/simple_animal/bot/atmosbot.dm | 2 +- .../mob/living/simple_animal/bot/bot.dm | 2 +- .../living/simple_animal/bot/construction.dm | 2 +- .../mob/living/simple_animal/bot/firebot.dm | 2 +- .../mob/living/simple_animal/bot/floorbot.dm | 2 +- .../mob/living/simple_animal/bot/medbot.dm | 10 +++--- .../mob/living/simple_animal/bot/mulebot.dm | 8 +++-- .../mob/living/simple_animal/bot/secbot.dm | 3 +- .../simple_animal/friendly/spiderbot.dm | 2 +- .../hostile/megafauna/colossus.dm | 5 +-- .../computers/item/tablet/tablet.dm | 2 +- code/modules/paperwork/carbonpaper.dm | 2 +- code/modules/paperwork/clipboard.dm | 5 ++- code/modules/paperwork/filingcabinet.dm | 5 ++- code/modules/paperwork/folders.dm | 5 ++- code/modules/paperwork/inspector_booth.dm | 2 +- code/modules/paperwork/paper.dm | 4 +-- code/modules/paperwork/paper_bundle.dm | 7 ++-- code/modules/paperwork/paper_cutter.dm | 10 +++--- code/modules/paperwork/paperbin.dm | 8 +++-- code/modules/paperwork/paperplane.dm | 5 ++- code/modules/paperwork/papershredder.dm | 27 ++++++++------- code/modules/paperwork/ticketmachine.dm | 21 ++++++------ code/modules/photography/photos/frame.dm | 10 +++--- code/modules/plumbing/ducts.dm | 5 +-- code/modules/power/cable.dm | 7 +++- code/modules/power/cell.dm | 8 ++--- code/modules/power/generator.dm | 34 ++++++++++--------- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/port_gen.dm | 2 +- code/modules/power/singularity/collector.dm | 7 ++-- code/modules/power/singularity/emitter.dm | 2 +- .../power/singularity/field_generator.dm | 9 +++-- code/modules/power/singularity/generator.dm | 21 +++++++----- .../particle_accelerator.dm | 2 +- .../particle_accelerator/particle_control.dm | 4 +-- code/modules/power/smes.dm | 19 +++++------ code/modules/power/solar.dm | 16 ++++----- .../projectiles/ammunition/_ammunition.dm | 5 ++- .../projectiles/ammunition/reusable/arrow.dm | 19 +++++------ .../projectiles/ammunition/reusable/foam.dm | 2 +- .../projectiles/attachments/_attachment.dm | 2 +- .../boxes_magazines/_box_magazine.dm | 14 +++++--- .../boxes_magazines/external/grenade.dm | 2 +- .../boxes_magazines/external/lmg.dm | 2 +- .../boxes_magazines/external/pistol.dm | 8 ++--- .../boxes_magazines/external/rechargable.dm | 22 ++++++------ .../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 ++-- code/modules/projectiles/guns/ballistic.dm | 30 +++++++++------- .../projectiles/guns/ballistic/automatic.dm | 20 +++++------ .../modules/projectiles/guns/ballistic/bow.dm | 26 ++++++++------ .../guns/ballistic/laser_gatling.dm | 2 +- .../projectiles/guns/ballistic/minigun.dm | 2 +- .../projectiles/guns/ballistic/rifle.dm | 4 +-- .../projectiles/guns/ballistic/shotgun.dm | 2 +- .../modules/projectiles/guns/ballistic/toy.dm | 16 ++++----- code/modules/projectiles/guns/energy.dm | 4 +-- .../projectiles/guns/energy/dueling.dm | 5 ++- 72 files changed, 293 insertions(+), 280 deletions(-) diff --git a/code/modules/NTNet/relays.dm b/code/modules/NTNet/relays.dm index ccfdb6b73a3f..777ea33d6d4c 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -32,12 +32,14 @@ return FALSE return TRUE -/obj/machinery/ntnet_relay/update_icon(updates=ALL) +/obj/machinery/ntnet_relay/update_overlays() . = ..() - cut_overlays() if(is_operational()) var/mutable_appearance/on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") - add_overlay(on_overlay) + . += on_overlay + +/obj/machinery/ntnet_relay/update_icon_state() + . = ..() if(panel_open) icon_state = "[initial(icon_state)]_o" else diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index 6e4eea32a376..4dc3b9db4892 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -83,6 +83,7 @@ . = . || (mover.pass_flags & PASSBLOB) /obj/structure/blob/update_icon(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 diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index 14b95da4d789..e0af1acdaeda 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -43,7 +43,7 @@ return front_nodes + back_nodes + nodes /obj/machinery/atmospherics/pipe/layer_manifold/update_icon(updates=ALL) //HEAVILY WIP FOR UPDATE ICONS!! - cut_overlays() + . = ..() layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else. for(var/node in front_nodes) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index a05e5acfd46a..70cf206a0b17 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -116,6 +116,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( target.client.images |= current_image /obj/effect/hallucination/simple/update_icon(updates=ALL, new_state, new_icon, new_px=0, new_py=0) + . = ..() image_state = new_state if(new_icon) image_icon = new_icon diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 41dfc8d6394c..85b3f53dacdc 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -715,7 +715,7 @@ bitecount = originalBites /obj/item/reagent_containers/food/snacks/pancakes/attackby(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/reagent_containers/food/snacks/pancakes/)) + if(istype(I, /obj/item/reagent_containers/food/snacks/pancakes)) var/obj/item/reagent_containers/food/snacks/pancakes/P = I if((contents.len >= PANCAKE_MAX_STACK) || ((P.contents.len + contents.len) > PANCAKE_MAX_STACK) || (reagents.total_volume >= volume)) to_chat(user, span_warning("You can't add that many pancakes to [src]!")) @@ -740,17 +740,6 @@ return O.attackby(I, user, params) ..() -/obj/item/reagent_containers/food/snacks/pancakes/update_icon(updates = ALL) - if(!(updates & UPDATE_OVERLAYS)) - return ..() - - updates &= ~UPDATE_OVERLAYS - . = ..() // Don't update overlays. We're doing that here - - if(contents.len < LAZYLEN(overlays)) - overlays -= overlays[overlays.len] - . |= UPDATE_OVERLAYS - /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 ..() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index e371d42e9f3c..ca7fca0747f4 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -683,15 +683,20 @@ 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(updates=ALL) +/obj/item/reagent_containers/glass/bottle/potion/update_desc(updates) . = ..() if(reagents.total_volume) - icon_state = initial(icon_state) desc = initial(desc) else - icon_state = "[initial(icon_state)]_empty" desc = "An ornate red bottle, with an \"S\" embossed into the underside." +/obj/item/reagent_containers/glass/bottle/potion/update_icon_state() + . = ..() + if(reagents.total_volume) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]_empty" + /datum/reagent/flightpotion name = "Flight Potion" description = "Strange mutagenic compound of unknown origins." @@ -1505,7 +1510,7 @@ 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(updates=ALL) +/obj/item/hierophant_club/update_icon_state() . = ..() icon_state = "hierophant_club[timer <= world.time ? "_ready":""][(beacon && !QDELETED(beacon)) ? "":"_beacon"]" item_state = icon_state @@ -1745,7 +1750,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(updates=ALL) +/obj/item/twohanded/bonespear/stalwartpike/update_icon_state() . = ..() if(wielded) icon_state = "stalwart_spear1" diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 7ad4cbe455a8..f527d66bd968 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(updates=ALL) +/obj/item/mmi/update_icon_state() . = ..() if(!brain) icon_state = "mmi_off" @@ -35,10 +35,13 @@ else icon_state = "mmi_brain" braintype = "Cyborg" + +/obj/item/mmi/update_overlays() + . = ..() if(brainmob && brainmob.stat != DEAD) - add_overlay("mmi_alive") + . += "mmi_alive" else - add_overlay("mmi_dead") + . += "mmi_dead" /obj/item/mmi/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index ac45319e64c0..9cbd0c449b68 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -210,7 +210,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) return -/obj/item/mmi/posibrain/update_icon(updates=ALL) +/obj/item/mmi/posibrain/update_icon_state() . = ..() if(searching) icon_state = "[initial(icon_state)]-searching" 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 d4189f8b325f..30d79f578e14 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 @@ -214,9 +214,8 @@ GLOBAL_VAR_INIT(primary_data_core, null) if(AI.eyeobj) AI.eyeobj.forceMove(get_turf(src)) -/obj/machinery/ai/data_core/update_icon(updates=ALL) +/obj/machinery/ai/data_core/update_icon_state() . = ..() - cut_overlays() if(!(stat & (BROKEN|EMPED)) && has_power()) if(!valid_data_core()) 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 4396b205b52f..64b2fca5cd33 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/server_cabinet.dm @@ -96,27 +96,26 @@ GLOBAL_LIST_EMPTY(server_cabinets) GLOB.ai_os.update_hardware() -/obj/machinery/ai/server_cabinet/update_icon(updates=ALL) +/obj/machinery/ai/server_cabinet/update_overlays() . = ..() - cut_overlays() if(installed_racks.len > 0) var/mutable_appearance/top_overlay = mutable_appearance(icon, "expansion_bus_top") - add_overlay(top_overlay) + . += top_overlay if(installed_racks.len > 1) var/mutable_appearance/bottom_overlay = mutable_appearance(icon, "expansion_bus_bottom") - add_overlay(bottom_overlay) + . += bottom_overlay if(!(stat & (BROKEN|NOPOWER|EMPED))) var/mutable_appearance/on_overlay = mutable_appearance(icon, "expansion_bus_on") - add_overlay(on_overlay) + . += on_overlay if(!valid_ticks) return if(installed_racks.len > 0) var/mutable_appearance/on_top_overlay = mutable_appearance(icon, "expansion_bus_top_on") - add_overlay(on_top_overlay) + . += on_top_overlay if(installed_racks.len > 1) var/mutable_appearance/on_bottom_overlay = mutable_appearance(icon, "expansion_bus_bottom_on") - add_overlay(on_bottom_overlay) + . += on_bottom_overlay /obj/machinery/ai/server_cabinet/attackby(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/server_rack)) diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index e86f67e520c6..d1aff575409a 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -196,7 +196,7 @@ update_controls() update_appearance(UPDATE_ICON) -/mob/living/simple_animal/bot/atmosbot/update_icon(updates=ALL) +/mob/living/simple_animal/bot/atmosbot/update_icon_state() . = ..() icon_state = "atmosbot[on][on?"_[action]":""]" diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index a0e812ba5d71..80e0cd8feb40 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -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/update_icon(updates=ALL) +/mob/living/simple_animal/bot/update_icon_state() . = ..() icon_state = "[initial(icon_state)][on]" diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 095aa366d125..bc3adbab0a85 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -214,7 +214,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/bot_assembly/floorbot/update_icon(updates=ALL) +/obj/item/bot_assembly/floorbot/update_appearance(updates=ALL) . = ..() switch(build_step) if(ASSEMBLY_FIRST_STEP) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 8997b576225c..f23f711e00b6 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -286,7 +286,7 @@ flick("firebot1_use", user) internal_ext.afterattack(target, user, null) -/mob/living/simple_animal/bot/firebot/update_icon(updates=ALL) +/mob/living/simple_animal/bot/firebot/update_icon_state() . = ..() if(!on) icon_state = "firebot0" diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 76995a260562..2313094685e2 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -359,7 +359,7 @@ anchored = FALSE target = null -/mob/living/simple_animal/bot/floorbot/update_icon(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 d8c165849627..e38f4bd6c3bd 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -91,11 +91,8 @@ treatment_tox_avoid = null treatment_tox = /datum/reagent/toxin/sodium_thiopental -/mob/living/simple_animal/bot/medbot/update_icon(updates=ALL) +/mob/living/simple_animal/bot/medbot/update_icon_state() . = ..() - cut_overlays() - if(skin) - add_overlay("medskin_[skin]") if(!on) icon_state = "medibot0" return @@ -110,6 +107,11 @@ else icon_state = "medibot1" +/mob/living/simple_animal/bot/medbot/update_overlays() + . = ..() + if(skin) + . += "medskin_[skin]" + /mob/living/simple_animal/bot/medbot/Initialize(mapload, new_skin) . = ..() var/datum/job/doctor/J = new /datum/job/doctor diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6d79cced7647..c9aa2c2700d5 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -124,18 +124,20 @@ flick("mulebot-emagged", src) playsound(src, "sparks", 100, 0) -/mob/living/simple_animal/bot/mulebot/update_icon(updates=ALL) +/mob/living/simple_animal/bot/mulebot/update_icon_state() . = ..() if(open) icon_state="mulebot-hatch" else icon_state = "mulebot[wires.is_cut(WIRE_AVOIDANCE)]" - cut_overlays() + +/mob/living/simple_animal/bot/mulebot/update_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) + . += load /mob/living/simple_animal/bot/mulebot/ex_act(severity) unload(0) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 64d869412897..c92b01854abf 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -83,11 +83,10 @@ if(prob(5)) russian = TRUE // imported from Russia -/mob/living/simple_animal/bot/secbot/update_icon(updates=ALL) +/mob/living/simple_animal/bot/secbot/update_icon_state() . = ..() if(mode == BOT_HUNT) icon_state = "[initial(icon_state)]-c" - return /mob/living/simple_animal/bot/secbot/turn_off() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index b4fc54249ac2..a276f50f18a7 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -131,7 +131,7 @@ if(!QDELETED(src) && stat != DEAD) death() -/mob/living/simple_animal/spiderbot/update_icon(updates=ALL) +/mob/living/simple_animal/spiderbot/update_icon_state() . = ..() if(mmi) if(istype(mmi, /obj/item/mmi/posibrain)) 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 96773a5aae98..1c43b1b77d97 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -300,10 +300,6 @@ Difficulty: Very Hard var/list/stored_items = list() var/list/blacklist = list() -/obj/machinery/smartfridge/black_box/update_icon(updates=ALL) - . = ..() - return - /obj/machinery/smartfridge/black_box/accept_check(obj/item/O) if(!istype(O)) return FALSE @@ -313,6 +309,7 @@ Difficulty: Very Hard return TRUE /obj/machinery/smartfridge/black_box/Initialize(mapload) + AddElement(/datum/element/update_icon_blocker) . = ..() var/static/obj/machinery/smartfridge/black_box/current if(current && current != src) diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index 83fda287c284..f372b776d531 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -60,7 +60,7 @@ else return ..() -/obj/item/modular_computer/tablet/update_icon(updates=ALL) +/obj/item/modular_computer/tablet/update_icon_state() . = ..() if (!isnull(variants)) if(!finish_color) diff --git a/code/modules/paperwork/carbonpaper.dm b/code/modules/paperwork/carbonpaper.dm index 90ee059e81d3..4ef391075ba4 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(updates=ALL) +/obj/item/paper/carbon/update_icon_state() . = ..() if(iscopy) if(written.len) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 4e33a34ad1d7..e29c311c70f6 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -25,9 +25,8 @@ QDEL_NULL(toppaper) //let movable/Destroy handle the rest return ..() -/obj/item/clipboard/update_icon(updates=ALL) +/obj/item/clipboard/update_overlays() . = ..() - cut_overlays() var/list/dat = list() if(toppaper) dat += toppaper.icon_state @@ -35,7 +34,7 @@ if(haspen) dat += "clipboard_pen" dat += "clipboard_over" - add_overlay(dat) + . += dat /obj/item/clipboard/attackby(obj/item/W, mob/user, params) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index ce787e343c1e..bf9c5688377b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -60,12 +60,11 @@ icon_state = "coloredcabinet_frame" name = "colored cabinet" -/obj/structure/filingcabinet/colored/update_icon(updates=ALL) +/obj/structure/filingcabinet/colored/update_overlays() . = ..() - cut_overlays() var/mutable_appearance/cab = mutable_appearance(icon, "coloredcabinet_trim") cab.color = colour - add_overlay(cab) + . += cab /obj/structure/filingcabinet/Initialize(mapload) . = ..() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 0ee702fa4e55..ae42022663ac 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -28,11 +28,10 @@ icon_state = "folder_white" -/obj/item/folder/update_icon(updates=ALL) +/obj/item/folder/update_overlays() . = ..() - cut_overlays() if(contents.len) - add_overlay("folder_paper") + . += "folder_paper" /obj/item/folder/attackby(obj/item/W, mob/user, params) diff --git a/code/modules/paperwork/inspector_booth.dm b/code/modules/paperwork/inspector_booth.dm index 5f48396efb58..6c553e82c9fa 100644 --- a/code/modules/paperwork/inspector_booth.dm +++ b/code/modules/paperwork/inspector_booth.dm @@ -57,7 +57,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/machinery/inspector_booth/update_icon(updates=ALL) +/obj/machinery/inspector_booth/update_icon_state() . = ..() if (stat & NOPOWER) icon_state = "booth_off" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index af9533845905..5746bdac9e60 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -79,8 +79,8 @@ update_appearance(UPDATE_ICON) -/obj/item/paper/update_icon(updates=ALL) - +/obj/item/paper/update_icon_state() + . = ..() if(resistance_flags & ON_FIRE) icon_state = "paper_onfire" return diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 3c95e72e33d5..c9a1d7e0e80c 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -205,9 +205,8 @@ /obj/item/paper_bundle/AltClick(mob/living/user) unbundle() -/obj/item/paper_bundle/update_icon(updates=ALL) +/obj/item/paper_bundle/update_overlays() . = ..() - cut_overlays() var/obj/item/paper/P = src[1] icon_state = P.icon_state overlays = P.overlays @@ -229,12 +228,12 @@ var/datum/picture/picture2 = PR.picture img = picture2.picture_icon photo = 1 - add_overlay(img) + . += img if(i>1) desc = "[i] papers clipped to each other." else desc = "A single sheet of paper." if(photo) desc += "\nThere is a photo attached to it." - add_overlay(image('icons/obj/bureaucracy.dmi', icon_state= "clip")) + . += image('icons/obj/bureaucracy.dmi', icon_state= "clip") return diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 8fc213ddfa14..6479e517e712 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -33,14 +33,14 @@ playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1) return (BRUTELOSS) - -/obj/item/papercutter/update_icon(updates=ALL) +/obj/item/papercutter/update_icon_state() . = ..() - cut_overlays() icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]") - if(storedpaper) - add_overlay("paper") +/obj/item/papercutter/update_overlays() + . = ..() + if(storedpaper) + . += "paper" /obj/item/papercutter/attackby(obj/item/P, mob/user, params) if(istype(P, /obj/item/paper) && !storedpaper) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index fa60d1cbb2be..5224bf678d83 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -131,15 +131,17 @@ else . += "It doesn't contain anything." -/obj/item/paper_bin/update_icon(updates=ALL) +/obj/item/paper_bin/update_icon_state() . = ..() if(total_paper < 1) icon_state = "paper_bin0" else icon_state = "[initial(icon_state)]" - cut_overlays() + +/obj/item/paper_bin/update_overlays() + . = ..() if(bin_pen) - add_overlay(mutable_appearance(bin_pen.icon, bin_pen.icon_state)) + . += mutable_appearance(bin_pen.icon, bin_pen.icon_state) /obj/item/paper_bin/construction name = "construction paper bin" diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 68955ea225b9..84115fc68f1f 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -52,13 +52,12 @@ sleep(1 SECONDS) return (BRUTELOSS) -/obj/item/paperplane/update_icon(updates=ALL) +/obj/item/paperplane/update_overlays() . = ..() - cut_overlays() var/list/stamped = internalPaper.stamped if(stamped) for(var/S in stamped) - add_overlay("paperplane_[S]") + . += "paperplane_[S]" /obj/item/paperplane/attack_self(mob/user) to_chat(user, span_notice("You unfold [src].")) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 7e1334feb002..d176edb1d1c0 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -118,20 +118,21 @@ /obj/machinery/papershredder/AltClick(mob/living/user) emptypaper() -/obj/machinery/papershredder/update_icon(updates=ALL) +/obj/machinery/papershredder/update_icon_state() . = ..() - if(paperamount == 0) - icon_state = "papershredder0" - if(paperamount == 1||paperamount == 2) - icon_state = "papershredder1" - if(paperamount == 3||paperamount == 4) - icon_state = "papershredder2" - if(paperamount == 5||paperamount == 6) - icon_state = "papershredder3" - if(paperamount == 7||paperamount == 8) - icon_state = "papershredder4" - if(paperamount == 9||paperamount == 10) - icon_state = "papershredder5" + switch(paperamount) //cant we just use round(paperamount, 2) + if(0) + icon_state = "papershredder0" + if(1, 2) + icon_state = "papershredder1" + if(3, 4) + icon_state = "papershredder2" + if(5, 6) + icon_state = "papershredder3" + if(7, 8) + icon_state = "papershredder4" + if(9, 10) + icon_state = "papershredder5" /obj/item/shreddedpaper name = "shredded paper" diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 081c0f11d821..7c77eaaee889 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -20,16 +20,18 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/machinery/ticket_machine/update_icon(updates=ALL) +/obj/machinery/ticket_machine/update_overlays() . = ..() 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 var/Digit3 = round(((Temp-Digit1-Digit2*10)*0.01)%10)//Same as above. Despite the weird notation these will only ever output integers, don't worry. - cut_overlays()//this clears the overlays, so they don't start stacking on each other - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_first_[Digit1]")) - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_second_[Digit2]")) - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_third_[Digit3]")) + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_first_[Digit1]") + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_second_[Digit2]") + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "machine_third_[Digit3]") + +/obj/machinery/ticket_machine/update_icon_state() + . = ..() switch(currentNum) //Gives you an idea of how many tickets are left if(0 to 200) icon_state = "ticketmachine_100" @@ -145,16 +147,15 @@ var/obj/machinery/ticket_machine/source var/ticket_number -/obj/item/ticket_machine_ticket/update_icon(updates=ALL) +/obj/item/ticket_machine_ticket/update_overlays() . = ..() 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) var/Digit3 = round(((Temp-Digit1-Digit2*10)*0.01)%10) - cut_overlays()//this clears the overlays, so they don't start stacking on each other - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_first_[Digit1]")) - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_second_[Digit2]")) - add_overlay(image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_third_[Digit3]")) + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_first_[Digit1]") + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_second_[Digit2]") + . += image('icons/obj/bureaucracy_overlays.dmi',icon_state = "ticket_third_[Digit3]") if(resistance_flags & ON_FIRE) icon_state = "ticket_onfire" diff --git a/code/modules/photography/photos/frame.dm b/code/modules/photography/photos/frame.dm index 366a074bb070..69f74f858e37 100644 --- a/code/modules/photography/photos/frame.dm +++ b/code/modules/photography/photos/frame.dm @@ -44,11 +44,10 @@ else return ..() -/obj/item/wallframe/picture/update_icon(updates=ALL) +/obj/item/wallframe/picture/update_overlays() . = ..() - cut_overlays() if(displayed) - add_overlay(image(displayed)) + . += image(displayed) /obj/item/wallframe/picture/after_attach(obj/O) ..() @@ -149,11 +148,10 @@ if(framed) framed.show(user) -/obj/structure/sign/picture_frame/update_icon(updates=ALL) +/obj/structure/sign/picture_frame/update_overlays() . = ..() - cut_overlays() if(framed) - add_overlay(image(framed)) + . += image(framed) /obj/structure/sign/picture_frame/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index 2a3c099c9f8a..94d793dc5bde 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_icon(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_icon_state() //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) @@ -262,7 +263,7 @@ All the important duct code: dumb = TRUE -/obj/machinery/duct/multilayered/update_icon(updates=ALL) +/obj/machinery/duct/multilayered/update_icon_state() . = ..() icon_state = initial(icon_state) if((connects & NORTH) || (connects & SOUTH)) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index f05e5bcabc19..ce635ab77d2c 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -563,12 +563,17 @@ By design, d1 is the smallest direction and d2 is the highest return return ..() -/obj/item/stack/cable_coil/update_icon(updates=ALL) +/obj/item/stack/cable_coil/update_icon_state() . = ..() if(novariants) return icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" item_state = "coil_[cable_color]" + +/obj/item/stack/cable_coil/update_name(updates) + . = ..() + if(novariants) + return name = "cable [amount < 3 ? "piece" : "coil"]" /obj/item/stack/cable_coil/attack_hand(mob/user) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 5861cbfc158e..4bb016a68bca 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -96,17 +96,17 @@ else return PROCESS_KILL -/obj/item/stock_parts/cell/update_icon(updates=ALL) +/obj/item/stock_parts/cell/update_overlays() . = ..() cut_overlays() if(grown_battery) - add_overlay(image('icons/obj/power.dmi',"grown_wires")) + . += image('icons/obj/power.dmi',"grown_wires") if(charge < 0.01) return else if(charge/maxcharge >=0.995) - add_overlay("cell-o2") + . += "cell-o2" else - add_overlay("cell-o1") + . += "cell-o1" /obj/item/stock_parts/cell/proc/percent() // return % charge of cell return 100*charge/maxcharge diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 0ede6cc0d48c..5fdb7e9646cf 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -31,30 +31,32 @@ SSair.atmos_machinery -= src return ..() -/obj/machinery/power/generator/update_icon(updates=ALL) +/obj/machinery/power/generator/update_icon_state() . = ..() - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(stat & (BROKEN)) icon_state = "teg-broken" return - if(hot_circ && cold_circ) - icon_state = "teg-assembled" - else + if(!hot_circ || !cold_circ) icon_state = "teg-unassembled" + return + icon_state = "teg-assembled" + +/obj/machinery/power/generator/update_overlays() + . = ..() + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + if(stat & (BROKEN)) + return + + if(!hot_circ || !cold_circ) if(panel_open) - add_overlay("teg-panel") + . += "teg-panel" return - if(!powernet) - add_overlay("teg-nogrid") - if(stat & (NOPOWER)) - return - else - var/L = min(round(lastgenlev/100000),11) - if(L != 0) - SSvis_overlays.add_vis_overlay(src, icon, "teg-op[L]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) + . += "teg-nogrid" + + var/L = min(round(lastgenlev/100000), 11) + if(L != 0) + SSvis_overlays.add_vis_overlay(src, icon, "teg-op[L]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) #define GENRATE 800 // generator output coefficient from Q diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 1187b3e45c18..ef18ec4231a3 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(updates=ALL) +/obj/machinery/gravity_generator/update_icon_state() . = ..() icon_state = "[get_status()]_[sprite_number]" diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 1326d1652960..95601ccc3b3a 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -53,7 +53,7 @@ update_appearance(UPDATE_ICON) soundloop.start() -/obj/machinery/power/port_gen/update_icon(updates=ALL) +/obj/machinery/power/port_gen/update_icon_state() . = ..() icon_state = "[base_icon]_[active]" diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index d957f631aa5f..0e3bc6ba00d4 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -301,15 +301,14 @@ 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(updates=ALL) +/obj/machinery/power/rad_collector/update_overlays() . = ..() - cut_overlays() if(loaded_tank) - add_overlay("ptank") + . += "ptank" if(stat & (NOPOWER|BROKEN)) return if(active) - add_overlay("on") + . += "on" //honestly this should be balanced /obj/machinery/power/rad_collector/RefreshParts() diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 5103c8778bfa..645516266611 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -120,7 +120,7 @@ QDEL_NULL(sparks) return ..() -/obj/machinery/power/emitter/update_icon(updates=ALL) +/obj/machinery/power/emitter/update_icon_state() . = ..() if(active && powernet) icon_state = avail(active_power_usage) ? icon_state_on : icon_state_underpowered diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index ac51fc4f09bb..1e08b665a030 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -44,15 +44,14 @@ field_generator power level display var/list/obj/machinery/field/generator/connected_gens var/clean_up = 0 -/obj/machinery/field/generator/update_icon(updates=ALL) +/obj/machinery/field/generator/update_overlays() . = ..() - cut_overlays() if(warming_up) - add_overlay("+a[warming_up]") + . += "+a[warming_up]" if(LAZYLEN(fields)) - add_overlay("+on") + . += "+on" if(power_level) - add_overlay("+p[power_level]") + . += "+p[power_level]" /obj/machinery/field/generator/Initialize(mapload) diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 162f1775d5e6..79c67b3cf459 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -22,16 +22,19 @@ default_unfasten_wrench(user, W, 0) else return ..() + /obj/machinery/the_singularitygen/update_icon(updates=ALL, power) - if(power) - if(power>150) - animate(src, icon_state = "[initial(icon_state)]_3", 10) - else if(power>100) - animate(src, icon_state = "[initial(icon_state)]_2", 10) - else if(power>50) - animate(src, icon_state = "[initial(icon_state)]_1", 10) - else - animate(src, icon_state = initial(icon_state), 10) + . = ..() + if(!power) + return + if(power>150) + animate(src, icon_state = "[initial(icon_state)]_3", 10) + else if(power>100) + animate(src, icon_state = "[initial(icon_state)]_2", 10) + else if(power>50) + animate(src, icon_state = "[initial(icon_state)]_1", 10) + else + animate(src, icon_state = initial(icon_state), 10) /obj/machinery/the_singularitygen/process(delta_time) if(energy > 0) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 87ea3f5140f4..37674f5e5a38 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -121,7 +121,7 @@ investigate_log("was moved whilst active; it powered down.", INVESTIGATE_SINGULO) -/obj/structure/particle_accelerator/update_icon(updates=ALL) +/obj/structure/particle_accelerator/update_icon_state() . = ..() switch(construction_state) if(PA_CONSTRUCTION_UNSECURED,PA_CONSTRUCTION_UNWIRED) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 4bc467ac7b80..d023e9a83afe 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -62,10 +62,10 @@ active = FALSE connected_parts.Cut() -/obj/machinery/particle_accelerator/control_box/update_icon(updates=ALL) +/obj/machinery/particle_accelerator/control_box/update_icon_state() . = ..() if(active) - icon_state = "control_boxp[strength]" //yogs- fix sprite not updating (note that /tg/ PA power 2 sprite is incomplete) + icon_state = "control_boxp[strength]" //yogs- fix sprite not updating (note that /tg/ PA power 2 sprite is incomplete) else if(use_power) if(assembled) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index db39cc10dfc2..ba8c60ddc4ee 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -205,29 +205,26 @@ obj_break() -/obj/machinery/power/smes/update_icon(updates=ALL) +/obj/machinery/power/smes/update_overlays() . = ..() - cut_overlays() if(stat & BROKEN) return - if(panel_open) return if(outputting) - add_overlay("smes-out1") + . += "smes-out1" else - add_overlay("smes-out0") + . += "smes-out0" if(inputting) - add_overlay("smes-inp1") - else - if(input_attempt) - add_overlay("smes-inp0") + . += "smes-inp1" + else if(input_attempt) + . += "smes-inp0" var/clevel = chargedisplay() - if(clevel>0) - add_overlay("smes-og[clevel]") + if(clevel > 0) + . += "smes-og[clevel]" /obj/machinery/power/smes/proc/chargedisplay() diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 954026a7986b..1e754aca78f3 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -113,14 +113,13 @@ new /obj/item/shard(src.loc) qdel(src) -/obj/machinery/power/solar/update_icon(updates=ALL) +/obj/machinery/power/solar/update_overlays() . = ..() - cut_overlays() var/matrix/turner = matrix() turner.Turn(azimuth_current) panelstructure.transform = turner paneloverlay.transform = turner - add_overlay(list(paneloverlay, panelstructure)) + . += list(paneloverlay, panelstructure) /obj/machinery/power/solar/proc/queue_turn(azimuth) needs_to_turn = TRUE @@ -372,17 +371,16 @@ if(!T.control) //i.e unconnected T.set_control(src) -/obj/machinery/power/solar_control/update_icon(updates=ALL) +/obj/machinery/power/solar_control/update_overlays() . = ..() - cut_overlays() if(stat & NOPOWER) - add_overlay("[icon_keyboard]_off") + . += "[icon_keyboard]_off" return - add_overlay(icon_keyboard) + . += icon_keyboard if(stat & BROKEN) - add_overlay("[icon_state]_broken") + . += "[icon_state]_broken" else - add_overlay(icon_screen) + . += icon_screen /obj/machinery/power/solar_control/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index a3fe5743d607..bc64d3c9fa66 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -35,9 +35,12 @@ setDir(pick(GLOB.alldirs)) update_appearance(UPDATE_ICON) -/obj/item/ammo_casing/update_icon(updates=ALL) +/obj/item/ammo_casing/update_icon_state() . = ..() icon_state = "[initial(icon_state)][BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? "-live" : ""]" + +/obj/item/ammo_casing/update_desc(updates=ALL) + . = ..() desc = "[initial(desc)][!BB && !CHECK_BITFIELD(casing_flags, CASINGFLAG_NO_LIVE_SPRITE) ? " This one is spent." : ""]" //proc to magically refill a casing with a new projectile diff --git a/code/modules/projectiles/ammunition/reusable/arrow.dm b/code/modules/projectiles/ammunition/reusable/arrow.dm index 20af263e22e2..ed6259c15279 100644 --- a/code/modules/projectiles/ammunition/reusable/arrow.dm +++ b/code/modules/projectiles/ammunition/reusable/arrow.dm @@ -40,21 +40,20 @@ if(LAZYLEN(new_parts)) CheckParts(new_parts) -/obj/item/ammo_casing/reusable/arrow/update_icon(force_update) +/obj/item/ammo_casing/reusable/arrow/update_overlays() ..() - cut_overlays() if(istype(explosive)) - add_overlay(mutable_appearance(icon, "arrow_explosive[explosive.active ? "_active" : ""]"), TRUE) + . += mutable_appearance(icon, "arrow_explosive[explosive.active ? "_active" : ""]") if(istype(bola)) - add_overlay(mutable_appearance(icon, "arrow_bola"), TRUE) + . += mutable_appearance(icon, "arrow_bola") if(istype(syringe)) - add_overlay(mutable_appearance(icon, "arrow_syringe"), TRUE) + . += mutable_appearance(icon, "arrow_syringe") if(syringe.reagents && syringe.reagents.total_volume) var/image/filling_overlay = mutable_appearance(icon, "arrow_syringe[clamp(round((syringe.reagents.total_volume / syringe.volume * 15),5), 1, 15)]") filling_overlay.color = mix_color_from_reagents(syringe.reagents.reagent_list) - add_overlay(filling_overlay) + . += filling_overlay if(flaming) - add_overlay(mutable_appearance(icon, "arrow_fire"), TRUE) + . += mutable_appearance(icon, "arrow_fire") /obj/item/ammo_casing/reusable/arrow/examine(mob/user) . = ..() @@ -442,10 +441,10 @@ update_appearance(UPDATE_ICON) ..() -/obj/item/ammo_casing/reusable/arrow/singulo/update_icon(force_update) - ..() +/obj/item/ammo_casing/reusable/arrow/singulo/update_overlays() + . = ..() if(istype(shard)) - add_overlay(mutable_appearance(icon, "[icon_state]_[shard.icon_state]"), TRUE) + . += mutable_appearance(icon, "[icon_state]_[shard.icon_state]") /// Handles the special effect of the singulo arrow, called by the projectile on hit /obj/item/ammo_casing/reusable/arrow/singulo/proc/shard_effect() diff --git a/code/modules/projectiles/ammunition/reusable/foam.dm b/code/modules/projectiles/ammunition/reusable/foam.dm index 1da10cfbfa7d..7217f9ffb3e2 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(updates=ALL) +/obj/item/ammo_casing/reusable/foam_dart/update_icon_state() . = ..() if (modified) icon_state = "foamdart_empty" diff --git a/code/modules/projectiles/attachments/_attachment.dm b/code/modules/projectiles/attachments/_attachment.dm index 9f96b0f2b493..af3387b7eba2 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(updates=ALL) +/obj/item/attachment/update_icon_state() . = ..() 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 25bc1eed9047..043487930dd0 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -170,6 +170,13 @@ update_appearance(UPDATE_ICON) /obj/item/ammo_box/update_icon(updates=ALL) + . = ..() + for(var/material in bullet_cost) + var/material_amount = bullet_cost[material] + material_amount = (material_amount*stored_ammo.len) + base_cost[material] + materials[material] = material_amount + +/obj/item/ammo_box/update_icon_state() . = ..() var/rounds_left = stored_ammo.len switch(multiple_sprites) @@ -177,11 +184,10 @@ icon_state = "[initial(icon_state)]-[rounds_left]" if(AMMO_BOX_FULL_EMPTY) icon_state = "[initial(icon_state)]-[rounds_left ? "[max_ammo]" : "0"]" + +/obj/item/ammo_box/update_desc(updates=ALL) + . = ..() desc = "[initial(desc)] There [(rounds_left == 1) ? "is" : "are"] [rounds_left] round\s left!" - for (var/material in bullet_cost) - var/material_amount = bullet_cost[material] - material_amount = (material_amount*stored_ammo.len) + base_cost[material] - materials[material] = material_amount ///Count of number of bullets in the magazine /obj/item/ammo_box/magazine/proc/ammo_count(countempties = TRUE) diff --git a/code/modules/projectiles/boxes_magazines/external/grenade.dm b/code/modules/projectiles/boxes_magazines/external/grenade.dm index afb3043a122e..f669a80805a9 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(updates=ALL) +/obj/item/ammo_box/magazine/m75/update_icon_state() . = ..() 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 9a9cef3e80e4..f7a2879a9412 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(updates=ALL) +/obj/item/ammo_box/magazine/mm712x82/update_icon_state() . = ..() 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 8cf74d43c8bc..42d5651532f3 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(updates=ALL) +/obj/item/ammo_box/magazine/m45/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/pistolm9mm/update_icon_state() . = ..() icon_state = "9x19p-[ammo_count() ? "10" : "0"]" @@ -95,7 +95,7 @@ caliber = ".50ae" max_ammo = 7 -/obj/item/ammo_box/magazine/m50/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/m50/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/v38/update_icon_state() . = ..() 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 a7760f29dcc0..41ebe99338fe 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -8,16 +8,18 @@ caliber = LASER max_ammo = 20 -/obj/item/ammo_box/magazine/recharge/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/recharge/update_desc(updates=ALL) . = ..() desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." - cut_overlays() + +/obj/item/ammo_box/magazine/recharge/update_overlays() + . = ..() var/cur_ammo = ammo_count() if(cur_ammo) if(cur_ammo >= max_ammo) - add_overlay("[icon_state]_o_full") + . += "[icon_state]_o_full" else - add_overlay("[icon_state]_o_mid") + . += "[icon_state]_o_mid" /obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets" @@ -28,10 +30,9 @@ icon = 'icons/obj/guns/grimdark.dmi' 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(updates=ALL) + +/obj/item/ammo_box/magazine/recharge/lasgun/update_icon_state() . = ..() - desc = "[initial(desc)] It has [stored_ammo.len] shot\s left." if(ammo_count()) icon_state = "[initial(icon_state)]" else @@ -135,15 +136,14 @@ icon_state = "powerpack_small-l" max_ammo = 8 -/obj/item/ammo_box/magazine/recharge/ntusp/laser/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/recharge/ntusp/laser/update_overlays() . = ..() - cut_overlays() var/cur_ammo = ammo_count() if(cur_ammo) if(cur_ammo >= max_ammo) - add_overlay("powerpack_small_o_full") + . += "powerpack_small_o_full" else - add_overlay("powerpack_small_o_mid") + . += "powerpack_small_o_mid" /obj/item/ammo_box/magazine/recharge/ntusp/laser/empty start_empty = TRUE diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index c92d7bb0bda8..d8ab658bc0a0 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(updates=ALL) +/obj/item/ammo_box/magazine/m10mm/rifle/update_icon_state() . = ..() if(ammo_count()) icon_state = "75-8" @@ -25,7 +25,7 @@ caliber = "a556" max_ammo = 30 -/obj/item/ammo_box/magazine/m556/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/m556/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/r556/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/m308/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/ks762/update_icon_state() . = ..() 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 188f37e76d7c..a7445adb6ae6 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(updates=ALL) +/obj/item/ammo_box/magazine/m12g/update_icon_state() . = ..() 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 258e2fdd4508..4255afba672a 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(updates=ALL) +/obj/item/ammo_box/magazine/wt550m9/update_icon_state() . = ..() ..() switch(ammo_count()) @@ -76,7 +76,7 @@ sprite_designation = "B" max_ammo = 10 -/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_icon(updates=ALL) // Snowflake code snowflake code +/obj/item/ammo_box/magazine/wt550m9/wt_airburst/update_icon_state() // Snowflake code snowflake code //gun code in general be like ..() switch(ammo_count()) if(9 to 11) //Considers the extra bullet in the chamber @@ -102,7 +102,7 @@ caliber = "9mm" max_ammo = 32 -/obj/item/ammo_box/magazine/uzim9mm/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/uzim9mm/update_icon_state() . = ..() icon_state = "uzi9mm-[round(ammo_count(),4)]" @@ -116,7 +116,7 @@ caliber = "9mm" max_ammo = 21 -/obj/item/ammo_box/magazine/smgm9mm/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/smgm9mm/update_icon_state() . = ..() icon_state = "smg9mm[sprite_designation]-[ammo_count() ? "42" : "0"]" @@ -146,7 +146,7 @@ caliber = ".45" max_ammo = 24 -/obj/item/ammo_box/magazine/smgm45/update_icon(updates=ALL) +/obj/item/ammo_box/magazine/smgm45/update_icon_state() . = ..() 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 82a20aca5fdf..3bdaf440940d 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(updates=ALL) +/obj/item/ammo_box/magazine/sniper_rounds/update_icon_state() . = ..() 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 f6fb0b078a72..118f05bb51fd 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(updates=ALL) +/obj/item/ammo_box/magazine/toy/smg/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/toy/smgm45/update_icon_state() . = ..() 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(updates=ALL) +/obj/item/ammo_box/magazine/toy/m762/update_icon_state() . = ..() icon_state = "a762-[round(ammo_count(),10)]" diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 24fd47509c72..bff3ce2a8dea 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -188,32 +188,36 @@ update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/update_icon(updates=ALL) - . = ..() - if (QDELETED(src)) +/obj/item/gun/ballistic/update_icon_state() + if(QDELETED(src)) return + . = ..() if(current_skin) icon_state = "[unique_reskin[current_skin]][sawn_off ? "_sawn" : ""]" else icon_state = "[initial(icon_state)][sawn_off ? "_sawn" : ""]" - cut_overlays() + +/obj/item/gun/ballistic/update_overlays() + if(QDELETED(src)) + return + . = ..() if (bolt_type == BOLT_TYPE_LOCKING) - add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") + . += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]" if (bolt_type == BOLT_TYPE_OPEN && bolt_locked) - add_overlay("[icon_state]_bolt") + . += "[icon_state]_bolt" if (suppressed) - add_overlay("[icon_state]_[suppressed.icon_state]") + . += "[icon_state]_[suppressed.icon_state]" if (enloudened) - add_overlay("[icon_state]_[enloudened.icon_state]") + . += "[icon_state]_[enloudened.icon_state]" if(!chambered && empty_indicator) - add_overlay("[icon_state]_empty") + . += "[icon_state]_empty" if (magazine) if (special_mags) - add_overlay("[icon_state]_mag_[initial(magazine.icon_state)]") + . += "[icon_state]_mag_[initial(magazine.icon_state)]" if (!magazine.ammo_count()) - add_overlay("[icon_state]_mag_empty") + . += "[icon_state]_mag_empty" else - add_overlay("[icon_state]_mag") + . += "[icon_state]_mag" var/capacity_number = 0 switch(get_ammo() / magazine.max_ammo) if(0.2 to 0.39) @@ -227,7 +231,7 @@ if(1.0) capacity_number = 100 if (capacity_number) - add_overlay("[icon_state]_mag_[capacity_number]") + . += "[icon_state]_mag_[capacity_number]" /obj/item/gun/ballistic/process_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE) diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index b9111b829bdf..33b7e3622ad8 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -27,13 +27,12 @@ /obj/item/gun/ballistic/automatic/proto/unrestricted pin = /obj/item/firing_pin -/obj/item/gun/ballistic/automatic/update_icon(updates=ALL) +/obj/item/gun/ballistic/automatic/update_overlays() . = ..() - ..() if(!select) - add_overlay("[initial(icon_state)]_semi") + . += "[initial(icon_state)]_semi" if(select == 1) - add_overlay("[initial(icon_state)]_burst") + . += "[initial(icon_state)]_burst" /obj/item/gun/ballistic/automatic/ui_action_click(mob/user, actiontype) if(istype(actiontype, /datum/action/item_action/toggle_firemode)) @@ -158,16 +157,15 @@ else ..() -/obj/item/gun/ballistic/automatic/m90/update_icon(updates=ALL) +/obj/item/gun/ballistic/automatic/m90/update_overlays() . = ..() switch(select) if(0) - add_overlay("[initial(icon_state)]_semi") + . += "[initial(icon_state)]_semi" if(1) - add_overlay("[initial(icon_state)]_burst") + . += "[initial(icon_state)]_burst" if(2) - add_overlay("[initial(icon_state)]_gren") - return + . += "[initial(icon_state)]_gren" /obj/item/gun/ballistic/automatic/m90/burst_select() var/mob/living/carbon/human/user = usr @@ -266,9 +264,9 @@ update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/automatic/l6_saw/update_icon(updates=ALL) +/obj/item/gun/ballistic/automatic/l6_saw/update_overlays() . = ..() - add_overlay("l6_door_[cover_open ? "open" : "closed"]") + . += "l6_door_[cover_open ? "open" : "closed"]" /obj/item/gun/ballistic/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm index 1c3c687a6c5d..dcd7b05d0abe 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -133,14 +133,13 @@ update_slowdown() update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/bow/update_icon(updates=ALL) +/obj/item/gun/ballistic/bow/update_overlays() . = ..() - cut_overlay(arrow_overlay, TRUE) icon_state = "[initial(icon_state)][chambered ? "_firing" : ""]" if(get_ammo()) var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) arrow_overlay = mutable_appearance(icon, "[initial(E.item_state)][chambered ? "_firing" : ""]") - add_overlay(arrow_overlay, TRUE) + . += arrow_overlay, TRUE /obj/item/gun/ballistic/bow/proc/update_slowdown() if(chambered || drawing) @@ -452,27 +451,32 @@ if(TIMER_COOLDOWN_CHECK(src, "arrow_recharge")) . += span_warning("It is currently recharging!") -/obj/item/gun/ballistic/bow/energy/update_icon(updates=ALL) +/obj/item/gun/ballistic/bow/energy/update_icon_state() . = ..() cut_overlay(arrow_overlay, TRUE) if(folded) icon_state = "[initial(icon_state)]_folded" item_state = "[initial(item_state)]_folded" - else + else if(get_ammo()) + item_state = "[item_state]_[E.icon_state]" icon_state = initial(icon_state) + else item_state = initial(item_state) - - if(get_ammo()) - var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) - arrow_overlay = mutable_appearance(icon, "[initial(E.icon_state)][chambered ? "_firing" : ""]") - add_overlay(arrow_overlay, TRUE) - item_state = "[item_state]_[E.icon_state]" + icon_state = initial(icon_state) if(ismob(loc)) var/mob/M = loc M.update_inv_hands() +/obj/item/gun/ballistic/bow/energy/update_overlays() + . = ..() + if(folded || !get_ammo()) + return + var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) + arrow_overlay = mutable_appearance(icon, "[initial(E.icon_state)][chambered ? "_firing" : ""]") + . += arrow_overlay + /obj/item/gun/ballistic/bow/energy/shoot_live_shot(mob/living/user, pointblank, atom/pbtarget, message) if(folded) to_chat(user, span_notice("You must unfold [src] before firing it!")) diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index a10caeb86e66..8b3e4384d831 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -81,7 +81,7 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunpack/update_icon(updates=ALL) +/obj/item/minigunpack/update_icon_state() . = ..() if(armed) icon_state = "notholstered" diff --git a/code/modules/projectiles/guns/ballistic/minigun.dm b/code/modules/projectiles/guns/ballistic/minigun.dm index 2fe3991bc177..6c8172a7b0bd 100644 --- a/code/modules/projectiles/guns/ballistic/minigun.dm +++ b/code/modules/projectiles/guns/ballistic/minigun.dm @@ -81,7 +81,7 @@ M.putItemFromInventoryInHandIfPossible(src, H.held_index) -/obj/item/minigunbackpack/update_icon(updates=ALL) +/obj/item/minigunbackpack/update_icon_state() . = ..() if(armed) icon_state = "notholstered" diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index e5e68eacca93..49dec5a1cc9b 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -15,9 +15,9 @@ bolt_drop_sound = "sound/weapons/mosinboltin.ogg" tac_reloads = FALSE -obj/item/gun/ballistic/rifle/update_icon(updates=ALL) +obj/item/gun/ballistic/rifle/update_overlays() . = ..() - add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") + . += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]" obj/item/gun/ballistic/rifle/rack(mob/user = null) if (bolt_locked == FALSE) diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index c768a5e14483..17448eff59d1 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -232,7 +232,7 @@ 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(updates=ALL) +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_icon_state() . = ..() if(slung) icon_state = "ishotgunsling" diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index e2146c4b0eb2..0ee56ca1ece5 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -13,9 +13,9 @@ item_flags = NONE casing_ejector = FALSE -/obj/item/gun/ballistic/automatic/toy/update_icon(updates=ALL) +/obj/item/gun/ballistic/automatic/toy/update_overlays() . = ..() - add_overlay("[icon_state]_toy") + . += "[icon_state]_toy" /obj/item/gun/ballistic/automatic/toy/unrestricted pin = /obj/item/firing_pin @@ -56,9 +56,9 @@ casing_ejector = FALSE can_suppress = FALSE -/obj/item/gun/ballistic/shotgun/toy/update_icon(updates=ALL) +/obj/item/gun/ballistic/shotgun/toy/update_overlays() . = ..() - add_overlay("[icon_state]_toy") + . += "[icon_state]_toy" /obj/item/gun/ballistic/shotgun/toy/unrestricted pin = /obj/item/firing_pin @@ -90,9 +90,9 @@ /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(updates=ALL) +/obj/item/gun/ballistic/automatic/c20r/toy/update_overlays() . = ..() - add_overlay("[icon_state]_toy") + . += "[icon_state]_toy" /obj/item/gun/ballistic/automatic/l6_saw/toy //This is the syndicate variant with syndicate firing pin and riot darts. name = "donksoft LMG" @@ -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(updates=ALL) +/obj/item/gun/ballistic/automatic/l6_saw/toy/update_overlays() . = ..() - add_overlay("[icon_state]_toy") + . += "[icon_state]_toy" diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 83a610fb535d..f43bcab96b3c 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -159,10 +159,10 @@ update_appearance(UPDATE_ICON) return -/obj/item/gun/energy/update_icon(force_update) +/obj/item/gun/energy/update_overlays() if(QDELETED(src)) return - ..() + . = ..() if(!automatic_charge_overlays) return var/ratio = CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 2cee2778a9df..2cc685eee4ff 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -175,12 +175,11 @@ to_chat(user,span_notice("You switch [src] setting to [setting] mode.")) update_appearance(UPDATE_ICON) -/obj/item/gun/energy/dueling/update_icon(force_update) +/obj/item/gun/energy/dueling/update_overlays() . = ..() if(setting_overlay) - cut_overlay(setting_overlay) setting_overlay.icon_state = setting_iconstate() - add_overlay(setting_overlay) + . += setting_overlay /obj/item/gun/energy/dueling/Destroy() . = ..() From 5dcb5dc5bf60402d465a2684ca1f888c42b2822f Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:21:01 -0400 Subject: [PATCH 19/50] compile again --- code/modules/projectiles/boxes_magazines/_box_magazine.dm | 1 + code/modules/projectiles/guns/ballistic/bow.dm | 4 ++-- code/modules/projectiles/guns/energy.dm | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 043487930dd0..1ebb4d8d772b 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -187,6 +187,7 @@ /obj/item/ammo_box/update_desc(updates=ALL) . = ..() + var/rounds_left = stored_ammo.len desc = "[initial(desc)] There [(rounds_left == 1) ? "is" : "are"] [rounds_left] round\s left!" ///Count of number of bullets in the magazine diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm index dcd7b05d0abe..13d4d4c7424b 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -139,7 +139,7 @@ if(get_ammo()) var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) arrow_overlay = mutable_appearance(icon, "[initial(E.item_state)][chambered ? "_firing" : ""]") - . += arrow_overlay, TRUE + . += arrow_overlay /obj/item/gun/ballistic/bow/proc/update_slowdown() if(chambered || drawing) @@ -459,7 +459,6 @@ icon_state = "[initial(icon_state)]_folded" item_state = "[initial(item_state)]_folded" else if(get_ammo()) - item_state = "[item_state]_[E.icon_state]" icon_state = initial(icon_state) else item_state = initial(item_state) @@ -474,6 +473,7 @@ if(folded || !get_ammo()) return var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) + item_state = "[item_state]_[E.icon_state]" arrow_overlay = mutable_appearance(icon, "[initial(E.icon_state)][chambered ? "_firing" : ""]") . += arrow_overlay diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f43bcab96b3c..56c99af8d539 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -166,7 +166,7 @@ if(!automatic_charge_overlays) return var/ratio = CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) - if(ratio == old_ratio && !force_update) + if(ratio == old_ratio) return old_ratio = ratio cut_overlays() From 91f56fe4f16a2eb371f52f847c86053e017e6e03 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:50:42 -0400 Subject: [PATCH 20/50] thank you tattax --- code/_onclick/hud/human.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index bab8f6134faf..0a12a8a649da 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -109,7 +109,6 @@ using.icon = ui_style using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") using.screen_loc = ui_movi - using.hud = src static_inventory += using using = new /atom/movable/screen/drop(src) @@ -270,13 +269,11 @@ throw_icon = new /atom/movable/screen/throw_catch(src) throw_icon.icon = ui_style throw_icon.screen_loc = ui_drop_throw - throw_icon.hud = src hotkeybuttons += throw_icon rest_icon = new /atom/movable/screen/rest(src) rest_icon.icon = ui_style rest_icon.screen_loc = ui_above_movement - rest_icon.hud = src static_inventory += rest_icon healths = new /atom/movable/screen/healths(src) @@ -292,7 +289,6 @@ pull_icon.icon = ui_style pull_icon.update_appearance(UPDATE_ICON) pull_icon.screen_loc = ui_above_intent - pull_icon.hud = src static_inventory += pull_icon devilsouldisplay = new /atom/movable/screen/devil/soul_counter(src) From 1cbbabcad1cab9db3bd0722d3da608aa633f73cd Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Thu, 13 Jul 2023 00:32:27 -0400 Subject: [PATCH 21/50] Goes through the remaining update icon --- code/game/objects/items/credit_holochip.dm | 2 +- code/game/objects/items/devices/aicard.dm | 2 +- .../granters/martial_arts/plasma_fist.dm | 4 +- .../granters/martial_arts/sleeping_carp.dm | 4 +- code/modules/VR/vr_sleeper.dm | 2 +- code/modules/food_and_drinks/pizzabox.dm | 2 +- .../mining/lavaland/necropolis_chests.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- code/modules/power/apc.dm | 5 +- code/modules/power/cable.dm | 2 +- .../projectiles/guns/energy/energy_gun.dm | 4 +- .../guns/energy/kinetic_accelerator.dm | 6 +- .../projectiles/guns/energy/special.dm | 6 +- code/modules/projectiles/guns/magic/wand.dm | 2 +- .../projectiles/guns/misc/beam_rifle.dm | 7 +- .../projectiles/guns/misc/syringe_gun.dm | 4 +- .../chemistry/machinery/chem_dispenser.dm | 7 +- .../chemistry/machinery/chem_heater.dm | 2 +- .../chemistry/machinery/chem_master.dm | 8 +- .../reagents/chemistry/machinery/pandemic.dm | 12 ++- .../chemistry/machinery/reagentgrinder.dm | 3 +- .../chemistry/machinery/smoke_machine.dm | 2 +- .../reagents/reagent_containers/blood_pack.dm | 5 +- .../reagents/reagent_containers/bottle.dm | 40 ++++---- .../reagents/reagent_containers/dropper.dm | 5 +- .../reagents/reagent_containers/glass.dm | 92 +++++++++---------- .../reagents/reagent_containers/hypospray.dm | 44 ++++----- .../reagents/reagent_containers/syringes.dm | 8 +- code/modules/recycling/conveyor2.dm | 8 +- code/modules/recycling/disposal/bin.dm | 11 +-- .../recycling/disposal/construction.dm | 2 +- code/modules/research/destructive_analyzer.dm | 2 +- code/modules/research/experimentor.dm | 4 +- .../research/nanites/nanite_chamber.dm | 11 +-- .../modules/research/nanites/nanite_remote.dm | 7 +- .../research/nanites/public_chamber.dm | 30 +++--- code/modules/research/server.dm | 2 +- .../security_levels/level_interface.dm | 14 +-- code/modules/shuttle/manipulator.dm | 16 ++-- .../shuttle/spaceship_navigation_beacon.dm | 2 +- code/modules/shuttle/special.dm | 2 +- code/modules/surgery/anesthesia_machine.dm | 9 +- code/modules/surgery/organs/appendix.dm | 16 +++- code/modules/surgery/organs/augments_chest.dm | 10 +- code/modules/surgery/organs/heart.dm | 2 +- code/modules/surgery/organs/tongue.dm | 4 +- code/modules/vehicles/pimpin_ride.dm | 7 +- code/modules/vending/_vending.dm | 11 ++- .../code/game/gamemodes/gangs/dominator.dm | 33 ++++--- .../code/game/gamemodes/gangs/gangtool.dm | 5 +- yogstation/code/game/objects/items/brace.dm | 5 +- .../code/game/objects/items/fishing/rods.dm | 2 +- .../game/objects/items/holotool/holotool.dm | 2 +- .../code/game/objects/items/sharpener.dm | 4 +- .../game/objects/structures/toilet_bong.dm | 5 +- yogstation/code/modules/assembly/signaler.dm | 5 +- .../code/modules/clothing/head/helmet.dm | 2 +- .../living/simple_animal/friendly/chocobo.dm | 7 +- .../hostile/retaliate/king_of_goats.dm | 2 +- yogstation/code/modules/power/validhunter.dm | 2 +- .../reagents/reagent_containers/hypospray.dm | 4 +- .../recycling/disposal/pipe_sorting.dm | 5 +- yogstation/code/modules/spacepods/spacepod.dm | 36 ++++---- .../code/modules/xenoarch/loot/gigadrill.dm | 2 +- yogstation/code/modules/xenoarch/loot/guns.dm | 2 - 65 files changed, 286 insertions(+), 291 deletions(-) diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index aedfc1d9d25d..5d1cc2e0deb9 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -22,7 +22,7 @@ /obj/item/holochip/get_item_credit_value() return credits -/obj/item/holochip/update_name(updates) +/obj/item/holochip/update_name(updates=ALL) . = ..() name = "\improper [credits] credit holochip" diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 46ff45536454..7b6ddd77e54b 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -40,7 +40,7 @@ log_combat(user, AI, "carded", src) update_appearance(UPDATE_ICON) //Whatever happened, update the card's state (icon, name) to match. -/obj/item/aicard/update_name(updates) +/obj/item/aicard/update_name(updates=ALL) . = ..() if(AI) name = "[initial(name)] - [AI.name]" 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 6b6da336c4de..5b1ab695aa59 100644 --- a/code/game/objects/items/granters/martial_arts/plasma_fist.dm +++ b/code/game/objects/items/granters/martial_arts/plasma_fist.dm @@ -20,14 +20,14 @@ . = ..() update_appearance() -/obj/item/book/granter/martial/plasma_fist/update_name(updates) +/obj/item/book/granter/martial/plasma_fist/update_name(updates=ALL) . = ..() if(uses <= 0) name = "empty scroll" else name = initial(name) -/obj/item/book/granter/martial/plasma_fist/update_desc(updates) +/obj/item/book/granter/martial/plasma_fist/update_desc(updates=ALL) . = ..() if(uses <= 0) desc = "It's completely blank." 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 0858bb834de3..f3f404299f59 100644 --- a/code/game/objects/items/granters/martial_arts/sleeping_carp.dm +++ b/code/game/objects/items/granters/martial_arts/sleeping_carp.dm @@ -23,14 +23,14 @@ . = ..() update_appearance() -/obj/item/book/granter/martial/carp/update_name(updates) +/obj/item/book/granter/martial/carp/update_name(updates=ALL) . = ..() if(!uses) name = "empty scroll" else name = initial(name) -/obj/item/book/granter/martial/carp/update_desc(updates) +/obj/item/book/granter/martial/carp/update_desc(updates=ALL) . = ..() if(!uses) desc = "It's completely blank." diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index e2f9eab725c0..8b5a342b8abd 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -61,7 +61,7 @@ sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) -/obj/machinery/vr_sleeper/update_icon(updates=ALL) +/obj/machinery/vr_sleeper/update_icon_state() . = ..() icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index 40e0ca66fa31..5c701880fac8 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -38,7 +38,7 @@ unprocess() return ..() -/obj/item/pizzabox/update_desc(updates) +/obj/item/pizzabox/update_desc(updates=ALL) . = ..() desc = initial(desc) if(open) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index bf5022477d6b..3bebd07549cb 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_desc(updates) +/obj/item/reagent_containers/glass/bottle/potion/update_desc(updates=ALL) . = ..() if(reagents.total_volume) desc = initial(desc) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index b3ba9df0a698..a2b7f3eec7b4 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -51,7 +51,7 @@ */ /// The zone this mob is currently targeting - var/zone_selected = null + var/zone_selected = BODY_ZONE_CHEST var/computer_id = null var/list/logging = list() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 11ae3e9403e1..9037a751b00f 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -206,7 +206,6 @@ operating = FALSE name = "[area.name] APC" stat |= MAINT - update_appearance(UPDATE_ICON) addtimer(CALLBACK(src, PROC_REF(update)), 5) /obj/machinery/power/apc/Destroy() @@ -251,7 +250,7 @@ cell = new cell_type cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value) - var/area/A = src.loc.loc + var/area/A = get_area(loc) //if area isn't specified use current if(areastring) @@ -330,7 +329,7 @@ // also add overlays for indicator lights /obj/machinery/power/apc/update_icon(updates=ALL) . = ..() - updates=check_updates() + updates = check_updates() if(!updates) return diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ce635ab77d2c..e36e23e24337 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -570,7 +570,7 @@ By design, d1 is the smallest direction and d2 is the highest icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" item_state = "coil_[cable_color]" -/obj/item/stack/cable_coil/update_name(updates) +/obj/item/stack/cable_coil/update_name(updates=ALL) . = ..() if(novariants) return diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 5608cc521927..852661f666ec 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -30,10 +30,10 @@ set_gun_light(new /obj/item/flashlight/seclite(src)) return ..() -/obj/item/gun/energy/e_gun/mini/update_icon(updates=ALL) +/obj/item/gun/energy/e_gun/mini/update_overlays() . = ..() if(gun_light && gun_light.on) - add_overlay("mini-light") + . += "mini-light" /obj/item/gun/energy/e_gun/stun name = "tactical energy gun" diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 4d2b76bd91e5..5cad3d3cc066 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -145,12 +145,10 @@ update_appearance(UPDATE_ICON) overheat = FALSE -/obj/item/gun/energy/kinetic_accelerator/update_icon(updates=ALL) +/obj/item/gun/energy/kinetic_accelerator/update_overlays() . = ..() if(!can_shoot()) - add_overlay("[icon_state]_empty") - else - cut_overlays() + . += "[icon_state]_empty" /obj/item/gun/energy/kinetic_accelerator/mega name = "mega proto-kinetic accelerator" diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index abb300488e82..20b241f38e6d 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -34,11 +34,11 @@ pin = null ammo_x_offset = 1 -/obj/item/gun/energy/decloner/update_icon(updates=ALL) +/obj/item/gun/energy/decloner/update_overlays() . = ..() var/obj/item/ammo_casing/energy/shot = ammo_type[select] if(!QDELETED(cell) && (cell.charge > shot.e_cost)) - add_overlay("decloner_spin") + . += "decloner_spin" /obj/item/gun/energy/decloner/unrestricted pin = /obj/item/firing_pin @@ -303,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(updates=ALL) +/obj/item/gun/energy/wormhole_projector/update_icon_state() . = ..() 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 efb9ba6b73fd..f463f48c872a 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(updates=ALL) +/obj/item/gun/magic/wand/update_icon_state() . = ..() icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index c02bdb51d2ca..c6ddd4e87055 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -148,14 +148,13 @@ current_zoom_x = 0 current_zoom_y = 0 -/obj/item/gun/energy/beam_rifle/update_icon(updates=ALL) +/obj/item/gun/energy/beam_rifle/update_overlays() . = ..() - cut_overlays() var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1] if(!QDELETED(cell) && (cell.charge >= primary_ammo.e_cost)) - add_overlay(charged_overlay) + . += charged_overlay else - add_overlay(drained_overlay) + . += drained_overlay /obj/item/gun/energy/beam_rifle/attack_self(mob/user) projectile_setting_pierce = !projectile_setting_pierce diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index ccd49172f967..009f7232810f 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -78,12 +78,12 @@ to_chat(user, span_warning("[src] cannot hold more syringes!")) return FALSE -/obj/item/gun/syringe/update_icon(updates=ALL) +/obj/item/gun/syringe/update_overlays() . = ..() if(!has_syringe_overlay) return var/syringe_count = syringes.len - add_overlay("[initial(icon_state)]_[syringe_count ? clamp(syringe_count, 1, initial(max_syringes)) : "empty"]") + . += "[initial(icon_state)]_[syringe_count ? clamp(syringe_count, 1, initial(max_syringes)) : "empty"]" /obj/item/gun/syringe/rapidsyringe name = "rapid syringe gun" diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 6b6f210a6cc6..630ab409c3b7 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -145,16 +145,15 @@ if(working_state) flick(working_state,src) -/obj/machinery/chem_dispenser/update_icon(updates=ALL) +/obj/machinery/chem_dispenser/update_overlays() . = ..() - cut_overlays() icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]" if(has_panel_overlay && panel_open) - add_overlay(mutable_appearance(icon, "[initial(icon_state)]_panel-o")) + . += mutable_appearance(icon, "[initial(icon_state)]_panel-o") if(beaker) beaker_overlay = display_beaker() - add_overlay(beaker_overlay) + . += beaker_overlay diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index aa9ec700c085..b3011d3cb8d8 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -23,7 +23,7 @@ beaker = null update_appearance(UPDATE_ICON) -/obj/machinery/chem_heater/update_icon(updates=ALL) +/obj/machinery/chem_heater/update_icon_state() . = ..() icon_state = "mixer[beaker ? 1 : 0][on ? "a" : "b"]" diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 4ee34c6b780f..468fc2593c1d 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -69,11 +69,13 @@ else if(A == bottle) bottle = null -/obj/machinery/chem_master/update_icon(updates=ALL) +/obj/machinery/chem_master/update_overlays() . = ..() - cut_overlays() if (stat & BROKEN) - add_overlay("waitlight") + . += "waitlight" + +/obj/machinery/chem_master/update_icon_state() + . = ..() if(beaker) icon_state = "mixer1" else diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 99188da75ac4..a3f76dc58395 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -125,17 +125,19 @@ update_appearance(UPDATE_ICON) playsound(src, 'sound/machines/ping.ogg', 30, TRUE) -/obj/machinery/computer/pandemic/update_icon(updates=ALL) +/obj/machinery/computer/pandemic/update_icon_state() . = ..() if(stat & BROKEN) icon_state = (beaker ? "mixer1_b" : "mixer0_b") return - icon_state = "mixer[(beaker) ? "1" : "0"][powered() ? "" : "_nopower"]" + +/obj/machinery/computer/pandemic/update_overlays() + . = ..() + if(stat & BROKEN) + return if(wait) - add_overlay("waitlight") - else - cut_overlays() + . += "waitlight" /obj/machinery/computer/pandemic/proc/eject_beaker() if(beaker) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 5ae36d4ea595..59513d3e86d7 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -99,12 +99,11 @@ AM.forceMove(drop_location()) holdingitems = list() -/obj/machinery/reagentgrinder/update_icon(updates=ALL) +/obj/machinery/reagentgrinder/update_icon_state() . = ..() if(!container) icon_state = "juicer" return - if(istype(container, /obj/item/reagent_containers/glass/mixbowl)) icon_state = "juicer_bowl" else diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index 4d1e8d696ea2..baa3ad4c796d 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(updates=ALL) +/obj/machinery/smoke_machine/update_icon_state() . = ..() if((!is_operational()) || (!on) || (reagents.total_volume == 0)) if (panel_open) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index faa875420502..e3643b8016dd 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -78,16 +78,15 @@ else name = "blood pack" -/obj/item/reagent_containers/blood/update_icon(updates=ALL) +/obj/item/reagent_containers/blood/update_overlays() . = ..() - cut_overlays() var/v = min(round(reagents.total_volume / volume * 10), 10) if(v > 0) var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "bloodpack1") filling.icon_state = "bloodpack[v]" filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + . += filling /obj/item/reagent_containers/blood/random icon_state = "random_bloodpack" diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index f6af3528dfc8..279950f7505d 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -20,29 +20,29 @@ /obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype) update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/bottle/update_icon(updates=ALL) +/obj/item/reagent_containers/glass/bottle/update_overlays() . = ..() - cut_overlays() if(!filling_icon_state) filling_icon_state = icon_state - if(reagents.total_volume) - var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[filling_icon_state]-10") - - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) - filling.icon_state = "[filling_icon_state]-10" - if(10 to 29) - filling.icon_state = "[filling_icon_state]25" - if(30 to 49) - filling.icon_state = "[filling_icon_state]50" - if(50 to 69) - filling.icon_state = "[filling_icon_state]75" - if(70 to INFINITY) - filling.icon_state = "[filling_icon_state]100" - - filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + if(!reagents.total_volume) + return + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[filling_icon_state]-10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) + filling.icon_state = "[filling_icon_state]-10" + if(10 to 29) + filling.icon_state = "[filling_icon_state]25" + if(30 to 49) + filling.icon_state = "[filling_icon_state]50" + if(50 to 69) + filling.icon_state = "[filling_icon_state]75" + if(70 to INFINITY) + filling.icon_state = "[filling_icon_state]100" + + filling.color = mix_color_from_reagents(reagents.reagent_list) + . += filling /obj/item/reagent_containers/glass/bottle/epinephrine name = "epinephrine bottle" diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index f98c021dc380..95fc24b7c089 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -100,10 +100,9 @@ update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/dropper/update_icon(updates=ALL) +/obj/item/reagent_containers/dropper/update_overlays() . = ..() - cut_overlays() if(reagents.total_volume) var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper") filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + . += filling diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 6bc66948106e..e9b44fa45d48 100755 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -127,32 +127,31 @@ /obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype) update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/beaker/update_icon(updates=ALL) +/obj/item/reagent_containers/glass/beaker/update_overlays() . = ..() - cut_overlays() - - if(reagents.total_volume) - var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10") - - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) - filling.icon_state = "[icon_state]-10" - if(10 to 24) - filling.icon_state = "[icon_state]10" - if(25 to 49) - filling.icon_state = "[icon_state]25" - if(50 to 74) - filling.icon_state = "[icon_state]50" - if(75 to 79) - filling.icon_state = "[icon_state]75" - if(80 to 90) - filling.icon_state = "[icon_state]80" - if(91 to INFINITY) - filling.icon_state = "[icon_state]100" - - filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + if(!reagents.total_volume) + return + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) + filling.icon_state = "[icon_state]-10" + if(10 to 24) + filling.icon_state = "[icon_state]10" + if(25 to 49) + filling.icon_state = "[icon_state]25" + if(50 to 74) + filling.icon_state = "[icon_state]50" + if(75 to 79) + filling.icon_state = "[icon_state]75" + if(80 to 90) + filling.icon_state = "[icon_state]80" + if(91 to INFINITY) + filling.icon_state = "[icon_state]100" + + filling.color = mix_color_from_reagents(reagents.reagent_list) + . += filling /obj/item/reagent_containers/glass/beaker/jar name = "honey jar" @@ -178,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(updates=ALL) +/obj/item/reagent_containers/glass/beaker/plastic/update_icon_state() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states . = ..() icon_state = "beakerwhite" @@ -425,28 +424,27 @@ ..() update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/glass/mixbowl/update_icon(updates=ALL) +/obj/item/reagent_containers/glass/mixbowl/update_overlays() . = ..() - cut_overlays() - - if(reagents.total_volume) - var/mutable_appearance/filling = mutable_appearance('yogstation/icons/obj/reagentfillings.dmi', "[icon_state]11") - - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) - filling.icon_state = "[icon_state]0" - if(10 to 24) - filling.icon_state = "[icon_state]10" - if(25 to 49) - filling.icon_state = "[icon_state]25" - if(50 to 74) - filling.icon_state = "[icon_state]50" - if(75 to INFINITY) - filling.icon_state = "[icon_state]75" - - filling.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling) + if(!reagents.total_volume) + return + var/mutable_appearance/filling = mutable_appearance('yogstation/icons/obj/reagentfillings.dmi', "[icon_state]11") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) + filling.icon_state = "[icon_state]0" + if(10 to 24) + filling.icon_state = "[icon_state]10" + if(25 to 49) + filling.icon_state = "[icon_state]25" + if(50 to 74) + filling.icon_state = "[icon_state]50" + if(75 to INFINITY) + filling.icon_state = "[icon_state]75" + + filling.color = mix_color_from_reagents(reagents.reagent_list) + . += filling /obj/item/reagent_containers/glass/urn name = "urn" diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 928a79e5f310..8843183d70da 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -136,7 +136,7 @@ reagents.add_reagent_list(list_reagents) update_appearance(UPDATE_ICON) -/obj/item/reagent_containers/autoinjector/medipen/update_icon(updates=ALL) +/obj/item/reagent_containers/autoinjector/medipen/update_icon_state() . = ..() if(reagents.total_volume > 0) icon_state = initial(icon_state) @@ -309,29 +309,31 @@ /obj/item/hypospray/update_icon(updates=ALL) . = ..() - cut_overlays() if(ismob(loc)) var/mob/M = loc M.update_inv_hands() - if(container?.reagents?.total_volume) - var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10") - - var/percent = round((container.reagents.total_volume / container.volume) * 100) - switch(percent) - if(0 to 9) - filling.icon_state = "[icon_state]-10" - if(10 to 29) - filling.icon_state = "[icon_state]25" - if(30 to 49) - filling.icon_state = "[icon_state]50" - if(50 to 69) - filling.icon_state = "[icon_state]75" - if(70 to INFINITY) - filling.icon_state = "[icon_state]100" - - filling.color = mix_color_from_reagents(container.reagents.reagent_list) - add_overlay(filling) - return + +/obj/item/hypospray/update_overlays() + . = ..() + if(!container?.reagents?.total_volume) + return + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10") + + var/percent = round((container.reagents.total_volume / container.volume) * 100) + switch(percent) + if(0 to 9) + filling.icon_state = "[icon_state]-10" + if(10 to 29) + filling.icon_state = "[icon_state]25" + if(30 to 49) + filling.icon_state = "[icon_state]50" + if(50 to 69) + filling.icon_state = "[icon_state]75" + if(70 to INFINITY) + filling.icon_state = "[icon_state]100" + + filling.color = mix_color_from_reagents(container.reagents.reagent_list) + . += filling /obj/item/hypospray/examine(mob/user) . = ..() diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 56638d4daa75..52f7d7da604e 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -167,16 +167,14 @@ mode = SYRINGE_DRAW update_appearance(UPDATE_ICON) - -/obj/item/reagent_containers/syringe/update_icon(updates=ALL) +/obj/item/reagent_containers/syringe/update_overlays() . = ..() - cut_overlays() var/rounded_vol if(reagents && reagents.total_volume) rounded_vol = clamp(round((reagents.total_volume / volume * 15),5), 1, 15) var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]") filling_overlay.color = mix_color_from_reagents(reagents.reagent_list) - add_overlay(filling_overlay) + . += filling_overlay else rounded_vol = 0 icon_state = "[rounded_vol]" @@ -189,7 +187,7 @@ injoverlay = "draw" if (SYRINGE_INJECT) injoverlay = "inject" - add_overlay(injoverlay) + . += injoverlay M.update_inv_hands() /obj/item/reagent_containers/syringe/proc/embed_inject(target, mob/living/carbon/human/embedde, obj/item/bodypart/part) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index f086721ca978..fad188faca75 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(updates=ALL) +/obj/machinery/conveyor/update_icon_state() . = ..() if(!operating) icon_state = "conveyor[inverted ? "-0" : "0"]" @@ -272,14 +272,14 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) // update the icon depending on the position -/obj/machinery/conveyor_switch/update_icon(updates=ALL) +/obj/machinery/conveyor_switch/update_icon_state() . = ..() - if(position<0) + if(position < 0) if(invert_icon) icon_state = "switch-fwd" else icon_state = "switch-rev" - else if(position>0) + else if(position > 0) if(invert_icon) icon_state = "switch-rev" else diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 4c75601b77da..38031365e711 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -360,9 +360,8 @@ pressure_charging = TRUE update_appearance(UPDATE_ICON) -/obj/machinery/disposal/bin/update_icon(updates=ALL) +/obj/machinery/disposal/bin/update_overlays() . = ..() - cut_overlays() if(stat & BROKEN) pressure_charging = FALSE flush = FALSE @@ -370,7 +369,7 @@ //flush handle if(flush) - add_overlay("dispover-handle") + . += "dispover-handle" //only handle is shown if no power if(stat & NOPOWER || panel_open) @@ -378,13 +377,13 @@ //check for items in disposal - occupied light if(contents.len > 0) - add_overlay("dispover-full") + . += "dispover-full" //charging and ready light if(pressure_charging) - add_overlay("dispover-charge") + . += "dispover-charge" else if(full_pressure) - add_overlay("dispover-ready") + . += "dispover-ready" /obj/machinery/disposal/bin/proc/do_flush() set waitfor = FALSE diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 92cae2b0e2b3..42d680720e3f 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -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(updates=ALL) +/obj/structure/disposalconstruct/update_icon_state() . = ..() icon_state = initial(pipe_type.icon_state) if(is_pipe()) diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 52fab6f808f7..c2ce73940991 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -51,7 +51,7 @@ Note: Must be placed within 3 tiles of the R&D Console update_appearance(UPDATE_ICON) reset_busy() -/obj/machinery/rnd/destructive_analyzer/update_icon(updates=ALL) +/obj/machinery/rnd/destructive_analyzer/update_icon_state() . = ..() if(loaded_item) icon_state = "d_analyzer_l" diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 5272c537cc39..d4e18bc08cf1 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -568,9 +568,9 @@ if(autoexperiment) do_experiment() -/obj/machinery/rnd/experimentor/update_icon(updates=ALL) +/obj/machinery/rnd/experimentor/update_icon_state() . = ..() - icon_state = "h_lathe" + icon_state = initial(icon_state) /obj/machinery/rnd/experimentor/proc/warn_admins(user, ReactionName) var/turf/T = get_turf(user) diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index 3417d9bd7866..f7dec9341ae9 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -104,20 +104,19 @@ return SEND_SIGNAL(occupant, COMSIG_NANITE_DELETE) -/obj/machinery/nanite_chamber/update_icon(updates=ALL) +/obj/machinery/nanite_chamber/update_overlays() . = ..() - cut_overlays() if((stat & MAINT) || panel_open) - add_overlay("maint") + . += "maint" else if(!(stat & (NOPOWER|BROKEN))) if(busy || locked) - add_overlay("red") + . += "red" if(locked) - add_overlay("bolted") + . += "bolted" else - add_overlay("green") + . += "green" //running and someone in there if(occupant) diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 92b15e85dd10..842afaa2ec7e 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -46,13 +46,12 @@ locked = FALSE update_appearance(UPDATE_ICON) -/obj/item/nanite_remote/update_icon(updates=ALL) +/obj/item/nanite_remote/update_overlays() . = ..() - cut_overlays() if(obj_flags & EMAGGED) - add_overlay("nanite_remote_emagged") + . += "nanite_remote_emagged" if(locked) - add_overlay("nanite_remote_locked") + . += "nanite_remote_locked" /obj/item/nanite_remote/afterattack(atom/target, mob/user, etc) switch(mode) diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 6f99898c52d8..a90708d6f12e 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -60,33 +60,29 @@ 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(updates=ALL) +/obj/machinery/public_nanite_chamber/update_overlays() . = ..() - cut_overlays() if((stat & MAINT) || panel_open) - add_overlay("maint") + . += "maint" else if(!(stat & (NOPOWER|BROKEN))) if(busy || locked) - add_overlay("red") + . += "red" if(locked) - add_overlay("bolted") + . += "bolted" else - add_overlay("green") + . += "green" - - - //running and someone in there - if(occupant) - if(busy) - icon_state = busy_icon_state - else - icon_state = initial(icon_state)+ "_occupied" +/obj/machinery/public_nanite_chamber/update_icon_state() + . = ..() + if(!occupant) + icon_state = initial(icon_state)+ (state_open ? "_open" : "") return - - //running - icon_state = initial(icon_state)+ (state_open ? "_open" : "") + if(busy) + icon_state = busy_icon_state + else + icon_state = initial(icon_state)+ "_occupied" /obj/machinery/public_nanite_chamber/proc/toggle_open(mob/user) if(panel_open) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index cb12b4782fdf..ed8f1453ab1f 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -39,7 +39,7 @@ tot_rating += SP.rating heat_gen /= max(1, tot_rating) -/obj/machinery/rnd/server/update_icon(updates=ALL) +/obj/machinery/rnd/server/update_icon_state() . = ..() if(panel_open) icon_state = "server_t" diff --git a/code/modules/security_levels/level_interface.dm b/code/modules/security_levels/level_interface.dm index e89777c2c3d0..b41b9cec3191 100644 --- a/code/modules/security_levels/level_interface.dm +++ b/code/modules/security_levels/level_interface.dm @@ -37,19 +37,21 @@ else set_light_on(TRUE) +/obj/machinery/level_interface/update_overlays() + . = ..() 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) diff --git a/code/modules/shuttle/manipulator.dm b/code/modules/shuttle/manipulator.dm index 68cddd114902..600290de1082 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(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) +/obj/machinery/shuttle_manipulator/update_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 + . += hologram_projection + . += hologram_ship diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index 72845a00d2af..ce10314952b8 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(updates=ALL) +/obj/machinery/spaceship_navigation_beacon/update_icon_state() . = ..() if(powered()) icon_state = "core" diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 481727b56fdf..b91f9320e89b 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -21,7 +21,7 @@ desc = "Oh no, not again." update_appearance(UPDATE_ICON) -/obj/machinery/power/emitter/energycannon/magical/update_icon(updates=ALL) +/obj/machinery/power/emitter/energycannon/magical/update_icon_state() . = ..() if(active) icon_state = icon_state_on diff --git a/code/modules/surgery/anesthesia_machine.dm b/code/modules/surgery/anesthesia_machine.dm index 7e2b43103905..af386474096c 100644 --- a/code/modules/surgery/anesthesia_machine.dm +++ b/code/modules/surgery/anesthesia_machine.dm @@ -22,15 +22,14 @@ attached_tank = T update_appearance(UPDATE_ICON) -/obj/machinery/anesthetic_machine/update_icon(updates=ALL) +/obj/machinery/anesthetic_machine/update_overlays() . = ..() - cut_overlays() if(mask_out) - add_overlay("mask_off") + . += "mask_off" else - add_overlay("mask_on") + . += "mask_on" if(attached_tank) - add_overlay("tank_on") + . += "tank_on" /obj/machinery/anesthetic_machine/attack_hand(mob/living/user) diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index fb75ab289b8b..10419ae5496d 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -10,15 +10,20 @@ now_fixed = span_info("The pain in your abdomen has subsided.") var/inflamed -/obj/item/organ/appendix/update_icon(updates=ALL) +/obj/item/organ/appendix/update_name(updates=ALL) . = ..() if(inflamed) - icon_state = "appendixinflamed" name = "inflamed appendix" else - icon_state = "appendix" name = "appendix" +/obj/item/organ/appendix/update_icon_state() + . = ..() + if(inflamed) + icon_state = "appendixinflamed" + else + icon_state = "appendix" + /obj/item/organ/appendix/on_life() ..() if(!(organ_flags & ORGAN_FAILING)) @@ -66,10 +71,13 @@ inflamed = FALSE M.emote("chuckle") //you really think that will stop me? +/obj/item/organ/appendix/cybernetic/update_name(updates=ALL) + . = ..() + name = "cybernetic appendix" + /obj/item/organ/appendix/cybernetic/update_icon(updates=ALL) . = ..() icon_state = "implant-filter" - name = "cybernetic appendix" /obj/item/organ/appendix/cybernetic/emp_act(severity) . = ..() diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 7ef1b2c2dfb0..4c33ca221569 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -171,14 +171,13 @@ on = FALSE update_appearance(UPDATE_ICON) -/obj/item/organ/cyberimp/chest/thrusters/update_icon(updates=ALL) +/obj/item/organ/cyberimp/chest/thrusters/update_icon_state() . = ..() if(on) icon_state = "imp_jetpack-on" else icon_state = "imp_jetpack" - for(var/X in actions) - var/datum/action/A = X + for(var/datum/action/A as anything in actions) A.build_all_button_icons() /obj/item/organ/cyberimp/chest/thrusters/proc/move_react() @@ -278,14 +277,13 @@ to_chat(owner, span_notice("You turn your spinal implant [on? "on" : "off"].")) update_appearance(UPDATE_ICON) -/obj/item/organ/cyberimp/chest/spinalspeed/update_icon(updates=ALL) +/obj/item/organ/cyberimp/chest/spinalspeed/update_icon_state() . = ..() if(on) icon_state = "imp_spinal-on" else icon_state = "imp_spinal" - for(var/X in actions) - var/datum/action/A = X + for(var/datum/action/A as anything in actions) A.build_all_button_icons() /obj/item/organ/cyberimp/chest/spinalspeed/proc/move_react()//afterimage diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 232e54c414fd..254362eb145d 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -26,7 +26,7 @@ icon_base = icon_state update_appearance(UPDATE_ICON) -/obj/item/organ/heart/update_icon(updates=ALL) +/obj/item/organ/heart/update_icon_state() . = ..() if(beating) icon_state = "[icon_base]-on" diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 3072fd086576..0f8bf96bd7c6 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -39,10 +39,10 @@ . = ..() languages_possible = languages_possible_base -/obj/item/organ/tongue/update_icon(updates=ALL) +/obj/item/organ/tongue/update_overlays() . = ..() if(honked) // This tongue has a bike horn inside of it. Let's draw it - add_overlay("honked") + . += "honked" /obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) if(honked) // you have a bike horn inside of your tongue. Time to honk diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index ccb053ab2df5..3535b1958a9d 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -55,13 +55,12 @@ else return ..() -/obj/vehicle/ridden/janicart/update_icon(updates=ALL) +/obj/vehicle/ridden/janicart/update_overlays() . = ..() - cut_overlays() if(mybag) - add_overlay("cart_garbage") + . += "cart_garbage" if(floorbuffer) - add_overlay("cart_buffer") + . += "cart_buffer" /obj/vehicle/ridden/janicart/attack_hand(mob/user) . = ..() diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index b5fc379ea7b7..124bb3aa9431 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -266,15 +266,16 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C else ..() -/obj/machinery/vending/update_icon(updates=ALL) +/obj/machinery/vending/update_icon_state() . = ..() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" + return + + if(powered()) + icon_state = initial(icon_state) else - if(powered()) - icon_state = initial(icon_state) - else - icon_state = "[initial(icon_state)]-off" + icon_state = "[initial(icon_state)]-off" /obj/machinery/vending/obj_break(damage_flag) diff --git a/yogstation/code/game/gamemodes/gangs/dominator.dm b/yogstation/code/game/gamemodes/gangs/dominator.dm index 70c95dfa0a18..7f1c896a0522 100644 --- a/yogstation/code/game/gamemodes/gangs/dominator.dm +++ b/yogstation/code/game/gamemodes/gangs/dominator.dm @@ -54,22 +54,27 @@ /obj/machinery/dominator/tesla_act() qdel(src) -/obj/machinery/dominator/update_icon(updates=ALL) +/obj/machinery/dominator/update_overlays() . = ..() - cut_overlays() - if(!(stat & BROKEN)) - icon_state = "dominator-active" - if(operating) - var/mutable_appearance/dominator_overlay = mutable_appearance('icons/obj/machines/dominator.dmi', "dominator-overlay") - if(gang) - dominator_overlay.color = gang.color - add_overlay(dominator_overlay) - else - icon_state = "dominator" - if(obj_integrity/max_integrity < 0.66) - add_overlay("damage") - else + if(stat & BROKEN) + return + if(operating) + var/mutable_appearance/dominator_overlay = mutable_appearance('icons/obj/machines/dominator.dmi', "dominator-overlay") + if(gang) + dominator_overlay.color = gang.color + . += dominator_overlay + if(obj_integrity/max_integrity < 0.66) + . += "damage" + +/obj/machinery/dominator/update_icon_state() + . = ..() + if(stat & BROKEN) icon_state = "dominator-broken" + return + if(!operating) + icon_state = "dominator" + return + icon_state = "dominator-active" /obj/machinery/dominator/examine(mob/user) . = ..() diff --git a/yogstation/code/game/gamemodes/gangs/gangtool.dm b/yogstation/code/game/gamemodes/gangs/gangtool.dm index b56084988d8c..f35fd60a665f 100644 --- a/yogstation/code/game/gamemodes/gangs/gangtool.dm +++ b/yogstation/code/game/gamemodes/gangs/gangtool.dm @@ -138,13 +138,12 @@ recall(usr) attack_self(usr) -/obj/item/gangtool/update_icon(updates=ALL) +/obj/item/gangtool/update_overlays() . = ..() - overlays.Cut() var/image/I = new(icon, "[icon_state]-overlay") if(gang) I.color = gang.color - overlays.Add(I) + . += I /obj/item/gangtool/proc/ping_gang(mob/user) if(!can_use(user)) diff --git a/yogstation/code/game/objects/items/brace.dm b/yogstation/code/game/objects/items/brace.dm index 3ee9a380db36..55dfcbf15379 100644 --- a/yogstation/code/game/objects/items/brace.dm +++ b/yogstation/code/game/objects/items/brace.dm @@ -23,11 +23,10 @@ var/obj/machinery/door/airlock/placed_on var/cover_open = FALSE -/obj/structure/deployed_brace/update_icon(updates=ALL) +/obj/structure/deployed_brace/update_overlays() . = ..() - cut_overlays() if(cover_open) - add_overlay("cover_open") + . += "cover_open" /obj/structure/deployed_brace/examine(mob/user) . = ..() diff --git a/yogstation/code/game/objects/items/fishing/rods.dm b/yogstation/code/game/objects/items/fishing/rods.dm index 27269e1a76a9..b979e654c32a 100644 --- a/yogstation/code/game/objects/items/fishing/rods.dm +++ b/yogstation/code/game/objects/items/fishing/rods.dm @@ -209,7 +209,7 @@ update_appearance(UPDATE_ICON) user.regenerate_icons() -/obj/item/twohanded/fishingrod/collapsible/update_icon(updates=ALL) +/obj/item/twohanded/fishingrod/collapsible/update_icon_state() . = ..() 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 586c9d8c4cf9..e8f16d8de0cb 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -118,7 +118,7 @@ icon_state = "holotool" set_light(0) - for(var/datum/action/A in actions) + for(var/datum/action/A as anything in actions) A.build_all_button_icons() /obj/item/holotool/proc/check_menu(mob/living/user) diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index 21b29989213c..57b1c2547a3f 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(updates=ALL) - icon_state = "[initial(icon_state)]_used" +/obj/item/sharpener/update_icon_state() + icon_state = "[initial(icon_state)]_used" diff --git a/yogstation/code/game/objects/structures/toilet_bong.dm b/yogstation/code/game/objects/structures/toilet_bong.dm index d3cf8f48e681..0fbe6ca10f13 100644 --- a/yogstation/code/game/objects/structures/toilet_bong.dm +++ b/yogstation/code/game/objects/structures/toilet_bong.dm @@ -20,11 +20,10 @@ weed_overlay = mutable_appearance('yogstation/icons/obj/watercloset.dmi', "weed") START_PROCESSING(SSobj, src) -/obj/structure/toilet_bong/update_icon(updates=ALL) +/obj/structure/toilet_bong/update_overlays() . = ..() - cut_overlays() if (LAZYLEN(contents)) - add_overlay(weed_overlay) + . += weed_overlay /obj/structure/toilet_bong/attack_hand(mob/user) . = ..() diff --git a/yogstation/code/modules/assembly/signaler.dm b/yogstation/code/modules/assembly/signaler.dm index 641a92617de9..9d66c4c819be 100644 --- a/yogstation/code/modules/assembly/signaler.dm +++ b/yogstation/code/modules/assembly/signaler.dm @@ -7,14 +7,13 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/item/assembly/signaler/update_icon(updates=ALL) +/obj/item/assembly/signaler/update_overlays() . = ..() if(label_color) - cut_overlays() attached_overlays = list() var/mutable_appearance/A = mutable_appearance('yogstation/icons/obj/assemblies/new_assemblies.dmi', "signaller_color") A.color = label_color - add_overlay(A) + . += A attached_overlays += A return ..() diff --git a/yogstation/code/modules/clothing/head/helmet.dm b/yogstation/code/modules/clothing/head/helmet.dm index cd6a8274bdde..0c55cc0756d5 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(updates=ALL) +/obj/item/clothing/head/helmet/update_icon_state() . = ..() var/state = "[initial_state]" if(attached_light) 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 2bbcdae0b009..d4ad2323a2d4 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/chocobo.dm @@ -55,16 +55,15 @@ can_buckle = initial(can_buckle) update_appearance(UPDATE_ICON) -/mob/living/simple_animal/chocobo/update_icon(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) + . += base_overlay else var/mutable_appearance/base_overlay = mutable_appearance(icon, "chocobo_limbs") base_overlay.appearance_flags = RESET_COLOR - add_overlay(base_overlay) + . += 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 739e4ca17dee..6872cab8cb93 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 @@ -260,7 +260,7 @@ Difficulty: Insanely Hard 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_icon(updates=ALL) +/mob/living/simple_animal/hostile/retaliate/goat/king/phase2/update_icon_state() . = ..() var/matrix/M = new if(phase3) diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 82fdb2b7a994..8bbf585d4db2 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(updates=ALL) +/obj/machinery/power/validhunter_engine/update_icon_state() . = ..() if(operating) icon_state = "throw_me_in_the_trash_and_feed_my_remains_to_the_devil_operating" diff --git a/yogstation/code/modules/reagents/reagent_containers/hypospray.dm b/yogstation/code/modules/reagents/reagent_containers/hypospray.dm index b79f04419b6a..bdacdabff9cd 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(updates=ALL) +/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/update_icon_state() . = ..() if(reagents.total_volume > 25) icon_state = initial(icon_state) @@ -46,7 +46,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(updates=ALL) +/obj/item/reagent_containers/autoinjector/medipen/stimpack/large/redpill/update_icon_state() . = ..() if(reagents.total_volume > 25) icon_state = initial(icon_state) diff --git a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm index 20a58d062755..e66d58d8b4b7 100644 --- a/yogstation/code/modules/recycling/disposal/pipe_sorting.dm +++ b/yogstation/code/modules/recycling/disposal/pipe_sorting.dm @@ -27,11 +27,10 @@ if(!wires.is_cut(WIRE_SORT_SCAN)) sort_scan = TRUE -/obj/structure/disposalpipe/sorting/update_icon(updates=ALL) +/obj/structure/disposalpipe/sorting/update_overlays() . = ..() - cut_overlays() if(panel_open) - add_overlay(image('yogstation/icons/obj/atmospherics/pipes/disposal.dmi', "[icon_state]-open")) + . += image('yogstation/icons/obj/atmospherics/pipes/disposal.dmi', "[icon_state]-open") /obj/structure/disposalpipe/sorting/screwdriver_act(mob/living/user, obj/item/I) panel_open = !panel_open diff --git a/yogstation/code/modules/spacepods/spacepod.dm b/yogstation/code/modules/spacepods/spacepod.dm index b908f9d68ceb..6fae6028cfc5 100644 --- a/yogstation/code/modules/spacepods/spacepod.dm +++ b/yogstation/code/modules/spacepods/spacepod.dm @@ -396,21 +396,13 @@ GLOBAL_LIST_INIT(spacepods_list, list()) // there here's your frame pieces back, happy? qdel(src) -/obj/spacepod/update_icon(updates=ALL) +/obj/spacepod/update_icon_state() . = ..() - cut_overlays() if(construction_state != SPACEPOD_ARMOR_WELDED) icon = 'goon/icons/obj/spacepods/construction_2x2.dmi' icon_state = "pod_[construction_state]" - if(pod_armor && construction_state >= SPACEPOD_ARMOR_LOOSE) - var/mutable_appearance/masked_armor = mutable_appearance(icon = 'goon/icons/obj/spacepods/construction_2x2.dmi', icon_state = "armor_mask") - var/mutable_appearance/armor = mutable_appearance(pod_armor.pod_icon, pod_armor.pod_icon_state) - armor.blend_mode = BLEND_MULTIPLY - masked_armor.overlays = list(armor) - masked_armor.appearance_flags = KEEP_TOGETHER - add_overlay(masked_armor) return - + if(pod_armor) icon = pod_armor.pod_icon icon_state = pod_armor.pod_icon_state @@ -418,13 +410,25 @@ GLOBAL_LIST_INIT(spacepods_list, list()) icon = 'goon/icons/obj/spacepods/2x2.dmi' icon_state = initial(icon_state) +/obj/spacepod/update_overlays() + . = ..() + if(construction_state != SPACEPOD_ARMOR_WELDED) + if(pod_armor && construction_state >= SPACEPOD_ARMOR_LOOSE) + var/mutable_appearance/masked_armor = mutable_appearance(icon = 'goon/icons/obj/spacepods/construction_2x2.dmi', icon_state = "armor_mask") + var/mutable_appearance/armor = mutable_appearance(pod_armor.pod_icon, pod_armor.pod_icon_state) + armor.blend_mode = BLEND_MULTIPLY + masked_armor.overlays = list(armor) + masked_armor.appearance_flags = KEEP_TOGETHER + . += masked_armor + return + if(obj_integrity <= max_integrity / 2) - add_overlay(image(icon='goon/icons/obj/spacepods/2x2.dmi', icon_state="pod_damage")) + . += image(icon='goon/icons/obj/spacepods/2x2.dmi', icon_state="pod_damage") if(obj_integrity <= max_integrity / 4) - add_overlay(image(icon='goon/icons/obj/spacepods/2x2.dmi', icon_state="pod_fire")) + . += image(icon='goon/icons/obj/spacepods/2x2.dmi', icon_state="pod_fire") if(weapon && weapon.overlay_icon_state) - add_overlay(image(icon=weapon.overlay_icon,icon_state=weapon.overlay_icon_state)) + . += image(icon=weapon.overlay_icon,icon_state=weapon.overlay_icon_state) light_color = icon_light_color[icon_state] || LIGHT_COLOR_WHITE @@ -457,13 +461,13 @@ GLOBAL_LIST_INIT(spacepods_list, list()) var/left_thrust = left_thrusts[cdir] var/right_thrust = right_thrusts[cdir] if(left_thrust) - add_overlay(image(icon = 'yogstation/icons/obj/spacepods/2x2.dmi', icon_state = "rcs_left", dir = cdir)) + . += image(icon = 'yogstation/icons/obj/spacepods/2x2.dmi', icon_state = "rcs_left", dir = cdir) if(right_thrust) - add_overlay(image(icon = 'yogstation/icons/obj/spacepods/2x2.dmi', icon_state = "rcs_right", dir = cdir)) + . += image(icon = 'yogstation/icons/obj/spacepods/2x2.dmi', icon_state = "rcs_right", dir = cdir) if(back_thrust) var/image/I = image(icon = 'yogstation/icons/obj/spacepods/2x2.dmi', icon_state = "thrust") I.transform = matrix(1, 0, 0, 0, 1, -32) - add_overlay(I) + . += I /obj/spacepod/MouseDrop_T(atom/movable/A, mob/living/user) if(user == pilot || (user in passengers) || construction_state != SPACEPOD_ARMOR_WELDED) diff --git a/yogstation/code/modules/xenoarch/loot/gigadrill.dm b/yogstation/code/modules/xenoarch/loot/gigadrill.dm index 22d6bbbe1298..5d108ab2308c 100644 --- a/yogstation/code/modules/xenoarch/loot/gigadrill.dm +++ b/yogstation/code/modules/xenoarch/loot/gigadrill.dm @@ -19,7 +19,7 @@ . = ..() update_appearance(UPDATE_ICON) -/obj/vehicle/ridden/gigadrill/update_icon(updates=ALL) +/obj/vehicle/ridden/gigadrill/update_icon_state() . = ..() if(occupant_amount()) icon_state = "gigadrill_mov" diff --git a/yogstation/code/modules/xenoarch/loot/guns.dm b/yogstation/code/modules/xenoarch/loot/guns.dm index 5c59228e29a1..ad43c9b83fe0 100644 --- a/yogstation/code/modules/xenoarch/loot/guns.dm +++ b/yogstation/code/modules/xenoarch/loot/guns.dm @@ -42,9 +42,7 @@ if(chargesound != oldsound) playsound(src, chargesound, 100) - addtimer(CALLBACK(src, PROC_REF(playsound), src, chargesound, 75), 0.1 SECONDS) - return /obj/item/gun/energy/polarstar/spur name = "Spur" From 3190446c1db6be3776ef0ba86e28ad0e2ced3f57 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Thu, 13 Jul 2023 00:41:02 -0400 Subject: [PATCH 22/50] fix CI cries --- code/game/objects/items/airlock_painter.dm | 1 + code/game/objects/items/robot/robot_items.dm | 6 +++--- code/game/objects/items/singularityhammer.dm | 4 ++-- code/game/objects/items/twohanded.dm | 2 +- code/modules/food_and_drinks/food/customizables.dm | 1 - code/modules/food_and_drinks/food/snacks.dm | 4 ++-- code/modules/mining/equipment/kinetic_crusher.dm | 2 +- yogstation/code/game/objects/items/sharpener.dm | 1 + .../code/modules/atmospherics/machinery/pipes/bluespace.dm | 1 + yogstation/code/modules/xenoarch/loot/guns.dm | 1 + 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index a77b02287e75..75238af1df16 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -51,6 +51,7 @@ ink = new initial_ink_type(src) /obj/item/airlock_painter/update_icon() + . = ..() var/base = initial(icon_state) if(!istype(ink)) icon_state = "[base]_none" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index a2948eaff5c5..3c2f4729fdaa 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -860,13 +860,13 @@ . = ..() /// Resets overlays and adds a overlay if there is a held item. -/obj/item/gripper/update_icon(updates) - cut_overlays() +/obj/item/gripper/update_overlays() + . = ..() if(wrapped) var/mutable_appearance/wrapped_appearance = mutable_appearance(wrapped.icon, wrapped.icon_state) // Shrinking it to 0.8 makes it a bit ugly, but this makes it obvious it is a held item. wrapped_appearance.transform = matrix(0.8,0,0,0,0.8,0) - add_overlay(wrapped_appearance) + . += wrapped_appearance // Make it clear what we can do with it. /obj/item/gripper/examine(mob/user) diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 9da50a34615f..d4569690ecdf 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -31,8 +31,8 @@ return /obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons. + . = ..() icon_state = "singhammer[wielded]" - return /obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder) for(var/atom/X in orange(5,pull)) @@ -120,5 +120,5 @@ shock(hit_atom) /obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons. + . = ..() icon_state = "mjollnir[wielded]" - return diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 66e6735932b7..9dad7e549220 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -252,8 +252,8 @@ AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools /obj/item/twohanded/fireaxe/update_icon(updates=ALL) //Currently only here to fuck with the on-mob icons. + . = ..() icon_state = "fireaxe[wielded]" - return /obj/item/twohanded/fireaxe/suicide_act(mob/user) user.visible_message(span_suicide("[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!")) diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index b883c0814cb5..8b0557367eee 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -61,7 +61,6 @@ /obj/item/reagent_containers/food/snacks/customizable/proc/update_snack_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/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index da42e7a4dd74..6e7bce38d3ff 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -258,14 +258,14 @@ All foods are distributed among various categories. Use common sense. return /obj/item/reagent_containers/food/snacks/proc/update_snack_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") filling.color = pick("#FF0000","#0000FF","#008000","#FFFF00") else filling.color = S.filling_color - . += filling + add_overlay(filling) // initialize_cooked_food() is called when microwaving the food /obj/item/reagent_containers/food/snacks/proc/initialize_cooked_food(obj/item/reagent_containers/food/snacks/S, cooking_efficiency = 1) diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 8d3bf20498c9..1bc51eabc4a9 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -29,8 +29,8 @@ var/backstab_bonus = 30 /obj/item/twohanded/kinetic_crusher/update_icon_state() //Updates the sprite for in-hand and on-mob. + . = ..() icon_state = "mining_hammer[wielded]" - return /obj/item/twohanded/kinetic_crusher/Initialize(mapload) . = ..() diff --git a/yogstation/code/game/objects/items/sharpener.dm b/yogstation/code/game/objects/items/sharpener.dm index 57b1c2547a3f..c92bd58f8142 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_icon_state() + . = ..() icon_state = "[initial(icon_state)]_used" diff --git a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm index b6d6712def5c..9f9bc36031cc 100644 --- a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm +++ b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm @@ -50,6 +50,7 @@ GLOBAL_LIST_EMPTY(bluespace_pipe_networks) update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe) + . = ..() underlays.Cut() var/turf/T = loc diff --git a/yogstation/code/modules/xenoarch/loot/guns.dm b/yogstation/code/modules/xenoarch/loot/guns.dm index ad43c9b83fe0..f074e45e1256 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_icon(force_update) + . = ..() var/maxcharge = cell.maxcharge var/charge = cell.charge From 66468d389eb9fe899cce5f83a4e6405bbda01b8b Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sat, 15 Jul 2023 22:28:21 -0400 Subject: [PATCH 23/50] Fixes cigs, canisters and guncases --- .../lavaland_surface_animal_hospital.dmm | 2 +- .../lavaland_surface_biodome_winter.dmm | 2 +- .../lavaland_surface_gas_station.dmm | 2 +- .../lavaland_surface_russianbunker.dmm | 2 +- .../LavaRuins/lavaland_surface_seed_vault.dmm | 8 +- .../lavaland_surface_syndicate_base1.dmm | 20 +- _maps/RandomRuins/SpaceRuins/crashedship.dmm | 2 +- _maps/RandomRuins/SpaceRuins/gameroom.dmm | 2 +- _maps/RandomRuins/SpaceRuins/oldAIsat.dmm | 2 +- _maps/RandomRuins/SpaceRuins/oldstation.dmm | 2 +- .../SpaceRuins/pubby_monastery.dmm | 6 +- _maps/RandomRuins/SpaceRuins/spacehotel.dmm | 2 +- .../StationRuins/BoxStation/bar_arcade.dmm | 2 +- .../StationRuins/BoxStation/bar_box.dmm | 2 +- .../StationRuins/BoxStation/bar_casino.dmm | 2 +- .../StationRuins/BoxStation/bar_citadel.dmm | 2 +- .../StationRuins/BoxStation/bar_clock.dmm | 2 +- .../StationRuins/BoxStation/bar_conveyor.dmm | 2 +- .../StationRuins/BoxStation/bar_diner.dmm | 2 +- .../StationRuins/BoxStation/bar_disco.dmm | 2 +- .../StationRuins/BoxStation/bar_grassy.dmm | 2 +- .../StationRuins/BoxStation/bar_irish.dmm | 2 +- .../StationRuins/BoxStation/bar_purple.dmm | 2 +- .../StationRuins/BoxStation/bar_spacious.dmm | 2 +- .../StationRuins/BoxStation/bar_trek.dmm | 2 +- .../maint/10x10/10x10_pubbybar.dmm | 2 +- .../maint/10x10/10x10_snakefighter.dmm | 2 +- .../StationRuins/maint/3x3/3x3_boxwindow.dmm | 2 +- .../StationRuins/maint/3x3/3x3_donut.dmm | 2 +- .../maint/3x3/3x3_pubbyclutter1.dmm | 2 +- .../maint/5x3/5x3_yogsmaintdet.dmm | 2 +- .../maint/5x4/5x4_deltadetective.dmm | 4 +- .../StationRuins/maint/5x4/5x4_pass.dmm | 2 +- _maps/RandomZLevels/TheBeach.dmm | 2 +- _maps/RandomZLevels/VR/snowdin_VR.dmm | 2 +- _maps/RandomZLevels/VR/syndicate_trainer.dmm | 4 +- _maps/RandomZLevels/VR/vrhub.dmm | 4 +- _maps/RandomZLevels/moonoutpost19.dmm | 4 +- _maps/RandomZLevels/research.dmm | 4 +- _maps/RandomZLevels/snowdin.dmm | 2 +- _maps/RandomZLevels/undergroundoutpost45.dmm | 6 +- .../AsteroidStation/AsteroidStation.dmm | 30 +-- _maps/map_files/GaxStation/GaxStation.dmm | 10 +- _maps/map_files/YogStation/YogStation.dmm | 20 +- _maps/map_files/Yogsmeta/Yogsmeta.dmm | 28 +-- _maps/map_files/debug/multiz.dmm | 4 +- _maps/map_files/generic/CentCom.dmm | 44 ++-- _maps/shuttles/emergency_bar.dmm | 6 +- _maps/shuttles/emergency_delta.dmm | 2 +- _maps/shuttles/emergency_discoinferno.dmm | 2 +- _maps/shuttles/emergency_donut.dmm | 4 +- _maps/shuttles/emergency_kilo.dmm | 2 +- _maps/shuttles/emergency_luxury.dmm | 2 +- _maps/shuttles/emergency_meta.dmm | 2 +- _maps/shuttles/emergency_mini.dmm | 2 +- _maps/shuttles/emergency_omega.dmm | 2 +- _maps/shuttles/emergency_rollerdome.dmm | 2 +- _maps/shuttles/emergency_russiafightpit.dmm | 2 +- _maps/shuttles/emergency_transtar.dmm | 2 +- _maps/shuttles/hunter_russian.dmm | 2 +- _maps/shuttles/infiltrator_basic.dmm | 2 +- _maps/shuttles/pirate_default.dmm | 14 +- _maps/shuttles/ruin_pirate_cutter.dmm | 2 +- _maps/shuttles/whiteship_3.dmm | 2 +- _maps/shuttles/whiteship_4.dmm | 2 +- _maps/shuttles/whiteship_miner.dmm | 4 +- _maps/templates/shelter_3.dmm | 6 +- code/__DEFINES/inventory.dm | 4 +- code/__DEFINES/lighting.dm | 8 + code/__DEFINES/maths.dm | 2 +- code/__HELPERS/lighting.dm | 13 ++ code/_globalvars/lists/maintenance_loot.dm | 2 +- code/datums/traits/good.dm | 2 +- code/datums/traits/negative.dm | 18 +- code/game/objects/items/holy_armours.dm | 6 +- .../items/stacks/sheets/sheet_types.dm | 8 +- code/game/objects/items/storage/belt.dm | 4 +- code/game/objects/items/storage/fancy.dm | 197 +++++++++--------- .../game/objects/items/storage/uplink_kits.dm | 10 +- .../crates_lockers/closets/job_closets.dm | 4 +- .../crates_lockers/closets/secure/freezer.dm | 4 +- code/game/objects/structures/guncase.dm | 7 +- .../machinery/portable/canister.dm | 131 ++++-------- code/modules/cargo/bounties/assistant.dm | 2 +- code/modules/cargo/packs.dm | 6 +- code/modules/clothing/outfits/occupying.dm | 2 +- code/modules/clothing/suits/chaplainsuits.dm | 4 +- code/modules/clothing/suits/jobs.dm | 4 +- code/modules/clothing/suits/miscellaneous.dm | 20 +- code/modules/events/holiday/vday.dm | 2 +- .../research/designs/biogenerator_designs.dm | 2 +- .../xenobiology/crossbreeding/industrial.dm | 4 +- code/modules/uplink/uplink_items.dm | 4 +- code/modules/vending/cigarette.dm | 52 ++--- code/modules/vending/security.dm | 2 +- code/modules/vending/wardrobes.dm | 2 +- yogstation.dme | 1 + .../_globalvars/lists/maintenance_loot.dm | 44 ++-- .../modules/clothing/suits/miscellaneous.dm | 6 +- .../code/modules/jobs/job_types/clerk.dm | 4 +- 100 files changed, 443 insertions(+), 462 deletions(-) create mode 100644 code/__HELPERS/lighting.dm diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm index 525013d9a402..614ad6f2687a 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm @@ -418,7 +418,7 @@ /area/ruin/powered/animal_hospital) "bf" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/dromedaryco, +/obj/item/storage/fancy/cigarettes/dromedaryco, /obj/item/storage/box/matches, /turf/open/floor/plating, /area/ruin/powered/animal_hospital) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_biodome_winter.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_biodome_winter.dmm index d9045b172bbf..f898880d6f3a 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_biodome_winter.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_biodome_winter.dmm @@ -403,7 +403,7 @@ /area/ruin/powered/snow_biodome) "QK" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/cigpack_carp, +/obj/item/storage/fancy/cigarettes/cigpack_carp, /turf/open/floor/pod/dark, /area/ruin/powered/snow_biodome) "QN" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_gas_station.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_gas_station.dmm index b2c2a59d847d..f1ad88e9d389 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_gas_station.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_gas_station.dmm @@ -377,7 +377,7 @@ /area/ruin/powered/gasstation) "sY" = ( /obj/machinery/vending/cigarette{ - products = list(/obj/item/storage/box/fancy/cigarettes = 3, /obj/item/storage/box/fancy/cigarettes/cigpack_uplift = 2, /obj/item/storage/box/fancy/cigarettes/cigpack_robust = 1, /obj/item/storage/box/fancy/cigarettes/cigpack_carp = 0, /obj/item/storage/box/fancy/cigarettes/cigpack_midori = 0, /obj/item/storage/box/matches = 4, /obj/item/lighter/greyscale = 1, /obj/item/storage/box/fancy/rollingpapers = 3) + products = list(/obj/item/storage/fancy/cigarettes = 3, /obj/item/storage/fancy/cigarettes/cigpack_uplift = 2, /obj/item/storage/fancy/cigarettes/cigpack_robust = 1, /obj/item/storage/fancy/cigarettes/cigpack_carp = 0, /obj/item/storage/fancy/cigarettes/cigpack_midori = 0, /obj/item/storage/box/matches = 4, /obj/item/lighter/greyscale = 1, /obj/item/storage/fancy/rollingpapers = 3) }, /turf/open/floor/plasteel/white, /area/ruin/powered/gasstation) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_russianbunker.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_russianbunker.dmm index 01389f9c7d8d..152899714d8f 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_russianbunker.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_russianbunker.dmm @@ -258,7 +258,7 @@ "aU" = ( /obj/machinery/light, /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/wood, /area/ruin/unpowered/russianbunker) "aX" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm index 501e9a62dfc9..67cdcb220be7 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm @@ -15,10 +15,10 @@ /obj/structure/table/wood, /obj/item/lighter, /obj/item/lighter, -/obj/item/storage/box/fancy/rollingpapers, -/obj/item/storage/box/fancy/rollingpapers, -/obj/item/storage/box/fancy/rollingpapers, -/obj/item/storage/box/fancy/rollingpapers, +/obj/item/storage/fancy/rollingpapers, +/obj/item/storage/fancy/rollingpapers, +/obj/item/storage/fancy/rollingpapers, +/obj/item/storage/fancy/rollingpapers, /turf/open/floor/plasteel/freezer, /area/ruin/powered/seedvault) "e" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm index f7b1265db9f3..c7fc3cb512d0 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm @@ -1700,7 +1700,7 @@ /obj/item/reagent_containers/glass/beaker/cryoxadone, /obj/item/reagent_containers/glass/beaker/cryoxadone, /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/siding/blue{ dir = 9 }, @@ -2159,7 +2159,7 @@ }, /obj/item/storage/toolbox/syndicate, /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/plastitanium, /area/ruin/powered/syndicate_lava_base/telecomms) "jc" = ( @@ -5772,14 +5772,14 @@ }, /obj/item/storage/toolbox/mechanical, /obj/effect/turf_decal/tile/neutral/fourcorners, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/vending_refill/sovietsoda, /turf/open/floor/plasteel/dark, /area/ruin/powered/syndicate_lava_base/cargo) diff --git a/_maps/RandomRuins/SpaceRuins/crashedship.dmm b/_maps/RandomRuins/SpaceRuins/crashedship.dmm index f18cb8193311..9e17af871595 100644 --- a/_maps/RandomRuins/SpaceRuins/crashedship.dmm +++ b/_maps/RandomRuins/SpaceRuins/crashedship.dmm @@ -2419,7 +2419,7 @@ /area/awaymission/BMPship/Aft) "hq" = ( /obj/item/storage/box/matches, -/obj/item/storage/box/fancy/cigarettes/dromedaryco, +/obj/item/storage/fancy/cigarettes/dromedaryco, /turf/open/floor/plating, /area/awaymission/BMPship/Aft) "hr" = ( diff --git a/_maps/RandomRuins/SpaceRuins/gameroom.dmm b/_maps/RandomRuins/SpaceRuins/gameroom.dmm index 647583848262..e146bce6fedc 100644 --- a/_maps/RandomRuins/SpaceRuins/gameroom.dmm +++ b/_maps/RandomRuins/SpaceRuins/gameroom.dmm @@ -744,7 +744,7 @@ /area/ruin/space/has_grav/powered/gaming) "HV" = ( /obj/machinery/vending/gifts{ - products = list(/obj/item/toy/heartballoon = 3, /obj/item/toy/toyballoon = 3, /obj/item/toy/gun/toyglock = 3, /obj/item/toy/gun/toyflaregun = 3, /obj/item/toy/toygrenade = 15, /obj/item/toy/plush/teddybear = 5, /obj/item/toy/plush/stuffedmonkey = 5, /obj/item/toy/plush/flowerbunch = 5, /obj/item/camera_film = 30, /obj/item/storage/photo_album = 5, /obj/item/storage/photobook = 5, /obj/item/hourglass = 2, /obj/item/toy/frisbee = 2, /obj/item/toy/boomerang = 2, /obj/item/storage/bag/photo = 5, /obj/item/toy/plush/bubbleplush = 2, /obj/item/toy/plush/plushvar = 2, /obj/item/toy/plush/narplush = 2, /obj/item/toy/plush/lizardplushie = 2, /obj/item/toy/plush/snakeplushie = 2, /obj/item/toy/plush/nukeplushie = 2, /obj/item/toy/plush/slimeplushie = 2, /obj/item/toy/plush/inorixplushie = 2, /obj/item/toy/plush/beeplushie = 2, /obj/item/instrument/accordion = 1, /obj/item/instrument/eguitar = 1, /obj/item/instrument/glockenspiel = 1, /obj/item/instrument/harmonica = 1, /obj/item/instrument/recorder = 1, /obj/item/instrument/saxophone = 1, /obj/item/instrument/trombone = 1, /obj/item/instrument/trumpet = 1, /obj/item/instrument/piano_synth = 1, /obj/item/instrument/banjo = 1, /obj/item/storage/backpack = 4, /obj/item/reagent_containers/syringe = 3, /obj/item/reagent_containers/pill/patch/styptic = 2, /obj/item/reagent_containers/pill/patch/silver_sulf = 2, /obj/item/reagent_containers/glass/bottle/charcoal = 1, /obj/item/reagent_containers/pill/epinephrine = 1, /obj/item/reagent_containers/glass/beaker/large = 2, /obj/item/flashlight = 3, /obj/item/flashlight/flare = 1, /obj/item/storage/toolbox/mechanical = 1, /obj/item/stack/cable_coil/random = 4, /obj/item/pda = 8, /obj/item/cartridge/engineering = 2, /obj/item/cartridge/atmos = 2, /obj/item/cartridge/medical = 2, /obj/item/cartridge/chemistry = 2, /obj/item/cartridge/janitor = 2, /obj/item/cartridge/lawyer = 2, /obj/item/cartridge/curator = 2, /obj/item/cartridge/roboticist = 2, /obj/item/cartridge/quartermaster = 2, /obj/item/storage/box/fancy/candle_box = 2, /obj/item/storage/crayons = 2) + products = list(/obj/item/toy/heartballoon = 3, /obj/item/toy/toyballoon = 3, /obj/item/toy/gun/toyglock = 3, /obj/item/toy/gun/toyflaregun = 3, /obj/item/toy/toygrenade = 15, /obj/item/toy/plush/teddybear = 5, /obj/item/toy/plush/stuffedmonkey = 5, /obj/item/toy/plush/flowerbunch = 5, /obj/item/camera_film = 30, /obj/item/storage/photo_album = 5, /obj/item/storage/photobook = 5, /obj/item/hourglass = 2, /obj/item/toy/frisbee = 2, /obj/item/toy/boomerang = 2, /obj/item/storage/bag/photo = 5, /obj/item/toy/plush/bubbleplush = 2, /obj/item/toy/plush/plushvar = 2, /obj/item/toy/plush/narplush = 2, /obj/item/toy/plush/lizardplushie = 2, /obj/item/toy/plush/snakeplushie = 2, /obj/item/toy/plush/nukeplushie = 2, /obj/item/toy/plush/slimeplushie = 2, /obj/item/toy/plush/inorixplushie = 2, /obj/item/toy/plush/beeplushie = 2, /obj/item/instrument/accordion = 1, /obj/item/instrument/eguitar = 1, /obj/item/instrument/glockenspiel = 1, /obj/item/instrument/harmonica = 1, /obj/item/instrument/recorder = 1, /obj/item/instrument/saxophone = 1, /obj/item/instrument/trombone = 1, /obj/item/instrument/trumpet = 1, /obj/item/instrument/piano_synth = 1, /obj/item/instrument/banjo = 1, /obj/item/storage/backpack = 4, /obj/item/reagent_containers/syringe = 3, /obj/item/reagent_containers/pill/patch/styptic = 2, /obj/item/reagent_containers/pill/patch/silver_sulf = 2, /obj/item/reagent_containers/glass/bottle/charcoal = 1, /obj/item/reagent_containers/pill/epinephrine = 1, /obj/item/reagent_containers/glass/beaker/large = 2, /obj/item/flashlight = 3, /obj/item/flashlight/flare = 1, /obj/item/storage/toolbox/mechanical = 1, /obj/item/stack/cable_coil/random = 4, /obj/item/pda = 8, /obj/item/cartridge/engineering = 2, /obj/item/cartridge/atmos = 2, /obj/item/cartridge/medical = 2, /obj/item/cartridge/chemistry = 2, /obj/item/cartridge/janitor = 2, /obj/item/cartridge/lawyer = 2, /obj/item/cartridge/curator = 2, /obj/item/cartridge/roboticist = 2, /obj/item/cartridge/quartermaster = 2, /obj/item/storage/fancy/candle_box = 2, /obj/item/storage/crayons = 2) }, /obj/machinery/light{ dir = 8 diff --git a/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm b/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm index 04299debb6e6..2b2eea4d3c0d 100644 --- a/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldAIsat.dmm @@ -283,7 +283,7 @@ /area/tcommsat/oldaisat) "aZ" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /turf/open/floor/plasteel/airless, /area/tcommsat/oldaisat) "ba" = ( diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm index b4224844470b..a2c9ada59526 100644 --- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm @@ -6389,7 +6389,7 @@ "Fj" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_y = 3 }, /turf/open/floor/plasteel, diff --git a/_maps/RandomRuins/SpaceRuins/pubby_monastery.dmm b/_maps/RandomRuins/SpaceRuins/pubby_monastery.dmm index e11acf100bd8..5b1b52cecd7c 100644 --- a/_maps/RandomRuins/SpaceRuins/pubby_monastery.dmm +++ b/_maps/RandomRuins/SpaceRuins/pubby_monastery.dmm @@ -290,7 +290,7 @@ /area/ruin/space/has_grav/monastery) "dF" = ( /obj/structure/table/wood/fancy, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /obj/machinery/light/small, /turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/monastery) @@ -1627,7 +1627,7 @@ /area/ruin/space/has_grav/monastery) "uP" = ( /obj/structure/table/wood/fancy, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /turf/open/floor/carpet, /area/ruin/space/has_grav/monastery/library) "uX" = ( @@ -1669,7 +1669,7 @@ /area/hydroponics/garden/monastery) "vs" = ( /obj/effect/decal/cleanable/cobweb/cobweb2, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /obj/structure/table/wood, /turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/monastery) diff --git a/_maps/RandomRuins/SpaceRuins/spacehotel.dmm b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm index 4acd93bb0e3f..2dd6ed0b679f 100644 --- a/_maps/RandomRuins/SpaceRuins/spacehotel.dmm +++ b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm @@ -3976,7 +3976,7 @@ /area/ruin/space/has_grav/hotel/security) "kA" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel, /area/ruin/space/has_grav/hotel/security) "kB" = ( diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_arcade.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_arcade.dmm index 2d959b4a81d1..8f08f7aad883 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_arcade.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_arcade.dmm @@ -892,7 +892,7 @@ /area/crew_quarters/bar) "Px" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_box.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_box.dmm index d320e380cdde..2117bf436e8d 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_box.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_box.dmm @@ -718,7 +718,7 @@ /area/crew_quarters/kitchen) "bT" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_casino.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_casino.dmm index 35986d7ec2aa..5f2788da0dea 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_casino.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_casino.dmm @@ -930,7 +930,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_citadel.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_citadel.dmm index 773706f5a768..c77d2da9969b 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_citadel.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_citadel.dmm @@ -1387,7 +1387,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only, /obj/machinery/door/firedoor/border_only{ dir = 1 diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_clock.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_clock.dmm index b036c235a50a..d019e7d27b13 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_clock.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_clock.dmm @@ -445,7 +445,7 @@ /turf/open/floor/bronze/reebe, /area/crew_quarters/bar) "oO" = ( -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_conveyor.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_conveyor.dmm index 2735a6065c16..bbc2d9ce3a17 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_conveyor.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_conveyor.dmm @@ -1146,7 +1146,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_diner.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_diner.dmm index 9ee93a5c40a4..5319ea420ab6 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_diner.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_diner.dmm @@ -1157,7 +1157,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_disco.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_disco.dmm index 1e4aa6aeed3f..de6b47d1c6e8 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_disco.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_disco.dmm @@ -782,7 +782,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_grassy.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_grassy.dmm index 853a9247efa0..06373c458dbf 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_grassy.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_grassy.dmm @@ -430,7 +430,7 @@ id = "kitchen"; name = "kitchen shutters" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_irish.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_irish.dmm index 010b8e9f10ac..2e46a7c7a720 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_irish.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_irish.dmm @@ -1678,7 +1678,7 @@ /area/crew_quarters/bar) "FU" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_purple.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_purple.dmm index ceb16098146c..aff65547036f 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_purple.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_purple.dmm @@ -1264,7 +1264,7 @@ /obj/structure/table/reinforced{ color = "purple" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_spacious.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_spacious.dmm index d890017f279d..955edf73ab76 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_spacious.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_spacious.dmm @@ -1018,7 +1018,7 @@ /area/crew_quarters/bar) "FR" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/BoxStation/bar_trek.dmm b/_maps/RandomRuins/StationRuins/BoxStation/bar_trek.dmm index 9d9702621ac2..94bdf170e787 100644 --- a/_maps/RandomRuins/StationRuins/BoxStation/bar_trek.dmm +++ b/_maps/RandomRuins/StationRuins/BoxStation/bar_trek.dmm @@ -1197,7 +1197,7 @@ /area/crew_quarters/bar) "Nw" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "kitchen shutters" diff --git a/_maps/RandomRuins/StationRuins/maint/10x10/10x10_pubbybar.dmm b/_maps/RandomRuins/StationRuins/maint/10x10/10x10_pubbybar.dmm index ea8d90af4c26..36eb9b50c538 100644 --- a/_maps/RandomRuins/StationRuins/maint/10x10/10x10_pubbybar.dmm +++ b/_maps/RandomRuins/StationRuins/maint/10x10/10x10_pubbybar.dmm @@ -204,7 +204,7 @@ "J" = ( /obj/structure/table, /obj/item/stack/spacecash/c20, -/obj/item/storage/box/fancy/cigarettes/cigars, +/obj/item/storage/fancy/cigarettes/cigars, /obj/machinery/door/firedoor/border_only{ dir = 1 }, diff --git a/_maps/RandomRuins/StationRuins/maint/10x10/10x10_snakefighter.dmm b/_maps/RandomRuins/StationRuins/maint/10x10/10x10_snakefighter.dmm index 9dd2f7a567a8..4fa5e0a7d3ec 100644 --- a/_maps/RandomRuins/StationRuins/maint/10x10/10x10_snakefighter.dmm +++ b/_maps/RandomRuins/StationRuins/maint/10x10/10x10_snakefighter.dmm @@ -258,7 +258,7 @@ /turf/open/floor/plating, /area/template_noop) "V" = ( -/obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims, +/obj/item/storage/fancy/cigarettes/cigpack_shadyjims, /turf/open/floor/wood, /area/template_noop) "W" = ( diff --git a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_boxwindow.dmm b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_boxwindow.dmm index 7dc6f3085a8a..cee1eb880c8f 100644 --- a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_boxwindow.dmm +++ b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_boxwindow.dmm @@ -37,7 +37,7 @@ /area/template_noop) "F" = ( /obj/item/storage/box/matches, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /obj/structure/table_frame, /turf/open/floor/plating{ icon_state = "platingdmg2" diff --git a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_donut.dmm b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_donut.dmm index e6f624095691..30cc3ae17d55 100644 --- a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_donut.dmm +++ b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_donut.dmm @@ -50,7 +50,7 @@ /area/template_noop) "K" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -2; pixel_y = 5 }, diff --git a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_pubbyclutter1.dmm b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_pubbyclutter1.dmm index d6fb2e5bf939..f4f784eaa755 100644 --- a/_maps/RandomRuins/StationRuins/maint/3x3/3x3_pubbyclutter1.dmm +++ b/_maps/RandomRuins/StationRuins/maint/3x3/3x3_pubbyclutter1.dmm @@ -31,7 +31,7 @@ /turf/open/floor/plating, /area/template_noop) "A" = ( -/obj/item/storage/box/fancy/cigarettes/cigpack_robustgold, +/obj/item/storage/fancy/cigarettes/cigpack_robustgold, /obj/structure/table_frame, /turf/open/floor/plating, /area/template_noop) diff --git a/_maps/RandomRuins/StationRuins/maint/5x3/5x3_yogsmaintdet.dmm b/_maps/RandomRuins/StationRuins/maint/5x3/5x3_yogsmaintdet.dmm index 0b7c2a39dba6..fb914c81bf46 100644 --- a/_maps/RandomRuins/StationRuins/maint/5x3/5x3_yogsmaintdet.dmm +++ b/_maps/RandomRuins/StationRuins/maint/5x3/5x3_yogsmaintdet.dmm @@ -42,7 +42,7 @@ /area/maintenance/aft) "Z" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigpack_uplift, +/obj/item/storage/fancy/cigarettes/cigpack_uplift, /obj/item/cigbutt, /turf/open/floor/wood, /area/maintenance/aft) diff --git a/_maps/RandomRuins/StationRuins/maint/5x4/5x4_deltadetective.dmm b/_maps/RandomRuins/StationRuins/maint/5x4/5x4_deltadetective.dmm index e1f32fd311a0..e58043ebb7d1 100644 --- a/_maps/RandomRuins/StationRuins/maint/5x4/5x4_deltadetective.dmm +++ b/_maps/RandomRuins/StationRuins/maint/5x4/5x4_deltadetective.dmm @@ -50,8 +50,8 @@ /obj/structure/table/wood, /obj/item/paper_bin, /obj/item/pen, -/obj/item/storage/box/fancy/cigarettes/cigpack_carp, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes/cigpack_carp, +/obj/item/storage/fancy/cigarettes, /turf/open/floor/carpet/red, /area/template_noop) "n" = ( diff --git a/_maps/RandomRuins/StationRuins/maint/5x4/5x4_pass.dmm b/_maps/RandomRuins/StationRuins/maint/5x4/5x4_pass.dmm index 94b3881a33bb..914c69dce424 100644 --- a/_maps/RandomRuins/StationRuins/maint/5x4/5x4_pass.dmm +++ b/_maps/RandomRuins/StationRuins/maint/5x4/5x4_pass.dmm @@ -36,7 +36,7 @@ /area/template_noop) "T" = ( /obj/structure/chair, -/obj/item/storage/box/fancy/cigarettes/cigpack_uplift, +/obj/item/storage/fancy/cigarettes/cigpack_uplift, /turf/open/floor/plating, /area/template_noop) diff --git a/_maps/RandomZLevels/TheBeach.dmm b/_maps/RandomZLevels/TheBeach.dmm index 460c387e26ee..a5f6ac34ac20 100644 --- a/_maps/RandomZLevels/TheBeach.dmm +++ b/_maps/RandomZLevels/TheBeach.dmm @@ -849,7 +849,7 @@ /obj/structure/closet/secure_closet/freezer/kitchen{ req_access = list(25) }, -/obj/item/storage/box/fancy/egg_box, +/obj/item/storage/fancy/egg_box, /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/flour, diff --git a/_maps/RandomZLevels/VR/snowdin_VR.dmm b/_maps/RandomZLevels/VR/snowdin_VR.dmm index 08bb1e8c5566..a11ea4463d80 100644 --- a/_maps/RandomZLevels/VR/snowdin_VR.dmm +++ b/_maps/RandomZLevels/VR/snowdin_VR.dmm @@ -2553,7 +2553,7 @@ /area/awaymission/snowdin/post/messhall) "fO" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/bar, /obj/effect/turf_decal/tile/bar{ dir = 1 diff --git a/_maps/RandomZLevels/VR/syndicate_trainer.dmm b/_maps/RandomZLevels/VR/syndicate_trainer.dmm index 1fc1b4328a38..2d97de497a31 100644 --- a/_maps/RandomZLevels/VR/syndicate_trainer.dmm +++ b/_maps/RandomZLevels/VR/syndicate_trainer.dmm @@ -448,7 +448,7 @@ /area/awaymission/centcomAway/hangar) "cK" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/titanium/yellow, /area/awaymission/centcomAway/hangar) "cL" = ( @@ -617,7 +617,7 @@ /area/awaymission/centcomAway/hangar) "dC" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/indestructible, /area/awaymission/centcomAway/cafe) "dE" = ( diff --git a/_maps/RandomZLevels/VR/vrhub.dmm b/_maps/RandomZLevels/VR/vrhub.dmm index 0c21c794f44e..2e2b54f95c2d 100644 --- a/_maps/RandomZLevels/VR/vrhub.dmm +++ b/_maps/RandomZLevels/VR/vrhub.dmm @@ -1324,7 +1324,7 @@ /area/awaymission/vr/syndicate) "qD" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/indestructible, /area/awaymission/vr/syndicate) "qF" = ( @@ -1935,7 +1935,7 @@ /area/awaymission/vr/hub) "Bp" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/titanium/yellow, /area/awaymission/vr/syndicate) "Bq" = ( diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index 8971737f2c1e..5a725be75640 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -5968,7 +5968,7 @@ /area/awaymission/moonoutpost19/arrivals) "lH" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/dromedaryco, +/obj/item/storage/fancy/cigarettes/dromedaryco, /obj/effect/turf_decal/stripes/line{ dir = 6 }, @@ -6219,7 +6219,7 @@ /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/milk, -/obj/item/storage/box/fancy/egg_box, +/obj/item/storage/fancy/egg_box, /turf/open/floor/plasteel/showroomfloor{ heat_capacity = 1e+006; temperature = 273.15 diff --git a/_maps/RandomZLevels/research.dmm b/_maps/RandomZLevels/research.dmm index a41f693aecc1..08ced079adc5 100644 --- a/_maps/RandomZLevels/research.dmm +++ b/_maps/RandomZLevels/research.dmm @@ -2910,7 +2910,7 @@ /area/awaymission/research/interior/security) "gb" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -5704,7 +5704,7 @@ /area/awaymission/research/interior/medbay) "lx" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/dromedaryco, +/obj/item/storage/fancy/cigarettes/dromedaryco, /obj/effect/turf_decal/tile/blue{ dir = 1 }, diff --git a/_maps/RandomZLevels/snowdin.dmm b/_maps/RandomZLevels/snowdin.dmm index 89f7750cd8e1..69a2ac9a86c6 100644 --- a/_maps/RandomZLevels/snowdin.dmm +++ b/_maps/RandomZLevels/snowdin.dmm @@ -2570,7 +2570,7 @@ /area/awaymission/snowdin/post/messhall) "fO" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/bar, /obj/effect/turf_decal/tile/bar{ dir = 1 diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm index c887b018a1c6..6018b157064b 100644 --- a/_maps/RandomZLevels/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/undergroundoutpost45.dmm @@ -498,7 +498,7 @@ /area/awaymission/undergroundoutpost45/central) "bo" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes{ +/obj/item/storage/fancy/cigarettes{ pixel_y = 2 }, /obj/item/lighter{ @@ -1781,7 +1781,7 @@ /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/milk, /obj/item/reagent_containers/food/condiment/milk, -/obj/item/storage/box/fancy/egg_box, +/obj/item/storage/fancy/egg_box, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/secure_closet/freezer{ locked = 0; @@ -13020,7 +13020,7 @@ /area/awaymission/undergroundoutpost45/mining) "xb" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/cigarettes{ +/obj/item/storage/fancy/cigarettes{ pixel_x = -2 }, /obj/item/lighter{ diff --git a/_maps/map_files/AsteroidStation/AsteroidStation.dmm b/_maps/map_files/AsteroidStation/AsteroidStation.dmm index b2272d5e7ca9..7897169e1248 100644 --- a/_maps/map_files/AsteroidStation/AsteroidStation.dmm +++ b/_maps/map_files/AsteroidStation/AsteroidStation.dmm @@ -369,7 +369,7 @@ /obj/structure/bed, /obj/item/bedsheet/red, /obj/effect/decal/cleanable/dirt, -/obj/item/storage/box/fancy/cigarettes/cigpack_syndicate, +/obj/item/storage/fancy/cigarettes/cigpack_syndicate, /turf/open/floor/wood, /area/ruin/space/has_grav/listeningstation) "ady" = ( @@ -402,7 +402,7 @@ /area/science/test_area) "adL" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/wood, /area/vacant_room) "adP" = ( @@ -1395,7 +1395,7 @@ /area/science/research) "amm" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/coin/silver, /turf/open/floor/plasteel, /area/crew_quarters/dorms) @@ -6570,7 +6570,7 @@ /area/medical/patients_rooms/room_b) "bkf" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigpack_robustgold, +/obj/item/storage/fancy/cigarettes/cigpack_robustgold, /turf/open/floor/carpet/blue, /area/bridge/meeting_room) "bkh" = ( @@ -13351,7 +13351,7 @@ pixel_x = 24 }, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/trimline/red/filled/line{ dir = 4 }, @@ -18197,7 +18197,7 @@ /area/medical/chemistry) "fgb" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -2; pixel_y = 10 }, @@ -22192,7 +22192,7 @@ /area/maintenance/department/tcoms) "gyp" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "gyr" = ( @@ -22300,7 +22300,7 @@ /obj/item/bedsheet/red, /obj/effect/decal/cleanable/dirt, /mob/living/simple_animal/hostile/russian, -/obj/item/storage/box/fancy/cigarettes/cigpack_cannabis, +/obj/item/storage/fancy/cigarettes/cigpack_cannabis, /turf/open/floor/wood, /area/ruin/space/has_grav/listeningstation) "gzO" = ( @@ -28626,7 +28626,7 @@ pixel_y = 5 }, /obj/item/restraints/handcuffs/cable/zipties, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/dark, /area/bridge) "iEo" = ( @@ -33007,7 +33007,7 @@ /area/hallway/primary/fore) "jWJ" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/carpet/blue, /area/bridge/meeting_room) "jXf" = ( @@ -53293,11 +53293,11 @@ /area/maintenance/port) "qAZ" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba{ +/obj/item/storage/fancy/cigarettes/cigars/cohiba{ pixel_x = 2; pixel_y = 3 }, -/obj/item/storage/box/fancy/cigarettes/cigars/havana{ +/obj/item/storage/fancy/cigarettes/cigars/havana{ pixel_x = -3; pixel_y = 9 }, @@ -56127,9 +56127,9 @@ /area/maintenance/starboard/aft) "rwo" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/candle_box, -/obj/item/storage/box/fancy/candle_box, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /obj/item/storage/crayons, /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer4, /turf/open/floor/wood, diff --git a/_maps/map_files/GaxStation/GaxStation.dmm b/_maps/map_files/GaxStation/GaxStation.dmm index a834d08a2ceb..3aed26e0562c 100644 --- a/_maps/map_files/GaxStation/GaxStation.dmm +++ b/_maps/map_files/GaxStation/GaxStation.dmm @@ -12273,7 +12273,7 @@ pixel_x = 8; pixel_y = 4 }, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -5; pixel_y = -6 }, @@ -23685,7 +23685,7 @@ dir = 8 }, /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/dark, /area/bridge) "lEP" = ( @@ -41074,7 +41074,7 @@ /obj/structure/chair{ dir = 4 }, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /turf/open/floor/plating, /area/maintenance/department/eva) "ujT" = ( @@ -45521,7 +45521,7 @@ /area/engine/engineering) "wsU" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/light_switch{ pixel_x = 24 }, @@ -47198,7 +47198,7 @@ /area/hallway/primary/central) "xjw" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -5; pixel_y = 6 }, diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm index c3323cb1ba26..a8a3e333944a 100644 --- a/_maps/map_files/YogStation/YogStation.dmm +++ b/_maps/map_files/YogStation/YogStation.dmm @@ -4422,7 +4422,7 @@ pixel_x = 6; pixel_y = -4 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_robust{ +/obj/item/storage/fancy/cigarettes/cigpack_robust{ pixel_x = 12; pixel_y = 7 }, @@ -7587,7 +7587,7 @@ /area/tcommsat/server) "bch" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/carpet/blue, /area/crew_quarters/heads/captain) "bcn" = ( @@ -14211,7 +14211,7 @@ /area/hallway/secondary/entry) "cmV" = ( /obj/structure/chair, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /turf/open/floor/plating, /area/maintenance/starboard/aft) "cna" = ( @@ -18932,7 +18932,7 @@ /area/construction/mining/aux_base) "dRK" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes{ +/obj/item/storage/fancy/cigarettes{ pixel_y = 2 }, /obj/item/lighter/greyscale{ @@ -22895,7 +22895,7 @@ pixel_x = 2; pixel_y = -2 }, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -2; pixel_y = 10 }, @@ -27513,7 +27513,7 @@ /area/medical/medbay/lobby) "hcu" = ( /obj/structure/table, -/obj/item/storage/box/fancy/heart_box{ +/obj/item/storage/fancy/heart_box{ pixel_x = 15; pixel_y = -1 }, @@ -38694,7 +38694,7 @@ /area/storage/tech) "lqw" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = 4; pixel_y = -3 }, @@ -39051,7 +39051,7 @@ pixel_x = -8; pixel_y = 2 }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/trimline/secred/filled/line/lower{ dir = 9 }, @@ -51495,7 +51495,7 @@ /turf/open/floor/plasteel, /area/security/prison) "qmf" = ( -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/structure/table, /obj/structure/cable{ icon_state = "2-8" @@ -67449,7 +67449,7 @@ /area/engine/engineering) "wts" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes{ +/obj/item/storage/fancy/cigarettes{ pixel_x = -5; pixel_y = 6 }, diff --git a/_maps/map_files/Yogsmeta/Yogsmeta.dmm b/_maps/map_files/Yogsmeta/Yogsmeta.dmm index 088d84539dcc..2622203df19d 100644 --- a/_maps/map_files/Yogsmeta/Yogsmeta.dmm +++ b/_maps/map_files/Yogsmeta/Yogsmeta.dmm @@ -757,7 +757,7 @@ /obj/item/taperecorder{ pixel_x = -3 }, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /obj/item/assembly/flash/handheld, /obj/item/reagent_containers/spray/pepper, /obj/effect/turf_decal/tile/red{ @@ -781,7 +781,7 @@ pixel_x = -24 }, /obj/structure/rack, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/gun/energy/e_gun/dragnet, /obj/item/gun/energy/e_gun/dragnet, /obj/effect/turf_decal/tile/neutral{ @@ -5688,7 +5688,7 @@ "apS" = ( /obj/structure/table, /obj/item/folder/red, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /obj/item/clothing/mask/gas/sechailer, /turf/open/floor/plasteel, /area/security/main) @@ -7933,7 +7933,7 @@ /obj/structure/cable/yellow{ icon_state = "1-2" }, -/obj/item/storage/box/fancy/candle_box{ +/obj/item/storage/fancy/candle_box{ pixel_y = 5 }, /obj/structure/table/wood, @@ -16989,7 +16989,7 @@ dir = 8 }, /obj/structure/rack, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/storage/box/donkpockets, /obj/machinery/airalarm{ dir = 8; @@ -19010,7 +19010,7 @@ icon_state = "0-4" }, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/dark, /area/security/courtroom) "aUJ" = ( @@ -22275,7 +22275,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/customs) "bdc" = ( -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/structure/table/glass, /obj/machinery/firealarm{ dir = 8; @@ -23097,7 +23097,7 @@ /obj/structure/cable/yellow{ icon_state = "4-8" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/carpet, /area/crew_quarters/heads/captain/private) "bff" = ( @@ -25689,7 +25689,7 @@ /area/bridge) "bkJ" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/poddoor/shutters/preopen{ id = "kitchen"; name = "Serving Hatch" @@ -45658,8 +45658,8 @@ name = "memorial board"; pixel_y = 32 }, -/obj/item/storage/box/fancy/candle_box, -/obj/item/storage/box/fancy/candle_box{ +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box{ pixel_x = -2; pixel_y = 2 }, @@ -66177,7 +66177,7 @@ icon_state = "minibar"; name = "skeletal minibar" }, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /turf/open/floor/engine/cult, /area/library) "nXM" = ( @@ -70812,7 +70812,7 @@ /obj/item/gps{ gpstag = "QM0" }, -/obj/item/storage/box/fancy/cigarettes/cigars{ +/obj/item/storage/fancy/cigarettes/cigars{ pixel_y = 4 }, /obj/item/lighter, @@ -81800,7 +81800,7 @@ /area/crew_quarters/theatre) "xTA" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes, +/obj/item/storage/fancy/cigarettes, /obj/item/clothing/glasses/sunglasses, /obj/item/reagent_containers/food/drinks/bottle/whiskey, /turf/open/floor/carpet, diff --git a/_maps/map_files/debug/multiz.dmm b/_maps/map_files/debug/multiz.dmm index 2704a71d5dc1..022e0cc76fc2 100644 --- a/_maps/map_files/debug/multiz.dmm +++ b/_maps/map_files/debug/multiz.dmm @@ -881,14 +881,14 @@ /area/hallway/secondary/entry) "cI" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel{ dir = 8 }, /area/hallway/secondary/entry) "cJ" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel{ dir = 10 }, diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index fb099fd2fdb3..a7695af74b5c 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -3273,7 +3273,7 @@ /area/centcom/control) "aiz" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/stripes/line, /turf/open/floor/plasteel, /area/centcom/control) @@ -6303,7 +6303,7 @@ /area/centcom/ferry) "aoD" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/carpet/green, /area/centcom/ferry) "aoE" = ( @@ -6686,7 +6686,7 @@ /area/centcom/control) "apn" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -6807,7 +6807,7 @@ /area/centcom/control) "apu" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/light, /obj/effect/turf_decal/tile/neutral{ dir = 1 @@ -8796,7 +8796,7 @@ /area/holodeck/rec_center/spacechess) "atc" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /turf/open/floor/plasteel, /area/centcom/testchamber) "atd" = ( @@ -9006,7 +9006,7 @@ /turf/open/floor/carpet/green, /area/centcom/ferry) "atB" = ( -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/structure/table/reinforced, /obj/machinery/atmospherics/pipe/simple/supply/hidden, /turf/open/floor/carpet/green, @@ -10160,7 +10160,7 @@ /area/centcom/control) "avK" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -11666,7 +11666,7 @@ /area/syndicate_mothership/control) "ayY" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -12877,7 +12877,7 @@ /area/space) "aBx" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -13088,7 +13088,7 @@ "aBN" = ( /obj/structure/table/reinforced, /obj/machinery/door/firedoor, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/door/window/brigdoor{ base_state = "rightsecure"; dir = 1; @@ -14101,7 +14101,7 @@ "aDt" = ( /obj/structure/table/reinforced, /obj/machinery/door/firedoor, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/structure/window/reinforced{ dir = 4 }, @@ -16605,13 +16605,13 @@ /turf/open/floor/plasteel/dark, /area/tdome/tdomeobserve) "aIe" = ( -/obj/item/storage/box/fancy/cigarettes/cigars{ +/obj/item/storage/fancy/cigarettes/cigars{ pixel_y = 6 }, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba{ +/obj/item/storage/fancy/cigarettes/cigars/cohiba{ pixel_y = 3 }, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /obj/structure/table/wood, /obj/effect/turf_decal/tile/neutral{ dir = 1 @@ -17930,7 +17930,7 @@ /area/tdome/tdomeadmin) "aKx" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -18390,7 +18390,7 @@ dir = 8 }, /obj/structure/table/wood, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /obj/item/hand_labeler, /turf/open/floor/holofloor{ icon_state = "darkfull" @@ -19289,9 +19289,9 @@ /obj/item/vending_refill/autodrobe, /obj/item/stack/sheet/paperframes/fifty, /obj/item/stack/sheet/paperframes/fifty, -/obj/item/storage/box/fancy/candle_box, -/obj/item/storage/box/fancy/candle_box, -/obj/item/storage/box/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, /obj/item/storage/box/lights/mixed, /turf/open/floor/wood, /area/centcom/holding) @@ -22606,7 +22606,7 @@ /area/centcom/testchamber) "aTT" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel, /area/centcom/supplypod) "aTU" = ( @@ -25635,7 +25635,7 @@ /area/brazil) "bfK" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = 12; pixel_y = 7 }, @@ -25840,7 +25840,7 @@ /area/centcom/testchamber) "fpM" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba{ +/obj/item/storage/fancy/cigarettes/cigars/cohiba{ pixel_y = 3 }, /obj/effect/spawner/lootdrop/donkpockets{ diff --git a/_maps/shuttles/emergency_bar.dmm b/_maps/shuttles/emergency_bar.dmm index 90762a9dd9aa..43f47cb4a814 100644 --- a/_maps/shuttles/emergency_bar.dmm +++ b/_maps/shuttles/emergency_bar.dmm @@ -40,7 +40,7 @@ /area/shuttle/escape) "ai" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /obj/item/lighter{ pixel_x = -4; pixel_y = 6 @@ -596,7 +596,7 @@ /area/shuttle/escape) "bJ" = ( /obj/structure/table/wood/bar, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/grimy, /area/shuttle/escape) "bK" = ( @@ -618,7 +618,7 @@ /obj/structure/table, /obj/item/storage/box/drinkingglasses, /obj/item/reagent_containers/food/drinks/shaker, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /obj/effect/turf_decal/tile/bar, /obj/effect/turf_decal/tile/bar{ dir = 1 diff --git a/_maps/shuttles/emergency_delta.dmm b/_maps/shuttles/emergency_delta.dmm index 641d335aca49..cf16f1abf94e 100644 --- a/_maps/shuttles/emergency_delta.dmm +++ b/_maps/shuttles/emergency_delta.dmm @@ -1094,7 +1094,7 @@ /area/shuttle/escape) "cd" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, diff --git a/_maps/shuttles/emergency_discoinferno.dmm b/_maps/shuttles/emergency_discoinferno.dmm index c868a4b526c5..3ce2293de3f2 100644 --- a/_maps/shuttles/emergency_discoinferno.dmm +++ b/_maps/shuttles/emergency_discoinferno.dmm @@ -26,7 +26,7 @@ /area/shuttle/escape) "g" = ( /obj/structure/table/wood, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /obj/item/lighter{ pixel_x = -4; pixel_y = 6 diff --git a/_maps/shuttles/emergency_donut.dmm b/_maps/shuttles/emergency_donut.dmm index 2298ddba9de3..506ba56e6d9f 100644 --- a/_maps/shuttles/emergency_donut.dmm +++ b/_maps/shuttles/emergency_donut.dmm @@ -92,7 +92,7 @@ /area/shuttle/escape) "as" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/titanium/blue, /area/shuttle/escape) "at" = ( @@ -202,7 +202,7 @@ /area/shuttle/escape) "aI" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/book/manual/wiki/security_space_law, /obj/item/storage/box/handcuffs, /turf/open/floor/mineral/plastitanium/red/brig, diff --git a/_maps/shuttles/emergency_kilo.dmm b/_maps/shuttles/emergency_kilo.dmm index 5d2844f4e6aa..994d7033e3cb 100644 --- a/_maps/shuttles/emergency_kilo.dmm +++ b/_maps/shuttles/emergency_kilo.dmm @@ -304,7 +304,7 @@ /obj/effect/turf_decal/tile/neutral{ dir = 1 }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/plastitanium, /area/shuttle/escape) "aG" = ( diff --git a/_maps/shuttles/emergency_luxury.dmm b/_maps/shuttles/emergency_luxury.dmm index 039ecffa6c10..499db62f610f 100644 --- a/_maps/shuttles/emergency_luxury.dmm +++ b/_maps/shuttles/emergency_luxury.dmm @@ -77,7 +77,7 @@ /area/shuttle/escape/luxury) "dD" = ( /obj/structure/table/wood/fancy/black, -/obj/item/storage/box/fancy/cigarettes/cigars/havana{ +/obj/item/storage/fancy/cigarettes/cigars/havana{ pixel_x = 4; pixel_y = 4 }, diff --git a/_maps/shuttles/emergency_meta.dmm b/_maps/shuttles/emergency_meta.dmm index 8c1f76cbde39..3a27d3376aeb 100644 --- a/_maps/shuttles/emergency_meta.dmm +++ b/_maps/shuttles/emergency_meta.dmm @@ -235,7 +235,7 @@ /area/shuttle/escape) "aw" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/mineral/titanium/blue, /area/shuttle/escape) "ax" = ( diff --git a/_maps/shuttles/emergency_mini.dmm b/_maps/shuttles/emergency_mini.dmm index eaaa99806343..2542dc3587fb 100644 --- a/_maps/shuttles/emergency_mini.dmm +++ b/_maps/shuttles/emergency_mini.dmm @@ -813,7 +813,7 @@ /area/shuttle/escape) "Ug" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/plasteel/dark, /area/shuttle/escape) "Uh" = ( diff --git a/_maps/shuttles/emergency_omega.dmm b/_maps/shuttles/emergency_omega.dmm index 6483937d2b38..9740fe91746b 100644 --- a/_maps/shuttles/emergency_omega.dmm +++ b/_maps/shuttles/emergency_omega.dmm @@ -161,7 +161,7 @@ /area/shuttle/escape) "ap" = ( /obj/structure/table/reinforced, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/light{ dir = 4 }, diff --git a/_maps/shuttles/emergency_rollerdome.dmm b/_maps/shuttles/emergency_rollerdome.dmm index 1bf3204c6a70..c82af014fd83 100644 --- a/_maps/shuttles/emergency_rollerdome.dmm +++ b/_maps/shuttles/emergency_rollerdome.dmm @@ -166,7 +166,7 @@ pixel_x = -4; pixel_y = 6 }, -/obj/item/storage/box/fancy/cigarettes/cigars/havana, +/obj/item/storage/fancy/cigarettes/cigars/havana, /turf/open/floor/wood, /area/shuttle/escape) "wn" = ( diff --git a/_maps/shuttles/emergency_russiafightpit.dmm b/_maps/shuttles/emergency_russiafightpit.dmm index 4f3623a37ceb..11ae04f65b78 100644 --- a/_maps/shuttles/emergency_russiafightpit.dmm +++ b/_maps/shuttles/emergency_russiafightpit.dmm @@ -57,7 +57,7 @@ /area/shuttle/escape) "am" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba, +/obj/item/storage/fancy/cigarettes/cigars/cohiba, /obj/item/reagent_containers/food/drinks/bottle/vodka/badminka{ pixel_x = 5; pixel_y = 18 diff --git a/_maps/shuttles/emergency_transtar.dmm b/_maps/shuttles/emergency_transtar.dmm index 24c36a767bf6..d81ff9873254 100644 --- a/_maps/shuttles/emergency_transtar.dmm +++ b/_maps/shuttles/emergency_transtar.dmm @@ -281,7 +281,7 @@ "rY" = ( /obj/structure/table/reinforced, /obj/machinery/light, -/obj/item/storage/box/fancy/cigarettes/cigpack_robust, +/obj/item/storage/fancy/cigarettes/cigpack_robust, /turf/open/floor/carpet, /area/shuttle/escape) "sp" = ( diff --git a/_maps/shuttles/hunter_russian.dmm b/_maps/shuttles/hunter_russian.dmm index 279961ae49a6..5c4d481ae461 100644 --- a/_maps/shuttles/hunter_russian.dmm +++ b/_maps/shuttles/hunter_russian.dmm @@ -100,7 +100,7 @@ /area/shuttle/hunter) "s" = ( /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba{ +/obj/item/storage/fancy/cigarettes/cigars/cohiba{ pixel_y = 6 }, /turf/open/floor/mineral/plastitanium, diff --git a/_maps/shuttles/infiltrator_basic.dmm b/_maps/shuttles/infiltrator_basic.dmm index 1ecc20c4c220..bd848012dabc 100644 --- a/_maps/shuttles/infiltrator_basic.dmm +++ b/_maps/shuttles/infiltrator_basic.dmm @@ -126,7 +126,7 @@ /obj/machinery/status_display/ai{ pixel_x = 32 }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/machinery/light{ dir = 4 }, diff --git a/_maps/shuttles/pirate_default.dmm b/_maps/shuttles/pirate_default.dmm index 9b74590832ab..47d0e5d7d4ba 100644 --- a/_maps/shuttles/pirate_default.dmm +++ b/_maps/shuttles/pirate_default.dmm @@ -1091,7 +1091,7 @@ locked = 0; name = "fridge" }, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/item/reagent_containers/food/snacks/cookie, /obj/item/reagent_containers/food/snacks/cookie{ pixel_x = -6; @@ -1263,25 +1263,25 @@ "Yj" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/table, -/obj/item/storage/box/fancy/cigarettes{ +/obj/item/storage/fancy/cigarettes{ pixel_x = 2; pixel_y = 6 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_carp{ +/obj/item/storage/fancy/cigarettes/cigpack_carp{ pixel_x = 10; pixel_y = 6 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_robust{ +/obj/item/storage/fancy/cigarettes/cigpack_robust{ pixel_x = 2 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_midori{ +/obj/item/storage/fancy/cigarettes/cigpack_midori{ pixel_x = 10 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims{ +/obj/item/storage/fancy/cigarettes/cigpack_shadyjims{ pixel_x = 2; pixel_y = -6 }, -/obj/item/storage/box/fancy/cigarettes/cigpack_uplift{ +/obj/item/storage/fancy/cigarettes/cigpack_uplift{ pixel_x = 10; pixel_y = -6 }, diff --git a/_maps/shuttles/ruin_pirate_cutter.dmm b/_maps/shuttles/ruin_pirate_cutter.dmm index 07266625458e..7570ff1fc97a 100644 --- a/_maps/shuttles/ruin_pirate_cutter.dmm +++ b/_maps/shuttles/ruin_pirate_cutter.dmm @@ -567,7 +567,7 @@ /area/shuttle/caravan/pirate) "qC" = ( /obj/structure/table, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_y = 18 }, /obj/item/storage/box/donkpockets{ diff --git a/_maps/shuttles/whiteship_3.dmm b/_maps/shuttles/whiteship_3.dmm index 29d6807798b5..1ff39ce07afb 100644 --- a/_maps/shuttles/whiteship_3.dmm +++ b/_maps/shuttles/whiteship_3.dmm @@ -486,7 +486,7 @@ "bK" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /obj/effect/turf_decal/tile/bar, /obj/effect/turf_decal/tile/bar{ dir = 1 diff --git a/_maps/shuttles/whiteship_4.dmm b/_maps/shuttles/whiteship_4.dmm index 1bc8a03668a4..5036275297d7 100644 --- a/_maps/shuttles/whiteship_4.dmm +++ b/_maps/shuttles/whiteship_4.dmm @@ -1446,7 +1446,7 @@ "uM" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box{ +/obj/item/storage/fancy/donut_box{ pixel_x = -11; pixel_y = 3 }, diff --git a/_maps/shuttles/whiteship_miner.dmm b/_maps/shuttles/whiteship_miner.dmm index 5babcbdae153..327837a6f8bf 100644 --- a/_maps/shuttles/whiteship_miner.dmm +++ b/_maps/shuttles/whiteship_miner.dmm @@ -549,7 +549,7 @@ /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer4{ dir = 1 }, -/obj/item/storage/box/fancy/egg_box{ +/obj/item/storage/fancy/egg_box{ pixel_y = 5 }, /turf/open/floor/plasteel/showroomfloor, @@ -1269,7 +1269,7 @@ "Sd" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on/layer2, /obj/structure/table, -/obj/item/storage/box/fancy/donut_box, +/obj/item/storage/fancy/donut_box, /turf/open/floor/carpet/black, /area/shuttle/abandoned) "Sg" = ( diff --git a/_maps/templates/shelter_3.dmm b/_maps/templates/shelter_3.dmm index 80d5ecee13e7..41281f5fe7f5 100644 --- a/_maps/templates/shelter_3.dmm +++ b/_maps/templates/shelter_3.dmm @@ -240,11 +240,11 @@ /area/survivalpod) "S" = ( /obj/structure/table/wood/fancy/black, -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba, -/obj/item/storage/box/fancy/cigarettes/cigars/havana{ +/obj/item/storage/fancy/cigarettes/cigars/cohiba, +/obj/item/storage/fancy/cigarettes/cigars/havana{ pixel_y = 5 }, -/obj/item/storage/box/fancy/cigarettes/cigars{ +/obj/item/storage/fancy/cigarettes/cigars{ pixel_y = 10 }, /turf/open/floor/pod/dark, diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index dc3241e3b02a..543f51b78113 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -176,7 +176,7 @@ GLOBAL_LIST_INIT(detective_vest_allowed, typecacheof(list( /obj/item/melee/classic_baton, /obj/item/reagent_containers/spray/pepper, /obj/item/restraints/handcuffs, - /obj/item/storage/box/fancy/cigarettes, + /obj/item/storage/fancy/cigarettes, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant))) @@ -200,7 +200,7 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list( /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/flashlight, - /obj/item/storage/box/fancy/cigarettes, + /obj/item/storage/fancy/cigarettes, /obj/item/gun/ballistic, /obj/item/gun/energy, /obj/item/lighter, diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm index 18f3e09c7a6c..64ff6755cc67 100644 --- a/code/__DEFINES/lighting.dm +++ b/code/__DEFINES/lighting.dm @@ -85,6 +85,14 @@ /// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans. #define EMISSIVE_BLOCK_UNIQUE 2 +/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR]. +#define EMISSIVE_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0) +/// A globaly cached version of [EMISSIVE_COLOR] for quick access. +GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR) +/// A set of appearance flags applied to all emissive and emissive blocker overlays. +/// KEEP_APART to prevent parent hooking, KEEP_TOGETHER for children, and we reset the color and alpha of our parent so nothing gets overriden +#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR|RESET_ALPHA) + /// Returns the red part of a #RRGGBB hex sequence as number #define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4)) diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm index 7b6991ecf0c9..74cf20faa8eb 100644 --- a/code/__DEFINES/maths.dm +++ b/code/__DEFINES/maths.dm @@ -5,7 +5,7 @@ #define NUM_E 2.71828183 #define PI 3.1416 -#define INFINITY 1e31 //closer then enough +#define INFINITY 1e31 //closer then enough #define SHORT_REAL_LIMIT 16777216 diff --git a/code/__HELPERS/lighting.dm b/code/__HELPERS/lighting.dm new file mode 100644 index 000000000000..6a56d65ae016 --- /dev/null +++ b/code/__HELPERS/lighting.dm @@ -0,0 +1,13 @@ +/// Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the [EMISSIVE_COLOR]. +/proc/emissive_appearance(icon, icon_state = "", atom/offset_spokesman, layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE, offset_const) + // Note: alpha doesn't "do" anything, since it's overriden by the color set shortly after + // Consider removing it someday? (I wonder if we made emissives blend right we could make alpha actually matter. dreams man, dreams) + var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, offset_spokesman, EMISSIVE_PLANE, 255, appearance_flags | EMISSIVE_APPEARANCE_FLAGS, offset_const) + appearance.color = GLOB.emissive_color + + //Test to make sure emissives with broken or missing icon states are created +// if(PERFORM_ALL_TESTS(focus_only/invalid_emissives)) +// if(icon_state && !icon_exists(icon, icon_state, scream = FALSE)) //Scream set to False so we can have a custom stack_trace +// stack_trace("An emissive appearance was added with non-existant icon_state \"[icon_state]\" in [icon]!") + + return appearance diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index af626e6dd69e..b7d46bc48474 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -94,7 +94,7 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/storage/box/donkpockets/donkpockethonk = 1, /obj/item/storage/box/lights/mixed = 3, /obj/item/storage/box/hug/medical = 1, - /obj/item/storage/box/fancy/cigarettes/dromedaryco = 1, + /obj/item/storage/fancy/cigarettes/dromedaryco = 1, /obj/item/storage/toolbox/mechanical = 1, /obj/item/screwdriver = 3, /obj/item/tank/internals/emergency_oxygen = 2, diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 973f0e0542fc..9a9e378c6530 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -214,7 +214,7 @@ /datum/quirk/spiritual/on_spawn() var/mob/living/carbon/human/H = quirk_holder - H.equip_to_slot_or_del(new /obj/item/storage/box/fancy/candle_box(H), ITEM_SLOT_BACKPACK) + H.equip_to_slot_or_del(new /obj/item/storage/fancy/candle_box(H), ITEM_SLOT_BACKPACK) H.equip_to_slot_or_del(new /obj/item/storage/box/matches(H), ITEM_SLOT_BACKPACK) /datum/quirk/toxic_tastes diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index d978e9d53f8c..e348a55931f3 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -592,14 +592,14 @@ accessory_type = /obj/item/lighter/greyscale /datum/quirk/junkie/smoker/on_spawn() - drug_container_type = pick(/obj/item/storage/box/fancy/cigarettes, - /obj/item/storage/box/fancy/cigarettes/cigpack_midori, - /obj/item/storage/box/fancy/cigarettes/cigpack_uplift, - /obj/item/storage/box/fancy/cigarettes/cigpack_robust, - /obj/item/storage/box/fancy/cigarettes/cigpack_robustgold, - /obj/item/storage/box/fancy/cigarettes/cigpack_carp, - /obj/item/storage/box/fancy/cigarettes/cigars, - /obj/item/storage/box/fancy/cigarettes/cigars/havana) + drug_container_type = pick(/obj/item/storage/fancy/cigarettes, + /obj/item/storage/fancy/cigarettes/cigpack_midori, + /obj/item/storage/fancy/cigarettes/cigpack_uplift, + /obj/item/storage/fancy/cigarettes/cigpack_robust, + /obj/item/storage/fancy/cigarettes/cigpack_robustgold, + /obj/item/storage/fancy/cigarettes/cigpack_carp, + /obj/item/storage/fancy/cigarettes/cigars, + /obj/item/storage/fancy/cigarettes/cigars/havana) . = ..() /datum/quirk/junkie/smoker/announce_drugs() @@ -611,7 +611,7 @@ var/mob/living/carbon/human/H = quirk_holder var/obj/item/I = H.get_item_by_slot(ITEM_SLOT_MASK) if (istype(I, /obj/item/clothing/mask/cigarette)) - var/obj/item/storage/box/fancy/cigarettes/C = drug_instance + var/obj/item/storage/fancy/cigarettes/C = drug_instance if(istype(I, C.spawn_type)) SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "wrong_cigs") return diff --git a/code/game/objects/items/holy_armours.dm b/code/game/objects/items/holy_armours.dm index 25eff601d2a4..d9124b65e11d 100644 --- a/code/game/objects/items/holy_armours.dm +++ b/code/game/objects/items/holy_armours.dm @@ -44,7 +44,7 @@ item_state = "knight_templar" armor = list(MELEE = 60, BULLET = 10, LASER = 10, ENERGY = 10, BOMB = 40, BIO = 2, RAD = 0, FIRE = 0, ACID = 50) //Medieval armor was exceptional against melee weaponry and shrapnel, as highlighted by breastplate usage during the Napoleonic Wars, but suffered against ballistics slowdown = 0.3 //Have you ever worn full plate armor before - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) blocks_shove_knockdown = FALSE /obj/item/clothing/head/helmet/chaplain @@ -155,7 +155,7 @@ item_state = "chaplain_hoodie" armor = list(MELEE = 10, BULLET = 5, LASER = 10, ENERGY = 5, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0) body_parts_covered = CHEST|GROIN|LEGS|ARMS - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) hoodtype = /obj/item/clothing/head/hooded/chaplain_hood /obj/item/clothing/head/hooded/chaplain_hood @@ -201,7 +201,7 @@ clothing_flags = null armor = list(MELEE = 25, BULLET = 10, LASER = 15, ENERGY = 10, BOMB = 15, BIO = 30, RAD = 30, FIRE = 70, ACID = 50) //Crappier version of the standard armor slowdown = 0.25 //No sir you are NOT a space marine you are in CHUNKY power armor - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/darktemplar /obj/item/clothing/suit/space/hardsuit/darktemplar/chap diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 9a50840866fc..51c111dd47dc 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -513,10 +513,10 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \ new /datum/stack_recipe("donk-pockets pizza box", /obj/item/storage/box/donkpockets/donkpocketpizza), \ new /datum/stack_recipe("donk-pockets teriyaki box", /obj/item/storage/box/donkpockets/donkpocketteriyaki), \ new /datum/stack_recipe("donk-pockets spicy box", /obj/item/storage/box/donkpockets/donkpocketspicy), \ - new /datum/stack_recipe("donut box", /obj/item/storage/box/fancy/donut_box), \ - new /datum/stack_recipe("egg box", /obj/item/storage/box/fancy/egg_box), \ + new /datum/stack_recipe("donut box", /obj/item/storage/fancy/donut_box), \ + new /datum/stack_recipe("egg box", /obj/item/storage/fancy/egg_box), \ new /datum/stack_recipe("monkey cube box", /obj/item/storage/box/monkeycubes), \ - new /datum/stack_recipe("nugget box", /obj/item/storage/box/fancy/nugget_box), \ + new /datum/stack_recipe("nugget box", /obj/item/storage/fancy/nugget_box), \ null, \ new /datum/stack_recipe("bean bag ammo box", /obj/item/storage/box/beanbag), \ @@ -538,7 +538,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \ new /datum/stack_recipe("syringe box", /obj/item/storage/box/syringes), \ null, \ - new /datum/stack_recipe("candle box", /obj/item/storage/box/fancy/candle_box), \ + new /datum/stack_recipe("candle box", /obj/item/storage/fancy/candle_box), \ new /datum/stack_recipe("disk box", /obj/item/storage/box/disks), \ new /datum/stack_recipe("light bulbs box", /obj/item/storage/box/lights/bulbs), \ new /datum/stack_recipe("light tubes box", /obj/item/storage/box/lights/tubes), \ diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 0bbd2b60ea96..66b1e2b1013c 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -249,7 +249,7 @@ /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/medspray, /obj/item/lighter, - /obj/item/storage/box/fancy/cigarettes, + /obj/item/storage/fancy/cigarettes, /obj/item/storage/pill_bottle, /obj/item/stack/medical, /obj/item/flashlight/pen, @@ -423,7 +423,7 @@ /obj/item/stack/sheet/sinew, /obj/item/stack/sheet/bone, /obj/item/lighter, - /obj/item/storage/box/fancy/cigarettes, + /obj/item/storage/fancy/cigarettes, /obj/item/reagent_containers/food/drinks/bottle, /obj/item/stack/medical, /obj/item/kitchen/knife, diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 974649eb50e8..316290eed81e 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -14,7 +14,7 @@ * Heart Shaped Box w/ Chocolates */ -/obj/item/storage/box/fancy +/obj/item/storage/fancy icon = 'icons/obj/food/containers.dmi' icon_state = "donutbox6" name = "donut box" @@ -24,19 +24,19 @@ var/spawn_type = null var/fancy_open = FALSE -/obj/item/storage/box/fancy/PopulateContents() +/obj/item/storage/fancy/PopulateContents() var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 1 to STR.max_items) new spawn_type(src) -/obj/item/storage/box/fancy/update_icon_state() +/obj/item/storage/fancy/update_icon_state() . = ..() if(fancy_open) icon_state = "[icon_type]box[contents.len]" else icon_state = "[icon_type]box" -/obj/item/storage/box/fancy/examine(mob/user) +/obj/item/storage/fancy/examine(mob/user) . = ..() if(fancy_open) if(length(contents) == 1) @@ -44,17 +44,17 @@ else . += "There are [contents.len <= 0 ? "no" : "[contents.len]"] [icon_type]s left." -/obj/item/storage/box/fancy/attack_self(mob/user) +/obj/item/storage/fancy/attack_self(mob/user) fancy_open = !fancy_open update_appearance(UPDATE_ICON) . = ..() -/obj/item/storage/box/fancy/Exited() +/obj/item/storage/fancy/Exited() . = ..() fancy_open = TRUE update_appearance(UPDATE_ICON) -/obj/item/storage/box/fancy/Entered() +/obj/item/storage/fancy/Entered() . = ..() fancy_open = TRUE update_appearance(UPDATE_ICON) @@ -63,7 +63,7 @@ * Donut Box */ -/obj/item/storage/box/fancy/donut_box +/obj/item/storage/fancy/donut_box icon = 'icons/obj/food/containers.dmi' icon_state = "donutbox6" icon_type = "donut" @@ -71,17 +71,17 @@ spawn_type = /obj/item/reagent_containers/food/snacks/donut fancy_open = TRUE -/obj/item/storage/box/fancy/donut_box/Initialize(mapload) +/obj/item/storage/fancy/donut_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/donut)) -/obj/item/storage/box/fancy/donut_box/PopulateContents() +/obj/item/storage/fancy/donut_box/PopulateContents() for(var/i in 1 to 6) new /obj/item/reagent_containers/food/snacks/donut(src) -/obj/item/storage/box/fancy/donut_box/deadly +/obj/item/storage/fancy/donut_box/deadly icon = 'icons/obj/food/containers.dmi' icon_state = "donutbox6" icon_type = "donut" @@ -89,13 +89,13 @@ spawn_type = /obj/item/reagent_containers/food/snacks/donut/deadly fancy_open = TRUE -/obj/item/storage/box/fancy/donut_box/Initialize(mapload) +/obj/item/storage/fancy/donut_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/donut)) -/obj/item/storage/box/fancy/donut_box/deadly/PopulateContents() +/obj/item/storage/fancy/donut_box/deadly/PopulateContents() for(var/i in 1 to 6) new /obj/item/reagent_containers/food/snacks/donut/deadly(src) @@ -104,7 +104,7 @@ * Egg Box */ -/obj/item/storage/box/fancy/egg_box +/obj/item/storage/fancy/egg_box icon = 'icons/obj/food/containers.dmi' item_state = "eggbox" icon_state = "eggbox" @@ -115,13 +115,13 @@ desc = "A carton for containing eggs." spawn_type = /obj/item/reagent_containers/food/snacks/egg -/obj/item/storage/box/fancy/egg_box/Initialize(mapload) +/obj/item/storage/fancy/egg_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/egg)) -/obj/item/storage/box/fancy/egg_box/PopulateContents() +/obj/item/storage/fancy/egg_box/PopulateContents() for(var/i in 1 to 12) new /obj/item/reagent_containers/food/snacks/egg(src) @@ -129,7 +129,7 @@ * Candle Box */ -/obj/item/storage/box/fancy/candle_box +/obj/item/storage/fancy/candle_box name = "candle pack" desc = "A pack of red candles." icon = 'icons/obj/candle.dmi' @@ -141,16 +141,16 @@ spawn_type = /obj/item/candle fancy_open = TRUE -/obj/item/storage/box/fancy/candle_box/attack_self(mob_user) +/obj/item/storage/fancy/candle_box/attack_self(mob_user) . = ..() update_appearance(UPDATE_ICON) -/obj/item/storage/box/fancy/candle_box/Initialize(mapload) +/obj/item/storage/fancy/candle_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 -/obj/item/storage/box/fancy/candle_box/PopulateContents() +/obj/item/storage/fancy/candle_box/PopulateContents() for(var/i in 1 to 5) new /obj/item/candle(src) @@ -158,7 +158,7 @@ //////////// //CIG PACK// //////////// -/obj/item/storage/box/fancy/cigarettes +/obj/item/storage/fancy/cigarettes name = "\improper Space Cigarettes packet" desc = "The most popular brand of cigarettes, sponsors of the Space Olympics." icon = 'icons/obj/cigarettes.dmi' @@ -170,22 +170,24 @@ icon_type = "cigarette" spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette age_restricted = TRUE + ///Do we not have our own handling for cig overlays? + var/display_cigs = TRUE -/obj/item/storage/box/fancy/cigarettes/Initialize(mapload) +/obj/item/storage/fancy/cigarettes/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)) -/obj/item/storage/box/fancy/cigarettes/PopulateContents() +/obj/item/storage/fancy/cigarettes/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette(src) -/obj/item/storage/box/fancy/cigarettes/examine(mob/user) +/obj/item/storage/fancy/cigarettes/examine(mob/user) . = ..() . += span_notice("Alt-click to extract contents.") -/obj/item/storage/box/fancy/cigarettes/AltClick(mob/living/carbon/user) +/obj/item/storage/fancy/cigarettes/AltClick(mob/living/carbon/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents @@ -197,30 +199,35 @@ else to_chat(user, span_notice("There are no [icon_type]s left in the pack.")) -/obj/item/storage/box/fancy/cigarettes/update_overlays() +/obj/item/storage/fancy/cigarettes/update_icon_state() . = ..() - if(!fancy_open && contents.len) + icon_state = "[initial(icon_state)][contents.len ? null : "_empty"]" + +/obj/item/storage/fancy/cigarettes/update_overlays() + . = ..() + if(!fancy_open && !contents.len) return - if(!contents.len) - icon_state = "[initial(icon_state)]_empty" - else - icon_state = initial(icon_state) - . += "[icon_state]_open" - var/cig_position = 1 - - for(var/C in contents) - var/mutable_appearance/inserted_overlay = mutable_appearance(icon) - if(istype(C, /obj/item/lighter/greyscale)) - inserted_overlay.icon_state = "lighter_in" - else if(istype(C, /obj/item/lighter)) - inserted_overlay.icon_state = "zippo_in" - else - inserted_overlay.icon_state = "cigarette" - inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]" - . += inserted_overlay - cig_position++ - -/obj/item/storage/box/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + + . += "[icon_state]_open" + + if(!display_cigs) + return + + var/cig_position = 1 + for(var/C in contents) + var/use_icon_state = "" + + if(istype(C, /obj/item/lighter/greyscale)) + use_icon_state = "lighter_in" + else if(istype(C, /obj/item/lighter)) + use_icon_state = "zippo_in" + else + use_icon_state = "cigarette" + + . += "[use_icon_state]_[cig_position]" + cig_position++ + +/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!ismob(M)) return var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents @@ -236,127 +243,127 @@ else to_chat(user, span_notice("There are no [icon_type]s left in the pack.")) -/obj/item/storage/box/fancy/cigarettes/dromedaryco +/obj/item/storage/fancy/cigarettes/dromedaryco name = "\improper DromedaryCo packet" desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\"" icon_state = "dromedary" spawn_type = /obj/item/clothing/mask/cigarette/dromedary -/obj/item/storage/box/fancy/cigarettes/dromedaryco/PopulateContents() +/obj/item/storage/fancy/cigarettes/dromedaryco/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/dromedary(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_uplift +/obj/item/storage/fancy/cigarettes/cigpack_uplift name = "\improper Uplift Smooth packet" desc = "Your favorite brand, now menthol flavored." icon_state = "uplift" spawn_type = /obj/item/clothing/mask/cigarette/uplift -/obj/item/storage/box/fancy/cigarettes/cigpack_uplift/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_uplift/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/uplift(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_robust +/obj/item/storage/fancy/cigarettes/cigpack_robust name = "\improper Robust packet" desc = "Smoked by the robust." icon_state = "robust" spawn_type = /obj/item/clothing/mask/cigarette/robust -/obj/item/storage/box/fancy/cigarettes/cigpack_robust/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_robust/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/robust(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_robustgold +/obj/item/storage/fancy/cigarettes/cigpack_robustgold name = "\improper Robust Gold packet" desc = "Smoked by the truly robust." icon_state = "robustg" spawn_type = /obj/item/clothing/mask/cigarette/robustgold -/obj/item/storage/box/fancy/cigarettes/cigpack_robustgold/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_robustgold/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/robustgold(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_carp +/obj/item/storage/fancy/cigarettes/cigpack_carp name = "\improper Carp Classic packet" desc = "Since 2313." icon_state = "carp" spawn_type = /obj/item/clothing/mask/cigarette/carp -/obj/item/storage/box/fancy/cigarettes/cigpack_carp/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_carp/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/carp(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_syndicate +/obj/item/storage/fancy/cigarettes/cigpack_syndicate name = "cigarette packet" desc = "An obscure brand of cigarettes." icon_state = "syndie" spawn_type = /obj/item/clothing/mask/cigarette/syndicate -/obj/item/storage/box/fancy/cigarettes/cigpack_syndicate/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_syndicate/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/syndicate(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_midori +/obj/item/storage/fancy/cigarettes/cigpack_midori name = "\improper Midori Tabako packet" desc = "You can't understand the runes, but the packet smells funny." icon_state = "midori" spawn_type = /obj/item/clothing/mask/cigarette/rollie/nicotine -/obj/item/storage/box/fancy/cigarettes/cigpack_midori/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_midori/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/rollie/nicotine(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims +/obj/item/storage/fancy/cigarettes/cigpack_shadyjims name = "\improper Shady Jim's Super Slims packet" desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!" icon_state = "shadyjim" spawn_type = /obj/item/clothing/mask/cigarette/shadyjims -/obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_shadyjims/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/shadyjims(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_xeno +/obj/item/storage/fancy/cigarettes/cigpack_xeno name = "\improper Xeno Filtered packet" desc = "Loaded with 100% pure slime. And also nicotine." icon_state = "slime" spawn_type = /obj/item/clothing/mask/cigarette/xeno -/obj/item/storage/box/fancy/cigarettes/cigpack_xeno/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_xeno/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/xeno(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_nonico +/obj/item/storage/fancy/cigarettes/cigpack_nonico name = "nicotine-free cigarette packet" desc = "A dull-looking pack of cigarettes." icon_state = "nonico" spawn_type = /obj/item/clothing/mask/cigarette/nonico -/obj/item/storage/box/fancy/cigarettes/cigpack_nonico/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_nonico/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/nonico(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_cannabis +/obj/item/storage/fancy/cigarettes/cigpack_cannabis name = "\improper Freak Brothers' Special packet" desc = "A label on the packaging reads, \"Endorsed by Phineas, Freddy and Franklin.\"" icon_state = "midori" spawn_type = /obj/item/clothing/mask/cigarette/rollie/cannabis -/obj/item/storage/box/fancy/cigarettes/cigpack_cannabis/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_cannabis/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/rollie/cannabis(src) -/obj/item/storage/box/fancy/cigarettes/cigpack_mindbreaker +/obj/item/storage/fancy/cigarettes/cigpack_mindbreaker name = "\improper Leary's Delight packet" desc = "Banned in over 36 galaxies." icon_state = "shadyjim" spawn_type = /obj/item/clothing/mask/cigarette/rollie/mindbreaker -/obj/item/storage/box/fancy/cigarettes/cigpack_mindbreaker/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigpack_mindbreaker/PopulateContents() for(var/i in 1 to 6) new /obj/item/clothing/mask/cigarette/rollie/mindbreaker(src) -/obj/item/storage/box/fancy/rollingpapers +/obj/item/storage/fancy/rollingpapers name = "rolling paper pack" desc = "A pack of Nanotrasen brand rolling papers." w_class = WEIGHT_CLASS_TINY @@ -365,17 +372,17 @@ icon_type = "rolling paper" spawn_type = /obj/item/rollingpaper -/obj/item/storage/box/fancy/rollingpapers/Initialize(mapload) +/obj/item/storage/fancy/rollingpapers/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 STR.set_holdable(list(/obj/item/rollingpaper)) -/obj/item/storage/box/fancy/rollingpapers/PopulateContents() +/obj/item/storage/fancy/rollingpapers/PopulateContents() for(var/i in 1 to 10) new /obj/item/rollingpaper(src) -/obj/item/storage/box/fancy/rollingpapers/update_overlays() +/obj/item/storage/fancy/rollingpapers/update_overlays() . = ..() if(!contents.len) . += "[icon_state]_empty" @@ -384,7 +391,7 @@ //CIGAR BOX// ///////////// -/obj/item/storage/box/fancy/cigarettes/cigars +/obj/item/storage/fancy/cigarettes/cigars name = "\improper premium cigar case" desc = "A case of premium cigars. Very expensive." icon = 'icons/obj/cigarettes.dmi' @@ -392,51 +399,49 @@ w_class = WEIGHT_CLASS_NORMAL icon_type = "premium cigar" spawn_type = /obj/item/clothing/mask/cigarette/cigar + display_cigs = FALSE -/obj/item/storage/box/fancy/cigarettes/cigars/Initialize(mapload) +/obj/item/storage/fancy/cigarettes/cigars/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.set_holdable(list(/obj/item/clothing/mask/cigarette/cigar)) -/obj/item/storage/box/fancy/cigarettes/cigars/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigars/PopulateContents() for(var/i in 1 to 5) new /obj/item/clothing/mask/cigarette/cigar(src) -/obj/item/storage/box/fancy/cigarettes/cigars/update_icon_state() +/obj/item/storage/fancy/cigarettes/cigars/update_icon_state() . = ..() - if(fancy_open) - icon_state = "[initial(icon_state)]_open" - else - icon_state = "[initial(icon_state)]" + //reset any changes the parent call may have made + icon_state = initial(icon_state) -/obj/item/storage/box/fancy/cigarettes/cigars/update_overlays() +/obj/item/storage/fancy/cigarettes/cigars/update_overlays() . = ..() if(!fancy_open) return var/cigar_position = 1 //generate sprites for cigars in the box for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents) - var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]") - . += cigar_overlay + . += "[smokes.icon_off]_[cigar_position]" cigar_position++ -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba +/obj/item/storage/fancy/cigarettes/cigars/cohiba name = "\improper Cohiba Robusto cigar case" desc = "A case of imported Cohiba cigars, renowned for their strong flavor. The warning label states that the cigar is extremely potent." icon_state = "cohibacase" spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba -/obj/item/storage/box/fancy/cigarettes/cigars/cohiba/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigars/cohiba/PopulateContents() for(var/i in 1 to 5) new /obj/item/clothing/mask/cigarette/cigar/cohiba(src) -/obj/item/storage/box/fancy/cigarettes/cigars/havana +/obj/item/storage/fancy/cigarettes/cigars/havana name = "\improper premium Havanian cigar case" desc = "A case of classy Havanian cigars." icon_state = "cohibacase" spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana -/obj/item/storage/box/fancy/cigarettes/cigars/havana/PopulateContents() +/obj/item/storage/fancy/cigarettes/cigars/havana/PopulateContents() for(var/i in 1 to 5) new /obj/item/clothing/mask/cigarette/cigar/havana(src) @@ -444,7 +449,7 @@ * Heart Shaped Box w/ Chocolates */ -/obj/item/storage/box/fancy/heart_box +/obj/item/storage/fancy/heart_box name = "heart-shaped box" desc = "A heart-shaped box for holding tiny chocolates." icon = 'icons/obj/food/containers.dmi' @@ -455,20 +460,20 @@ righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi' spawn_type = /obj/item/reagent_containers/food/snacks/tinychocolate -/obj/item/storage/box/fancy/heart_box/Initialize(mapload) +/obj/item/storage/fancy/heart_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/tinychocolate)) -/obj/item/storage/box/fancy/heart_box/PopulateContents() +/obj/item/storage/fancy/heart_box/PopulateContents() for(var/i in 1 to 8) new /obj/item/reagent_containers/food/snacks/tinychocolate(src) ////////////// //NUGGET BOX// ////////////// -/obj/item/storage/box/fancy/nugget_box +/obj/item/storage/fancy/nugget_box name = "nugget box" desc = "A cardboard box used for holding chicken nuggies." icon = 'icons/obj/food/containers.dmi' @@ -477,12 +482,12 @@ icon_type = "nugget" spawn_type = /obj/item/reagent_containers/food/snacks/nugget -/obj/item/storage/box/fancy/nugget_box/Initialize(mapload) +/obj/item/storage/fancy/nugget_box/Initialize(mapload) . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/nugget)) -/obj/item/storage/box/fancy/nugget_box/PopulateContents() +/obj/item/storage/fancy/nugget_box/PopulateContents() for(var/i in 1 to 6) new /obj/item/reagent_containers/food/snacks/nugget(src) diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index fb3a9c9a02eb..d1aa8a4d394b 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -44,7 +44,7 @@ new /obj/item/encryptionkey/syndicate(src) //2 TC new /obj/item/reagent_containers/syringe/mulligan(src) //4 TC new /obj/item/switchblade/backstab(src) //3 TC - new /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate (src) //2 TC (for now) + new /obj/item/storage/fancy/cigarettes/cigpack_syndicate (src) //2 TC (for now) new /obj/item/flashlight/emp(src) //2 TC new /obj/item/chameleon(src) //7 TC new /obj/item/card/emag(src) //6 TC @@ -149,7 +149,7 @@ new /obj/item/gun/ballistic/automatic/toy/pistol/riot(src) //1 TC, not a tranq pistol but it's something new /obj/item/kitchen/knife/combat/survival(src) //Simple miner knife, in flavor. Maybe-maybe 1 TC, but basically free new /obj/item/implanter/stealth(src) //Just a box. 8 TC - new /obj/item/storage/box/fancy/cigarettes/cigars(src) //It's no Phantom Cigar, but it'll still be badass + new /obj/item/storage/fancy/cigarettes/cigars(src) //It's no Phantom Cigar, but it'll still be badass new /obj/item/lighter(src) //Need to light the cigar if("oddjob") //Total TC value of 26ish TC @@ -266,7 +266,7 @@ new /obj/item/clothing/suit/yogs/pinksweater(src) //close enough new /obj/item/guardiancreator/tech(src) //15 TC new /obj/item/stand_arrow/boss(src) //priceless, but if it had to get a price it'd be ~45 for 3 holoparasite injectors and ~21 3 mindslave implants. although its difficult to conceal and the holoparasites are random. - new /obj/item/storage/box/fancy/donut_box(src) //d o n u t s + new /obj/item/storage/fancy/donut_box(src) //d o n u t s new /obj/item/reagent_containers/glass/bottle/drugs(src) new /obj/item/slimecross/stabilized/green(src) //secret identity @@ -391,7 +391,7 @@ new /obj/item/clothing/under/chameleon/syndicate(src) new /obj/item/clothing/mask/chameleon/syndicate(src) new /obj/item/card/id/syndicate(src) - new /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate(src) + new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src) new /obj/item/lighter(src) /obj/item/storage/box/syndicate/contract_kit/PopulateContents() @@ -492,7 +492,7 @@ new /obj/item/clothing/under/plasmaman/chameleon/syndicate(src) new /obj/item/clothing/mask/chameleon/syndicate(src) new /obj/item/card/id/syndicate(src) - new /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate(src) + new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src) new /obj/item/lighter(src) /obj/item/storage/box/syndie_kit diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index e666028ff9e5..451203112aff 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -104,8 +104,8 @@ new /obj/item/clothing/head/nun_hood(src) new /obj/item/clothing/suit/chaplainsuit/holidaypriest(src) new /obj/item/storage/backpack/cultpack(src) - new /obj/item/storage/box/fancy/candle_box(src) - new /obj/item/storage/box/fancy/candle_box(src) + new /obj/item/storage/fancy/candle_box(src) + new /obj/item/storage/fancy/candle_box(src) return /obj/structure/closet/wardrobe/red diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index f23a15cbc9d4..ef7890fed0c1 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -57,7 +57,7 @@ for(var/i = 0, i < 5, i++) new /obj/item/reagent_containers/food/condiment/soymilk(src) for(var/i = 0, i < 2, i++) - new /obj/item/storage/box/fancy/egg_box(src) + new /obj/item/storage/fancy/egg_box(src) /obj/structure/closet/secure_closet/freezer/kitchen/mining req_access = list() @@ -88,7 +88,7 @@ for(var/i = 0, i < 5, i++) new /obj/item/reagent_containers/food/condiment/soymilk(src) for(var/i = 0, i < 3, i++) - new /obj/item/storage/box/fancy/egg_box(src) + new /obj/item/storage/fancy/egg_box(src) /obj/structure/closet/secure_closet/freezer/fridge/open req_access = null diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 5f457d0d66c4..6d969b87dd78 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -28,11 +28,8 @@ var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type) for(var/i in 1 to contents.len) gun_overlay.pixel_x = 3 * (i - 1) - . += gun_overlay - if(open) - . += "[icon_state]_open" - else - . += "[icon_state]_door" + . += new /mutable_appearance(gun_overlay) + . += "[icon_state]_[open ? "open" : "door"]" /obj/structure/guncase/attackby(obj/item/I, mob/user, params) if(iscyborg(user) || isalien(user)) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index fb6227a91a20..afe15de749c9 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -37,7 +37,6 @@ var/restricted = FALSE req_access = list() - var/update = 0 //list of canister types for relabeling var/static/list/label2types = list( "generic" = /obj/machinery/portable_atmospherics/canister/generic, @@ -293,138 +292,96 @@ air_contents.set_moles(/datum/gas/oxygen, (O2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature())) air_contents.set_moles(/datum/gas/nitrogen, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature())) -#define CANISTER_UPDATE_HOLDING (1<<0) -#define CANISTER_UPDATE_CONNECTED (1<<1) -#define CANISTER_UPDATE_OPEN (1<<2) -#define CANISTER_UPDATE_EMPTY (1<<3) -#define CANISTER_UPDATE_PRESSURE_0 (1<<4) -#define CANISTER_UPDATE_PRESSURE_1 (1<<5) -#define CANISTER_UPDATE_PRESSURE_2 (1<<6) -#define CANISTER_UPDATE_PRESSURE_3 (1<<7) -#define CANISTER_UPDATE_PRESSURE_4 (1<<8) -#define CANISTER_UPDATE_PRESSURE_5 (1<<9) -#define CANISTER_UPDATE_FULL (1<<10) -#define CANISTER_UPDATE_FUSION (1<<11) -#define CANISTER_LIGHT_RANGE 0.4 -#define CANISTER_LIGHT_POWER 0.5 - -/obj/machinery/portable_atmospherics/canister/update_icon(updates=ALL) +/obj/machinery/portable_atmospherics/canister/update_icon_state() + if(stat & BROKEN) + icon_state = "[initial(icon_state)]-1" + return ..() + +/obj/machinery/portable_atmospherics/canister/update_overlays() . = ..() if(stat & BROKEN) - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(!findtext(icon_state,"-1")) //A wise man once said, if it's already broke, don't break it more. - icon_state = "[icon_state]-1" return - - var/last_update = update - update = 0 - + if(valve_open) + . += "can-open" if(holding) - update |= CANISTER_UPDATE_HOLDING + . += "can-tank" if(connected_port) - update |= CANISTER_UPDATE_CONNECTED - if(valve_open) - update |= CANISTER_UPDATE_OPEN - if(!air_contents) - update |= CANISTER_UPDATE_EMPTY - else - var/pressure = air_contents.return_pressure() - if(pressure < 10) - update |= CANISTER_UPDATE_EMPTY - else if(pressure < ONE_ATMOSPHERE) - update |= CANISTER_UPDATE_PRESSURE_0 - else if(pressure < 5 * ONE_ATMOSPHERE) - update |= CANISTER_UPDATE_PRESSURE_1 - else if(pressure < 10 * ONE_ATMOSPHERE) - update |= CANISTER_UPDATE_PRESSURE_2 - else if(pressure < 20 * ONE_ATMOSPHERE) - update |= CANISTER_UPDATE_PRESSURE_3 - else if(pressure < 30 * ONE_ATMOSPHERE) - update |= CANISTER_UPDATE_PRESSURE_4 - else if(pressure < 40 * ONE_ATMOSPHERE) //pressure pump max - update |= CANISTER_UPDATE_PRESSURE_5 - else if(pressure < 9100) //volume pump max - update |= CANISTER_UPDATE_FULL - else - update |= CANISTER_UPDATE_FUSION - - if(update == last_update) - return - - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + . += "can-connector" - if(update & CANISTER_UPDATE_OPEN) - add_overlay("can-open") - if(update & CANISTER_UPDATE_HOLDING) - add_overlay("can-tank") - if(update & CANISTER_UPDATE_CONNECTED) - add_overlay("can-connector") + var/light_state = get_pressure_state(air_contents.return_pressure()) + if(light_state) //happens when pressure is below 10kpa which means no light + . += mutable_appearance(icon, light_state) + . += emissive_appearance(icon, "[light_state]-light", src, alpha = src.alpha) - if(update & CANISTER_UPDATE_PRESSURE_0) +/* + if(pressure < ONE_ATMOSPHERE) SSvis_overlays.add_vis_overlay(src, icon, "can-o0", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o0", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_RED_LIGHT) - else if(update & CANISTER_UPDATE_PRESSURE_1) + else if(pressure < 5 * ONE_ATMOSPHERE) SSvis_overlays.add_vis_overlay(src, icon, "can-o1", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o1", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_RED_LIGHT) - else if(update & CANISTER_UPDATE_PRESSURE_2) + else if(pressure < 10 * ONE_ATMOSPHERE) SSvis_overlays.add_vis_overlay(src, icon, "can-o2", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o2", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_ORANGE) - else if(update & CANISTER_UPDATE_PRESSURE_3) + else if(pressure < 20 * ONE_ATMOSPHERE) SSvis_overlays.add_vis_overlay(src, icon, "can-o3", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o3", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_ORANGE) - else if(update & CANISTER_UPDATE_PRESSURE_4) + else if(pressure < 30 * ONE_ATMOSPHERE) SSvis_overlays.add_vis_overlay(src, icon, "can-o4", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o4", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_YELLOW) - else if(update & CANISTER_UPDATE_PRESSURE_5) + else if(pressure < 40 * ONE_ATMOSPHERE) //pressure pump max SSvis_overlays.add_vis_overlay(src, icon, "can-o5", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o5", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_LIME) - else if(update & CANISTER_UPDATE_FULL) + else if(pressure < 9100) //volume pump max SSvis_overlays.add_vis_overlay(src, icon, "can-o6", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-o6", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_GREEN) - else if(update & CANISTER_UPDATE_FUSION) + else if(pressure < 9100) SSvis_overlays.add_vis_overlay(src, icon, "can-oF", layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, "can-oF", layer, EMISSIVE_PLANE, dir) set_light_on(TRUE) set_light_range_power_color(2, 2, COLOR_WHITE) else set_light_on(FALSE) - -#undef CANISTER_UPDATE_HOLDING -#undef CANISTER_UPDATE_CONNECTED -#undef CANISTER_UPDATE_OPEN -#undef CANISTER_UPDATE_EMPTY -#undef CANISTER_UPDATE_PRESSURE_0 -#undef CANISTER_UPDATE_PRESSURE_1 -#undef CANISTER_UPDATE_PRESSURE_2 -#undef CANISTER_UPDATE_PRESSURE_3 -#undef CANISTER_UPDATE_PRESSURE_4 -#undef CANISTER_UPDATE_PRESSURE_5 -#undef CANISTER_UPDATE_FULL -#undef CANISTER_UPDATE_FUSION -#undef CANISTER_LIGHT_RANGE -#undef CANISTER_LIGHT_POWER +*/ + +///return the icon_state component for the canister's indicator light based on its current pressure reading +/obj/machinery/portable_atmospherics/canister/proc/get_pressure_state(air_pressure) + switch(air_pressure) + if((9100) to INFINITY) + return "can-oF" + if((40 * ONE_ATMOSPHERE) to (9100)) //volume pump max + return "can-o6" + if((30 * ONE_ATMOSPHERE) to (40 * ONE_ATMOSPHERE)) + return "can-o5" + if((20 * ONE_ATMOSPHERE) to (30 * ONE_ATMOSPHERE)) + return "can-o4" + if((10 * ONE_ATMOSPHERE) to (20 * ONE_ATMOSPHERE)) + return "can-o3" + if((5 * ONE_ATMOSPHERE) to (10 * ONE_ATMOSPHERE)) + return "can-o2" + if((10) to (5 * ONE_ATMOSPHERE)) + return "can-o1" + else + return "can-o1" /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) take_damage(5, BURN, 0) - /obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(!(stat & BROKEN)) diff --git a/code/modules/cargo/bounties/assistant.dm b/code/modules/cargo/bounties/assistant.dm index 4462ce93d07e..080eaaea724a 100644 --- a/code/modules/cargo/bounties/assistant.dm +++ b/code/modules/cargo/bounties/assistant.dm @@ -143,7 +143,7 @@ name = "Shady Jim's" description = "There's an irate officer at CentCom demanding that he receive a box of Shady Jim's cigarettes. Please ship one. He's starting to make threats." reward = 500 - wanted_types = list(/obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims) + wanted_types = list(/obj/item/storage/fancy/cigarettes/cigpack_shadyjims) /datum/bounty/item/assistant/potted_plants name = "Potted Plants" diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 85d8e5566b6f..32d40865f650 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -2181,7 +2181,7 @@ /obj/item/reagent_containers/food/condiment/saltshaker, /obj/item/reagent_containers/food/condiment/peppermill, /obj/item/reagent_containers/food/condiment/cinnamon, // Yogs -- Adds cinnamon shakers to this crate - /obj/item/storage/box/fancy/egg_box, + /obj/item/storage/fancy/egg_box, /obj/item/reagent_containers/food/condiment/enzyme, /obj/item/reagent_containers/food/condiment/sugar, /obj/item/reagent_containers/food/snacks/meat/slab/monkey, @@ -2605,8 +2605,8 @@ /obj/item/toy/cards/deck/syndicate, /obj/item/reagent_containers/food/drinks/bottle/absinthe, /obj/item/clothing/under/syndicate/tacticool, - /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate, - /obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims, + /obj/item/storage/fancy/cigarettes/cigpack_syndicate, + /obj/item/storage/fancy/cigarettes/cigpack_shadyjims, /obj/item/clothing/mask/gas/syndicate, /obj/item/clothing/neck/necklace/dope, /obj/item/vending_refill/donksoft) diff --git a/code/modules/clothing/outfits/occupying.dm b/code/modules/clothing/outfits/occupying.dm index 2370855f22f7..ef8804a3df3b 100644 --- a/code/modules/clothing/outfits/occupying.dm +++ b/code/modules/clothing/outfits/occupying.dm @@ -74,7 +74,7 @@ back = /obj/item/melee/baton/cattleprod/tactical head = /obj/item/clothing/head/helmet/sec/occupying l_pocket = /obj/item/reagent_containers/food/drinks/beer - r_pocket = /obj/item/storage/box/fancy/cigarettes + r_pocket = /obj/item/storage/fancy/cigarettes id = /obj/item/card/id/ert/occupying implants = list(/obj/item/implant/mindshield) diff --git a/code/modules/clothing/suits/chaplainsuits.dm b/code/modules/clothing/suits/chaplainsuits.dm index 24fa4ed3b42b..3548cea0c382 100644 --- a/code/modules/clothing/suits/chaplainsuits.dm +++ b/code/modules/clothing/suits/chaplainsuits.dm @@ -1,10 +1,10 @@ //Chaplain Suit Subtypes //If any new staple chaplain items get added, put them in these lists /obj/item/clothing/suit/chaplainsuit - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) /obj/item/clothing/suit/hooded/chaplainsuit - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) //Suits /obj/item/clothing/suit/chaplainsuit/holidaypriest diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 4db872de4d04..40f43834bcb6 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -20,7 +20,7 @@ item_state = "bio_suit" body_parts_covered = CHEST|GROIN|LEGS|ARMS flags_inv = HIDEJUMPSUIT - allowed = list(/obj/item/disk, /obj/item/stamp, /obj/item/reagent_containers/food/drinks/flask, /obj/item/melee, /obj/item/storage/lockbox/medal, /obj/item/assembly/flash/handheld, /obj/item/storage/box/matches, /obj/item/lighter, /obj/item/clothing/mask/cigarette, /obj/item/storage/box/fancy/cigarettes, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) + allowed = list(/obj/item/disk, /obj/item/stamp, /obj/item/reagent_containers/food/drinks/flask, /obj/item/melee, /obj/item/storage/lockbox/medal, /obj/item/assembly/flash/handheld, /obj/item/storage/box/matches, /obj/item/lighter, /obj/item/clothing/mask/cigarette, /obj/item/storage/fancy/cigarettes, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) //Chef /obj/item/clothing/suit/toggle/chef @@ -68,7 +68,7 @@ /obj/item/clothing/suit/det_suit/civilian/Initialize(mapload) . = ..() //Same permissions as the leather jacket/leather overcoat, because you know, trench coat - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/gun/ballistic/revolver/detective, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/gun/ballistic/revolver/detective, /obj/item/radio) /obj/item/clothing/suit/det_suit/civilian/grey name = "grey trenchcoat" diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 762ab684f9a0..fb4e94c5b823 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -87,7 +87,7 @@ icon_state = "judge" item_state = "judge" body_parts_covered = CHEST|GROIN|LEGS|ARMS - allowed = list(/obj/item/storage/box/fancy/cigarettes, /obj/item/stack/spacecash) + allowed = list(/obj/item/storage/fancy/cigarettes, /obj/item/stack/spacecash) flags_inv = HIDEJUMPSUIT /obj/item/clothing/suit/buns @@ -136,7 +136,7 @@ item_state = "imperium_monk" body_parts_covered = CHEST|GROIN|LEGS|ARMS flags_inv = HIDESHOES|HIDEJUMPSUIT - allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/box/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen) + allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen) /obj/item/clothing/suit/chickensuit @@ -428,7 +428,7 @@ desc = "Aviators not included." icon_state = "bomberjacket" item_state = "brownjsuit" - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) body_parts_covered = CHEST|GROIN|ARMS cold_protection = CHEST|GROIN|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT @@ -440,7 +440,7 @@ item_state = "hostrench" resistance_flags = NONE max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/gun/ballistic/revolver/detective, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/gun/ballistic/revolver/detective, /obj/item/radio) /obj/item/clothing/suit/jacket/leather/overcoat name = "leather overcoat" @@ -470,7 +470,7 @@ desc = "A canvas jacket styled after classical American military garb. Feels sturdy, yet comfortable." icon_state = "militaryjacket" item_state = "militaryjacket" - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/radio) /obj/item/clothing/suit/jacket/letterman name = "letterman jacket" @@ -558,7 +558,7 @@ cold_protection = CHEST|GROIN|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 10, RAD = 0, FIRE = 0, ACID = 0) - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) /obj/item/clothing/head/hooded/winterhood name = "winter hood" @@ -658,7 +658,7 @@ name = "science winter coat" icon_state = "coatscience" item_state = "coatscience" - allowed = list(/obj/item/analyzer, /obj/item/multitool/tricorder, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/autoinjector, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) + allowed = list(/obj/item/analyzer, /obj/item/multitool/tricorder, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/autoinjector, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant) armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 0, ACID = 0) hoodtype = /obj/item/clothing/head/hooded/winterhood/science @@ -689,7 +689,7 @@ icon_state = "coatengineer" item_state = "coatengineer" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 20, FIRE = 30, ACID = 45) - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/extinguisher/mini) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/extinguisher/mini) hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering /obj/item/clothing/head/hooded/winterhood/engineering @@ -728,7 +728,7 @@ name = "hydroponics winter coat" icon_state = "coathydro" item_state = "coathydro" - allowed = list(/obj/item/reagent_containers/spray/plantbgone, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/glass/bottle, /obj/item/cultivator, /obj/item/reagent_containers/spray/pestspray, /obj/item/hatchet, /obj/item/storage/bag/plants, /obj/item/toy, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter) + allowed = list(/obj/item/reagent_containers/spray/plantbgone, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/glass/bottle, /obj/item/cultivator, /obj/item/reagent_containers/spray/pestspray, /obj/item/hatchet, /obj/item/storage/bag/plants, /obj/item/toy, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) hoodtype = /obj/item/clothing/head/hooded/winterhood/hydro /obj/item/clothing/head/hooded/winterhood/hydro @@ -747,7 +747,7 @@ name = "mining winter coat" icon_state = "coatminer" item_state = "coatminer" - allowed = list(/obj/item/pickaxe, /obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter) + allowed = list(/obj/item/pickaxe, /obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0) hoodtype = /obj/item/clothing/head/hooded/winterhood/miner diff --git a/code/modules/events/holiday/vday.dm b/code/modules/events/holiday/vday.dm index 4481de9b7d76..6e3649a80208 100644 --- a/code/modules/events/holiday/vday.dm +++ b/code/modules/events/holiday/vday.dm @@ -19,7 +19,7 @@ H.put_in_hands(new /obj/item/valentine) var/obj/item/storage/backpack/b = locate() in H.contents new /obj/item/reagent_containers/food/snacks/candyheart(b) - new /obj/item/storage/box/fancy/heart_box(b) + new /obj/item/storage/fancy/heart_box(b) var/list/valentines = list() for(var/mob/living/M in GLOB.player_list) diff --git a/code/modules/research/designs/biogenerator_designs.dm b/code/modules/research/designs/biogenerator_designs.dm index e393517e71ae..54d8b8778027 100644 --- a/code/modules/research/designs/biogenerator_designs.dm +++ b/code/modules/research/designs/biogenerator_designs.dm @@ -191,7 +191,7 @@ id = "rollingpapers" build_type = BIOGENERATOR materials = list(/datum/material/biomass = 50) - build_path = /obj/item/storage/box/fancy/rollingpapers + build_path = /obj/item/storage/fancy/rollingpapers category = list("initial", "Organic Materials") /datum/design/cloth diff --git a/code/modules/research/xenobiology/crossbreeding/industrial.dm b/code/modules/research/xenobiology/crossbreeding/industrial.dm index 6f7ca1f79e7b..ca376fae8663 100644 --- a/code/modules/research/xenobiology/crossbreeding/industrial.dm +++ b/code/modules/research/xenobiology/crossbreeding/industrial.dm @@ -180,13 +180,13 @@ Industrial extracts: colour = "black" effect_desc = "Produces slime brand regenerative cigarettes." plasmarequired = 6 - itempath = /obj/item/storage/box/fancy/cigarettes/cigpack_xeno + itempath = /obj/item/storage/fancy/cigarettes/cigpack_xeno /obj/item/slimecross/industrial/lightpink colour = "light pink" effect_desc = "Produces heart shaped boxes that have candies in them." plasmarequired = 3 - itempath = /obj/item/storage/box/fancy/heart_box + itempath = /obj/item/storage/fancy/heart_box /obj/item/slimecross/industrial/adamantine colour = "adamantine" diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 34c5236f33bf..3192b6272408 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2383,7 +2383,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Box of Singulonuts" desc = "A box with six Waffle Co. brand Singulonuts. Banned in four sectors for their sheer calorie content. \ Caution: Product known to the safety board of Nanotrasen to increase risks of stomach cancer and cause instant obesity. \ Disguised as a regular box of regular donuts." - item = /obj/item/storage/box/fancy/donut_box/deadly + item = /obj/item/storage/fancy/donut_box/deadly cost = 6 manufacturer = /datum/corporation/traitor/waffleco restricted_roles = list("Assistant", "Cook", "Clerk") @@ -2675,7 +2675,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/badass/syndiecigs name = "Syndicate Smokes" desc = "Strong flavor, dense smoke, infused with omnizine." - item = /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate + item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate cost = 2 manufacturer = /datum/corporation/traitor/donkco illegal_tech = FALSE diff --git a/code/modules/vending/cigarette.dm b/code/modules/vending/cigarette.dm index 40be780e6992..e86c6985e87d 100644 --- a/code/modules/vending/cigarette.dm +++ b/code/modules/vending/cigarette.dm @@ -4,52 +4,52 @@ product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!" product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs." icon_state = "cigs" - products = list(/obj/item/storage/box/fancy/cigarettes = 5, - /obj/item/storage/box/fancy/cigarettes/cigpack_uplift = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_robust = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_carp = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_midori = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_nonico = 3, + products = list(/obj/item/storage/fancy/cigarettes = 5, + /obj/item/storage/fancy/cigarettes/cigpack_uplift = 3, + /obj/item/storage/fancy/cigarettes/cigpack_robust = 3, + /obj/item/storage/fancy/cigarettes/cigpack_carp = 3, + /obj/item/storage/fancy/cigarettes/cigpack_midori = 3, + /obj/item/storage/fancy/cigarettes/cigpack_nonico = 3, /obj/item/storage/box/matches = 10, /obj/item/lighter/greyscale = 4, - /obj/item/storage/box/fancy/rollingpapers = 5) + /obj/item/storage/fancy/rollingpapers = 5) contraband = list(/obj/item/clothing/mask/vape = 5) - premium = list(/obj/item/storage/box/fancy/cigarettes/cigpack_robustgold = 3, + premium = list(/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 3, /obj/item/lighter = 3, - /obj/item/storage/box/fancy/cigarettes/cigars = 1, - /obj/item/storage/box/fancy/cigarettes/cigars/havana = 1, - /obj/item/storage/box/fancy/cigarettes/cigars/cohiba = 1) + /obj/item/storage/fancy/cigarettes/cigars = 1, + /obj/item/storage/fancy/cigarettes/cigars/havana = 1, + /obj/item/storage/fancy/cigarettes/cigars/cohiba = 1) refill_canister = /obj/item/vending_refill/cigarette default_price = 10 extra_price = 50 payment_department = ACCOUNT_SRV /obj/machinery/vending/cigarette/syndicate - products = list(/obj/item/storage/box/fancy/cigarettes/cigpack_syndicate = 7, - /obj/item/storage/box/fancy/cigarettes/cigpack_uplift = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_robust = 2, - /obj/item/storage/box/fancy/cigarettes/cigpack_carp = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_nonico = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_midori = 1, + products = list(/obj/item/storage/fancy/cigarettes/cigpack_syndicate = 7, + /obj/item/storage/fancy/cigarettes/cigpack_uplift = 3, + /obj/item/storage/fancy/cigarettes/cigpack_robust = 2, + /obj/item/storage/fancy/cigarettes/cigpack_carp = 3, + /obj/item/storage/fancy/cigarettes/cigpack_nonico = 3, + /obj/item/storage/fancy/cigarettes/cigpack_midori = 1, /obj/item/storage/box/matches = 10, /obj/item/lighter/greyscale = 4, - /obj/item/storage/box/fancy/rollingpapers = 5) + /obj/item/storage/fancy/rollingpapers = 5) /obj/machinery/vending/cigarette/beach //Used in the lavaland_biodome_beach.dmm ruin name = "\improper ShadyCigs Ultra" desc = "Now with extra premium products!" product_ads = "Probably not bad for you!;Dope will get you through times of no money better than money will get you through times of no dope!;It's good for you!" product_slogans = "Turn on, tune in, drop out!;Better living through chemistry!;Toke!;Don't forget to keep a smile on your lips and a song in your heart!" - products = list(/obj/item/storage/box/fancy/cigarettes = 5, - /obj/item/storage/box/fancy/cigarettes/cigpack_uplift = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_robust = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_carp = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_midori = 3, - /obj/item/storage/box/fancy/cigarettes/cigpack_cannabis = 5, + products = list(/obj/item/storage/fancy/cigarettes = 5, + /obj/item/storage/fancy/cigarettes/cigpack_uplift = 3, + /obj/item/storage/fancy/cigarettes/cigpack_robust = 3, + /obj/item/storage/fancy/cigarettes/cigpack_carp = 3, + /obj/item/storage/fancy/cigarettes/cigpack_midori = 3, + /obj/item/storage/fancy/cigarettes/cigpack_cannabis = 5, /obj/item/storage/box/matches = 10, /obj/item/lighter/greyscale = 4, - /obj/item/storage/box/fancy/rollingpapers = 5) - premium = list(/obj/item/storage/box/fancy/cigarettes/cigpack_mindbreaker = 5, + /obj/item/storage/fancy/rollingpapers = 5) + premium = list(/obj/item/storage/fancy/cigarettes/cigpack_mindbreaker = 5, /obj/item/clothing/mask/vape = 5, /obj/item/lighter = 3) diff --git a/code/modules/vending/security.dm b/code/modules/vending/security.dm index 4a07e936eef3..e48049a9ba60 100644 --- a/code/modules/vending/security.dm +++ b/code/modules/vending/security.dm @@ -16,7 +16,7 @@ /obj/item/flashlight/seclite = 4, /obj/item/restraints/legcuffs/bola/energy = 7) contraband = list(/obj/item/clothing/glasses/sunglasses = 2, - /obj/item/storage/box/fancy/donut_box = 2) + /obj/item/storage/fancy/donut_box = 2) premium = list(/obj/item/storage/belt/security/webbing = 5, /obj/item/coin/antagtoken = 1, /obj/item/clothing/head/helmet/warhelmet = 5, diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index 3443fd4bb88c..75b83965918c 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -427,7 +427,7 @@ /obj/item/clothing/suit/hooded/caretakercloak = 1, /obj/item/clothing/suit/yogs/monkrobes = 1, /obj/item/clothing/suit/hooded/amech = 2, - /obj/item/storage/box/fancy/candle_box = 2, + /obj/item/storage/fancy/candle_box = 2, /obj/item/clothing/head/kippah = 3, /obj/item/clothing/suit/chaplainsuit/whiterobe = 1, /obj/item/clothing/head/taqiyahwhite = 1, diff --git a/yogstation.dme b/yogstation.dme index 6a1d5318bfdd..f54955d7e33b 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -209,6 +209,7 @@ #include "code\__HELPERS\icon_smoothing.dm" #include "code\__HELPERS\icons.dm" #include "code\__HELPERS\level_traits.dm" +#include "code\__HELPERS\lighting.dm" #include "code\__HELPERS\maths.dm" #include "code\__HELPERS\matrices.dm" #include "code\__HELPERS\mobs.dm" diff --git a/yogstation/code/_globalvars/lists/maintenance_loot.dm b/yogstation/code/_globalvars/lists/maintenance_loot.dm index 5ba0c6e5010c..11e4a88eee66 100644 --- a/yogstation/code/_globalvars/lists/maintenance_loot.dm +++ b/yogstation/code/_globalvars/lists/maintenance_loot.dm @@ -232,22 +232,22 @@ GLOBAL_LIST_INIT(maintenance_loot_traditional,list( /obj/item/stack/sheet/rglass/fifty = W_RARE, /obj/item/stack/sheet/ruinous_metal = W_MYTHICAL, /obj/item/stack/sheet/runed_metal = W_MYTHICAL, - /obj/item/storage/box/fancy/cigarettes = W_ESSENTIAL, - /obj/item/storage/box/fancy/cigarettes/cigars = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigars/cohiba = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigars/havana = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_cannabis = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_carp = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_midori = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_mindbreaker = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_nonico = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_robust = W_ESSENTIAL, - /obj/item/storage/box/fancy/cigarettes/cigpack_robustgold = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_shadyjims = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/cigpack_uplift = W_ESSENTIAL, - /obj/item/storage/box/fancy/cigarettes/cigpack_xeno = W_UNCOMMON, - /obj/item/storage/box/fancy/cigarettes/dromedaryco = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes = W_ESSENTIAL, + /obj/item/storage/fancy/cigarettes/cigars = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigars/cohiba = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigars/havana = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_cannabis = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_carp = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_midori = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_mindbreaker = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_nonico = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_robust = W_ESSENTIAL, + /obj/item/storage/fancy/cigarettes/cigpack_robustgold = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_shadyjims = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_syndicate = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/cigpack_uplift = W_ESSENTIAL, + /obj/item/storage/fancy/cigarettes/cigpack_xeno = W_UNCOMMON, + /obj/item/storage/fancy/cigarettes/dromedaryco = W_UNCOMMON, /obj/item/a_gift = W_ESSENTIAL, /obj/item/airlock_painter = W_COMMON, /obj/item/ammo_box/foambox = W_UNCOMMON, @@ -368,7 +368,7 @@ GLOBAL_LIST_INIT(maintenance_loot_traditional,list( /obj/item/storage/box/disks = W_RARE, /obj/item/storage/box/disks_nanite = W_RARE, /obj/item/storage/box/disks_plantgene = W_RARE, - /obj/item/storage/box/fancy/candle_box = W_RARE, + /obj/item/storage/fancy/candle_box = W_RARE, /obj/item/storage/box/fountainpens = W_RARE, /obj/item/storage/box/matches = W_UNCOMMON, /obj/item/storage/box/official_posters = W_RARE, @@ -454,9 +454,9 @@ GLOBAL_LIST_INIT(maintenance_loot_traditional,list( /obj/item/storage/box/donkpockets/donkpocketpizza = W_ESSENTIAL, /obj/item/storage/box/donkpockets/donkpocketspicy = W_ESSENTIAL, /obj/item/storage/box/donkpockets/donkpocketteriyaki = W_ESSENTIAL, - /obj/item/storage/box/fancy/donut_box = W_RARE, - /obj/item/storage/box/fancy/egg_box = W_MYTHICAL, - /obj/item/storage/box/fancy/heart_box = W_RARE, + /obj/item/storage/fancy/donut_box = W_RARE, + /obj/item/storage/fancy/egg_box = W_MYTHICAL, + /obj/item/storage/fancy/heart_box = W_RARE, /obj/item/storage/box/ingredients/wildcard = W_RARE, /obj/item/storage/box/mre = W_ESSENTIAL, /obj/item/storage/box/mre/menu2 = W_RARE, @@ -515,7 +515,7 @@ GLOBAL_LIST_INIT(maintenance_loot_makeshift,list( /obj/item/storage/belt/military/snack = W_RARE, /obj/item/storage/belt/utility/makeshift = W_UNCOMMON, /obj/item/storage/book/bible/booze = W_UNCOMMON, - /obj/item/storage/box/fancy/rollingpapers = W_RARE, + /obj/item/storage/fancy/rollingpapers = W_RARE, /obj/item/storage/box/hug = W_RARE, /obj/item/tank/jetpack/improvised = W_MYTHICAL, /obj/item/twohanded/rcl/ghetto = W_MYTHICAL, @@ -1014,7 +1014,7 @@ GLOBAL_LIST_INIT(maintenance_loot_serious,list( /obj/item/storage/belt/military/assault = W_MYTHICAL, /obj/item/storage/belt/multi = W_MYTHICAL, /obj/item/storage/box/donkpockets/donkpocketgondola = W_LEGENDARY, - /obj/item/storage/box/fancy/donut_box/deadly = W_MYTHICAL, + /obj/item/storage/fancy/donut_box/deadly = W_MYTHICAL, /obj/item/storage/box/flashbangs = W_MYTHICAL, /obj/item/storage/box/flashes = W_RARE, /obj/item/storage/box/gorillacubes = W_LEGENDARY, diff --git a/yogstation/code/modules/clothing/suits/miscellaneous.dm b/yogstation/code/modules/clothing/suits/miscellaneous.dm index 4bd350392f00..a2a8e270b9ed 100644 --- a/yogstation/code/modules/clothing/suits/miscellaneous.dm +++ b/yogstation/code/modules/clothing/suits/miscellaneous.dm @@ -173,21 +173,21 @@ desc = "Aviators not included. Now in dark blue!" icon_state = "navymiljacket" item_state = "navymiljacket" - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) /obj/item/clothing/suit/yogs/desertmiljacket name = "desert military jacket" desc = "Aviators not included. Now in dark brown!" icon_state = "desertmiljacket" item_state = "desertmiljacket" - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) /obj/item/clothing/suit/yogs/denimjacket name = "denim jacket" desc = "A bit scratchy but pretty cool looking." icon_state = "denim_jacket" item_state = "denim_jacket" - allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/box/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/radio) /obj/item/clothing/suit/hooded/fiendcowl mob_overlay_icon = 'yogstation/icons/mob/clothing/suit/suit.dmi' diff --git a/yogstation/code/modules/jobs/job_types/clerk.dm b/yogstation/code/modules/jobs/job_types/clerk.dm index c57b7640125a..9ba5a203c724 100644 --- a/yogstation/code/modules/jobs/job_types/clerk.dm +++ b/yogstation/code/modules/jobs/job_types/clerk.dm @@ -29,8 +29,8 @@ /obj/item/circuitboard/computer/slot_machine = 15, /obj/item/twohanded/dualsaber/toy = 10, /obj/item/toy/windupToolbox = 10, - /obj/item/storage/box/fancy/cigarettes/cigpack_syndicate = 5, - /obj/item/storage/box/fancy/heart_box = 5, + /obj/item/storage/fancy/cigarettes/cigpack_syndicate = 5, + /obj/item/storage/fancy/heart_box = 5, /obj/item/lipstick/random = 5, /obj/item/skub = 2, //pro skub have taken over the mail /obj/item/stack/ore/bluespace_crystal/refined/nt = 1 From e9eeb8de21ebc6ee09a6f396ccff859a57d53461 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sat, 15 Jul 2023 23:10:16 -0400 Subject: [PATCH 24/50] Fixes airlock unres sides --- code/__HELPERS/lighting.dm | 2 +- code/game/machinery/doors/airlock.dm | 50 +++++++----------- icons/obj/doors/airlocks/station/overlays.dmi | Bin 8966 -> 8989 bytes yogstation.dme | 4 +- 4 files changed, 23 insertions(+), 33 deletions(-) diff --git a/code/__HELPERS/lighting.dm b/code/__HELPERS/lighting.dm index 6a56d65ae016..f7730324ef67 100644 --- a/code/__HELPERS/lighting.dm +++ b/code/__HELPERS/lighting.dm @@ -2,7 +2,7 @@ /proc/emissive_appearance(icon, icon_state = "", atom/offset_spokesman, layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE, offset_const) // Note: alpha doesn't "do" anything, since it's overriden by the color set shortly after // Consider removing it someday? (I wonder if we made emissives blend right we could make alpha actually matter. dreams man, dreams) - var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, offset_spokesman, EMISSIVE_PLANE, 255, appearance_flags | EMISSIVE_APPEARANCE_FLAGS, offset_const) + var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, /*offset_spokesman, */EMISSIVE_PLANE, 255, appearance_flags | EMISSIVE_APPEARANCE_FLAGS/*, offset_const*/) appearance.color = GLOB.emissive_color //Test to make sure emissives with broken or missing icon states are created diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c25316d9753b..b7069f638451 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -737,7 +737,26 @@ if(AIRLOCK_OPENING) if(lights && hasPower()) SSvis_overlays.add_vis_overlay(src, overlays_file, "lights_opening", FLOAT_LAYER, FLOAT_PLANE, dir) - check_unres() + + if(hasPower() && unres_sides) + for(var/heading in list(NORTH,SOUTH,EAST,WEST)) + if(!(unres_sides & heading)) + continue + var/mutable_appearance/floorlight = mutable_appearance('icons/obj/doors/airlocks/station/overlays.dmi', "unres_[heading]", FLOAT_LAYER, ABOVE_LIGHTING_PLANE) + switch (heading) + if (NORTH) + floorlight.pixel_x = 0 + floorlight.pixel_y = 32 + if (SOUTH) + floorlight.pixel_x = 0 + floorlight.pixel_y = -32 + if (EAST) + floorlight.pixel_x = 32 + floorlight.pixel_y = 0 + if (WEST) + floorlight.pixel_x = -32 + floorlight.pixel_y = 0 + . += floorlight /proc/get_airlock_overlay(icon_state, icon_file) var/obj/machinery/door/airlock/A @@ -747,35 +766,6 @@ if((!(. = airlock_overlays[iconkey]))) . = airlock_overlays[iconkey] = mutable_appearance(icon_file, icon_state) -/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) - if(unres_sides & NORTH) - var/image/I = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_n") - I.appearance_flags |= KEEP_APART - I.pixel_y = 32 - set_light(l_range = 2, l_power = 1) - add_overlay(I) - if(unres_sides & SOUTH) - var/image/I = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_s") - I.appearance_flags |= KEEP_APART - I.pixel_y = -32 - set_light(l_range = 2, l_power = 1) - add_overlay(I) - if(unres_sides & EAST) - var/image/I = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_e") - I.appearance_flags |= KEEP_APART - I.pixel_x = 32 - set_light(l_range = 2, l_power = 1) - add_overlay(I) - if(unres_sides & WEST) - var/image/I = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_w") - I.appearance_flags |= KEEP_APART - I.pixel_x = -32 - set_light(l_range = 2, l_power = 1) - add_overlay(I) - else - set_light(0) - /obj/machinery/door/airlock/do_animate(animation) switch(animation) if("opening") diff --git a/icons/obj/doors/airlocks/station/overlays.dmi b/icons/obj/doors/airlocks/station/overlays.dmi index e61be04cc5f7ea23cf24ec72cde8540179305e19..923f653dd92a051afa277e46d01afc32ec4c7c65 100644 GIT binary patch literal 8989 zcmbt)XH-+$+HMeOf)v>biVy_FLWxL|8jzwisnQ|zUK9io2q2({fQU#31JZl%1`wo3 z@1b|3calI7lDpVv?>o-<&KYOiZ`>alNmkxD*LutIyk#a#^XcP@7p`3Zfj}3PpD1X9 zKxF1;FKSBQ%3F&JHQ1se}5cZcUM9o$?&An%l-SXI}S`;6~U`*-=qzva{9 zzKl_)$Tw)d%oRfy_I6(Zqxo~YfqHS2mCey+=?Tg2YfUJ@iHJ1VpK$---)s<;wCZ<& z>H8d9n7bejw&Qb<9lPiWjXO`)e-{!=Pj!nk`>S_4PX&I^t6i*@!W@?Knu)5EEV{j=eD>u+5%0H3 zm`Noijmibl)+XWz1E)>ceJKO6x}q?WxemjM%`cAKL}g zk>_WLsKRp)h!do&AgAk{ zvOVMG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X+n zTM@HzvM*Q7nH(UqCkw4*j|w=v7g+BSwxL!$b>i5uZ?sWTVmms^oE8Ma=>DmLD{DwQ zRrch-4^~Q3tH5;2$?ge}so;9d~n*kqR-wJT- zQ`f2}wW&j#3Iu@>uCu-HtY@AoGwj`X}3M8)j^0a4&WCxzHVyHkF#TIf?E-Phjv+N_;~xW65V zjR7NV|gqR-Qtv#y@^*aa8uvw`+c xmjSmQhJWhSyTmcy6` Date: Sat, 15 Jul 2023 23:20:36 -0400 Subject: [PATCH 25/50] Fixes the flash --- code/modules/assembly/flash.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 37f0bc3776fb..045045811f27 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -48,8 +48,8 @@ return FIRELOSS /obj/item/assembly/flash/update_icon(updates=ALL, flash = FALSE) - . = ..() flashing = flash + . = ..() if(burnt_out) item_state = "flashburnt" if(flash) From 04ade08174e38b3158559996dac8b586787f44e9 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 01:24:54 -0400 Subject: [PATCH 26/50] Fixes cryo cells --- .../components/unary_devices/cryo.dm | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index e3ac0838bb39..9a50e0b9df1e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -103,14 +103,8 @@ beaker = null /obj/machinery/atmospherics/components/unary/cryo_cell/update_icon_state() - . = ..() - if(state_open) - icon_state = "pod-open" - return - if(on && is_operational()) - icon_state = "pod-on" - else - icon_state = "pod-off" + icon_state = (state_open) ? "pod-open" : ((on && is_operational()) ? "pod-on" : "pod-off") + return ..() /obj/machinery/atmospherics/components/unary/cryo_cell/update_overlays() . = ..() @@ -119,26 +113,26 @@ . += "pod-panel" if(occupant) - var/image/occupant_overlay + var/mutable_appearance/occupant_overlay if(ismonkey(occupant)) // Monkey - occupant_overlay = image(CRYOMOBS, "monkey") + occupant_overlay = mutable_appearance(CRYOMOBS, "monkey") else if(isalienadult(occupant)) if(isalienroyal(occupant)) // Queen and prae - occupant_overlay = image(CRYOMOBS, "alienq") + occupant_overlay = mutable_appearance(CRYOMOBS, "alienq") else if(isalienhunter(occupant)) // Hunter - occupant_overlay = image(CRYOMOBS, "alienh") + occupant_overlay = mutable_appearance(CRYOMOBS, "alienh") else if(isaliensentinel(occupant)) // Sentinel - occupant_overlay = image(CRYOMOBS, "aliens") + occupant_overlay = mutable_appearance(CRYOMOBS, "aliens") else // Drone or other - occupant_overlay = image(CRYOMOBS, "aliend") + occupant_overlay = mutable_appearance(CRYOMOBS, "aliend") else if(ishuman(occupant) || islarva(occupant) || (isanimal(occupant) && !ismegafauna(occupant))) // Mobs that are smaller than cryotube - occupant_overlay = image(occupant.icon, occupant.icon_state) + occupant_overlay = mutable_appearance(occupant.icon, occupant.icon_state) occupant_overlay.copy_overlays(occupant) else - occupant_overlay = image(CRYOMOBS, "generic") + occupant_overlay = mutable_appearance(CRYOMOBS, "generic") occupant_overlay.dir = SOUTH occupant_overlay.pixel_y = 22 @@ -152,14 +146,16 @@ else if(on && is_operational()) . += "cover-on" - else - . += "cover-off" -/obj/machinery/atmospherics/components/unary/cryo_cell/proc/run_anim(anim_up, image/occupant_overlay) - if(!on || !occupant || !is_operational()) +/obj/machinery/atmospherics/components/unary/cryo_cell/proc/run_anim(anim_up, mutable_appearance/occupant_overlay) + cut_overlays() + if(!occupant) running_anim = FALSE return - cut_overlays() + if(!on || !is_operational()) + running_anim = FALSE + add_overlay(occupant_overlay) //so they don't turn invisible + return if(occupant_overlay.pixel_y != 23) // Same effect as occupant_overlay.pixel_y == 22 || occupant_overlay.pixel_y == 24 anim_up = occupant_overlay.pixel_y == 22 // Same effect as if(occupant_overlay.pixel_y == 22) anim_up = TRUE ; if(occupant_overlay.pixel_y == 24) anim_up = FALSE if(anim_up) From 1acba9cd21cdc6167cac485c52dd78b3deabd890 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:24:19 -0400 Subject: [PATCH 27/50] gun fix --- .../machinery/portable/canister.dm | 47 +-------------- code/modules/projectiles/guns/energy.dm | 59 +++++++++++-------- .../projectiles/guns/energy/energy_gun.dm | 1 - 3 files changed, 37 insertions(+), 70 deletions(-) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index afe15de749c9..a49fb01bf977 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -308,56 +308,11 @@ if(connected_port) . += "can-connector" - var/light_state = get_pressure_state(air_contents.return_pressure()) + var/light_state = get_pressure_state(air_contents?.return_pressure()) if(light_state) //happens when pressure is below 10kpa which means no light . += mutable_appearance(icon, light_state) . += emissive_appearance(icon, "[light_state]-light", src, alpha = src.alpha) -/* - if(pressure < ONE_ATMOSPHERE) - SSvis_overlays.add_vis_overlay(src, icon, "can-o0", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o0", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_RED_LIGHT) - else if(pressure < 5 * ONE_ATMOSPHERE) - SSvis_overlays.add_vis_overlay(src, icon, "can-o1", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o1", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_RED_LIGHT) - else if(pressure < 10 * ONE_ATMOSPHERE) - SSvis_overlays.add_vis_overlay(src, icon, "can-o2", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o2", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_ORANGE) - else if(pressure < 20 * ONE_ATMOSPHERE) - SSvis_overlays.add_vis_overlay(src, icon, "can-o3", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o3", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_ORANGE) - else if(pressure < 30 * ONE_ATMOSPHERE) - SSvis_overlays.add_vis_overlay(src, icon, "can-o4", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o4", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_YELLOW) - else if(pressure < 40 * ONE_ATMOSPHERE) //pressure pump max - SSvis_overlays.add_vis_overlay(src, icon, "can-o5", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o5", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_LIME) - else if(pressure < 9100) //volume pump max - SSvis_overlays.add_vis_overlay(src, icon, "can-o6", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-o6", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(CANISTER_LIGHT_RANGE, CANISTER_LIGHT_POWER, COLOR_GREEN) - else if(pressure < 9100) - SSvis_overlays.add_vis_overlay(src, icon, "can-oF", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "can-oF", layer, EMISSIVE_PLANE, dir) - set_light_on(TRUE) - set_light_range_power_color(2, 2, COLOR_WHITE) - else - set_light_on(FALSE) -*/ - ///return the icon_state component for the canister's indicator light based on its current pressure reading /obj/machinery/portable_atmospherics/canister/proc/get_pressure_state(air_pressure) switch(air_pressure) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 56c99af8d539..9ae0c3a0c2ef 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -10,11 +10,10 @@ 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_appearance(UPDATE_ICON)? + var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_overlays? var/charge_sections = 4 ammo_x_offset = 2 var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail - var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon var/selfcharge = 0 var/charge_timer = 0 var/charge_delay = 8 @@ -159,41 +158,55 @@ update_appearance(UPDATE_ICON) return -/obj/item/gun/energy/update_overlays() +/obj/item/gun/energy/update_icon(updates=ALL) if(QDELETED(src)) return - . = ..() - if(!automatic_charge_overlays) - return - var/ratio = CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) - if(ratio == old_ratio) - return - old_ratio = ratio - cut_overlays() + var/ratio = get_charge_ratio() var/obj/item/ammo_casing/energy/shot = ammo_type[select] var/iconState = "[icon_state]_charge" var/itemState = null if(!initial(item_state)) itemState = icon_state if (modifystate) - add_overlay("[icon_state]_[shot.select_name]") iconState += "_[shot.select_name]" if(itemState) itemState += "[shot.select_name]" - if(cell.charge < shot.e_cost) - add_overlay("[icon_state]_empty") - else - if(!shaded_charge) - var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState) - for(var/i = ratio, i >= 1, i--) - charge_overlay.pixel_x = ammo_x_offset * (i - 1) - charge_overlay.pixel_y = ammo_y_offset * (i - 1) - add_overlay(charge_overlay) - else - add_overlay("[icon_state]_charge[ratio]") if(itemState) itemState += "[ratio]" item_state = itemState + return ..() + +/obj/item/gun/energy/update_overlays() + if(QDELETED(src)) + return + . = ..() + if(!automatic_charge_overlays) + return + + var/overlay_icon_state = "[icon_state]_charge" + if(modifystate) + var/obj/item/ammo_casing/energy/shot = ammo_type[select] + . += "[icon_state]_[initial(shot.select_name)]" + overlay_icon_state += "_[initial(shot.select_name)]" + + var/ratio = get_charge_ratio() + var/obj/item/ammo_casing/energy/shot = ammo_type[select] + if(cell.charge < shot.e_cost) + . += "[icon_state]_empty" + return + if(shaded_charge) + . += "[icon_state]_charge[ratio]" + return + var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state) + for(var/i = ratio, i >= 1, i--) + charge_overlay.pixel_x = ammo_x_offset * (i - 1) + charge_overlay.pixel_y = ammo_y_offset * (i - 1) + . += charge_overlay + +///Used by update_icon_state() and update_overlays() +/obj/item/gun/energy/proc/get_charge_ratio() + return can_shoot() ? CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0 + // Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if its power cell is removed. /obj/item/gun/energy/suicide_act(mob/living/user) if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD)) diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 852661f666ec..d1a0c5bc2bc1 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -143,7 +143,6 @@ pin = null can_charge = FALSE ammo_x_offset = 1 - old_ratio = 1 ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser, /obj/item/ammo_casing/energy/xray, /obj/item/ammo_casing/energy/anoxia) //a lot of firemodes so it's really an ADVANCED egun dead_cell = TRUE //Fuel not included, you will have to get irradiated to shoot this gun From 92ce4492816e3d164d2d6ef7e113ef192cf4ee55 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 06:23:21 -0400 Subject: [PATCH 28/50] Egun fixes --- code/_onclick/drag_drop.dm | 3 - .../projectiles/attachments/_attachment.dm | 5 +- code/modules/projectiles/gun.dm | 93 +++++++----------- code/modules/projectiles/guns/energy.dm | 9 +- .../projectiles/guns/energy/energy_gun.dm | 11 +-- code/modules/projectiles/guns/energy/laser.dm | 1 + .../projectiles/guns/energy/special.dm | 3 + .../chemistry/machinery/chem_dispenser.dm | 12 +-- icons/obj/guns/energy.dmi | Bin 43976 -> 44040 bytes icons/obj/guns/flashlights.dmi | Bin 457 -> 660 bytes .../code/game/objects/items/cards_ids.dm | 78 +++++++-------- 11 files changed, 98 insertions(+), 117 deletions(-) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index df3b9cb5279c..33cab77cfe05 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -181,9 +181,6 @@ var/canMouseDown = FALSE var/syndicate = FALSE // Does this item have syndicate only functionality via hud buttons? Needs to be in this scope to encompass all Chameleon items - Hopek -/obj/item/gun - var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds - /obj/item/gun/CanItemAutoclick(object, location, params) . = automatic diff --git a/code/modules/projectiles/attachments/_attachment.dm b/code/modules/projectiles/attachments/_attachment.dm index af3387b7eba2..48ea3dbdc41f 100644 --- a/code/modules/projectiles/attachments/_attachment.dm +++ b/code/modules/projectiles/attachments/_attachment.dm @@ -38,7 +38,6 @@ /obj/item/attachment/update_icon_state() . = ..() icon_state = "[initial(icon_state)][is_on ? "_on" : ""]" - attached_gun?.update_attachments() /obj/item/attachment/Destroy() if(attached_gun) @@ -61,7 +60,7 @@ pickup_user(user) G.attachment_flags |= attachment_type G.current_attachments += src - G.update_attachments() + G.update_appearance(UPDATE_ICON) forceMove(G) if(user) @@ -84,7 +83,7 @@ drop_user(user) G.attachment_flags ^= attachment_type G.current_attachments -= src - G.update_attachments() + G.update_appearance(UPDATE_ICON) if(user) user.put_in_hands(src) else diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index cb928bdf0c5c..32c274b670a5 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -20,7 +20,9 @@ attack_verb = list("struck", "hit", "bashed") cryo_preserve = TRUE fryable = TRUE + appearance_flags = TILE_BOUND|PIXEL_SCALE|LONG_GLIDE|KEEP_TOGETHER + var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds var/fire_sound = "gunshot" var/vary_fire_sound = TRUE var/fire_sound_volume = 50 @@ -54,12 +56,10 @@ var/can_flashlight = FALSE //if a flashlight can be added or removed if it already has one. var/obj/item/flashlight/seclite/gun_light - var/mutable_appearance/flashlight_overlay - var/datum/action/item_action/toggle_gunlight/alight + var/datum/action/item_action/toggle_gunlight/gunlight_toggle var/can_bayonet = FALSE //if a bayonet can be added or removed if it already has one. var/obj/item/kitchen/knife/bayonet - var/mutable_appearance/knife_overlay var/knife_x_offset = 0 var/knife_y_offset = 0 @@ -67,7 +67,6 @@ var/max_attachments = 0 // How many attachments can this gun hold, recommend not going over 5 var/list/current_attachments = list() - var/list/attachment_overlays = list() var/attachment_flags = 0 var/attachment_actions = list() @@ -86,6 +85,8 @@ var/list/obj/effect/projectile/tracer/current_tracers + var/gunlight_state = "flight" + /obj/item/gun/Initialize(mapload) . = ..() if(pin) @@ -93,8 +94,6 @@ pin = null else pin = new pin(src) - if(gun_light) - alight = new(src) current_tracers = list() build_zooming() @@ -480,15 +479,12 @@ if(!can_flashlight) return ..() var/obj/item/flashlight/seclite/S = I - if(!gun_light) - if(!user.transferItemToLoc(I, src)) - return - to_chat(user, span_notice("You click [S] into place on [src].")) - set_gun_light(S) - update_gunlight() - alight = new(src) - if(loc == user) - alight.Grant(user) + if(gun_light) + return + if(!user.transferItemToLoc(I, src)) + return + to_chat(user, span_notice("You click [S] into place on [src].")) + set_gun_light(S) else if(istype(I, /obj/item/kitchen/knife)) var/obj/item/kitchen/knife/K = I if(!can_bayonet || !K.bayonet || bayonet) //ensure the gun has an attachment point available, and that the knife is compatible with it. @@ -497,14 +493,7 @@ return to_chat(user, span_notice("You attach [K] to [src]'s bayonet lug.")) bayonet = K - var/state = "bayonet" //Generic state. - if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state? - state = bayonet.icon_state - var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi' - knife_overlay = mutable_appearance(bayonet_icons, state) - knife_overlay.pixel_x = knife_x_offset - knife_overlay.pixel_y = knife_y_offset - add_overlay(knife_overlay, TRUE) + update_appearance(UPDATE_ICON) else return ..() @@ -563,9 +552,7 @@ if(!bayonet) return bayonet = null - if(knife_overlay) - cut_overlay(knife_overlay, TRUE) - knife_overlay = null + update_appearance(UPDATE_ICON) return TRUE /obj/item/gun/proc/clear_gunlight() @@ -573,9 +560,7 @@ return var/obj/item/flashlight/seclite/removed_light = gun_light set_gun_light(null) - update_gunlight() removed_light.update_brightness() - QDEL_NULL(alight) return TRUE ///Called when gun_light value changes. @@ -588,14 +573,19 @@ gun_light.set_light_flags(gun_light.light_flags | LIGHT_ATTACHED) if(gun_light.loc != src) gun_light.forceMove(src) + gunlight_toggle = new(src) + add_item_action(gunlight_toggle) else if(.) var/obj/item/flashlight/seclite/old_gun_light = . old_gun_light.set_light_flags(old_gun_light.light_flags & ~LIGHT_ATTACHED) if(old_gun_light.loc == src) old_gun_light.forceMove(get_turf(src)) + remove_item_action(gunlight_toggle) + gunlight_toggle = null + update_appearance(UPDATE_ICON) /obj/item/gun/ui_action_click(mob/user, actiontype) - if(istype(actiontype, alight)) + if(istype(actiontype, gunlight_toggle)) toggle_gunlight() else ..() @@ -610,40 +600,33 @@ to_chat(user, span_notice("You toggle the gunlight [gun_light.on ? "on":"off"].")) playsound(user, 'sound/weapons/empty.ogg', 100, TRUE) - update_gunlight() + update_appearance(UPDATE_ICON) -/obj/item/gun/proc/update_gunlight() +/obj/item/gun/update_overlays() + . = ..() if(gun_light) - cut_overlay(flashlight_overlay, TRUE) - var/state = "flight[gun_light.on? "_on":""]" //Generic state. - if(gun_light.icon_state in icon_states('icons/obj/guns/flashlights.dmi')) //Snowflake state? - state = gun_light.icon_state - flashlight_overlay = mutable_appearance('icons/obj/guns/flashlights.dmi', state) + var/mutable_appearance/flashlight_overlay = mutable_appearance('icons/obj/guns/flashlights.dmi', "[gunlight_state][gun_light.on? "_on":""]") flashlight_overlay.pixel_x = flight_x_offset flashlight_overlay.pixel_y = flight_y_offset - add_overlay(flashlight_overlay, TRUE) - else - cut_overlay(flashlight_overlay, TRUE) - flashlight_overlay = null - update_appearance(UPDATE_ICON) - for(var/X in actions) - var/datum/action/A = X - A.build_all_button_icons() - -/obj/item/gun/proc/update_attachments() - for(var/mutable_appearance/M in attachment_overlays) - cut_overlay(M, TRUE) - attachment_overlays = list() - + . += flashlight_overlay + + if(bayonet) + var/state = "bayonet" //Generic state. + if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state? + state = bayonet.icon_state + var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi' + var/mutable_appearance/knife_overlay = mutable_appearance(bayonet_icons, state) + knife_overlay.pixel_x = knife_x_offset + knife_overlay.pixel_y = knife_y_offset + . += knife_overlay + var/att_position = 0 - for(var/obj/item/attachment/A in current_attachments) + for(var/obj/item/attachment/A as anything in current_attachments) var/mutable_appearance/M = mutable_appearance('icons/obj/guns/attachment.dmi', "[A.icon_state]_a") M.pixel_x = att_position * 6 - add_overlay(M, TRUE) - attachment_overlays += M - att_position += 1 + . += M + att_position++ - update_appearance(UPDATE_ICON) 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 9ae0c3a0c2ef..3c5dcb0bd8e6 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -161,6 +161,7 @@ /obj/item/gun/energy/update_icon(updates=ALL) if(QDELETED(src)) return + . = ..() var/ratio = get_charge_ratio() var/obj/item/ammo_casing/energy/shot = ammo_type[select] var/iconState = "[icon_state]_charge" @@ -174,7 +175,6 @@ if(itemState) itemState += "[ratio]" item_state = itemState - return ..() /obj/item/gun/energy/update_overlays() if(QDELETED(src)) @@ -186,14 +186,13 @@ var/overlay_icon_state = "[icon_state]_charge" if(modifystate) var/obj/item/ammo_casing/energy/shot = ammo_type[select] + if(cell.charge < shot.e_cost) + . += "[icon_state]_empty" + return . += "[icon_state]_[initial(shot.select_name)]" overlay_icon_state += "_[initial(shot.select_name)]" var/ratio = get_charge_ratio() - var/obj/item/ammo_casing/energy/shot = ammo_type[select] - if(cell.charge < shot.e_cost) - . += "[icon_state]_empty" - return if(shaded_charge) . += "[icon_state]_charge[ratio]" return diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index d1a0c5bc2bc1..27864f3d24dc 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -25,15 +25,14 @@ ammo_x_offset = 2 charge_sections = 3 can_flashlight = FALSE // Can't attach or detach the flashlight, and override it's icon update + gunlight_state = "mini-light" + flight_x_offset = 19 + flight_y_offset = 13 /obj/item/gun/energy/e_gun/mini/Initialize(mapload) - set_gun_light(new /obj/item/flashlight/seclite(src)) - return ..() - -/obj/item/gun/energy/e_gun/mini/update_overlays() . = ..() - if(gun_light && gun_light.on) - . += "mini-light" + var/obj/item/flashlight/seclite/new_seclite = new() + set_gun_light(new_seclite) /obj/item/gun/energy/e_gun/stun name = "tactical energy gun" diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 35eea472bb4d..fab652d3eff5 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -51,6 +51,7 @@ item_state = LASER desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use." ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser) + shaded_charge = FALSE /obj/item/gun/energy/laser/cyborg can_charge = FALSE diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 20b241f38e6d..5a9bca598c5a 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -409,6 +409,9 @@ desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit." ammo_type = list(/obj/item/ammo_casing/energy/instakill) force = 60 + charge_sections = 5 + ammo_x_offset = 2 + shaded_charge = FALSE /obj/item/gun/energy/laser/instakill/red desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design." diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 630ab409c3b7..1888d3fb269e 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -143,20 +143,20 @@ /obj/machinery/chem_dispenser/proc/work_animation() if(working_state) - flick(working_state,src) + flick(working_state, src) -/obj/machinery/chem_dispenser/update_overlays() +/obj/machinery/chem_dispenser/update_icon_state() . = ..() icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]" + +/obj/machinery/chem_dispenser/update_overlays() + . = ..() if(has_panel_overlay && panel_open) . += mutable_appearance(icon, "[initial(icon_state)]_panel-o") - if(beaker) beaker_overlay = display_beaker() . += beaker_overlay - - /obj/machinery/chem_dispenser/emag_act(mob/user) if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) @@ -493,7 +493,7 @@ if(WEST) b_o.pixel_x = -5 b_o.pixel_y = rand(-5, 7) - else//SOUTH + if(SOUTH) b_o.pixel_y = -7 b_o.pixel_x = rand(-9, 9) return b_o diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi index 306dd202208d92a6d1d5c5aad0992ae094bee757..3864cddaccac524b6056d92054a2ad7fc37d5858 100644 GIT binary patch delta 24886 zcmb?@byQVv_vaxbq(w<7N$Hf5P6b4|OGIf9X}BB^1eBESMx>E$knV;{BO=`mm$-BI zzVG{+-&!;C&&;?M+_la}hjbylS`w)Gx? zzz7G|L(>`odyB?}&DvPpJ@g>wMxw`KhvJTk-E*yIslV@4nQ^u4ehry9oQ;U&a5GHq zpY1K(ps>WIQS6IG=O_#a!qwOA2*UMCHK5_O)MISI`uWn?v6DxHlPipCGMS9TbGajq zfVey3`ku$IW!_JUBQW^WLIu65bv>1Z?z-)pKvtO>TJ|~2b2MrucS4_pvUQDmCb4+w zNz3)>tvdEdO@mWIk}9eD-wM{teVv-#l6YB;+-KCZquh;D6wC^VgC7=+J3jrEDTbLg zVEr@c<>l~;qeXx1N>}~`Ct90`Tnd9I6+PwpiA^i_1F~n zg(hMwJ-$KQx4;DISC$H3P?le_QF$4o8O~Mwl}2 z#=3*(a$qxOJ~s%nrDm9`Ok}Y^O&4jpZBS4UCh(g%0RRZ{M5odP9n!cH2d+B03TWuE zecGp(b22meD8ldubu=}>7~K}1rjo|7QWeTZ3gUK9Q`)*GbaT9urYjW1l-e~$CNfSp zsYr?dNex#{ytp1$C3^TU;N-+PMa-+(Fs$H}4AC1h&S%y2e&jmIR#9FuH-W{a&#E!_ z*%)NKYnic!!?C0c9)0J}@M#~1lZVOME|kl?*hv+#_=*p_8%$yZr%H?p*-B4Fw~3zl zc-NsW)VmbAb_$AF6OOk$+e(R@6tlOOxsH-jHppM#F8pOmD4(siUgTVJi|sGv4Cmg| z-V$Z2Du@?NfHt`?Usth!plL=@``q5TZWDwH0RUO~y3ffroM6GzrCmW(qV1PIW-Kfa zm;BREs_4qjOa)jl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s&TBLlba@MT z2Z`p0PPtTMblKQz$_|TQqwX%C0MAZ~%Uwdn!HPL1sULqeZuZJ-$7~qox=+cdRCK+I zdvPsq5AWRsh2*90bY^y4Ipg@p=cRB;O0l}TgQIWuB>ySZDlAMBtBX3O9$aD3S9sdw z22+j-Lv%wgO9Ji&Lo`Sng~spoCkYZ)0Lr^P0ni>!HGt>388b!BDzZQe4a z(2v)DPLE<*_2%1-=>LHtu}?1j);%V%`|cTr2S1eq_22yk+E_cy`6a{usjK(%{!+s3 zW`Z6wmtVliu=wJMXO;in9)4L8b=vO1%Aco8m}K5EhdCx&$cWuO&A(QRL4kv5$;(Bj zcCs#irhl1J$BMzAtiEGKSF`GeZMQ=$U%N|u?q+Zl5b3u$fAQ_NY|)$Z>+jdL9O7D$ o$O#N}em&;}`?kJMIQO3^xO$(nR_wXyz+}eY>FVdQ&MBb@00lJ}N&o-= literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3HE3&8=$zQsq@45hX6E#mPmP1tppJc?=8{ zb4pKHb2S(UxL&l{+|~Z=(RyEHLC=NJ0tYkL{x}%D_@?`YWq0+%B^kHQ@fqx0db;(* zbH-k))1G&2y4&4CCw=M**MILa^N6Ezq*>fvl_hC>f>Nw2Reg3>|2}-|^N-1zw+!ni}7#MjyT^vI)8sE-z^g9f+b-(txi;;&|WmfJz6~o}i!oFhqoCUMj zbhYR^+@4xJF)_78VCp5mRr*Kv_$qmStp9g%&7@<6N9xlKiX{lMZeYFP!kEKo7RV6Y z;45-~SfS6)xljDOXLH_P&mq(|G&WH#U@A97nuYVsmG(KeHlt1rm_U4}7y5@4R=Z9Qb7%oK3R(`H?ujV_) zl%Pxb`McT6Cq@_M{)ZT;u9l*F@@O1TaS?83{1OPJ)#rgmM diff --git a/yogstation/code/game/objects/items/cards_ids.dm b/yogstation/code/game/objects/items/cards_ids.dm index cd65f78f6397..c3c7be199b35 100644 --- a/yogstation/code/game/objects/items/cards_ids.dm +++ b/yogstation/code/game/objects/items/cards_ids.dm @@ -8,45 +8,45 @@ /obj/item/card/id/proc/ID_fluff() var/job = originalassignment - var/list/idfluff = list( - "Assistant" = list("civillian","green"), - "Captain" = list("captain","gold"), - "Head of Personnel" = list("civillian","silver"), - "Head of Security" = list("security","silver"), - "Chief Engineer" = list("engineering","silver"), - "Research Director" = list("science","silver"), - "Chief Medical Officer" = list("medical","silver"), - "Station Engineer" = list("engineering","yellow"), - "Atmospheric Technician" = list("engineering","white"), - "Network Admin" = list("engineering","green"), - "Medical Doctor" = list("medical","blue"), - "Geneticist" = list("medical","purple"), - "Virologist" = list("medical","green"), - "Chemist" = list("medical","orange"), - "Paramedic" = list("medical","white"), - "Psychiatrist" = list("medical","brown"), - "Scientist" = list("science","purple"), - "Roboticist" = list("science","black"), - "Quartermaster" = list("cargo","silver"), - "Cargo Technician" = list("cargo","brown"), - "Shaft Miner" = list("cargo","black"), - "Mining Medic" = list("cargo","blue"), - "Bartender" = list("civillian","black"), - "Botanist" = list("civillian","blue"), - "Cook" = list("civillian","white"), - "Janitor" = list("civillian","purple"), - "Curator" = list("civillian","purple"), - "Chaplain" = list("civillian","black"), - "Clown" = list("clown","rainbow"), - "Mime" = list("mime","white"), - "Artist" = list("civillian","yellow"), - "Clerk" = list("civillian","blue"), - "Tourist" = list("civillian","yellow"), - "Warden" = list("security","black"), - "Security Officer" = list("security","red"), - "Detective" = list("security","brown"), - "Brig Physician" = list("security","blue"), - "Lawyer" = list("security","purple") + var/static/list/idfluff = list( + "Assistant" = list("civillian","green"), + "Captain" = list("captain","gold"), + "Head of Personnel" = list("civillian","silver"), + "Head of Security" = list("security","silver"), + "Chief Engineer" = list("engineering","silver"), + "Research Director" = list("science","silver"), + "Chief Medical Officer" = list("medical","silver"), + "Station Engineer" = list("engineering","yellow"), + "Atmospheric Technician" = list("engineering","white"), + "Network Admin" = list("engineering","green"), + "Medical Doctor" = list("medical","blue"), + "Geneticist" = list("medical","purple"), + "Virologist" = list("medical","green"), + "Chemist" = list("medical","orange"), + "Paramedic" = list("medical","white"), + "Psychiatrist" = list("medical","brown"), + "Scientist" = list("science","purple"), + "Roboticist" = list("science","black"), + "Quartermaster" = list("cargo","silver"), + "Cargo Technician" = list("cargo","brown"), + "Shaft Miner" = list("cargo","black"), + "Mining Medic" = list("cargo","blue"), + "Bartender" = list("civillian","black"), + "Botanist" = list("civillian","blue"), + "Cook" = list("civillian","white"), + "Janitor" = list("civillian","purple"), + "Curator" = list("civillian","purple"), + "Chaplain" = list("civillian","black"), + "Clown" = list("clown","rainbow"), + "Mime" = list("mime","white"), + "Artist" = list("civillian","yellow"), + "Clerk" = list("civillian","blue"), + "Tourist" = list("civillian","yellow"), + "Warden" = list("security","black"), + "Security Officer" = list("security","red"), + "Detective" = list("security","brown"), + "Brig Physician" = list("security","blue"), + "Lawyer" = list("security","purple"), ) if(job in idfluff) has_fluff = TRUE From d95efaaf62fe80fc970e7cd830217af15f2baa46 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 07:02:25 -0400 Subject: [PATCH 29/50] fixes mini eguns --- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/energy.dm | 20 ++++++------------- .../projectiles/guns/energy/energy_gun.dm | 4 ++-- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 32c274b670a5..deadab326b3d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -622,7 +622,7 @@ var/att_position = 0 for(var/obj/item/attachment/A as anything in current_attachments) - var/mutable_appearance/M = mutable_appearance('icons/obj/guns/attachment.dmi', "[A.icon_state]_a") + var/mutable_appearance/M = mutable_appearance(A.icon, "[A.icon_state]_a") M.pixel_x = att_position * 6 . += M att_position++ diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 3c5dcb0bd8e6..f19773bd2a1b 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -158,23 +158,15 @@ update_appearance(UPDATE_ICON) return -/obj/item/gun/energy/update_icon(updates=ALL) +/obj/item/gun/energy/update_icon_state() if(QDELETED(src)) return . = ..() - var/ratio = get_charge_ratio() var/obj/item/ammo_casing/energy/shot = ammo_type[select] - var/iconState = "[icon_state]_charge" - var/itemState = null - if(!initial(item_state)) - itemState = icon_state - if (modifystate) - iconState += "_[shot.select_name]" - if(itemState) - itemState += "[shot.select_name]" - if(itemState) - itemState += "[ratio]" - item_state = itemState + var/ratio = get_charge_ratio() + if(!isnull(initial(item_state))) //static item states + return + item_state = "[initial(icon_state)][modifystate ? "[shot.select_name]" : ""][ratio]" /obj/item/gun/energy/update_overlays() if(QDELETED(src)) @@ -196,8 +188,8 @@ if(shaded_charge) . += "[icon_state]_charge[ratio]" return - var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state) for(var/i = ratio, i >= 1, i--) + var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state) charge_overlay.pixel_x = ammo_x_offset * (i - 1) charge_overlay.pixel_y = ammo_y_offset * (i - 1) . += charge_overlay diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 27864f3d24dc..94a6dbe9d884 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -2,9 +2,9 @@ name = "energy gun" desc = "A basic hybrid energy gun with two settings: disable and kill." icon_state = "energy" - item_state = null //so the human update icon uses the icon_state instead. + item_state = null //so the human update icon uses the icon_state instead. ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser) - modifystate = 1 + modifystate = TRUE can_flashlight = TRUE ammo_x_offset = 3 flight_x_offset = 15 From 7ce4b3e8807371c9f7e96b7b0bc4aadff005f526 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 07:14:35 -0400 Subject: [PATCH 30/50] Update energy.dm --- code/modules/projectiles/guns/energy.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f19773bd2a1b..6b857ed468dc 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -181,7 +181,6 @@ if(cell.charge < shot.e_cost) . += "[icon_state]_empty" return - . += "[icon_state]_[initial(shot.select_name)]" overlay_icon_state += "_[initial(shot.select_name)]" var/ratio = get_charge_ratio() From accb91756ed01f3769f03e913ff0bb8d9fd96ab4 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 07:21:21 -0400 Subject: [PATCH 31/50] Fixes MMIs --- code/modules/mob/living/brain/MMI.dm | 6 +++++- code/modules/mob/living/brain/posibrain.dm | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index f527d66bd968..c937b2eb07f9 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -38,9 +38,13 @@ /obj/item/mmi/update_overlays() . = ..() + . += add_mmi_overlay() + +/obj/item/mmi/proc/add_mmi_overlay() if(brainmob && brainmob.stat != DEAD) . += "mmi_alive" - else + return + if(brain) . += "mmi_dead" /obj/item/mmi/Initialize(mapload) diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index 9cbd0c449b68..4f7c0b5066f5 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -217,5 +217,8 @@ GLOBAL_VAR(posibrain_notify_cooldown) return if(brainmob && brainmob.key) icon_state = "[initial(icon_state)]-occupied" - else - icon_state = initial(icon_state) + return + icon_state = initial(icon_state) + +/obj/item/mmi/posibrain/add_mmi_overlay() + return From ad753caf63764e4d87c3f55e6948b2371f87b278 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 17:59:52 -0400 Subject: [PATCH 32/50] Fixes security level interface --- code/modules/security_levels/level_interface.dm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/code/modules/security_levels/level_interface.dm b/code/modules/security_levels/level_interface.dm index b41b9cec3191..c840fa4400f0 100644 --- a/code/modules/security_levels/level_interface.dm +++ b/code/modules/security_levels/level_interface.dm @@ -30,10 +30,8 @@ /obj/machinery/level_interface/update_icon(updates=ALL) . = ..() - cut_overlays() if(!is_operational()) set_light_on(FALSE) - return else set_light_on(TRUE) @@ -61,15 +59,13 @@ ui = new(user, src, "LevelInterface", name) ui.open() -/obj/machinery/level_interface/ui_act(action, list/params) - . = ..() - /obj/machinery/level_interface/ui_data(mob/user) var/list/data = ..() data["alertLevel"] = GLOB.security_level return data /obj/machinery/level_interface/ui_act(action, list/params, mob/user) + . = ..() if(..()) return TRUE @@ -87,7 +83,7 @@ balloon_alert(usr, "Nanotrasen override in progress!") return TRUE if(!check_access(usr.get_idcard())) - balloon_alert(usr, "No access!") + balloon_alert(usr, "no access!") return TRUE var/alert_level = params["level_number"] if(!isnum(alert_level)) @@ -98,7 +94,7 @@ return TRUE for(var/obj/machinery/computer/communications/comms_console in GLOB.machines) if(!COOLDOWN_FINISHED(comms_console, important_action_cooldown)) - balloon_alert(usr, "On cooldown!") + balloon_alert(usr, "on cooldown!") to_chat(usr, span_warning("The system is not able to change the security alert level more than once per minute, please wait.")) return TRUE COOLDOWN_START(comms_console, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN) From 2e2d9cbe9f67a9c3899a727819d5acaeb15445b7 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 16 Jul 2023 18:15:34 -0400 Subject: [PATCH 33/50] Fixes cigar cases --- code/game/objects/items/storage/fancy.dm | 4 ++-- code/modules/clothing/masks/hailer.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 316290eed81e..a00f29f1cb1f 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -47,7 +47,7 @@ /obj/item/storage/fancy/attack_self(mob/user) fancy_open = !fancy_open update_appearance(UPDATE_ICON) - . = ..() + return ..() /obj/item/storage/fancy/Exited() . = ..() @@ -205,7 +205,7 @@ /obj/item/storage/fancy/cigarettes/update_overlays() . = ..() - if(!fancy_open && !contents.len) + if(!fancy_open) return . += "[icon_state]_open" diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 652e27ba308f..13460c6433a3 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -34,7 +34,7 @@ 'sound/voice/cpdeath/die4.ogg', ) ///List of all lines that can be said by the sechailer, with their respective sound file. - var/list/sechailer_voicelines = list( + var/static/list/sechailer_voicelines = list( "Affirmative" = 'sound/voice/cpvoicelines/affirmative.ogg', "Copy" = 'sound/voice/cpvoicelines/copy.ogg', "Alright, you can go" = 'sound/voice/cpvoicelines/allrightyoucango.ogg', From 7a5c7cfde62530fe76144354cd3b9c17b18c1e99 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 07:24:35 -0400 Subject: [PATCH 34/50] Bow & Critter crate fixes --- .../crates_lockers/crates/critter.dm | 13 ++++++++---- .../modules/projectiles/guns/ballistic/bow.dm | 21 ++++++------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index 9040f304ed62..c376d57616fa 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -21,14 +21,19 @@ return ..() +/obj/structure/closet/crate/critter/update_icon_state() + SHOULD_CALL_PARENT(FALSE) + return + /obj/structure/closet/crate/critter/update_overlays() . = ..() if(opened) . += "crittercrate_door_open" - else - . += "crittercrate_door" - if(manifest) - . += "manifest" + return + + . += "crittercrate_door" + if(manifest) + . += "manifest" /obj/structure/closet/crate/critter/return_air() if(tank) diff --git a/code/modules/projectiles/guns/ballistic/bow.dm b/code/modules/projectiles/guns/ballistic/bow.dm index 7f0011185b80..dd80bbdbacc3 100644 --- a/code/modules/projectiles/guns/ballistic/bow.dm +++ b/code/modules/projectiles/guns/ballistic/bow.dm @@ -33,7 +33,6 @@ var/draw_time = 0.5 SECONDS var/draw_slowdown = 0.75 var/draw_sound = 'sound/weapons/sound_weapons_bowdraw.ogg' - var/mutable_appearance/arrow_overlay /// If the last loaded arrow was a toy arrow or not, used to see if foam darts / arrows should do stamina damage var/nerfed = FALSE @@ -133,12 +132,15 @@ update_slowdown() update_appearance(UPDATE_ICON) -/obj/item/gun/ballistic/bow/update_overlays() +/obj/item/gun/ballistic/bow/update_icon_state() . = ..() icon_state = "[initial(icon_state)][chambered ? "_firing" : ""]" + +/obj/item/gun/ballistic/bow/update_overlays() + . = ..() if(get_ammo()) - var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) - arrow_overlay = mutable_appearance(icon, "[initial(E.item_state)][chambered ? "_firing" : ""]") + var/obj/item/ammo_casing/reusable/arrow/E = magazine.get_round(TRUE) + var/mutable_appearance/arrow_overlay = mutable_appearance(icon, "[initial(E.item_state)][chambered ? "_firing" : ""]") . += arrow_overlay /obj/item/gun/ballistic/bow/proc/update_slowdown() @@ -453,8 +455,6 @@ /obj/item/gun/ballistic/bow/energy/update_icon_state() . = ..() - cut_overlay(arrow_overlay, TRUE) - if(folded) icon_state = "[initial(icon_state)]_folded" item_state = "[initial(item_state)]_folded" @@ -468,15 +468,6 @@ var/mob/M = loc M.update_inv_hands() -/obj/item/gun/ballistic/bow/energy/update_overlays() - . = ..() - if(folded || !get_ammo()) - return - var/obj/item/ammo_casing/reusable/arrow/energy/E = magazine.get_round(TRUE) - item_state = "[item_state]_[E.icon_state]" - arrow_overlay = mutable_appearance(icon, "[initial(E.icon_state)][chambered ? "_firing" : ""]") - . += arrow_overlay - /obj/item/gun/ballistic/bow/energy/shoot_live_shot(mob/living/user, pointblank, atom/pbtarget, message) if(folded) to_chat(user, span_notice("You must unfold [src] before firing it!")) From 4e5f9a62decac223b296639a00f3908b4767ba2f Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:40:19 -0400 Subject: [PATCH 35/50] Fixes signalers --- code/modules/assembly/signaler.dm | 2 +- yogstation/code/modules/assembly/signaler.dm | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 91208e3cbd92..cab02fe48b7c 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -32,7 +32,7 @@ /obj/item/assembly/signaler/Initialize(mapload) . = ..() set_frequency(frequency) - + update_appearance(UPDATE_ICON) /obj/item/assembly/signaler/Destroy() SSradio.remove_object(src,frequency) diff --git a/yogstation/code/modules/assembly/signaler.dm b/yogstation/code/modules/assembly/signaler.dm index 9d66c4c819be..08dc33171402 100644 --- a/yogstation/code/modules/assembly/signaler.dm +++ b/yogstation/code/modules/assembly/signaler.dm @@ -3,19 +3,14 @@ var/static/list/label_colors = list("red", "green", "blue", "cyan", "magenta", "yellow", "white") var/label_color = "green" -/obj/item/assembly/signaler/Initialize(mapload) - . = ..() - update_appearance(UPDATE_ICON) - /obj/item/assembly/signaler/update_overlays() . = ..() if(label_color) attached_overlays = list() - var/mutable_appearance/A = mutable_appearance('yogstation/icons/obj/assemblies/new_assemblies.dmi', "signaller_color") + var/mutable_appearance/A = mutable_appearance(icon, "signaller_color") A.color = label_color . += A attached_overlays += A - return ..() /obj/item/assembly/signaler/anomaly label_color = null From 716094e8d9eb29eba3eaf11f5f6434ed6d86939a Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:49:57 -0400 Subject: [PATCH 36/50] Fix canisters again --- code/__DEFINES/lighting.dm | 8 -------- code/__HELPERS/lighting.dm | 13 ------------- .../atmospherics/machinery/portable/canister.dm | 1 - yogstation.dme | 1 - 4 files changed, 23 deletions(-) delete mode 100644 code/__HELPERS/lighting.dm diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm index 64ff6755cc67..18f3e09c7a6c 100644 --- a/code/__DEFINES/lighting.dm +++ b/code/__DEFINES/lighting.dm @@ -85,14 +85,6 @@ /// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans. #define EMISSIVE_BLOCK_UNIQUE 2 -/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR]. -#define EMISSIVE_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0) -/// A globaly cached version of [EMISSIVE_COLOR] for quick access. -GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR) -/// A set of appearance flags applied to all emissive and emissive blocker overlays. -/// KEEP_APART to prevent parent hooking, KEEP_TOGETHER for children, and we reset the color and alpha of our parent so nothing gets overriden -#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR|RESET_ALPHA) - /// Returns the red part of a #RRGGBB hex sequence as number #define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4)) diff --git a/code/__HELPERS/lighting.dm b/code/__HELPERS/lighting.dm deleted file mode 100644 index f7730324ef67..000000000000 --- a/code/__HELPERS/lighting.dm +++ /dev/null @@ -1,13 +0,0 @@ -/// Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the [EMISSIVE_COLOR]. -/proc/emissive_appearance(icon, icon_state = "", atom/offset_spokesman, layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE, offset_const) - // Note: alpha doesn't "do" anything, since it's overriden by the color set shortly after - // Consider removing it someday? (I wonder if we made emissives blend right we could make alpha actually matter. dreams man, dreams) - var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, /*offset_spokesman, */EMISSIVE_PLANE, 255, appearance_flags | EMISSIVE_APPEARANCE_FLAGS/*, offset_const*/) - appearance.color = GLOB.emissive_color - - //Test to make sure emissives with broken or missing icon states are created -// if(PERFORM_ALL_TESTS(focus_only/invalid_emissives)) -// if(icon_state && !icon_exists(icon, icon_state, scream = FALSE)) //Scream set to False so we can have a custom stack_trace -// stack_trace("An emissive appearance was added with non-existant icon_state \"[icon_state]\" in [icon]!") - - return appearance diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index a49fb01bf977..2e091b875bbc 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -311,7 +311,6 @@ var/light_state = get_pressure_state(air_contents?.return_pressure()) if(light_state) //happens when pressure is below 10kpa which means no light . += mutable_appearance(icon, light_state) - . += emissive_appearance(icon, "[light_state]-light", src, alpha = src.alpha) ///return the icon_state component for the canister's indicator light based on its current pressure reading /obj/machinery/portable_atmospherics/canister/proc/get_pressure_state(air_pressure) diff --git a/yogstation.dme b/yogstation.dme index 0a742f949d6a..54b35db41c72 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -209,7 +209,6 @@ #include "code\__HELPERS\icon_smoothing.dm" #include "code\__HELPERS\icons.dm" #include "code\__HELPERS\level_traits.dm" -#include "code\__HELPERS\lighting.dm" #include "code\__HELPERS\maths.dm" #include "code\__HELPERS\matrices.dm" #include "code\__HELPERS\mobs.dm" From c3d8660061c4c0a5c22ff1783418c6366a49c7a3 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:51:25 -0400 Subject: [PATCH 37/50] re-adds blinking red --- code/modules/atmospherics/machinery/portable/canister.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 2e091b875bbc..955027286ad3 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -330,7 +330,7 @@ if((10) to (5 * ONE_ATMOSPHERE)) return "can-o1" else - return "can-o1" + return "can-o0" /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) From e7c0e2c05add14d156a40c401d6c4733d78429ad Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:14:34 -0400 Subject: [PATCH 38/50] Fixes solar panels --- code/modules/power/solar.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 1e754aca78f3..49c3ec5f7170 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -20,8 +20,6 @@ var/obj/machinery/power/solar_control/control var/needs_to_turn = TRUE //do we need to turn next tick? var/needs_to_update_solar_exposure = TRUE //do we need to call update_solar_exposure() next tick? - var/mutable_appearance/panelstructure - var/mutable_appearance/paneloverlay var/multiplier var/panelcolor var/obj/item/stack/sheet/glass_type @@ -31,9 +29,6 @@ Make(S) connect_to_network() RegisterSignal(SSsun, COMSIG_SUN_MOVED, PROC_REF(queue_update_solar_exposure)) - panelstructure = mutable_appearance(icon, "solar_panel", FLY_LAYER) - paneloverlay = mutable_appearance(icon, "solar_panel-o", FLY_LAYER) - paneloverlay.color = panelcolor update_appearance(UPDATE_ICON) /obj/machinery/power/solar/Destroy() @@ -117,9 +112,15 @@ . = ..() var/matrix/turner = matrix() turner.Turn(azimuth_current) + + var/mutable_appearance/panelstructure = mutable_appearance(icon, "solar_panel", FLY_LAYER) panelstructure.transform = turner + . += panelstructure + + var/mutable_appearance/paneloverlay = mutable_appearance(icon, "solar_panel-o", FLY_LAYER) paneloverlay.transform = turner - . += list(paneloverlay, panelstructure) + paneloverlay.color = panelcolor + . += paneloverlay /obj/machinery/power/solar/proc/queue_turn(azimuth) needs_to_turn = TRUE From 36c09ef06206a33c10d85c90f3da17d4cbb9df38 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Mon, 17 Jul 2023 23:51:42 -0400 Subject: [PATCH 39/50] Fixes cryogenics (and forced standing) --- code/__DEFINES/traits.dm | 1 + .../components/unary_devices/cryo.dm | 288 +++++++++--------- code/modules/mob/living/living.dm | 2 +- icons/obj/cryogenics.dmi | Bin 34546 -> 42361 bytes 4 files changed, 147 insertions(+), 144 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 63edf6f14ef0..babf3483c608 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -348,6 +348,7 @@ #define TRAIT_STATUS_EFFECT(effect_id) "[effect_id]-trait" /// trait associated to being held in a chokehold #define CHOKEHOLD_TRAIT "chokehold" +#define CRYO_TRAIT "cryo_trait" // unique trait sources, still defines #define CLONING_POD_TRAIT "cloning-pod" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9a50e0b9df1e..4457d8548ec0 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -1,5 +1,47 @@ -#define CRYOMOBS 'icons/obj/cryo_mobs.dmi' +///Max temperature allowed inside the cryotube, should break before reaching this heat +#define MAX_TEMPERATURE 4000 +/// This is a visual helper that shows the occupant inside the cryo cell. +/atom/movable/visual/cryo_occupant + icon = 'icons/obj/cryogenics.dmi' + // Must be tall, otherwise the filter will consider this as a 32x32 tile + // and will crop the head off. + icon_state = "mask_bg" + layer = ABOVE_WINDOW_LAYER + 0.01 + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + pixel_y = 22 + appearance_flags = KEEP_TOGETHER + +/atom/movable/visual/cryo_occupant/Initialize() + . = ..() + // Alpha masking + // It will follow this as the animation goes, but that's no problem as the "mask" icon state + // already accounts for this. + add_filter("alpha_mask", 1, list("type" = "alpha", "icon" = icon('icons/obj/cryogenics.dmi', "mask"), "y" = -22)) + +/atom/movable/visual/cryo_occupant/proc/on_occupant_enter(mob/living/occupant) + occupant.setDir(SOUTH) + vis_contents += occupant + pixel_y = 22 + ADD_TRAIT(occupant, TRAIT_IMMOBILIZED, CRYO_TRAIT) + ADD_TRAIT(occupant, TRAIT_FORCED_STANDING, CRYO_TRAIT) + occupant.set_resting(FALSE, silent = TRUE) + +/atom/movable/visual/cryo_occupant/proc/on_occupant_exit(mob/living/occupant) + vis_contents -= occupant + REMOVE_TRAIT(occupant, TRAIT_IMMOBILIZED, CRYO_TRAIT) + REMOVE_TRAIT(occupant, TRAIT_FORCED_STANDING, CRYO_TRAIT) + if(occupant.resting || HAS_TRAIT(occupant, TRAIT_FLOORED)) + occupant.set_resting(TRUE, silent = TRUE) + +/atom/movable/visual/cryo_occupant/proc/on_toggle_on() + animate(src, pixel_y = 24, time = 20, loop = -1) + animate(pixel_y = 22, time = 20) + +/atom/movable/visual/cryo_occupant/proc/on_toggle_off() + animate(src) + +/// Cryo cell /obj/machinery/atmospherics/components/unary/cryo_cell name = "cryo cell" icon = 'icons/obj/cryogenics.dmi' @@ -13,6 +55,8 @@ pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY occupant_typecache = list(/mob/living/carbon, /mob/living/simple_animal) + showpipe = FALSE + var/autoeject = TRUE var/volume = 100 @@ -29,7 +73,8 @@ var/radio_key = /obj/item/encryptionkey/headset_med var/radio_channel = RADIO_CHANNEL_MEDICAL - var/running_anim = FALSE + /// Visual content - Occupant + var/atom/movable/visual/cryo_occupant/occupant_vis var/escape_in_progress = FALSE var/message_cooldown @@ -43,6 +88,8 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/Initialize(mapload) . = ..() initialize_directions = dir + if(is_operational()) + begin_processing() radio = new(src) radio.keyslot = new radio_key @@ -50,10 +97,14 @@ radio.canhear_range = 0 radio.recalculateChannels() + occupant_vis = new(null) + vis_contents += occupant_vis + /obj/machinery/atmospherics/components/unary/cryo_cell/Exited(atom/movable/AM, atom/newloc) - var/oldoccupant = occupant + var/mob/living/oldoccupant = occupant . = ..() // Parent proc takes care of removing occupant if necessary - if (AM == oldoccupant) + if (oldoccupant && istype(oldoccupant) && AM == oldoccupant) + occupant_vis.on_occupant_exit(oldoccupant) update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/cryo_cell/on_construction() @@ -73,11 +124,24 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) //this is leaving out everything but efficiency since they follow the same idea of "better beaker, better results" . = ..() if(in_range(user, src) || isobserver(user)) - . += "The status display reads: Efficiency at [efficiency*100]%." + . += "The status display reads: Efficiency at [efficiency*100]%." /obj/machinery/atmospherics/components/unary/cryo_cell/Destroy() + vis_contents.Cut() + + QDEL_NULL(occupant_vis) QDEL_NULL(radio) QDEL_NULL(beaker) + ///Take the turf the cryotube is on + var/turf/T = get_turf(src) + if(T) + ///Take the air composition of the turf + var/datum/gas_mixture/env = T.return_air() + ///Take the air composition inside the cryotube + var/datum/gas_mixture/air1 = airs[1] + env.merge(air1) + T.air_update_turf() + return ..() /obj/machinery/atmospherics/components/unary/cryo_cell/contents_explosion(severity, target) @@ -102,107 +166,60 @@ beaker.forceMove(drop_location()) beaker = null +/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() + . = ..() + plane = initial(plane) + /obj/machinery/atmospherics/components/unary/cryo_cell/update_icon_state() - icon_state = (state_open) ? "pod-open" : ((on && is_operational()) ? "pod-on" : "pod-off") - return ..() + . = ..() + icon_state = (state_open) ? "pod-open" : (on && is_operational()) ? "pod-on" : "pod-off" + +GLOBAL_VAR_INIT(cryo_overlay_cover_on, mutable_appearance('icons/obj/cryogenics.dmi', "cover-on", layer = ABOVE_WINDOW_LAYER + 0.02)) +GLOBAL_VAR_INIT(cryo_overlay_cover_off, mutable_appearance('icons/obj/cryogenics.dmi', "cover-off", layer = ABOVE_WINDOW_LAYER + 0.02)) /obj/machinery/atmospherics/components/unary/cryo_cell/update_overlays() . = ..() - if(panel_open) . += "pod-panel" - - if(occupant) - var/mutable_appearance/occupant_overlay - - if(ismonkey(occupant)) // Monkey - occupant_overlay = mutable_appearance(CRYOMOBS, "monkey") - else if(isalienadult(occupant)) - if(isalienroyal(occupant)) // Queen and prae - occupant_overlay = mutable_appearance(CRYOMOBS, "alienq") - else if(isalienhunter(occupant)) // Hunter - occupant_overlay = mutable_appearance(CRYOMOBS, "alienh") - else if(isaliensentinel(occupant)) // Sentinel - occupant_overlay = mutable_appearance(CRYOMOBS, "aliens") - else // Drone or other - occupant_overlay = mutable_appearance(CRYOMOBS, "aliend") - - else if(ishuman(occupant) || islarva(occupant) || (isanimal(occupant) && !ismegafauna(occupant))) // Mobs that are smaller than cryotube - occupant_overlay = mutable_appearance(occupant.icon, occupant.icon_state) - occupant_overlay.copy_overlays(occupant) - - else - occupant_overlay = mutable_appearance(CRYOMOBS, "generic") - - occupant_overlay.dir = SOUTH - occupant_overlay.pixel_y = 22 - - if(on && !running_anim && is_operational()) - running_anim = TRUE - run_anim(TRUE, occupant_overlay) - else - . += occupant_overlay - . += "cover-off" - - else if(on && is_operational()) - . += "cover-on" - -/obj/machinery/atmospherics/components/unary/cryo_cell/proc/run_anim(anim_up, mutable_appearance/occupant_overlay) - cut_overlays() - if(!occupant) - running_anim = FALSE + if(state_open) return - if(!on || !is_operational()) - running_anim = FALSE - add_overlay(occupant_overlay) //so they don't turn invisible + if(on && is_operational()) + . += GLOB.cryo_overlay_cover_on + else + . += GLOB.cryo_overlay_cover_off + +/obj/machinery/atmospherics/components/unary/cryo_cell/proc/set_on(new_value) + if(on == new_value) return - if(occupant_overlay.pixel_y != 23) // Same effect as occupant_overlay.pixel_y == 22 || occupant_overlay.pixel_y == 24 - anim_up = occupant_overlay.pixel_y == 22 // Same effect as if(occupant_overlay.pixel_y == 22) anim_up = TRUE ; if(occupant_overlay.pixel_y == 24) anim_up = FALSE - if(anim_up) - occupant_overlay.pixel_y++ + . = on + on = new_value + if(on) + occupant_vis.on_toggle_on() else - occupant_overlay.pixel_y-- - add_overlay(occupant_overlay) - add_overlay("cover-on") - addtimer(CALLBACK(src, PROC_REF(run_anim), anim_up, occupant_overlay), 7, TIMER_UNIQUE) + occupant_vis.on_toggle_off() + update_appearance(UPDATE_ICON) -/obj/machinery/atmospherics/components/unary/cryo_cell/nap_violation(mob/violator) - open_machine() /obj/machinery/atmospherics/components/unary/cryo_cell/process(delta_time) ..() - if(state_open) - reagent_transfer = 0 - return if(!on) return - if(!is_operational()) - on = FALSE - update_appearance(UPDATE_ICON) - return if(!occupant) return var/mob/living/mob_occupant = occupant - if(!check_nap_violations()) - return + if(mob_occupant.on_fire) + mob_occupant.extinguish_mob() if(mob_occupant.stat == DEAD) // We don't bother with dead people. return - /// Individuals with the MEDICALIGNORE trait will stop the cryo from functioning and display a unique warning unless there is clone damage on the body which cryo happens to be able to heal even with MEDICALIGNORE (oversight probably but one of the one ways to heal their clone damage atm). - Hopek - if(HAS_TRAIT(mob_occupant,TRAIT_MEDICALIGNORE) && !(mob_occupant.getCloneLoss() + mob_occupant.getToxLoss() + mob_occupant.getOxyLoss())) - src.visible_message(span_warning("[src] is unable to treat [mob_occupant] as they cannot be treated with conventional medicine.")) - 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_appearance(UPDATE_ICON) - return - - var/robotic_limb_damage = 0 // brute and burn damage to robotic limbs var/mob/living/carbon/C if(iscarbon(mob_occupant)) C = mob_occupant + + var/robotic_limb_damage = 0 // brute and burn damage to robotic limbs + if(iscarbon(mob_occupant)) for(var/obj/item/bodypart/limb in C.get_damaged_bodyparts(TRUE, TRUE, FALSE, BODYPART_ROBOTIC)) robotic_limb_damage += limb.get_damage(stamina=FALSE) @@ -220,12 +237,9 @@ treating_wounds = has_cryo_wound if(!treating_wounds) - on = FALSE - update_appearance(UPDATE_ICON) + set_on(FALSE) playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors. var/msg = "Patient fully restored." - if(robotic_limb_damage) - msg += " Remaining damage is to mechanical limbs." if(autoeject) // Eject if configured. msg += " Auto ejecting patient now." open_machine() @@ -252,13 +266,10 @@ reagent_transfer += 0.5 * delta_time if(reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker). reagent_transfer = 0 - if(air1.get_moles(/datum/gas/healium) > 1) //healium check, if theres enough we get some extra healing from our favorite pink gas. - var/existing = mob_occupant.reagents.get_reagent_amount(/datum/reagent/healium) - mob_occupant.reagents.add_reagent(/datum/reagent/healium, 1 - existing) - air1.set_moles(/datum/gas/healium, max(0, air1.get_moles(/datum/gas/healium) - 0.1 / efficiency)) + return 1 -/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos() +/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos(delta_time) ..() if(!on) @@ -267,8 +278,7 @@ var/datum/gas_mixture/air1 = airs[1] 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_appearance(UPDATE_ICON) + set_on(FALSE) return if(occupant) @@ -293,40 +303,44 @@ else air1.set_moles(/datum/gas/oxygen, max(0,air1.get_moles(/datum/gas/oxygen) - 0.5 / efficiency)) // Magically consume gas? Why not, we run on cryo magic. + if(air1.return_temperature() > 2000) + take_damage(clamp((air1.return_temperature())/200, 10, 20), BURN) + /obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user) if(message_cooldown <= world.time) message_cooldown = world.time + 50 - to_chat(user, span_warning("[src]'s door won't budge!")) + to_chat(user, "[src]'s door won't budge!") /obj/machinery/atmospherics/components/unary/cryo_cell/open_machine(drop = FALSE) if(!state_open && !panel_open) - on = FALSE - ..() + set_on(FALSE) for(var/mob/M in contents) //only drop mobs M.forceMove(get_turf(src)) - if(isliving(M)) - var/mob/living/L = M - L.update_mobility() occupant = null - update_appearance(UPDATE_ICON) + flick("pod-open-anim", src) + reagent_transfer = efficiency * 10 - 5 // wait before injecting the next occupant + ..() /obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/user) treating_wounds = FALSE if((isnull(user) || istype(user)) && state_open && !panel_open) + flick("pod-close-anim", src) ..(user) + if(isliving(occupant)) + occupant_vis.on_occupant_enter(occupant) return occupant /obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - user.visible_message(span_notice("You see [user] kicking against the glass of [src]!"), \ - span_notice("You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)"), \ - span_italics("You hear a thump from [src].")) - if(do_after(user, breakout_time, src)) + user.visible_message("You see [user] kicking against the glass of [src]!", \ + "You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)", \ + "You hear a thump from [src].") + if(do_after(user, breakout_time, target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src ) return - user.visible_message(span_warning("[user] successfully broke out of [src]!"), \ - span_notice("You successfully break out of [src]!")) + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") open_machine() /obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) @@ -347,21 +361,21 @@ if(L.incapacitated()) close_machine(target) else - user.visible_message("[user] starts shoving [target] inside [src].", span_notice("You start shoving [target] inside [src].")) - if (do_after(user, 2.5 SECONDS, target)) + user.visible_message("[user] starts shoving [target] inside [src].", "You start shoving [target] inside [src].") + if (do_after(user, 25, target=target)) close_machine(target) /obj/machinery/atmospherics/components/unary/cryo_cell/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) . = 1 //no afterattack if(beaker) - to_chat(user, span_warning("A beaker is already loaded into [src]!")) + to_chat(user, "A beaker is already loaded into [src]!") return if(!user.transferItemToLoc(I, src)) return beaker = I - user.visible_message("[user] places [I] in [src].", \ - span_notice("You place [I] in [src].")) + user.visible_message("[user] places [I] in [src].", \ + "You place [I] in [src].") var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list) log_game("[key_name(user)] added an [I] to cryo containing [reagentlist]") return @@ -372,14 +386,15 @@ update_appearance(UPDATE_ICON) return else if(I.tool_behaviour == TOOL_SCREWDRIVER) - to_chat(user, "You can't access the maintenance panel while the pod is " \ - + (on ? "active" : (occupant ? "full" : "open")) + ".") + to_chat(user, "You can't access the maintenance panel while the pod is " \ + + (on ? "active" : (occupant ? "full" : "open")) + "!") return return ..() /obj/machinery/atmospherics/components/unary/cryo_cell/ui_state(mob/user) return GLOB.notcontained_state + /obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -437,14 +452,15 @@ return data /obj/machinery/atmospherics/components/unary/cryo_cell/ui_act(action, params) - if(..()) + . = ..() + if(.) return switch(action) if("power") if(on) - on = FALSE + set_on(FALSE) else if(!state_open) - on = TRUE + set_on(TRUE) . = TRUE if("door") if(state_open) @@ -460,22 +476,30 @@ beaker.forceMove(drop_location()) if(Adjacent(usr) && !issilicon(usr)) usr.put_in_hands(beaker) - 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_appearance(UPDATE_ICON) + +/obj/machinery/atmospherics/components/unary/cryo_cell/CtrlClick(mob/user) + if(can_interact(user) && !state_open) + set_on(!on) + return ..() + +/obj/machinery/atmospherics/components/unary/cryo_cell/AltClick(mob/user) + if(can_interact(user)) + if(state_open) + close_machine() + else + open_machine() + return ..() /obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user) return // we don't see the pipe network while inside cryo. -/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user) - user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1) - /obj/machinery/atmospherics/components/unary/cryo_cell/can_crawl_through() return // can't ventcrawl in or out of cryo. /obj/machinery/atmospherics/components/unary/cryo_cell/can_see_pipes() - return 0 // you can't see the pipe network when inside a cryo cell. + return FALSE // you can't see the pipe network when inside a cryo cell. /obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature() var/datum/gas_mixture/G = airs[1] @@ -500,26 +524,4 @@ node.addMember(src) SSair.add_to_rebuild_queue(src) -/obj/machinery/atmospherics/components/unary/cryo_cell/CtrlClick(mob/user) - if(!user.canUseTopic(src, !issilicon(user))) - return - if(user == occupant && !issilicon(user)) - return - if(on) - on = FALSE - else if(!state_open) - on = TRUE - update_appearance(UPDATE_ICON) - -/obj/machinery/atmospherics/components/unary/cryo_cell/AltClick(mob/user) - if(!user.canUseTopic(src, !issilicon(user))) - return - if(user == occupant && !issilicon(user)) - return - if(state_open) - close_machine() - else - open_machine() - update_appearance(UPDATE_ICON) - -#undef CRYOMOBS +#undef MAX_TEMPERATURE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2e2025f3315f..61301244b22c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1253,7 +1253,7 @@ if(buckled.buckle_lying != -1) should_be_lying = buckled.buckle_lying - if(should_be_lying) + if(should_be_lying && !HAS_TRAIT(src, TRAIT_FORCED_STANDING)) mobility_flags &= ~MOBILITY_STAND if(buckled) if(buckled.buckle_lying != -1) diff --git a/icons/obj/cryogenics.dmi b/icons/obj/cryogenics.dmi index 114fd7a38d7954a2e5800e650d8c17c39bb521c5..bd82d4bbacee034d818ca508fb13c0e41c04ade7 100644 GIT binary patch literal 42361 zcmdqIbyO5=*N00;cS)xpB_$m)q?Aa9NF$-dfPgdu(jY0N#E_EG0#ZYxG)M@DLx@NY z&A`+deBS5#-VM^>^9$1YQeKPGYc3vG{P<&@EIvM{FH7iT z`A6)L!WnLIxu?JjWQgorIq{;wu7l68)zjbK4=e!(cIl8Z_Bz(N+-iSc5TE&-Vre;x3`l?ucl1tD3W_|q$b}kxUvHY zeyodQ-_(7YB8G|5G)~ALTZvZ3xJz4I|C3)Q{flQpiUI)?Fdf9 z;MQVhw%In%3C1Tz6~c@5#8(m@RY`?7L#S;B#4uYk2II&uj@+$9HAqfZn95X$dxZaVc7sof6he=P)%j=cf z5v*`1dQFo<4o#WDsi6BPeICt%LAzt#VJ`Y*alT)BnUxozHtgQSPtAc6qKXm~%qU^kG`M#TMM!V??S6%v~p*>$4tK{pKz2u zOSmX@>(H6-{?!aiSEd`! z#HcXFw#Vtp1q7{n8DD6@KnEdq>xTncOxlbQUe@d7zM%0o(H<3V+-*`(X1_>CfSNZs?<2`;zBovZnATIV}qYyW2#=&_ELLdhzr?yb;|>P$a9xfA_jz zjGkg7J?4(oQ%V1c0aatZ#3GmTTylT{vFVVt9OVkd;Gd>cllrM&U?&r`t7o;YJyY=@B$NlmuFxm< zx^HOSj75@wEJ;h->-#}w2Z<yNRD)`|I#>rs0(= zOi%?<`{%;$^dz62(`)t|5kJF3AY$ka!Dd}=*-=^E?|@Wq{Ez8dngHBruZ{YK47q+d zgaI^iC|?ksDnw9inf^%ULoUAWIr8mp-=jTf9KYR=;e3a=8r&DO$3$a&pVztEh!oWXvkD~SsazUkV zVVgeuWCBtshYk{24ROL{Dz&FfY~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sKzF0}dtfo*2Om8F{tO>iV#5z+ zD3BqDWWW#pjK#tb%z!UPm>dNB6Q4ut?sxyceR%{4&4tZ-Wm*Se03T&V4TUPXH^Ki8 DIOyE* From 130d2c33730f454ca83dce01f6416492e02d7eba Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Tue, 18 Jul 2023 00:02:02 -0400 Subject: [PATCH 40/50] Update cryo.dm --- .../atmospherics/machinery/components/unary_devices/cryo.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 4457d8548ec0..75e46837720e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -12,7 +12,7 @@ pixel_y = 22 appearance_flags = KEEP_TOGETHER -/atom/movable/visual/cryo_occupant/Initialize() +/atom/movable/visual/cryo_occupant/Initialize(mapload) . = ..() // Alpha masking // It will follow this as the animation goes, but that's no problem as the "mask" icon state From ab04a7f859fe6dc3e6dcca203e87d530b3e89e6d Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 19 Jul 2023 01:05:31 -0400 Subject: [PATCH 41/50] sechailer fix --- code/modules/clothing/masks/_masks.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 50910d7d8d15..105ca46b8ac4 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -45,13 +45,19 @@ var/mob/M = loc M.update_inv_wear_mask() +/obj/item/clothing/mask/update_icon_state() + . = ..() + if(mask_adjusted) + icon_state = initial(icon_state) + "_up" + else + icon_state = initial(icon_state) + //Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption /obj/item/clothing/mask/proc/adjustmask(mob/living/carbon/user) if(user && user.incapacitated()) return mask_adjusted = !mask_adjusted if(!mask_adjusted) - icon_state = initial(icon_state) gas_transfer_coefficient = initial(gas_transfer_coefficient) clothing_flags |= visor_flags flags_inv |= visor_flags_inv @@ -59,7 +65,6 @@ to_chat(user, span_notice("You push \the [src] back into place.")) slot_flags = initial(slot_flags) else - icon_state = initial(icon_state) + "_up" to_chat(user, span_notice("You push \the [src] out of the way.")) gas_transfer_coefficient = null clothing_flags &= ~visor_flags @@ -67,6 +72,7 @@ flags_cover &= ~visor_flags_cover if(adjusted_flags) slot_flags = adjusted_flags + update_appearance(UPDATE_ICON) if(!istype(user)) return // Update the mob if it's wearing the mask. From fc3319ab5d7c3cac4147fc740679e9a349b4f118 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 19 Jul 2023 05:57:58 -0400 Subject: [PATCH 42/50] Maybe fixes pitch black roundstart APCs --- code/modules/power/apc.dm | 110 ++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 59 deletions(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9037a751b00f..26b9026cbace 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -322,59 +322,9 @@ cell = best_cell W.play_rped_sound() -#define APC_UPDATE_STATE (1<<0) -#define APC_UPDATE_OVERLAYS (1<<1) - -// update the APC icon to show the three base states -// also add overlays for indicator lights -/obj/machinery/power/apc/update_icon(updates=ALL) - . = ..() +/obj/machinery/power/apc/update_icon(updates) updates = check_updates() - if(!updates) - return - - if(updates & APC_UPDATE_STATE) // Updating the icon state - if(update_state & UPSTATE_ALLGOOD) - icon_state = "apc0" - else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) - var/basestate = "apc[ cell ? "2" : "1" ]" - if(update_state & UPSTATE_OPENED1) - if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) - icon_state = "apcmaint" //disabled APC cannot hold cell - else - icon_state = basestate - else if(update_state & UPSTATE_OPENED2) - if (update_state & UPSTATE_BROKE || malfhack) - icon_state = "[basestate]-b-nocover" - else - icon_state = "[basestate]-nocover" - else if(update_state & UPSTATE_BROKE) - icon_state = "apc-b" - else if(update_state & UPSTATE_BLUESCREEN) - icon_state = "apcemag" - else if(update_state & UPSTATE_WIREEXP) - icon_state = "apcewires" - else if(update_state & UPSTATE_MAINT) - icon_state = "apc0" - - if(!(update_state & UPSTATE_ALLGOOD)) - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - - if(updates & APC_UPDATE_OVERLAYS) - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) - SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, EMISSIVE_PLANE, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, EMISSIVE_PLANE, dir) - if(operating) - SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, EMISSIVE_PLANE, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, EMISSIVE_PLANE, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, EMISSIVE_PLANE, dir) - + . = ..() // And now, separately for cleanness, the lighting changing if(update_state & UPSTATE_ALLGOOD) switch(charging) @@ -393,6 +343,52 @@ icon_update_needed = FALSE +// update the APC icon to show the three base states +// also add overlays for indicator lights +/obj/machinery/power/apc/update_icon_state() + . = ..() + if(update_state & UPSTATE_ALLGOOD) + icon_state = "apc0" + else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) + var/basestate = "apc[ cell ? "2" : "1" ]" + if(update_state & UPSTATE_OPENED1) + if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) + icon_state = "apcmaint" //disabled APC cannot hold cell + else + icon_state = basestate + else if(update_state & UPSTATE_OPENED2) + if (update_state & UPSTATE_BROKE || malfhack) + icon_state = "[basestate]-b-nocover" + else + icon_state = "[basestate]-nocover" + else if(update_state & UPSTATE_BROKE) + icon_state = "apc-b" + else if(update_state & UPSTATE_BLUESCREEN) + icon_state = "apcemag" + else if(update_state & UPSTATE_WIREEXP) + icon_state = "apcewires" + else if(update_state & UPSTATE_MAINT) + icon_state = "apc0" + +/obj/machinery/power/apc/update_overlays() + . = ..() + if(!(update_state & UPSTATE_ALLGOOD)) + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) + SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, EMISSIVE_PLANE, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, plane, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", layer, EMISSIVE_PLANE, dir) + if(operating) + SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, plane, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, EMISSIVE_PLANE, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, plane, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, EMISSIVE_PLANE, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, plane, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, EMISSIVE_PLANE, dir) + /obj/machinery/power/apc/proc/check_updates() var/last_update_state = update_state var/last_update_overlay = update_overlay @@ -453,18 +449,14 @@ update_overlay |= APC_UPOVERLAY_ENVIRON2 - var/results = NONE if(last_update_state == update_state && last_update_overlay == update_overlay) - return results + return if(last_update_state != update_state) - results ^= APC_UPDATE_STATE + results ^= UPDATE_ICON_STATE if(last_update_overlay != update_overlay) - results ^= APC_UPDATE_OVERLAYS + results ^= UPDATE_OVERLAYS return results -#undef APC_UPDATE_STATE -#undef APC_UPDATE_OVERLAYS - // Used in process so it doesn't update the icon too much /obj/machinery/power/apc/proc/queue_icon_update() icon_update_needed = TRUE From 4eb462b94b71d96c218c4c58afbf34a9369f8f4f Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 19 Jul 2023 06:02:35 -0400 Subject: [PATCH 43/50] Update apc.dm --- code/modules/power/apc.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 26b9026cbace..4268464d1769 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -451,6 +451,7 @@ if(last_update_state == update_state && last_update_overlay == update_overlay) return + var/results = NONE if(last_update_state != update_state) results ^= UPDATE_ICON_STATE if(last_update_overlay != update_overlay) From 342243082d624edf8982cd9bb36a0b75d0c50c90 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:33:42 -0400 Subject: [PATCH 44/50] yet another egun fix --- code/modules/projectiles/guns/energy.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 6b857ed468dc..2841592363ce 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -3,6 +3,7 @@ name = "energy gun" desc = "A basic energy-based gun." icon = 'icons/obj/guns/energy.dmi' + ammo_x_offset = 2 var/obj/item/stock_parts/cell/cell //What type of power cell this uses var/cell_type = /obj/item/stock_parts/cell @@ -12,7 +13,6 @@ var/can_charge = TRUE //Can it be charged in a recharger? var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_overlays? var/charge_sections = 4 - ammo_x_offset = 2 var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail var/selfcharge = 0 var/charge_timer = 0 @@ -178,6 +178,7 @@ var/overlay_icon_state = "[icon_state]_charge" if(modifystate) var/obj/item/ammo_casing/energy/shot = ammo_type[select] + . += mutable_appearance(icon, "[icon_state]_[initial(shot.select_name)]") if(cell.charge < shot.e_cost) . += "[icon_state]_empty" return From 696a0f34c31a41a383a88d48ec35c3b23325ce70 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:50:07 -0400 Subject: [PATCH 45/50] Fixes plasmamen helmets among other stuff --- code/modules/clothing/glasses/_glasses.dm | 15 +++-- code/modules/clothing/head/_head.dm | 2 +- code/modules/clothing/head/collectable.dm | 8 ++- code/modules/clothing/head/misc_special.dm | 9 +-- code/modules/clothing/spacesuits/plasmamen.dm | 56 +++++++++++-------- .../atmospherics/machinery/pipes/bluespace.dm | 11 +--- yogstation/code/modules/xenoarch/loot/guns.dm | 2 +- 7 files changed, 56 insertions(+), 47 deletions(-) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 2bae346ca5d9..1967027f554d 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -337,16 +337,19 @@ var/colored_before = FALSE /obj/item/clothing/glasses/blindfold/white/equipped(mob/living/carbon/human/user, slot) - if(ishuman(user) && slot == ITEM_SLOT_EYES) + if(ishuman(user) && slot & ITEM_SLOT_EYES) update_appearance(UPDATE_ICON) user.update_inv_glasses() //Color might have been changed by update_icon. - ..() + return ..() -/obj/item/clothing/glasses/blindfold/white/update_icon(mob/living/carbon/human/user) - . = ..() - if(ishuman(user) && !colored_before) - add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY) +/obj/item/clothing/glasses/blindfold/white/update_icon(updates=ALL) + if(!ishuman(loc)) + return ..() + var/mob/living/carbon/human/loc_human = loc + if(!colored_before) + add_atom_colour("#[loc_human.eye_color]", FIXED_COLOUR_PRIORITY) colored_before = TRUE + return ..() /obj/item/clothing/glasses/blindfold/white/worn_overlays(isinhands = FALSE, file2use) . = list() diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 31b2ded62e4a..eb43544d3797 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -18,7 +18,7 @@ H.update_hair() /obj/item/clothing/head/worn_overlays(isinhands = FALSE) - . = list() + . = ..() if(!isinhands) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet") diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 0a334fe88549..ce4fb1278211 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -109,10 +109,12 @@ 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_icon(updates=ALL) . = ..() - if(ishuman(user)) - add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) + if(!ishuman(loc)) + return + var/mob/living/carbon/human/loc_human = loc + add_atom_colour("#[loc_human.hair_color]", FIXED_COLOUR_PRIORITY) /obj/item/clothing/head/collectable/rabbitears name = "collectable rabbit ears" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 7db8c1207658..2a5b877123ee 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -148,12 +148,13 @@ if(LH.has_language(/datum/language/felinid) || LH.can_speak_language(/datum/language/felinid)) //sanity to_chat(user, "You lose the keenness in your ears.") 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_icon(updates=ALL) . = ..() - if(ishuman(user)) - add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY) + if(!ishuman(loc)) + return + var/mob/living/carbon/human/loc_human = loc + add_atom_colour("#[loc_human.hair_color]", FIXED_COLOUR_PRIORITY) /obj/item/clothing/head/kitty/genuine desc = "A pair of kitty ears. A tag on the inside says \"Hand made from real cats.\"" diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index b88d73e5aefa..0425502cbf0e 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -47,12 +47,13 @@ light_system = MOVABLE_LIGHT light_range = 4 light_on = FALSE - var/helmet_on = FALSE actions_types = list(/datum/action/item_action/toggle_helmet_light) flash_protect = 0 - var/mutable_appearance/helmet_mob_overlay - var/saved_style = null //our helmet style to apply overlay - var/pref_alteration = TRUE ///set to true if the item will be modified by player's "plasmaman helmet style pref" + var/helmet_on = FALSE + ///Boolean on whether the item will be modified by player's "plasmaman helmet style pref" + var/pref_alteration = TRUE + ///The saved preference style on the helmet. + var/helmet_pref_style /obj/item/clothing/head/helmet/space/plasmaman/attack_self(mob/user) toggle_helmet_light(user) @@ -71,36 +72,43 @@ if(!ishuman(user)) return var/style = user.dna?.features["plasmaman_helmet"] - user.cut_overlay(helmet_mob_overlay) - if(style && (style in GLOB.plasmaman_helmet_list)) - if(style == "None") - return - 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_appearance(UPDATE_ICON) - -/obj/item/clothing/head/helmet/space/plasmaman/update_icon(mob/living/carbon/human/user) + if(!style || (style == "None") || !(style in GLOB.plasmaman_helmet_list)) + return + helmet_pref_style = "enviro[GLOB.plasmaman_helmet_list[style]]" + update_appearance(UPDATE_ICON) + +/obj/item/clothing/head/helmet/space/plasmaman/update_icon(updates=ALL) . = ..() - if(!user) + if(!ismob(loc)) return - user.cut_overlay(helmet_mob_overlay) - if(saved_style) - user.add_overlay(helmet_mob_overlay) - user.update_inv_head() + var/mob/loc_mob = loc + loc_mob.update_inv_head() for(var/datum/action/A as anything in actions) A.build_all_button_icons() -/obj/item/clothing/head/helmet/space/plasmaman/equipped(mob/living/user, slot) +/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands = FALSE) + . = ..() + if(isinhands) + return + if(helmet_pref_style) + var/mutable_appearance/helmet_mob_overlay = mutable_appearance('icons/mob/clothing/head/head.dmi', helmet_pref_style) + . += helmet_mob_overlay + +/obj/item/clothing/head/helmet/space/plasmaman/update_overlays() . = ..() - if(slot != ITEM_SLOT_HEAD) - user.cut_overlay(helmet_mob_overlay) + if(!ismob(loc)) return + if(helmet_pref_style) + var/mutable_appearance/helmet_overlay = mutable_appearance('icons/obj/clothing/hats.dmi', helmet_pref_style) + . += helmet_overlay + +/obj/item/clothing/head/helmet/space/plasmaman/equipped(mob/living/user, slot) + . = ..() update_appearance(UPDATE_ICON) /obj/item/clothing/head/helmet/space/plasmaman/dropped(mob/living/user) - user.cut_overlay(helmet_mob_overlay) - . = ..() + update_appearance(UPDATE_ICON) + return ..() /obj/item/clothing/head/helmet/space/plasmaman/security name = "security envirosuit helmet" diff --git a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm index 9f9bc36031cc..1487e1ad519a 100644 --- a/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm +++ b/yogstation/code/modules/atmospherics/machinery/pipes/bluespace.dm @@ -49,20 +49,15 @@ GLOBAL_LIST_EMPTY(bluespace_pipe_networks) /obj/machinery/atmospherics/pipe/bluespace/hide() update_appearance(UPDATE_ICON) -/obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe) +/obj/machinery/atmospherics/pipe/bluespace/update_icon(updates=ALL) . = ..() underlays.Cut() var/turf/T = loc - if(level == 2 || !T.intact) - showpipe = TRUE - plane = GAME_PLANE - else - showpipe = FALSE + if(level != 2 && !!T.intact) plane = FLOOR_PLANE - - if(!showpipe) return //no need to update the pipes if they aren't showing + plane = GAME_PLANE var/connected = 0 //Direction bitset diff --git a/yogstation/code/modules/xenoarch/loot/guns.dm b/yogstation/code/modules/xenoarch/loot/guns.dm index f074e45e1256..0fd29c83886c 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_icon(updates=ALL) . = ..() var/maxcharge = cell.maxcharge var/charge = cell.charge From 94c1447b98ea42198a150bc6d4b55ac80f0969d1 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:56:51 -0400 Subject: [PATCH 46/50] Fixes canisters for good --- code/modules/atmospherics/machinery/portable/canister.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 955027286ad3..4b56e08552e7 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -314,6 +314,8 @@ ///return the icon_state component for the canister's indicator light based on its current pressure reading /obj/machinery/portable_atmospherics/canister/proc/get_pressure_state(air_pressure) + if(air_pressure < 10) + return null switch(air_pressure) if((9100) to INFINITY) return "can-oF" From 85dfe9334655e6371e1c81babb8beb9dfa648d47 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:06:25 -0400 Subject: [PATCH 47/50] Fixes booze dispensers --- .../modules/reagents/chemistry/machinery/chem_dispenser.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 1888d3fb269e..d3d6176835d8 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -27,7 +27,6 @@ var/amount = 30 var/recharge_amount = 10 var/recharge_counter = 0 - var/mutable_appearance/beaker_overlay var/working_state = "dispenser_working" var/nopower_state = "dispenser_nopower" var/has_panel_overlay = TRUE @@ -136,7 +135,7 @@ recharge_counter += delta_time /obj/machinery/chem_dispenser/proc/display_beaker() - var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker") + var/mutable_appearance/b_o = mutable_appearance(icon, "disp_beaker") b_o.pixel_y = -4 b_o.pixel_x = -7 return b_o @@ -154,7 +153,7 @@ if(has_panel_overlay && panel_open) . += mutable_appearance(icon, "[initial(icon_state)]_panel-o") if(beaker) - beaker_overlay = display_beaker() + var/mutable_appearance/beaker_overlay = display_beaker() . += beaker_overlay /obj/machinery/chem_dispenser/emag_act(mob/user) @@ -482,7 +481,7 @@ update_appearance(UPDATE_ICON) // 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") + var/mutable_appearance/b_o = mutable_appearance(icon, "disp_beaker") switch(dir) if(NORTH) b_o.pixel_y = 7 From 865dedb2c6e05c37ed9e70e7f0c7d1602e48c158 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:27:04 -0400 Subject: [PATCH 48/50] Fixes new icon updates people added --- code/datums/components/storage/storage.dm | 1 + code/game/objects/items/airlock_painter.dm | 33 +++++++++---------- code/game/objects/items/robot/robot_items.dm | 4 +-- .../components/unary_devices/cryo.dm | 2 +- .../components/unary_devices/thermomachine.dm | 4 +-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 9b8fbc896533..56d1de824a28 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -689,6 +689,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) viewing.show_message(span_notice("[M] puts [I] [insert_preposition]to [parent]."), MSG_VISUAL) /datum/component/storage/proc/update_icon() + SHOULD_CALL_PARENT(TRUE) if(isobj(parent)) var/obj/O = parent O.update_appearance(UPDATE_ICON) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index 75238af1df16..b2e7fb5d761f 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -50,13 +50,13 @@ . = ..() ink = new initial_ink_type(src) -/obj/item/airlock_painter/update_icon() +/obj/item/airlock_painter/update_icon_state() . = ..() var/base = initial(icon_state) - if(!istype(ink)) + if(!ink || !istype(ink)) icon_state = "[base]_none" return - switch(ink.charges/ink.max_charges) + switch(ink.charges / ink.max_charges) if(0.001 to PAINTER_LOW) icon_state = "[base]_low" if(PAINTER_LOW to PAINTER_MID) @@ -76,7 +76,7 @@ /obj/item/airlock_painter/proc/use_paint(mob/user) if(can_use(user)) ink.charges-- - update_icon() + update_appearance(UPDATE_ICON) playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE) return TRUE else @@ -163,28 +163,27 @@ /obj/item/airlock_painter/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/toner)) - if(ink) - to_chat(user, span_warning("[src] already contains \a [ink]!")) - return - if(!user.transferItemToLoc(W, src)) - return - to_chat(user, span_notice("You install [W] into [src].")) - ink = W - update_icon() - playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) - else + if(!istype(W, /obj/item/toner)) return ..() + if(ink) + to_chat(user, span_warning("[src] already contains \a [ink]!")) + return + if(!user.transferItemToLoc(W, src)) + return + to_chat(user, span_notice("You install [W] into [src].")) + ink = W + playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) + update_appearance(UPDATE_ICON) /obj/item/airlock_painter/AltClick(mob/user, obj/item/W) . = ..() if(ink) - playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) + playsound(loc, 'sound/machines/click.ogg', 50, TRUE) ink.forceMove(user.drop_location()) user.put_in_hands(ink) - update_icon() to_chat(user, span_notice("You remove [ink] from [src].")) ink = null + update_appearance(UPDATE_ICON) /obj/item/airlock_painter/decal name = "decal painter" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 3c2f4729fdaa..5f7127d3a118 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -780,7 +780,7 @@ if(!silent) to_chat(usr, span_notice("You drop the [wrapped].")) wrapped = null - update_icon() + update_appearance(UPDATE_ICON) return TRUE return FALSE @@ -790,7 +790,7 @@ to_chat(usr, span_notice("You collect \the [item].")) item.loc = src wrapped = item - update_icon() + update_appearance(UPDATE_ICON) /obj/item/gripper/pre_attack(atom/target, mob/living/silicon/robot/user, params) var/proximity = get_dist(user, target) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 75e46837720e..6a83acd81b7c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -166,7 +166,7 @@ beaker.forceMove(drop_location()) beaker = null -/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() +/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon(updates=ALL) . = ..() plane = initial(plane) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 9ed22b4073af..9a6d2231040b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -30,7 +30,7 @@ . = ..() initialize_directions = dir RefreshParts() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/thermomachine/proc/swap_function() cooling = !cooling @@ -44,7 +44,7 @@ icon_state_open = "heater-o" target_temperature = T20C RefreshParts() - update_icon() + update_appearance(UPDATE_ICON) /obj/machinery/atmospherics/components/unary/thermomachine/on_construction() var/obj/item/circuitboard/machine/thermomachine/board = circuit From 8086c0068f0fe317f563bae55406a352356971db Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:53:50 -0400 Subject: [PATCH 49/50] Probably fixes ballistic guns --- code/modules/projectiles/guns/ballistic.dm | 71 +++++++--------------- 1 file changed, 22 insertions(+), 49 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index bff3ce2a8dea..89c535d2dd18 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -120,53 +120,6 @@ max_attachments = 4 recoil = 0.3 -/obj/item/gun/ballistic/proc/feedback(type) // checks to see if gun has that feedback type enabled then commences the animation - if(feedback_types[type]) - feedback_commence(type, feedback_types[type]) - -/obj/item/gun/ballistic/proc/feedback_commence(type,frames) - if(type && frames) - cut_overlays() - if (suppressed) - add_overlay("[icon_state]_[suppressed.icon_state]") - if(type == "fire") - if(!chambered) - return - if (magazine) - if (special_mags) - add_overlay("[icon_state]_mag_[initial(magazine.icon_state)]") - if (!magazine.ammo_count()) - add_overlay("[icon_state]_mag_empty") - else - add_overlay("[icon_state]_mag") - var/capacity_number = 0 - switch(get_ammo() / magazine.max_ammo) - if(0.2 to 0.39) - capacity_number = 20 - if(0.4 to 0.59) - capacity_number = 40 - if(0.6 to 0.79) - capacity_number = 60 - if(0.8 to 0.99) - capacity_number = 80 - if(1.0) - capacity_number = 100 - if (capacity_number) - add_overlay("[icon_state]_mag_[capacity_number]") - 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_appearance(UPDATE_ICON) - return - if (bolt_type == BOLT_TYPE_LOCKING) - if(type != "slide*") - add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") - if(type == "slide_close") // cause the gun to move clockwise if slide is closed - 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_appearance(UPDATE_ICON) - /obj/item/gun/ballistic/Initialize(mapload) . = ..() feedback_original_icon_base = icon_state @@ -186,7 +139,27 @@ magazine = new starting_mag_type(src) chamber_round() update_appearance(UPDATE_ICON) - + +/obj/item/gun/ballistic/proc/feedback(type) // checks to see if gun has that feedback type enabled then commences the animation + if(feedback_types[type]) + feedback_commence(type, feedback_types[type]) + +/obj/item/gun/ballistic/proc/feedback_commence(type, frames) + if(!type || !frames) + return + update_appearance(UPDATE_OVERLAYS) + if(type == "fire") + 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) + else if(bolt_type == BOLT_TYPE_LOCKING) + if(type != "slide*") + add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") + if(type == "slide_close") // cause the gun to move clockwise if slide is closed + DabAnimation(speed = feedback_recoil_speed, angle = ((rand(20,25)) * feedback_recoil_amount), direction = 2) + if(type != "fire") + add_overlay("[feedback_original_icon_base]_[type]") // actual animation + sleep(frames) + update_appearance(UPDATE_OVERLAYS) /obj/item/gun/ballistic/update_icon_state() if(QDELETED(src)) @@ -211,7 +184,7 @@ . += "[icon_state]_[enloudened.icon_state]" if(!chambered && empty_indicator) . += "[icon_state]_empty" - if (magazine) + if (magazine && chambered) if (special_mags) . += "[icon_state]_mag_[initial(magazine.icon_state)]" if (!magazine.ammo_count()) From 6cc55db9d61294212d2408e2665f53d5f559eb96 Mon Sep 17 00:00:00 2001 From: JohnFulpWillard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 21 Jul 2023 18:30:27 -0400 Subject: [PATCH 50/50] i give up lol --- code/modules/projectiles/guns/ballistic.dm | 66 +++++++++++-------- .../projectiles/guns/ballistic/automatic.dm | 4 ++ .../projectiles/guns/ballistic/pistol.dm | 1 + 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 89c535d2dd18..10e7e985b1c1 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -45,6 +45,8 @@ ///whether empty alarm sound varies var/empty_alarm_vary = TRUE + ///Hides the bolt icon. + var/show_bolt_icon = TRUE ///Whether the gun will spawn loaded with a magazine var/spawnwithmagazine = TRUE ///Compatible magazines with the gun @@ -152,14 +154,12 @@ 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) else if(bolt_type == BOLT_TYPE_LOCKING) - if(type != "slide*") - add_overlay("[icon_state]_bolt[bolt_locked ? "_locked" : ""]") if(type == "slide_close") // cause the gun to move clockwise if slide is closed DabAnimation(speed = feedback_recoil_speed, angle = ((rand(20,25)) * feedback_recoil_amount), direction = 2) if(type != "fire") add_overlay("[feedback_original_icon_base]_[type]") // actual animation sleep(frames) - update_appearance(UPDATE_OVERLAYS) + update_appearance(UPDATE_OVERLAYS) /obj/item/gun/ballistic/update_icon_state() if(QDELETED(src)) @@ -174,37 +174,47 @@ if(QDELETED(src)) return . = ..() - if (bolt_type == BOLT_TYPE_LOCKING) - . += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]" - if (bolt_type == BOLT_TYPE_OPEN && bolt_locked) - . += "[icon_state]_bolt" + if(show_bolt_icon) + if (bolt_type == BOLT_TYPE_LOCKING) + . += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]" + if (bolt_type == BOLT_TYPE_OPEN && bolt_locked) + . += "[icon_state]_bolt" + if (suppressed) . += "[icon_state]_[suppressed.icon_state]" if (enloudened) . += "[icon_state]_[enloudened.icon_state]" + if(!chambered && empty_indicator) . += "[icon_state]_empty" - if (magazine && chambered) - if (special_mags) - . += "[icon_state]_mag_[initial(magazine.icon_state)]" - if (!magazine.ammo_count()) - . += "[icon_state]_mag_empty" - else - . += "[icon_state]_mag" - var/capacity_number = 0 - switch(get_ammo() / magazine.max_ammo) - if(0.2 to 0.39) - capacity_number = 20 - if(0.4 to 0.59) - capacity_number = 40 - if(0.6 to 0.79) - capacity_number = 60 - if(0.8 to 0.99) - capacity_number = 80 - if(1.0) - capacity_number = 100 - if (capacity_number) - . += "[icon_state]_mag_[capacity_number]" + + if(!magazine || internal_magazine || !mag_display) + return + + if(special_mags) + . += "[icon_state]_mag_[initial(magazine.icon_state)]" + if(mag_display_ammo && !magazine.ammo_count()) + . += "[icon_state]_mag_empty" + return + + . += "[icon_state]_mag" + if(!mag_display_ammo) + return + + var/capacity_number = 0 + switch(get_ammo() / magazine.max_ammo) + if(1 to INFINITY) //cause we can have one in the chamber. + capacity_number = 100 + if(0.8 to 1) + capacity_number = 80 + if(0.6 to 0.8) + capacity_number = 60 + if(0.4 to 0.6) + capacity_number = 40 + if(0.2 to 0.4) + capacity_number = 20 + if (capacity_number) + . += "[icon_state]_mag_[capacity_number]" /obj/item/gun/ballistic/process_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE) diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 6c59ac5d096a..d246d592991d 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -23,6 +23,7 @@ pin = null bolt_type = BOLT_TYPE_LOCKING mag_display = TRUE + show_bolt_icon = FALSE /obj/item/gun/ballistic/automatic/proto/unrestricted pin = /obj/item/firing_pin @@ -113,6 +114,7 @@ burst_size = 2 bolt_type = BOLT_TYPE_OPEN mag_display = TRUE + show_bolt_icon = FALSE rack_sound = "sound/weapons/pistollock.ogg" /obj/item/gun/ballistic/automatic/m90 @@ -204,6 +206,7 @@ spread = 30 fire_delay = 1 bolt_type = BOLT_TYPE_OPEN + show_bolt_icon = FALSE /obj/item/gun/ballistic/automatic/ar name = "\improper NT-ARG 'Boarder' Rifle" @@ -238,6 +241,7 @@ bolt_type = BOLT_TYPE_OPEN mag_display = TRUE mag_display_ammo = TRUE + show_bolt_icon = FALSE tac_reloads = FALSE automatic = TRUE fire_sound = 'sound/weapons/rifleshot.ogg' diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index 2c1950738697..fe64aa0ce3da 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -91,6 +91,7 @@ feedback_types = list( "fire" = 2 ) + show_bolt_icon = FALSE /obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user) SHOULD_CALL_PARENT(FALSE)