mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
More cuffed item fixes (#96086)
## About The Pull Request 1. Picking up both items someone has cuffed to them no longer breaks the link after dropping the first item. 2. Picking up two items linked to two separate people no longer works. You are forced to drop the item (or if nodrop is somehow applied, the cuffs are broken.) 3. If the beam is broken (such as by changing z-level), it will re-instantiate. ## Changelog 🆑 Melbert fix: Fixed issues that arise from picking up two items cuffed to the same person fix: Fixed issues that arise from picking up two items cuffed to two different people fix: Fixed issues that arise from traveling z-levels while having a cuffed item /🆑
This commit is contained in:
@@ -370,9 +370,12 @@
|
||||
if((source in old_component.sources) && !old_component.allow_source_update(source))
|
||||
return old_component // source already registered, no work to do
|
||||
|
||||
if(old_component.on_source_add(arglist(list(source) + raw_args.Copy(2))) == COMPONENT_INCOMPATIBLE)
|
||||
var/source_result = old_component.on_source_add(arglist(list(source) + raw_args.Copy(2)))
|
||||
if(source_result == COMPONENT_INCOMPATIBLE)
|
||||
stack_trace("incompatible source added to a [old_component.type]. Args: [json_encode(raw_args)]")
|
||||
return null
|
||||
if(source_result == COMPONENT_REDUNDANT)
|
||||
return null
|
||||
|
||||
else if(!new_component)
|
||||
new_component = new component_type(raw_args) // There's a valid dupe mode but there's no old component, act like normal
|
||||
|
||||
Reference in New Issue
Block a user