mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 14:03:25 +00:00
Why does every merge commit break EVERYTHING
This commit is contained in:
@@ -52,3 +52,5 @@
|
||||
__BIN_MID = __BIN_ITEM.##COMPARE > IN.##COMPARE ? __BIN_MID : __BIN_MID + 1;\
|
||||
LIST.Insert(__BIN_MID, IN);\
|
||||
}
|
||||
|
||||
#define islist(L) istype(L, /list)
|
||||
|
||||
@@ -9,47 +9,6 @@
|
||||
* Misc
|
||||
*/
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
|
||||
#define LAZYFIND(L, V) L ? L.Find(V) : 0
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null)
|
||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||
#define LAZYLEN(L) length(L)
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
#define reverseList(L) reverseRange(L.Copy())
|
||||
|
||||
// binary search sorted insert
|
||||
// IN: Object to be inserted
|
||||
// LIST: List to insert object into
|
||||
// TYPECONT: The typepath of the contents of the list
|
||||
// COMPARE: The variable on the objects to compare
|
||||
#define BINARY_INSERT(IN, LIST, TYPECONT, COMPARE) \
|
||||
var/__BIN_CTTL = length(LIST);\
|
||||
if(!__BIN_CTTL) {\
|
||||
LIST += IN;\
|
||||
} else {\
|
||||
var/__BIN_LEFT = 1;\
|
||||
var/__BIN_RIGHT = __BIN_CTTL;\
|
||||
var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
var/##TYPECONT/__BIN_ITEM;\
|
||||
while(__BIN_LEFT < __BIN_RIGHT) {\
|
||||
__BIN_ITEM = LIST[__BIN_MID];\
|
||||
if(__BIN_ITEM.##COMPARE <= IN.##COMPARE) {\
|
||||
__BIN_LEFT = __BIN_MID + 1;\
|
||||
} else {\
|
||||
__BIN_RIGHT = __BIN_MID;\
|
||||
};\
|
||||
__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
};\
|
||||
__BIN_ITEM = LIST[__BIN_MID];\
|
||||
__BIN_MID = __BIN_ITEM.##COMPARE > IN.##COMPARE ? __BIN_MID : __BIN_MID + 1;\
|
||||
LIST.Insert(__BIN_MID, IN);\
|
||||
}
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
switch(input.len)
|
||||
@@ -68,9 +27,6 @@ proc/listgetindex(var/list/list,index)
|
||||
return list[index]
|
||||
return
|
||||
|
||||
proc/islist(list/list)
|
||||
return(istype(list))
|
||||
|
||||
//Return either pick(list) or null if list is not of type /list or is empty
|
||||
proc/safepick(list/list)
|
||||
if(!islist(list) || !list.len)
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
#include "code\_helpers\turfs.dm"
|
||||
#include "code\_helpers\type2type.dm"
|
||||
#include "code\_helpers\unsorted.dm"
|
||||
#include "code\_helpers\view.dm"
|
||||
#include "code\_helpers\sorts\__main.dm"
|
||||
#include "code\_helpers\sorts\comparators.dm"
|
||||
#include "code\_helpers\sorts\TimSort.dm"
|
||||
@@ -211,7 +210,6 @@
|
||||
#include "code\controllers\subsystems\processing\fastprocess.dm"
|
||||
#include "code\controllers\subsystems\processing\obj.dm"
|
||||
#include "code\controllers\subsystems\processing\processing.dm"
|
||||
#include "code\controllers\subsystems\processing\projectiles.dm"
|
||||
#include "code\datums\ai_law_sets.dm"
|
||||
#include "code\datums\ai_laws.dm"
|
||||
#include "code\datums\beam.dm"
|
||||
@@ -231,7 +229,6 @@
|
||||
#include "code\datums\mutable_appearance.dm"
|
||||
#include "code\datums\orbit.dm"
|
||||
#include "code\datums\organs.dm"
|
||||
#include "code\datums\position_point_vector.dm"
|
||||
#include "code\datums\progressbar.dm"
|
||||
#include "code\datums\recipe.dm"
|
||||
#include "code\datums\riding.dm"
|
||||
@@ -856,11 +853,6 @@
|
||||
#include "code\game\objects\effects\spawners\bombspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\gibspawner.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\miscellaneous.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\temporary_visual.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\projectiles\impact.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\projectiles\muzzle.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\projectiles\projectile_effects.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\projectiles\tracer.dm"
|
||||
#include "code\game\objects\items\antag_spawners.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
#include "code\game\objects\items\blueprints.dm"
|
||||
@@ -2309,7 +2301,6 @@
|
||||
#include "code\modules\projectiles\projectile\magnetic.dm"
|
||||
#include "code\modules\projectiles\projectile\pellets.dm"
|
||||
#include "code\modules\projectiles\projectile\special.dm"
|
||||
#include "code\modules\projectiles\projectile\trace.dm"
|
||||
#include "code\modules\projectiles\targeting\targeting_client.dm"
|
||||
#include "code\modules\projectiles\targeting\targeting_gun.dm"
|
||||
#include "code\modules\projectiles\targeting\targeting_mob.dm"
|
||||
|
||||
Reference in New Issue
Block a user