Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic fixes #9

Merged
merged 4 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@
else if(istype(S, /node/statement/IfStatement))
. = RunIf(S, scope)
else if(istype(S, /node/statement/ReturnStatement))
if(!scope.allowed_status & RETURNING)
if(!(scope.allowed_status & RETURNING))
RaiseError(new/runtimeError/UnexpectedReturn(), scope, S)
continue
scope.status |= RETURNING
. = (scope.return_val=Eval(S:value, scope))
break
else if(istype(S, /node/statement/BreakStatement))
if(!scope.allowed_status & BREAKING)
if(!(scope.allowed_status & BREAKING))
//RaiseError(new/runtimeError/UnexpectedReturn())
continue
scope.status |= BREAKING
break
else if(istype(S, /node/statement/ContinueStatement))
if(!scope.allowed_status & CONTINUING)
if(!(scope.allowed_status & CONTINUING))
//RaiseError(new/runtimeError/UnexpectedReturn())
continue
scope.status |= CONTINUING
Expand Down
10 changes: 4 additions & 6 deletions ModularBungalow/mobs/megafauna/rockplanet/sif/sif.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,12 @@ Difficulty: Medium
var/passed = 0

if(angered)
switch(rand(0,100))
if(0 to 1)
passed = 1
if(prob(22))
passed = 1

if(enraged)
switch(rand(0,100))
if(0 to 5)
passed = 1
if(prob(55))
passed = 1

