Commit Graph

21 Commits

Author SHA1 Message Date
ChungusGamer666
ce2a1185ad Renames COMSIG_ITEM_ATTACK_OBJ to COMSIG_ITEM_ATTACK_ATOM (#76112)
## About The Pull Request
 
For some reason this was missed when moving attack_obj() to /atom level.

## Why It's Good For The Game

It peeves me that this signal is misnamed
2023-06-18 18:48:01 +08:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
MrMelbert
d755b70d76 Removes bad nodamage var from projectiles, fixes Juggernaut / Rust Walker projectiles doing zero damage (#73806)
## About The Pull Request

- Juggernaut and Rust Walker projectiles were subtyped off of magic,
which is `nodamage`.

- The juggernaut actually had a copy+paste error with their type
`on_hit` which caused none of their special effects on hit ("relative
patching catches this")

- Then I realized projectiles have this var `nodamage` which is, for all
intents and purposes, just `damage > 0`. it's not checked for pacifism,
it's just that. This is dumb. So very dumb, so I removed it.
- There are, however, a few situations which used it in a unique way,
such as the blast wave cannon. This is why I replaced it with a proc,
`is_hostile_projectile`, for certain situations to actually find out if
the projectile is damaging. Projectiles can override this on a per type
basis by default, damaging projectiles = hostile.
- This has a chance to break some things, but I ... kinda doubt it will.

Fixes #73756

## Why It's Good For The Game

Projectiles that act as they should, less dumb vars

## Changelog

🆑 Melbert
fix: Fixes Juggernaut / Rust Walker projectiles doing zero damage
fix: Fixes Juggernaut projectiles not doing bonus damage to nearby
structures
code: Removed projectile nodamage var, replaces it with just checking
for damage
/🆑
2023-03-10 17:51:31 -07:00
Mothblocks
fa7688d043 Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED (#71056)
- Makes QDELETED use isnull(x) instead of !x, giving about 0.2 to 0.25s
of speed.
- Make disposal constructs only update icon state rather than go through
expensive overlay code. Unfortunately did not have much effect, but is
something they should've been doing nonetheless.
- Makes RegisterSignal only take signals directly as opposed to
allocating a fresh list of signals. Very few consumers actually used
this and it costs about 0.4s. Also I think this is just a bad API anyway
and that separate procs are important

`\bRegisterSignal\((.*)list\(` replaced with `RegisterSignals($1list(`
2022-11-22 07:40:05 +00:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
Tim
8f59a6dbac Fix plasma cutter or guns that burn not being able to ignite plasma (#69584)
* Plasmacutter projectiles now deal BURN instead of BRUTE
* BURN projectiles now properly detonate plasma and explodables.
2022-09-14 23:43:58 -04:00
magatsuchi
7d0f393f5d Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code (#67478)
Currently, storage works as a subtype of /datum/component, utilizing GetComponent() and signals to operate. While this is a pretty good idea in theory, the execution was pretty trash, and we end up with alot of GetComponent() snowflake code (something that shouldn't even need to be used frankly), and a heaping load of scattered procs that lead into one another, and procs that don't get utilized properly.

Instead, this PR adds atom_storage and proc/create_storage(. . .) to every atom, allowing for the possibility of storage on quite frankly anything. Not only does this entirely remove the need for signals, but it heavily squashes down the number of needed procs in total (removing snowflake signal procs that just lead to one another), reducing overall proc overhead and improving performance.
2022-07-08 18:13:18 -07:00
vincentiusvin
80638cc748 Fix explodable component attack targeting check to be in line with the comment (#66483) 2022-04-30 18:14:12 -05:00
vincentiusvin
6a0422d121 Fix putting plasma cutter blowing you up if you have plasma equipped. (#66485)
loops through possible places when you try to put an item in. If you happen to be holding a plascutter which is hot, its gonna try to insert it into the plasma stack and blow you up.
2022-04-25 11:46:42 -07:00
TemporalOroboros
11ccf19741 Makes sure COMSIG_ATOM_EX_ACT is always called. (#63685)
Creates a wrapper macro for ex_act() and moves the signal and contents explosion calls to there. This way we can ensure the signal is always fired. Also desnowflakes reagents responding to explosions.

Ensures that a signal is always called when the attendant proc is called.
2022-01-06 18:45:53 -08:00
vincentiusvin
3bb8424d78 Makes welding plasma bars/statues/floors use flooder component (#63154)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-12-08 16:14:28 -08:00
MrMelbert
09758ba01e renames damge -> damage (#60647) 2021-08-02 18:14:14 -07:00
Swept
a757971a7e Fixes typo in explodable.dm (#59050) 2021-05-13 04:13:34 -07:00
TemporalOroboros
9f598a9662 Makes the explosive compressor and blastcannon actually use the TTVs they're given + the explosion changes to support that. (#58015)
* Adds explosion SFX to the blastcannon and explosive compressor

- Extracts the explosion SFX and screenshake proc from the SSexplosions explosion handling proc and lets the explosive compressor and blastcannon use it.

* Miscellaneous changes

- Adds defines for the internal explosion arglist keys
- Reverses the values of the explosion severity defines
- Changes almost everything that uses `/proc/explosion` to use named arguments

- Removes a whole bunch of argname = 0 in explosion calls.

* Removes named callback arguments.

* Changes the explosion signals to just use the arguments list

Adds a simple framework to let objects respond to explosions occurring inside of them.

Changes a whole bunch of explosions to use the object being exploded as the origin of the explosion rather than the turf the object is on.

Makes the explosive compressor and blastcannon actually use the TTVs they are given.

Adds support for things responding to internal explosions.
Less snowflake code for the explosive compressor and blastcannon calculating bomb range.*
Less confusing explosion severity defines.
Less opaque explosion arguments

*does not guarantee that the solution to letting them actually use the TTV is any less snowflake.
2021-04-26 17:31:25 -07:00
Jared-Fogle
45c14f6330 Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
2020-08-20 09:11:28 +12:00
JJRcop
a1392847bd Remove ismovableatom macro (#9) 2020-02-17 15:03:16 +01:00
Time-Green
980837fc79 PLUMBING: Lavaland geysers, pumps and regrettable balance decisions! (#49067)
Implements the geysers and pumps I originally added along with the first draft of plumbing.

Geysers
A geyser can be plungered with a reinforced plunger to activate. At wich point, it'll either produce clf3, hollow water, protozine or rarely wittel.

Pumps
Adds the liquid pump to the plumbing RCD. Place on an active geyser and wrench it to start pumping the geyser of its delicious juicess. I also changed it to not use power, because it would be awful drawing kilometer long wires along with the ducts.

Chems
Hollow water works basically like blood and mutage, where you can mix it with 1 unit of holy water for more holy water.

Protozine has a .2 healing, down from omnizine's .5. The healing is just kind of a side thing and not really what this chem was implemented for.

If it wasn't obvious, this allows chemists to industrialize strange reagent creation, with hollow water being able to create limitless holy water alongside protozine being a valid replacement for omnizine. Getting 2 geysers with those chems and on lavaland is quite the hassle, and you still need to get some holy water from the chaplain as kickstarter. I honestly think this is fine, and otherwise I could add a unique botany catalyst, so they don't become useless in the process.

Wittel
Adds wittel, wich is rare. Does nothing, but can be processed into two fun/regrettable chems.

Adds gravitum. Metabolizes very slowly. Drinking it makes you weightless, and spraying it makes that object temporarily weightless. Make 10u by mixing 1 wittel with 10 sorium

Adds metalgen. Created by mixing it with mutagen and bluespace powder. Must then be mixed with 40u of a powedered material and 1u of liquid dark matter.
The material used becomes imprinted on the chem. It can then be applied to anything, except mobs, to turn it into that material. Radiation is bad, and no you can't turn the nuke into plasma to blow it up.
The chem is difficult to get and use, but it can turn the escape shuttle into solid gold wich looks really cool. You could also turn it into plasma and vaporize everything. It can be used to, with some effort, duplicate materials.

🆑
add: Adds geysers to lavaland! They can be activated by using a reinforced plunger found in the medical vendor. They can be harvested by using a new plumbing device, magically powered liquid pumps!
add: Adds Hollow Water to geysers, wich can be combined with Holy Water as catalyst for more Holy Water
add: Adds Protozine to geyers, a very weak version of Omnizine. Can be used in Strange Reagent mixing
add: Adds Wittel, a very rare geyser chem. Can be processed into gravitum, wich removes gravity. Can also be processed into metalgen, wich has a strange tendency to transform objects into the imprinted material.
/🆑

Why:
This is what I originally wanted to do. The idea was to have a lot more chems, but I can't focus on one thing for that long. Hopefully this'll empower the bored chemist and make the rounds just that more interesting. Hopefully this'll spark the creation of some other geyser chems aswell.

That and makes shaft miners not the only ones hunting on lavaland.
2020-02-17 21:33:19 +13:00
actioninja
d4ada061a1 less log spam to mat explosions 2019-10-24 18:21:42 -07:00
Qustinnus
908ccfe7b3 Fixes some material datum bugs (#47049)
* fixes

* chair

* ass

* fixes

* dumb

* done

* fix
2019-10-14 00:36:56 -04:00
nemvar
dc783795db Renames is_hot and is_sharp to get_temperature and get_sharpness (#46680) 2019-09-23 14:02:59 -07:00
Qustinnus
b33d1c49a3 [READY] Floydmats (Datum materials) & custom toolboxes (#45118)
* Initial work

* more

* ass

* wsedfwedff

* asss

* test

* stuff

* fuck

* sss

a

* kms

* asdadwedwdfwefwef

* start

* test

* dwwdew

* ewefwfef

* Redemption machine (#8)

* Redemption machine

* Removes debug messages

* changes

* fuckmyshitup

* coin mint works with new material shenanigans (#10)

* Auto stash before merge of "materials" and "origin/materials"

* woops

* furnace (#11)

* autolathe manufacturing of toolboxes

* eggs in a basket

* some small changes

* matcolors

* documentation

* more documentation and effects

* done

* Color man bad (#12)

* fixes designs

* ass

* more fixes

* fuck me

* firestacks adder

* epic fixes

* fixes designs

* DONE DIDDILY DOO

* removes category macro

* ch-ch-ch-changes

* fixes some stuff

* Fixes display of ore values (#9)

* Redemption machine

* Removes debug messages

* Re-adds value display

* Replaces the fire stacking component with an element instead (#13)

* fixes examine

* fixes ligma bugs

* double ligma boofus

* fix

* misses some defines

* fixes ORM

* Update code/datums/components/material_container.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* fixes

* Makes glass objects weaker (#14)

* Makes glass objects weaker

* uses correct proc

* fixes shit

* honk honk

* better

* oh shit oh fuck

* fixes

* fuck ORMs

* fixes the biogen

* documentation

* ass (#15)

* component

* changes

* ass

* ass

* doc

* Auto stash before merge of "materials-plasmacomponent" and "origin/materials-plasmacomponent"

* fixes rounding

* fixed
2019-07-24 11:27:01 -04:00