CI now bans the use of weird spacing in conditionals (#22777)

* no more spaces

* Matthew 10:22

* fixes

* dgamerl review

* Update code/modules/hydroponics/plant_genes.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/bot/ed209bot.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/pda/PDA.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* fuck

* bah

* Update tools/ci/check_grep2.py

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* oops

* guh

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
Contrabang
2023-11-12 15:59:43 -05:00
committed by GitHub
parent 35754c77ea
commit 48d7b00a0d
204 changed files with 562 additions and 544 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
/mob/dead/Login()
. = ..()
var/turf/T = get_turf(src)
if (isturf(T))
if(isturf(T))
update_z(T.z)
/mob/dead/Logout()
@@ -11,7 +11,7 @@
/mob/dead/forceMove(atom/destination, direction = NONE)
var/turf/old_turf = get_turf(src)
var/turf/new_turf = get_turf(destination)
if (old_turf?.z != new_turf?.z)
if(old_turf?.z != new_turf?.z)
onTransitZ(old_turf?.z, new_turf?.z)
var/oldloc = loc
loc = destination
@@ -22,11 +22,11 @@
update_z(new_z)
/mob/dead/proc/update_z(new_z) // 1+ to register, null to unregister
if (registered_z != new_z)
if (registered_z)
if(registered_z != new_z)
if(registered_z)
SSmobs.dead_players_by_zlevel[registered_z] -= src
if (client)
if (new_z)
if(client)
if(new_z)
SSmobs.dead_players_by_zlevel[new_z] += src
registered_z = new_z
else
@@ -369,7 +369,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
H.remove_hud_from(src)
/mob/dead/observer/proc/set_radiation_view(enabled)
if (enabled)
if(enabled)
seerads = TRUE
START_PROCESSING(SSobj, src)
else
@@ -711,7 +711,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
update_sight()
/mob/dead/observer/update_sight()
if (!ghostvision)
if(!ghostvision)
see_invisible = SEE_INVISIBLE_LIVING
else
see_invisible = SEE_INVISIBLE_OBSERVER
+1 -1
View File
@@ -41,7 +41,7 @@ GLOBAL_LIST_INIT(boo_phrases, list(
if(target.get_spooked())
var/area/spook_zone = get_area(target)
if (spook_zone.is_haunted == TRUE)
if(spook_zone.is_haunted == TRUE)
to_chat(usr, "<span class='notice'>The veil is weak in [spook_zone], it took less effort to influence [target].</span>")
cooldown_handler.start_recharge(cooldown_handler.recharge_duration / 2)
return
@@ -98,7 +98,7 @@
if(wear_suit.blood_DNA)
var/t_suit = "suit"
if( istype(wear_suit, /obj/item/clothing/suit/armor) )
if(istype(wear_suit, /obj/item/clothing/suit/armor))
t_suit = "armor"
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood")
+1 -1
View File
@@ -1160,7 +1160,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
if(ispill(toEat))
to_chat(src, "<span class='notify'>You [toEat.apply_method] [toEat].</span>")
else
if(toEat.junkiness && satiety < -150 && nutrition > NUTRITION_LEVEL_STARVING + 50 )
if(toEat.junkiness && satiety < -150 && nutrition > NUTRITION_LEVEL_STARVING + 50)
to_chat(src, "<span class='notice'>You don't feel like eating any more junk food at the moment.</span>")
return 0
if(fullness <= 50)
+1 -1
View File
@@ -291,7 +291,7 @@
msg += "</span>"
if(pose)
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
if(findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0)
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\n[p_they(TRUE)] [p_are()] [pose]"
@@ -264,7 +264,7 @@
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
var/update = 0
while(parts.len && ( brute > 0 || burn > 0) )
while(parts.len && ( brute > 0 || burn > 0))
var/obj/item/organ/external/picked = pick(parts)
var/brute_was = picked.brute_dam
@@ -289,7 +289,7 @@
var/list/obj/item/organ/external/parts = get_damageable_organs()
var/update = 0
while(parts.len && (brute>0 || burn>0) )
while(parts.len && (brute>0 || burn>0))
var/obj/item/organ/external/picked = pick(parts)
var/brute_per_part = brute/parts.len
var/burn_per_part = burn/parts.len
@@ -748,7 +748,7 @@ emp_act
playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE)
if(shoes && isclothing(shoes))
var/obj/item/clothing/S = shoes
if (S.flags & NOSLIP)
if(S.flags & NOSLIP)
return FALSE
return ..()
@@ -1226,7 +1226,7 @@
if(include_species_change)
set_species(new_dna.species.type, retain_damage = TRUE, transformation = TRUE, keep_missing_bodyparts = TRUE)
dna = new_dna.Clone()
if (include_species_change) //We have to call this after new_dna.Clone() so that species actions don't get overwritten
if(include_species_change) //We have to call this after new_dna.Clone() so that species actions don't get overwritten
dna.species.on_species_gain(src)
real_name = new_dna.real_name
domutcheck(src, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
@@ -1618,7 +1618,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
/mob/living/carbon/human/singularity_act()
. = 20
if(mind)
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer") )
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer"))
. = 100
if(mind.assigned_role == "Clown")
. = rand(-1000, 1000)
+4 -4
View File
@@ -582,7 +582,7 @@
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //seperated from our puller and not in the middle of a diagonal move
pulledby.stop_pulling()
if(s_active && !(s_active in contents) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
if(s_active && !(s_active in contents) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
/mob/living/proc/pull_pulled(turf/dest, atom/movable/pullee, movetime)
@@ -714,7 +714,7 @@
if(has_limbs)
var/turf/T = get_step(src, angle2dir(dir2angle(direction) + 90))
if (T)
if(T)
turfs_to_check += T
T = get_step(src, angle2dir(dir2angle(direction) - 90))
@@ -1094,9 +1094,9 @@
if(client)
if(new_z)
SSmobs.clients_by_zlevel[new_z] += src
for (var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511
for(var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511
var/mob/living/simple_animal/SA = SSidlenpcpool.idle_mobs_by_zlevel[new_z][I]
if (SA)
if(SA)
SA.toggle_ai(AI_ON) // Guarantees responsiveness for when appearing right next to mobs
else
SSidlenpcpool.idle_mobs_by_zlevel[new_z] -= SA
+1 -1
View File
@@ -11,7 +11,7 @@
message_admins("[src] [ADMIN_FLW(src, "FLW")] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z]. If you could ask them how that happened and notify the coders, it would be appreciated.")
log_game("Z-TRACKING: [src] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z].")
update_z(T.z)
else if (!client && registered_z)
else if(!client && registered_z)
log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.")
update_z(null)
+1 -1
View File
@@ -380,7 +380,7 @@
msg += "\n[print_flavor_text()]"
if(pose)
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
if(findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0)
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
msg += "\n</span>"
@@ -30,10 +30,10 @@
// see code\modules\paperwork\paper.dm line 62
/obj/item/pen/multi/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
if( !user || !paper )
if(!user || !paper)
return
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
if( !user || !paper )
if(!user || !paper)
return
n_name = copytext(n_name, 1, 32)
@@ -87,7 +87,7 @@
/mob/living/silicon/robot/heal_overall_damage(brute, burn, updating_health = TRUE)
var/list/datum/robot_component/parts = get_damaged_components(brute, burn)
while(LAZYLEN(parts) && (brute > 0 || burn > 0) )
while(LAZYLEN(parts) && (brute > 0 || burn > 0))
var/datum/robot_component/picked = pick(parts)
var/brute_was = picked.brute_damage
@@ -117,7 +117,7 @@
A.take_damage(brute, burn, sharp)
return
while(LAZYLEN(parts) && (brute > 0 || burn > 0) )
while(LAZYLEN(parts) && (brute > 0 || burn > 0))
var/datum/robot_component/picked = pick(parts)
var/brute_was = picked.brute_damage
@@ -51,7 +51,7 @@
msg += "\n[print_flavor_text()]\n"
if(pose)
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
if(findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0)
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
@@ -76,7 +76,7 @@
var/obj/machinery/hologram/holopad/T = current
if(istype(T) && T.masters[src])
var/obj/effect/overlay/holo_pad_hologram/H = T.masters[src]
if ((client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT) && can_hear())
if((client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT) && can_hear())
var/message = combine_message(message_pieces, null, src)
create_chat_message(H, message)
for(var/mob/M in hearers(T.loc))//The location is the object, default distance.
@@ -480,7 +480,7 @@ Pass the desired type path itself, declaring a temporary var beforehand is not r
var/atom/A = scan
if(!istype(A, scan_type)) //Check that the thing we found is the type we want!
continue //If not, keep searching!
if((A.UID() in ignore_list) || (A == old_target) ) //Filter for blacklisted elements, usually unreachable or previously processed oness
if((A.UID() in ignore_list) || (A == old_target)) //Filter for blacklisted elements, usually unreachable or previously processed oness
continue
var/scan_result = process_scan(A) //Some bots may require additional processing when a result is selected.
if(scan_result)
@@ -566,7 +566,7 @@
/obj/item/griefsky_assembly/attackby(obj/item/I, mob/user, params)
..()
if((istype(I, /obj/item/melee/energy/sword)) && (build_step < 3 ))
if((istype(I, /obj/item/melee/energy/sword)) && (build_step < 3))
if(!user.unEquip(I))
return
build_step++
@@ -581,7 +581,7 @@
qdel(I)
qdel(src)
else if((istype(I, /obj/item/toy/sword)) && (toy_step < 3 ))
else if((istype(I, /obj/item/toy/sword)) && (toy_step < 3))
if(!user.unEquip(I))
return
toy_step++
@@ -204,7 +204,7 @@
return data
/mob/living/simple_animal/bot/cleanbot/ui_act(action, params)
if (..())
if(..())
return
if(topic_denied(usr))
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
@@ -66,7 +66,7 @@
if(created_name == initial(name) || !created_name)
if(lasercolor == "b")
name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT")
else if (lasercolor == "r")
else if(lasercolor == "r")
name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT")
/mob/living/simple_animal/bot/ed209/proc/setup_access()
@@ -118,7 +118,7 @@
return data
/mob/living/simple_animal/bot/ed209/ui_act(action, params)
if (..())
if(..())
return
if(topic_denied(usr))
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
@@ -435,7 +435,7 @@
lastfired = world.time
var/turf/T = loc
var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
if((!( U ) || !( T )))
if((!U || !T))
return
while(!isturf(U))
U = U.loc
@@ -154,7 +154,7 @@
/mob/living/simple_animal/bot/secbot/griefsky/look_for_perp()
anchored = FALSE
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
for(var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
if((C.stat) || (C.handcuffed))
continue
@@ -187,7 +187,7 @@
return data
/mob/living/simple_animal/bot/medbot/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
if (..())
if(..())
return
if(topic_denied(usr))
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
@@ -133,7 +133,7 @@
return data
/mob/living/simple_animal/bot/secbot/ui_act(action, params)
if (..())
if(..())
return
if(topic_denied(usr))
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
@@ -330,7 +330,7 @@
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if( !Adjacent(target) || !isturf(target.loc) || world.time - target.stam_regen_start_time < 4 SECONDS && target.getStaminaLoss() <= 100)
if(!Adjacent(target) || !isturf(target.loc) || world.time - target.stam_regen_start_time < 4 SECONDS && target.getStaminaLoss() <= 100)
back_to_hunt()
return
@@ -159,7 +159,7 @@
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc)))
movement_target = null
stop_automated_movement = FALSE
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
if(!movement_target || !(movement_target.loc in oview(src, 3)))
movement_target = null
stop_automated_movement = FALSE
for(var/mob/living/simple_animal/mouse/snack in oview(src,3))
@@ -106,7 +106,7 @@
var/static/list/cardinal_sidestep_directions = list(-90, -45, 0, 45, 90)
var/static/list/diagonal_sidestep_directions = list(-45, 0, 45)
var/chosen_dir = 0
if (target_dir & (target_dir - 1))
if(target_dir & (target_dir - 1))
chosen_dir = pick(diagonal_sidestep_directions)
else
chosen_dir = pick(cardinal_sidestep_directions)
@@ -392,7 +392,7 @@
ranged_cooldown = world.time + ranged_cooldown_time
/mob/living/simple_animal/hostile/proc/Shoot(atom/targeted_atom)
if( QDELETED(targeted_atom) || targeted_atom == targets_from.loc || targeted_atom == targets_from )
if(QDELETED(targeted_atom) || targeted_atom == targets_from.loc || targeted_atom == targets_from)
return
var/turf/startloc = get_turf(targets_from)
if(casingtype)
@@ -72,7 +72,7 @@
if(isliving(the_target))
var/mob/living/L = the_target
if (!faction_check_mob(L) && attack_same == 2)
if(!faction_check_mob(L) && attack_same == 2)
return FALSE
if(L.stat > stat_attack)
return FALSE
@@ -67,14 +67,14 @@
if(A == src)
if(score > 0)
new /obj/effect/temp_visual/heart(T) // heart symbol, I am safe here, protected by a friendly spider
else if (score == 0)
else if(score == 0)
new /obj/effect/temp_visual/heal(T) // white "+" symbol, I am neutral here
else
new /obj/effect/temp_visual/at_shield(T) // octagon symbol, I am unsafe here, I need to flee
else
if(score > 0)
new /obj/effect/temp_visual/telekinesis(T) // blue sparks, this is a safe area, I want to go here
else if (score == 0)
else if(score == 0)
new /obj/effect/temp_visual/revenant(T) // purple sparks, this is a neutral area, an acceptable choice
else
new /obj/effect/temp_visual/cult/sparks(T) // red sparks, this is an unsafe area, I won't go here unless fleeing something worse
@@ -107,8 +107,8 @@
/mob/living/simple_animal/hostile/venus_human_trap/OpenFire(atom/the_target)
for(var/turf/T in get_line(src,target))
if (T.density)
for(var/turf/T in get_line(src, target))
if(T.density)
return
for(var/obj/O in T)
if(O.density)
@@ -147,8 +147,8 @@
else
..()
if( possessed_item.loc != src )
if ( isturf(possessed_item.loc) ) // If we've, say, placed the possessed item on the table move onto the table ourselves instead and put it back inside of us.
if(possessed_item.loc != src)
if(isturf(possessed_item.loc)) // If we've, say, placed the possessed item on the table move onto the table ourselves instead and put it back inside of us.
forceMove(possessed_item.loc)
possessed_item.forceMove(src)
else // If we're inside a toolbox or something, we are inside the item rather than the item inside us. This is so people can see the item in the toolbox.
@@ -174,7 +174,7 @@
nest = null
var/turf/T = get_turf(src)
if (T && AIStatus == AI_Z_OFF)
if(T && AIStatus == AI_Z_OFF)
SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src
return ..()
@@ -27,9 +27,9 @@
return
var/hungry = 0
if (nutrition < get_starve_nutrition())
if(nutrition < get_starve_nutrition())
hungry = 2
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
else if(nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
hungry = 1
AIproc = TRUE
@@ -278,7 +278,7 @@
if(Target)
--target_patience
if (target_patience <= 0 || SStun > world.time || Discipline || attacked || docile) // Tired of chasing or something draws out attention
if(target_patience <= 0 || SStun > world.time || Discipline || attacked || docile) // Tired of chasing or something draws out attention
target_patience = 0
Target = null
@@ -287,9 +287,9 @@
var/hungry = 0 // determines if the slime is hungry
if (nutrition < get_starve_nutrition())
if(nutrition < get_starve_nutrition())
hungry = 2
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
else if(nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
hungry = 1
if(!Target)
@@ -333,7 +333,7 @@
Target = C
break
if (Target)
if(Target)
target_patience = rand(5, 7)
if(is_adult)
target_patience += 3
@@ -352,20 +352,20 @@
/mob/living/simple_animal/slime/proc/handle_mood()
var/newmood = ""
if (rabid || attacked)
if(rabid || attacked)
newmood = "angry"
else if (docile)
else if(docile)
newmood = ":3"
else if (Target)
else if(Target)
newmood = "mischievous"
if (!newmood)
if (Discipline && prob(25))
if(!newmood)
if(Discipline && prob(25))
newmood = "pout"
else if (prob(1))
else if(prob(1))
newmood = pick("sad", ":3", "pout")
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
if((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
if(prob(75))
newmood = mood
@@ -383,7 +383,7 @@
for(var/mob/living/L in view(7,src))
if(isslime(L) && L != src)
++slimes_near
if (L.stat == DEAD)
if(L.stat == DEAD)
++dead_slimes
if(nutrition < get_hunger_nutrition())
t += 10
@@ -216,7 +216,7 @@
if(prob(probab))
if(istype(O, /obj/structure/window) || istype(O, /obj/structure/grille))
if(nutrition <= get_hunger_nutrition() && !Atkcool)
if (is_adult || prob(5))
if(is_adult || prob(5))
O.attack_slime(src)
Atkcool = TRUE
addtimer(VARSET_CALLBACK(src, Atkcool, FALSE), 4.5 SECONDS)
@@ -403,7 +403,7 @@
. += "<span class='deadsay'>It appears to be alive but unresponsive.</span>"
if(getBruteLoss())
. += "<span class='warning'>"
if (getBruteLoss() < 40)
if(getBruteLoss() < 40)
. += "It has some punctures in its flesh!"
else
. += "<B>It has severe punctures and tears in its flesh!</B>"
+25 -25
View File
@@ -110,13 +110,13 @@
if(type)
if(type & EMOTE_VISIBLE && !has_vision(information_only=TRUE))//Vision related
if(!(alt))
if(!alt)
return
else
msg = alt
type = alt_type
if(type & EMOTE_AUDIBLE && !can_hear())//Hearing related
if(!( alt ))
if(!alt)
return
else
msg = alt
@@ -353,13 +353,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_WEAR_MASK)
if( !(slot_flags & SLOT_FLAG_MASK) )
if(!(slot_flags & SLOT_FLAG_MASK))
return 0
if(H.wear_mask)
return 0
return 1
if(SLOT_HUD_BACK)
if( !(slot_flags & SLOT_FLAG_BACK) )
if(!(slot_flags & SLOT_FLAG_BACK))
return 0
if(H.back)
if(!(H.back.flags & NODROP))
@@ -368,7 +368,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_OUTER_SUIT)
if( !(slot_flags & SLOT_FLAG_OCLOTHING) )
if(!(slot_flags & SLOT_FLAG_OCLOTHING))
return 0
if(H.wear_suit)
if(!(H.wear_suit.flags & NODROP))
@@ -377,7 +377,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_GLOVES)
if( !(slot_flags & SLOT_FLAG_GLOVES) )
if(!(slot_flags & SLOT_FLAG_GLOVES))
return 0
if(H.gloves)
if(!(H.gloves.flags & NODROP))
@@ -386,7 +386,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_SHOES)
if( !(slot_flags & SLOT_FLAG_FEET) )
if(!(slot_flags & SLOT_FLAG_FEET))
return 0
if(H.shoes)
if(!(H.shoes.flags & NODROP))
@@ -399,7 +399,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( !(slot_flags & SLOT_FLAG_BELT) )
if(!(slot_flags & SLOT_FLAG_BELT))
return 0
if(H.belt)
if(!(H.belt.flags & NODROP))
@@ -408,7 +408,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_GLASSES)
if( !(slot_flags & SLOT_FLAG_EYES) )
if(!(slot_flags & SLOT_FLAG_EYES))
return 0
if(H.glasses)
if(!(H.glasses.flags & NODROP))
@@ -417,7 +417,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_HEAD)
if( !(slot_flags & SLOT_FLAG_HEAD) )
if(!(slot_flags & SLOT_FLAG_HEAD))
return 0
if(H.head)
if(!(H.head.flags & NODROP))
@@ -426,7 +426,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_LEFT_EAR)
if( !(slot_flags & SLOT_HUD_LEFT_EAR) )
if(!(slot_flags & SLOT_HUD_LEFT_EAR))
return 0
if(H.l_ear)
if(!(H.l_ear.flags & NODROP))
@@ -435,7 +435,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_RIGHT_EAR)
if( !(slot_flags & SLOT_HUD_RIGHT_EAR) )
if(!(slot_flags & SLOT_HUD_RIGHT_EAR))
return 0
if(H.r_ear)
if(!(H.r_ear.flags & NODROP))
@@ -444,7 +444,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return 0
return 1
if(SLOT_HUD_JUMPSUIT)
if( !(slot_flags & SLOT_FLAG_ICLOTHING) )
if(!(slot_flags & SLOT_FLAG_ICLOTHING))
return 0
if(H.w_uniform)
if(!(H.w_uniform.flags & NODROP))
@@ -457,7 +457,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( !(slot_flags & SLOT_FLAG_ID) )
if(!(slot_flags & SLOT_FLAG_ID))
return 0
if(H.wear_id)
if(!(H.wear_id.flags & NODROP))
@@ -472,7 +472,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_FLAG_POCKET) )
if(w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_FLAG_POCKET))
return 1
if(SLOT_HUD_RIGHT_STORE)
if(H.r_store)
@@ -481,7 +481,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_FLAG_POCKET) )
if(w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_FLAG_POCKET))
return 1
return 0
if(SLOT_HUD_SUIT_STORE)
@@ -497,7 +497,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!disable_warning)
to_chat(usr, "The [name] is too big to attach.")
return 0
if( istype(src, /obj/item/pda) || is_pen(src) || is_type_in_list(src, H.wear_suit.allowed) )
if(istype(src, /obj/item/pda) || is_pen(src) || is_type_in_list(src, H.wear_suit.allowed))
if(H.s_store)
if(!(H.s_store.flags & NODROP))
return 2
@@ -643,29 +643,29 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
to_chat(src, chat_box_examine(result.Join("\n")))
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
if((!( istype(l_hand, /obj/item/grab) ) && !( istype(r_hand, /obj/item/grab) )))
if(!( L ))
if((!istype(l_hand, /obj/item/grab) && !istype(r_hand, /obj/item/grab)))
if(!L)
return null
else
return L.container
else
if(!( L ))
if(!L)
L = new /obj/effect/list_container/mobl( null )
L.container += src
L.master = src
if(istype(l_hand, /obj/item/grab))
var/obj/item/grab/G = l_hand
if(!( L.container.Find(G.affecting) ))
if(!L.container.Find(G.affecting))
L.container += G.affecting
if(G.affecting)
G.affecting.ret_grab(L, 1)
if(istype(r_hand, /obj/item/grab))
var/obj/item/grab/G = r_hand
if(!( L.container.Find(G.affecting) ))
if(!L.container.Find(G.affecting))
L.container += G.affecting
if(G.affecting)
G.affecting.ret_grab(L, 1)
if(!( flag ))
if(!flag)
if(L.master == src)
var/list/temp = list( )
temp += L.container
@@ -1548,7 +1548,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/proc/show_rads(range)
for(var/turf/place in range(range, src))
var/rads = SSradiation.get_turf_radiation(place)
if (rads < RAD_BACKGROUND_RADIATION)
if(rads < RAD_BACKGROUND_RADIATION)
continue
var/strength = round(rads / 1000, 0.1)
@@ -1606,7 +1606,7 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
/world/proc/invoke_callback_with_usr(mob/user_mob, datum/callback/invoked_callback, ...)
var/temp = usr
usr = user_mob
if (length(args) > 2)
if(length(args) > 2)
. = invoked_callback.Invoke(arglist(args.Copy(3)))
else
. = invoked_callback.Invoke()
+1 -1
View File
@@ -52,7 +52,7 @@
var/input = ""
if(!message && !client)
CRASH("An empty custom emote was called from a client-less mob.")
else if (!message)
else if(!message)
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
else
input = message
+1 -1
View File
@@ -281,7 +281,7 @@
return 0
if(affecting)
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) )
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))
qdel(src)
return 0
return 1
+2 -2
View File
@@ -632,7 +632,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
var/search_pda = 1
for(var/A in searching)
if( search_id && istype(A,/obj/item/card/id) )
if(search_id && istype(A,/obj/item/card/id))
var/obj/item/card/id/ID = A
if(ID.registered_name == oldname)
ID.registered_name = newname
@@ -641,7 +641,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
if(!search_pda) break
search_id = 0
else if( search_pda && istype(A,/obj/item/pda) )
else if(search_pda && istype(A,/obj/item/pda))
var/obj/item/pda/PDA = A
if(PDA.owner == oldname)
PDA.owner = newname
@@ -14,11 +14,11 @@
if(istext(new_type))
new_type = text2path(new_type)
if( !ispath(new_type) )
if(!ispath(new_type))
to_chat(usr, "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder.")
return
if( new_type == /mob/new_player )
if(new_type == /mob/new_player)
to_chat(usr, "<span class='warning'>cannot convert into a new_player mob type.</span>")
return
@@ -33,7 +33,7 @@
qdel(M)
return
if( istext(new_name) )
if(istext(new_name))
M.name = new_name
M.real_name = new_name
else