send
This commit is contained in:
@@ -9,6 +9,14 @@
|
||||
* Misc
|
||||
*/
|
||||
|
||||
// Generic listoflist safe add and removal macros:
|
||||
///If value is a list, wrap it in a list so it can be used with list add/remove operations
|
||||
#define LIST_VALUE_WRAP_LISTS(value) (islist(value) ? list(value) : value)
|
||||
///Add an untyped item to a list, taking care to handle list items by wrapping them in a list to remove the footgun
|
||||
#define UNTYPED_LIST_ADD(list, item) (list += LIST_VALUE_WRAP_LISTS(item))
|
||||
///Remove an untyped item to a list, taking care to handle list items by wrapping them in a list to remove the footgun
|
||||
#define UNTYPED_LIST_REMOVE(list, item) (list -= LIST_VALUE_WRAP_LISTS(item))
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) { L = list(); }
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
///Like LAZYCOPY - copies an input list if the list has entries, If it doesn't the assigned list is nulled
|
||||
|
||||
@@ -119,6 +119,6 @@
|
||||
for(var/path in typesof(/obj/item/coin))
|
||||
var/obj/item/coin/C = new path
|
||||
UNTIL(C.flags_1 & INITIALIZED_1) //we want to make sure the value is calculated and not null.
|
||||
GLOB.coin_values[path] = C.value
|
||||
GLOB.coin_values[path] = C.get_item_credit_value()
|
||||
qdel(C)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user