[MIRROR] Does some code standardization/consistency. (#3161)

* Does some code standardization/consistency.

* fixes merge conflict generation

* Missed a few, oops

* Update pierrot_throat.dm
This commit is contained in:
CitadelStationBot
2017-10-21 06:10:22 -05:00
committed by Poojawa
parent 953a353ce7
commit adc2e46114
151 changed files with 970 additions and 524 deletions

View File

@@ -50,9 +50,12 @@
announceinirc = 1
blockselfban = 1
kickbannedckey = 1
if( !bantype_pass ) return
if( !istext(reason) ) return
if( !isnum(duration) ) return
if( !bantype_pass )
return
if( !istext(reason) )
return
if( !isnum(duration) )
return
var/ckey
var/computerid
@@ -174,7 +177,8 @@
if(BANTYPE_ANY_JOB)
bantype_str = "ANYJOB"
bantype_pass = 1
if( !bantype_pass ) return
if( !bantype_pass )
return
var/bantype_sql
if(bantype_str == "ANY")

View File

@@ -65,7 +65,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist = new("data/banlist.bdb")
log_admin("Loading Banlist")
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
if (!length(GLOB.Banlist.dir))
log_admin("Banlist is empty.")
if (!GLOB.Banlist.dir.Find("base"))
log_admin("Banlist missing base dir.")
@@ -89,8 +90,10 @@ GLOBAL_PROTECT(Banlist)
message_admins("Invalid Ban.")
continue
if (!GLOB.Banlist["temp"]) continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
if (!GLOB.Banlist["temp"])
continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
RemoveBan(A)
return 1
@@ -133,7 +136,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist["id"] >> id
GLOB.Banlist.cd = "/base"
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if (!GLOB.Banlist.dir.Remove(foldername))
return 0
if(!usr)
log_admin_private("Ban Expired: [key]")

View File

@@ -594,7 +594,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
if(!D) return
if(!D)
return
T.ForceContractDisease(new D)
SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")

View File

@@ -101,7 +101,8 @@ if it doesn't return 1 and show_msg=1 it will prints a message explaining why th
generally it would be used like so:
/proc/admin_proc()
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
to_chat(world, "you have enough rights!")
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call

View File

@@ -334,9 +334,12 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
for(var/mob/living/H in GLOB.player_list)
if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H))
continue
if(is_special_character(H))
continue
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
@@ -546,7 +549,8 @@
if(!check_rights(R_DEBUG))
return
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
if(!J)
return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")

View File

@@ -2,7 +2,8 @@
var/text
for(var/A in typesof(/obj/item))
var/obj/item/O = new A( locate(1,1,1) )
if(!O) continue
if(!O)
continue
var/icon/IL = new(O.lefthand_file)
var/list/Lstates = IL.IconStates()
var/icon/IR = new(O.righthand_file)
@@ -28,7 +29,5 @@
if(text)
var/F = file("broken_icons.txt")
fdel(F)
WRITE_FILE(F, text)
WRITE_FILE(F, text)
to_chat(world, "Completely successfully and written to [F]")

View File

@@ -181,7 +181,8 @@
if(varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return 1
if(!thetype)
return 1
switch(thetype)
if("text")
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
@@ -200,7 +201,8 @@
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
var/type = input(user,"Select Generator Type","Type") as null|anything in options
if(!type) return
if(!type)
return
generator_path = options[type]
cornerA = null

View File

@@ -31,7 +31,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Advanced ProcCall"
set waitfor = 0
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
var/datum/target = null
var/targetselected = 0

View File

@@ -36,7 +36,8 @@
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
organ = organs[organ]
if(!organ) return
if(!organ)
return
var/obj/item/organ/O
var/obj/item/implant/I

View File

@@ -194,15 +194,20 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
if(!level)
return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
if(!num_level)
return
if(!isnum(num_level))
return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0
@@ -238,9 +243,11 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0

View File

@@ -545,15 +545,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) return
if(light == null)
return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) return
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
@@ -577,9 +582,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
if(light == null)
return
if (heavy || light)
@@ -960,7 +967,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
set name = "Toggle AntagHUD"
set desc = "Toggles the Admin AntagHUD"
if(!holder) return
if(!holder)
return
var/adding_hud = !has_antag_hud()

View File

@@ -107,7 +107,8 @@ Code:
..()
/obj/item/device/assembly/signaler/proc/signal()
if(!radio_connection) return
if(!radio_connection)
return
var/datum/signal/signal = new
signal.source = src
@@ -173,7 +174,8 @@ Code:
return "The radio receiver is [on?"on":"off"]."
/obj/item/device/assembly/signaler/reciever/receive_signal(datum/signal/signal)
if(!on) return
if(!on)
return
return ..(signal)

View File

@@ -136,18 +136,41 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
/*
* Modified Nar-Sie
*/
/obj/singularity/narsie/mini
/obj/singularity/narsie/sc_Narsie
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
move_self = 0 //Contianed narsie does not move!
grav_pull = 0 //Contained narsie does not pull stuff in!
var/uneatable = list(/turf/open/space, /obj/effect/overlay, /mob/living/simple_animal/hostile/construct)
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
/obj/singularity/narsie/mini/admin_investigate_setup()
/obj/singularity/narsie/sc_Narsie/admin_investigate_setup()
return
/obj/singularity/narsie/mini/process()
/obj/singularity/narsie/sc_Narsie/process()
eat()
if(prob(25))
mezzer()
/obj/singularity/narsie/mini/ex_act()
/obj/singularity/narsie/sc_Narsie/consume(atom/A)
if(is_type_in_list(A, uneatable))
return 0
if(isliving(A))
var/mob/living/L = A
L.gib()
else if(istype(A, /obj/))
var/obj/O = A
O.ex_act(EXPLODE_DEVASTATE)
if(O)
qdel(O)
else if(isturf(A))
var/turf/T = A
if(T.intact)
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == INVISIBILITY_MAXIMUM)
src.consume(O)
T.ChangeTurf(/turf/open/space)
return
/obj/singularity/narsie/sc_Narsie/ex_act()
return

