Commit Graph

21 Commits

Author SHA1 Message Date
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
c6f7c02137 [MIRROR] Fix radiation examine message ordering (#2311)
* Fix radiation examine message ordering (#55696)

When examining radioactive game objects, the message about their
radiation levels, such as "The air around the screwdriver feels warm",
or "The air around the uranium statue feels warm, and it hurts to look
at." will now be printed after the main body of the examine text.

The examine signal was being used to trigger `to_chat` calls, causing
the radiation message to be sent before the main examine text, "That's a
large statue of a pig."

The pronouns of the text have also been tweaked, so examining the
radiation of a pair of gloves, or a man will produce appropriate
messages.

* Fix radiation examine message ordering

Co-authored-by: coiax <yellowbounder@gmail.com>
2020-12-24 23:58:29 +01:00
SkyratBot
1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* 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

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
2020-09-09 08:19:23 +02:00
SkyratBot
3a0bbe9498 Acid Component (#53273) (#661)
Makes acid levels a component.
    Merges the acid effect object into the component.
    Reworks acids decay rates slightly.
    Rebalances xenos acid spit so that they can still melt through walls.

Misc. associated changes:

    Adds defines for a lot of the acid associated constants.
    Documents clean types and adds CLEAN_TYPE_ACID
    Adds and implements a return bitflag for COMSIG_COMPONENT_CLEAN_ACT
    Adds a looping sound for acid.
    Makes /atom/proc/acid_act return a boolean.
    Fixes waterclosets creating a new reagent holder datum every time they are used.
    Removes waterclosets regenerating reagents on-use and restricts their reaction volume to 5 units.
    Adds and implements a couple reagent signals.
    Renames a few vars so Rohesie can stop telling me to rename more vars.

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2020-09-07 03:52:59 +02:00
SkyratBot
e65a48e91f [MIRROR] Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#430)
* 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

* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-19 20:17:28 -04:00
Daniel Hultgren
bae9371da5 Cleanable cleanup (#52477)
* Don't initialize the atom_colours list on atoms until it's actually needed

* Moved bloody_hands var to mob/living/carbon/human instead

* Added COMSIG_COMPONENT_CLEAN_RADIATION signal to reduce moms spaghetti

The shower and suit storage unit now calls this signal instead of either doing it manually or doing it via the washed proc

* Cleaned up carbon washing, renamed washed to wash

* The wash proc now doesn't take the washer as first arg because that wasn't used anywhere
* The wash strength is no longer optional
* Carbons now overrides the wash proc instead of using the signal
* Properly check for obscuredness before washing any equipped items
* Properly wash all items and bloody hands etc
* Added clean_lips proc for humans for cleaning any lipstick

* Cleaned up washing. Washy stuff now calls wash instead of calling the clean signal directly

* Renamed is_cleanable to ismopable, gives this category a more fitting purpose. Many things beyond floor decals are cleanable. It is now also determined using the atom layer instead to make it more generic.
* Properly utilize the is_cleanable define
* Added wash override for turfs where they also wash any mopables on the same tile
* Space cleaner and cleaning element etc now simply washes the mob instead of doing its own manual cleaning on ~some~ equipped items

* Non-component washables now simply override wash instead of registering for the clean signal

* Fixed some left over clean signal registers not returning true

* Added clean_strength var to space cleaner

* Moved human wash proc next to the other washing procs

* Also wash glasses and mask if not obscured when washing face

* Fixed attempting to "scoop up" cleanable decals using a rag

* Fixed plasmaman spacehelm icon not updating when washed

Also removed a duplicated worn_overlays proc

* Fixed head icon not updating when washing lipstick

* Moved radioactive clean signal register to where it should be

* Added atom radiate VV verb for debugging

* Redesigned the CLEAN constants into a more sensible flags setup

This makes it more dynamic, cleaning apparatuses can clean more specific than just a cleaning strength.

* CLEAN_TYPE_* flags indicate a specific cleanable, such as blood, fingerprints or disease
* CLEAN_* consts consist of a combination of cleaning types to make cleaning apparatuses have a consistent behaviour on what they clean

* Fixed broken rad removal logic in showers

* Apply suggestions from code review

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

* Removed unneccesary bool from sink code

* Fixed wrongly named variable in turf wash

* Renamed bloody_hands to blood_in_hands

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-29 08:32:30 -04:00
LemonInTheDark
e807cf1208 Makes rads glow, buffs rad goggles (#51879)
* Adds a healthy green glow to contaminated objects

* Improves rad goggles, increases the range, improves the brightness, and raises the text above the mob layer

* God damnnit jared

* filters are sane now

* lowers max alpha, and starting alpha
2020-07-05 18:53:34 -04:00
cacogen
6298203cf0 Material wall/floor and floor tile name/desc changes (#50203)
* Renames material "plating" to floor, changes material wall desc to match regular walls

* floor tile

* Custom descs for walls and floor tiles based on material

* material tile throwforce 1 -> 5

* switch order of material flags on material tile

* Removes material flag and check

- Simplifies floor tile desc throwforce check

* Moves the throwforce message to examine()

* Gives more nuance to tile throwforce examine() messages

* Simplifies tile examine throwforce code

- Fixes problem with radioactive item examine of outputting a single period when too far away
- Adds spans to tile throwforce examine and radioactive item examine

* logic 10

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Adds throwforce message to examine return

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-04-05 21:31:42 -03:00
Emmett Gaines
9e34b3d6a1 Supports named arguments in AddComponent and AddElement (#49098)
AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.

InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.

As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
2020-02-17 17:57:52 +13:00
Buggy123
43ef5fb4b6 Fixes partial sentences when examining a radioactive object at a distance (#47835)
* Fixes partial sentences when examining a radioactive object

* Fixed missing period

* Fixed unintentional examine balance change
2019-11-25 16:10:36 +00:00
WarlockD
84f2055e2a Geiger counter will display the correct contamination values now. (#47032)
* Radioactive contamination stays on object if less than 9

When the process dies and the radiation contamination tick is less than 9, it will kill the radiation process but maintain the contamination level.  The geiger counter will then count up all the values and still maintain a high contamination total even though you aren't getting hurt by it.

* Update code/datums/components/radioactive.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>
2019-10-17 20:31:00 -04: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
Emmett Gaines
92706e548c Some radiation balance tweaks (#40066)
* Radiation toxin damage has been slightly increased.
* Contaminated objects are overall a bit weaker but are easier to create in the
  first place.
* Showers deal with high amounts of contamination much faster but aren't that
  great at dealing with weakly contaminated objects.
* Atmos holo-barriers have been given radiation insulation like the engineering
  ones.
2018-09-10 22:14:40 -07:00
Emmett Gaines
0943e56e08 Adds the signal origin as the first arg to all signals (#39861)
* Adds the signal origin as the first arg to all signals

* Fixes some storage and nanite procs
2018-08-28 18:28:29 +03:00
Emmett Gaines
34a3d2da4d Refactors component signals registration (#38798)
Datums know what signals are being listened for and components can now be registered to listen for signals on more than one object.
2018-07-05 00:56:39 +03:00
ninjanomnom
00a21c94f8 renames define to UNIQUE_PASSARGS 2017-12-19 18:15:00 -05:00
ninjanomnom
a93b957cb5 adds instanceless component dupe mode 2017-12-19 18:15:00 -05:00
Emmett Gaines
a5b129265f fixes radioactive half life (#32511) 2017-11-09 00:45:30 -06:00
Emmett Gaines
65606195a7 More radiation balance changes and fixes (#32051)
* more balance changes and fixes

* cleanup
2017-10-27 10:06:59 +02:00
Emmett Gaines
9d17e9c102 Fixes camera mobs becoming contaminated and other tweaks (#31731) 2017-10-14 19:39:51 -03:00
Emmett Gaines
456cd10d94 Radiation rework and subsystem (#30909)
* radiation rework and subsystem

* moves a few things to initialize and adds radiation insulation

* adds a radiation contamination mechanic and makes requested changes

I'm terrified by the possibilities from this

* radiated objects give off light

and hopefuly contamination is balanced

* fixes runtimes and an mc crash kek

removed the lighting part of contaminated objects
attempted some more balancing

* Collectors output power in process() gradualy

And some more balancing tweaks

* Excludes a bunch of things from becoming radioactive

* Ready for testmerge balancing

* Inverse square law was swapped

* testmerge balancing

fixes the geiger counter
buffs collector power gen
nerfs sm radiation
slightly buffs rad insulation
nerfs rad damage (and its burn)
raised the minimum radiation

* disabling the radiation subsystem won't build up rad wave datums forever

* rewrites how mobs handle radiation

upgrades geiger counter functionality
and more balance tweaks

* cleans up stuff and removes debug message

* Slight contamination buff

* Major rad wave performance boost

Also improves rad insulation
Buffs contamination, again

* Fixes insulation runtime

More balance and performance tweaks

* fixes rad collectors not receiving power

* The final balance commit

Fixes a major bug causing radiation to underperform
More geiger counter changes that will be changed more to add sounds

* Monkey business

* Geiger counter sounds

* cleanup and move components to their own initialize

* Some code cleanup

And forgotten changes

* Cleans up some trailing returns

* Mapping changes
2017-10-13 10:22:00 -04:00