fix everything

This commit is contained in:
spookydonut
2020-04-11 15:32:09 +08:00
parent 91bc7dc9f9
commit 230e5fca20
42 changed files with 58 additions and 97 deletions

2
SpacemanDMM.toml Normal file
View File

@@ -0,0 +1,2 @@
[langserver]
dreamchecker = true

View File

@@ -8,10 +8,8 @@
/proc/invertHTML(HTMLstring)
if(!istext(HTMLstring))
CRASH("Given non-text argument!")
return
else if(length(HTMLstring) != 7)
CRASH("Given non-HTML argument!")
return
else if(length_char(HTMLstring) != 7)
CRASH("Given non-hex symbols in argument!")
var/textr = copytext(HTMLstring, 2, 4)

View File

@@ -27,13 +27,11 @@
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
CRASH("Invalid hook '/hook/[hook]' called.")
return 0
var/caller = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(caller, P)(arglist(args)))
CRASH("Hook '[P]' failed or runtimed.")
status = 0
return status

View File

@@ -47,7 +47,6 @@ PROCESSING_SUBSYSTEM_DEF(weather)
break
if (!ispath(weather_datum_type, /datum/weather))
CRASH("run_weather called with invalid weather_datum_type: [weather_datum_type || "null"]")
return
if (isnull(z_levels))
z_levels = SSmapping.levels_by_trait(initial(weather_datum_type.target_trait))
@@ -55,7 +54,6 @@ PROCESSING_SUBSYSTEM_DEF(weather)
z_levels = list(z_levels)
else if (!islist(z_levels))
CRASH("run_weather called with invalid z_levels: [z_levels || "null"]")
return
var/datum/weather/W = new weather_datum_type(z_levels)
W.telegraph()

View File

@@ -25,7 +25,6 @@
RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack)
else
CRASH("Something that wasn't an atom was given /datum/component/radioactive")
return
if(strength > RAD_MINIMUM_CONTAMINATION)
SSradiation.warn(src)

View File

@@ -19,7 +19,6 @@
var/datum/component/wet_floor/WF = newcomp //Lets make an assumption
if(WF.gc()) //See if it's even valid, still. Also does LAZYLEN and stuff for us.
CRASH("Wet floor component tried to inherit another, but the other was able to garbage collect while being inherited! What a waste of time!")
return
for(var/i in WF.time_left_list)
add_wet(text2num(i), WF.time_left_list[i])

View File

@@ -175,11 +175,9 @@
if(!islist(jsonlist))
if(!istext(jsonlist))
CRASH("Invalid JSON")
return
jsonlist = json_decode(jsonlist)
if(!islist(jsonlist))
CRASH("Invalid JSON")
return
if(!jsonlist["DATUM_TYPE"])
return
if(!ispath(jsonlist["DATUM_TYPE"]))

View File

@@ -38,7 +38,6 @@
..()
if(!istype(holder, holder_type))
CRASH("Wire holder is not of the expected type!")
return
src.holder = holder
if(randomize)

View File

@@ -147,7 +147,6 @@
return "health-85"
else
return "health-100"
return "0"
//HOOKS
@@ -323,7 +322,6 @@
return "crit"
else
return "dead"
return "dead"
//Sillycone hooks
/mob/living/silicon/proc/diag_hud_set_health()

View File

@@ -381,14 +381,12 @@
for(var/obj/machinery/camera/C in oview(4, M))
if(C.can_use()) // check if camera disabled
return C
break
return null
/proc/near_range_camera(var/mob/M)
for(var/obj/machinery/camera/C in range(4, M))
if(C.can_use()) // check if camera disabled
return C
break
return null

View File

@@ -45,11 +45,11 @@
if (ismob(user) && !isliving(user)) // ghosts don't need cameras
return
if (!network)
CRASH("No camera network")
stack_trace("No camera network")
user.unset_machine()
return FALSE
if (!(islist(network)))
CRASH("Camera network is not a list")
stack_trace("Camera network is not a list")
user.unset_machine()
return FALSE

