Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Cleans up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ShizCalev committed Nov 20, 2017
1 parent 418703a commit 8eafacc
Show file tree
Hide file tree
Showing 79 changed files with 3 additions and 579 deletions.
12 changes: 0 additions & 12 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,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)
Expand Down
3 changes: 1 addition & 2 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions code/__HELPERS/sorts/__main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -637,8 +631,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
break
++end1
++cursor1
//if(++cursor1 >= end1)
// break

val2 = fetchElement(L,cursor2)

Expand Down
4 changes: 0 additions & 4 deletions code/__HELPERS/time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -342,10 +341,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
Expand Down Expand Up @@ -1449,7 +1444,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)
Expand Down
4 changes: 1 addition & 3 deletions code/_js/byjax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ Be sure to include required js functions in your page, or it'll raise an excepti
if(callback_args)
argums += callback_args
argums = list2params(argums)
/* if(callback_args)
argums += "&[list2params(callback_args)]"
*/

receiver << output(argums,"[control_id]:replaceContent")
return

6 changes: 0 additions & 6 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@
set_waypoint(A)
return

/*
AI restrained() currently does nothing
if(restrained())
RestrainedClickOn(A)
else
*/
A.attack_ai(src)

/*
Expand Down
2 changes: 0 additions & 2 deletions code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ SUBSYSTEM_DEF(events)
/datum/controller/subsystem/events/proc/spawnEvent()
set waitfor = FALSE //for the admin prompt
if(!CONFIG_GET(flag/allow_random_events))
// var/datum/round_event_control/E = locate(/datum/round_event_control/dust) in control
// if(E) E.runEvent()
return

var/gamemode = SSticker.mode.config_tag
Expand Down
7 changes: 0 additions & 7 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -496,14 +496,7 @@ SUBSYSTEM_DEF(shuttle)
// Then we want the point closest to -infinity,-infinity
var/x2 = min(x0, x1)
var/y2 = min(y0, y1)
/*
var/lowx = topleft.x + SHUTTLE_TRANSIT_BORDER
var/lowy = topleft.y + SHUTTLE_TRANSIT_BORDER

var/turf/low_point = locate(lowx, lowy, topleft.z)
new /obj/effect/landmark/stationary(low_point)
to_chat(world, "Starting at the low point, we go [x2],[y2]")
*/
// Then invert the numbers
var/transit_x = topleft.x + SHUTTLE_TRANSIT_BORDER + abs(x2)
var/transit_y = topleft.y + SHUTTLE_TRANSIT_BORDER + abs(y2)
Expand Down
2 changes: 0 additions & 2 deletions code/datums/antagonists/changeling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

var/list/stored_profiles = list() //list of datum/changelingprofile
var/datum/changelingprofile/first_prof = null
//var/list/absorbed_dna = list()
//var/list/protected_dna = list() //dna that is not lost when capacity is otherwise full
var/dna_max = 6 //How many extra DNA strands the changeling can store for transformation.
var/absorbedcount = 0
var/chem_charges = 20
Expand Down
12 changes: 0 additions & 12 deletions code/datums/browser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,6 @@
// This is added to mob so that it can be used without a reference to the browser object
// There is probably a better place for this...
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
/*
var/icon/I
if (dir >= 0)
I = new /icon(icon, icon_state, dir)
else
I = new /icon(icon, icon_state)
setDir("default")
var/filename = "[ckey("[icon]_[icon_state]_[dir]")].png"
src << browse_rsc(I, filename)
return filename
*/


// Registers the on-close verb for a browse window (client/verb/.windowclose)
Expand Down
2 changes: 0 additions & 2 deletions code/datums/components/material_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
var/last_insert_success
var/precise_insertion = FALSE
var/datum/callback/precondition
//MAX_STACK_SIZE = 50
//MINERAL_MATERIAL_AMOUNT = 2000

/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition)
materials = list()
Expand Down
15 changes: 0 additions & 15 deletions code/datums/datumvars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -418,24 +418,9 @@
item = "[VV_HTML_ENCODE(name)] = /icon (<span class='value'>[value]</span>)"
#endif

/* else if (istype(value, /image))
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
src << browse_rsc(I.icon, "tmp[REF(value)][rnd].png")
html += "[name] = <img src=\"tmp[REF(value)][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
*/
else if (isfile(value))
item = "[VV_HTML_ENCODE(name)] = <span class='value'>'[value]'</span>"

//else if (istype(value, /client))
// var/client/C = value
// item = "<a href='?_src_=vars;Vars=[REF(value)]'>[VV_HTML_ENCODE(name)] [REF(value)]</a> = [C] [C.type]"

