* Fixes runtimes from firing projectiles, adds unit test for firing guns (#57345)
* Fixes runtimes from firing projectiles, adds unit test for firing guns
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
* Allows you to force people into the clown car again. (#57169)
* Allows you to force people into the clown car again.
Co-authored-by: Seth Scherer <supernovaa41@protonmail.com>
* moves gun related icons to guns folder (#57077)
moves ammo icons, projectile icons and hitscan effect icons to guns folder
renames projectile.dmi to ballistic.dmi so its less confusing
moves rcd ammo from ammo.dmi to tools.dmi with the rcd
* moves gun related icons to guns folder
Co-authored-by: Fikou <piotrbryla@onet.pl>
* Refactors the Light Eater and gives it some flavortext. Some minor behavior changes included. (#55551)
Converts the effects of the nightmares light eater into a component and a couple elements
Adds some flavor text to the light eater
Makes the effects of the nightmare's light eater dispel if the armblade is destroyed
Probably a net increase in code quality
More flavortext
The nightmare's light eater effect can be dispelled if you are willing to sacrifice the armblade
* Refactors the Light Eater and gives it some flavortext. Some minor behavior changes included.
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* renames metal sheets to iron sheets
* Merge branch 'master' into upstream-merge-56643
* yay metal
* Update DeltaStation2_skyrat.dmm
* a
* Update CentCom_skyrat_z2.dmm
* a
* a
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* reverts Adds Neon Carpet (#55782), it appears to have been causing massive amounts of maptick (#56496)
It appears to have been causing massive amounts of maptick, this'll need a testmerge so we can test my hypothesis
* Reverts Adds Neon Carpet (#55782)
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* mechs now use base_icon_state for their icon changes (#56480)
* mechs now use base_icon_state for their icon changes
* Update firefighter.dm
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* Fixes exosuit console EMP logging and a mech runtime on EMPing. (#56196)
Occupants is a list. Mech EMP logging now correctly outputs the occupants instead of just outputting "/list"
Also when EMPing a mech in testing this PR, I noticed a runtime happening that I've fixed. Untyped for loop where the casting var was never assigned to and thus was always null.
* Fixes exosuit console EMP logging and a mech runtime on EMPing.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Fixes vehicles like skateboards and wheelys moving multiple times. (#56070)
So wheelys would have 3 instances of the riding component attached on initialize with a different argument, causing them to move 3 tiles at once instead of 1. Skateboards will have 2 attached and move 2, etc.
* Fixes vehicles like skateboards and wheelys moving multiple times.
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Fixes removing AIs from mechs (#55986)
Basically the old code attempted to use locate(AI), but the AI in this case is a ref that is supposed to be provided by the card. Since the card is initially empty when removing AIs from the mech, it couldn't find the null in the occupants list and thus failed with a report that there was no AI in the mech.
Now it checks all occupants and makes a list of any AIs it finds, then gives the user the option to pick an AI (though since we don't have any multi-pilot mechs yet the most you can get is one AI, and input with one option just auto-chooses).
* Fixes removing AIs from mechs
Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
* NOTELEPORT errywhere (#55973)
These prevent some cheats or really low effort ways to get to where you really shouldn't be.
Mappers seriously fucking hate jaunting and phasing mechs, as they let you bypass their custom crafted ruins and the like. But it'll also stop more general "you shouldn't be here" stuff.
* NOTELEPORT checks that were atomized out of the medieval shuttle
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Adds proper lazylist support to vehicles. (#55899)
Adds proper lazylist support to a bunch of vehicle code since some of the code either didn't consider that the occupants list could be null or didn't consider that the occupants list could be an empty list.
As a result the simple animal mecha pilots can board mechs again! (The mobs were checking whether the mech had any occupants. The mechs were checking whether the occupants list was falsey.)
Also fixed mechs putting themselves in their own occupants lists when boarded by a simple animal mecha pilot.
* Fixes simple animal mecha pilots
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* beep beep honk honk (#55875)
In my riding refactor and the handful of PR's that have come out since, I made some incorrect guesses about how clown cars worked, and as a result caused issues with them. This PR addresses the last issue with them, which was caused by erroneously removing a check to see if someone was actually qualified to drive the clown car (AKA they're a clown in full clown regalia), meaning that anyone in the car could drive it, including the unwilling passengers. That check has been restored, so only clowns can drive again, as intended.
* Fixes non-clowns being able to steer/drive clown cars
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
* Merry Christmas! Mechs receive damage from Xenos using their actual damage, instead of a hardcoded value (15). (#55736)
* Merry Christmas! Mechs receive damage from Xenos using their actual damage, instead of a hardcoded value (15).
Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com>
* Fixes clown cars + Fixes mechs not being able to open doors (#55748)
* honk honk
* realized the speedbike and wagon are not sealed
* Fixes clown cars + Fixes mechs not being able to open doors
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
* Fixes mech equipment being unusable for AIs (#55248)
Adds a signal listener on mechs that listens for middle clicks, and calls a proc that will, in turn, call the normal click proc if the user is an AI.
Middle clicks now pass through params just like left clicks.
* Fixes mech equipment being unusable for AIs
* Add CI-conform #2347 to this.
Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
Co-authored-by: Alex 'Avunia' Takiya <git@takiya.cloud>
* fixes clarke internals access and gives cargo techs working mech internals access (#55463)
fixes clarke only being able to be accessed by scientists instead of cargo, science and engi like ripley
adds cargo mech internal access to cargo techs
* fixes clarke internals access and gives cargo techs working mech internals access
Co-authored-by: Fikou <piotrbryla@onet.pl>
* Refactors Beams to use signals: Revived from 2019 edition! BONUS: Medbeams are also refactored to use signals (#55193)
Huge removal of dead vars, bad timers, and other sloppy jitteriness from beams. They go from checking movement to waiting for a signal.
VARIABLE KILL LIST:
sleep_time: signals baby
finished: signals BAYBEEE
target_oldloc: not only not typecasted as a turf or named as a turf, it was unused. when are we going to use this? the beam starts from the origin!
origin_oldloc: bad name, not typecasted. renamed to originturf
static_beam: how are you an unused variable and still get replaced by signals like really
timing_id: signallllss bbbaaaabbyy
recalculating: you get the drill by now signals baby
base_icon: unused, seemingly replaced by visuals I think
* Refactors Beams to use signals: Revived from 2019 edition! BONUS: Medbeams are also refactored to use signals
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* 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).
* Replace direct poi_list manipulation with element
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
* 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.)
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time
Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
* Small do-after refactor (#55172)
This is an alternative to the PR Ryll made, it does some things similar e.g. the default limit of 1 interaction per target for a person, however, it refactors do_afters to support overrides for max interaction counts and unique sources.
For example, stripping uses the item being stripped as the source, allowing you to strip multiple items, but not the same item multiple times.
I've also fixed most other edge-cases this could cause where balance would be affected, but feel free to point out any I might've missed, this'll probably require some longer-term testmerging.
* Small do-after refactor
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* Mech Ammo now properly respects ammo for custom materials. (#55095)
Mech code now does a basic check for the amount of remaining ammo to adjust the amount of custom materials of an ammo container based on the remaining ammo against the original amount of ammo.
When the ammo runs out, it's hard-set to 2000 iron as that's the value of the sheet of iron that it gets set to by the end.
* Mech Ammo now properly respects ammo for custom materials.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Changes grenade proc names to be more clear (#55181)
Grenades have, for the longest time, used the proc name preprime() to refer to arming a timed grenade so that it will boom in a few seconds, and prime() to refer to the grenade actually going boom (or releasing foam or anything else grenades do when they go off). This was very confusing, so now these two procs are called arm_grenade() and detonate().
* Changes grenade proc names to be more clear
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
* Feex (#55144)
For whatever reason we hardcoded the health value for drills at 200 brute damage before they can gib. 200 brute damage was picked as it was double the max health of /mob/living/carbon/whatever and double the max health was like, the cap on brute damage when someone is really, really, really, really dead.
Enter simplemobs. Their max health is regularly under 100, which means a hardcoded value of 200 brute damage to trigger gibbing effects is bad. Not that it matters anyway, because simplemobs also brute damage cap at maxHealth instead of maxHealth * 2 so the only simplemobs that could be gibbed by mech drills are those with 200 or more health.
This has been changed. Simplemobs now cap out at maxHealth * 2 damage, in line with all other /mob/living while drill code has been changed to check for maxHealth * 2 when gibbing instead of a hardcoded 200.
* Fixes issue with mecha drills failing to gib most simplemobs.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Humans have more complicated body temperatures (#54550)
This changes how carbon/humans stabilize body temperature, and changes how damage and wounds are applied based on temperature.
Humans now have a core body temperature along with body temperature. The core temperature is used for natural stabilization and what viruses like fever and shivers target by raising or lowing the core temperature of the mob.
The standard body temperature still exists and acts exactly the same for most items at this time but is now treated as surface temperature in humans.
Damage from body temperature for humans is now based on the core temperature instead of body temperature now.
Humans will now receive burn wounds when the body (surface) temperature is to high for to long.
This causes you to see alerts for the area temperature before you take damage in most cases improving visibility of dangerous situations.
* Humans have more complicated body temperatures
Co-authored-by: NightRed <nightred@gmail.com>
* Prevents mecha drills from stacking do_afters on the same target. (#55145)
* Feex
* Feex 2.0 Feexlectric Feexaloo
* Whitespace purge
* Prevents mecha drills from stacking do_afters on the same target.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Moves grown food to newfood (#55040)
Moves grown food to newfood
Gives trash element support for callbacks for item creation override
* Moves grown food to newfood
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* minor material_container args/vars refactor and Mk-honk shoes peeve. (#54863)
My original intention was just fixing an issue with the Mk-honk banana shoes but, considering I didn't want to add two new variables to a component with already lot of args and lengthy AddComponent() calls in term of text, I had to merge some TRUE/FALSE variable/args into the breakdown_flags bitfield (now named mat_container_flags) in the process.
* minor material_container args/vars refactor and Mk-honk shoes peeve.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>