Skip to content

Commit

Permalink
AAAAAAAAAAAAAAAAAAA
Browse files Browse the repository at this point in the history
  • Loading branch information
skull132 committed Apr 25, 2020
1 parent 3b9a98a commit ed06f66
Show file tree
Hide file tree
Showing 88 changed files with 152 additions and 292 deletions.
3 changes: 1 addition & 2 deletions code/_helpers/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ proc/RoundHealth(health)
return "health0"
else
return "health-100"
return "0"

/*
Proc for attack log creation, because really why not
Expand Down Expand Up @@ -211,4 +210,4 @@ Proc for attack log creation, because really why not

// Returns true if the mob was removed form the dead list
/mob/proc/remove_from_dead_mob_list()
return dead_mob_list.Remove(src)
return dead_mob_list.Remove(src)
5 changes: 0 additions & 5 deletions code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@

if (!( istext(HTMLstring) ))
CRASH("Given non-text argument!")
return
else
if (length(HTMLstring) != 7)
CRASH("Given non-HTML argument!")
return
var/textr = copytext(HTMLstring, 2, 4)
var/textg = copytext(HTMLstring, 4, 6)
var/textb = copytext(HTMLstring, 6, 8)
Expand All @@ -33,7 +31,6 @@
if (length(textb) < 2)
textr = text("0[]", textb)
return text("#[][][]", textr, textg, textb)
return

//Returns the middle-most value
/proc/dd_range(var/low, var/high, var/num)
Expand Down Expand Up @@ -859,8 +856,6 @@ proc/is_hot(obj/item/W as obj)
else
return 0

return 0

//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O as obj)
if (!O) return 0
Expand Down
4 changes: 1 addition & 3 deletions code/controllers/subsystems/battle_monsters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ var/datum/controller/subsystem/battle_monsters/SSbattlemonsters
else
return GetSpecies(card_defense_type," mixed with ")

return "unknown"

/datum/controller/subsystem/battle_monsters/proc/GetSpecies(card_defense_type, var/and_text = " and ")

//This list looks odd to prevent runtime errors related to out of bounds indexes
Expand Down Expand Up @@ -520,4 +518,4 @@ var/datum/controller/subsystem/battle_monsters/SSbattlemonsters
#undef BATTLE_MONSTERS_GEN_ROOT
#undef BATTLE_MONSTERS_GEN_SUFFIX
#undef BATTLE_MONSTERS_GEN_TRAP
#undef BATTLE_MONSTERS_GEN_SPELL
#undef BATTLE_MONSTERS_GEN_SPELL
2 changes: 1 addition & 1 deletion code/controllers/subsystems/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
cc.result = chemconfig[chemical]["result"]
cc.result_amount = chemconfig[chemical]["resultamount"]
cc.required_reagents = chemconfig[chemical]["required_reagents"]
if(!cc.result in chemical_reagents)
if(!(cc.result in chemical_reagents))
log_debug("SSchemistry: Warning: Invalid result [cc.result] in [cc.name] reactions list.")
qdel(cc)

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
var/datum/job/job = new J()
if(!job || job.faction != faction)
continue
if(!job.faction in faction)
if(!(job.faction in faction))
continue
occupations += job
name_occupations[job.title] = job
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystems/pai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/device/paicard/card = locate(href_list["device"])
if (!candidate in pai_candidates)
if (!(candidate in pai_candidates))
return

if(card.pai)
Expand Down Expand Up @@ -105,7 +105,7 @@
return FALSE
candidate.ready = FALSE
return TRUE


/datum/controller/subsystem/pai/proc/recruitWindow(mob/M as mob)
var/datum/paiCandidate/candidate
Expand Down Expand Up @@ -144,7 +144,7 @@
nstate = interactive_state)
ui.metadata = list("candidate" = candidate)
ui.header = "minimal"

return ui.open()

/datum/controller/subsystem/pai/proc/findPAI(obj/item/device/paicard/p, mob/user)
Expand Down
10 changes: 5 additions & 5 deletions code/controllers/subsystems/timer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var/datum/controller/subsystem/timer/SStimer

if (timer.timeToRun < head_offset)
bucket_resolution = null //force bucket recreation
CRASH("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
crash_with("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")

if (timer.callBack && !timer.spent)
timer.callBack.InvokeAsync()
Expand All @@ -172,7 +172,7 @@ var/datum/controller/subsystem/timer/SStimer

if (timer.timeToRun < head_offset + TICKS2DS(practical_offset-1))
bucket_resolution = null //force bucket recreation
CRASH("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
crash_with("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
if (timer.callBack && !timer.spent)
timer.callBack.InvokeAsync()
spent += timer
Expand Down Expand Up @@ -335,7 +335,7 @@ var/datum/controller/subsystem/timer/SStimer
timeToRun = REALTIMEOFDAY + wait
else
timeToRun = world.time + wait

if (flags & TIMER_UNIQUE)
SStimer.hashes[hash] = src
if (flags & TIMER_STOPPABLE)
Expand Down Expand Up @@ -525,7 +525,7 @@ var/datum/controller/subsystem/timer/SStimer
var/datum/timedevent/timer = null
if (!istext(id) && istype(id, /datum/timedevent))
timer = id
else
else
timer = SStimer.timer_id_dict[id]

if(!timer)
Expand All @@ -543,4 +543,4 @@ var/datum/controller/subsystem/timer/SStimer
#undef BUCKET_LEN
#undef BUCKET_POS
#undef TIMER_ID_MAX
#undef TIMER_MAX
#undef TIMER_MAX
2 changes: 1 addition & 1 deletion code/controllers/subsystems/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ var/datum/controller/subsystem/vote/SSvote
to_chat(initiator_key, "The current alert status is too high to call for a crew transfer!")
return 0
if(SSticker.current_state <= 2)
return 0
to_chat(initiator_key, "The crew transfer button has been disabled!")
return 0
question = "End the shift?"
AddChoice("Initiate Crew Transfer")
AddChoice("Continue The Round")
Expand Down
1 change: 0 additions & 1 deletion code/datums/diseases/advance/advance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ var/list/advance_cures = list(

if(!symptoms || !symptoms.len)
CRASH("We did not have any symptoms before generating properties.")
return

for(var/datum/symptom/S in symptoms)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/expansions/multitool/items/cable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/datum/expansion/multitool/items/cable/on_topic(href, href_list, user)
var/obj/item/stack/cable_coil/cable_coil = holder
if(href_list["select_color"] && href_list["select_color"] in possible_cable_coil_colours)
if(href_list["select_color"] && (href_list["select_color"] in possible_cable_coil_colours))
cable_coil.set_cable_color(href_list["select_color"], user)
return MT_REFRESH

Expand Down
1 change: 0 additions & 1 deletion code/datums/wires/wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
src.holder = holder
if(!istype(holder, holder_type))
CRASH("Our holder is null/the wrong type!")
return

// Generate new wires
if(random)
Expand Down
2 changes: 1 addition & 1 deletion code/game/antagonist/antagonist_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
return FALSE
if(config.protect_roles_from_antagonist && (player.assigned_role in protected_jobs))
return FALSE
if(player.current.client.prefs && player.current.client.prefs.species in restricted_species)
if(player.current.client.prefs && (player.current.client.prefs.species in restricted_species))
return FALSE
if(player.current && (player.current.status_flags & NO_ANTAG))
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/dna/genes/gene.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Is the gene active in this mob's DNA?
*/
/datum/dna/gene/proc/is_active(var/mob/M)
return M.active_genes && type in M.active_genes
return M.active_genes && (type in M.active_genes)

