Skip to content

Commit

Permalink
remove if spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dageavtobusnick committed Nov 4, 2024
1 parent 86c7054 commit 79dc377
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ GLOBAL_PROTECT(log_end)
return "(INVALID LOCATION)"

var/turf/T = A
if (!istype(T))
if(!istype(T))
T = get_turf(A)

if(istype(T))
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/proc/send_to_observers(message, source)
var/list/all_observers = GLOB.dead_player_list + GLOB.current_observers_list
for(var/mob/observer as anything in all_observers)
if (isnull(source))
if(isnull(source))
to_chat(observer, "[message]")
continue
var/link = FOLLOW_LINK(observer, source)
Expand Down
20 changes: 10 additions & 10 deletions code/controllers/subsystem/fluids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ SUBSYSTEM_DEF(fluids)
* Ensures that the subsystem's fire wait evenly splits the spread and effect waits.
*/
/datum/controller/subsystem/fluids/proc/initialize_waits()
if (spread_wait <= 0)
if(spread_wait <= 0)
WARNING("[src] has the invalid spread wait [spread_wait].")
spread_wait = 1 SECONDS
if (effect_wait <= 0)
if(effect_wait <= 0)
WARNING("[src] has the invalid effect wait [effect_wait].")
spread_wait = 1 SECONDS

// Sets the overall wait of the subsystem to evenly divide both the effect and spread waits.
var/max_wait = Gcd(spread_wait, effect_wait)
if (max_wait < wait || wait <= 0)
if(max_wait < wait || wait <= 0)
wait = max_wait
else
// If the wait of the subsystem overall is set to a valid value make the actual wait of the subsystem evenly divide that as well.
Expand Down Expand Up @@ -138,7 +138,7 @@ SUBSYSTEM_DEF(fluids)
to_spread.spread(seconds_per_tick)
to_spread.spread_bucket = null

if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
break

MC_SPLIT_TICK // Start processing fluid effects:
Expand All @@ -154,12 +154,12 @@ SUBSYSTEM_DEF(fluids)
var/obj/effect/particle_effect/fluid/to_process = currentrun[currentrun.len]
currentrun.len--

if (QDELETED(to_process) || to_process.process(seconds_per_tick) == PROCESS_KILL)
if(QDELETED(to_process) || to_process.process(seconds_per_tick) == PROCESS_KILL)
effect_carousel[cached_bucket_index] -= to_process
to_process.effect_bucket = null
to_process.datum_flags &= ~DF_ISPROCESSING

if (MC_TICK_CHECK)
if(MC_TICK_CHECK)
break

/**
Expand All @@ -169,7 +169,7 @@ SUBSYSTEM_DEF(fluids)
* - [node][/obj/effect/particle_effect/fluid]: The node to queue to spread.
*/
/datum/controller/subsystem/fluids/proc/queue_spread(obj/effect/particle_effect/fluid/node)
if (node.spread_bucket)
if(node.spread_bucket)
return

spread_carousel[spread_bucket_index] += node
Expand All @@ -187,7 +187,7 @@ SUBSYSTEM_DEF(fluids)

var/bucket_index = node.spread_bucket
spread_carousel[bucket_index] -= node
if (bucket_index == spread_bucket_index)
if(bucket_index == spread_bucket_index)
currently_spreading -= node

node.spread_bucket = null
Expand All @@ -201,7 +201,7 @@ SUBSYSTEM_DEF(fluids)
* - [node][/obj/effect/particle_effect/fluid]: The node to start processing.
*/
/datum/controller/subsystem/fluids/proc/start_processing(obj/effect/particle_effect/fluid/node)
if (node.datum_flags & DF_ISPROCESSING || node.effect_bucket)
if(node.datum_flags & DF_ISPROCESSING || node.effect_bucket)
return

// Edit this value to make all fluids process effects (at the same time|offset by when they started processing| -> offset by a random amount <- )
Expand All @@ -225,7 +225,7 @@ SUBSYSTEM_DEF(fluids)
return

effect_carousel[bucket_index] -= node
if (bucket_index == effect_bucket_index)
if(bucket_index == effect_bucket_index)
currently_processing -= node

