[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
@@ -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>"
+4 -2
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
@@ -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)
+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)
@@ -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
@@ -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)
@@ -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)
@@ -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
@@ -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"])
@@ -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
+6 -3
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)