View File

@@ -469,7 +469,6 @@ GLOBAL_LIST_EMPTY(allConsoles)
if(newmessagepriority < EXTREME_MESSAGE_PRIORITY)
newmessagepriority = EXTREME_MESSAGE_PRIORITY
update_icon()
if(1)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
say(title)
messages += "<span class='bad'>!!!Extreme Priority!!!</span><BR><b>From:</b> [linkedsender]<BR>[message]"

View File

@@ -223,7 +223,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
continue
if(C.d1 == 0)
return C
break
return

View File

@@ -807,9 +807,9 @@ GLOBAL_LIST_EMPTY(PDAs)
// If it didn't reach, note that fact
if (!signal.data["done"])
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
return
if (!silent)
playsound(src, 'sound/machines/terminal_error.ogg', 15, 1)
return
var/target_text = signal.format_target()
if(allow_emojis)
@@ -998,9 +998,9 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/card/id/idcard = C
if(!idcard.registered_name)
to_chat(user, "<span class='warning'>\The [src] rejects the ID!</span>")
return
if (!silent)
playsound(src, 'sound/machines/terminal_error.ogg', 15, 1)
return
if(!owner)
owner = idcard.registered_name

View File

@@ -692,14 +692,14 @@ Code:
return
GLOB.news_network.SubmitArticle(message,host_pda.owner,current_channel)
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
return
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
return
if("Newscaster Switch Channel")
current_channel = host_pda.msg_input()
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
return
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
return
//emoji previews
if(href_list["emoji"])

View File

@@ -23,8 +23,8 @@
/datum/borgpanel/New(to_user, mob/living/silicon/robot/to_borg)
if(!istype(to_borg))
CRASH("Borg panel is only available for borgs")
qdel(src)
CRASH("Borg panel is only available for borgs")
user = CLIENT_FROM_VAR(to_user)

View File

@@ -209,7 +209,6 @@
open_machine()
SendBack(H)
return "<span class='bad'>Specimen braindead - disposed.</span>"
return "<span class='bad'>ERROR</span>"
/obj/machinery/abductor/experiment/proc/SendBack(mob/living/carbon/human/H)

View File

@@ -84,7 +84,6 @@
/obj/machinery/atmospherics/components/proc/nullifyPipenet(datum/pipeline/reference)
if(!reference)
CRASH("nullifyPipenet(null) called by [type] on [COORD(src)]")
return
var/i = parents.Find(reference)
reference.other_airs -= airs[i]
reference.other_atmosmch -= src

View File

@@ -131,7 +131,6 @@
var/datum/pipeline/P = returnPipenet(A)
if(!P)
CRASH("null.addMember() called by [type] on [COORD(src)]")
return
P.addMember(A, src)

View File

@@ -488,7 +488,6 @@ force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.adm
if (isnull(A)) //If theres no supplypod bay mapped into centcom, throw an error
to_chat(holder.mob, "No /area/centcom/supplypod/loading/one (or /two or /three or /four) in the world! You can make one yourself (then refresh) for now, but yell at a mapper to fix this, today!")
CRASH("No /area/centcom/supplypod/loading/one (or /two or /three or /four) has been mapped into the centcom z-level!")
return
orderedArea = list()
if (!isemptylist(A.contents)) //Go through the area passed into the proc, and figure out the top left and bottom right corners by calculating max and min values
var/startX = A.contents[1].x //Create the four values (we do it off a.contents[1] so they have some sort of arbitrary initial value. They should be overwritten in a few moments)

View File

@@ -171,7 +171,6 @@
qdel(E)
return
return
return
/obj/item/extinguisher_refill
name = "envirosuit extinguisher cartridge"

View File

@@ -287,7 +287,7 @@
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10
if(stat & (NOPOWER|BROKEN))
if(MICROWAVE_PRE)
if(type == MICROWAVE_PRE)
pre_fail()
return
if(!time)