View File

@@ -239,7 +239,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
S["real_name"] >> name
if(!name)
name = "Character[i]"
//if(i!=1) dat += " | "
/*if(i!=1)
dat += " | " */
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
dat += "</center>"

View File

@@ -391,7 +391,8 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set name = "Show/Hide Radio Chatter"
set category = "Preferences"
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
if(!holder) return
if(!holder)
return
prefs.chat_toggles ^= CHAT_RADIO
prefs.save_preferences()
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")

View File

@@ -139,8 +139,10 @@
log_game("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
message_admins("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
else to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
else ..()
else
to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
else
..()
/obj/item/clothing/accessory/medal/conduct
name = "distinguished conduct medal"

View File

@@ -3,7 +3,7 @@
/atom/var/list/suit_fibers
/atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves && istype(M.gloves, /obj/item/clothing/))
if(M.gloves && istype(M.gloves, /obj/item/clothing/))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood > 1) //bloodied gloves transfer blood to touched objects
if(add_blood(G.blood_DNA)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
@@ -11,7 +11,8 @@
else if(M.bloody_hands > 1)
if(add_blood(M.blood_DNA))
M.bloody_hands--
if(!suit_fibers) suit_fibers = list()
if(!suit_fibers)
suit_fibers = list()
var/fibertext
var/item_multiplier = isitem(src)?1.2:1
if(M.wear_suit)

View File

@@ -164,7 +164,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
feedback_details += "Vent Coords: [center.x],[center.y],[center.z]"
flood_images += image(image_icon,center,image_state,MOB_LAYER)
flood_turfs += center
if(target.client) target.client.images |= flood_images
if(target.client)
target.client.images |= flood_images
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
START_PROCESSING(SSobj, src)
@@ -960,13 +961,18 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
var/l = ui_hand_position(target.get_held_index_of_item(l_hand))
var/r = ui_hand_position(target.get_held_index_of_item(r_hand))
var/list/slots_free = list(l,r)
if(l_hand) slots_free -= l
if(r_hand) slots_free -= r
if(l_hand)
slots_free -= l
if(r_hand)
slots_free -= r
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(!H.belt)
slots_free += ui_belt
if(!H.l_store)
slots_free += ui_storage1
if(!H.r_store)
slots_free += ui_storage2
if(slots_free.len)
target.halitem.screen_loc = pick(slots_free)
target.halitem.layer = ABOVE_HUD_LAYER
@@ -999,7 +1005,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
target.halitem.icon_state = "flashbang1"
target.halitem.name = "Flashbang"
feedback_details += "Type: [target.halitem.name]"
if(target.client) target.client.screen += target.halitem
if(target.client)
target.client.screen += target.halitem
QDEL_IN(target.halitem, rand(150, 350))
qdel(src)

View File

@@ -41,8 +41,10 @@
step(M, pick(d,turn(d,90),turn(d,-90)))
/proc/Ellipsis(original_msg, chance = 50, keep_words)
if(chance <= 0) return "..."
if(chance >= 100) return original_msg
if(chance <= 0)
return "..."
if(chance >= 100)
return original_msg
var/list
words = splittext(original_msg," ")

View File

@@ -15,8 +15,10 @@
resistance_flags = 0
/obj/item/reagent_containers/food/drinks/on_reagent_change()
if (gulp_size < 5) gulp_size = 5
else gulp_size = max(round(reagents.total_volume / 5), 5)
if (gulp_size < 5)
gulp_size = 5
else
gulp_size = max(round(reagents.total_volume / 5), 5)
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
@@ -51,7 +53,8 @@
return 1
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if (!is_open_container())

View File

@@ -54,7 +54,8 @@
return 1
/obj/item/reagent_containers/food/condiment/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if(!target.reagents.total_volume)
@@ -236,7 +237,8 @@
return
/obj/item/reagent_containers/food/condiment/pack/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
//You can tear the bag open above food to put the condiments on it, obviously.
if(istype(target, /obj/item/reagent_containers/food/snacks))

View File

@@ -57,7 +57,8 @@
update_overlays(S)
to_chat(user, "<span class='notice'>You add the [I.name] to the [name].</span>")
update_name(S)
else . = ..()
else
. = ..()
/obj/item/reagent_containers/food/snacks/customizable/proc/update_name(obj/item/reagent_containers/food/snacks/S)
@@ -308,7 +309,8 @@
else
var/obj/item/reagent_containers/food/snacks/customizable/A = new/obj/item/reagent_containers/food/snacks/customizable/salad(get_turf(src))
A.initialize_custom_food(src, S, user)
else . = ..()
else
. = ..()
return
/obj/item/reagent_containers/glass/bowl/on_reagent_change()

View File

@@ -59,12 +59,14 @@
if (istype(O, /obj/item/hand))
var/obj/item/hand/H = O
for (var/datum/playingcard/P in H.cards) src.cards.Add(P)
for (var/datum/playingcard/P in H.cards)
src.cards.Add(P)
qdel (O)
user.show_message("You place your cards on the bottom of the deck.")
else return ..()
else
return ..()
/obj/item/deck/attack_self(mob/user)
var/list/newcards = list()
@@ -155,7 +157,8 @@
else if(istype(O, /obj/item/hand))
var/obj/item/hand/H = O
for(var/datum/playingcard/P in src.cards) H.cards.Add(P)
for(var/datum/playingcard/P in src.cards)
H.cards.Add(P)
H.update_icon()

View File

@@ -21,7 +21,8 @@
)
/datum/debugFileOutput/proc/error(fileName, message, client/C)
if (!fileName || !message) return 0
if (!fileName || !message)
return 0
if (!(fileName in src.validFiles))
throw EXCEPTION("Debug log file '[fileName].[src.ext]' is not a valid path.")
@@ -36,7 +37,8 @@
return 1
/datum/debugFileOutput/proc/clear(fileName)
if (!fileName) return 0
if (!fileName)
return 0
if (!fexists("[src.directory]/[fileName].[src.ext]"))
throw EXCEPTION("Debug log file '[fileName].[src.ext]' does not exist.")

