Commit Graph

16 Commits

Author SHA1 Message Date
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
WJohn
e54f1d5342 The great floor tile purge (#40065)
* Converts all colored plasteel tiles to turf decals.

* Removes now deprecated floor icons and paths.

* Hotfixes on three maps.

* Moves script to its own folder.

* Fixes wild west.

* Fixes holodeck

* Fixes eye rape bug.

* Fixes meta and lavaland biodome ruin having some missing textures.
2018-09-05 22:14:31 +03: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
ninjanomnom
e274ff1b18 Fixes porta_turret and decal shuttle rotations
Also removes a related unused signal
2018-07-10 18:30:23 -04: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
5028239b35 Modifies the component transfer to make ChangeTurf work 2018-04-29 18:11:02 -04:00
Jordan Brown
a1b89c3643 Removes redundant COMPONENT_INCOMPATIBLE crashes (#37389) 2018-04-25 06:53:43 -04:00
Emmett Gaines
830929669d makes the decal component handle updating inventory icons (#33967) 2018-01-02 16:17:39 -05:00
kevinz000
05be346f8a Component Forensics, Blood Decals, and Cleaning 2017-12-24 18:19:43 -08:00
Emmett Gaines
3ce9bd7883 decal rotation fix (#33614) 2017-12-17 21:49:15 -05:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
ninjanomnom
b97aa1dc75 lets you add examine text to decals 2017-11-18 13:34:01 -05:00
ShizCalev
04fa4eaf4c Fixes turf_decal layering (#32466) 2017-11-07 22:38:39 -05:00
ninjanomnom
db6a0ed825 cleans up turf decal 2017-11-07 11:23:01 -05:00