mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-03 22:13:50 +00:00
Removes unnecessary, unused, and redundant helpers.
This commit is contained in:
@@ -506,7 +506,7 @@
|
||||
if (!S)
|
||||
continue
|
||||
|
||||
words |= text2list(S.name," ")
|
||||
words |= splittext(S.name," ")
|
||||
cooktypes |= S.cooked
|
||||
|
||||
if (S.reagents && S.reagents.total_volume > 0)
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
// Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime
|
||||
var/icon/canvas = icon(HOLOMAP_ICON, "blank")
|
||||
if(world.maxx > canvas.Width())
|
||||
crash_with("Minimap for z=[zLevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]")
|
||||
stack_trace("Minimap for z=[zLevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]")
|
||||
if(world.maxy > canvas.Height())
|
||||
crash_with("Minimap for z=[zLevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]")
|
||||
stack_trace("Minimap for z=[zLevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]")
|
||||
|
||||
for(var/x = 1 to world.maxx)
|
||||
for(var/y = 1 to world.maxy)
|
||||
@@ -82,9 +82,9 @@
|
||||
// Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime
|
||||
var/icon/canvas = icon(HOLOMAP_ICON, "blank")
|
||||
if(world.maxx > canvas.Width())
|
||||
crash_with("Minimap for z=[zLevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]")
|
||||
stack_trace("Minimap for z=[zLevel] : world.maxx ([world.maxx]) must be <= [canvas.Width()]")
|
||||
if(world.maxy > canvas.Height())
|
||||
crash_with("Minimap for z=[zLevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]")
|
||||
stack_trace("Minimap for z=[zLevel] : world.maxy ([world.maxy]) must be <= [canvas.Height()]")
|
||||
|
||||
for(var/x = 1 to world.maxx)
|
||||
for(var/y = 1 to world.maxy)
|
||||
|
||||
@@ -107,7 +107,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
if(QDESTROYING(src))
|
||||
return
|
||||
|
||||
crash_with("CANARY: Old human update_icons was called.")
|
||||
stack_trace("CANARY: Old human update_icons was called.")
|
||||
|
||||
update_hud() //TODO: remove the need for this
|
||||
|
||||
@@ -839,7 +839,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
apply_layer(SUIT_LAYER)
|
||||
|
||||
/mob/living/carbon/human/update_inv_pockets()
|
||||
crash_with("Someone called update_inv_pockets even though it's dumb")
|
||||
stack_trace("Someone called update_inv_pockets even though it's dumb")
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_mask()
|
||||
if(QDESTROYING(src))
|
||||
|
||||
@@ -228,21 +228,21 @@
|
||||
|
||||
if(!delivery && compactor && length(contents))//garbage counter for trashpup
|
||||
dat += "<font color='red'><B>Current load:</B> [length(contents)] / [max_item_count] objects.</font><BR>"
|
||||
dat += "<font color='gray'>([list2text(contents,", ")])</font><BR><BR>"
|
||||
dat += "<font color='gray'>([contents.Join(", ")])</font><BR><BR>"
|
||||
|
||||
if(delivery && length(contents))
|
||||
dat += "<font color='red'><B>Current load:</B> [length(contents)] / [max_item_count] objects.</font><BR>"
|
||||
dat += "<font color='gray'>Cargo compartment slot: Cargo 1.</font><BR>"
|
||||
if(length(deliveryslot_1))
|
||||
dat += "<font color='gray'>([list2text(deliveryslot_1,", ")])</font><BR>"
|
||||
dat += "<font color='gray'>([deliveryslot_1.Join(", ")])</font><BR>"
|
||||
dat += "<font color='gray'>Cargo compartment slot: Cargo 2.</font><BR>"
|
||||
if(length(deliveryslot_2))
|
||||
dat += "<font color='gray'>([list2text(deliveryslot_2,", ")])</font><BR>"
|
||||
dat += "<font color='gray'>([deliveryslot_2.Join(", ")])</font><BR>"
|
||||
dat += "<font color='gray'>Cargo compartment slot: Cargo 3.</font><BR>"
|
||||
if(length(deliveryslot_3))
|
||||
dat += "<font color='gray'>([list2text(deliveryslot_3,", ")])</font><BR>"
|
||||
dat += "<font color='gray'>([deliveryslot_3.Join(", ")])</font><BR>"
|
||||
dat += "<font color='red'>Cargo compartment slot: Fuel.</font><BR>"
|
||||
dat += "<font color='red'>([list2text(contents - (deliveryslot_1 + deliveryslot_2 + deliveryslot_3),", ")])</font><BR><BR>"
|
||||
dat += "<font color='red'>([jointext(contents - (deliveryslot_1 + deliveryslot_2 + deliveryslot_3),", ")])</font><BR><BR>"
|
||||
|
||||
if(analyzer && !synced)
|
||||
dat += "<A href='?src=\ref[src];sync=1'>Sync Files</A><BR>"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
ASSERT(which)
|
||||
var/obj/screen/plane_master/PM = plane_masters[which]
|
||||
if(!PM)
|
||||
crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
stack_trace("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
|
||||
if(my_mob.alpha <= EFFECTIVE_INVIS)
|
||||
state = FALSE
|
||||
@@ -83,7 +83,7 @@
|
||||
ASSERT(which)
|
||||
var/obj/screen/plane_master/PM = plane_masters[which]
|
||||
if(!PM)
|
||||
crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
stack_trace("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
PM.set_desired_alpha(new_alpha)
|
||||
if(PM.sub_planes)
|
||||
var/list/subplanes = PM.sub_planes
|
||||
@@ -94,7 +94,7 @@
|
||||
ASSERT(which)
|
||||
var/obj/screen/plane_master/PM = plane_masters[which]
|
||||
if(!PM)
|
||||
crash_with("Tried to set_ao [which] in plane_holder on [my_mob]!")
|
||||
stack_trace("Tried to set_ao [which] in plane_holder on [my_mob]!")
|
||||
PM.set_ambient_occlusion(enabled)
|
||||
if(PM.sub_planes)
|
||||
var/list/subplanes = PM.sub_planes
|
||||
@@ -105,7 +105,7 @@
|
||||
ASSERT(which)
|
||||
var/obj/screen/plane_master/PM = plane_masters[which]
|
||||
if(!PM)
|
||||
crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
stack_trace("Tried to alter [which] in plane_holder on [my_mob]!")
|
||||
PM.alter_plane_values(arglist(values))
|
||||
if(PM.sub_planes)
|
||||
var/list/subplanes = PM.sub_planes
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
H_fuel = 0
|
||||
antiH_fuel = 0
|
||||
else
|
||||
var/residual_matter = modulus(H_fuel - antiH_fuel)
|
||||
var/residual_matter = abs(H_fuel - antiH_fuel)
|
||||
var/mass = antiH_fuel + H_fuel - residual_matter
|
||||
energy = convert2energy(mass)
|
||||
if( H_fuel > antiH_fuel )
|
||||
@@ -149,7 +149,7 @@
|
||||
else //else if they're not equal determine which isn't equal
|
||||
//and set it equal to either H or antiH so we don't lose anything
|
||||
|
||||
var/residual_matter = modulus(H_fuel - antiH_fuel)
|
||||
var/residual_matter = abs(H_fuel - antiH_fuel)
|
||||
mass = antiH_fuel + H_fuel - residual_matter
|
||||
energy = convert2energy(mass)
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
var/turf/starting = get_turf(src)
|
||||
if(isnull(Angle)) //Try to resolve through offsets if there's no angle set.
|
||||
if(isnull(xo) || isnull(yo))
|
||||
crash_with("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")
|
||||
stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")
|
||||
qdel(src)
|
||||
return
|
||||
var/turf/target = locate(CLAMP(starting + xo, 1, world.maxx), CLAMP(starting + yo, 1, world.maxy), starting.z)
|
||||
@@ -400,7 +400,7 @@
|
||||
xo = targloc.x - curloc.x
|
||||
setAngle(Get_Angle(src, targloc) + spread)
|
||||
else
|
||||
crash_with("WARNING: Projectile [type] fired without either mouse parameters, or a target atom to aim at!")
|
||||
stack_trace("WARNING: Projectile [type] fired without either mouse parameters, or a target atom to aim at!")
|
||||
qdel(src)
|
||||
|
||||
/proc/calculate_projectile_angle_and_pixel_offsets(mob/user, params)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
for(var/id in dispense_reagents)
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[id]
|
||||
if(!R)
|
||||
crash_with("[src] at [x],[y],[z] failed to find reagent '[id]'!")
|
||||
stack_trace("[src] at [x],[y],[z] failed to find reagent '[id]'!")
|
||||
dispense_reagents -= id
|
||||
continue
|
||||
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = cartridges[R.name]
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
return
|
||||
|
||||
if(!damtype)
|
||||
crash_with("CANARY: shield.take_damage() callled without damtype.")
|
||||
stack_trace("CANARY: shield.take_damage() callled without damtype.")
|
||||
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
|
||||
var/messages = null
|
||||
if(raw_messages)
|
||||
messages = list2text(raw_messages, delim)
|
||||
messages = raw_messages.Join(delim)
|
||||
return messages
|
||||
|
||||
// The next function sets the messages on the belly, from human-readable var
|
||||
@@ -519,7 +519,7 @@
|
||||
/obj/belly/proc/set_messages(raw_text, type, delim = "\n\n")
|
||||
ASSERT(type == "smo" || type == "smi" || type == "dmo" || type == "dmp" || type == "em" || type == "ema" || type == "im_digest" || type == "im_hold" || type == "im_absorb" || type == "im_heal" || type == "im_drain")
|
||||
|
||||
var/list/raw_list = text2list(html_encode(raw_text),delim)
|
||||
var/list/raw_list = splittext(html_encode(raw_text),delim)
|
||||
if(raw_list.len > 10)
|
||||
raw_list.Cut(11)
|
||||
log_debug("[owner] tried to set [lowertext(name)] with 11+ messages")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
/proc/prep_for_persist(var/mob/persister)
|
||||
if(!istype(persister))
|
||||
crash_with("Persist (P4P): Given non-mob [persister].")
|
||||
stack_trace("Persist (P4P): Given non-mob [persister].")
|
||||
return
|
||||
|
||||
// Find out of this mob is a proper mob!
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/proc/persist_interround_data(var/mob/occupant, var/datum/spawnpoint/new_spawn_point_type)
|
||||
if(!istype(occupant))
|
||||
crash_with("Persist (PID): Given non-mob [occupant].")
|
||||
stack_trace("Persist (PID): Given non-mob [occupant].")
|
||||
return
|
||||
|
||||
var/datum/preferences/prefs = prep_for_persist(occupant)
|
||||
@@ -225,7 +225,7 @@
|
||||
*/
|
||||
/proc/persist_nif_data(var/mob/living/carbon/human/H,var/datum/preferences/prefs)
|
||||
if(!istype(H))
|
||||
crash_with("Persist (NIF): Given a nonhuman: [H]")
|
||||
stack_trace("Persist (NIF): Given a nonhuman: [H]")
|
||||
return
|
||||
|
||||
if(!prefs)
|
||||
|
||||
Reference in New Issue
Block a user