View File

@@ -47,7 +47,8 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
if(!A || !src) return 0
if(!A || !src)
return 0
var/list/turfs_src = get_area_turfs(src.type)
var/list/turfs_trg = get_area_turfs(A.type)

View File

@@ -71,7 +71,8 @@ You have to use modules/client/asset_cache to ensure they get sent BEFORE the in
/mob/var/datum/html_interface/hi
/mob/verb/test()
if (!hi) hi = new/datum/html_interface(src, "[src.key]")
if (!hi)
hi = new/datum/html_interface(src, "[src.key]")
hi.updateLayout("<div id=\"content\"></div>")
hi.updateContent("content", "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>")
@@ -156,14 +157,16 @@ GLOBAL_LIST_EMPTY(html_interfaces)
"on-close" = "byond://?src=\ref[src]&html_interface_action=onclose"
)
if (hclient.client.hi_last_pos) params["pos"] = "[hclient.client.hi_last_pos]"
if (hclient.client.hi_last_pos)
params["pos"] = "[hclient.client.hi_last_pos]"
winset(hclient.client, "browser_\ref[src]", list2params(params))
winset(hclient.client, "browser_\ref[src].browser", list2params(list("parent" = "browser_\ref[src]", "type" = "browser", "pos" = "0,0", "size" = "[width]x[height]", "anchor1" = "0,0", "anchor2" = "100,100", "use-title" = "true", "auto-format" = "false")))
/* * Public API */
/datum/html_interface/proc/getTitle() return src.title
/datum/html_interface/proc/getTitle()
return src.title
/datum/html_interface/proc/setTitle(title, ignore_cache = FALSE)
src.title = title
@@ -173,19 +176,24 @@ GLOBAL_LIST_EMPTY(html_interfaces)
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderTitle(src.clients[client], ignore_cache)
if (hclient && hclient.active)
src._renderTitle(src.clients[client], ignore_cache)
/datum/html_interface/proc/executeJavaScript(jscript, datum/html_interface_client/hclient = null)
if (hclient)
hclient = getClient(hclient)
if (istype(hclient))
if (hclient.is_loaded) hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
if (hclient.is_loaded)
hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
else
for (var/client in src.clients) if(src.clients[client]) src.executeJavaScript(jscript, src.clients[client])
for (var/client in src.clients)
if(src.clients[client])
src.executeJavaScript(jscript, src.clients[client])
/datum/html_interface/proc/callJavaScript(func, list/arguments, datum/html_interface_client/hclient = null)
if (!arguments) arguments = new/list()
if (!arguments)
arguments = new/list()
if (hclient)
hclient = getClient(hclient)
@@ -194,7 +202,9 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if (hclient.is_loaded)
hclient.client << output(list2params(arguments), "browser_\ref[src].browser:[func]")
else
for (var/client in src.clients) if (src.clients[client]) src.callJavaScript(func, arguments, src.clients[client])
for (var/client in src.clients)
if (src.clients[client])
src.callJavaScript(func, arguments, src.clients[client])
/datum/html_interface/proc/updateLayout(layout)
src.layout = layout
@@ -204,7 +214,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderLayout(hclient)
if (hclient && hclient.active)
src._renderLayout(hclient)
/datum/html_interface/proc/updateContent(id, content, ignore_cache = FALSE)
src.content_elements[id] = content
@@ -234,7 +245,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
winshow(hclient.client, "browser_\ref[src]", TRUE)
while (hclient.client && hclient.active && !hclient.is_loaded) sleep(2)
while (hclient.client && hclient.active && !hclient.is_loaded)
sleep(2)
/datum/html_interface/proc/hide(datum/html_interface_client/hclient)
hclient = getClient(hclient)
@@ -243,30 +255,38 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if (src.clients)
src.clients.Remove(hclient.client)
if (!src.clients.len) src.clients = null
if (!src.clients.len)
src.clients = null
hclient.client.hi_last_pos = winget(hclient.client, "browser_\ref[src]" ,"pos")
winshow(hclient.client, "browser_\ref[src]", FALSE)
winset(hclient.client, "browser_\ref[src]", "parent=none")
if (hascall(src.ref, "hiOnHide")) call(src.ref, "hiOnHide")(hclient)
if (hascall(src.ref, "hiOnHide"))
call(src.ref, "hiOnHide")(hclient)
// Convert a /mob to /client, and /client to /datum/html_interface_client
/datum/html_interface/proc/getClient(client, create_if_not_exist = FALSE)
if (istype(client, /datum/html_interface_client)) return src._getClient(client)
if (istype(client, /datum/html_interface_client))
return src._getClient(client)
else if (ismob(client))
var/mob/mob = client
client = mob.client
if (istype(client, /client))
if (create_if_not_exist && (!src.clients || !(client in src.clients)))
if (!src.clients) src.clients = new/list()
if (!(client in src.clients)) src.clients[client] = new/datum/html_interface_client(client)
if (!src.clients)
src.clients = new/list()
if (!(client in src.clients))
src.clients[client] = new/datum/html_interface_client(client)
if (src.clients && (client in src.clients)) return src._getClient(src.clients[client])
else return null
else return null
if (src.clients && (client in src.clients))
return src._getClient(src.clients[client])
else
return null
else
return null
/datum/html_interface/proc/enableFor(datum/html_interface_client/hclient)
hclient.active = TRUE
@@ -284,7 +304,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
hclient = _getClient(clients[key])
if (hclient)
if (hclient.active) return TRUE
if (hclient.active)
return TRUE
else
clients.Remove(key)
@@ -335,7 +356,8 @@ GLOBAL_LIST_EMPTY(html_interfaces)
hclient.client << output(list2params(list(html)), "browser_\ref[src].browser:updateLayout")
for (var/id in src.content_elements) src._renderContent(id, hclient, ignore_loaded = ignore_loaded)
for (var/id in src.content_elements)
src._renderContent(id, hclient, ignore_loaded = ignore_loaded)
/datum/html_interface/proc/_renderContent(id, datum/html_interface_client/hclient, ignore_cache = FALSE, ignore_loaded = FALSE)
if (hclient && (ignore_loaded || hclient.is_loaded))
@@ -365,4 +387,5 @@ GLOBAL_LIST_EMPTY(html_interfaces)
if ("onclose")
src.hide(hclient)
else if (src.ref && hclient.active) src.ref.Topic(href, href_list, hclient)
else if (src.ref && hclient.active)
src.ref.Topic(href, href_list, hclient)

