Commit Graph

22 Commits

Author SHA1 Message Date
Y0SH1M4S73R
93d03dc6bb [Alternative to #6407] Makes mutant bodyparts and mutcolors into editable genetic traits (#6750)
* Makes mutant bodyparts and mutcolors into editable genetic traits (plus a whole shitload of otherwise out of scope code improvements because I just HAD to touch old code)

* Mirror

* genetically-editable mutant bodyparts and colors - skyrat edition

Co-authored-by: Funce <funce.973@gmail.com>
2021-07-08 16:04:19 +01:00
SkyratBot
70f511a803 [MIRROR] Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. (#6630)
* Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. (#59873)

Fixing the following runtime:

[17:13:04] Runtime in to_chat.dm,88: Empty or null string in to_chat proc call.
  proc name: to chat (/proc/to_chat)
  usr: Cowboy_penis_monster/(Zackary Mason)
  usr.loc: (Telecomms Control Room (105,89,2))
  src: null
  call stack:
  to chat(Zackary Mason (/mob/living/carbon/human), "", null, "", 0, 1, 1, 0)
  the forensic scanner (/obj/item/detective_scanner): add log("", 1)
  the forensic scanner (/obj/item/detective_scanner): scan(Control Room (/obj/machinery/door/airlock/command/glass), Zackary Mason (/mob/living/carbon/human))

Forensic scanner attempting to add "" to the logs, which eventually gets output to_chat.

Tracked error down to forensic component lazylists and the fun of trying to OR two lazylists together.

* Fix forensic component inheritance inserting null entries into lists and causing to_chat errors.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2021-07-01 22:56:49 +01:00
SkyratBot
c9cee159a5 [MIRROR] Add Show Hiddenprints action to VV on atoms (#5212)
* Add Show Hiddenprints action to VV on atoms (#58657)

This displays the hiddenprint log from /datum/component/forensics in a simple to view form, sorted by last touch. I didn't make it fancy, it's very bare bones.

I could have refactored hiddenprints to use lists in lists, which would make getting data out a lot easier, but I worry about the additional memory overhead on every atom that gets touched, so I left it as strings in lists. I did reformat it a little bit, however, to make it simpler to sort, and it looks a little nicer. Namely moving the timestamp in front of the name.

It can help a lot in admin investigations on whodunnit. Right now they have to look at the forensics component, and that's if they even know about it. This way it is discoverable by using the VV tool.

* Add Show Hiddenprints action to VV on atoms

Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
2021-04-26 11:55:11 +01:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
8029db90ec [MIRROR] Fixes decals causing 20k runtimes and blood not cleaning (#1041)
* Fixes decals causing 20k runtimes and blood not cleaning (#53967)

decals will unregister signals and wont try to clean twice

* Fixes decals causing 20k runtimes and blood not cleaning

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2020-09-29 12:27:54 +02:00
SkyratBot
29b79b3350 [MIRROR] Refactors decals to an element (#973)
* Refactors decals to an element (#53922)

* Refactors decals to an element

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2020-09-25 13:38:52 +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
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
oranges
0267bce949 Turns out a bunch of components do not properly transfer because of (#42691)
one of three things.

    1. They don't use RegisterWithParent or UnregisterFromParent to unregister
       and register signals

    2. They use callbacks which refer to a source object, which is usually deleted
       on transfer, or lost in some manner, or simply makes no sense at all to be
       transferred

    3. the component was never designed to be transferred at all

TransferComponents gave no shits about any of this and just blindly transferred
all components, if they were actually capable of it or not.

I only noticed this because it was causing chairs to break as they would not register signals
and verbs correctly for rotation after being picked up and then placed down, and a player
reported that issue via ahelp.

Luckily we caught it before the rot got anywhere, only chairs and the shuttle subystem
tend to use this proc (Shuttle uses it on turfs), can you imagine if everything was using
this LMAO

Which is good because it's more dangerous than a loaded gun

I have added a can_transfer var, that is true when a component is valid to
actually transfer, which means the dev has actually thought about what happens when
you take the parent object away and swap it for another and all the crazy that is entailed
by this

I have done my best to audit what components are actually
transferable, but things are basically a hot mess (Thanks @Cyberboss )

The following components required edits:
Forensics:
did not register/deregister the clean_act signal properly, did not checkblood on new parent

Rotation:
did not use RegisterWithParent or UnregisterFromParent, turned out
to not be transferable anyway due to having callbacks that can be
passed in to the parent with unknown sources that we can't feasibly
reuse (i.e if you're transferred from a chair to a bed, your old rotation
call backs are no longer valid). Turns out the use case it was for (just chairs)
didn't need it anyway, so I just made it non valid for transfer.

Wet Floor:
Honestly this one is just a hot mess, it should be a subtype of the slippery
component with the extra wet turf handling.

As it is it basically manages a slippery component on top of it's own extra
functionality, so that's a major code smell.

I added registration/unregistration of the signals, and made it's pretransfer
remove the slippery component and the posttransfer add it back (via update_flags)

Components that seem transferable without issues
mirage_border
orbiter
decal
spill
storage (I hope to earth)
2019-03-05 20:27:29 +01:00
ShizCalev
597bf9b557 [s] Improves AI, turret, and door logging (#41327)
cl ShizCalev
admin: Fixed AI fingersprints not getting logged
admin: Fixed some door interactions not being logged at all.
admin: Turret control interactions are now in mob combat logs
/cl

Fixes #40203

Semi WIP. Good to merge for the most part, but I would like to add logging in a couple more spots.
2018-11-12 20:54:58 +13:00
ShizCalev
696cc932ce Fixes forensics add_fingerprint runtime 2018-10-04 02:46:38 -04: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
Jordan Brown
a1b89c3643 Removes redundant COMPONENT_INCOMPATIBLE crashes (#37389) 2018-04-25 06:53:43 -04:00
Jordan Brown
fec2d66318 Datum var cleanup (#34314)
* Consolidates datum var location

* Move ui_screen to /datum/tgui

* Move focusers to datum.dm. Move fingerprintslast to /atom

* Remove focusers list, makes mobs check if their focus is QDELETED in Life()

* Consolidate use_tag and var_edited into datum_flags

* Revert garbage comment

* Thought I already removed this

* Remove the var_edited preservation

* Removes focus QDELETED handling
2018-01-21 22:38:56 -05:00
kevinz000
549eec9938 Fixes component forensics deleting old instead of new component. (#34058)
* component dupe unique

* sorry I was using webeditor on phone and it wouldn't let me tab
2018-01-07 22:49:40 -05:00
kevinz000
cfc90b6712 wry 2017-12-28 12:17:03 +01:00
kevinz000
05be346f8a Component Forensics, Blood Decals, and Cleaning 2017-12-24 18:19:43 -08:00