Does the rest of the if()'s/ else's

This commit is contained in:
Firecage
2016-01-17 19:03:12 +02:00
parent 754491ce4c
commit 332bde0f4f
186 changed files with 2169 additions and 1085 deletions

View File

@@ -63,10 +63,13 @@
/obj/effect/hotspot/proc/perform_exposure()
var/turf/simulated/location = loc
if(!istype(location) || !(location.air)) return 0
if(!istype(location) || !(location.air))
return 0
if(volume > CELL_VOLUME*0.95) bypassing = 1
else bypassing = 0
if(volume > CELL_VOLUME*0.95)
bypassing = 1
else
bypassing = 0
if(bypassing)
if(!just_spawned)

View File

@@ -1,5 +1,6 @@
/turf/proc/CanAtmosPass(turf/T)
if(!istype(T)) return 0
if(!istype(T))
return 0
var/R
if(blocks_air || T.blocks_air)
R = 1

View File

@@ -74,7 +74,8 @@
return ..()
/turf/simulated/assume_air(datum/gas_mixture/giver)
if(!giver) return 0
if(!giver)
return 0
var/datum/gas_mixture/receiver = air
if(istype(receiver))

View File

@@ -131,7 +131,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
destination_list += T
if(destination_list.len)
destination = pick(destination_list)
else return
else
return
else//Same deal here.
if(density&&destination.density)

View File

@@ -135,23 +135,39 @@ var/datum/global_hud/global_hud = new()
if(H.handcuffed)
H.handcuffed.screen_loc = null //no handcuffs in my UI!
if(inventory_shown && hud_shown)
if(H.shoes) H.shoes.screen_loc = ui_shoes
if(H.gloves) H.gloves.screen_loc = ui_gloves
if(H.ears) H.ears.screen_loc = ui_ears
if(H.glasses) H.glasses.screen_loc = ui_glasses
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
if(H.head) H.head.screen_loc = ui_head
if(H.shoes)
H.shoes.screen_loc = ui_shoes
if(H.gloves)
H.gloves.screen_loc = ui_gloves
if(H.ears)
H.ears.screen_loc = ui_ears
if(H.glasses)
H.glasses.screen_loc = ui_glasses
if(H.w_uniform)
H.w_uniform.screen_loc = ui_iclothing
if(H.wear_suit)
H.wear_suit.screen_loc = ui_oclothing
if(H.wear_mask)
H.wear_mask.screen_loc = ui_mask
if(H.head)
H.head.screen_loc = ui_head
else
if(H.shoes) H.shoes.screen_loc = null
if(H.gloves) H.gloves.screen_loc = null
if(H.ears) H.ears.screen_loc = null
if(H.glasses) H.glasses.screen_loc = null
if(H.w_uniform) H.w_uniform.screen_loc = null
if(H.wear_suit) H.wear_suit.screen_loc = null
if(H.wear_mask) H.wear_mask.screen_loc = null
if(H.head) H.head.screen_loc = null
if(H.shoes)
H.shoes.screen_loc = null
if(H.gloves)
H.gloves.screen_loc = null
if(H.ears)
H.ears.screen_loc = null
if(H.glasses)
H.glasses.screen_loc = null
if(H.w_uniform)
H.w_uniform.screen_loc = null
if(H.wear_suit)
H.wear_suit.screen_loc = null
if(H.wear_mask)
H.wear_mask.screen_loc = null
if(H.head)
H.head.screen_loc = null
/datum/hud/proc/persistant_inventory_update()
@@ -161,19 +177,31 @@ var/datum/global_hud/global_hud = new()
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(hud_shown)
if(H.s_store) H.s_store.screen_loc = ui_sstore1
if(H.wear_id) H.wear_id.screen_loc = ui_id
if(H.belt) H.belt.screen_loc = ui_belt
if(H.back) H.back.screen_loc = ui_back
if(H.l_store) H.l_store.screen_loc = ui_storage1
if(H.r_store) H.r_store.screen_loc = ui_storage2
if(H.s_store)
H.s_store.screen_loc = ui_sstore1
if(H.wear_id)
H.wear_id.screen_loc = ui_id
if(H.belt)
H.belt.screen_loc = ui_belt
if(H.back)
H.back.screen_loc = ui_back
if(H.l_store)
H.l_store.screen_loc = ui_storage1
if(H.r_store)
H.r_store.screen_loc = ui_storage2
else
if(H.s_store) H.s_store.screen_loc = null
if(H.wear_id) H.wear_id.screen_loc = null
if(H.belt) H.belt.screen_loc = null
if(H.back) H.back.screen_loc = null
if(H.l_store) H.l_store.screen_loc = null
if(H.r_store) H.r_store.screen_loc = null
if(H.s_store)
H.s_store.screen_loc = null
if(H.wear_id)
H.wear_id.screen_loc = null
if(H.belt)
H.belt.screen_loc = null
if(H.back)
H.back.screen_loc = null
if(H.l_store)
H.l_store.screen_loc = null
if(H.r_store)
H.r_store.screen_loc = null
/datum/hud/proc/instantiate()

View File

@@ -211,7 +211,8 @@
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
if(!t)
continue
t = trim(t)
if(length(t) == 0)
@@ -576,7 +577,8 @@
var/datum/votablemap/currentmap = null
for(var/t in Lines)
if(!t) continue
if(!t)
continue
t = trim(t)
if(length(t) == 0)
@@ -625,7 +627,8 @@
/datum/configuration/proc/loadsql(filename)
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
if(!t)
continue
t = trim(t)
if(length(t) == 0)

View File

@@ -62,12 +62,17 @@ var/datum/subsystem/events/SSevent
var/sum_of_weights = 0
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.gamemode_blacklist.len && (ticker.mode.config_tag in E.gamemode_blacklist)) continue
if(E.gamemode_whitelist.len && !(ticker.mode.config_tag in E.gamemode_whitelist)) continue
if(E.occurrences >= E.max_occurrences)
continue
if(E.earliest_start >= world.time)
continue
if(E.gamemode_blacklist.len && (ticker.mode.config_tag in E.gamemode_blacklist))
continue
if(E.gamemode_whitelist.len && !(ticker.mode.config_tag in E.gamemode_whitelist))
continue
if(E.holidayID)
if(!holidays || !holidays[E.holidayID]) continue
if(!holidays || !holidays[E.holidayID])
continue
if(E.weight < 0) //for round-start events etc.
if(E.runEvent() == PROCESS_KILL)
E.max_occurrences = 0
@@ -81,12 +86,17 @@ var/datum/subsystem/events/SSevent
sum_of_weights = rand(0,sum_of_weights) //reusing this variable. It now represents the 'weight' we want to select
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.gamemode_blacklist.len && (ticker.mode.config_tag in E.gamemode_blacklist)) continue
if(E.gamemode_whitelist.len && !(ticker.mode.config_tag in E.gamemode_whitelist)) continue
if(E.occurrences >= E.max_occurrences)
continue
if(E.earliest_start >= world.time)
continue
if(E.gamemode_blacklist.len && (ticker.mode.config_tag in E.gamemode_blacklist))
continue
if(E.gamemode_whitelist.len && !(ticker.mode.config_tag in E.gamemode_whitelist))
continue
if(E.holidayID)
if(!holidays || !holidays[E.holidayID]) continue
if(!holidays || !holidays[E.holidayID])
continue
sum_of_weights -= E.weight
if(sum_of_weights <= 0) //we've hit our goal
@@ -172,7 +182,8 @@ var/datum/subsystem/events/SSevent
//sets up the holidays and holidays list
/datum/subsystem/events/proc/getHoliday()
if(!config.allow_holidays) return // Holiday stuff was not enabled in the config!
if(!config.allow_holidays)
return // Holiday stuff was not enabled in the config!
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month

View File

@@ -31,34 +31,44 @@ var/datum/subsystem/job/SSjob
for(var/J in all_jobs)
var/datum/job/job = new J()
if(!job) continue
if(job.faction != faction) continue
if(!job.config_check()) continue
if(!job)
continue
if(job.faction != faction)
continue
if(!job.config_check())
continue
occupations += job
return 1
/datum/subsystem/job/proc/Debug(text)
if(!Debug2) return 0
if(!Debug2)
return 0
job_debug.Add(text)
return 1
/datum/subsystem/job/proc/GetJob(rank)
if(!rank) return null
if(!rank)
return null
for(var/datum/job/J in occupations)
if(!J) continue
if(J.title == rank) return J
if(!J)
continue
if(J.title == rank)
return J
return null
/datum/subsystem/job/proc/AssignRole(mob/new_player/player, rank, latejoin=0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
if(player && player.mind && rank)
var/datum/job/job = GetJob(rank)
if(!job) return 0
if(jobban_isbanned(player, rank)) return 0
if(!job.player_old_enough(player.client)) return 0
if(!job)
return 0
if(jobban_isbanned(player, rank))
return 0
if(!job.player_old_enough(player.client))
return 0
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
@@ -147,10 +157,13 @@ var/datum/subsystem/job/SSjob
for(var/level = 1 to 3)
for(var/command_position in command_positions)
var/datum/job/job = GetJob(command_position)
if(!job) continue
if((job.current_positions >= job.total_positions) && job.total_positions != -1) continue
if(!job)
continue
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
continue
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len) continue
if(!candidates.len)
continue
var/mob/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
return 1
@@ -162,10 +175,13 @@ var/datum/subsystem/job/SSjob
/datum/subsystem/job/proc/CheckHeadPositions(level)
for(var/command_position in command_positions)
var/datum/job/job = GetJob(command_position)
if(!job) continue
if((job.current_positions >= job.total_positions) && job.total_positions != -1) continue
if(!job)
continue
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
continue
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len) continue
if(!candidates.len)
continue
var/mob/new_player/candidate = pick(candidates)
AssignRole(candidate, command_position)
return
@@ -212,7 +228,8 @@ var/datum/subsystem/job/SSjob
initial_players_to_assign = unassigned.len
Debug("DO, Len: [unassigned.len]")
if(unassigned.len == 0) return 0
if(unassigned.len == 0)
return 0
//Scale number of open security officer slots to population
setup_officer_positions()

View File

@@ -109,7 +109,8 @@ var/datum/subsystem/lighting/SSlighting
var/msg = "## DEBUG: [time2text(world.timeofday)] [name] subsystem restarted. Reports:\n"
for(var/varname in SSlighting.vars)
switch(varname)
if("tag","bestF","type","parent_type","vars") continue
if("tag","bestF","type","parent_type","vars")
continue
else
var/varval1 = SSlighting.vars[varname]
var/varval2 = vars[varname]

View File

@@ -198,11 +198,13 @@ var/datum/subsystem/pai/SSpai
/datum/subsystem/pai/proc/question(client/C)
spawn(0)
if(!C) return
if(!C)
return
asked.Add(C.key)
asked[C.key] = world.time
var/response = tgalert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round", StealFocus=0, Timeout=askDelay)
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(!C)
return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")

View File

@@ -277,7 +277,8 @@ var/datum/subsystem/shuttle/SSshuttle
contains = object.contains
for(var/typepath in contains)
if(!typepath) continue
if(!typepath)
continue
var/atom/A = new typepath(Crate)
if(object.amount && A.vars.Find("amount") && A:amount)
A:amount = object.amount

View File