View File

@@ -26,7 +26,8 @@
src.client = client
/datum/html_interface_client/proc/putExtraVar(key, value)
if (!src.extra_vars) src.extra_vars = new/list()
if (!src.extra_vars)
src.extra_vars = new/list()
src.extra_vars[key] = value
/datum/html_interface_client/proc/removeExtraVar(key)
@@ -35,9 +36,11 @@
src.extra_vars.Remove(key)
if (!src.extra_vars.len) src.extra_vars = null
if (!src.extra_vars.len)
src.extra_vars = null
return .
/datum/html_interface_client/proc/getExtraVar(key)
if (src.extra_vars) return src.extra_vars[key]
if (src.extra_vars)
return src.extra_vars[key]

View File

@@ -161,10 +161,14 @@ The client is optional and may be a /mob, /client or /html_interface_client obje
if (istype(hclient))
var/resource
switch (color)
if ("green") resource = 'uiEyeGreen.png'
if ("orange") resource = 'uiEyeOrange.png'
if ("red") resource = 'uiEyeRed.png'
else CRASH("Invalid color: [color]")
if ("green")
resource = 'uiEyeGreen.png'
if ("orange")
resource = 'uiEyeOrange.png'
if ("red")
resource = 'uiEyeRed.png'
else
CRASH("Invalid color: [color]")
if (hclient.getExtraVar("eye_color") != color)
hclient.putExtraVar("eye_color", color)

View File

@@ -198,7 +198,8 @@
log_game("[key_name(user)] set [key_name(M)] on fire")
/obj/item/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(!proximity)
return
if(force > 0)
force -= rand(1, (force / 3) + 1)
else

View File

@@ -70,7 +70,8 @@
return TRUE
/obj/item/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(!proximity)
return
if(force > 0)
force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
else

View File

@@ -43,7 +43,8 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["release"])
if(!(text2path(href_list["release"]) in machine.stack_list)) return //someone tried to spawn materials by spoofing hrefs
if(!(text2path(href_list["release"]) in machine.stack_list))
return //someone tried to spawn materials by spoofing hrefs
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type()
out.amount = inp.amount

View File

@@ -434,7 +434,8 @@
overlays = list()
string_attached = null
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
else ..()
else
..()
/obj/item/coin/attack_self(mob/user)
if(cooldown < world.time)

View File

@@ -452,7 +452,8 @@
dat += "<a class='[position_class]' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
if(!job_count) //if there's nowhere to go, assistant opens up.
for(var/datum/job/job in SSjob.occupations)
if(job.title != "Assistant") continue
if(job.title != "Assistant")
continue
dat += "<a class='otherPosition' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
break
dat += "</div></div>"

View File

@@ -486,7 +486,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Boo!"
set desc= "Scare your crew members because of boredom!"
if(bootime > world.time) return
if(bootime > world.time)
return
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
if(L)
L.flicker()
@@ -622,7 +623,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//this is called when a ghost is drag clicked to something.
/mob/dead/observer/MouseDrop(atom/over)
if(!usr || !over) return
if(!usr || !over)
return
if (isobserver(usr) && usr.client.holder && isliving(over))
if (usr.client.holder.cmd_ghost_drag(src,over))
return

View File

@@ -169,7 +169,8 @@ Doesn't work on other aliens/AI.*/
return
var/mob/living/carbon/user = usr
var/obj/effect/proc_holder/alien/acid/A = locate() in user.abilities
if(!A) return
if(!A)
return
if(user.getPlasma() > A.plasma_cost && A.corrode(O))
user.adjustPlasma(-A.plasma_cost)
@@ -305,13 +306,15 @@ Doesn't work on other aliens/AI.*/
/mob/living/carbon/proc/getPlasma()
var/obj/item/organ/alien/plasmavessel/vessel = getorgan(/obj/item/organ/alien/plasmavessel)
if(!vessel) return 0
if(!vessel)
return 0
return vessel.storedPlasma
/mob/living/carbon/proc/adjustPlasma(amount)
var/obj/item/organ/alien/plasmavessel/vessel = getorgan(/obj/item/organ/alien/plasmavessel)
if(!vessel) return 0
if(!vessel)
return 0
vessel.storedPlasma = max(vessel.storedPlasma + amount,0)
vessel.storedPlasma = min(vessel.storedPlasma, vessel.max_plasma) //upper limit of max_plasma, lower limit of 0
for(var/X in abilities)

View File

@@ -1,7 +1,8 @@
/mob/living/proc/alien_talk(message, shown_name = real_name)
log_talk(src,"[key_name(src)] : [message]",LOGSAY)
message = trim(message)
if(!message) return
if(!message)
return
var/message_a = say_quote(message, get_spans())
var/rendered = "<i><span class='alien'>Hivemind, <span class='name'>[shown_name]</span> <span class='message'>[message_a]</span></span></i>"