View File

@@ -18,8 +18,8 @@
var/datum/integrated_io/I = inputs[1]
set_pin_data(IC_OUTPUT, 1, null)
if(!isweakref(I.data))
return
activate_pin(3)
return
var/atom/A = I.data.resolve()
if(!A)
activate_pin(3)

View File

@@ -430,7 +430,6 @@
else
dropItemToGround(I)
return
return TRUE
/mob/living/carbon/get_standard_pixel_y_offset(lying = 0)
if(lying)

View File

@@ -893,7 +893,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
accessory_overlay.icon_state = "m_ears_none_[layertext]"
if(bodypart == "tail")
accessory_overlay.icon_state = "m_tail_husk_[layertext]"
if(MATRIXED)
if(S.color_src == MATRIXED)
var/list/husklist = list()
husklist += ReadRGB("#a3a3a3")
husklist += ReadRGB("#a3a3a3")

View File

@@ -695,7 +695,7 @@
holo_icon = client.prefs.get_filtered_holoform(HOLOFORM_FILTER_AI)
else
holo_icon = getHologramIcon(icon('icons/mob/ai.dmi', "female"))
else if("xeno queen")
if("xeno queen")
holo_icon = getHologramIcon(icon(icon_list[input],"alienq"))
else
holo_icon = getHologramIcon(icon(icon_list[input], input))

View File

@@ -445,7 +445,6 @@ Pass the desired type path itself, declaring a temporary var beforehand is not r
return scan_result
else
return FALSE //The current element failed assessment, move on to the next.
return
/mob/living/simple_animal/bot/proc/check_bot(targ)
var/turf/T = get_turf(targ)

View File

@@ -523,9 +523,6 @@
soft_reset()
return
reagent_id = null
return
/mob/living/simple_animal/bot/medbot/proc/check_overdose(mob/living/carbon/patient,reagent_id,injection_amount)
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
if(!R.overdose_threshold) //Some chems do not have an OD threshold

View File

@@ -92,8 +92,8 @@
return
if(hack)
if(hacked)
return
Stun(40)
return
if(clockwork)
to_chat(src, "<span class='large_brass'><b>ERROR: LAW OVERRIDE DETECTED</b></span>")
to_chat(src, "<span class='heavy_brass'>From now on, these are your laws:</span>")

View File

@@ -20,7 +20,6 @@
. = ..()
if(!loc || !istype(loc, /obj/machinery/modular_computer))
CRASH("Inapropriate type passed to obj/item/modular_computer/processor/New()! Aborting.")
return
// Obtain reference to machinery computer
all_components = list()
idle_threads = list()

View File

@@ -54,7 +54,6 @@
holder.shutdown_computer()
return TRUE
return FALSE

View File

@@ -8,7 +8,6 @@
item_flags = NOBLUDGEON
/obj/item/paper/contract/ComponentInitialize()
return
. = ..()
AddElement(/datum/element/update_icon_blocker)

View File

@@ -66,7 +66,6 @@
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_ammo(obj/item/ammo_casing/AC, passthrough = TRUE, reset = FALSE)
if(!istype(AC))
CRASH("[AC] is not /obj/item/ammo_casing!")
return FALSE
for(var/V in ammo_copy_vars)
if(AC.vars.Find(V))
chameleon_ammo_vars[V] = AC.vars[V]
@@ -78,7 +77,6 @@
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_projectile(obj/item/projectile/P)
if(!istype(P))
CRASH("[P] is not /obj/item/projectile!")
return FALSE
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser", "nodamage" = TRUE)
for(var/V in projectile_copy_vars)
if(P.vars.Find(V))
@@ -99,7 +97,6 @@
/obj/item/gun/energy/laser/chameleon/proc/set_chameleon_gun(obj/item/gun/G , passthrough = TRUE)
if(!istype(G))
CRASH("[G] is not /obj/item/gun!")
return FALSE
for(var/V in gun_copy_vars)
if(vars.Find(V) && G.vars.Find(V))
chameleon_gun_vars[V] = G.vars[V]

