Commit Graph

41 Commits

Author SHA1 Message Date
Kyle Spier-Swenson
b3acf5b9d5 Min alpha part 2 2017-01-08 00:21:47 -08:00
Kyle Spier-Swenson
28f84e5d86 Revert "Removes animation on lighting changes, increases light max radii" 2017-01-07 21:12:01 -08:00
Tacolizard
ac819a17f2 Removes animation on lighting changes, increases light max radii (#22754)
* change light update speed

* lower dynamic light max radius vals

* wew i actually improved the code for once

* remove define

* mso's wish is my command

* yeh biatch

* found one
2017-01-07 19:40:27 +13:00
Kyle Spier-Swenson
280dbe20c3 [Ready] SSthrowing + callbacks! (#22476)
* SSthrowing + callbacks!
Throwing is now a subsystem.
It's low priority, but is a ticker subsystem so is ran before most other subsystems.
To allow for shit to run after the throw finishes, throwing now supports a callback.
A callback datum system was created, conversion of addtimer is planned for another PR.
Throwing now has a limit of 2048 turfs (was 600)
Throwing now ticks every world.tick, and properly converts the speed arg from 1ds to what ever tick_lag is.
Throwing now properly accounts for missed ticks.
Throwing no longer uses sleep.
Throwing should no longer lag since it's not filling the sleep queue up

* Smoother tentacles

* Some improvements

* Missed a spot.

* Makes shit quicker.
Inlines the thrownthing.tick() proc.
Raises missed ticks value
Lowers max dist value
Inlines the two sister overrides for /atom/movable/Moved() because that just seemed like a waste

* >PRs open that use procs i'm removing.

* STOP THE PRESSES!

* throw_at now runs the first throw tick() immediately
This will help some with throwing while running.

* Item throwing now imparts the momentum of the user throwing.

(ie, running in the direction you are throwing makes you throw faster, running away from the direction you are throwing makes you throw the item slower)

* Moves throwing momentum from carbon/throw_item to movable/throw_at.
There are other things that cause a mob to "throw" an item, I figured we keep this universal since thrower is already an arg.

* Explosions throw shit faster.
This was stupid, "Hey, lets set the item's throw_speed to 4 so embedding works, but lets make it throw at the base 2 throw speed for no reason."

* Fixes explosion embedding.
This also acts as a nice example of how to override a callback in an override of throw_at properly.
2017-01-02 20:08:03 +11:00
MrPerson
93ef32241c Fixes a bug I introduced into starlight (#22316)
Sorry, didn't test enough after some changes.
2016-12-20 11:14:59 +13:00
MrPerson
fd44248cc1 Constant starlight (#22271)
Currently starlight applies multiple times for each space turf. This is stupid. Instead we'll only apply the brightest starlight to each tile. Looks much better.

Also I moved all the lighting defines into the defines folder. Also I used some of the lazyinit defines instead of manually doing it.
2016-12-19 15:35:32 +13:00
Kyle Spier-Swenson
dedb16826e Speeds up world init. (93s -> 49s) (#21992)
* Speeds up world init.

* Armor is now new inited for obj and the first level of subpaths.
* Actions is now lazyinited and deleted with empty.
* Actiontypes is now only inited when actually used and deleted once it pre-fills actions with the action buttons.
* Pipes now prefill their node list(s) in new() using new /list/ (count) syntax to speed up the list initaliztions and remove the init proc.
* Pipes no longer store their item version, instead creating it on the fly when deconned
* Walls no longer store their metal stacks, instead creating it on the fly when deconned.
* obj, walls, floor, plating, item, machinery, structure, pipe, pipenet, atom, and movable no longer have an (init) proc. (along with a few other smaller examples)
* Atmos can pass checking is now a var with the ability to have a proc be call in advance cases.
  * (as a side effect, I had to fix a few things that were calling atmosCanPass rather then using the pre-calculated list, this should speed up chemfoam and flame effects greatly)

* Reverts upload limit
(remind me one day to defuck this, it could easily be a config thats not editable by vv to make changes easier)

* Makes apc update icon a bit faster.
APC new is some what high on the profile of world init, still not sure why, but this stood out as a waste of cpu so i fixed it.

* Fixes runtime with atmos backpack water tanks.

* Makes smoothing faster (and fixes turfs smoothing twice at init)

* Makes apcs init faster by replacing some spawns with addtimer

* fix transit turfs.
2016-12-08 21:50:15 +13:00
MrStonedOne
b29f1eb067 Makes using the cheat engine to remove darkness or ai static harder 2016-12-01 14:38:28 -08:00
oranges
c0ef5e59f7 Revert "Human nightvision" 2016-11-25 15:21:33 +13:00
MrPerson
6dc56abd5e Human nightvision (#21638)
* Human nightvision

Humans can see in the dark a little bit around themselves.
-Add pictures here-

Forces clients onto 510 and suggests clients upgrade to 511 in the default config. The suggestion is still commented out but forcing clients to 510+ is mandatory.

Ghosts and brains now actually render the default HUD instead of skipping the whole process. Dead mobs will show their fullscreens. All of the existing ones will skip rendering to dead mobs to keep the existing behavior of not rendering the brute/blindness screens.
Fixes #17389
Probably fixes #19248 need to test

* Darker human nightvision it is
2016-11-25 13:05:41 +13:00
MrPerson
5047dd7145 Plane master handling + new chemical Rotatium (#20707)
* Plane master handling + new chemical Rotatium

A whole system to create, store, and access screen master objects from the hud. In case anybody actually wants to do anything relevant with them. Which will probably be me but whatever.

Moves things out to some planes that make sense.
click catcher -99
game 0
lighting 15
fullscreen 18
HUD 19
above HUD 20

Rotatium is more of a demonstration than something I really really love, but it is kinda neat so here you go. It rocks the game plane and lighting planes back and forth and also does light toxin damage. The longer it effects you, the stronger the rocking gets.

No pictures right now, I'll get some later. Sorry.

* Pay no attention to the commit behind the curtain

* Updates travis to 1346, the stable version for 510 for linux
2016-10-18 11:41:23 +02:00
Kyle Spier-Swenson
55b9abd488 Make lighting object management robust. (#19365)
* Make lighting object management robust.

Fixes a bug that caused lighting objects to not properly manage themselves on turf change, and adds nosiness and runtimes for when such a case happens again.

* does the remie
2016-07-19 14:53:42 +12:00
Kyle Spier-Swenson
6bfccafe41 Fixes random dark turfs
This was causing turfs changed at world init from a no lighting system turf to a turf that used the lighting system to have two lighting overlays, one randomly stuck at black depending on timing.
2016-07-02 19:41:26 -07:00
MrPerson
df637898ef Fixes mechs breaking lights by walking onto them
Fixes #17271
2016-06-23 02:51:55 -07:00
Kyle Spier-Swenson
235b79fb5a StonedMC, the bastard love child of GoonPS and CarnMC (#17987)
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.

The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.

The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.

Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK

I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.

Detailed list of changes:

Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.

Mc now has two loops One loop handles queuing shit, one loop handles running shit.

MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)

Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due

All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick
2016-06-16 18:01:16 +12:00
Joan Lung
2cfb2d8eed Layers are now defines (#17949)
* Layers are now defines

* this looks better

* GAS_phil_LAYER

* no message

* remove the three unneeded defines

* no message
2016-05-27 22:16:21 +02:00
coiax
4483d5275c Shuttle manipulator (#17436)
* Starting out on our tgui journey

* God tgui, why do you need to be updated

You're dynamically generated anyway

* Commit of stuff

* Further progress is being made

* Everyone loves buildscripts

* Further modifications to my incredible running script

* Starting to modify the minimap code to be better

* It's going well thusfar, I guess

* What have I done

* RIP minimap

* FUN FUN FUN FUN FUN

* Adds shuttle_manipulator.dmi

MUH HOLOGRAMS

* Is it done? IS IT OVER

* Peer review

* Some bug fixes

* Makes that damn greentext shut up

* Shuttle registration

* Made the Emergency Escape Bar more robust

No climbing on the bar.

* Do not stare into the operation end of the device

* Compile shame

* THE MOST DUMB

* Passive barmaiden

* Emergency shuttle memes

* MORE SAFETY CODE

* Fancy shuttle manipulator icons

* Smoothing it out

* We are going to have a lot of fun with this one

* Independent blobbernauts

* WABBAJACK WABBAJACK

* Message for attempting to authenticate old style

* Angry alert noise is back

* Revert "Independent blobbernauts"

This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3.

* No parrot sleep plz

* Moves the special shuttle stuff to special.dm

* No Bartender like a Centcom Bartender

* Non-controversial map changes

- Backup shuttle moved closer to Centcom main structure, docking tube
created
- Moved shuttle import landmark to above Centcom main building
- Added shuttle displays to Conference Room
- Squashed the Chapel a bit in Metastation
- Made the docking port on Z2 massive
- Made the docking port on Metastation a lot larger

* Hacks and slashes at Box

A bunch of things are extended and squashed so Box shuttle dock can
support the MetaStation emergency shuttle.

* Some Metastationshit

* Never ending changes

* Wabbajack to TGM

* Modified the bar, I think that's all of them

* Stops Barmaiden wandering around

* More code review

* Whitspace, the bane of us all

* DIE WHITESPACE DIE
2016-05-26 15:15:19 +02:00
KorPhaeron
0bbcc00c4d Revert "Move some stuff from different layers to different planes" 2016-04-29 16:07:23 -05:00
MrPerson
b50e0ee42c Merge branch 'master' of https://github.com/tgstation/-tg-station into planes_on_a_snake 2016-04-27 17:03:32 -07:00
MrPerson
3f70f880ac Move some stuff from different layers to different planes
Moves everything on a 15+ layer to a plane. So now you get screen catcher (-99, was already on a plane), lighting (15), effects that ignore lighting (16), fullscreen UI effects (18), screen objects used to build the UI (19), actual equipment in the UI slots (20), and everything else (0).

Also created a file to contain plane and layer defines for hopeful eventual use.

Hopefully this doesn't change anything now but does enable some nifty new features in the future.
2016-04-24 04:03:41 -07:00
YotaXP
0d8cc8aee7 Make the loader use ChangeTurf() for turfs. 2016-04-18 17:41:05 -04:00
duncathan
3525bcfcbb fixes huge roundstart bugs 2016-03-30 16:07:35 -06:00
duncathan
e86cf0f280 praise the good lord, for the game finally compiles 2016-03-29 19:04:37 -06:00
KorPhaeron
6716fc9282 Entirely area based 2015-12-24 03:50:27 -06:00
KorPhaeron
70060cb6c1 Weather datums 2015-12-22 05:31:46 -06:00
Kyle Spier-Swenson
969e4ca2b7 forgot a line 2015-12-16 03:29:24 -08:00
Kyle Spier-Swenson
e5b6078bc4 Cleans up turf/get_lumcount
I'm going to just declare that any case where a turf's loc isn't an area to be a bug that lighting code shouldn't be hiding
2015-12-16 03:19:17 -08:00
Kyle Spier-Swenson
dc337a6344 Fixes runtime in lighting system
fixes #13478
2015-12-06 07:32:28 -08:00
MrStonedOne
a1bfb37f0c Tweaks lighting some more.
This should be ready to go.
2015-12-02 07:12:37 -08:00
MrStonedOne
102896196f lighting tweaks 2015-11-30 01:44:44 -08:00
Tkdrg
3308f76efb Improves speed of redraw_lighting()
No longer uses animate() when unneeded, because animate() is slow.
Also turns Clamp() into a macro to reduce proccall overhead.

The whitespace changes in atmos are needed because of the way the
preprocessor handles macros.

Thank you MrPerson for helping with this.
2015-11-06 23:36:03 -03:00
MrStonedOne
8c755da84f Adds a way to make certain area/space areas not force 100% brightness 2015-10-31 02:30:49 -07:00
MrStonedOne
03ff22fbbc Adds the ability to set a light source's high end
Makes starlight use new system to have far spreading low levels of light rather then near spreading high levels of light.
2015-10-29 22:31:08 -07:00
Tkdrg
c2093e3709 Improves starlight performance
Still laggy, but now quite a bit better.
Fixes #8154
2015-10-25 01:55:04 -03:00
xxalpha
e82a216447 Changed various instances of range() and orange() to ultra_range(). 2015-10-19 20:04:14 +01:00
MrPerson
d97d2a3bac Disallow nulls in the lighting system's lights list
This bug isn't reproducable so no, I'm not sure this will fix it. It's still a good idea to do this though.

Best guess as to what happened: A light was deleted pre-round for some reason. The garbage ss del()'d the light before the lighting system's first tick, so a null got into the lighting ss's lights list. This broke the whole system directly from roundstart and caused the thousands of "can't run null.check()" runtime errors from yesterday.
2015-10-12 01:52:30 -07:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
KorPhaeron
97990c94cc Changes how destroying turfs works
Turfs now have a baseturf var which determines what is "under" every
turf. The default is space.

Actions that previously did changeturf(/turf/space) (like bombs or RCD
deconstruction) now do changeturf(baseturf). Functionally the same for
the station, but allows special turf types that don't break to space
(such as planet tiles).

Right now the asteroid tiles are the only thing with a baseturf other
than space (the baseturf is an asteroid tile).

Baseturf is tracked when new things are built, so building a floor and
then a wall on the asteroid tile, and then bombing that wall will return
it to an asteroid tile, not space.

Allows building on asteroid tiles now that doing so wont randomly make
holes to space. Time for giant mining forts.

I should have done this years ago for away missions.

Also added myself to admins.txt
2015-05-29 18:43:34 -05:00
MrStonedOne
bd6d51a0b5 Massive MC and subsystem rewrite
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.
2015-04-29 02:00:25 -07:00
Ikarrus
4ff044dc78 Gang v3 has been tested and is now good to go! 2015-04-19 22:26:15 -06:00
MrPerson
01a8aa662a Moved lighting stuff from controllers folder to its own module
Lighting SS no longer cares about the return of check(); the light datums are responsible for deleting themselves.
Cap on lighting effects from turfs is now 8 because they're static and shouldn't be flashing lights too often. This means starlight actually works now instead of being capped at 1 measly turf.
Lighting related ChangeTurf() code is in the lighting module. Changed it up to be faster on lighting controller init and not leave dangling lights when a turf becomes or stops being opaque or when it turns into space. This diff log is gonna be useless sadly but take my word for it, it all works.
Lighting related Moved() code is also in the lighting module. Opaque objects will now update nearby lights when they move (mechs).
Opaque objects other than the light datum's owner on the same tile as its owner will block the effect of the light. In other words a mech standing on the same square as a light bulb will block all the light of that bulb.

Changed "cheap_hypoteneuse()" with an even cheaper version; actually calculating the hypoteneuse! I can prove it's cheaper if needed.
Removed move_contents_to() because it's unused and trying to use it would cause major bugs with lights and other shit and I have no interest in supporting that, so let's not even tempt people.
2015-04-12 02:25:28 -07:00