mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-09 23:21:02 +01:00
Merge pull request #10046 from Ghommie/Ghommie-cit424
Ports flag for bespoke elements.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
/datum/element
|
||||
var/element_flags = NONE
|
||||
/**
|
||||
* The index of the first attach argument to consider for duplicate elements
|
||||
* Is only used when flags contains ELEMENT_BESPOKE
|
||||
* This is infinity so you must explicitly set this
|
||||
*/
|
||||
var/id_arg_index = INFINITY
|
||||
|
||||
/datum/element/proc/Attach(datum/target)
|
||||
if(type == /datum/element)
|
||||
@@ -19,7 +25,7 @@
|
||||
//DATUM PROCS
|
||||
|
||||
/datum/proc/AddElement(eletype, ...)
|
||||
var/datum/element/ele = SSdcs.GetElement(eletype)
|
||||
var/datum/element/ele = SSdcs.GetElement(arglist(args))
|
||||
args[1] = src
|
||||
if(ele.Attach(arglist(args)) == ELEMENT_INCOMPATIBLE)
|
||||
CRASH("Incompatible [eletype] assigned to a [type]! args: [json_encode(args)]")
|
||||
|
||||
Reference in New Issue
Block a user