Commit Graph

1808 Commits

Author SHA1 Message Date
Ghilker
b95c0366a4 _HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
2021-10-05 20:22:57 +01:00
Ghilker
682e7132b5 cleanup of _HELPERS/game.dm (#61859)
some more cleanup, game.dm this time
2021-10-03 16:51:52 -04:00
Mooshimi
496a7685dc [MDB Ignore] Make shuttle windows deconstructable (#61694)
* shuttle windows

* refactor reinf windows

plasma and shuttle only

* messed up one change

* i am actually blind

* made and did file
2021-09-28 20:45:38 +01:00
tralezab
6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## About The Pull Request

stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it

for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## Regex used:

procs without args, not even regex

`/Initialize()`

procs with args
`\/Initialize\((?!mapload)((.)*\w)?`

cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
2021-09-24 17:56:50 -04:00
Timberpoes
16d541e975 [TM Candidate] Overhauls orbit and POI code to fix part of issue #61508 where players could observe /mob/living/new_player on the lobby. (#61509) 2021-09-22 15:54:15 -07:00
Timberpoes
cbc6f35f54 Things that love the station may no longer leave the station, even when Dr. Anomaly says they should. (#61335)
Bluespace anomalies detonating Move() things. When something is Move()d, none of the logic in forceMove() or doMove() is called, and thus stationloving things can't tell when they've left the z-level (since that's where the logic for it is).

There are a number of approaches I could have taken: Refactoring anomalies to use different movement code. Refactoring Movement code to send more signals in various scenarios. Refactoring the stationloving component.

I settled on two steps. First, refactoring the component to bring it up to modern code standards. Second, moving the logic for COMSIG_MOVABLE_Z_CHANGED to Moved() so the signal always fires regardless of if Move() or forceMove() or doMove() is used, with an optional var for whether the z-change is communicated to contents. This means the ore box was changed to actually send the signal instead of just returning with no parent call or signal sent. Stationloving ore boxes when?

stationloving procs no longer call SIGNAL_HANDLERs directly. Var names are now more descriptive. Things are renamed and documented. At least for the parts of the code I know.

Probably some other code cleanups.
2021-09-18 17:29:55 +01:00
小月猫
56e568bef9 fix aux base console (#61306)
the Auxbase console is a subtype of consoles, despite being a wallmount, therefore it inherits consoles density = TRUE, despite being on a wall

this means that you get THIS ..... its on the WALL and the tile is EMPTY, but you cant step onto it, because the consoles there technically and dense

(I feel i should clarify before its asked: when a console is deconstructed it spawns a new console frame and copies the circuit over, that new frame will be dense again. so it only lacks density once its finished and on the wall)
2021-09-14 19:20:36 -07:00
TiviPlus
62d1bc2536 Lavaland bottle holyness correctly not a species trait (#61409)
This is not a species granted trait, seems it was like this out of laziness but correct me if you know better
(Arm: It's just a remnant of angel's being a species in the past)
2021-09-14 18:33:13 -07:00
Ghom
20468c3f15 Baton refactor. item/melee/baton is now a subtype of item/melee/baton (formerly classic_baton) (#61207)
Merged the item/melee/classic_baton and item/melee/baton families in this unholy matrimony.

Bad jokes aside. I have refactored the underlying code of both items with the scope of reducing potential copypasta,inconsistencies, logging, renewing some old code (like teleprods) and extending the anti-dual batoning and TRAIT_STUNRESISTANCE code** to all batons and not just security ones. Otherwise, I have tried to maintain the gameplay functionality of these items intact. They work just like they did for the most part.

** A badly designed feature that only considers one source of knockdowns - stunbatons - out of a multitude of different devices with corresponding purposes present in the game. The only thing it does is reduce the knockdown from them by 90%. The stamina damage and confusion are fully applied. The knockdown from batons is 5 seconds, standing up takes an extra 1 second and the baton cooldown is about 2.5. Doing the math, you'll have the grand advantage of one puny second of not lying horizontal on the floor with this trait before getting batoned again by the same guy because the stamina damage and the confusion have really hampered your chances of getting some distance. I wish to make the trait suck less in the future, but for now I'm including a slight gameplay change here, more for consistency than anything because as I already told you, it'll still be disappointingly bad per se.

The abductor baton is also no more a subtype of stun batons but batons, which don't use power cells to work. Its power cell is effectively infinite and can't be removed, and It overrides functions such as toggling the baton on/off. It hinders maintainability to keep it a subtype of stun batons.

Replaced the anchored check for mobs in teleprods with one for overwhelming move resistance and removed its clumsy_check copypasta (it was stunning clowns twices).
2021-09-09 16:40:20 +01:00
Tim
9eec84f84c Fix wormhole jaunter behavior with chasms and EMP (#61055)
Wormhole jaunters will now save the user from a chasm if they fall in and it's on their belt. Wormhole jaunters also are affected by EMP correctly. Before it would only be affected by an EMP if it was in the belt storage area which made no sense.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>

(Lots of good work here, thank you tim)
2021-09-08 17:13:07 -07:00
Kylerace
d9ee5e7297 moves obj_integrity and associated procs to the atom level (#61183) 2021-09-06 04:07:26 -07:00
Seris02
5ffbabe025 makes fake artefacts better (#61185)
adds the lefthand and righthand icons to the artefact, and gets rid of the big blue x overlay
2021-09-05 11:45:58 -04:00
Ghom
1325c3b6c2 Fixes a regression about skeleton pirates not having milk bottles. (#61217)
* Fixes a regression about skeleton pirates not having milk bottles.

* aaaa
2021-09-04 23:00:37 +02:00
Ghom
38b81ec732 Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS. (#61166)
* Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS.

* build warning and codermonky's advice.
2021-09-04 13:35:24 +08:00
tralezab
38000dfa10 partially fixes medical phobia by splitting dice bags off of pillbottles as a subtype (#61015) 2021-09-03 21:21:53 -07:00
Tim
f695be9ce7 Fix staff of lava not terraforming lava (#61096)
Lava staffs were not terraforming regular lava into empty tiles. This is because it was only checking to see if the lava type was the same weak lava the staff spawns. It has now been fixed to check for all lava types.
2021-08-31 23:43:17 +01:00
Ghom
699563c233 lava and weather immunities refactor (also jump boots fix) (#61003)
In remembrance of all those people who used jump boots to cross lava unaware of an issue c*ders wouldn't fix....

EDIT: This is now a lava and weather immunities refactor:
Weather immunities are now status traits since they have a multitude of sources (especially for lava) which might conflict with one another otherwise.
The lava burn_stuff proc has also been been refactored in different procs, mostly because of that snowdin subtype with inconsistent, old checks.
Weather datums should now use can_weather_act instead of weather_act to check if something can be affected by weather or not, as they should.
All movables can protect contained mobs if they have the relative weather immunity traits. This works at any contents depth.
No more snowflake weather_protection variable for closets.
Removed the weather_immunities list from living mobs (simple animals still have it but it's only for traits assignment on init because way too many child types lack the immunities of their parents).
Removed some unused defines.
Renamed some variables as per guidelines.
It has been tested.
And yea, jump boots fixed because that's the original scope of this PR.

(Initially just made throwing make you fire immune, that was blocked because it breaks perma stuff, instead it ended up be a refactor to make jumpboots usable with weather immumnity stuff
2021-08-31 14:07:19 -07:00
AMonkeyThatCodes
46cb925af0 Basic Mobs: the cooler simple mobs that run on datum AI. (With reworked cockroach AI as proof of concept) (#60694)
Simple_animals / mobs are the biggest lie in this code-base. They're far from simple and have an extreme god-object problem. Especially when you get to /hostile, where there is so many procs, vars, and what not, that you can't make any interesting additions without snowflaking the hell out of the code.

This PR hopes to help kill this problem by introducing a new /living subtype, /living/basic. The idea of this refactor is to slowly start moving all old simple_animals to this new system, moving over behaviors like charging and more extravagant mobs like megafauna over bit by bit similar to how newfood was implemented.

One of the other big goals of this refactor is to move many of the fringe simple animal behaviors into either AI datums, or components/elements. (Some of which still needs to be done in this PR).

As a proof of concept, I created the base mob/living/basic, and moved cockroaches over to the system. Since cockroaches have both a passive, melee and ranged mob.

This PR does slightly affect balance as the behavior isn't 1-on-1 due to it no longer running on the janky /hostile behavior, but I tried to keep the effects to a minimum, and the glockroach and hauberoach are not spawnable through many means as far as I know.
2021-08-30 16:22:24 +01:00
TiviPlus
e629c36feb Refactor area and turf lighting (#60954) 2021-08-25 15:07:38 -07:00
Wayland-Smithy
fcb4f174d6 fix null owner (#60928) 2021-08-23 14:22:32 -07:00
MrMelbert
b3e8eebdc9 Kills /obj/item/melee/transforming, replaces it with a transforming weapon component (#60761)
This PR kills off the transforming subtype of /obj/item/melee and replaces it with a component to handle the transforming behavior, /datum/component/transforming.

The transforming component handles updating the variables of an item when it's transformed. Things like force, sharpness, whetstone force bonus, and attack verbs. Similar to the two-handed component, but instead of transforming into a two-hander it remains a one handed weapon.

The "nemesis" behavior (dealing addition damage to certain factions) of the transforming subtype was moved to the cleaving saw only, since it was the only transforming item that used it. In the future, this can be made into a bespoke element/component as well.

The following weapons and items have been updated to use this component:

    Energy Swords / Sabers / Bananium Energy Sword
    Energy Circular Saw
    Energy Dagger
    Energy Axe
    Toy Energy Sword
    Holographic Energy Sword
    Switchblade
    Advanced Medical Tools (Laser scalpel, Mechanical Pinches, Searing Tool)
    Advanced Engineering Tools (Hand Drill, Jaws of Life / Syndicate Jaws of Life)
    Combat Wrench
    Cleaving Saw
    Telescopic Batons / Contractor Batons
    Roasting Stick
    Telescopic Riot Shield
    Energy Shield / Bananium Energy Shield

This PR also touches up the code around the various above items.
2021-08-23 11:45:54 -07:00
Watermelon914
ffe2750744 Refactors connect_loc_behalf into a component (#60678)
See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)
2021-08-17 12:16:12 -07:00
EOBGames
b08632353c [MDB IGNORE] Eliminates Toxins (#60619)
Repaths everything referring to "toxins" while actually meaning either the room in science or plasma gas. While this PR might be disrespectful to our forefathers, given this is (I believe) a holdover from as far back as the Exadv1 days, this has constantly irked me since I started working with the code. None of the player-facing stuff has referred to plasma as toxin since before 4407 hit, besides the Toxins Lab, and yet all of the type-paths are still pointing at toxins, making it a nightmare to search for in a map editor, and making the code needlessly easy to confuse with that of toxin damage. So this just fires it into the sun.

Anything relating to Toxins, the science subdepartment, now makes reference to Ordnance instead. This felt fitting enough given the focus of the subdepartment is around the creation of and testing of explosives.
Anything relating to plasma gas has, fittingly, been made to refer to plasma gas.

Edit: Ah yes, I feel I should probably apologise off the bat for the size of this PR- the code touched is mostly atmos machinery and simplemobs, a few sprites here and there, and of course the station maps + a few offstation maps.

Makes the code more legible and makes mapping less painful.

(The payment has been made)
2021-08-17 11:49:47 -07:00
LemonInTheDark
cd576ab519 Del The World: Unit testing for hard deletes (#59612)
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
2021-08-15 21:09:26 -07:00
Fikou
e09732cd40 removes unused soulscythe icons, fixes its resistance flags (#60770) 2021-08-11 23:01:18 -03:00
Fikou
270acce4f5 [Ready] Mining Loot Rework (#60516)
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-08-08 02:22:34 -07:00
Ghom
25a1804e70 Converts the footstep component into an element. (#60479) 2021-07-29 03:35:51 -07:00
itseasytosee
447b43fa17 Meat-hooks and changeling tentacle's firing pins are no longer visable (#60455)
Adds a Boolean to mark guns as "pinless" so they don't care about or show firing pins
2021-07-28 17:35:10 -03:00
Rohesie
a8a9b6ad44 Fixes an examine() runtime (#60248) 2021-07-16 20:06:42 -07:00
Sheits
7676a09f5f Fixes the flightpotion check to include new races (again) (#60084)
Flight potions now work on fly people, androids and skeletons.
2021-07-16 19:47:02 -03:00
Y0SH1M4S73R
38eabc1143 Corrects the grammar of spectral blade ghost notifications (#60189)
Uses src.name instead of src in the spectral blade's ghost notifications so that you see "his/her/their spectral blade" instead of "his/her/their the spectral blade".
2021-07-14 04:11:59 -03:00
Kylerace
5d6e93510f makes a bunch of lists that use typecacheof() static. doesnt find out why its overtiming at all but what the hell it helps (#60147)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-07-12 14:08:46 -07:00
Time-Green
8a7f258171 The Great Species Dedatumming: External feature organs, part 1 (#59981)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-07-08 08:27:19 -07:00
interestingusernam3
31942bda5b Cleans up and DMdoc's lazarus_injector.dm. (#59937) 2021-07-04 16:40:04 -07:00
Fikou
b7c2c9134e hiero dash now doesnt work on blocked turfs (#59983) 2021-07-04 16:37:51 -07:00
Rohesie
2c5a357035 Reverts Entered() passing dir instead of old loc (#59910) 2021-07-01 17:06:42 -07:00
Sheits
52283197a6 Paradox bag resprite and rework (#59779)
Paradox bags can now be worn on the belt slot instead of the back, while being able to carry less (it can still fit inside bags).
Adds new sprites for the icon and belt.
2021-06-28 10:56:33 -03:00
Rohesie
82dc71c3ae CanPass refactor (#59804) 2021-06-25 13:36:00 -07:00
LemonInTheDark
6fcbce39cd Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel
2021-06-22 23:12:34 -04:00
Fikou
24549d707b Toy Update (#59754)
* code

* sprite part 1

* sprites and mapping

* wa

* fix

* warden figure fix

* warden fix 2

* wahwah

* Update code/game/objects/items/toys.dm

* series

Co-authored-by: tralezab <spamqetuo2@gmail.com>
2021-06-22 00:17:26 -07:00
Rohesie
e03cd1aada Refactors move procs to support multitle objects (#59658)
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.

Cleaned up a lot of code around and made proc inputs compatible.

I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.

Tested this locally and as expected it didn't impair movement nor produced any runtimes.
2021-06-20 14:55:37 -07:00
Emmett Gaines
5adb8df64a During unit tests, does extra verification on text based overlays (#59553)
This makes it so during unit tests, adding a text based overlay to something will runtime if the icon does not have an icon state matching that text. I would do this during normal compiles as well but getting the icon states from an icon is surprisingly expensive.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-20 14:02:01 -07:00
Rohesie
0ec599786a Adds a setter for density (#59529)
Adds set_density()
Fixes one instance of a duplicate density assignment on an object.
Comments two hacky usages of density which will have to forgo using the setter for now.

Lets us append code to the event of density changing.
Pretty sure this is leading up to some multitile object thing -Lemon
2021-06-16 15:06:10 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
TemporalOroboros
daec5002fc Adds Neon Carpet (#59140)
Adds a couple varieties of neon carpet.
Makes decals care about their plane in addition to their layer.
2021-06-13 15:40:53 -03:00
EOBGames
b05af8b31d Add Lizard Food: a Taste of the Homeworld (#59412)
The aims of this commit are threefold:

 - To introduce lizard culture (based upon Common Core) in a tangible way.
 - Give some more variety of techniques and recipes to the chef and bartender.
 - To give some flavour (metaphorically and literally).

🆑 Inept, Coiax, AdipemDragon, YakumoChen
add: The release of the new cookbook, "Tiziran Cooking: a Taste of the Homeworld" has brought Lizard food to the masses! Try out some new treats, like Moonfish, Nectar Larvae, and perhaps even Headcheese at the kitchen today!
add: To coincide with the new popularity of Lizard cuisine, Nanotrasen now stocks seeds for Korta Nuts, a common ingredient in lizard cooking, in the Megaseed vendors. Botanists, you know what to do.
add: A few Tiziran fish are also available for you aquaculture lovers out there. They all like saltwater!
add: A few new snacks are also now available at the station's snack vendors, for those of you too lazy to visit the kitchen.
/🆑

Co-authored-by: coiax <yellowbounder@gmail.com>
2021-06-12 20:01:44 +01:00
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
Rohesie
d990b71da2 set_anchored() (#59532) 2021-06-08 12:07:34 -07:00
Emmett Gaines
43c5dc8bfa Makes obj_integrity only updated through procs (#59474)
Having things updating integrity directly is just going to cause more problems down the line as more elements and components depend on being notified of integrity changes. It's an easy mistake to make so making it private should deal with the problem.

get_integrity() might be useful in the future but is mainly a side effect of making obj_integrity private as that also disallows reads.
2021-06-04 11:48:05 -03:00
MrMelbert
3e355b091c GAGS Lizard Plushes (#59323)
* greyscale lizards

* repathing

* uses set greyscale

* mapped sprite
2021-05-27 19:50:36 +02:00