View File

@@ -16,7 +16,8 @@
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++) //Loop for each stage of the disease or until we run out of words
if(prob(3 * D.stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":"))
continue
temp_message[H] = "HONK"
pick_list -= H //Make sure that you dont HONK the same word twice
message = jointext(temp_message, " ")
@@ -69,8 +70,10 @@
/mob/living/carbon/human/binarycheck()
if(ears)
var/obj/item/device/radio/headset/dongle = ears
if(!istype(dongle)) return 0
if(dongle.translate_binary) return 1
if(!istype(dongle))
return 0
if(dongle.translate_binary)
return 1
/mob/living/carbon/human/radio(message, message_mode, list/spans, language)
. = ..()

View File

@@ -139,9 +139,12 @@
ai_restore_power()
return
switch(PRP)
if (1) to_chat(src, "APC located. Optimizing route to APC to avoid needless power waste.")
if (2) to_chat(src, "Best route identified. Hacking offline APC power port.")
if (3) to_chat(src, "Power port upload access confirmed. Loading control program into APC power port software.")
if (1)
to_chat(src, "APC located. Optimizing route to APC to avoid needless power waste.")
if (2)
to_chat(src, "Best route identified. Hacking offline APC power port.")
if (3)
to_chat(src, "Power port upload access confirmed. Loading control program into APC power port software.")
if (4)
to_chat(src, "Transfer complete. Forcing APC to execute program.")
sleep(50)

View File

@@ -17,12 +17,12 @@
var/savefile/F = new /savefile(src.savefile_path(user))
WRITE_FILE(F["name"], name)
WRITE_FILE(F["description"], description)
WRITE_FILE(F["role"], role)
WRITE_FILE(F["comments"], comments)
WRITE_FILE(F["name"], name)
WRITE_FILE(F["description"], description)
WRITE_FILE(F["role"], role)
WRITE_FILE(F["comments"], comments)
WRITE_FILE(F["version"], 1)
WRITE_FILE(F["version"], 1)
return 1
@@ -42,7 +42,8 @@
var/savefile/F = new /savefile(path)
if(!F) return //Not everyone has a pai savefile.
if(!F)
return //Not everyone has a pai savefile.
var/version = null
F["version"] >> version

View File

@@ -196,7 +196,8 @@
var/mob/living/M = card.loc
var/count = 0
while(!isliving(M))
if(!M || !M.loc) return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
if(!M || !M.loc)
return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
M = M.loc
count++
if(count >= 6)
@@ -248,7 +249,7 @@
medHUD = !medHUD
if(medHUD)
add_med_hud()
else
var/datum/atom_hud/med = GLOB.huds[med_hud]
med.remove_hud_from(src)

View File

@@ -11,33 +11,21 @@
/mob/living/silicon/robot/proc/uneq_module(obj/item/O)
if(!O)
return 0
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
if(istype(O, /obj/item/borg/sight))
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
if(istype(O, /obj/item/borg/sight))
var/obj/item/borg/sight/S = O
sight_mode &= ~S.sight_mode
update_sight()
else if(istype(O, /obj/item/storage/bag/tray/))
var/obj/item/storage/bag/tray/T = O
T.do_quick_empty()
else if(istype(O,/obj/item/gun/energy/laser/cyborg))
laser = 0
update_icons()
else if(istype(O,/obj/item/gun/energy/disabler/cyborg))
disabler = 0
update_icons()
else if(istype(O,/obj/item/device/dogborg/sleeper))
sleeper_g = 0
sleeper_r = 0
update_icons()
var/obj/item/device/dogborg/sleeper/S = O
S.go_out()
if(client)
client.screen -= O
observer_screen_update(O,FALSE)
O.forceMove(module) //Return item to module so it appears in its contents, so it can be taken out again.
if(O.flags_1 & DROPDEL_1)
O.flags_1 &= ~DROPDEL_1 //we shouldn't HAVE things with DROPDEL_1 in our modules, but better safe than runtiming horribly
if(O.flags_1 & DROPDEL_1)
O.flags_1 &= ~DROPDEL_1 //we shouldn't HAVE things with DROPDEL_1 in our modules, but better safe than runtiming horribly
O.dropped(src)
@@ -62,12 +50,6 @@
if(activated(O))
to_chat(src, "<span class='warning'>That module is already activated.</span>")
return
if(istype(O,/obj/item/gun/energy/laser/cyborg))
laser = 1
update_icons()
if(istype(O,/obj/item/gun/energy/disabler/cyborg))
disabler = 1
update_icons()
if(!held_items[1])
held_items[1] = O
O.screen_loc = inv1.screen_loc
@@ -194,7 +176,8 @@
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
/mob/living/silicon/robot/proc/toggle_module(module) //Module is 1-3
if(module < 1 || module > 3) return
if(module < 1 || module > 3)
return
if(module_selected(module))
deselect_module(module)

View File

@@ -490,7 +490,8 @@
var/oldloc = loc
var/moved = step_towards(src, next) // attempt to move
if(cell) cell.use(1)
if(cell)
cell.use(1)
if(moved && oldloc!=loc) // successful move
blockcount = 0
path -= loc

View File

@@ -63,7 +63,8 @@
/mob/living/simple_animal/pet/dog/corgi/show_inv(mob/user)
user.set_machine(src)
if(user.stat) return
if(user.stat)
return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(inventory_head)
@@ -123,7 +124,8 @@
/mob/living/simple_animal/pet/dog/corgi/Topic(href, href_list)
if(usr.stat) return
if(usr.stat)
return
//Removing from inventory
if(href_list["remove_inv"])

View File