node.effect_bucket = null
Expand Down
14 changes: 7 additions & 7 deletions code/datums/components/blob_minion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

/datum/component/blob_minion/Initialize(mob/camera/blob/overmind, datum/callback/on_strain_changed)
. = ..()
if (!isminion(parent))
if(!isminion(parent))
return COMPONENT_INCOMPATIBLE
src.on_strain_changed = on_strain_changed
register_overlord(overmind)

/datum/component/blob_minion/InheritComponent(datum/component/new_comp, i_am_original, mob/camera/blob/overmind, datum/callback/on_strain_changed)
if (!isnull(on_strain_changed))
if(!isnull(on_strain_changed))
src.on_strain_changed = on_strain_changed
register_overlord(overmind)

/datum/component/blob_minion/proc/register_overlord(mob/camera/blob/overmind)
if (isnull(overmind))
if(isnull(overmind))
return
src.overmind = overmind
overmind.register_new_minion(parent)
Expand Down Expand Up @@ -61,7 +61,7 @@
GLOB.blob_telepathy_mobs |= parent

/datum/component/blob_minion/UnregisterFromParent()
if (!isnull(overmind))
if(!isnull(overmind))
overmind.blob_mobs -= parent
var/mob/living/living_parent = parent
living_parent.pass_flags &= ~PASSBLOB
Expand All @@ -83,7 +83,7 @@
/// Become blobpilled when we gain a mind
/datum/component/blob_minion/proc/on_mind_init(mob/living/minion, datum/mind/new_mind)
SIGNAL_HANDLER
if (isnull(overmind) || new_mind.has_antag_datum(/datum/antagonist/blob_minion))
if(isnull(overmind) || new_mind.has_antag_datum(/datum/antagonist/blob_minion))
return

var/datum_type = (isblobbernaut(minion))? /datum/antagonist/blob_minion/blobernaut : /datum/antagonist/blob_minion
Expand All @@ -101,7 +101,7 @@
/// When our icon is updated, update our colour too
/datum/component/blob_minion/proc/on_update_status_tab(mob/living/minion, list/status_items)
SIGNAL_HANDLER
if (isnull(overmind))
if(isnull(overmind))
return
status_items += list(list("Критическая Масса:", "[TOTAL_BLOB_MASS]/[NEEDED_BLOB_MASS]"))

Expand Down Expand Up @@ -136,7 +136,7 @@
/datum/component/blob_minion/proc/on_space_move(mob/living/minion)
SIGNAL_HANDLER
var/obj/structure/blob/blob_handhold = locate() in range(1, parent)
if (!isnull(blob_handhold))
if(!isnull(blob_handhold))
return COMSIG_MOVABLE_STOP_SPACEMOVE

/// We only speak telepathically to blobs
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/connect_containers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/datum/component/connect_containers/Initialize(atom/movable/tracked, list/connections)
. = ..()
if (!ismovable(tracked))
if(!ismovable(tracked))
return COMPONENT_INCOMPATIBLE

src.connections = connections
Expand Down
28 changes: 14 additions & 14 deletions code/datums/components/ghost_direct_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
datum/callback/after_assumed_control,
)
. = ..()
if (!isliving(parent))
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE

src.ban_type = ban_type
Expand All @@ -37,7 +37,7 @@
var/mob/mob_parent = parent
LAZYADD(GLOB.mob_spawners[format_text("[initial(mob_parent.name)]")], mob_parent)

if (poll_candidates)
if(poll_candidates)
INVOKE_ASYNC(src, PROC_REF(request_ghost_control), poll_question, role_name || "[parent]", poll_length, antag_age_check, check_antaghud)

/datum/component/ghost_direct_control/RegisterWithParent()
Expand Down Expand Up @@ -65,10 +65,10 @@
/// Inform ghosts that they can possess this
/datum/component/ghost_direct_control/proc/on_examined(datum/source, mob/user, list/examine_text)
SIGNAL_HANDLER
if (!isobserver(user))
if(!isobserver(user))
return
var/mob/living/our_mob = parent
if (our_mob.stat == DEAD || our_mob.key || awaiting_ghosts)
if(our_mob.stat == DEAD || our_mob.key || awaiting_ghosts)
return
examine_text += span_boldnotice("You could take control of this mob by clicking on it.")