@@ -72,7 +72,8 @@
/*
/obj/docking_port/mobile/emergency/findTransitDock()
. = SSshuttle.getDock("emergency_transit")
if(.) return .
if(.)
return .
return ..()
*/

View File

@@ -32,7 +32,8 @@
/obj/docking_port/mobile/supply/dock()
. = ..()
if(.) return .
if(.)
return .
buy()
sell()
@@ -46,11 +47,13 @@
var/list/emptyTurfs = list()
for(var/turf/simulated/floor/T in areaInstance)
if(T.density || T.contents.len) continue
if(T.density || T.contents.len)
continue
emptyTurfs += T
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
if(!SO.object) continue
if(!SO.object)
continue
var/turf/T = pick_n_take(emptyTurfs) //turf we will place it in
if(!T)
@@ -81,7 +84,8 @@
var/pointsEarned
for(var/atom/movable/MA in areaInstance)
if(MA.anchored) continue
if(MA.anchored)
continue
SSshuttle.sold_atoms += " [MA.name]"
// Must be in a crate (or a critter crate)!
@@ -147,7 +151,8 @@
// Sell tech levels
if(istype(thing, /obj/item/weapon/disk/tech_disk))
var/obj/item/weapon/disk/tech_disk/disk = thing
if(!disk.stored) continue
if(!disk.stored)
continue
var/datum/tech/tech = disk.stored
var/cost = tech.getCost(SSshuttle.techLevels[tech.id])
@@ -159,9 +164,11 @@
// Sell max reliablity designs
if(istype(thing, /obj/item/weapon/disk/design_disk))
var/obj/item/weapon/disk/design_disk/disk = thing
if(!disk.blueprint) continue
if(!disk.blueprint)
continue
var/datum/design/design = disk.blueprint
if(design.id in SSshuttle.researchDesigns) continue
if(design.id in SSshuttle.researchDesigns)
continue
if(initial(design.reliability) < 100 && design.reliability >= 100)
// Maxed out reliability designs only.
@@ -284,7 +291,8 @@
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
for(var/supply_type in SSshuttle.supply_packs )
var/datum/supply_packs/N = SSshuttle.supply_packs[supply_type]
if(N.hidden || N.contraband || N.group != cat) continue //Have to send the type instead of a reference to
if(N.hidden || N.contraband || N.group != cat)
continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
else if (href_list["doorder"])
if(world.time < reqtime)
@@ -292,12 +300,15 @@
return
//Find the correct supply_pack datum
if(!SSshuttle.supply_packs["[href_list["doorder"]]"]) return
if(!SSshuttle.supply_packs["[href_list["doorder"]]"])
return
var/timeout = world.time + 600
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
if(world.time > timeout) return
if(!reason) return
if(world.time > timeout)
return
if(!reason)
return
var/idname = "*None Provided*"
var/idrank = "*None Provided*"
@@ -309,7 +320,8 @@
idname = usr.real_name
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(href_list["doorder"], idname, idrank, reason)
if(!O) return
if(!O)
return
O.generateRequisition(loc)
reqtime = (world.time + 5) % 1e5
@@ -413,7 +425,8 @@
post_signal("supply")
else if (href_list["order"])
if(SSshuttle.supply.mode != SHUTTLE_IDLE) return
if(SSshuttle.supply.mode != SHUTTLE_IDLE)
return
if(href_list["order"] == "categories")
//all_supply_groups
//Request what?
@@ -455,8 +468,10 @@
var/timeout = world.time + 600
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
if(world.time > timeout) return
// if(!reason) return
if(world.time > timeout)
return
// if(!reason)
// return
var/idname = "*None Provided*"
var/idrank = "*None Provided*"
@@ -468,7 +483,8 @@
idname = usr.real_name
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(href_list["doorder"], idname, idrank, reason)
if(!O) return
if(!O)
return
O.generateRequisition(loc)
reqtime = (world.time + 5) % 1e5
@@ -549,7 +565,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src

View File

@@ -59,8 +59,10 @@ var/datum/subsystem/ticker/ticker
/datum/subsystem/ticker/Initialize(timeofday, zlevel)
if (zlevel)
return ..()
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
if(!syndicate_code_phrase)
syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response)
syndicate_code_response = generate_code_phrase()
setupFactions()
..()
@@ -207,7 +209,8 @@ var/datum/subsystem/ticker/ticker
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
/datum/subsystem/ticker/proc/station_explosion_cinematic(station_missed=0, override = null)
if( cinematic ) return //already a cinematic in progress!
if( cinematic )
return //already a cinematic in progress!
for (var/datum/html_interface/hi in html_interfaces)
hi.closeAll()
@@ -304,8 +307,10 @@ var/datum/subsystem/ticker/ticker
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
spawn(300)
if(cinematic) qdel(cinematic) //end the cinematic
if(temp_buckle) qdel(temp_buckle) //release everybody
if(cinematic)
qdel(cinematic) //end the cinematic
if(temp_buckle)
qdel(temp_buckle) //release everybody
return

View File

@@ -79,11 +79,14 @@ var/datum/subsystem/vote/SSvote
var/list/winners = get_result()
var/text
if(winners.len > 0)
if(question) text += "<b>[question]</b>"
else text += "<b>[capitalize(mode)] Vote</b>"
if(question)
text += "<b>[question]</b>"
else
text += "<b>[capitalize(mode)] Vote</b>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
if(!votes)
votes = 0
text += "\n<b>[choices[i]]:</b> [votes]"
if(mode != "custom")
if(winners.len > 1)
@@ -149,16 +152,21 @@ var/datum/subsystem/vote/SSvote
reset()
switch(vote_type)
if("restart") choices.Add("Restart Round","Continue Playing")
if("gamemode") choices.Add(config.votable_modes)
if("restart")
choices.Add("Restart Round","Continue Playing")
if("gamemode")
choices.Add(config.votable_modes)
if("custom")
question = stripped_input(usr,"What is the vote for?")
if(!question) return 0
if(!question)
return 0
for(var/i=1,i<=10,i++)
var/option = capitalize(stripped_input(usr,"Please enter an option or hit cancel to finish"))
if(!option || mode || !usr.client) break
if(!option || mode || !usr.client)
break
choices.Add(option)
else return 0
else
return 0
mode = vote_type
initiator = initiator_key
started_time = world.time
@@ -172,7 +180,8 @@ var/datum/subsystem/vote/SSvote
return 0
/datum/subsystem/vote/proc/interface(client/C)
if(!C) return
if(!C)
return
var/admin = 0
var/trialmin = 0
if(C.holder)
@@ -182,12 +191,15 @@ var/datum/subsystem/vote/SSvote
voting |= C
if(mode)
if(question) . += "<h2>Vote: '[question]'</h2>"
else . += "<h2>Vote: [capitalize(mode)]</h2>"
if(question)
. += "<h2>Vote: '[question]'</h2>"
else
. += "<h2>Vote: [capitalize(mode)]</h2>"
. += "Time Left: [time_remaining] s<hr><ul>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
if(!votes)
votes = 0
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</li>"
. += "</ul><hr>"
if(admin)
@@ -220,7 +232,8 @@ var/datum/subsystem/vote/SSvote
/datum/subsystem/vote/Topic(href,href_list[],hsrc)
if(!usr || !usr.client) return //not necessary but meh...just in-case somebody does something stupid
if(!usr || !usr.client)
return //not necessary but meh...just in-case somebody does something stupid
switch(href_list["vote"])
if("close")
voting -= usr.client

View File

@@ -88,8 +88,10 @@
add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
if(1)
for(var/line in file2list("config/silicon_laws.txt"))
if(!line) continue
if(findtextEx(line,"#",1,2)) continue
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
add_inherent_law(line)
if(!inherent.len)
@@ -107,8 +109,10 @@
/datum/ai_laws/custom/New() //This reads silicon_laws.txt and allows server hosts to set custom AI starting laws.
..()
for(var/line in file2list("config/silicon_laws.txt"))
if(!line) continue
if(findtextEx(line,"#",1,2)) continue
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
add_inherent_law(line)
if(!inherent.len) //Failsafe to prevent lawless AIs being created.

View File

