Skip to content

Commit

Permalink
opendream lints (#37147)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhitak committed Sep 20, 2024
1 parent 0d1fec5 commit ac2e48f
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var/list/discounted_items_of_the_round = list()

// If the uplink's holder is in the user's contents
var/obj/item/holder = U.parent
if ((holder in user.contents || (in_range(holder, user) && istype(holder.loc, /turf))))
if ((holder in user.contents) || (in_range(holder, user) && istype(holder.loc, /turf)))
user.set_machine(U)
if(get_cost(U.job, U.species) > U.telecrystals)
return 0
Expand Down
2 changes: 1 addition & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
// For category you should pass the typepath of the category, however strings should be used for slots made dynamically at runtime.
/atom/movable/proc/lock_atom(var/atom/movable/AM, var/datum/locking_category/category = /datum/locking_category)
locking_init()
if (AM in locked_atoms || AM.locked_to || !istype(AM))
if ((AM in locked_atoms) || AM.locked_to || !istype(AM))
return FALSE

category = get_lock_cat(category)
Expand Down
2 changes: 1 addition & 1 deletion code/game/dna/dna_modifier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
occupantData["name"] = connected.occupant.name
occupantData["stat"] = connected.occupant.stat
occupantData["isViableSubject"] = 1
if (M_NOCLONE in connected.occupant.mutations || !src.connected.occupant.dna)
if ((M_NOCLONE in connected.occupant.mutations) || !src.connected.occupant.dna)
occupantData["isViableSubject"] = 0
occupantData["health"] = connected.occupant.health
occupantData["maxHealth"] = connected.occupant.maxHealth
Expand Down
2 changes: 1 addition & 1 deletion code/game/dna/genes/goon_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
target.pixel_y = 0
target.stop_flying()

if (M_FAT in target.mutations && prob(66))
if ((M_FAT in target.mutations) && prob(66))
target.visible_message("<span class='warning'><b>[target.name]</b> crashes due to their heavy weight!</span>")
//playsound(usr.loc, 'zhit.wav', 50, 1)
target.AdjustKnockdown(10)
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/atmo_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

if("toggle_monitoring" in href_list)
var/toggle_target = href_list["toggle_monitoring"]
if(toggle_target in XGM.gases || toggle_target == "pressure" || toggle_target == "temperature")
if((toggle_target in XGM.gases) || toggle_target == "pressure" || toggle_target == "temperature")
toggle_monitoring(toggle_target)
return MT_UPDATE

Expand Down Expand Up @@ -305,7 +305,7 @@ font-weight:bold;

/obj/machinery/computer/general_air_control/unlinkFrom(var/mob/user, var/obj/O)
..()
if("id_tag" in O.vars && (istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter)))
if(("id_tag" in O.vars) && (istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter)))
sensors.Remove(O:id_tag)
return 1
return 0
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
src.use_power = MACHINE_POWER_USE_IDLE
// Removes dropped items/magically appearing mobs from the charger too
for (var/atom/movable/x in src.contents)
if(!(x in upgrade_holder | component_parts))
if(!(x in (upgrade_holder | component_parts)))
x.forceMove(src.loc)
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/telecomms/broadcaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/atom/proc/test_telecomms()
var/datum/signal/signal = src.telecomms_process()
var/turf/position = get_turf(src)
return (position.z in signal.data["level"] && signal.data["done"])
return ((position.z in signal.data["level"]) && signal.data["done"])

/atom/proc/telecomms_process()
// First, we want to generate a new radio signal
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/telecomms/logbrowser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ var/list/static/list_of_animal_types = typesof(/mob/living/simple_animal)

if(href_list["network"])
var/newnet = sanitize(input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text)
if(newnet && (usr in range(1, src) || issilicon(usr)))
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/telecomms/telemonitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
if(href_list["network"])