Expand All @@ -93,15 +93,15 @@
/// A ghost clicked on us, they want to get in this body
/datum/component/ghost_direct_control/proc/on_ghost_clicked(mob/our_mob, mob/dead/observer/hopeful_ghost)
SIGNAL_HANDLER
if (our_mob.key)
if(our_mob.key)
qdel(src)
return
if (!hopeful_ghost.client)
if(!hopeful_ghost.client)
return
if (awaiting_ghosts)
if(awaiting_ghosts)
to_chat(hopeful_ghost, span_warning("Ghost candidate selection currently in progress!"))
return COMPONENT_CANCEL_ATTACK_CHAIN
if (!SSticker.HasRoundStarted())
if(!SSticker.HasRoundStarted())
to_chat(hopeful_ghost, span_warning("You cannot assume control of this until after the round has started!"))
return COMPONENT_CANCEL_ATTACK_CHAIN
INVOKE_ASYNC(src, PROC_REF(attempt_possession), our_mob, hopeful_ghost)
Expand All @@ -110,27 +110,27 @@
/// We got far enough to establish that this mob is a valid target, let's try to posssess it
/datum/component/ghost_direct_control/proc/attempt_possession(mob/our_mob, mob/dead/observer/hopeful_ghost)
var/ghost_asked = tgui_alert(usr, "Become [our_mob]?", "Are you sure?", list("Yes", "No"))
if (ghost_asked != "Yes" || QDELETED(our_mob))
if(ghost_asked != "Yes" || QDELETED(our_mob))
return
assume_direct_control(hopeful_ghost)

/// Grant possession of our mob, component is now no longer required
/datum/component/ghost_direct_control/proc/assume_direct_control(mob/harbinger)
if (QDELETED(src))
if(QDELETED(src))
to_chat(harbinger, span_warning("Offer to possess creature has expired!"))
return
if (jobban_isbanned(harbinger, ban_type))
if(jobban_isbanned(harbinger, ban_type))
to_chat(harbinger, span_warning("You are banned from playing as this role!"))
return
var/mob/living/new_body = parent
if (new_body.stat == DEAD)
if(new_body.stat == DEAD)
to_chat(harbinger, span_warning("This body has passed away, it is of no use!"))
return
if (new_body.key)
if(new_body.key)
to_chat(harbinger, span_warning("[parent] has already become sapient!"))
qdel(src)
return
if (extra_control_checks && !extra_control_checks.Invoke(harbinger))
if(extra_control_checks && !extra_control_checks.Invoke(harbinger))
return

add_game_logs("took control of [new_body].", harbinger)
Expand Down
14 changes: 7 additions & 7 deletions code/datums/components/stationloving.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
qdel(GetComponent(/datum/component/connect_containers))

/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, inform_admins, allow_death)
if (original)
if (newc)
if(original)
if(newc)
inform_admins = newc.inform_admins
allow_death = newc.allow_item_destruction
else
Expand Down Expand Up @@ -133,20 +133,20 @@
))

// Our loc is a secluded location = not in bounds
if (atom_to_check.loc && HAS_TRAIT(atom_to_check.loc, TRAIT_SECLUDED_LOCATION))
if(atom_to_check.loc && HAS_TRAIT(atom_to_check.loc, TRAIT_SECLUDED_LOCATION))
return FALSE
// No turf below us = nullspace = not in bounds
var/turf/destination_turf = get_turf(atom_to_check)
if (!destination_turf)
if(!destination_turf)
return FALSE
if (is_station_level(destination_turf.z))
if(is_station_level(destination_turf.z))
return TRUE
if(atom_to_check.onSyndieBase())
return TRUE