@@ -17,7 +17,8 @@ datum/proc/on_varedit(modified_var) //called whenever a var is edited
var/title = ""
var/body = ""
if(!D) return
if(!D)
return
if(istype(D, /atom))
var/atom/A = D
title = "[A.name] (\ref[A]) = [A.type]"
@@ -425,7 +426,8 @@ body
src.debug_variables(DAT)
else if(href_list["mob_player_panel"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["mob_player_panel"])
if(!istype(M))
@@ -436,7 +438,8 @@ body
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
if(!check_rights(R_REJUVINATE))
return
var/mob/M = locate(href_list["godmode"])
if(!istype(M))
@@ -447,7 +450,8 @@ body
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["mark_object"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/datum/D = locate(href_list["mark_object"])
if(!istype(D))
@@ -458,7 +462,8 @@ body
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["proc_call"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/T = locate(href_list["proc_call"])
@@ -466,7 +471,8 @@ body
callproc_datum(T)
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["regenerateicons"])
if(!ismob(M))
@@ -482,7 +488,8 @@ body
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
if(href_list["rename"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
@@ -490,14 +497,16 @@ body
return
var/new_name = stripped_input(usr,"What would you like to name this mob?","Input a name",M.real_name,MAX_NAME_LEN)
if( !new_name || !M ) return
if( !new_name || !M )
return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
@@ -507,7 +516,8 @@ body
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
@@ -517,7 +527,8 @@ body
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
@@ -527,7 +538,8 @@ body
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
else if(href_list["give_spell"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
@@ -538,7 +550,8 @@ body
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
@@ -549,7 +562,8 @@ body
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["ninja"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/mob/M = locate(href_list["ninja"])
if(!istype(M))
@@ -560,7 +574,8 @@ body
href_list["datumrefresh"] = href_list["ninja"]
else if(href_list["gib"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/mob/M = locate(href_list["gib"])
if(!istype(M))
@@ -570,7 +585,8 @@ body
src.cmd_admin_gib(M)
else if(href_list["build_mode"])
if(!check_rights(R_BUILDMODE)) return
if(!check_rights(R_BUILDMODE))
return
var/mob/M = locate(href_list["build_mode"])
if(!istype(M))
@@ -581,7 +597,8 @@ body
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
@@ -592,7 +609,8 @@ body
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["direct_control"])
if(!istype(M))
@@ -603,7 +621,8 @@ body
usr.client.cmd_assume_direct_control(M)
else if(href_list["offer_control"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/M = locate(href_list["offer_control"])
if(!istype(M))
@@ -631,7 +650,8 @@ body
message_admins("No ghosts were willing to take control of [key_name_admin(M)])")
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
if(!check_rights(R_DEBUG|R_SERVER))
return
var/obj/O = locate(href_list["delall"])
if(!isobj(O))
@@ -674,7 +694,8 @@ body
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) </span>")
else if(href_list["addreagent"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/atom/A = locate(href_list["addreagent"])
@@ -706,7 +727,8 @@ body
href_list["datumrefresh"] = href_list["addreagent"]
else if(href_list["explode"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
@@ -717,7 +739,8 @@ body
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
@@ -728,7 +751,8 @@ body
href_list["datumrefresh"] = href_list["emp"]
else if(href_list["rotatedatum"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/atom/A = locate(href_list["rotatedatum"])
if(!istype(A))
@@ -736,12 +760,15 @@ body
return
switch(href_list["rotatedir"])
if("right") A.dir = turn(A.dir, -45)
if("left") A.dir = turn(A.dir, 45)
if("right")
A.dir = turn(A.dir, -45)
if("left")
A.dir = turn(A.dir, 45)
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["editorgans"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/living/carbon/C = locate(href_list["editorgans"])
if(!istype(C))
@@ -752,91 +779,104 @@ body
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["makehuman"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"])
if(!istype(Mo))
usr << "This can only be done to instances of type /mob/living/carbon/monkey"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!Mo)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("humanone"=href_list["makehuman"]))
else if(href_list["makemonkey"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makealien"=href_list["makealien"]))
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setspecies"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
if(!istype(H))
@@ -857,7 +897,8 @@ body
else if(href_list["purrbation"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["purrbation"])
if(!istype(H))
@@ -889,10 +930,12 @@ body
usr << "You can only put humans on purrbation."
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(0)) return
if(!check_rights(0))
return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
if(!istype(L))
return
var/Text = href_list["adjustDamage"]
@@ -903,13 +946,20 @@ body
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
if("stamina") L.adjustStaminaLoss(amount)
if("brute")
L.adjustBruteLoss(amount)
if("fire")
L.adjustFireLoss(amount)
if("toxin")
L.adjustToxLoss(amount)
if("oxygen")
L.adjustOxyLoss(amount)
if("brain")
L.adjustBrainLoss(amount)
if("clone")
L.adjustCloneLoss(amount)
if("stamina")
L.adjustStaminaLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
return

View File

@@ -65,8 +65,10 @@
affected_mob << "<span class='danger'>Your entire body vibrates.</span>"
if (prob(35))
if(prob(50)) scramble_dna(affected_mob, 1, 0, rand(15,45))
else scramble_dna(affected_mob, 0, 1, rand(15,45))
if(prob(50))
scramble_dna(affected_mob, 1, 0, rand(15,45))
else
scramble_dna(affected_mob, 0, 1, rand(15,45))
if(4)
if(restcure)
@@ -75,5 +77,7 @@
cure()
return
if (prob(60))
if(prob(50)) scramble_dna(affected_mob, 1, 0, rand(50,75))
else scramble_dna(affected_mob, 0, 1, rand(50,75))
if(prob(50))
scramble_dna(affected_mob, 1, 0, rand(50,75))
else
scramble_dna(affected_mob, 0, 1, rand(50,75))

View File

@@ -42,7 +42,8 @@
if(jobban_isbanned(affected_mob, new_form))
affected_mob.death(1)
return
if(affected_mob.notransform) return
if(affected_mob.notransform)
return
affected_mob.notransform = 1
affected_mob.canmove = 0
affected_mob.icon = null

View File

@@ -418,7 +418,8 @@ What are the archived variables for?
return 1
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
if(!sharer) return 0
if(!sharer)
return 0
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/(atmos_adjacent_turfs+1)

View File

@@ -10,7 +10,8 @@ var/global/datum/getrev/revdata = new()
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
var/list/last_entry = text2list(head_log[line], " ")
if(last_entry.len < 2) continue
if(last_entry.len < 2)
continue
revision = last_entry[2]
// Get date/time
if(last_entry.len >= 5)

View File

@@ -205,8 +205,10 @@
for(var/datum/objective/objective in objectives)
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
if(window) recipient << browse(output,"window=memory")
else recipient << "<i>[output]</i>"
if(window)
recipient << browse(output,"window=memory")
else
recipient << "<i>[output]</i>"
/datum/mind/proc/edit_memory()
if(!ticker || !ticker.mode)
@@ -1490,13 +1492,15 @@
else
spawn(0)
throw EXCEPTION("mind_initialize(): No ticker ready")
if(!mind.name) mind.name = real_name
if(!mind.name)
mind.name = real_name
mind.current = src
//HUMAN
/mob/living/carbon/human/mind_initialize()
..()
if(!mind.assigned_role) mind.assigned_role = "Assistant" //defualt
if(!mind.assigned_role)
mind.assigned_role = "Assistant" //defualt
//MONKEY
/mob/living/carbon/monkey/mind_initialize()

View File

@@ -30,7 +30,8 @@
. = on_losing(owner)
/datum/mutation/human/proc/set_se(se_string, on = 1)
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE) return
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
return
var/before = copytext(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
var/after = copytext(se_string, (dna_block * DNA_BLOCK_SIZE) + 1, 0)
@@ -41,7 +42,8 @@
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
/datum/mutation/human/proc/check_block_string(se_string)
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE) return 0
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
return 0
if(hex2num(getblock(se_string, dna_block)) >= lowest_value)
return 1
@@ -288,13 +290,15 @@
text_lose_indication = "<span class='notice'>Everything around you seems to shrink..</span>"
/datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner)
if(..()) return
if(..())
return
owner.resize = 0.8
owner.pass_flags |= PASSTABLE
owner.visible_message("<span class='danger'>[owner] suddenly shrinks!</span>")
/datum/mutation/human/dwarfism/on_losing(mob/living/carbon/human/owner)
if(..()) return
if(..())
return
owner.resize = 1.25
owner.pass_flags &= ~PASSTABLE
owner.visible_message("<span class='danger'>[owner] suddenly grows!</span>")
@@ -306,7 +310,8 @@
text_gain_indication = "<span class='danger'>You feel lightheaded.</span>"
/datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner)
if(..()) return
if(..())
return
owner.disabilities |= CLUMSY
/datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner)
@@ -352,7 +357,8 @@
text_gain_indication = "<span class='danger'>You can't seem to hear anything.</span>"
/datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner)
if(..()) return
if(..())
return
owner.disabilities |= DEAF
/datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner)
@@ -367,7 +373,8 @@
text_gain_indication = "<span class='danger'>You can't seem to see anything.</span>"
/datum/mutation/human/blind/on_acquiring(mob/living/carbon/human/owner)
if(..()) return
if(..())
return
owner.disabilities |= BLIND
/datum/mutation/human/blind/on_losing(mob/living/carbon/human/owner)

View File

@@ -19,8 +19,10 @@
if(T in range(target,inner_tele_radius)) continue
if(istype(T,/turf/space) && !include_space) continue
if(T.density && !include_dense) continue
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius)
continue //putting them at the edge is dumb
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius)
continue
turfs += T
if(!turfs.len)

View File

@@ -54,7 +54,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/datum/supply_packs/New()
manifest += "<ul>"
for(var/path in contains)
if(!path) continue
if(!path)
continue
var/atom/movable/AM = path
manifest += "<li>[initial(AM.name)]</li>"
manifest += "</ul>"

View File

@@ -178,10 +178,13 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(AIRLOCK_WIRE_OPEN_DOOR)
//tries to open the door without ID
//will succeed only if the ID wire is cut or the door requires no access and it's not emagged
if(A.emagged) return
if(A.emagged)
return
if(!A.requiresID() || A.check_access(null))
if(A.density) A.open()
else A.close()
if(A.density)
A.open()
else
A.close()
if(AIRLOCK_WIRE_SAFETY)
A.safe = !A.safe
if(!A.density)

View File

@@ -322,17 +322,20 @@
/area/Entered(A)
if(!istype(A,/mob/living)) return
if(!istype(A,/mob/living))
return
var/mob/living/L = A
if(!L.ckey) return
if(!L.ckey)
return
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
L.client.ambience_playing = 1
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE))) return //General ambience check is below the ship ambience so one can play without the other
if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)))
return //General ambience check is below the ship ambience so one can play without the other
if(prob(35))
var/sound = pick(ambientsounds)

View File

@@ -117,7 +117,8 @@
loc = destination
destination.Entered(src, oldloc)
for(var/atom/movable/AM in destination)
if(AM == src) continue
if(AM == src)
continue
AM.Crossed(src)
Moved(oldloc, 0)
return 1
@@ -170,7 +171,8 @@
throw_at(target, range, speed, thrower, spin, diagonals_first)
/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0)
if(!target || !src || (flags & NODROP)) return 0
if(!target || !src || (flags & NODROP))
return 0
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
throwing = 1

View File

@@ -54,7 +54,8 @@
remove_mutation_group(mutations)
/datum/dna/proc/remove_mutation_group(list/group)
if(!group) return
if(!group)
return
for(var/datum/mutation/human/HM in group)
HM.force_lose(holder)
@@ -77,8 +78,10 @@
L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color)
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
if(L[i]) . += L[i]
else . += random_string(DNA_BLOCK_SIZE,hex_characters)
if(L[i])
. += L[i]
else
. += random_string(DNA_BLOCK_SIZE,hex_characters)
return .
/datum/dna/proc/generate_struc_enzymes()
@@ -279,7 +282,8 @@ mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutat
return copytext(input, blocksize*(blocknumber-1)+1, (blocksize*blocknumber)+1)
/proc/setblock(istring, blocknumber, replacement, blocksize=DNA_BLOCK_SIZE)
if(!istring || !blocknumber || !replacement || !blocksize) return 0
if(!istring || !blocknumber || !replacement || !blocksize)
return 0
return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
/proc/randmut(mob/living/carbon/M, list/candidates, difficulty = 2)

View File

@@ -98,7 +98,8 @@
world << "ERROR: NO VALID TERRITORIES"
/datum/station_state/proc/score(datum/station_state/result)
if(!result) return 0
if(!result)
return 0
var/output = 0
output += (result.floor / max(floor,1))
output += (result.r_wall/ max(r_wall,1))

View File

@@ -241,8 +241,10 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas
/datum/changeling/New(var/gender=FEMALE)
..()
var/honorific
if(gender == FEMALE) honorific = "Ms."
else honorific = "Mr."
if(gender == FEMALE)
honorific = "Ms."
else
honorific = "Mr."
if(possible_changeling_IDs.len)
changelingID = pick(possible_changeling_IDs)
possible_changeling_IDs -= changelingID

View File

@@ -82,7 +82,8 @@ var/list/datum/dna/hivemind_bank = list()
return
var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
if(!S) return
if(!S)
return
var/datum/changelingprofile/chosen_prof = names[S]
if(!chosen_prof)
return

View File

@@ -740,7 +740,8 @@ var/global/list/possible_items_special = list()
explanation_text = "Steal at least five guns!"
/datum/objective/summon_guns/check_completion()
if(!isliving(owner.current)) return 0
if(!isliving(owner.current))
return 0
var/guncount = 0
var/list/all_items = owner.current.GetAllContents() //this should get things in cheesewheels, books, etc.
for(var/obj/I in all_items) //Check for guns

View File

@@ -57,19 +57,19 @@
wizard.current.stat = 2
continue
wizards_alive++
if(!time_checked)
if(!time_checked)
time_checked = world.time
if(bullshit_mode)
if(world.time > time_checked + time_check)
max_mages = INFINITY
time_checked = world.time
make_more_mages()
make_more_mages()
return ..()
if (wizards_alive)
if(world.time > time_checked + time_check && (mages_made < max_mages))
time_checked = world.time
make_more_mages()
else
if(mages_made >= max_mages)
finished = 1
@@ -137,7 +137,8 @@
..(1)
/datum/game_mode/wizard/raginmages/proc/makeBody(mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
if(!G_found || !G_found.key) return
if(!G_found || !G_found.key)
return
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.

View File

@@ -159,11 +159,16 @@
/obj/proc/check_access_list(list/L)
if(!src.req_access && !src.req_one_access) return 1
if(!istype(src.req_access, /list)) return 1
if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1
if(!L) return 0
if(!istype(L, /list)) return 0
if(!src.req_access && !src.req_one_access)
return 1
if(!istype(src.req_access, /list))
return 1
if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len))
return 1
if(!L)
return 0
if(!istype(L, /list))
return 0
for(var/req in src.req_access)
if(!(req in L)) //doesn't have this access
return 0
@@ -437,7 +442,8 @@
/obj/item/proc/GetJobName() //Used in secHUD icon generation
var/obj/item/weapon/card/id/I = GetID()
if(!I) return
if(!I)
return
var/jobName = I.assignment
if(jobName in get_all_job_icons()) //Check if the job has a hud icon
return jobName

