lighting removed from dewait because lag checks are better for it and lag checked subsystems that are also dwait systems are given lower priority, we don't want that to happen to lighting.
This setup allows subsystems to pause themselves until next mc fire if they are about to go over a tick, and resume on the next mc tick
It also makes it so we prioritize running subsystems we skipped because there wasn't enough time in the current tick to run them based on their avg tick usage. (as well as subsystems paused mid way thru)
Adds a macro for adding this to non-mc procs. just drop it in the loop. There is a define version as well for if checks if you want to know if you just slept to avoid lag.
This is all inside #if DM_VERSION defines, so once i test that 509 still works to compile/test this should be good to merge
* Fixes SNPCs still healing people
* SNPCs now use similar speech handling to Poly, and will mimic phrases in addition to their usual speech
* SNPCs can now be spawned as traitors, and given a special role.
* Greytide SNPCs now wear assistant outfits
* Certain jobs are now restricted to their area (can be toggled with restrictedJob)
* SNPCs start with a minor variation in stats
* Bartender SNPCs should now appropriately serve people
* Chef SNPC workflow redone, they will now prioritise preparing food over making it, and should serve more food to tables
* Third attempt at fixing infighting
* SNPCs should no longer repeatedly stun a target
* Friendly SNPCs now no longer have a combat module, and they are the station's faction
* NPCPool will routinely trim orders from it, reducing the amount of order ping-pong
Makes a number of changes and tweaks to SNPCs to make them work better in general.
* NPCPool now automatically clears nulls from its list (badminnery, singulo, gibbing etc)
* NPCs now correctly update their eyes when delegating
* NPCs will blacklist items they deem unusable (currently only empty guns)
* Augmentation chance is now singular instead of recursive
* NPCs support favoured types, which they will use above others when equipping, fighting and looting
* Renamed the non-descript "isnotfunc" to "IsDeadOrIncap"
* enforce_hands() now ensures the held items are still held by the npc (no more floaty items and ghostly guns)
* take_to_slot() now supports taking to hands directly
* NPCs will now appropriately dress themselves
* Interest/Timeout rates tweaked to create smoother transitions between states
* NPC choice system moved from prob to switch to create more activity
* NPCs now have a basic pathfinding system that should work (in most cases)
* Shitcurity NPCs now use any restraints, not just handcuffs
* NPCs spawned with the janitor job will now do some basic janitorial duties
* NPCs priorities in terms of weapons and held objects have been completely rebalanced
* NPCs will now appropriately equip, fire and discard guns.
* NPCs using guns will attempt to maintain a range instead of shooting point blank
* NPCs doorscan now uses all directions to improve mobility
* NPCs doorscan places the NPC in the door instead of attempting to path to it.
Sometime last year sec officers lost one of the two pairs of cuffs they started with (I think its when the adv taser was added on spawn, cuffs used to be in the armor slot and were replaced by the taser but never placed anywhere else)
Seeing as cuffs are the only thing stopping sec officers beating the clown to death, I'm readding them.
I've also done a general clean up on sec lockers, removing the extra standard headset (why the f weren't these just replaced by the bowmans in the first place?), and stuffed the locker contents into the sec belts - because fuck the RSI inducing clickfest that is gearing up.
Reordered some of the contents of lockers, again for less repetitive clicks.
Gave the HoS a proper stun baton (I've notice most HoS's pinch a spare one from an officer's locker).
Swapped the detectives collapsible baton for a classic baton, seeing as they're as shit as collapsible batons now and fit the detective's film noir look better. Also gave him some pepperspray because its terrible enough for him to use.
:CL: Malkevin
tweak: Sec officers have two sets of cuffs again (one on spawn, one in locker)
tweak: Done some optimisation of sec spawn equipment lists and lockers to remove some of the repetitive clicking, sec belts are now preloaded with equipment.
tweak: HoS has a full baton instead of the collapsible one
tweak: Detective has a classic police baton and pepper spray instead of the collapsible baton (some made police batons shit, so don't get overly happy)
bugfix: pop scaled additional lockers spawned were the wrong type, changed them to the right type which has batons now.
/:CL:
so lummox knows about this, he thinks it's an icon's internal storage not getting properly freed until the proc ends, but we haven't narrowed it down, other then that Blend() is the cause.
The way it did it here was weird and i think it caused the bug because it would check the ask time + 600 and that would wrap around.
I don't know for sure if that's the cause of the bug, but this is an improvement none the less.
This basically ensures that soft deletion happening is slowed down over time if too much is getting deleted, and that hard deletes are delayed for more quiet ticks
- I renamed some vars of datum/hud to be more selfexplanatory
- Moved all datum/hud mob code into the hud folder.
- fixed alien's zone selection button not using the correct sprites.
- I removed the update_hud() proc (that needed to be removed).
- Fixed a typo in /mob/living/carbon/ContractDisease , using "internals" instead of "internal" (very different things)
- Fixed doTeleport() calling Entered() twice on the destination area.
- To reference a mob's selected zone, you now use a direct mob var ("H.zone_selected" instead of "H.zone_sel.selecting")
- mobs lose certain screen objects var ("healths", "zone_sel", "internals", etc) which are now vars of the mob's datum/hud instead.
- the Blind spell is now done via the blind mutation instead of the blind disabilities.
- Give to mobs a version of forceMove(), so the mob is always properly unbuckled, his pull stopped, his vision updated, etc.
- The "user" var of mob/camera/aiEye/remote is renamed to "eye_user" to avoid confusion.
- reset_view() is replaced by reset_perspective(). Now all changes to client.eye and client.perspective are done with this proc.
- I reworked /obj/machinery/computer/security code, changing camera is instantaneous now, as well as cancelling.
- I reworked /obj/machinery/computer/camera_advanced code as well.
- I changed /obj/item/mecha_parts/mecha_equipment/mining_scanner's meson view to be constant instead of by intermittent.
- Fixes not being able to use /obj/item/device/camera_bug while buckled.
- removed admin_forcemove() proc, admin force moving now uses forceMove() simply.
- Removed the client var "adminobs"
- Added var/vision_correction to glasses.
- Added a thermal_overload() proc for glasses, to remove copypasta in emp_act code.
- Remove the hal_crit mob var
- We no longer delete the mob's hud everytime he logs in.
- Added a stat == dead check in mob's metabolize() so we immediately stop metabolizing if one of the chem kills the mob.
- Being inside disposal bin lowers your vision, like wearing a welding helmet.
- removed the remote_view mob var.
- I changed advanced camera EYE, some fixes, removed unnecessary code when the eye moves, now the mob client eye properly follows the camera mob.
- fixes mob var "machine" not being nullified on logout.
- larva/death() was calling two "living_mob_list -= src"
- I made the Blind screen objects into a global_hud instead of giving one to each mob (like damage overlay).
- I untied tint and eye_blind, TINT_BLIND doesn't give you eye_blind=1.
- gave a visual overlay when inside locker (vimpaired)
- when inside disposal/gas pipes you get sight |= (BLIND|SEE_TURFS)
- glasses toggling updates (atmos meson toggle): DONE
- The new adjust procs serve to properly change eye_blind etc and call vision update procs when needed.
- I added an on_unset_machine() proc to handle perspective reset for camera consoles.
- I moved consequences of eye_check fail inside eye_check() procs themselves.
- I fixed vision updates being fucked by forceMove, especially pipe vision.
- I decided that damage overlay not appearing when dead.
- mob's hud_used is no longer deleted on each login()
- I refactored mob huds a bit, creating subtypes for each mob (/datum/hud/human)
- f12's hud toggling is now available to all mobs
- gave borgs a low_power_mode var so unpowered borg do not use stat= UNCONSCIOUS (which made things weird since you were unconscious but not blind)
- Fixed double Area entering when forced teleporting.
- I fixed larva pulling not being broken when cuffing them, and larva not seeing handcuff alert (and they can resist by clicking it)
- I removed pull updates from life() since it onyl checked for puller's incapacitation.
- I renamed camera/deactivate() to toggle_cam() to be more accurate.
- I fixed mmi brain being immortal (by removing the brain and putting it back)
- I simplified mmi brain emp damage.