if(passed == 1)
visible_message("<span class='danger'>[src] dodged the projectile!</span>", "<span class='userdanger'>You dodge the projectile!</span>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,22 +394,22 @@ The reactor CHEWS through moderator. It does not do this slowly. Be very careful
if(20 to 39)
grilled_item.name = "grilled [initial(grilled_item.name)]"
grilled_item.desc = "[initial(I.desc)] It's been grilled over a nuclear reactor."
if(!grilled_item.foodtype & TRAIT_FOOD_GRILLED)
if(!(grilled_item.foodtype & TRAIT_FOOD_GRILLED))
grilled_item.foodtype |= TRAIT_FOOD_GRILLED
if(40 to 70)
grilled_item.name = "heavily grilled [initial(grilled_item.name)]"
grilled_item.desc = "[initial(I.desc)] It's been heavily grilled through the magic of nuclear fission."
if(!grilled_item.foodtype & TRAIT_FOOD_GRILLED)
if(!(grilled_item.foodtype & TRAIT_FOOD_GRILLED))
grilled_item.foodtype |= TRAIT_FOOD_GRILLED
if(70 to 95)
grilled_item.name = "Three-Mile Nuclear-Grilled [initial(grilled_item.name)]"
grilled_item.desc = "A [initial(grilled_item.name)]. It's been put on top of a nuclear reactor running at extreme power by some badass engineer."
if(!grilled_item.foodtype & TRAIT_FOOD_GRILLED)
if(!(grilled_item.foodtype & TRAIT_FOOD_GRILLED))
grilled_item.foodtype |= TRAIT_FOOD_GRILLED
if(95 to INFINITY)
grilled_item.name = "Ultimate Meltdown Grilled [initial(grilled_item.name)]"
grilled_item.desc = "A [initial(grilled_item.name)]. A grill this perfect is a rare technique only known by a few engineers who know how to perform a 'controlled' meltdown whilst also having the time to throw food on a reactor. I'll bet it tastes amazing."
if(!grilled_item.foodtype & TRAIT_FOOD_GRILLED)
if(!(grilled_item.foodtype & TRAIT_FOOD_GRILLED))
grilled_item.foodtype |= TRAIT_FOOD_GRILLED

/obj/machinery/atmospherics/components/trinary/nuclear_reactor/proc/relay(var/sound, var/message=null, loop = FALSE, channel = null) //Sends a sound + text message to the crew of a ship
Expand Down
2 changes: 1 addition & 1 deletion code/datums/quirks/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
var/datum/species/species = H.dna.species
if(initial(species.liked_food) & MEAT)
species.liked_food |= MEAT
if(!initial(species.disliked_food) & MEAT)
if(!(initial(species.disliked_food) & MEAT))
species.disliked_food &= ~MEAT

/datum/quirk/snob
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
to_chat(user, "<span class='danger'>Throwing [pushed_mob] onto the table might hurt them!</span>")
return
var/added_passtable = FALSE
if(!pushed_mob.pass_flags & PASSTABLE)
if(!(pushed_mob.pass_flags & PASSTABLE))
added_passtable = TRUE
pushed_mob.pass_flags |= PASSTABLE
pushed_mob.Move(src.loc)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/one_click_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
chosen_candidate.client.prefs.copy_to(ert_operative)
ert_operative.key = chosen_candidate.key

if(ertemplate.enforce_human || !ert_operative.dna.species.changesource_flags & ERT_SPAWN) // Don't want any exploding plasmemes
if(ertemplate.enforce_human || !(ert_operative.dna.species.changesource_flags & ERT_SPAWN)) // Don't want any exploding plasmemes
ert_operative.set_species(/datum/species/human)

//Give antag datum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
var/check = FALSE
if(ismob(target))
var/mob/living/mobster = target
if(!mobster.mob_biotypes & MOB_ROBOTIC)
if(!(mobster.mob_biotypes & MOB_ROBOTIC))
return FALSE
else
check = TRUE
Expand Down
10 changes: 5 additions & 5 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
/datum/asset/simple/tgui_common
keep_local_name = TRUE
assets = list(
"tgui-common.bundle.js" = 'tgui/public/tgui-common.bundle.js',
"tgui-common.bundle.js" = file("tgui/public/tgui-common.bundle.js"),
)

/datum/asset/simple/tgui
keep_local_name = TRUE
assets = list(
"tgui.bundle.js" = 'tgui/public/tgui.bundle.js',
"tgui.bundle.css" = 'tgui/public/tgui.bundle.css',
"tgui.bundle.js" = file("tgui/public/tgui.bundle.js"),
"tgui.bundle.css" = file("tgui/public/tgui.bundle.css"),
)

/datum/asset/simple/tgui_panel
keep_local_name = TRUE
assets = list(
"tgui-panel.bundle.js" = 'tgui/public/tgui-panel.bundle.js',
"tgui-panel.bundle.css" = 'tgui/public/tgui-panel.bundle.css',
"tgui-panel.bundle.js" = file("tgui/public/tgui-panel.bundle.js"),
"tgui-panel.bundle.css" = file("tgui/public/tgui-panel.bundle.css"),
)

/datum/asset/simple/headers
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
switch(atk_verb)//this code is really stupid but some genius apparently made "claw" and "slash" two attack types but also the same one so it's needed i guess
if(ATTACK_EFFECT_KICK)
user.do_attack_animation(target, ATTACK_EFFECT_KICK)
if(ATTACK_EFFECT_SLASH || ATTACK_EFFECT_CLAW)//smh
if(ATTACK_EFFECT_SLASH, ATTACK_EFFECT_CLAW)//smh
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
if(ATTACK_EFFECT_SMASH)
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/research/nanites/nanite_programs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
software_error()

/datum/nanite_program/proc/on_shock(shock_damage)
if(!program_flags & NANITE_SHOCK_IMMUNE)
if(!(program_flags & NANITE_SHOCK_IMMUNE))
if(prob(10))
host_mob.investigate_log("[src] nanite program received a software error due to shock.", INVESTIGATE_NANITES)
software_error()
Expand All @@ -260,7 +260,7 @@
qdel(src)

/datum/nanite_program/proc/on_minor_shock()
if(!program_flags & NANITE_SHOCK_IMMUNE)
if(!(program_flags & NANITE_SHOCK_IMMUNE))
if(prob(10))
host_mob.investigate_log("[src] nanite program received a software error due to minor shock.", INVESTIGATE_NANITES)
software_error()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/vehicles/mecha/_mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,12 @@
if(isAI(user) == !LAZYACCESS(modifiers, MIDDLE_CLICK))//BASICALLY if a human uses MMB, or an AI doesn't, then do nothing.
return
if(phasing)
balloon_alert(user, "not while [phasing]!")
to_chat(occupants, "[icon2html(src, occupants)]<span class='warning'>Unable to interact with objects while phasing.</span>")
return
if(user.incapacitated())
return
if(construction_state)
balloon_alert(user, "end maintenance first!")
to_chat(occupants, "[icon2html(src, occupants)]<span class='warning'>Maintenance protocols in effect.</span>")
return
if(!get_charge())
return
Expand All @@ -553,7 +553,7 @@
var/mob/living/livinguser = user
if(selected)
if(!(livinguser in return_controllers_with_flag(VEHICLE_CONTROL_EQUIPMENT)))
balloon_alert(user, "wrong seat for equipment!")
to_chat(livinguser, "<span class='warning'>You aren't in the right seat!</span>")
return
if(!Adjacent(target) && (selected.range & MECHA_RANGED))
if(HAS_TRAIT(livinguser, TRAIT_PACIFISM) && selected.harmful)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/mecha/equipment/tools/other_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
h_boost *= -2
else if(chassis.internal_damage && DT_PROB(8, delta_time))
for(var/int_dam_flag in repairable_damage)
if(!chassis.internal_damage & int_dam_flag)
if(!(chassis.internal_damage & int_dam_flag))
continue
chassis.clearInternalDamage(int_dam_flag)
repaired = TRUE
Expand Down
Loading