View File

@@ -14,7 +14,8 @@ AI
minimal_player_age = 30
/datum/job/ai/equip(mob/living/carbon/human/H)
if(!H) return 0
if(!H)
return 0
/datum/job/ai/config_check()
if(config && config.allow_ai)
@@ -36,5 +37,6 @@ Cyborg
minimal_player_age = 21
/datum/job/cyborg/equip(mob/living/carbon/human/H)
if(!H) return 0
if(!H)
return 0
return H.Robotize()

View File

@@ -4,7 +4,8 @@ var/list/whitelist
/proc/load_whitelist()
whitelist = file2list(WHITELISTFILE)
if(!whitelist.len) whitelist = null
if(!whitelist.len)
whitelist = null
/proc/check_whitelist(mob/M /*, var/rank*/)
if(!whitelist)

View File

@@ -85,7 +85,8 @@
ai_actual_track(target)
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target)
if(!istype(target)) return
if(!istype(target))
return
var/mob/living/silicon/ai/U = usr
U.cameraFollow = target

View File

@@ -102,7 +102,8 @@ var/time_last_changed_position = 0
user.set_machine(src)
var/dat
if(!ticker) return
if(!ticker)
return
if (mode == 1) // accessing crew manifest
var/crew = ""
for(var/datum/data/record/t in sortRecord(data_core.general))

View File

@@ -88,9 +88,12 @@
if(viable_occupant.has_dna() && (!(viable_occupant.disabilities & NOCLONE) || (connected.scan_level == 3))) //occupent is viable for dna modification
occupant_status += "[viable_occupant.name] => "
switch(viable_occupant.stat)
if(CONSCIOUS) occupant_status += "<span class='good'>Conscious</span>"
if(UNCONSCIOUS) occupant_status += "<span class='average'>Unconscious</span>"
else occupant_status += "<span class='bad'>DEAD</span>"
if(CONSCIOUS)
occupant_status += "<span class='good'>Conscious</span>"
if(UNCONSCIOUS)
occupant_status += "<span class='average'>Unconscious</span>"
else
occupant_status += "<span class='bad'>DEAD</span>"
occupant_status += "</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [viable_occupant.health]%;' class='progressFill good'></div></div><div class='statusValue'>[viable_occupant.health] %</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Radiation Level:</div><div class='progressBar'><div style='width: [viable_occupant.radiation]%;' class='progressFill bad'></div></div><div class='statusValue'>[viable_occupant.radiation] %</div></div>"
@@ -133,10 +136,14 @@
stddev = RADIATION_ACCURACY_MULTIPLIER/radduration
var/chance_to_hit
switch(stddev) //hardcoded values from a z-table for a normal distribution
if(0 to 0.25) chance_to_hit = ">95 %"
if(0.25 to 0.5) chance_to_hit = "68-95 %"
if(0.5 to 0.75) chance_to_hit = "55-68 %"
else chance_to_hit = "<38 %"
if(0 to 0.25)
chance_to_hit = ">95 %"
if(0.25 to 0.5)
chance_to_hit = "68-95 %"
if(0.5 to 0.75)
chance_to_hit = "55-68 %"
else
chance_to_hit = "<38 %"
status += "<div class='line'><div class='statusLabel'>Pulse Duration:</div><div class='statusValue'>[radduration]</div></div>"
status += "<div class='line'><div class='statusLabel'>&nbsp;&nbsp;\> Accuracy:</div><div class='statusValue'>[chance_to_hit]</div></div>"
status += "<br></div>" // Close statusDisplay div
@@ -147,13 +154,20 @@
buttons += "<span class='linkOff'>[connected.locked ? "Unlock" : "Lock"] Scanner</span> "
else
buttons += "<a href='?src=\ref[src];task=togglelock;'>[connected.locked ? "Unlock" : "Lock"] Scanner</a> "
else buttons += "<span class='linkOff'>Open Scanner</span> <span class='linkOff'>Lock Scanner</span> "
if(viable_occupant) buttons += "<a href='?src=\ref[src];task=rejuv'>Inject Rejuvenators</a> "
else buttons += "<span class='linkOff'>Inject Rejuvenators</span> "
if(diskette) buttons += "<a href='?src=\ref[src];task=ejectdisk'>Eject Disk</a> "
else buttons += "<span class='linkOff'>Eject Disk</span> "
if(current_screen == "buffer") buttons += "<a href='?src=\ref[src];task=screen;text=mainmenu;'>Radiation Emitter Menu</a> "
else buttons += "<a href='?src=\ref[src];task=screen;text=buffer;'>Buffer Menu</a> "
else
buttons += "<span class='linkOff'>Open Scanner</span> <span class='linkOff'>Lock Scanner</span> "
if(viable_occupant)
buttons += "<a href='?src=\ref[src];task=rejuv'>Inject Rejuvenators</a> "
else
buttons += "<span class='linkOff'>Inject Rejuvenators</span> "
if(diskette)
buttons += "<a href='?src=\ref[src];task=ejectdisk'>Eject Disk</a> "
else
buttons += "<span class='linkOff'>Eject Disk</span> "
if(current_screen == "buffer")
buttons += "<a href='?src=\ref[src];task=screen;text=mainmenu;'>Radiation Emitter Menu</a> "
else
buttons += "<a href='?src=\ref[src];task=screen;text=buffer;'>Buffer Menu</a> "
switch(current_screen)
if("working")
@@ -171,11 +185,15 @@
var/list/buffer_slot = buffer[i]
if( !buffer_slot || !buffer_slot.len || !buffer_slot["name"] || !((buffer_slot["UI"] && buffer_slot["UE"]) || buffer_slot["SE"]) )
temp_html += "<br>\tNo Data"
if(viable_occupant) temp_html += "<br><a href='?src=\ref[src];task=setbuffer;num=[i];'>Save to Buffer</a> "
else temp_html += "<br><span class='linkOff'>Save to Buffer</span> "
if(viable_occupant)
temp_html += "<br><a href='?src=\ref[src];task=setbuffer;num=[i];'>Save to Buffer</a> "
else
temp_html += "<br><span class='linkOff'>Save to Buffer</span> "
temp_html += "<span class='linkOff'>Clear Buffer</span> "
if(diskette) temp_html += "<a href='?src=\ref[src];task=loaddisk;num=[i];'>Load from Disk</a> "
else temp_html += "<span class='linkOff'>Load from Disk</span> "
if(diskette)
temp_html += "<a href='?src=\ref[src];task=loaddisk;num=[i];'>Load from Disk</a> "
else
temp_html += "<span class='linkOff'>Load from Disk</span> "
temp_html += "<span class='linkOff'>Save to Disk</span> "
else
var/ui = buffer_slot["UI"]
@@ -189,46 +207,68 @@
if(ue && name && blood_type)
temp_html += "<br>\tBlood Type: [blood_type]"
temp_html += "<br>\tUE: [ue] "
if(viable_occupant) temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=ue'>Occupant</a> "
else temp_html += "<span class='linkOff'>Occupant</span>"
if(viable_occupant)
temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=ue'>Occupant</a> "
else
temp_html += "<span class='linkOff'>Occupant</span>"
temp_html += "<a href='?src=\ref[src];task=setdelayed;num=[i];delayaction=[SCANNER_ACTION_UE]'>Occupant:Delayed</a> "
if(injectorready) temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=ue'>Injector</a>"
else temp_html += "<span class='linkOff'>Injector</span>"
if(injectorready)
temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=ue'>Injector</a>"
else
temp_html += "<span class='linkOff'>Injector</span>"
else
temp_html += "<br>\tBlood Type: No Data"
temp_html += "<br>\tUE: No Data"
if(ui)
temp_html += "<br>\tUI: [ui] "
if(viable_occupant) temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=ui'>Occupant</a> "
else temp_html += "<span class='linkOff'>Occupant</span>"
if(viable_occupant)
temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=ui'>Occupant</a> "
else
temp_html += "<span class='linkOff'>Occupant</span>"
temp_html += "<a href='?src=\ref[src];task=setdelayed;num=[i];delayaction=[SCANNER_ACTION_UI]'>Occupant:Delayed</a> "
if(injectorready) temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=ui'>Injector</a>"
else temp_html += "<span class='linkOff'>Injector</span>"
if(injectorready)
temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=ui'>Injector</a>"
else
temp_html += "<span class='linkOff'>Injector</span>"
else
temp_html += "<br>\tUI: No Data"
if(ue && name && blood_type && ui)
temp_html += "<br>\tUI+UE: [ui]/[ue] "
if(viable_occupant) temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=mixed'>Occupant</a> "
else temp_html += "<span class='linkOff'>Occupant</span>"
if(viable_occupant)
temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=mixed'>Occupant</a> "
else
temp_html += "<span class='linkOff'>Occupant</span>"
temp_html += "<a href='?src=\ref[src];task=setdelayed;num=[i];delayaction=[SCANNER_ACTION_MIXED]'>Occupant:Delayed</a> "
if(injectorready) temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=mixed'>UI+UE Injector</a>"
else temp_html += "<span class='linkOff'>UI+UE Injector</span>"
if(injectorready)
temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=mixed'>UI+UE Injector</a>"
else
temp_html += "<span class='linkOff'>UI+UE Injector</span>"
if(se)
temp_html += "<br>\tSE: [se] "
if(viable_occupant) temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=se'>Occupant</a> "
else temp_html += "<span class='linkOff'>Occupant</span> "
if(viable_occupant)
temp_html += "<a href='?src=\ref[src];task=transferbuffer;num=[i];text=se'>Occupant</a> "
else
temp_html += "<span class='linkOff'>Occupant</span> "
temp_html += "<a href='?src=\ref[src];task=setdelayed;num=[i];delayaction=[SCANNER_ACTION_SE]'>Occupant:Delayed</a> "
if(injectorready) temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=se'>Injector</a>"
else temp_html += "<span class='linkOff'>Injector</span>"
if(injectorready)
temp_html += "<a href='?src=\ref[src];task=injector;num=[i];text=se'>Injector</a>"
else
temp_html += "<span class='linkOff'>Injector</span>"
else
temp_html += "<br>\tSE: No Data"
if(viable_occupant) temp_html += "<br><a href='?src=\ref[src];task=setbuffer;num=[i];'>Save to Buffer</a> "
else temp_html += "<br><span class='linkOff'>Save to Buffer</span> "
if(viable_occupant)
temp_html += "<br><a href='?src=\ref[src];task=setbuffer;num=[i];'>Save to Buffer</a> "
else
temp_html += "<br><span class='linkOff'>Save to Buffer</span> "
temp_html += "<a href='?src=\ref[src];task=clearbuffer;num=[i];'>Clear Buffer</a> "
if(diskette) temp_html += "<a href='?src=\ref[src];task=loaddisk;num=[i];'>Load from Disk</a> "
else temp_html += "<span class='linkOff'>Load from Disk</span> "
if(diskette && !diskette.read_only) temp_html += "<a href='?src=\ref[src];task=savedisk;num=[i];'>Save to Disk</a> "
else temp_html += "<span class='linkOff'>Save to Disk</span> "
if(diskette)
temp_html += "<a href='?src=\ref[src];task=loaddisk;num=[i];'>Load from Disk</a> "
else
temp_html += "<span class='linkOff'>Load from Disk</span> "
if(diskette && !diskette.read_only)
temp_html += "<a href='?src=\ref[src];task=savedisk;num=[i];'>Save to Disk</a> "
else
temp_html += "<span class='linkOff'>Save to Disk</span> "
else
temp_html += status
temp_html += buttons
@@ -292,9 +332,11 @@
var/last_change
switch(href_list["task"])
if("togglelock")
if(connected) connected.locked = !connected.locked
if(connected)
connected.locked = !connected.locked
if("toggleopen")
if(connected) connected.toggle_open(usr)
if(connected)
connected.toggle_open(usr)
if("setduration")
if(!num)
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)
@@ -471,9 +513,12 @@
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd)
var/length = length(input)
var/ran = gaussian(0, rs*RADIATION_STRENGTH_MULTIPLIER)
if(ran == 0) ran = pick(-1,1) //hacky, statistically should almost never happen. 0-change makes people mad though
else if(ran < 0) ran = round(ran) //negative, so floor it
else ran = -round(-ran) //positive, so ceiling it
if(ran == 0)
ran = pick(-1,1) //hacky, statistically should almost never happen. 0-change makes people mad though
else if(ran < 0)
ran = round(ran) //negative, so floor it
else
ran = -round(-ran) //positive, so ceiling it
return num2hex(Wrap(hex2num(input)+ran, 0, 16**length), length)
/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position_we_were_supposed_to_hit, radduration, number_of_blocks)
@@ -492,7 +537,7 @@
var/list/buffer_slot = buffer[buffer_num]
var/mob/living/carbon/viable_occupant = get_viable_occupant()
if(istype(buffer_slot))
viable_occupant.radiation += rand(10/(connected.damage_coeff ** 2),25/(connected.damage_coeff ** 2))
viable_occupant.radiation += rand(10/(connected.damage_coeff ** 2),25/(connected.damage_coeff ** 2))
//15 and 40 are just magic numbers that were here before so i didnt touch them, they are initial boundaries of damage
//Each laser level reduces damage by lvl^2, so no effect on 1 lvl, 4 times less damage on 2 and 9 times less damage on 3
//Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove

View File

@@ -171,7 +171,8 @@
dat += "<br><b>Medical Robots:</b>"
var/bdat = null
for(var/mob/living/simple_animal/bot/medbot/M in living_mob_list)
if(M.z != src.z) continue //only find medibots on the same z-level as the computer
if(M.z != src.z)
continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up
bdat += "[M.name] - <b>\[[bl.x],[bl.y]\]</b> - [M.on ? "Online" : "Offline"]<br>"

View File

@@ -35,8 +35,10 @@
var/turf/Tr = null
for(var/obj/item/weapon/implant/chem/C in tracked_implants)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if(!C.implanted) continue
if((Tr) && (Tr.z != src.z))
continue//Out of range
if(!C.implanted)
continue
dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font class='bad'>(1)</font>)</A>"
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font class='bad'>(5)</font>)</A>"
@@ -112,14 +114,17 @@
inserted_id.goal = num
else if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
if(I) I.activate(1)
if(I)
I.activate(1)
else if(href_list["inject5"])
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
if(I) I.activate(5)
if(I)
I.activate(5)
else if(href_list["inject10"])
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
if(I) I.activate(10)
if(I)
I.activate(10)
else if(href_list["lock"])
if(src.allowed(usr))

View File

@@ -8,7 +8,8 @@
/obj/machinery/computer/emergency_shuttle/attackby(obj/item/weapon/card/W, mob/user, params)
if(stat & (BROKEN|NOPOWER)) return
if(stat & (BROKEN|NOPOWER))
return
if(!istype(W, /obj/item/weapon/card))
return
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED)

View File

@@ -1060,7 +1060,8 @@ About the new airlock wires panel:
return 1
/obj/machinery/door/airlock/proc/prison_open()
if(emagged) return
if(emagged)
return
src.locked = 0
src.open()
src.locked = 1
@@ -1089,7 +1090,8 @@ About the new airlock wires panel:
optionlist = list("Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining", "Maintenance", "External", "High Security")
var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist
if((!in_range(src, usr) && src.loc != usr) || !W.use(user)) return
if((!in_range(src, usr) && src.loc != usr) || !W.use(user))
return
switch(paintjob)
if("Public")
icon = 'icons/obj/doors/airlocks/station/public.dmi'

View File

@@ -62,7 +62,8 @@
// if it's less than 0, open door, reset timer
// update the door_timer window and the icon
/obj/machinery/door_timer/process()
if(stat & (NOPOWER|BROKEN)) return
if(stat & (NOPOWER|BROKEN))
return
if(timing)
if(world.time > src.releasetime)
Radio.set_frequency(SEC_FREQ)
@@ -87,32 +88,40 @@
// open/closedoor checks if door_timer has power, if so it checks if the
// linked door is open/closed (by density) then opens it/closes it.
/obj/machinery/door_timer/proc/timer_start()
if(stat & (NOPOWER|BROKEN)) return 0
if(stat & (NOPOWER|BROKEN))
return 0
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(door.density) continue
if(door.density)
continue
spawn(0)
door.close()
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken) continue
if(C.opened && !C.close()) continue
if(C.broken)
continue
if(C.opened && !C.close())
continue
C.locked = 1
C.update_icon()
return 1
/obj/machinery/door_timer/proc/timer_end()
if(stat & (NOPOWER|BROKEN)) return 0
if(stat & (NOPOWER|BROKEN))
return 0
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(!door.density) continue
if(!door.density)
continue
spawn(0)
door.open()
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken) continue
if(C.opened) continue
if(C.broken)
continue
if(C.opened)
continue
C.locked = 0
C.update_icon()
@@ -229,13 +238,15 @@
disp2 = "Error"
update_display(disp1, disp2)
else
if(maptext) maptext = ""
if(maptext)
maptext = ""
return
// Adds an icon in case the screen is broken/off, stolen from status_display.dm
/obj/machinery/door_timer/proc/set_picture(state)
if(maptext) maptext = ""
if(maptext)
maptext = ""
picture_state = state
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)

View File

