Does some code standardization/consistency

This commit is contained in:
Firecage
2017-10-05 11:13:47 +02:00
parent 511e357472
commit 2ae0380fef
154 changed files with 935 additions and 475 deletions
@@ -438,7 +438,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>"
+4 -2
View File
@@ -485,7 +485,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()
@@ -625,7 +626,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
@@ -164,7 +164,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)
@@ -303,13 +304,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)
+2 -1
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>"
+6 -3
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)
. = ..()
+6 -3
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)
@@ -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
@@ -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)
@@ -176,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)
@@ -495,7 +495,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
//to_chat(world, "Successful move.")
blockcount = 0
@@ -61,7 +61,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)
@@ -121,7 +122,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"])
@@ -512,7 +512,8 @@
return
walk_to(src, parrot_interest, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
@@ -532,7 +533,8 @@
return
walk_to(src, parrot_perch, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
@@ -545,7 +547,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
@@ -584,7 +587,8 @@
//Otherwise, fly towards the mob!
else
walk_to(src, parrot_interest, 1, parrot_speed)
if(isStuck()) return
if(isStuck())
return
return
//-----STATE MISHAP
+6 -3
View File
@@ -47,7 +47,8 @@
set category = "Admin"
set hidden = 1
if(!loc) return 0
if(!loc)
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -198,7 +199,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)
@@ -222,7 +224,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)