About The Pull Request
Similar to #46485
Now all relevant uses of power_change() call parent, theres a signal sent when a machine changes the NOPOWER flag, all remaining machines that were using power_change() instead of update_icon() have been fixed.
Why It's Good For The Game
code quality, eventually signal stuff. and signal stuff
About The Pull Request
I ended up just rewriting propagation logic entirely. This needs a bit of cleanup but this is a really high priority fix.
Actually tested this time. I can confirm for sure this is working in all situations that were previously broken.
Closes#44940Closes#44936Closes#44935Closes#44929
Why It's Good For The Game
I fucked up bad
Changelog
cl
fix: cables now actually function again (I'm so sorry)
/cl
Cables now autoconnect on cardinal directions. All cable placement has been completely stripped out and replaced with simple single cable per tile logic.
Low effort demo: https://www.youtube.com/watch?v=fXp8s6ORWbA
Yes I am aware that cutting it is not dropping wire, that version was bugged.
Cables no longer need a knot specifically placed to link to power objects. The sprite is automatically changed to represent this.
The only exception to this logic is that on smes units, due to the terminal being next to the output, they will not link there.
On a technical powernet side, this is the same as old cables once actually placed. They still use the existing powernet system, just the placement and connection works differently.
Old cables have been turned into "pipe cleaners" for wire art purposes. they work just like the old ones, just missing all the powernet functionality, and also you can put them on top of the floor.
Why It's Good For The Game
How obnoxious cables were to both map and work with in game has been something that has annoyed me for a really long time now.
This is both easier for new players to learn, and easier for experienced players to work with.
Along with making in game much more intuitive and easier, it makes mapping much easier as well. Mad lad wjohn was able to rip out all the mapping conversion in one day because of how much faster it is to work with.
cl actioninja and wjohn
add: Cables have been completely reworked. Simple per tile connection logic, automatically connects to things above it. Think minecraft redstone.
add: Old cables have been kept as pipe cleaner. They are non-functional in terms of power, but otherwise have the same connection logic. Also can go on top of tiles.
remove: mech cable layer has been removed because it was terrible shitcode nobody used
tweak: (sort of balance) cable stack sized has been reduced to 15.
/cl
* SMES can no longer output to nowhere, removed duplicate proc used in input.
* Forgot an else.
* TRUE and FALSE.
* add_avail() now returns true when appropriate.
* Refactor several log lines to use datum_info_line and atom_loc_line
* Add default return strings from datum_info_line and atom_loc_line
* Add parentheses around atom_loc_line data
* Change more logs to use atom_loc_line
* Add check in atom_loc_line for turfs to avoid calling get_turf on them
* Re-add removed 'at'
* Replace datum_info_line with key_name and atom_loc_line with loc_name
* Refactor logging functions
* Avoid double-logging self-interactions
* Fallback to simple stringification if all else fails in key_name()
* Rewrite muscle spasm logging to use log_message
* Standardize logging of martial arts
* Tweak individual logging panel look
* Fix individual logging panel source
* When I typed || I really meant &&
* Fix Telecomms logging always showing client logs in the panel
* Reverts addition of buggy ownership log to panel
* Remove colon
* Fix missing log_directed_talk tag
* Add warning for missing type in log_direted_talk
* Change warnings to stack_traces
* Add square brackets around fallthrough key_name() case to help parsing
* Allow atom arguments/src in log_*() functions
* Change log_combat call with null argument to log_message
* Change mecha types' log_message() arguments to match atom and mob version
* Add key_name() case for atoms
* Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it
* Fix log_globally logic
* Add logging for hitting objects with items
* Move log_combat() to atoms.dm
* Use utility functions for object stringification in log_combat()
* Use utility functions for object stringification in log_combat()
* Add missing logs for interacting with display cases
* Rewrite log_combat() comment
* Add missing space in log_combat()
* Add logging for hitting grilles barehanded
* Add missing ..()
* It works, but is it worth it?
* bitfield helpers take 1
* Would this work?
* remove dangling debug code
* rebase & fixes
* vv bitfield stuff, reading
* DNM oceans of shitcode DNM
* honk
* honk2
* plonk
* rebase & fix
* Add the system for managed global variables
* Travis ban old globals
* So you CAN inline proccall, that's neat
* Fix that
* master.dm
* Remove the hack procs
* Move InitGlobals to the proper spot
* configuration.dm
* Fix the missing pre-slash
* clockcult.dm
* This is probably for the best
* Doy
* Fix shit
* Rest of the DEFINES tree
* Fix
* Use global. for access
* Update find_references_in_globals
Always hated that proc
Whoever made it must've bee a r e a l idiot...
* __HELPERS tree
* Move global initialization to master.
Fix the declaration
* database.dm
* Dat newline
* I said DECLARATIVE order!
* Here's something you can chew on @Iamgoofball
* game_modes.dm
* Fix this
* genetics.dm
* flavor_misc.dm
* More stuff
* Do it mso's way. Keep the controllers as global
* Make master actually see it
* Fix
* Finish _globalvars/lists
* Finish the rest of the _globalvars tree
* This is weird
* Migrate the controllers
* SLOTH -> GLOB
* Lighting globals
* round_start_time -> ticker
* PAI card list -> pai SS
* record_id_num -> static
* Diseases list -> SSdisease
* More disease globals to the SS
* More disease stuff
* Emote list
* Better and better
* Bluh
* So much stuff
* Ahh
* Wires
* dview
* station_areas
* Teleportlocs
* blood_splatter_icons
* Stuff and such
* More stuff
* RAD IO
* More stuff and such
* Blob shit
* Changeling stuff
* Add "Balance" to changelogs
* Balance for changelog compiler + Auto Tagging
* Update the PR template
* hivemind_bank
* Bip
* sacrificed
* Good shit
* Better define
* More cult shit
* Devil shit
* Gang shit
* > borers
Fix shit
* Rename the define
* Nuke
* Objectives
* Sandbox
* Multiverse sword
* Announce systems
* Stuff and such
* TC con
* Airlock
* doppllllerrrrrr
* holopads
* Shut up byond you inconsistent fuck
* Sneaky fuck
* Burp
* Bip
* Fixnshit
* Port without regard
* askdlfjs;
* asdfjasoidojfi
* Protected globals and more
* SO MANY
* ajsimkvahsaoisd
* akfdsiaopwimfeoiwafaw
* gsdfigjosidjfgiosdg
* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!
* facerolll
* ASDFASDFASDF
* Removes the unused parts of dmm_suite
* WIP
* Fix quote
* asdfjauwfnkjs
* afwlunhskjfda
* asfjlaiwuefhaf
* SO CLOSE
* wwwweeeeeewwwww
* agdgmoewranwg
* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?
* Fix syntax errors
* 100 errors
* Another 100
* So many...
* Ugh
* More shit
* kilme
* Stuuuuuufffff
* ajrgmrlshio;djfa;sdkl
* jkbhkhjbmjvjmh
* soi soi soi
* butt
* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING
* lllllllllllllllllllllllllllllllllllllllllll
* afsdijfiawhnflnjhnwsdfs
* yugykihlugk,kj
* time to go
* STUFFF!!!
* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!
* ngoaijdjlfkamsdlkf
* Break time
* aufjsdklfalsjfi
* CONTROL KAY AND PRAY
* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* Goteem
* Fix testing mode
* This does not belong in this PR
* Convert it to a controller
* Eh, fuck this option
* Revert controllerization Ill do it some other time
* Fix
* Working controllerization
* FOR THE LOVE OF CHRIST PROTECT THE LOGS
* Protect admins and deadmins
* Use the inbuilt proc
* a very calming act
when the world is too much, too fast
* i'm tired
but i have to be efficient, infinite
* lick your lips at the sight of me
a fantasy made reality
* Replaces a bunch of istypes with their proper macros
* i'm not sure doing a 100+ file changed pr on a whim is something you do when bored
especially if you do it by hand because you never actually learned the regex that would let you automate it
* i'm just... gonna do this, because that check was true a lot and it shouldn't matter
* Messages in a mob's say_log var are now timestamped and include the coordinates of the mob at the time.
* Fix oil slime extract explosion reaction not being logged.
* Fixes lack of log for reagent explosion.
* Mob's attack_log now show when the mob was electrocuted. Doors get an electrification log when electrified (including via an EMP).
* Fixes gibself admin log showing null instead of the key.
These are the files with just tiny tweaks. Mostly modify an object's attackby so it does "return ..()" instead of "..()".
If there are other things in this commit, the PR's description will explain them.
MC:
No longer tracks a subsystem's cpu usage. This was basically worthless and took up space on the stat panel
Can calculate wait down to a tenth of a decisecond to make it fps/world.ticklag agnostic
Now allows subsystems to have a dynamic wait, that is based on a ratio of how long that subsystem has been taking to process(cost). (This system allows for upper and lower bounds, and an changeable cost delta for each subsystem)
MC can now be told to init a zlevel
All Subsystems:
Stats panel now allows child subsystems to pass it a message to add to its stats entry. All subsystems have been moved over to this system - This should cut down on subsystems having to copy and paste the stats proc in order to add to it
All subsystems now properlly handle being given a zlevel in their init proc
Subsystem changes:
Air:
Added air to the dynamic wait subsystem. upper bound: 50, lower bound: 5, cost delta: 3 times process cost
Air now fires 4 times faster when it can do so without lagging things up
Pipenet has been merged into air
Atmos machinery now processes with process_atmos(), ticked by air, not machinery.
Hotspots (the fire object) are now object pooled
Pipenet:
Deleted, added to air
Machinery:
Moved all atmos calcualtions in all objects's process() to process_atmos().
Lighting:
Added Lighting to the dynamic wait subsystem. upper bound: 20, lower bound: 5, cost delta: 3 times process cost
Ticker:
Fixed ticker not updating the lobby panel when game start delayed
Fixed the game start timer updating rapidly from queued fires when game start delay is removed
Garbage/qdel:
qdel will now limit its process time to 2ds a fire.
qdel can now be given hints as a return to Destroy() as to what should be done with the object.
the options are:
queue: (default) this is the normal behavior.
letmelive: old default to non-null/zero. does nothing with the object
iwillgc: functionally the same as above, mainly to let people working with objects know that the object will not be queued for GC checking
harddel: this will queue the object to be deleted without storing a soft reference, mainly to save locate() processing time.
harddel_now: this will del() the object. To allow for a clean removal of every del() not in qdel
All objects have been updated to the new system, harddel and iwillgc was not added to any new objects.
Fixed some objects not GCing because they didn't properlly clear references in Destory()
Fixed some objects getting qdel'ed preventing other objects from getting GCed because they did not null their reference to that object.
Misc:
+Fixes unreported issue with initializing lighting on a specific zlevel
+Fixes two similar issues with moveElement and moveRange. Where fromIndex or toIndex could be adjusted incorrectly in certain conditions. Potentially causing bad-sorts, or out of bound errors.
+Rewrites listclearnulls(list/L) to no longer iterate through L.len elements for every null in the list (plus 1). i.e. went from L.len*(number_of_nulls+1) list-element reads (best-case), to L.len list-element reads (worst-case)
+New proc/getElementByVar(list/L, varname, value) which finds the first datum in a list, with a variable named varname, which equals value. You can also feed it atoms instead of lists due to the way the in operator functions.
+Fixes an unreported issue with Yota's list2text rewrite. Under certain conditions, the first element would not be converted into a string. Causing type-mismatch runtimes.
+New global map_ready variable. This is not fully implemented yet, but will be used to avoid duplicate calls to initialize() for map objects.
+All turfs now maintain references to all lights currently illuminating them. This will mean higher memory use unfortunately, due to the huge number of turfs. However, it will speed up updateAffectingLights significantly. I've used list husbandry to reduce baseline memory usage, so it shouldn't be any worse than some past atmos modifications memory-wise.
-Removed 'quadratic lighting', can add this back at some point. Sorry.
+modified the way lum() works slightly, to allow turfs to have overridden delta-lumen. i.e. space cannot be illuminated more than its default ambiance. This allowed removal of some iffy special-snowflake lighting areas implemented by somebody else.
+Lighting images in the dmi can now use arbitrary naming schemes. It is reliant on order now. This allows the dmi to be replaced by simply dropping in a new dmi.
-Removed all subtypes of /area/shuttle. Shuttles now create duplicate 'rooms' of /area/shuttle. (More on this later). This will conflict with most maps. Guide on how to fix to follow.
+All verbs/tools relating to world.tick_lag were refactored to use world.fps. However old config text for setting tick_lag will still work (it converts the value to fps for you)
+MC stats improved using smoothing. They now have their own tab so they dont get in the way when you're playing as an admin.
-removed the push_mob_back stuff due to conflicting changes. Sorry Giacom.
_OK, NOW THE ACTUAL INTERESTING STUFF_
Following systems moved over to subsystem datums:
air_master
garbage_manager
lighting_controller
process_mobs (aka Life())
nanomanager
power
sun
pipenets
AFK kick loops
shuttle_controller (aka emergency shuttle/pods), supply_shuttle and other shuttles
voting
bots
radio
diseases
events
jobs
objects
ticker
Subsystems hooks and variables should be commented fairly in-depth. If anything isn't particularly clear, please make an issue.
Many system-specific global variables have been refactored into
All tickers which previously used world.timeofday now use world.time
some subsystems can iterate before round start. this resolves the issue with votes not working pregame
This commit removes lights from the process list, about 500 of them on the current map.
The purpose of this is to reduce lag from the master controller ticker.