@@ -119,9 +119,11 @@
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/detective_scanner))
return
if(isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(isrobot(user))
return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(operating || emagged) return
if(operating || emagged)
return
if(!Adjacent(user))
user = null
if(!src.requiresID())

View File

@@ -40,7 +40,8 @@
/obj/machinery/door/firedoor/attackby(obj/item/weapon/C, mob/user, params)
add_fingerprint(user)
if(operating) return//Already doing something.
if(operating)
return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = C
@@ -54,7 +55,8 @@
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] starts undoing [src]'s bolts...</span>", \
"<span class='notice'>You start unfastening [src]'s floor bolts...</span>")
if(!do_after(user, 50/C.toolspeed, target = src)) return
if(!do_after(user, 50/C.toolspeed, target = src))
return
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src]'s bolts.</span>", \
"<span class='notice'>You undo [src]'s floor bolts.</span>")
@@ -67,7 +69,8 @@
return
if(istype(C, /obj/item/weapon/crowbar) || (istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
if(blocked || operating) return
if(blocked || operating)
return
if(density)
open()
return

View File

@@ -3,13 +3,15 @@
/obj/machinery/door/unpowered/Bumped(atom/AM)
if(src.locked) return
if(src.locked)
return
..()
return
/obj/machinery/door/unpowered/attackby(obj/item/I, mob/user, params)
if(src.locked) return
if(src.locked)
return
..()
return

View File

@@ -37,13 +37,20 @@
var/percent = round((beaker.reagents.total_volume / beaker.volume) * 100)
switch(percent)
if(0 to 9) filling.icon_state = "reagent0"
if(10 to 24) filling.icon_state = "reagent10"
if(25 to 49) filling.icon_state = "reagent25"
if(50 to 74) filling.icon_state = "reagent50"
if(75 to 79) filling.icon_state = "reagent75"
if(80 to 90) filling.icon_state = "reagent80"
if(91 to INFINITY) filling.icon_state = "reagent100"
if(0 to 9)
filling.icon_state = "reagent0"
if(10 to 24)
filling.icon_state = "reagent10"
if(25 to 49)
filling.icon_state = "reagent25"
if(50 to 74)
filling.icon_state = "reagent50"
if(75 to 79)
filling.icon_state = "reagent75"
if(80 to 90)
filling.icon_state = "reagent80"
if(91 to INFINITY)
filling.icon_state = "reagent100"
filling.icon += mix_color_from_reagents(beaker.reagents.reagent_list)
overlays += filling

View File

@@ -82,9 +82,11 @@
if(command)
switch(command)
if("set-electriclevel")
if(modifier) electricity_level = modifier
if(modifier)
electricity_level = modifier
if("set-magneticfield")
if(modifier) magnetic_field = modifier
if(modifier)
magnetic_field = modifier
if("add-elec")
electricity_level++
@@ -104,9 +106,11 @@
magnetic_field = 1
if("set-x")
if(modifier) center_x = modifier
if(modifier)
center_x = modifier
if("set-y")
if(modifier) center_y = modifier
if(modifier)
center_y = modifier
if("N") // NORTH
center_y++
@@ -124,7 +128,8 @@
center_y = rand(-max_dist, max_dist)
if("set-code")
if(modifier) code = modifier
if(modifier)
code = modifier
if("toggle-power")
on = !on

View File

@@ -5,7 +5,8 @@
set category = "Object"
set src in view(1)
usr.set_machine(src)
if(!mapping) return
if(!mapping)
return
log_game("[usr]([usr.key]) used station map L[z] in [src.loc.loc]")

View File

@@ -255,7 +255,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
return
/obj/machinery/requests_console/Topic(href, href_list)
if(..()) return
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
@@ -291,7 +292,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
screen = 0
if(href_list["sendAnnouncement"])
if(!announcementConsole) return
if(!announcementConsole)
return
minor_announce(message, "[department] Announcement:")
news_network.SubmitArticle(message, department, "Station Announcements", null)
log_say("[key_name(usr)] has made a station announcement: [message]")
@@ -409,7 +411,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(9) //authentication
screen = 9
if(10) //send announcement
if(!announcementConsole) return
if(!announcementConsole)
return
screen = 10
else //main menu
dpt = ""
@@ -422,8 +425,10 @@ var/list/obj/machinery/requests_console/allConsoles = list()
//Handle silencing the console
switch( href_list["setSilent"] )
if(null) //skip
if("1") silent = 1
else silent = 0
if("1")
silent = 1
else
silent = 0
updateUsrDialog()
return

View File

@@ -295,7 +295,8 @@
var/obj/structure/cable/C = T.get_cable_node()
var/datum/powernet/PN
if(C) PN = C.powernet // find the powernet of the connected cable
if(C)
PN = C.powernet // find the powernet of the connected cable
if(!PN)
power = 0

View File

@@ -189,8 +189,10 @@
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/T = get_turf(M)
if(!T) continue
if(T.z == ZLEVEL_CENTCOM) continue
if(!T)
continue
if(T.z == ZLEVEL_CENTCOM)
continue
var/tmpname = M.real_name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"

View File

@@ -12,7 +12,8 @@
var/insisting = 0
/obj/machinery/wish_granter/attack_hand(mob/living/carbon/user)
if(istype(user)) return
if(istype(user))
return
usr.set_machine(src)
if(charges <= 0)

View File

@@ -211,7 +211,8 @@
/obj/effect/anomaly/bhole/proc/affect_coord(x, y, ex_act_force, pull_chance, turf_removal_chance)
//Get turf at coordinate
var/turf/T = locate(x, y, z)
if(isnull(T)) return
if(isnull(T))
return
//Pulling and/or ex_act-ing movable atoms in that turf
if(prob(pull_chance))

View File

@@ -240,7 +240,8 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(obj/item/weapon/poster/P, mob/user)
if(!P.resulting_poster) return
if(!P.resulting_poster)
return
var/stuff_on_wall = 0
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
@@ -265,7 +266,8 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v
playsound(D.loc, 'sound/items/poster_being_created.ogg', 100, 1)
if(do_after(user,D.placespeed,target=src))
if(!D) return
if(!D)
return
if(istype(src,/turf/simulated/wall) && user && user.loc == temp_loc) //Let's check if everything is still there
user << "<span class='notice'>You place the poster!</span>"

View File

@@ -126,10 +126,14 @@
if(dist < flame_range)
flame_dist = 1
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else dist = 0
if(dist < devastation_range)
dist = 1
else if(dist < heavy_impact_range)
dist = 2
else if(dist < light_impact_range)
dist = 3
else
dist = 0
//------- TURF FIRES -------
@@ -152,7 +156,8 @@
var/took = (world.timeofday-start)/10
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
if(Debug2)
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
//Machines which report explosions.
for(var/array in doppler_arrays)

View File

@@ -33,7 +33,8 @@
..()
/obj/item/organ/internal/body_egg/process()
if(!owner) return
if(!owner)
return
if(!(src in owner.internal_organs))
Remove(owner)
return

View File

@@ -381,7 +381,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!toff)
for (var/obj/item/device/pda/P in sortNames(get_viewable_pdas()))
if (P == src) continue
if (P == src)
continue
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
@@ -507,12 +508,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Light")
if(fon)
fon = 0
if(src in U.contents) U.AddLuminosity(-f_lum)
else SetLuminosity(0)
if(src in U.contents)
U.AddLuminosity(-f_lum)
else
SetLuminosity(0)
else
fon = 1
if(src in U.contents) U.AddLuminosity(f_lum)
else SetLuminosity(f_lum)
if(src in U.contents)
U.AddLuminosity(f_lum)
else
SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0

View File

@@ -62,7 +62,8 @@
/obj/item/device/transfer_valve/HasProximity(atom/movable/AM as mob|obj)
if(!attached_device) return
if(!attached_device)
return
attached_device.HasProximity(AM)
return
/obj/item/device/transfer_valve/attack_self(mob/user)

View File

@@ -101,7 +101,8 @@
user << "<span class='warning'>You need one sheet of metal to start building ED-209!</span>"
return
if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg) return
if(src.l_leg)
return
if(!user.unEquip(W))
return
W.loc = src
@@ -109,7 +110,8 @@
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_leg))
if(src.r_leg) return
if(src.r_leg)
return
if(!user.unEquip(W))
return
W.loc = src
@@ -117,7 +119,8 @@
src.updateicon()
if(istype(W, /obj/item/robot_parts/l_arm))
if(src.l_arm) return
if(src.l_arm)
return
if(!user.unEquip(W))
return
W.loc = src
@@ -125,7 +128,8 @@
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_arm))
if(src.r_arm) return
if(src.r_arm)
return
if(!user.unEquip(W))
return
W.loc = src
@@ -133,7 +137,8 @@
src.updateicon()
if(istype(W, /obj/item/robot_parts/chest))
if(src.chest) return
if(src.chest)
return
if(W:wires && W:cell)
if(!user.unEquip(W))
return
@@ -146,7 +151,8 @@
user << "<span class='warning'>You need to attach a cell to it first!</span>"
if(istype(W, /obj/item/robot_parts/head))
if(src.head) return
if(src.head)
return
if(W:flash2 && W:flash1)
if(!user.unEquip(W))
return
@@ -190,7 +196,8 @@
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
if(!O) return
if(!O)
return
if(!user.unEquip(W))
return

View File

@@ -64,7 +64,8 @@
else if(user.gender == FEMALE)
t_himself = "herself"
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
if(!do_mob(user, M, self_delay)) return
if(!do_mob(user, M, self_delay))
return
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")

View File

@@ -116,7 +116,8 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/safeguard/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
if(!targName) return
if(!targName)
return
targetName = targName
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
..()
@@ -142,7 +143,8 @@ AI MODULES
/obj/item/weapon/aiModule/zeroth/oneHuman/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
if(!targName) return
if(!targName)
return
targetName = targName
laws[1] = "Only [targetName] is human"
..()
@@ -205,7 +207,8 @@ AI MODULES
newpos = 15
lawpos = min(newpos, 50)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], MAX_MESSAGE_LEN)
if(!targName) return
if(!targName)
return
laws[1] = targName
..()
@@ -268,7 +271,8 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to who?", subject, MAX_MESSAGE_LEN)
if(!targName) return
if(!targName)
return
subject = targName
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
@@ -328,8 +332,10 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/custom/New()
..()
for(var/line in file2list("config/silicon_laws.txt"))
if(!line) continue
if(findtextEx(line,"#",1,2)) continue
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
laws += line
@@ -377,7 +383,8 @@ AI MODULES
/obj/item/weapon/aiModule/core/freeformcore/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
if(!targName) return
if(!targName)
return
laws[1] = targName
..()
@@ -396,7 +403,8 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1],MAX_MESSAGE_LEN)
if(!targName) return
if(!targName)
return
laws[1] = targName
..()

View File

@@ -183,7 +183,8 @@ var/global/list/RPD_recipes=list(
return "<a href=\"?src=\ref[src];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
/obj/item/weapon/pipe_dispenser/proc/show_menu(mob/user)
if(!user || !src) return 0
if(!user || !src)
return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>"}

View File

@@ -44,9 +44,11 @@
icon_state = "lipstick"
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
if(!open) return
if(!open)
return
if(!istype(M, /mob)) return
if(!istype(M, /mob))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M

View File

@@ -7,17 +7,22 @@
/obj/item/weapon/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1") new /obj/item/weapon/dice/d1(src)
if(special_die == "2") new /obj/item/weapon/dice/d2(src)
if(special_die == "1")
new /obj/item/weapon/dice/d1(src)
if(special_die == "2")
new /obj/item/weapon/dice/d2(src)
new /obj/item/weapon/dice/d4(src)
new /obj/item/weapon/dice/d6(src)
if(special_die == "fudge") new /obj/item/weapon/dice/fudge(src)
if(special_die == "fudge")
new /obj/item/weapon/dice/fudge(src)
new /obj/item/weapon/dice/d8(src)
new /obj/item/weapon/dice/d10(src)
if(special_die == "00") new /obj/item/weapon/dice/d00(src)
if(special_die == "00")
new /obj/item/weapon/dice/d00(src)
new /obj/item/weapon/dice/d12(src)
new /obj/item/weapon/dice/d20(src)
if(special_die == "100") new /obj/item/weapon/dice/d100(src)
if(special_die == "100")
new /obj/item/weapon/dice/d100(src)
/obj/item/weapon/dice //depreciated d6, use /obj/item/weapon/dice/d6 if you actually want a d6
name = "die"

View File

@@ -69,7 +69,8 @@
if(target != user)
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
if(!do_mob(user, target)) return
if(!do_mob(user, target))
return
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")

View File

@@ -70,7 +70,8 @@
flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W, mob/user, params)
if(user.stat || user.restrained() || user.lying) return
if(user.stat || user.restrained() || user.lying)
return
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
@@ -94,8 +95,10 @@
if(isigniter(W))
var/obj/item/device/assembly/igniter/I = W
if(I.secured) return
if(igniter) return
if(I.secured)
return
if(igniter)
return
if(!user.unEquip(W))
return
I.loc = src
@@ -121,7 +124,8 @@
/obj/item/weapon/flamethrower/attack_self(mob/user)
if(user.stat || user.restrained() || user.lying) return
if(user.stat || user.restrained() || user.lying)
return
user.set_machine(src)
if(!ptank)
user << "<span class='notice'>Attach a plasma tank first!</span>"
@@ -137,11 +141,14 @@
usr.unset_machine()
usr << browse(null, "window=flamethrower")
return
if(usr.stat || usr.restrained() || usr.lying) return
if(usr.stat || usr.restrained() || usr.lying)
return
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(!status) return
if(!ptank)
return
if(!status)
return
lit = !lit
if(lit)
SSobj.processing |= src
@@ -152,7 +159,8 @@
throw_amount = throw_amount + text2num(href_list["amount"])
throw_amount = max(50, min(5000, throw_amount))
if(href_list["remove"])
if(!ptank) return
if(!ptank)
return
usr.put_in_hands(ptank)
ptank = null
lit = 0
@@ -174,7 +182,8 @@
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
if(!lit || operating)
return
operating = 1
var/turf/previousturf = get_turf(src)
for(var/turf/simulated/T in turflist)

View File

@@ -71,7 +71,8 @@
var/gift_type = pick(gift_type_list)
if(!ispath(gift_type,/obj/item)) return
if(!ispath(gift_type,/obj/item))
return
var/obj/item/I = new gift_type(M)
M.unEquip(src, 1)

View File

@@ -38,7 +38,8 @@
activate(reagents.total_volume)
/obj/item/weapon/implant/chem/activate(cause)
if(!cause || !imp_in) return 0
if(!cause || !imp_in)
return 0
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")

View File

@@ -25,7 +25,8 @@
activate("death")
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in) return 0
if(!cause || !imp_in)
return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
heavy = round(heavy)
@@ -82,7 +83,8 @@
delay = 70
/obj/item/weapon/implant/explosive/macro/activate(cause)
if(!cause || !imp_in) return 0
if(!cause || !imp_in)
return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
imp_in << "<span class='notice'>You activate your macrobomb implant.</span>"

View File

@@ -8,8 +8,10 @@
/obj/item/weapon/implant/freedom/activate()
if(uses == 0) return 0
if(uses != -1) uses--
if(uses == 0)
return 0
if(uses != -1)
uses--
imp_in << "You feel a faint click."
if(iscarbon(imp_in))
var/mob/living/carbon/C_imp_in = imp_in

View File