var/newnet = sanitize(input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var/global/num_vending_terminals = 1
if(istype(SP, /obj/item/weapon/stock_parts/manipulator))
manipcount += SP.rating
shoot_chance = manipcount * 3

coinbox = locate() in component_parts
if(!coinbox)
coinbox = new(src)
Expand Down Expand Up @@ -792,7 +792,7 @@ var/global/num_vending_terminals = 1
if(!isAdminGhost(usr) && (user.lying || user.incapacitated()))
return 0

if(M_TK in user.mutations && user.a_intent == "hurt" && iscarbon(user))
if((M_TK in user.mutations) && user.a_intent == "hurt" && iscarbon(user))
if(!Adjacent(user))
to_chat(user, "<span class='danger'>You slam \the [src] with your mind!</span>")
visible_message("<span class='danger'>[src] dents slightly, as if it was struck!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var/list/infected_cleanables = list()
legacy_cult.getNewObjective()
if(src.loc && isturf(src.loc))
for(var/obj/effect/decal/cleanable/C in src.loc)
if(C.type in absorbs_types && C != src)
if((C.type in absorbs_types) && C != src)
// Transfer DNA, if possible.
if (transfers_dna && C.blood_DNA)
blood_DNA |= C.blood_DNA.Copy()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ var/list/global/id_cards = list()
return jobName
if(alt_jobName in get_all_job_icons()) //Check if the base job has a hud icon
return alt_jobName
if(jobName in get_all_centcom_jobs() || (alt_jobName in get_all_centcom_jobs())) //Return with the NT logo if it is a Centcom job
if((jobName in get_all_centcom_jobs()) || (alt_jobName in get_all_centcom_jobs())) //Return with the NT logo if it is a Centcom job
return "Centcom"
return "Unknown" //Return unknown if none of the above apply

Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
for(var/mob/M in viewers(usr, null)) //If someone is standing close enough, they can tell what it is, otherwise they can only see large or normal items from a distance
if(M == usr)
to_chat(usr, "You add [to_transfer] [((to_transfer > 1) && S.irregular_plural) ? S.irregular_plural : "[S.singular_name]\s"] to \the [otherS]. It now contains [otherS.amount] [(otherS.irregular_plural && otherS.amount > 1) ? otherS.irregular_plural : "[otherS.singular_name]"].")
else if (!stealthy(usr) && (M in range(1) || W.w_class >= W_CLASS_MEDIUM))
else if (!stealthy(usr) && ((M in range(1)) || W.w_class >= W_CLASS_MEDIUM))
M.show_message("<span class='notice'>[usr] puts \the [W] into \the [src].</span>")
S.use(to_transfer)
refresh_all()
Expand All @@ -408,7 +408,7 @@
for(var/mob/M in viewers(usr, null)) //If someone is standing close enough, they can tell what it is, otherwise they can only see large or normal items from a distance
if(M == usr)
to_chat(usr, "<span class='notice'>You put \the [W] into \the [src].</span>")
else if (!stealthy(usr) && (M in range(1) || W.w_class >= W_CLASS_MEDIUM))
else if (!stealthy(usr) && ((M in range(1)) || W.w_class >= W_CLASS_MEDIUM))
M.show_message("<span class='notice'>[usr] puts \the [W] into \the [src].</span>")

W.mouse_opacity = 2 //So you can click on the area around the item to equip it, instead of having to pixel hunt
Expand Down
2 changes: 1 addition & 1 deletion code/modules/Economy/debit_card.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

/obj/item/weapon/card/debit/preferred/examine(var/mob/user)
. = ..()
if(src in user.held_items || istype(user, /mob/dead))
if((src in user.held_items) || istype(user, /mob/dead))
to_chat(user, examine_held)

/obj/item/weapon/card/debit/preferred/elite
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/buildmode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ var/global/list/obj/effect/bmode/buildholder/buildmodeholders = list()
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")

var/edit_variable = input(usr,"Enter variable name:" ,"Name", "name")
if(edit_variable in locked && !check_rights(R_DEBUG,0))
if((edit_variable in locked) && !check_rights(R_DEBUG,0))
return 1

master.buildmode.varholder = edit_variable
Expand Down
2 changes: 1 addition & 1 deletion code/modules/media/jukebox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ var/global/list/loopModeNames=list(

change_cost = max(0,text2num(href_list["set_change_cost"]))
linked_account = new_linked_account
if("lock" in href_list && href_list["lock"] != "")
if(("lock" in href_list) && href_list["lock"] != "")
change_access = list(text2num(href_list["lock"]))
else
change_access = list()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/brain/MMI.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
var/cc=contents_count(t)
var/req=sammi_assembly_parts[t]
if(cc<req)
to_chat(user, "<span class='warning'>You're short [req-cc] [initial(t)]\s.</span>")
to_chat(user, "<span class='warning'>You're short [req-cc] [t]\s.</span>")
return TRUE
if(!istype(loc,/turf))
to_chat(user, "<span class='warning'>You can't assemble the SAMMI, \the [src] has to be standing on the ground (or a table) to be perfectly precise.</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
E.process_grasp(held_items[E.grasp_id], get_index_limb_name(E.grasp_id))

//Special effects for legs and foot
else if(E.name in list(LIMB_LEFT_LEG, LIMB_LEFT_FOOT, LIMB_RIGHT_LEG, LIMB_RIGHT_FOOT) && !lying)
else if((E.name in list(LIMB_LEFT_LEG, LIMB_LEFT_FOOT, LIMB_RIGHT_LEG, LIMB_RIGHT_FOOT)) && !lying)
if(E.is_malfunctioning() || E.is_broken())
stand_broken = 1 //We can't stand like this

Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/organ_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ Note that amputating the affected organ does in fact remove the infection from t
// slow healing
var/heal_amt = 0

if(W.damage < 15 || (M_REGEN in owner.mutations && W.damage <= 50)) //This thing's edges are not in day's travel of each other, what healing?
if(W.damage < 15 || ((M_REGEN in owner.mutations) && W.damage <= 50)) //This thing's edges are not in day's travel of each other, what healing?
heal_amt += 0.2

if(W.is_treated() && W.damage < 50) //Whoa, not even magical band aid can hold it together
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/solars/panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
return 1

if(stat & BROKEN)
to_chat(user, "<span class='warning'>\The solar panel is too damaged.</span>")
to_chat(user, "<span class='warning'>\The [S] is too damaged.</span>")
return 1

var/diff = initial(health) - health
Expand Down
3 changes: 2 additions & 1 deletion code/modules/spells/general/area_teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
/spell/area_teleport/cast(area/thearea, mob/user)
if(!istype(thearea))
if(istype(thearea, /list))
thearea = thearea[1]
var/list/templist = thearea
thearea = templist[1]
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/trader/crates/zincsaucier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ var/global/global_cricket_population = 0
if((queen_bees_inside || worker_bees_inside) && species.angery)
playsound(loc, 'sound/effects/fan.ogg', 75, 1, -1)
anim(target = loc, a_icon = 'icons/effects/160x160.dmi', flick_anim = "incense", offX = -WORLD_ICON_SIZE*2+pixel_x, offY = -WORLD_ICON_SIZE*2+pixel_y)
visible_message("<span class='good'>\The hive fans smoke, calming the residents for the harvest.</span>")
visible_message("<span class='good'>The hive fans smoke, calming the residents for the harvest.</span>")

if(do_after(user, loc, 50))
if(harvest_honeycombs())
Expand Down

0 comments on commit ac2e48f

Please sign in to comment.