@@ -514,7 +514,8 @@
return
walk_to(src, parrot_interest, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
@@ -534,7 +535,8 @@
return
walk_to(src, parrot_perch, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
@@ -547,7 +549,8 @@
walk_away(src, parrot_interest, 1, parrot_speed)
/*if(parrot_been_shot > 0)
parrot_been_shot-- didn't work anyways, and besides, any bullet poly survives isn't worth the speed boost.*/
if(isStuck()) return
if(isStuck())
return
return
@@ -586,7 +589,8 @@
//Otherwise, fly towards the mob!
else
walk_to(src, parrot_interest, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
//-----STATE MISHAP

View File

@@ -46,7 +46,8 @@
set category = "Admin"
set hidden = 1
if(!loc) return 0
if(!loc)
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -197,7 +198,8 @@
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE)
if(!istype(W)) return 0
if(!istype(W))
return 0
if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self))
if(qdel_on_fail)
qdel(W)
@@ -221,7 +223,8 @@
//puts the item "W" into an appropriate slot in a human's inventory
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)
if(!istype(W)) return 0
if(!istype(W))
return 0
var/slot_priority = W.slot_equipment_priority
if(!slot_priority)

View File

@@ -36,7 +36,8 @@
return OXYLOSS
/obj/item/hand_labeler/afterattack(atom/A, mob/user,proximity)
if(!proximity) return
if(!proximity)
return
if(!mode) //if it's off, give up.
return
@@ -112,6 +113,6 @@
desc = "A roll of paper. Use it on a hand labeler to refill it."
icon_state = "labeler_refill"
item_state = "electropack"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY

View File

@@ -3,7 +3,8 @@
var/list/things = list()
for(var/direction in GLOB.cardinals)
var/turf/T = get_step(center, direction)
if(!T) continue
if(!T)
continue
things += T.contents
return things

View File

@@ -600,7 +600,8 @@
"<span class='italics'>You hear welding.</span>")
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.remove_fuel(3, user)) return
if(!src || !WT.remove_fuel(3, user))
return
if ((stat & BROKEN) || opened==2)
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\

View File

@@ -78,7 +78,8 @@ By design, d1 is the smallest direction and d2 is the highest
var/turf/T = get_turf(src) // hide if turf is not intact
if(level==1) hide(T.intact)
if(level==1)
hide(T.intact)
GLOB.cable_list += src //add it to the global cable list
if(d1)
@@ -389,7 +390,8 @@ By design, d1 is the smallest direction and d2 is the highest
//needed as this can, unlike other placements, disconnect cables
/obj/structure/cable/proc/denode()
var/turf/T1 = loc
if(!T1) return
if(!T1)
return
var/list/powerlist = power_list(T1,src,0,0) //find the other cables that ended in the centre of the turf, with or without a powernet
if(powerlist.len>0)

View File

@@ -424,11 +424,13 @@
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
set waitfor = 0
if(flickering) return
if(flickering)
return
flickering = 1
if(on && status == LIGHT_OK)
for(var/i = 0; i < amount; i++)
if(status != LIGHT_OK) break
if(status != LIGHT_OK)
break
on = !on
update(0)
sleep(rand(5, 15))

View File

@@ -94,7 +94,8 @@
/obj/machinery/power/port_gen/pacman/examine(mob/user)
..()
to_chat(user, "<span class='notice'>The generator has [sheets] units of [sheet_name] fuel left, producing [power_gen] per cycle.</span>")
if(crit_fail) to_chat(user, "<span class='danger'>The generator seems to have broken down.</span>")
if(crit_fail)
to_chat(user, "<span class='danger'>The generator seems to have broken down.</span>")
/obj/machinery/power/port_gen/pacman/HasFuel()
if(sheets >= 1 / (time_per_sheet / power_output) - sheet_left)

View File

@@ -41,7 +41,8 @@
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
if(!S) return 0
if(!S)
return 0
S.loc = user.loc
syringes.Remove(S)
@@ -78,16 +79,16 @@
force = 2 //Also very weak because it's smaller
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE //Permanently silenced
/obj/item/gun/syringe/dna
name = "modified syringe gun"
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
origin_tech = "combat=2;syndicate=2;biotech=3"
/obj/item/gun/syringe/dna/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/dnainjector(src)
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/dnainjector))
var/obj/item/dnainjector/D = A

View File

@@ -626,7 +626,8 @@
return jointext(names, ",")
/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
if(!isnum(amount)) return 1
if(!isnum(amount))
return 1
var/list/cached_reagents = reagent_list
var/has_removed_reagent = 0

View File

@@ -68,7 +68,8 @@
recharged -= 1
/obj/machinery/chem_dispenser/proc/recharge()
if(stat & (BROKEN|NOPOWER)) return
if(stat & (BROKEN|NOPOWER))
return
var/usedpower = cell.give( 1 / powerefficiency) //Should always be a gain of one on the UI.
if(usedpower)
use_power(2500)

View File

@@ -15,7 +15,8 @@
M.set_drugginess(15)
if(isturf(M.loc) && !isspaceturf(M.loc))
if(M.canmove)
if(prob(10)) step(M, pick(GLOB.cardinals))
if(prob(10))
step(M, pick(GLOB.cardinals))
if(prob(7))
M.emote(pick("twitch","drool","moan","giggle"))
..()

View File

@@ -197,7 +197,8 @@
..()
/datum/reagent/water/holywater/on_mob_life(mob/living/M)
if(!data) data = 1
if(!data)
data = 1
data++
M.jitteriness = min(M.jitteriness+4,10)
if(data >= 30) // 12 units, 54 seconds @ metabolism 0.4 units & tick rate 1.8 sec
@@ -230,7 +231,8 @@
/datum/reagent/water/holywater/reaction_turf(turf/T, reac_volume)
..()
if(!istype(T)) return
if(!istype(T))
return
if(reac_volume>=10)
for(var/obj/effect/rune/R in T)
qdel(R)

View File