else if (istype(value, /datum))
var/datum/D = value
if ("[D]" != "[D.type]") //if the thing as a name var, lets use it.
Expand Down
2 changes: 0 additions & 2 deletions code/datums/diseases/beesease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up a swarm of bees!</span>", \
"<span class='userdanger'>You cough up a swarm of bees!</span>")
new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
//if(5)
//Plus if you die, you explode into bees
return
12 changes: 0 additions & 12 deletions code/datums/diseases/cold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
..()
switch(stage)
if(2)
/*
if(affected_mob.sleeping && prob(40)) //removed until sleeping is fixed
to_chat(affected_mob, "\blue You feel better.")
cure()
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
Expand All @@ -36,12 +30,6 @@
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Mucous runs down the back of your throat.</span>")
if(3)
/*
if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
to_chat(affected_mob, "\blue You feel better.")
cure()
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
Expand Down
17 changes: 0 additions & 17 deletions code/game/area/Space_Station_13_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Research Director's Private Quarters"
icon_state = "rd_private"

/area/mint
name = "Mint"
icon_state = "green"

/area/comms
name = "Communications Relay"
icon_state = "tcomsatcham"
Expand Down Expand Up @@ -1375,16 +1371,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "eva"
ambientsounds = HIGHSEC

/area/ai_monitored/storage/secure
name = "AI Satellite Storage"
icon_state = "storage"
ambientsounds = HIGHSEC

/area/ai_monitored/storage/emergency
name = "Emergency Storage"
icon_state = "storage"
ambientsounds = HIGHSEC

/area/ai_monitored/storage/satellite
name = "AI Satellite Maint"
icon_state = "storage"
Expand Down Expand Up @@ -1522,16 +1508,13 @@ GLOBAL_LIST_INIT(the_station_areas, list (
/area/library,
/area/maintenance,
/area/medical,
// /area/mint, //not present on map
/area/quartermaster,
/area/science,
/area/security,
/area/solar,
/area/storage,
/area/teleporter,
/area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0
// /area/ai_monitored/storage/secure, //not present on map
// /area/ai_monitored/storage/emergency, //not present on map
/area/ai_monitored/turret_protected/ai_upload, //do not try to simplify to "/area/ai_monitored/turret_protected" --rastaf0
/area/ai_monitored/turret_protected/ai_upload_foyer,
/area/ai_monitored/turret_protected/ai,
Expand Down
2 changes: 0 additions & 2 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@

if(desc)
to_chat(user, desc)
// *****RM
//to_chat(user, "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]")

if(reagents && (is_open_container() || is_transparent())) //is_open_container() isn't really the right proc for this, but w/e
to_chat(user, "It contains:")
Expand Down
2 changes: 0 additions & 2 deletions code/game/gamemodes/devil/objectives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
contractName = "of revival"
if(CONTRACT_KNOWLEDGE)
contractName = "for knowledge"
//if(CONTRACT_UNWILLING) //Makes round unfun.
// contractName = "against their will"
update_explanation_text()

/datum/objective/devil/soulquality/update_explanation_text()
Expand Down
10 changes: 0 additions & 10 deletions code/game/gamemodes/miniantags/sintouched/objectives.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
/datum/objective/sintouched
completed = 1

/* NO ERP OBJECTIVE FOR YOU.
/datum/objective/sintouched/lust
/datum/objective/sintouched/lust/New()
var/mob/dead/D = pick(dead_mob_list)
if(prob(50) && D)
explanation_text = "You know that [D] has perished.... and you think [D] is kinda cute. Make sure everyone knows how HOT [D]'s lifeless body is."
else
explanation_text = "Go get married, then immediately cheat on your new spouse." */

/datum/objective/sintouched/gluttony
explanation_text = "Everything is so delicious. Go eat everything."

Expand Down
8 changes: 0 additions & 8 deletions code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@
disk_rescued = 0
break
var/crew_evacuated = (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)
//var/operatives_are_dead = is_operatives_are_dead()


//nukes_left
//station_was_nuked
//derp //Used for tracking if the syndies actually haul the nuke to the station //no
//herp //Used for tracking if the syndies got the shuttle off of the z-level //NO, DON'T FUCKING NAME VARS LIKE THIS


if(nuke_off_station == NUKE_SYNDICATE_BASE)
SSticker.mode_result = "loss - syndicate nuked - disk secured"
Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@
dat += text("<td>[]</td>", R.fields["p_stat"])
dat += text("<td>[]</td></tr>", R.fields["m_stat"])
dat += "</table><hr width='75%' />"
// if(GLOB.data_core.general)
// for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
// dat += "<A href='?src=[REF(src)];d_rec=[R.fields["id"]]'>[R.fields["id"]]: [R.fields["name"]]<BR>"
// //Foreach goto(132)
dat += "<HR><A href='?src=[REF(src)];screen=1'>Back</A>"
if(3)
dat += "<B>Records Maintenance</B><HR>\n<A href='?src=[REF(src)];back=1'>Backup To Disk</A><BR>\n<A href='?src=[REF(src)];u_load=1'>Upload From Disk</A><BR>\n<A href='?src=[REF(src)];del_all=1'>Delete All Records</A><BR>\n<BR>\n<A href='?src=[REF(src)];screen=1'>Back</A>"
Expand Down
3 changes: 0 additions & 3 deletions code/game/machinery/computer/message.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
//Message Logs
if(1)
var/index = 0
//var/recipient = "Unspecified" //name of the person
//var/sender = "Unspecified" //name of the sender
//var/message = "Blank" //transferred message
dat += "<center><A href='?src=[REF(src)];back=1'>Back</a> - <A href='?src=[REF(src)];refresh=1'>Refresh</center><hr>"
dat += "<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sender</th><th width='15%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"
for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
justzap = TRUE
addtimer(CALLBACK(src, .proc/unzap), 10)
return
else /*if(src.justzap)*/
else
return
else if(user.hallucinating() && ishuman(user) && prob(4) && !operating)
var/mob/living/carbon/human/H = user
Expand Down
3 changes: 0 additions & 3 deletions code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@
spark_system = null
return ..()

//process()
//return

/obj/machinery/door/CollidedWith(atom/movable/AM)
if(operating || emagged)
return
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
if(src.z in GLOB.station_z_levels)
add_overlay("overlay_[GLOB.security_level]")
else
//var/green = SEC_LEVEL_GREEN
add_overlay("overlay_[SEC_LEVEL_GREEN]")

if(detecting)
Expand Down
Loading

0 comments on commit 8eafacc

Please sign in to comment.