Commit Graph

128 Commits

Author SHA1 Message Date
Emmett Gaines
328fc7b1f1 Adds elements: Lightweight shared components/Global components (#44817)
If you came here thinking this was some game feature then you are in the wrong place. Here is where I ramble about code.

This adds /datum/element as a sort of sibling to components. Only one of each type gets instanced and they do not get tied directly to any particular thing like a component does. Basically they're a very lightweight component for doing simple functionality that doesn't have much state.

Originally this concept came about as a kind of component that could be shared between many parents to reduce some resource costs. Doing this would allow us to componentize more behaviors that are a part of too many things to be viable to have a whole component for every single one. For example a component on every space turf would be entirely unviable. With elements it's much more reasonable.

This implements a prety bare framework and a couple components are migrated to it. It's ready to be used but I fully expect I'm going to need to refine how it works for all the usecases we'll want it for.

Also: this fixes the qdeleted signal. This signal isn't even possible because after qdel is done there's nothing to receive a signal anyway. I've changed it to a qdeling signal instead. I need it to work for some elements to know when to clean themselves up.
2019-07-09 11:26:51 +12:00
Kyle Spier-Swenson
397d8473d2 Remove unneeded check 2018-08-24 22:45:51 -07:00
Kyle Spier-Swenson
36a1572eab Remove the prequeue
Delaying the gc wasn't having a worthwhile notice on qdel() cost and can slow shit down
2018-08-24 20:53:37 -07:00
Kyle Spier-Swenson
ac9dfd6ea8 delays clearing the items out of the garbage queues when tick_checked
Since it already has the code necessary to handle doing it this way.
2018-08-14 20:37:52 -07:00
Kyle Spier-Swenson
850513bd58 The garbage collector now makes an actual effort to churn thru the prequeue
Unlike normal subsystems, if the garbage collector is tick_checked into pausing, rather than run next game tick to resume, it waits the full 2 seconds again.

I added that change because hard deletes can sometimes cause a large amount of lag, and so doing one again the next game tick is a stupid idea when 1 hard delete can cause a tick overrun on its own.

Now it only applies this when doing hard deletes, running again next tick otherwise.
2018-08-14 13:52:08 -07:00
ninjanomnom
d483ff3ef0 Regexes
`([^_\.])SendSignal\((.+?)\)` -> `\1SEND_SIGNAL(src, \2)`
`([\.\w]+?)\.SendSignal\((.+?)\)` -> `SEND_SIGNAL(\1, \2)`
2018-06-13 19:19:23 -04:00
vuonojenmustaturska
640f2cf693 Adds a stationloving component to replace a couple of flags and SSinbounds with (#37436)
* station lovin' happened so fast

* Update stationloving.dm

* less qdel memes

* imbue soul signal

* rename imbue soul signal

* dupemode

* henk

* Update atoms_movable.dm

* Update nuclearbomb.dm

* Update nuclearbomb.dm
2018-04-27 14:35:53 +02:00
kevinz000
df982e66ac ltes not findreferences twice 2018-03-31 15:21:19 -07:00
kevinz000
c6e7ce4c25 GC debugging features 2018-03-31 14:09:24 -07:00
Cyberboss
95b9b07024 Moves garbage up in the init order 2018-02-15 09:31:42 -05:00
ninjanomnom
53ffc71655 make fire priority values defines 2018-01-17 02:57:14 -05:00
Kyle Spier-Swenson
fa136e71f4 Revert "Merge pull request #33537 from ninjanomnom/priority-defines" (#34528)
This reverts commit 0244b61886, reversing
changes made to 5d07df08ea.
2018-01-16 20:04:35 -05:00
Jordan Brown
e13f2eef2a Removes usage of set background 2018-01-09 10:21:36 -05:00
ninjanomnom
a65248928b defines all subsystem priority values 2017-12-15 15:16:31 -05:00
Emmett Gaines
f76ccb8de0 fixes null parent in destroy for components (#32351)
* fixes parent being null in destroy

* extends qdel
2017-11-08 09:35:09 +13:00
ninjanomnom
3d82455c8e fixes tags and makes garbage use \ref 2017-10-28 22:38:45 -04:00
Emmett Gaines
825ab4def4 [512] The great \ref purge (#31824)
* The great \ref purge

* cleanup
2017-10-28 17:20:04 -04:00
Kyle Spier-Swenson
dcef18078f Find references fix. (#32022)
* Find references fix.

Made it go from taking years to hours

Removed Datum based recursion, this was unneeded.

Fixed it calling a proc for what ended up being a costly noop millions of times (this was a moderate speed up as it would call DoSearchVar on every fucking number or string or null in a things vars list.)

Fixed it calling itself on the vars list. luckily it only checked keys, so this didn't stack overflow.

I'm intentionally leaving the debugging stuff in right now so that its on the record somewhere. I'll remove that when I pr line by line profiling as its own separate thing

* Remove debugging stuff

* i forgot
2017-10-27 11:56:34 +02:00
Firecage
2ae0380fef Does some code standardization/consistency 2017-10-05 11:13:47 +02:00
Kyle Spier-Swenson
2f6df2a008 Garbage collection tweaks and refactors. (#30118)
* Garbage collection queuing rewriting

* Some Tweaks

* Fixes some queue tracking oddities

* More tweaks

* Remove the middle two queue steps. tis was a silly idea

* New logging.

We store logging datums for use in tracking the stats of shit qdeleted

Added logging for destroy time as well as hard delete time, per type. As well as a few others

* Fix compile for testing

* Does the cyberboss

* does the antur
2017-09-13 08:46:18 +02:00
Jordan Brown
30573dc6f1 Adds defines for world.tick_usage (#30184)
* Add tick_usage define

* Move tick.dm -> _tick.dm

* Add TICK_USAGE_REAL define

* Add comments

* Replace all instances of tick usage with appropriate define
2017-08-30 10:09:24 +12:00
Kyle Spier-Swenson
3a6aaab2b5 ssgarbage now runs every 2 seconds.
This was moved down to 5ds back when subsystems had to complete their entire workload each fire in the old mc system.

The idea was that less would have gotten in the queue to be hard deleted in 5ds compared to 20ds, and a tiny amount of lag more often would be more preferred to alot of lag less often.

That is no longer the case now.
2017-08-22 12:29:00 -07:00
oranges
6b6fc91172 Merge pull request #29623 from Cyberboss/TiredOfBS
Removes all checks for subsystem existence
2017-08-04 23:54:47 +12:00
Jordan Brown
cd912faf59 Unifies datum definitions 2017-08-01 15:51:26 -04:00
Jordan Brown
6175ab77d5 Removes all checks for subsystem existence 2017-08-01 10:16:37 -04:00
shizcalev
99624b8e74 further spellchecking 2017-07-31 23:09:08 -04:00
Jordan Brown
0321e6bd85 DCS Continued (#29324)
Adds's documentation to the DCS system, refactors to improve the caller API
2017-07-25 09:44:19 +12:00
Jordan Brown
bcb85acb1e Ports /vg/'s datum component system (#29178)
* Ports /vg/'s component system
2017-07-17 12:10:25 +12:00
Lzimann
c97e97d7b6 Fixes typo in garbage subsystem 2017-05-26 23:12:54 -03:00
Cyberboss
2132271860 Fixes ordering of text2file params 2017-05-20 10:46:50 -04:00
Cyberboss
da4712029d Fix a bug with qdeling non-datums 2017-05-19 10:49:43 -04:00
Cyberboss
4d252c9206 Qdel failures now have their own log file (#27310) 2017-05-16 20:09:00 -03:00
Cyberboss
1c6bd654b7 Make runlevels bitflags 2017-05-11 10:04:19 -04:00
Cyberboss
a0a27219b6 MC Runlevels 2017-05-10 16:05:37 -04:00
Kyle Spier-Swenson
8da8c74dfb >caps 2017-04-25 12:14:49 -07:00
Kyle Spier-Swenson
127bda2042 Compile errors. 2017-04-25 12:10:17 -07:00
Kyle Spier-Swenson
d8208efaff Fixes some edges cases in the garbage controller
We no longer pause when we use up a tick, instead making us wait the delay between fires. (to cut down on lag from consecutive hard deletes) In a later pr I'll also make the MC punish subsystems who go over their allocated tick time with delayed fires and lower tick allotments.

Long hard delete logging moved to HardDelete proc so it can take effect on QDEL_HINT_HARDDEL items as well.

QDEL_HINT_HARDDEL_NOW uses the HardDelete proc now.
2017-04-25 11:49:53 -07:00
Kyle Spier-Swenson
0829bba0f2 fixes the garbage subsystem not working, at all. 2017-04-17 13:27:01 -07:00
Kyle Spier-Swenson
d688553d4c Tweaks some procs in garbage to make profiling it better (#26210)
Having soft delete overhead and queued hard delete overhead merging in the profile was confusing me.
2017-04-15 10:37:42 -06:00
Cyberboss
bc72b2e288 Refactors dellogging into SSgarbage/Shutdown (#26135)
* Refactors dellogging into SSgarbage/Shutdown

* list
2017-04-13 16:22:56 -06:00
Kyle Spier-Swenson
11d504e93a Removes hacky see in darkness invisibility bullshit, uses planes. (#25931)
* Removes hacky see in darkness invisibility bullshit, uses planes.

Also removed the use of invisibility for ghosts of others, instead using override images.

Per client lighting visibility now has 4 levels, all on, all off, and two midways, this allows for things to be able to see in the dark while still being able to see what is dark and what has light, ghosts and aliens and other shit can cycle between all 4, other things were given one of the 3 values depending.

* Remove qdel global var search.

* Cleans up code, makes changing lighting/NV level easier.
2017-04-11 21:01:24 +12:00
Cyberboss
9e1ef0ffe2 Global variable wrappers (#25325)
* 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
2017-04-06 23:26:13 -06:00
Cyberboss
585fc0615d Sound tweaks (#25876)
* Port ai vox channel to new system

* Add playsound_direct

* Add pressure_affected parameter

* Channel allocation

* Default pressure_affected to FALSE for ps_direct

* Can't wait to get rid of this shitty fucking proc
2017-04-05 12:57:23 -06:00
Cyberboss
58b7ce61c8 Removes the unused parts of dmm_suite (#25875) 2017-04-05 10:38:40 -03:00
Cyberboss
78ee754da3 Merge upstream 2017-04-01 23:38:37 -04:00
AnturK
e6803e64a2 Merge pull request #25580 from coiax/landmarks-refactor
Landmarks refactor, part 1
2017-04-01 13:26:03 +02:00
XDTM
b56d2b4db3 Fixes facehuggers ripping masks off protected mobs (#25488)
* Fixes facehuggers ripping masks off protected mobs

* it didn't give an error on my end but oh well

* i did it
2017-04-01 12:57:47 +13:00
Jack Edge
2947b6679d Converts Centcom 2017-03-29 18:08:30 +01:00
Jack Edge
fc89cc9c33 Removes unused monkeystart landmark type 2017-03-28 19:20:47 +01:00
Cyberboss
fb596bcdb3 _DEF 2017-03-22 14:52:21 -04:00