View File

@@ -972,7 +972,6 @@
if(isnull(amount))
amount = 0
CRASH("null amount passed to reagent code")
return FALSE
if(!isnum(amount))
return FALSE

View File

@@ -331,7 +331,6 @@
else
to_chat(user, "<span class='notice'>This doesn't fit in [src].</span>")
return FALSE
return FALSE
/obj/item/hypospray/mkii/AltClick(mob/user)
. = ..()

View File

@@ -436,7 +436,7 @@
if(!isnull(body_markings) && status == BODYPART_ORGANIC)
if(!use_digitigrade)
if(BODY_ZONE_CHEST)
if(body_zone == BODY_ZONE_CHEST)
. += image(body_markings_icon, "[body_markings]_[body_zone]_[icon_gender]", -MARKING_LAYER, image_dir)
else
. += image(body_markings_icon, "[body_markings]_[body_zone]", -MARKING_LAYER, image_dir)

View File

@@ -40,7 +40,6 @@
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.sec_hud_set_ID()
return 1
return TRUE
/datum/surgery_step/reshape_face/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -634,7 +634,7 @@ GLOBAL_LIST_EMPTY(vending_products)
coin = null
return
else if("togglevoice" && panel_open)
if("togglevoice" && panel_open)
shut_up = !shut_up
/obj/machinery/vending/process()

View File

@@ -558,7 +558,6 @@
to_chat(R,"<span class='warning'>Your attempt to escape [lowertext(name)] has failed!</span>")
to_chat(owner,"<span class='notice'>The attempt to escape from your [lowertext(name)] has failed!</span>")
return
return
var/struggle_outer_message = pick(struggle_messages_outside)
var/struggle_user_message = pick(struggle_messages_inside)

View File

@@ -16,15 +16,14 @@ The proc you're attemping should return nonzero values on success.
try
if(!callon || !procname)
CRASH("attempt_vr: Invalid obj/proc: [callon]/[procname]")
return 0
var/result = call(callon,procname)(arglist(args))
return result
catch(var/exception/e)
CRASH("attempt_vr runtimed when calling [procname] on [callon].")
CRASH("attempt_vr catch: [e] on [e.file]:[e.line]")
stack_trace("attempt_vr runtimed when calling [procname] on [callon].")
stack_trace("attempt_vr catch: [e] on [e.file]:[e.line]")
return 0
/*
@@ -46,17 +45,16 @@ The hooks you're calling should return nonzero values on success.
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
CRASH("hook_vr: Invalid hook '/hook/[hook]' called.")
return 0
var/caller = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(caller, P)(arglist(args)))
CRASH("hook_vr: Hook '[P]' failed or runtimed.")
stack_trace("hook_vr: Hook '[P]' failed or runtimed.")
status = 0
return status
catch(var/exception/e)
CRASH("hook_vr itself failed or runtimed. Exception below.")
CRASH("hook_vr catch: [e] on [e.file]:[e.line]")
stack_trace("hook_vr itself failed or runtimed. Exception below.")
stack_trace("hook_vr catch: [e] on [e.file]:[e.line]")

View File

@@ -364,7 +364,6 @@
if(ishuman(src) && dna.species.id == "human")
dna.features["genitals_use_skintone"] = TRUE
dna.species.use_skintones = TRUE
if(MUTCOLORS)
if(src.dna.species.fixed_mut_color)
dna.features["cock_color"] = "[dna.species.fixed_mut_color]"
dna.features["breasts_color"] = "[dna.species.fixed_mut_color]"

View File

@@ -54,7 +54,6 @@
to_chat(user, "<span class='warning'>[src] is empty!</span>")
add_fingerprint(user)
return
..()
/obj/item/fermichem/pHpaper
name = "pH indicator strip"