// Return 1 if we can activate.
// HANDLE MUTCHK_FORCED HERE!
Expand Down
1 change: 0 additions & 1 deletion code/game/dna/genes/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
return "hulk_[fat]_s"
else
return "hulk_[g]_s"
return 0

OnMobLife(var/mob/living/carbon/human/M)
if(!istype(M)) return
Expand Down
3 changes: 1 addition & 2 deletions code/game/gamemodes/cult/runes/see_invisible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
to_chat(user, span("warning", "The world beyond opens to your eyes."))
user.see_invisible = SEE_INVISIBLE_CULT
user.seer = TRUE
return
return fizzle(user)
return fizzle(user)
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/runes/stun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
flick("e_flash", C.flash)
if(C.stuttering < 1 && !HULK in C.mutations)
if(C.stuttering < 1 && !(HULK in C.mutations))
C.stuttering = 1
if(is_rune)
C.Weaken(3)
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,14 @@ var/global/list/additional_antag_types = list()
var/mob/living/carbon/human/H = M
if(M.stat != DEAD)
surviving_humans++
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations))
escaped_humans++
if (isipc(H))
var/datum/species/machine/machine = H.species
machine.update_tag(H, H.client)
if(M.stat != DEAD)
surviving_total++
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations))
escaped_total++