@@ -33,7 +33,8 @@
return dat
/obj/item/weapon/implant/adrenalin/activate()
if(uses < 1) return 0
if(uses < 1)
return 0
uses--
imp_in << "<span class='notice'>You feel a sudden surge of energy!</span>"
imp_in.SetStunned(0)
@@ -56,6 +57,7 @@
uses = 2
/obj/item/weapon/implant/emp/activate()
if (src.uses < 1) return 0
if (src.uses < 1)
return 0
src.uses--
empulse(imp_in, 3, 5)

View File

@@ -126,9 +126,11 @@
/obj/machinery/implantchair/implant(mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
if(!implant_list.len)
return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(!imp)
continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
M.visible_message("<span class='warning'>[M] has been implanted by the [src.name].</span>")

View File

@@ -207,7 +207,8 @@
consume_turf(target)
/obj/item/weapon/melee/supermatter_sword/proc/consume_turf(turf/T)
if(istype(T, T.baseturf)) return //Can't void the void, baby!
if(istype(T, T.baseturf))
return //Can't void the void, baby!
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>\The [T] smacks into \the [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")

View File

@@ -52,7 +52,8 @@
else
user.show_message(text("<span class='danger'>Unable to reset internal memory.</span>"), 1)
src.l_hacking = 0
else src.l_hacking = 0
else
src.l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.

View File

@@ -95,7 +95,8 @@
if (istype(W, /obj/item/weapon/flamethrower))
var/obj/item/weapon/flamethrower/F = W
if ((!F.status)||(F.ptank)) return
if ((!F.status)||(F.ptank))
return
src.master = F
F.ptank = src
user.unEquip(src)

View File

@@ -345,7 +345,7 @@
var/on = 0
volume = 300
var/usage_ratio = 5 //5 unit added per 1 removed
var/injection_amount = 1
var/injection_amount = 1
amount_per_transfer_from_this = 5
flags = OPENCONTAINER
spillable = 0
@@ -375,9 +375,12 @@
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 15) filling.icon_state = "backpack-10"
if(16 to 60) filling.icon_state = "backpack50"
if(61 to INFINITY) filling.icon_state = "backpack100"
if(0 to 15)
filling.icon_state = "backpack-10"
if(16 to 60)
filling.icon_state = "backpack50"
if(61 to INFINITY)
filling.icon_state = "backpack100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
overlays += filling
@@ -390,9 +393,12 @@
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 15) filling.icon_state = "backpackmob-10"
if(16 to 60) filling.icon_state = "backpackmob50"
if(61 to INFINITY) filling.icon_state = "backpackmob100"
if(0 to 15)
filling.icon_state = "backpackmob-10"
if(16 to 60)
filling.icon_state = "backpackmob50"
if(61 to INFINITY)
filling.icon_state = "backpackmob100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
. += filling

View File

@@ -150,8 +150,10 @@ Frequency:
L["[get_area(com.target)] (Inactive)"] = com.target
var/list/turfs = list( )
for(var/turf/T in ultra_range(10, orange=1))
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8) continue
if(T.x>world.maxx-8 || T.x<8)
continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8)
continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)

View File

@@ -91,7 +91,8 @@
return
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M)) return ..()
if(!istype(M))
return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
if(user.disabilities & CLUMSY && prob(50))
@@ -223,7 +224,8 @@
if(src.remove_fuel(1))
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.getDisplayName()].</span>", "<span class='notice'>You start fixing some of the dents on [H]'s [affecting.getDisplayName()].</span>")
if(!do_mob(user, H, 50)) return
if(!do_mob(user, H, 50))
return
item_heal_robotic(H, user, 5, 0)
return
else

View File

@@ -194,9 +194,12 @@ LINEN BINS
/obj/structure/bedsheetbin/update_icon()
switch(amount)
if(0) icon_state = "linenbin-empty"
if(1 to 5) icon_state = "linenbin-half"
else icon_state = "linenbin-full"
if(0)
icon_state = "linenbin-empty"
if(1 to 5)
icon_state = "linenbin-half"
else
icon_state = "linenbin-full"
/obj/structure/bedsheetbin/fire_act()
if(!amount)

View File

@@ -42,7 +42,8 @@
if(src.broken)
user << "<span class='danger'>It appears to be broken.</span>"
return
if(!I || !I.registered_name) return
if(!I || !I.registered_name)
return
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )

View File

@@ -64,7 +64,8 @@
/obj/structure/closet/crate/freezer/return_air()
var/datum/gas_mixture/gas = (..())
if(!gas) return null
if(!gas)
return null
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
newgas.oxygen = gas.oxygen
newgas.carbon_dioxide = gas.carbon_dioxide
@@ -72,7 +73,8 @@
newgas.toxins = gas.toxins
newgas.volume = gas.volume
newgas.temperature = gas.temperature
if(newgas.temperature <= target_temp) return
if(newgas.temperature <= target_temp)
return
if((newgas.temperature - cooling_power) > target_temp)
newgas.temperature -= cooling_power
@@ -92,7 +94,7 @@
for(var/i in 1 to 4)
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
/obj/structure/closet/crate/hydroponics
name = "hydroponics crate"
desc = "All you need to destroy those pesky weeds and pests."

View File