var/area/destination_area = destination_turf.loc
if (is_admin_level(destination_turf.z))
if (is_type_in_typecache(destination_area, disallowed_centcom_areas))
if(is_admin_level(destination_turf.z))
if(is_type_in_typecache(destination_area, disallowed_centcom_areas))
return FALSE
return TRUE
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@
*/
/atom/proc/blob_act(obj/structure/blob/attacking_blob)
var/blob_act_result = SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, attacking_blob)
if (blob_act_result & COMPONENT_CANCEL_BLOB_ACT)
if(blob_act_result & COMPONENT_CANCEL_BLOB_ACT)
return FALSE
return TRUE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
/datum/effect_system/fluid_spread/start(log = FALSE)
var/location = src.location || get_turf(holder)
var/obj/effect/particle_effect/fluid/flood = new effect_type(location, new /datum/fluid_group(amount))
if (log) // Smoke is used as an aesthetic effect in a tonne of places and we don't want, say, a broken secway spamming admin chat.
if(log) // Smoke is used as an aesthetic effect in a tonne of places and we don't want, say, a broken secway spamming admin chat.
help_out_the_admins(flood, holder, location)
flood.spread()

Expand All @@ -140,12 +140,12 @@
/datum/effect_system/fluid_spread/proc/help_out_the_admins(obj/effect/particle_effect/fluid/flood, atom/holder, atom/location)
var/source_msg
var/blame_msg
if (holder)
if(holder)
holder.transfer_fingerprints_to(flood) // This is important. If this doesn't exist thermobarics are annoying to adjudicate.

source_msg = "from inside of [ismob(holder) ? ADMIN_LOOKUPFLW(holder) : ADMIN_VERBOSEJMP(holder)]"
var/lastkey = holder.fingerprintslast
if (lastkey)
if(lastkey)
var/mob/scapegoat = get_mob_by_key(lastkey)
blame_msg = " last touched by [ADMIN_LOOKUPFLW(scapegoat)]"
else
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/obj_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@


/obj/blob_act(obj/structure/blob/B)
if (!..() || (obj_flags & IGNORE_BLOB_ACT))
if(!..() || (obj_flags & IGNORE_BLOB_ACT))
return
if(isturf(loc))
var/turf/T = loc
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/blob/blob_infected_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
blob_client = GLOB.directory[ckey(owner.key)]
location = get_turf(C)
var/datum/game_mode/mode= SSticker.mode
if (ismob(C.loc))
if(ismob(C.loc))
var/mob/M = C.loc
M.gib()
if(!is_station_level(location.z) || isspaceturf(location))
Expand Down
12 changes: 6 additions & 6 deletions code/modules/antagonists/blob/blob_minions/blob_spore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
stat_attack = DEAD
. = ..()
stat_attack = initial(stat_attack)


/mob/living/simple_animal/hostile/blob_minion/spore/AttackingTarget()
. = ..()
var/mob/living/carbon/human/human_target = target
if (!istype(human_target) || human_target.stat != DEAD)
if(!istype(human_target) || human_target.stat != DEAD)
return
zombify(human_target)

Expand All @@ -76,7 +76,7 @@
visible_message(span_warning("Тело [target.name] внезапно поднимается!"))
var/mob/living/simple_animal/hostile/blob_minion/zombie/blombie = change_mob_type(zombie_type, loc, new_name = initial(zombie_type.name))
blombie.set_name()
if (istype(blombie)) // In case of badmin
if(istype(blombie)) // In case of badmin
blombie.consume_corpse(target)
SEND_SIGNAL(src, COMSIG_BLOB_ZOMBIFIED, blombie)
qdel(src)
Expand All @@ -95,9 +95,9 @@
/// When we z-move check that we're on the same z level as our factory was
/mob/living/simple_animal/hostile/blob_minion/spore/minion/proc/on_z_changed()
SIGNAL_HANDLER
if (isnull(z_turf))
if(isnull(z_turf))
return
if (!is_valid_z_level(get_turf(src), z_turf))
if(!is_valid_z_level(get_turf(src), z_turf))
death()

/// Mark the turf we need to track from our factory
Expand All @@ -107,7 +107,7 @@

/// If the blob changes to distributed neurons then you can control the spores
/mob/living/simple_animal/hostile/blob_minion/spore/minion/on_strain_updated(mob/camera/blob/overmind, datum/blobstrain/new_strain)
if (istype(new_strain, /datum/blobstrain/reagent/distributed_neurons))
if(istype(new_strain, /datum/blobstrain/reagent/distributed_neurons))
AddComponent(\
/datum/component/ghost_direct_control,\
ban_type = ROLE_BLOB,\
Expand Down
Loading

0 comments on commit 79dc377

Please sign in to comment.