if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape/centcom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
return

if (reporttype == "Template")
sanitizeSafe(alert(usr, "Would you like it to appear as if CCIAMS made the report?",,"Yes","No"))
if ("Yes")
var/resp = alert(usr, "Would you like it to appear as if CCIAMS made the report?",,"Yes","No")
if (resp == "Yes")
reportbody += "\n\n- CCIAMS, [commstation_name()]"
else

Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,16 +351,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

/obj/machinery/camera/proc/weld(var/obj/item/weldingtool/WT, var/mob/user)
Expand Down
80 changes: 0 additions & 80 deletions code/game/machinery/computer/syndicate_specops_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,86 +63,6 @@ var/syndicate_elite_shuttle_timeleft = 0
to_chat(usr, "<span class='warning'>The Syndicate Elite shuttle is unable to leave.</span>")
return

sleep(600)
/*
//Begin Marauder launchpad.
spawn(0)//So it parallel processes it.
for(var/obj/machinery/door/poddoor/M in elite_squad)
switch(M.id)
if("ASSAULT0")
spawn(10)//1 second delay between each.
M.open()
if("ASSAULT1")
spawn(20)
M.open()
if("ASSAULT2")
spawn(30)
M.open()
if("ASSAULT3")
spawn(40)
M.open()
sleep(10)
var/spawn_marauder[] = new()
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Marauder Entry")
spawn_marauder.Add(L)
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc)
P.invisibility = 101//So it is not seen by anyone.
P.failchance = 0//So it has no fail chance when teleporting.
P.target = pick(spawn_marauder)//Where the marauder will arrive.
spawn_marauder.Remove(P.target)
sleep(10)
for(var/obj/machinery/mass_driver/M in elite_squad)
switch(M.id)
if("ASSAULT0")
spawn(10)
M.drive()
if("ASSAULT1")
spawn(20)
M.drive()
if("ASSAULT2")
spawn(30)
M.drive()
if("ASSAULT3")
spawn(40)
M.drive()
sleep(50)//Doors remain open for 5 seconds.
for(var/obj/machinery/door/poddoor/M in elite_squad)
switch(M.id)//Doors close at the same time.
if("ASSAULT0")
spawn(0)
M.close()
if("ASSAULT1")
spawn(0)
M.close()
if("ASSAULT2")
spawn(0)
M.close()
if("ASSAULT3")
spawn(0)
M.close()
*/
elite_squad.readyreset()//Reset firealarm after the team launched.
//End Marauder launchpad.
/*
var/obj/explosionmarker = locate("Syndicate Breach Area")
if(explosionmarker)
var/turf/simulated/T = explosionmarker.loc
if(T)
explosion(T,4,6,8,10,0)
sleep(40)
// proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
*/
var/area/start_location = locate(/area/shuttle/syndicate_elite/mothership)
var/area/end_location = locate(/area/shuttle/syndicate_elite/station)

Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.isbroken=1
src.update_icon()
return
return

/obj/machinery/newscaster/attack_ai(mob/user as mob)
return src.attack_hand(user)
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/pipe/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -454,17 +454,17 @@ Buildable meters

else if(pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT, PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT, PIPE_SUPPLY_BENT, PIPE_SUPPLY_STRAIGHT))
if(pipe_type in list(PIPE_SIMPLE_BENT, PIPE_SIMPLE_STRAIGHT))
if(PIPE_SIMPLE_BENT)
if(pipe_type == PIPE_SIMPLE_BENT)
pipe_type = PIPE_SCRUBBERS_BENT
else
pipe_type =PIPE_SCRUBBERS_STRAIGHT
else if(pipe_type in list(PIPE_SCRUBBERS_BENT, PIPE_SCRUBBERS_STRAIGHT))
if(PIPE_SCRUBBERS_BENT)
if(pipe_type == PIPE_SCRUBBERS_BENT)
pipe_type = PIPE_SUPPLY_BENT
else
pipe_type = PIPE_SUPPLY_STRAIGHT
else if(pipe_type in list(PIPE_SUPPLY_BENT, PIPE_SUPPLY_STRAIGHT))
if(PIPE_SUPPLY_BENT)
if(pipe_type == PIPE_SUPPLY_BENT)
pipe_type = PIPE_SIMPLE_BENT
else
pipe_type = PIPE_SIMPLE_STRAIGHT
Expand Down
Loading

0 comments on commit ed06f66

Please sign in to comment.