Commit Graph

1622 Commits

Author SHA1 Message Date
LemonInTheDark
c5698a21c4 Removes roundstart miasma. Yes, even the gibs that are marked as miasma producers. Fuck you. Carbons now start listening for death at init, then get the component when they die. Gibs behave just as they used to. (#55343) 2020-12-16 21:27:01 -08:00
Jared-Fogle
0a77d27a1b Replace direct poi_list manipulation with element (#55416)
Replaces GLOB.poi_list |= src and GLOB.poi_list -= src with an element that handles it directly.

More consistent code, especially when a lot of code couldn't decide how to add/remove (some |=, some -=, some .Remove, etc).
2020-12-10 23:30:25 +00:00
Jared-Fogle
7d3fd4355f Everything that uses maptext now uses the class that makes it actually readable (#55420)
Adds a MAPTEXT macro that wraps the given text in the maptext class, the thing we use for Runechat to make it so you can actually read it. Everything that sets maptext now uses this.
2020-12-10 23:25:46 +00:00
silicons
160175ee8b pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)
Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:

Pass flags handling now uses an atom variable named pass_flags_self.
If any of these match a pass_flag on a thing trying to pass through, it's allowed through by default.
This makes overriding CanAllowThrough unnecessary for the majority of things. I've however not removed overrides for very.. weird cases, like plastic flaps which uses a prob(60) for letting PASSGLASS things through for god knows why.
LETPASSTHROW is now on pass_flags_self
Projectiles:

Not finalized yet, need to do something to make the system I have in mind have less unneeded overhead + snowflake

Basically, for piercing/phasing/otherwise projectiles that go through things instead of hitting the first dense object, I have them use pass_flags flags for two new variables, projectile_phasing and projectile_piercing. Anything with pass_flags_self in the former gets phased through entirely. Anything in the latter gets hit, and the projectile then goes through. on_hit will also register a piercing hit vs a normal hit (so things like missiles can only explode on a normal hit or otherwise, instead of exploding multiple times. Not needed as missiles qdel(src) right now but it's nice to have for the future).

I still need to decide what to do for hit handling proper, as Bump() is still preferred due to it not being as high-overhead as something like scanning on Moved(). I'm thinking I'll make Moved() only scan for cases where it needs to hit a non-dense object - a prone human the user clicked on, anything special like that. Don't know the exact specifics yet, which is why this is still WIP.

Projectiles now use check_pierce() to determine if it goes through something and hits it, doesn't hit it, or doesn't go through something at all (should delete self after hitting). Will likely make an on_pierce proc to be called post-piercing something so you can have !fun! things like projectiles that go down in damage after piercing something. This will likely deprecate the process_hit proc, or at least make it less awful.

scan_for_hit() is now used to attempt to hit something and will return whether the projectile got deleted or not. It will delete the projectile if the projectile does hit something and fails to pierce through it.

scan_moved_turf() (WIP) will be used for handling moving onto a turf.

permutated has been renamed to impacted. Ricocheting projectiles get it reset, allowing projectiles to pierce and potentially hit something again if it goes back around.

A new unit test has been added checking for projectiles with movement type of PHASING. This is because PHASING completely causes projectiles to break down as projectiles mainly sense collisions through Bump. The small boost in performance from using PHASING instead of having all pass flags active/overriding check_pierce is in my opinion not worth the extra snowflake in scan_moved_turf() I'd have to do to deal with having to check for hits manually rather than Bump()ing things.
Movement types

UNSTOPPABLE renamed to PHASING to better describe what it is, going through and crossing everything but not actually bumping.
Why It's Good For The Game

Better pass flags handling allows for less proc overrides, bitflag checks are far less expensive in general.

Fixes penetrating projectiles like sniper penetrators

This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)
2020-12-10 09:29:27 +13:00
Qustinnus
f887155b27 Kills oldfood, Puts newfood on top. (#55160)
Slays the last of old-food, making new-food the new normal.

Co-authored-by: MrMelbert <kmelbert4@gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-12-04 00:11:47 -08:00
TiviPlus
de7994c0f7 Init sanity unit test (#55147)
https://github.com/tgstation/TerraGov-Marine-Corps/pull/5326
Stemming from 
https://github.com/ParadiseSS13/Paradise/pull/14770

Basically it just checks for bad initialize calls
2020-11-30 17:15:11 -05:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
IndieanaJones
0a22bb785d Fixes Issues Regarding Finding Spider and Swarmer Spawns (#55054)
This PR fixes the issue where people couldn't teleport to spider egg clusters using the notification.

It also adds both the swarmer beacon and spider egg clusters to the ghost orbit menu. This should make it easier to find instances of both in cases where a player might miss the initial notification.
2020-11-28 07:57:19 -03:00
Jared-Fogle
96597d3157 Remove duplicate definitions of /obj/effect/ex_act, explicitly noop it (#55076)
/obj/effect/ex_act had several different re-definitions to make it a noop. The original definition would randomly delete it, which is bad news when a lot of /obj/effects are just that--effects, that shouldn't be blown up.

The ones that actually do want to be blown up (like decals) already have their own implementations. The one in place was never ran, and nobody had problems with it.
2020-11-28 07:55:26 -03:00
Ghom
d94cfdaae7 Fixing non wiz phased mobs. (#55162)
Wrong proc path, also qdel ref issue for shadow walk holder.
This will close #55141 and close #55142
fix: Nightmares and some other critters no longer delete themselves once they stop phasing.
2020-11-26 14:36:50 +00:00
Qustinnus
41157f5d6b Moves grown food to newfood (#55040)
Moves grown food to newfood
Gives trash element support for callbacks for item creation override
2020-11-23 14:00:23 -08:00
Ghom
2bd9aca8b6 Removed effect/dummy/phased_mob copypasta. Fixed squeak component triggering from abstract effects & co. (#54783) 2020-11-23 13:27:18 -03:00
spookydonut
0383c19ac2 Minor refactor to signal handlers to remove potential sleeps (#54649)
About The Pull Request

These are legacy sleepers, the remaining 12 are non-trivial to fix.
2020-11-23 09:49:12 +13:00
Ghom
7d64a94ec9 Fixing a 18.18% chance of gibs streaking 50 tiles away. (#55035)
* Fixing a 18.18% chance of gibs streaking too far away.

* ascended bug, not a new feature. :rolleyes:
2020-11-20 19:01:20 +08:00
Qustinnus
b713fa1bc3 moves misc food to newfood code (#54788)
misc food is now using newfood code
2020-11-18 12:20:47 -08:00
Ghom
ede1358f78 Beauty component improvements. Two new fantasy component prefixes (#54622)
Title. Changed the component backend code slightly to allow a single component to hold the total score instead of spawning new components. This should fix cases, such as material stacks without the MATERIAL_NO_EFFECTS flag, where multiple set_costum_materials calls can be made and new beauty components spawned.
2020-11-10 15:08:32 -03:00
IndieanaJones
0279109cf9 Spider Rework (#54451)
Spider refactor and hostile animal stamina changes.
2020-11-10 15:31:08 +01:00
Ghom
2fb34c1ca8 Fixing GBJ cases where the disposal holder is forcemoved outside a pipe. (#54643)
Title. Also turned movable/pipe_eject() into a comsig, since it was used only for gibs.
2020-11-07 01:26:31 -03:00
Ghom
cc51e57b44 datum/client_colour refactor. (#54741) 2020-11-02 12:20:34 -08:00
Krysonism
9ff7944101 [READY] decorations loot crate! +3 new fancy carpets! (#54612)
* base

* fixes

* crate

* Update code/game/turfs/open/floor/fancy_floor.dm

Co-authored-by: Fikou <piotrbryla@onet.pl>

* adds the crate to the pool.

* the crate is pretty rare, why not let it drop four items?

* Update lootdrop.dm

Newline phone edit

* ungoofed

Co-authored-by: Fikou <piotrbryla@onet.pl>
2020-10-30 22:12:34 +01:00
Rohesie
c55bb1b6c8 Basepixels (#54652) 2020-10-28 20:31:13 -07:00
Azarak
0b880161d8 Directional lighting component + light system (#54520)
Adds in a new type for the lighting system, the directional one. It piggybacks on the overlay lighting to create a directional effect + adds a nice visual cone mask to make the effect feel really directional.
Also: made the static light system respect the light_on variable.

It feels really nice to shine AT things you're looking at with flashlights and the such, it makes maintenance scouring much more immersive too.
Adds more paranoia as you dont see light behind yourself when you've got a flashlight. Plus makes ambushes more fun
2020-10-25 23:49:57 -04:00
Qustinnus
74755a5a3a Audio falloff re-work, and increased audio range. (#54362)
imo; the ss13 audio-scape is quite barren, you can only hear most things if you can see them, which in my opinion doesn't make much sense. This changes that so you can hear further away, but falloff is much higher, so in reality you will only hear things relatively quietly when they're out of sight.

This PR increases the hearing distance of most sound by 9, excluding sounds such as antag items that are meant to be used stealthily

This PR also replaces Byond's inbuilt falloff system with something I made, (And thanks to potato for helping me throw together a formula for it). This fall-off system makes sound fall off more naturally, with sounds being full volume within a certain range, and then softly falling off until they are completely quiet. This makes for a smoother transition between "This sound is full volume" and "I dont hear this sound".

Co-authored-by: ff <ff>
2020-10-20 17:14:16 -07:00
nicbn
a1c59cc9bc Moves screen objects from mob to hud (#54400)
This moves screen images from icons/mob to icons/hud
Makes more sense and it is easier to find
2020-10-15 19:46:36 -03:00
ZeWaka
9629feed35 Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
2020-10-13 16:43:53 -03:00
Rohesie
af65c90125 Mobility refactor: no more update_mobility() (#54183)
This is a pretty big change all around. The gist of it is that it moves the mobility_flags into traits or variables that can track the sources, and to which we can append code to react to the events, be it via signals or via on_event-like procs.

For example, MOBILITY_STAND could mean, depending on context, that the mob is either already standing or that it may be able to stand, and thus is lying down.

There was a lot of snowflakery and redefinitions on top of redefinitions, so this is bound to create bugs I'm willing to fix as I learn them.

The end-goal is for every living mob to use the same mobility system, for the traits to mean the same among them, and for no place to just mass-change settings without a way to trace it, such as with mobility_flags = NONE and mobility_flags = ALL

Fixes AIs being able to strip nearby people. They've lost their hands usage.
2020-10-09 16:04:30 -07:00
Jared-Fogle
b327b9e5ae Adds Shuttle 667 as a buyable shuttle for dispelling a cult rune (#53975)
* Adds Shuttle 667 as a buyable shuttle for dispelling a cult rune

* Add stasis beds

* Fix forcefields going away, leading to hull breaches

* Use set instead of list

* Use subtype for forcefield walls
2020-10-04 21:36:46 +13:00
LemonInTheDark
0be337d01c Makes some things that rely on atmos adjacency more sane/faster. (#54096)
* Replaces some CANATMOSPASS calls with a new define that checks if the turfs are in each others atmos adjacent list, as that's the same info that they want.
2020-10-01 13:19:52 -07:00
Qustinnus
eca964db35 Ports soup, snacks, icecream, salads and meat to newfood (#54028)
Ports soup, snacks, icecream, salads and meat to newfood
2020-09-29 20:36:27 -07:00
nemvar
963779471a Merge pull request #53906 from Rohesie/smoothing
[READY] Refactor icon smoothing to use 8-bit bitmasking
2020-09-29 17:07:12 +02:00
tralezab
f68ac806f8 Reimagines Venus Human Traps (#53880)
Venus human traps now have a new sprite, new sprite for their bud, new sprite for their vines, their bud has icons according to how grown it is, they get sounds for hitting, getting hit, and dying.

oh yeah and I renamed the path flower_bud_enemy >flower_bud
2020-09-29 06:00:35 -03:00
Timberpoes
9ad38ff0ce Fixes mapstart and random arcade machines (#53958)
Randomly generated arcade machines were getting random boards and initing properly, but they weren't re-built as the appropriate subtype.

This oversight has been remedied. A new subtype has been created for random arcade machines which exists purely to pick a random circuit then create a machine from that circuit's build path before returning that it should be qdel'd.

This new subtype has been appropriately regex find-and-replaced into all maps.
* Objectify
2020-09-27 13:59:07 -03:00
L
baa30b5d42 floors 2020-09-26 12:14:30 -03:00
L
fb38066f09 bitmask 2020-09-26 12:14:27 -03:00
L
5a21a0d92f objs 2020-09-26 12:14:26 -03:00
L
37fc1b235a diagonal corners 2020-09-26 12:14:25 -03:00
L
e461d7b777 icons 2020-09-26 12:14:25 -03:00
Timberpoes
9c95813da4 Rebalances space loot and space exploration (#53916) 2020-09-25 04:53:43 -07:00
Tad Hardesty
df8df0a8a7 Disable some effect systems during init (#53929)
Instantly spread gib streaks rather than doing so over a delay
Completely skip broken light fixture sparking during init
2020-09-25 08:47:32 -03:00
TiviPlus
3dad9ef20f Refactors decals to an element (#53922) 2020-09-24 21:36:17 -03:00
Couls
f174cd671c improve performance of vis_overlays by handling dir by using vis_flags (#53816)
vis dir changes are now handled by vis_flags
2020-09-24 06:00:41 -03:00
Ryll Ryll
80cefef747 Fixes projectile impacts + messages, embedding, adds deployable landmines (#53436)
* icon and alert anim

* hmm

* projectile and embed fixes

* cap mine

* clean up, fix some issues with projectile embeds

* light

* doc

* icon

* awkward

* icon again
2020-09-23 07:53:55 +02:00
tralezab
e44dcc035c Flower Buds now have a countdown for ghosts for when they're going to hatch (#53648)
They're two minute timers with no indication, which makes kudzu kinda annoying to spectate.
2020-09-23 00:50:26 +01:00
TiviPlus
ff1631b7b9 Fully removes devil and affiliated shitcode (#53612)
Its all over the place, messy, and overall a bad enough gamemode to be removed from rotation.
A rework would have to tear out everything as is so there is no reason to allow the shitcode to live beyond tripping up everything.
2020-09-23 00:46:21 +01:00
TiviPlus
c35008b1b0 Optimizes Conveyors (#53220)
Less proc overhead
Made the actual moving speedier
removed a unused var
2020-09-19 10:37:15 -03:00
Mickyan
35752f491a Adds sidings floor decorations (#53797)
This was a frequent request from mappers ever since trimlines were added, they work similarly to trimlines but they have different use cases and don't necessarily work together, so I am calling them sidings to avoid confusion.
Whereas trimlines are floor paint for plating, these are solid borders to be used either alongside walls, smoothing transitions between floor types or mark/split an area without having to use walls, and work with any floor type.

These are ALL greyscaled, so they're trivial to bikeshed customize and make new types for your mapping needs
- Colored (plastic/vinyl strips, standard departmental colors)
- Plating(metal, grey/white/dark)
- Wood(it's wood)

I've added them to meta's bar as a small example
2020-09-18 22:10:32 -04:00
Jordan Brown
a1498d7fd6 Merge pull request #53812 from SgtHunk/ITS-HAURRIBLE
Adds the CRAZY HAMBURGER
2020-09-18 22:05:50 -04:00
SgtHunk
eb27bb33d3 GRASS OF DEATH
Could I have added green smoke in some other way? Possibly.
Do I know how or have the brain power for it? Not really.
Oh yeah also actual sprite for the burger, along with all ingredients i've missed
2020-09-18 14:57:34 -03:00
oranges
538aaf8314 Slightly optimize shroom spreading code (#53652)
There were some recent lag events on the servers caused by the timer  
subsystem jamming up with glowshroom timers. I whined about this but  
nobody did anything so

(Thanos "Fine... I'll do it myself" GIF)

There are a few changes here, first we collect the potential turfs for 
the view call in a single pass, not once per yield run.

Second we don't run a second view(1) on every single potential turf, 
instead we try to randomly pick a turf 3 times during yield phase and 
check the view then.

If we fail to find a potential location then we bail out of that yield 
phase. This is a tradeoff between processing time spent finding 
locations and the chance that the glowshroom fails to spread.

Finally, we have maximum limit on how many times a glowshroom fails to 
spread, if it fails to spread at least 5 times over any iteration, it 
stops processing for spread completely.

As a bonus, the timers have been made unique, so we don't accidentally 
generate multiple timers for a single shroom, other than the two it 
already needs.

This code would benefit from being a separate subsystem and grouping, 
generations of the plants together as a single ticking entity and just 
spreading from selected edge plants. However I don't particularly feel 
like plumbing that together, so this will suit for now.
2020-09-17 23:46:20 -07:00
tralezab
1424bd0b2a Countdowns now use the maptext class (#53649) 2020-09-13 06:01:58 +01:00