Merge pull request #15099 from Heroman3003/misc-fixes

A variety of miscellaneous bugfixes
This commit is contained in:
Heroman3003
2023-07-02 09:32:35 +10:00
committed by GitHub
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
else if(src.density && (user.a_intent == I_HURT)) //If we can't pry it open and it's not a weapon.... Eh, let's attack it anyway.
var/obj/item/weapon/W = C
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
if(istype(W) && (W.damtype == BRUTE || W.damtype == BURN))
user.do_attack_animation(src)
if(W.force < min_force) //No actual non-weapon item shouls have a force greater than the min_force, but let's include this just in case.
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
+4 -4
View File
@@ -84,11 +84,11 @@
R.adjustBruteLoss(-weld_rate)
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
R.adjustFireLoss(-wire_rate)
//VOREStation Add Start
else if(ispAI(occupant))
var/mob/living/silicon/pai/P = occupant
if(P.nutrition < 400)
P.nutrition = min(P.nutrition+10, 400)
cell.use(7000/450*10)
@@ -110,7 +110,7 @@
// Also recharge their internal battery.
if(H.isSynthetic() && H.nutrition < 500) //VOREStation Edit
H.nutrition = min(H.nutrition+(10*(1-max(H.species.synthetic_food_coeff, 0.9))), 500) //VOREStation Edit
H.nutrition = min(H.nutrition+(10*(1-min(H.species.synthetic_food_coeff, 0.9))), 500) //VOREStation Edit
cell.use(7000/450*10)
// And clear up radiation
@@ -268,7 +268,7 @@
occupant = R
update_icon()
return 1
//VOREStation Add Start
else if(istype(L, /mob/living/silicon/pai))
var/mob/living/silicon/pai/P = L
+1 -1
View File
@@ -208,7 +208,7 @@
var/mattermult = istype(Ob, /obj/item) ? min(2000, 400 * Ob.w_class) : 2000
Ob.matter[recipe.use_material] = mattermult / produced * required
Ob.matter[recipe.matter_material] = mattermult / produced * required
O.set_dir(user.dir)
O.add_fingerprint(user)
@@ -42,7 +42,7 @@
pref.alternate_languages.len = (S.num_alternate_languages + pref.extra_languages) // Truncate to allowed length
// VOREStation Edit Start
if(!(pref.preferred_language in pref.alternate_languages) || !pref.preferred_language) // Safety handling for if our preferred language is ever somehow removed from the character's list of langauges, or they don't have one set
if((!(pref.preferred_language in pref.alternate_languages) && !(pref.preferred_language == LANGUAGE_GALCOM) && !(pref.preferred_language == S.language)) || !pref.preferred_language) // Safety handling for if our preferred language is ever somehow removed from the character's list of langauges, or they don't have one set
pref.preferred_language = S.language // Reset to default, for safety
// VOREStation Edit end
+2 -2
View File
@@ -17,10 +17,10 @@
return
else // They're outside and hopefully on a planet.
var/datum/planet/P = SSplanets.z_to_planet[T.z]
if(!P)
if(!(T.z in SSplanets.z_to_planet) || !(SSplanets.z_to_planet[T.z]))
to_chat(usr, span("warning", "You appear to be outside, but not on a planet... Something is wrong."))
return
var/datum/planet/P = SSplanets.z_to_planet[T.z]
var/datum/weather_holder/WH = P.weather_holder
+2 -2
View File
@@ -196,7 +196,7 @@
icon_state = "medibot[on]"
/mob/living/bot/medbot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == I_DISARM && !is_tipped)
if(istype(H) && H.a_intent == I_DISARM && !is_tipped)
H.visible_message("<span class='danger'>[H] begins tipping over [src].</span>", "<span class='warning'>You begin tipping over [src]...</span>")
if(world.time > last_tipping_action_voice + 15 SECONDS)
@@ -209,7 +209,7 @@
if(do_after(H, 3 SECONDS, target=src))
tip_over(H)
else if(H.a_intent == I_HELP && is_tipped)
else if(istype(H) && H.a_intent == I_HELP && is_tipped)
H.visible_message("<span class='notice'>[H] begins righting [src].</span>", "<span class='notice'>You begin righting [src]...</span>")
if(do_after(H, 3 SECONDS, target=src))
set_right(H)