Commit Graph

52 Commits

Author SHA1 Message Date
Fikou
6d07a89da8 mechs now use base_icon_state for their icon changes (#56480) 2021-01-31 00:28:01 -03:00
dragomagol
f837ce4397 Cyborg modules renamed to models (#56312)
Changes the references of borg module (type) to model, adds a file for robot declarations and one for model declarations. Basically trying to make the code layout a little more sane.

Initially changed them to 'configurations' but I prefer model; its meaning is closer to module than configuration and avoids confusion with actual config.
2021-01-22 21:38:35 +02:00
Timberpoes
13165ba703 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.
2021-01-17 19:51:33 -03:00
TemporalOroboros
976c1fcb8c [READY] Bespoke Datum Mats (#55296)
* Bespoke Material Backend

- Adds support for bespoke materials:
  - Reimplements [/datum/material/var/id]
  - Ports GetIdFromArguments from SSdcs
  - Adds a wrapper define for GetMaterialRef
  - Adds [MATERIAL_INIT_BESPOKE]
  - Adds [/datum/material/proc/Initialize]
- Does not actually add any bespoke materials

- [ ] TODO: Code docs
- [ ] TODO: Actually adding bespoke materials

* Some has_material procs and cleaning up some spaghetti

- Adds a pair of has_material procs for use in checking whether a given atom has a given material

* Adds meat

- Adds bespoke meat variants
  - Does not make them accessible
- Shuts up the linter

* Implements bespoke meat

- Makes the material container preserve bespoke materials
- Makes the sheetifier accept bespoke materials
- Makes the autolathe accept bespoke materials
- Makes the gibber produce bespoke meats

* Makes butchering produce bespoke meats

This is jank and really needs to be folded into a unified butchering and gibbing system

* Material documentation

- Adds, fixes, and touches up some documentation

* Material container insertion callback

- Changes the proc used to expand the material container's material list ot a proc used to check whether a material fits into a material container
- Instantiating new materials is no longer O(n) relative to the number of autolathes in existence.

* Makes processing meat conserve materials

- Makes bespoke meat carry over into meatballs

* Makes preserving custom materials an option

- Implements the ability to turn preserving custom materials _off_ for processor recipes

* Fixes all bespoke materials of the same type using the same singleton

- We use ids now, not just types.

* Makes the fat sucker produce bespoke meats

- Because consistency is good.

* Fixes autolathes merging bespoke stacks into normal stacks.

* Makes the callback to test materials for holdibility optional

- @Floyd

* GetMaterialRef -> GET_MATERIAL_REF

- We capitalize macros.

* Removes an extraneous callback

- Makes the sheetifier use functionality I didn't notice I implemented a few commits ago.

* Makes mob and species meat null compatible

* Fixes the ore silo

- The ore silo had really snowflake material handling that has been brought in line with the rest.
- The materials should show up in the correct order.

* Fixes minor lathe bugs

- Fixes stack_traces caused when lathes tried to fetch materials using reagent typepaths
- Fixed the selective reagent disposal topic. I have no idea how long this has been broken.

* Various documentation fixes

- Clarified a couple comments
- Removes an extraneous ?. operator
- Fixed mat floor tiles having bugged reagent temperatures

* More fixes

-/datum/material/meat/mob -> /datum/material/meat/mob_meat
- Adds atom typecheck to material containers.

* Fixes old typepaths
2021-01-15 23:39:58 -08:00
zxaber
93b2aa0820 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).
2021-01-11 01:37:48 -08:00
LemonInTheDark
6d1cb94ffb LINDA Reforged (#55604)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
2021-01-08 08:14:08 +01:00
tralezab
5ad6fd883f 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.
2021-01-07 14:31:24 -08:00
TemporalOroboros
0b02440a9a 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.
2021-01-03 22:58:45 -08:00
KathrinBailey
9ca6b4f1a9 Merry Christmas! Mechs receive damage from Xenos using their actual damage, instead of a hardcoded value (15). (#55736) 2021-01-02 12:46:29 -03:00
Ryll Ryll
998e101cae Fixes clown cars + Fixes mechs not being able to open doors (#55748)
* honk honk

* realized the speedbike and wagon are not sealed
2020-12-28 16:31:29 -08:00
zxaber
1b971c2d80 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.
2020-12-27 19:03:10 -08:00
Ryll Ryll
161c734e11 [READY] Refactors riding (#54778) 2020-12-24 02:17:29 -08:00
TemporalOroboros
863977e5fa Makes reagent updates more event based, also makes plasma boil properly. (#54790)
Converts most on_reagent_change calls to signals.
Converts on_reagent_change to a signal handler.
Expands the reagent exposure signals
Add a setter proc and signal for reagent temperature
Fixes adjust_thermal_energy not sending a temperature change event
Makes min_temp and max_temp actually do something with adjust_thermal_energy
2020-12-22 19:20:00 -03:00
Fikou
904b4be143 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
2020-12-21 00:54:21 -08:00
tralezab
ade6d47ed1 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
2020-12-18 13:52:55 -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
Qustinnus
8737e8cb80 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.
2020-12-07 13:04:51 -08: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
ArcaneMusic
87cb185d58 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.
2020-11-28 07:50:57 -03:00
Ryll Ryll
1b9777df1f 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().
2020-11-28 07:44:28 -03:00
Timberpoes
e7ff79bcbe 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.
2020-11-25 13:44:01 -08:00
NightRed
fb51b24d21 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.
2020-11-24 22:37:36 -08:00
Timberpoes
191b3cde38 Prevents mecha drills from stacking do_afters on the same target. (#55145)
* Feex

* Feex 2.0 Feexlectric Feexaloo

* Whitespace purge
2020-11-24 21:27:42 +08:00
Ghom
27d0e32b47 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.
2020-11-21 04:37:07 -03:00
TemporalOroboros
edd6500d78 /obj/screen --> /atom/movable/screen (#54403)
Repaths screen objects to /atom/movable
2020-11-08 23:07:15 -03:00
Jared-Fogle
477d97647e Move death(), gib(), and dust() from /mob to /mob/living (#54810)
These have no reason to exist on /mob, where they noop for any nonliving.
2020-11-08 10:32:04 -05:00
Ghom
97e21c8b7e Fixing multi-z defying mechas (AGAIN) (#54753)
I already fixed this issue almost a year ago, but the mecha refactor guy managed to revert the fix at the distance of 8 months.
2020-11-06 22:52:24 -05:00
TiviPlus
b067cbe7bd Fixes mecha rotate & spacemove sounds and makes stomping silence flag instead of null based (#54529)
* comit

* bump

* Update code/modules/vehicles/mecha/_mecha.dm

Co-authored-by: Couls <coul422@gmail.com>

* Update code/modules/vehicles/mecha/_mecha.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
2020-11-02 21:02:53 -08:00
InvalidArgument3
5cfc65fe3e [Ready]New walking and turning sounds for the Ripley Mk. I and II, interaction sounds for the hydraulic clamp (#54523) 2020-11-01 16:33:23 -08:00
zxaber
bc620ff88a Various fixes to mechs (#54595)
Vehicle objects now call bumpopen() rather than Bumped() when moving into an airlock, and thus will once again open any door the pilot has access to. Closes #54480

    Fixes Ripley MK-I to MK-II conversions destroying equipment.

    MK-I to MK-II conversions now sets the MK-II's integrity to be same percentage as the MK-I's integrity. Thus, upgrading a full-health MK-I will no longer result in a damaged MK-II.

    Both Ripley types no longer start with an orebox, that function has been moved to the Clarke.
2020-10-26 12:28:11 -03:00
TiviPlus
5e93efebf7 Mecha follow up 2 edition 2 (#54454)
fixes mech power not using deltatime
fixes a few mech bugs
moved mecha gun logging to attacklog instead of mechalog
2020-10-20 19:58:39 -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
TemporalOroboros
cab4313b29 Adds Alloy Materials (#53623)
Adds and implements alloy materials

Takes several materials that were mostly fluff and converts them into actual usable materials.
Messes with material code a bit to make alloys recycle back into their component materials.
Adds the alloy materials to their in-game stacks.

Materials added:
    Plasteel
    Plastitanium
    Plasmaglass
    Titaniumglass
    Plastitanium Glass
    Alien Alloy

Makes plasteel/plastitanium/plasmaglass and the rest able to have separate properties from their component materials. It doesn't make much sense that the materials used to seal off the supermatter chamber from the rest of the station would be prone to exploding when heated.

Allows for further expansion of materials, possibly including actual functional metallurgy and smelting at some point in the very distant future.

(Lemons note: Adds a regeneration component, used for alien alloy)
2020-10-09 12:23:40 -07:00
ShizCalev
48bff26867 Merge pull request #54098 from Timberpoes/dirty-do-after-fix
Minor tweaks and cleanup to mecha drill equipment's action code
2020-10-09 05:51:58 -04:00
spookydonut
2a0eac8772 Fix some potential sleeps as detected by SpacemanDMM improvements (#54230)
overrides weren't detected by should not sleep, i think i've mostly 
fixed that with SpaceManiac/SpacemanDMM#214

Some of these are wacky but overall this pr is harmless

signals shouldnt sleep even in weird 1 in a million situations or due 
to other people adding bad code

overrides of changeling can_sting() use alert() and input() and that's 
just too fucked for me to fix in this pr
2020-10-08 17:06:19 -07:00
TiviPlus
a30377f4bb More deletion cleanup (#53681)
- Observer mobs not delling correctly
- AI delling basically nothing
- pods not delling glow effect
- minor slime cleanup
2020-10-01 20:30:51 -07:00
Timberpoes
557fb0a3be Update code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2020-10-02 03:38:54 +01:00
Timberpoes
914f9dd4e4 Feex 2020-10-01 01:33:34 +01:00
Timberpoes
bd3af07f6f Feex 2020-09-30 09:37:31 +01:00
TiviPlus
31271f8984 Mining mechas refactors (#53676) 2020-09-28 15:15:07 -03:00
Timberpoes
1f23cc281d Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
2020-09-26 11:52:39 -03:00
Tad Hardesty
f80836d00d Fix broken dmdoc crosslinks (#53896)
- Backtick-escape code samples which contain `[]` syntax.
- Fix all crosslinks to nonexistent symbols.
- Somewhat improve docs for qdel defines, research defines, dynamic mode, and others.
- Remove unused bloodcrawling defines.

Some crosslinks to defined but undocumented symbols remain. For BYOND builtins, a future dmdoc version may link those symbols to their entries in the DM reference. Other symbols could be documented by a future PR.

New "file" crosslinks as used in `research.dm` are slated for release in a future dmdoc version.
2020-09-23 03:47:44 -03:00
TiviPlus
72fc7213ed Mecha medical and other_equipment refactor (#53637) 2020-09-23 02:40:16 -03:00
Timberpoes
2ef520fbf5 Fix comments that trigger new lint warning (#53737)
New lint catches potential fuckery with meme comments.

Now you know why every meme ////comment\\ had a newline under it in 
order to compile.
2020-09-15 18:50:10 -07:00
msgerbs
fb010a1dea Fix mechs not using power to move, gygax leg actuator button not matching actual state, and mechpads not working (#53624)
Fixes these issues with mechs:

    Mechs aren't using power to move (broken in #52902)
    Gygax leg actuator button is opposite of what it should be (off when it should be on) (broken in #52902)
    Mechpads don't actually send mechs
    None of the error messages for failing to move work
2020-09-12 18:16:14 +01:00
Donkie
53b212ddf2 Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component
2020-09-08 10:24:05 +02:00
TiviPlus
d4cdb49133 Mecha followup one (#53470)
fixes #53384
fixes #53327
fixes a bug where mechs could move too fast
fixes cooldown being inconsistent
makes strafe behavior better
fixes lights being very small

fixes #50639
fixes #47373
fixes #43605

Moved some code to the correct spots and did the varedit bitfield thing
2020-09-07 17:44:54 -03:00
TiviPlus
550e763433 Reenables SHOULD_NOT_SLEEP on initialize (#53378) 2020-09-04 20:44:08 -03:00
NightRed
52a0183e80 Cleans up extinguish_mob and prevents perpetual fire (#53252) 2020-09-02 19:48:50 -03:00