@@ -54,7 +54,8 @@
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
return data
else return "No reagents"
else
return "No reagents"
/obj/item/reagent_containers/proc/canconsume(mob/eater, mob/user)
if(!iscarbon(eater))

View File

@@ -170,7 +170,8 @@ Borg Shaker
RG.add_reagent(reagent_ids[valueofi], 5)
/obj/item/reagent_containers/borghypo/borgshaker/afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
else if(target.is_open_container() && target.reagents)
var/datum/reagents/R = reagent_list[mode]

View File

@@ -9,8 +9,10 @@
container_type = TRANSPARENT_1
/obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!target.reagents) return
if(!proximity)
return
if(!target.reagents)
return
if(reagents.total_volume > 0)
if(target.reagents.total_volume >= target.reagents.maximum_volume)

View File

@@ -53,7 +53,8 @@
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
if((!proximity) || !check_allowed_items(target,target_self=1)) return
if((!proximity) || !check_allowed_items(target,target_self=1))
return
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.

View File

@@ -4,8 +4,8 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "pill"
item_state = "pill"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
possible_transfer_amounts = list()
volume = 50
var/apply_type = INGEST
@@ -54,7 +54,8 @@
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(target.is_open_container() != 0 && target.reagents)
if(!target.reagents.total_volume)
to_chat(user, "<span class='warning'>[target] is empty! There's nothing to dissolve [src] in.</span>")
@@ -150,4 +151,4 @@
desc = "I wouldn't eat this if I were you."
icon_state = "pill9"
color = "#454545"
list_reagents = list("shadowmutationtoxin" = 1)
list_reagents = list("shadowmutationtoxin" = 1)

View File

@@ -311,7 +311,8 @@
to_chat(user, "<span class='notice'>You start slicing the disposal pipe...</span>")
// check if anything changed over 2 seconds
if(do_after(user,30, target = src))
if(!src || !W.isOn()) return
if(!src || !W.isOn())
return
deconstruct()
to_chat(user, "<span class='notice'>You slice the disposal pipe.</span>")
else
@@ -709,7 +710,8 @@
playsound(src.loc, 'sound/items/welder2.ogg', 100, 1)
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
if(do_after(user,20*I.toolspeed, target = src))
if(!src || !W.isOn()) return
if(!src || !W.isOn())
return
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
stored.loc = loc
src.transfer_fingerprints_to(stored)

View File

@@ -468,13 +468,17 @@
return
switch(dir)
if(NORTH)
if(AM.loc.y != loc.y+1) return
if(AM.loc.y != loc.y+1)
return
if(EAST)
if(AM.loc.x != loc.x+1) return
if(AM.loc.x != loc.x+1)
return
if(SOUTH)
if(AM.loc.y != loc.y-1) return
if(AM.loc.y != loc.y-1)
return
if(WEST)
if(AM.loc.x != loc.x-1) return
if(AM.loc.x != loc.x-1)
return
if(isobj(AM))
var/obj/O = AM

View File

@@ -168,12 +168,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
var/temp_screen = text2num(href_list["menu"])
screen = temp_screen
var/datum/component/material_container/linked_materials
if(linked_lathe)
linked_materials = linked_lathe.GetComponent(/datum/component/material_container)
var/datum/component/material_container/imprinter_materials
if(linked_imprinter)
imprinter_materials = linked_imprinter.GetComponent(/datum/component/material_container)
@@ -303,7 +303,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
break
if(!cancontinue)
var/choice = input("This item does not raise tech levels. Proceed destroying loaded item anyway?") in list("Proceed", "Cancel")
if(choice == "Cancel" || !linked_destroy || !linked_destroy.loaded_item) return
if(choice == "Cancel" || !linked_destroy || !linked_destroy.loaded_item)
return
linked_destroy.busy = TRUE
screen = 0.1
updateUsrDialog()
@@ -642,20 +643,22 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_imprinter == null)
screen = 4.0
var/datum/component/material_container/linked_materials
if(linked_lathe)
linked_materials = linked_lathe.GetComponent(/datum/component/material_container)
var/datum/component/material_container/imprinter_materials
if(linked_imprinter)
imprinter_materials = linked_imprinter.GetComponent(/datum/component/material_container)
switch(screen)
//////////////////////R&D CONSOLE SCREENS//////////////////
if(0.0) dat += "<div class='statusDisplay'>Updating Database....</div>"
if(0.0)
dat += "<div class='statusDisplay'>Updating Database....</div>"
if(0.1) dat += "<div class='statusDisplay'>Processing and Updating Database...</div>"
if(0.1)
dat += "<div class='statusDisplay'>Processing and Updating Database...</div>"
if(0.2)
dat += "<div class='statusDisplay'>SYSTEM LOCKED</div>"
@@ -740,13 +743,20 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Name: [D.name]<BR>"
if(D.build_type)
dat += "Lathe Types:<BR>"
if(D.build_type & IMPRINTER) dat += "Circuit Imprinter<BR>"
if(D.build_type & PROTOLATHE) dat += "Protolathe<BR>"
if(D.build_type & AUTOLATHE) dat += "Autolathe<BR>"
if(D.build_type & MECHFAB) dat += "Exosuit Fabricator<BR>"
if(D.build_type & BIOGENERATOR) dat += "Biogenerator<BR>"
if(D.build_type & LIMBGROWER) dat += "Limbgrower<BR>"
if(D.build_type & SMELTER) dat += "Smelter<BR>"
if(D.build_type & IMPRINTER)
dat += "Circuit Imprinter<BR>"
if(D.build_type & PROTOLATHE)
dat += "Protolathe<BR>"
if(D.build_type & AUTOLATHE)
dat += "Autolathe<BR>"
if(D.build_type & MECHFAB)
dat += "Exosuit Fabricator<BR>"
if(D.build_type & BIOGENERATOR)
dat += "Biogenerator<BR>"
if(D.build_type & LIMBGROWER)
dat += "Limbgrower<BR>"
if(D.build_type & SMELTER)
dat += "Smelter<BR>"
dat += "Required Materials:<BR>"
var/all_mats = D.materials + D.reagents_list
for(var/M in all_mats)
@@ -935,9 +945,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
for(var/mat_id in linked_materials.materials)
var/datum/material/M = linked_materials.materials[mat_id]
dat += "* [M.amount] of [M.name]: "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=1'>Eject</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=5'>5x</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=50'>All</A>"
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=1'>Eject</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5)
dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=5'>5x</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];ejectsheet=[M.id];eject_amt=50'>All</A>"
dat += "<BR>"
dat += "</div>"
@@ -1047,9 +1060,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
for(var/mat_id in imprinter_materials.materials)
var/datum/material/M = imprinter_materials.materials[mat_id]
dat += "* [M.amount] of [M.name]: "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=1'>Eject</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=5'>5x</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=50'>All</A>"
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=1'>Eject</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=5'>5x</A> "
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=[M.id];eject_amt=50'>All</A>"
dat += "<BR>"
dat += "</div>"

