Cleans up unused code
This commit is contained in:
committed by
CitadelStationBot
parent
ceda48865d
commit
2498e1ddc0
@@ -84,18 +84,6 @@
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
/* // Uncomment to debug chemical reaction list.
|
||||
/client/verb/debug_chemical_list()
|
||||
|
||||
for (var/reaction in chemical_reactions_list)
|
||||
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
|
||||
if(islist(chemical_reactions_list[reaction]))
|
||||
var/list/L = chemical_reactions_list[reaction]
|
||||
for(var/t in L)
|
||||
. += " has: [t]\n"
|
||||
to_chat(world, .)
|
||||
*/
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_subtypes(prototype, list/L)
|
||||
|
||||
@@ -865,8 +865,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
|
||||
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
|
||||
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
|
||||
//var/icon/alpha_mask = getFlatIcon(src)//Accurate but SLOW. Not designed for running each tick. Could have other uses I guess.
|
||||
var/icon/alpha_mask = getIconMask(src)//Which is why I created that proc. Also a little slow since it's blending a bunch of icons together but good enough.
|
||||
var/icon/alpha_mask = getIconMask(src)//getFlatIcon(src) is accurate but SLOW. Not designed for running each tick. This is also a little slow since it's blending a bunch of icons together but good enough.
|
||||
opacity_icon.AddAlphaMask(alpha_mask)//Likely the main source of lag for this proc. Probably not designed to run each tick.
|
||||
opacity_icon.ChangeOpacity(0.4)//Front end for MapColors so it's fast. 0.5 means half opacity and looks the best in my opinion.
|
||||
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
|
||||
|
||||
@@ -27,7 +27,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
||||
//Stores information regarding runs yet to be merged.
|
||||
//Run i starts at runBase[i] and extends for runLen[i] elements.
|
||||
//runBase[i] + runLen[i] == runBase[i+1]
|
||||
//var/stackSize
|
||||
var/list/runBases = list()
|
||||
var/list/runLens = list()
|
||||
|
||||
@@ -326,8 +325,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
||||
while(offset < maxOffset && call(cmp)(key, fetchElement(L,base+hint-offset)) < 0) //we are iterating backwards
|
||||
lastOffset = offset
|
||||
offset = (offset << 1) + 1 //1 3 7 15
|
||||
//if(offset <= 0) //int overflow, not an issue here since we are using floats
|
||||
// offset = maxOffset
|
||||
|
||||
if(offset > maxOffset)
|
||||
offset = maxOffset
|
||||
@@ -341,8 +338,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
||||
while(offset < maxOffset && call(cmp)(key, fetchElement(L,base+hint+offset)) >= 0)
|
||||
lastOffset = offset
|
||||
offset = (offset << 1) + 1
|
||||
//if(offset <= 0) //int overflow, not an issue here since we are using floats
|
||||
// offset = maxOffset
|
||||
|
||||
if(offset > maxOffset)
|
||||
offset = maxOffset
|
||||
@@ -575,7 +570,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
||||
|
||||
//If array is small, do an insertion sort
|
||||
if(remaining < MIN_MERGE)
|
||||
//var/initRunLen = countRunAndMakeAscending(start, end)
|
||||
binarySort(start, end, start/*+initRunLen*/)
|
||||
return
|
||||
|
||||
@@ -637,8 +631,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
||||
break
|
||||
++end1
|
||||
++cursor1
|
||||
//if(++cursor1 >= end1)
|
||||
// break
|
||||
|
||||
val2 = fetchElement(L,cursor2)
|
||||
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
if(month == MM && day == DD)
|
||||
return 1
|
||||
|
||||
// Uncomment this out when debugging!
|
||||
//else
|
||||
//return 1
|
||||
|
||||
//returns timestamp in a sql and ISO 8601 friendly format
|
||||
/proc/SQLtime(timevar)
|
||||
if(!timevar)
|
||||
|
||||
@@ -64,7 +64,6 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
|
||||
errorx = abs(errorx)//Error should never be negative.
|
||||
errory = abs(errory)
|
||||
//var/errorxy = round((errorx+errory)/2)//Used for diagonal boxes.
|
||||
|
||||
switch(target.dir)//This can be done through equations but switch is the simpler method. And works fast to boot.
|
||||
//Directs on what values need modifying.
|
||||
@@ -340,10 +339,6 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/simple_animal/M in sortmob)
|
||||
moblist.Add(M)
|
||||
// for(var/mob/living/silicon/hivebot/M in world)
|
||||
// mob_list.Add(M)
|
||||
// for(var/mob/living/silicon/hive_mainframe/M in world)
|
||||
// mob_list.Add(M)
|
||||
for(var/mob/living/carbon/true_devil/M in sortmob)
|
||||
moblist.Add(M)
|
||||
return moblist
|
||||
@@ -1447,7 +1442,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
var/target_loc = target.loc
|
||||
|
||||
var/endtime = world.time+time
|
||||
// var/starttime = world.time
|
||||
. = TRUE
|
||||
while (world.time < endtime)
|
||||
stoplag(1)
|
||||
|
||||
Reference in New Issue
Block a user