@@ -51,7 +51,8 @@
/obj/structure/grille/attack_alien(mob/living/user)
user.do_attack_animation(src)
if(istype(user, /mob/living/carbon/alien/larva)) return
if(istype(user, /mob/living/carbon/alien/larva))
return
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
@@ -66,7 +67,8 @@
/obj/structure/grille/attack_slime(mob/living/simple_animal/slime/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(!user.is_adult) return
if(!user.is_adult)
return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \

View File

@@ -86,7 +86,8 @@ FLOOR SAFES
/obj/structure/safe/Topic(href, href_list)
if(!ishuman(usr)) return
if(!ishuman(usr))
return
var/mob/living/carbon/human/user = usr
var/canhear = 0

View File

@@ -25,11 +25,15 @@
/obj/structure/dispenser/update_icon()
overlays.Cut()
switch(oxygentanks)
if(1 to 3) overlays += "oxygen-[oxygentanks]"
if(4 to INFINITY) overlays += "oxygen-4"
if(1 to 3)
overlays += "oxygen-[oxygentanks]"
if(4 to INFINITY)
overlays += "oxygen-4"
switch(plasmatanks)
if(1 to 4) overlays += "plasma-[plasmatanks]"
if(5 to INFINITY) overlays += "plasma-5"
if(1 to 4)
overlays += "plasma-[plasmatanks]"
if(5 to INFINITY)
overlays += "plasma-5"
/obj/structure/dispenser/attack_paw(mob/user)
return src.attack_hand(user)

View File

@@ -82,7 +82,8 @@
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
/client/proc/playtitlemusic()
if(!ticker || !ticker.login_music) return
if(!ticker || !ticker.login_music)
return
if(prefs && (prefs.toggles & SOUND_LOBBY))
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
@@ -92,15 +93,26 @@
/proc/get_sfx(soundin)
if(istext(soundin))
switch(soundin)
if ("shatter") soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
if ("explosion") soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
if ("bodyfall") soundin = pick('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg')
if ("punch") soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
if ("clownstep") soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
if ("swing_hit") soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
if ("hiss") soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
if ("pageturn") soundin = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
if ("gunshot") soundin = pick('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
if ("shatter")
soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
if ("explosion")
soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
if ("sparks")
soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
if ("rustle")
soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
if ("bodyfall")
soundin = pick('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg')
if ("punch")
soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
if ("clownstep")
soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
if ("swing_hit")
soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
if ("hiss")
soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
if ("pageturn")
soundin = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
if ("gunshot")
soundin = pick('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
return soundin

View File

@@ -138,7 +138,8 @@
return
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
if( !istype(user.loc, /turf) )
return //can't do this stuff whilst inside objects and such
add_fingerprint(user)
@@ -232,11 +233,13 @@
F.icon_state = "wall_thermite"
F.add_hiddenprint(user)
spawn(max(100,300-thermite))
if(O) qdel(O)
if(O)
qdel(O)
else
thermite = 0
spawn(50)
if(O) qdel(O)
if(O)
qdel(O)
return
/turf/simulated/wall/singularity_pull(S, current_size)

View File

@@ -120,8 +120,10 @@
//Creates a new turf
/turf/proc/ChangeTurf(path)
if(!path) return
if(path == type) return src
if(!path)
return
if(path == type)
return src
SSair.remove_from_active(src)

View File

@@ -6,13 +6,15 @@
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
return
if(!mob) return
if(!mob)
return
if(IsGuestKey(key))
src << "Guests may not use OOC."
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
if(!msg)
return
if(!(prefs.chat_toggles & CHAT_OOC))
src << "<span class='danger'>You have OOC muted.</span>"
@@ -46,7 +48,7 @@
if((copytext(msg, 1, 2) in list(".",";",":","#")) || (findtext(lowertext(copytext(msg, 1, 5)), "say")))
if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "No", "Yes") != "Yes")
return
log_ooc("[mob.name]/[key] : [raw_msg]")
var/keyname = key
@@ -96,7 +98,8 @@ var/global/normal_ooc_colour = "#002eb8"
set category = "Preferences"
if(!holder || check_rights_for(src, R_ADMIN))
if(!is_content_unlocked()) return
if(!is_content_unlocked())
return
var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
if(new_ooccolor)
@@ -111,7 +114,8 @@ var/global/normal_ooc_colour = "#002eb8"
set category = "Preferences"
if(!holder || check_rights_for(src, R_ADMIN))
if(!is_content_unlocked()) return
if(!is_content_unlocked())
return
prefs.ooccolor = initial(prefs.ooccolor)
prefs.save_preferences()

View File

@@ -3,7 +3,8 @@
//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
/datum/admins/proc/DB_ban_record(bantype, mob/banned_mob, duration = -1, reason, job = "", rounds = 0, banckey = null, banip = null, bancid = null)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
establish_db_connection()
if(!dbcon.IsConnected())
@@ -140,7 +141,8 @@
/datum/admins/proc/DB_ban_unban(ckey, bantype, job = "")
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/bantype_str
if(bantype)
@@ -218,7 +220,8 @@
/datum/admins/proc/DB_ban_edit(banid = null, param = null)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
if(!isnum(banid) || !istext(param))
usr << "Cancelled"
@@ -278,7 +281,8 @@
/datum/admins/proc/DB_ban_unban_by_id(id)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
@@ -332,7 +336,8 @@
if(!usr.client)
return
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
establish_db_connection()
if(!dbcon.IsConnected())

View File

@@ -183,8 +183,10 @@ var/savefile/Banlist
var/expiry
if(Banlist["temp"])
expiry = GetExp(Banlist["minutes"])
if(!expiry) expiry = "Removal Pending"
else expiry = "Permaban"
if(!expiry)
expiry = "Removal Pending"
else
expiry = "Permaban"
dat += text("<tr><td><A href='?src=[ref];unbanf=[key][id]'>(U)</A><A href='?src=[ref];unbane=[key][id]'>(E)</A> Key: <B>[key]</B></td><td>ComputerID: <B>[id]</B></td><td>IP: <B>[ip]</B></td><td> [expiry]</td><td>(By: [by])</td><td>(Reason: [reason])</td></tr>")

View File

@@ -379,7 +379,8 @@ var/global/BSACooldown = 0
/datum/admins/proc/Game()
if(!check_rights(0)) return
if(!check_rights(0))
return
var/dat = {"
<center><B>Game Panel</B></center><hr>\n
@@ -439,7 +440,8 @@ var/global/BSACooldown = 0
set category = "Special Verbs"
set name = "Announce"
set desc="Announce your desires to the world"
if(!check_rights(0)) return
if(!check_rights(0))
return
var/message = input("Global message to send:", "Admin Announce", null, null) as message
if(message)
@@ -453,7 +455,8 @@ var/global/BSACooldown = 0
set category = "Special Verbs"
set name = "Set Admin Notice"
set desc ="Set an announcement that appears to everyone who joins the server. Only lasts this round"
if(!check_rights(0)) return
if(!check_rights(0))
return
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",admin_notice) as message|null
if(new_admin_notice == null)
@@ -613,7 +616,8 @@ var/global/BSACooldown = 0
set desc = "(atom path) Spawn an atom"
set name = "Spawn"
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/list/matches = get_fancy_list_of_types()
if (!isnull(object) && object!="")

View File

@@ -12,20 +12,24 @@
return file("[INVESTIGATE_DIR][subject].html")
/proc/investigate_reset()
if(fdel(INVESTIGATE_DIR)) return 1
if(fdel(INVESTIGATE_DIR))
return 1
return 0
/atom/proc/investigate_log(message, subject)
if(!message) return
if(!message)
return
var/F = investigate_subject2file(subject)
if(!F) return
if(!F)
return
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","notes","watchlist","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos", "experimentor", "kudzu") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
if(!holder)
return
switch(subject)
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "kudzu") //general one-round-only stuff
var/F = investigate_subject2file(subject)

View File

@@ -1,7 +1,8 @@
/client/proc/admin_memo()
set name = "Memo"
set category = "Server"
if(!check_rights(0)) return
if(!check_rights(0))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
return

View File

@@ -14,30 +14,48 @@ var/list/admin_ranks = list() //list of all admin_rank datums
qdel(src)
throw EXCEPTION("invalid admin-rank name")
return
if(init_rights) rights = init_rights
if(!init_adds) init_adds = list()
if(!init_subs) init_subs = list()
if(init_rights)
rights = init_rights
if(!init_adds)
init_adds = list()
if(!init_subs)
init_subs = list()
adds = init_adds
subs = init_subs
/proc/admin_keyword_to_flag(word, previous_rights=0)
var/flag = 0
switch(ckey(word))
if("buildmode","build") flag = R_BUILDMODE
if("admin") flag = R_ADMIN
if("ban") flag = R_BAN
if("fun") flag = R_FUN
if("server") flag = R_SERVER
if("debug") flag = R_DEBUG
if("permissions","rights") flag = R_PERMISSIONS
if("possess") flag = R_POSSESS
if("stealth") flag = R_STEALTH
if("rejuv","rejuvinate") flag = R_REJUVINATE
if("varedit") flag = R_VAREDIT
if("everything","host","all") flag = 65535
if("sound","sounds") flag = R_SOUNDS
if("spawn","create") flag = R_SPAWN
if("@","prev") flag = previous_rights
if("buildmode","build")
flag = R_BUILDMODE
if("admin")
flag = R_ADMIN
if("ban")
flag = R_BAN
if("fun")
flag = R_FUN
if("server")
flag = R_SERVER
if("debug")
flag = R_DEBUG
if("permissions","rights")
flag = R_PERMISSIONS
if("possess")
flag = R_POSSESS
if("stealth")
flag = R_STEALTH
if("rejuv","rejuvinate")
flag = R_REJUVINATE
if("varedit")
flag = R_VAREDIT
if("everything","host","all")
flag = 65535
if("sound","sounds")
flag = R_SOUNDS
if("spawn","create")
flag = R_SPAWN
if("@","prev")
flag = previous_rights
return flag
/proc/admin_keyword_to_path(word) //use this with verb keywords eg +/client/proc/blah
@@ -48,8 +66,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/flag = admin_keyword_to_flag(word, previous_rights)
if(flag)
switch(text2ascii(word,1))
if(43) rights |= flag //+
if(45) rights &= ~flag //-
if(43)
rights |= flag //+
if(45)
rights &= ~flag //-
else
//isn't a keyword so maybe it's a verbpath?
var/path = admin_keyword_to_path(word)
@@ -82,12 +102,15 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/previous_rights = 0
//load text from file and process each line seperately
for(var/line in file2list("config/admin_ranks.txt"))
if(!line) continue
if(findtextEx(line,"#",1,2)) continue
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
var/next = findtext(line, "=")
var/datum/admin_rank/R = new(ckeyEx(copytext(line, 1, next)))
if(!R) continue
if(!R)
continue
admin_ranks += R
var/prev = findchar(line, "+-", next, 0)
@@ -111,9 +134,11 @@ var/list/admin_ranks = list() //list of all admin_rank datums
while(query.NextRow())
var/rank_name = ckeyEx(query.item[1])
var/flags = query.item[2]
if(istext(flags)) flags = text2num(flags)
if(istext(flags))
flags = text2num(flags)
var/datum/admin_rank/R = new(rank_name, flags)
if(!R) continue
if(!R)
continue
admin_ranks += R
#ifdef TESTING
@@ -121,7 +146,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
for(var/datum/admin_rank/R in admin_ranks)
msg += "\t[R.name]"
var/rights = rights2text(R.rights,"\n\t\t",R.adds,R.subs)
if(rights) msg += "\t\t[rights]\n"
if(rights)
msg += "\t\t[rights]\n"
testing(msg)
#endif
@@ -145,16 +171,20 @@ var/list/admin_ranks = list() //list of all admin_rank datums
//process each line seperately
for(var/line in Lines)
if(!length(line)) continue
if(findtextEx(line,"#",1,2)) continue
if(!length(line))
continue
if(findtextEx(line,"#",1,2))
continue
//Split the line at every "="
var/list/List = text2list(line, "=")
if(!List.len) continue
if(!List.len)
continue
//ckey is before the first "="
var/ckey = ckey(List[1])
if(!ckey) continue
if(!ckey)
continue
//rank follows the first "="
var/rank = ""
@@ -162,7 +192,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
rank = ckeyEx(List[2])
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D) continue //will occur if an invalid rank is provided
if(!D)
continue //will occur if an invalid rank is provided
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
else
@@ -183,7 +214,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
WARNING("Admin rank ([rank]) does not exist.")
continue
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D) continue //will occur if an invalid rank is provided
if(!D)
continue //will occur if an invalid rank is provided
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
#ifdef TESTING
@@ -225,7 +257,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
switch(task)
if("add")
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey) return
if(!new_ckey)
return
if(new_ckey in admin_datums)
usr << "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>"
return
@@ -242,7 +275,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
switch(task)
if("remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
if(!D) return
if(!D)
return
if(!check_if_greater_rights_than_holder(D))
message_admins("[key_name_admin(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
log_admin("[key_name(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
@@ -265,10 +299,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names
switch(new_rank)
if(null) return
if(null)
return
if("*New Rank*")
new_rank = ckeyEx(input("Please input a new rank", "New custom rank", null, null) as null|text)
if(!new_rank) return
if(!new_rank)
return
if(D)
if(!check_if_greater_rights_than_holder(D))
@@ -278,8 +314,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
R = rank_names[new_rank]
if(!R) //rank with that name doesn't exist yet - make it
if(D) R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
else R = new(new_rank) //blank new admin_rank
if(D)
R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
else
R = new(new_rank) //blank new admin_rank
admin_ranks += R
if(D) //they were previously an admin
@@ -297,10 +335,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
log_admin_rank_modification(adm_ckey, new_rank)
if("permissions")
if(!D) return //they're not an admin!
if(!D)
return //they're not an admin!
var/keyword = input("Input permission keyword (one at a time):\ne.g. +BAN or -FUN or +/client/proc/someverb", "Permission toggle", null, null) as null|text
if(!keyword) return
if(!keyword)
return
if(!check_keyword(keyword) || !check_if_greater_rights_than_holder(D))
message_admins("[key_name_admin(usr)] attempted to give [adm_ckey] the keyword [keyword] without sufficient rights.")

View File

@@ -226,18 +226,30 @@ var/list/admin_verbs_hideable = list(
var/rights = holder.rank.rights
verbs += admin_verbs_default
if(rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN) verbs += admin_verbs_admin
if(rights & R_BAN) verbs += admin_verbs_ban
if(rights & R_FUN) verbs += admin_verbs_fun
if(rights & R_SERVER) verbs += admin_verbs_server
if(rights & R_DEBUG) verbs += admin_verbs_debug
if(rights & R_POSSESS) verbs += admin_verbs_possess
if(rights & R_PERMISSIONS) verbs += admin_verbs_permissions
if(rights & R_STEALTH) verbs += /client/proc/stealth
if(rights & R_REJUVINATE) verbs += admin_verbs_rejuv
if(rights & R_SOUNDS) verbs += admin_verbs_sounds
if(rights & R_SPAWN) verbs += admin_verbs_spawn
if(rights & R_BUILDMODE)
verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN)
verbs += admin_verbs_admin
if(rights & R_BAN)
verbs += admin_verbs_ban
if(rights & R_FUN)
verbs += admin_verbs_fun
if(rights & R_SERVER)
verbs += admin_verbs_server
if(rights & R_DEBUG)
verbs += admin_verbs_debug
if(rights & R_POSSESS)
verbs += admin_verbs_possess
if(rights & R_PERMISSIONS)
verbs += admin_verbs_permissions
if(rights & R_STEALTH)
verbs += /client/proc/stealth
if(rights & R_REJUVINATE)
verbs += admin_verbs_rejuv
if(rights & R_SOUNDS)
verbs += admin_verbs_sounds
if(rights & R_SPAWN)
verbs += admin_verbs_spawn
for(var/path in holder.rank.adds)
verbs += path
@@ -318,7 +330,8 @@ var/list/admin_verbs_hideable = list(
/client/proc/admin_ghost()
set category = "Admin"
set name = "Aghost"
if(!holder) return
if(!holder)
return
if(istype(mob,/mob/dead/observer))
//re-enter
var/mob/dead/observer/ghost = mob
@@ -430,7 +443,8 @@ var/list/admin_verbs_hideable = list(
mob.name = initial(mob.name)
else
var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
if(!new_key) return
if(!new_key)
return
if(length(new_key) >= 26)
new_key = copytext(new_key, 1, 26)
holder.fakekey = new_key
@@ -547,7 +561,8 @@ var/list/admin_verbs_hideable = list(
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
set category = "Server"
if(!holder) return
if(!holder)
return
if(config)
if(config.log_hrefs)
config.log_hrefs = 0

View File

@@ -81,7 +81,8 @@ DEBUG
log_admin("Updating appearancefile!")
// Updates bans.. Or fixes them. Either way.
for(var/T in appearance_keylist)
if(!T) continue
if(!T)
continue
appearanceban_runonce++ //don't run this update again

View File

@@ -1,7 +1,8 @@
/client/proc/create_poll()
set name = "Create Poll"
set category = "Special Verbs"
if(!check_rights(R_PERMISSIONS)) return
if(!check_rights(R_PERMISSIONS))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
return

Some files were not shown because too many files have changed in this diff Show More