View File

@@ -31,7 +31,8 @@
/obj/machinery/r_n_d/server/Initialize(mapload)
. = ..()
if(!files) files = new /datum/research(src)
if(!files)
files = new /datum/research(src)
var/list/temp_list
if(!id_with_upload.len)
temp_list = list()
@@ -254,7 +255,8 @@
dat += "[S.name] || "
dat += "<A href='?src=\ref[src];access=[S.server_id]'>Access Rights</A> | "
dat += "<A href='?src=\ref[src];data=[S.server_id]'>Data Management</A>"
if(badmin) dat += " | <A href='?src=\ref[src];transfer=[S.server_id]'>Server-to-Server Transfer</A>"
if(badmin)
dat += " | <A href='?src=\ref[src];transfer=[S.server_id]'>Server-to-Server Transfer</A>"
dat += "<BR>"
if(1) //Access rights menu

View File

@@ -179,7 +179,8 @@
/obj/docking_port/proc/getDockedId()
var/obj/docking_port/P = get_docked()
if(P) return P.id
if(P)
return P.id
/obj/docking_port/stationary
name = "dock"

View File

@@ -429,7 +429,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
else
if(los_check(user,L))
M = L
if(M in view_or_range(range, user, selection_type)) targets += M
if(M in view_or_range(range, user, selection_type))
targets += M
else
var/list/possible_targets = list()

View File

@@ -87,7 +87,8 @@
return ..()
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
if ((movedelay > world.time) || reappearing || !direction) return
if ((movedelay > world.time) || reappearing || !direction)
return
var/turf/newLoc = get_step(src,direction)
setDir(direction)
if(!(newLoc.flags_1 & NOJAUNT_1))

View File

@@ -13,7 +13,7 @@
if(H.stat == DEAD || !(H.client))
continue
if(H.mind)
if(iswizard(H) || H.mind.special_role == "survivalist")
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist")
continue
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
SSticker.mode.traitors += H.mind
@@ -218,4 +218,4 @@
SSevents.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
log_game("Summon Events was increased!")
log_game("Summon Events was increased!")

View File

@@ -16,9 +16,12 @@
for(var/mob/living/target in targets)
var/list/turfs = new/list()
for(var/turf/T in range(target,outer_tele_radius))
if(T in range(target,inner_tele_radius)) continue
if(isspaceturf(T) && !include_space) continue
if(T.density && !include_dense) continue
if(T in range(target,inner_tele_radius))
continue
if(isspaceturf(T) && !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)

View File

@@ -96,34 +96,62 @@
/datum/industry/it/proc/latin_number(n)
if (n < 20 || !(n % 10))
switch(n)
if (0) return "Nihil"
if (1) return "Unus"
if (2) return "Duo"
if (3) return "Tres"
if (4) return "Quattour"
if (5) return "Quinque"
if (6) return "Sex"
if (7) return "Septem"
if (8) return "Octo"
if (9) return "Novem"
if (10) return "Decim"
if (11) return "Undecim"
if (12) return "Duodecim"
if (13) return "Tredecim"
if (14) return "Quattourdecim"
if (15) return "Quindecim"
if (16) return "Sedecim"
if (17) return "Septdecim"
if (18) return "Duodeviginti"
if (19) return "Undeviginti"
if (20) return "Viginti"
if (30) return "Triginta"
if (40) return "Quadriginta"
if (50) return "Quinquaginta"
if (60) return "Sexaginta"
if (70) return "Septuaginta"
if (80) return "Octoginta"
if (90) return "Nonaginta"
if (0)
return "Nihil"
if (1)
return "Unus"
if (2)
return "Duo"
if (3)
return "Tres"
if (4)
return "Quattour"
if (5)
return "Quinque"
if (6)
return "Sex"
if (7)
return "Septem"
if (8)
return "Octo"
if (9)
return "Novem"
if (10)
return "Decim"
if (11)
return "Undecim"
if (12)
return "Duodecim"
if (13)
return "Tredecim"
if (14)
return "Quattourdecim"
if (15)
return "Quindecim"
if (16)
return "Sedecim"
if (17)
return "Septdecim"
if (18)
return "Duodeviginti"
if (19)
return "Undeviginti"
if (20)
return "Viginti"
if (30)
return "Triginta"
if (40)
return "Quadriginta"
if (50)
return "Quinquaginta"
if (60)
return "Sexaginta"
if (70)
return "Septuaginta"
if (80)
return "Octoginta"
if (90)
return "Nonaginta"
else
return "[latin_number(n - (n % 10))] [lowertext(latin_number(n % 10))]"

View File

@@ -96,7 +96,8 @@
I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
I = organs[I]
if(!I) return -1
if(!I)
return -1
user.visible_message("[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>")
else