From 985fe881cbb312810014ff2f9851f8a17c2e1a83 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 17 Feb 2023 13:46:02 -0500 Subject: [PATCH] Misc fixes While I was working on kobs I fixed and tweaked a whole bunch of little things. I figured even then that I should separate the fixes, but I never got around to it Now I have~ --- code/game/objects/items.dm | 11 ++++++++--- .../structures/crates_lockers/__closets.dm | 7 +++++++ code/game/objects/structures/simple_doors.dm | 4 ++-- .../simulated/outdoors/survival_action_vr.dm | 7 +++++-- code/modules/ai/ai_holder_targeting.dm | 6 +++--- .../emotes/definitions/audible_furry_vr.dm | 4 ++++ code/modules/emotes/definitions/audible_snap.dm | 9 ++++++++- code/modules/lighting/lighting_fake_sun_vr.dm | 17 ++++------------- code/modules/mob/living/living.dm | 12 +++++++++++- code/modules/mob/living/silicon/emote.dm | 5 +++-- code/modules/multiz/movement.dm | 3 +++ code/modules/vore/eating/living_vr.dm | 4 ++++ 12 files changed, 62 insertions(+), 27 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 47d3843b7c9..204a8669d58 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -503,17 +503,22 @@ var/list/global/slot_flags_enumeration = list( return if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain + if(isanimal(usr)) //VOREStation Edit Start - Allows simple mobs with hands to use the pickup verb + var/mob/living/simple_mob/s = usr + if(!s.has_hands) + to_chat(usr, "You can't pick things up!") + return + else if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain to_chat(usr, "You can't pick things up!") return - var/mob/living/carbon/C = usr + var/mob/living/L = usr if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained to_chat(usr, "You can't pick things up!") return if(src.anchored) //Object isn't anchored to_chat(usr, "You can't pick that up!") return - if(C.get_active_hand()) //Hand is not full + if(L.get_active_hand()) //Hand is not full //VOREStation Edit End to_chat(usr, "Your hand is full.") return if(!istype(src.loc, /turf)) //Object is on a turf diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index 454a070cfe4..cf196ddf0a0 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -397,6 +397,13 @@ if(ishuman(usr) || isrobot(usr)) add_fingerprint(usr) toggle(usr) + else if(isanimal(usr)) //VOREStation Addition Start + var/mob/living/simple_mob/s = usr + if(s.has_hands) + add_fingerprint(usr) + toggle(usr) + else + to_chat(usr, "This mob type can't use this verb.") //VOREStation Addition End else to_chat(usr, "This mob type can't use this verb.") diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index ea70fa44a64..4c49624d925 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -14,7 +14,7 @@ var/oreAmount = 7 var/knock_sound = 'sound/machines/door/knock_glass.ogg' var/knock_hammer_sound = 'sound/weapons/sonic_jackhammer.ogg' - + /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) TemperatureAct(exposed_temperature) @@ -171,7 +171,7 @@ return /obj/structure/simple_door/bullet_act(var/obj/item/projectile/Proj) - hardness -= Proj.force/10 + take_damage(Proj.damage/10) CheckHardness() /obj/structure/simple_door/take_damage(var/damage) diff --git a/code/game/turfs/simulated/outdoors/survival_action_vr.dm b/code/game/turfs/simulated/outdoors/survival_action_vr.dm index c7f90171c76..9f889594938 100644 --- a/code/game/turfs/simulated/outdoors/survival_action_vr.dm +++ b/code/game/turfs/simulated/outdoors/survival_action_vr.dm @@ -1,9 +1,12 @@ +var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9") + /turf/simulated/floor/outdoors/newdirt/attack_hand(mob/user) if(user.pulling) return ..() - var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9") if(!Adjacent(user)) return ..() + if(user.a_intent != I_HELP) + return ..() if(icon_state in has_rocks) user.visible_message("[user] loosens rocks from \the [src]...", "You loosen rocks from \the [src]...") if(do_after(user, 5 SECONDS, exclusive = TASK_USER_EXCLUSIVE)) @@ -76,4 +79,4 @@ S.pixel_y = rand(-6,6) sticks = FALSE else - to_chat(user, "You don't see any loose sticks...") \ No newline at end of file + to_chat(user, "You don't see any loose sticks...") diff --git a/code/modules/ai/ai_holder_targeting.dm b/code/modules/ai/ai_holder_targeting.dm index e3d98f1620d..63424e4b9af 100644 --- a/code/modules/ai/ai_holder_targeting.dm +++ b/code/modules/ai/ai_holder_targeting.dm @@ -70,10 +70,10 @@ // Step 4, give us our selected target. /datum/ai_holder/proc/give_target(new_target, urgent = FALSE) ai_log("give_target() : Given '[new_target]', urgent=[urgent].", AI_LOG_TRACE) - + if(target) remove_target() - + target = new_target if(target != null) @@ -280,7 +280,7 @@ // Checks to see if an atom attacked us lately /datum/ai_holder/proc/check_attacker(var/atom/movable/A) - return (A in attackers) + return (A.name in attackers) // We were attacked by this thing recently /datum/ai_holder/proc/add_attacker(var/atom/movable/A) diff --git a/code/modules/emotes/definitions/audible_furry_vr.dm b/code/modules/emotes/definitions/audible_furry_vr.dm index a4b49458366..a3ac8727f90 100644 --- a/code/modules/emotes/definitions/audible_furry_vr.dm +++ b/code/modules/emotes/definitions/audible_furry_vr.dm @@ -198,6 +198,10 @@ emote_sound = pick(smolsound) else emote_sound = pick(bigsound) + else if(istype(user, /mob/living/silicon/pai)) + var/mob/living/silicon/pai/me = user + if(me.chassis == "teppi") + emote_sound = pick(bigsound) else if(user.size_multiplier >= 1.5) emote_sound = pick(bigsound) else diff --git a/code/modules/emotes/definitions/audible_snap.dm b/code/modules/emotes/definitions/audible_snap.dm index d098839f5b8..24d78db239e 100644 --- a/code/modules/emotes/definitions/audible_snap.dm +++ b/code/modules/emotes/definitions/audible_snap.dm @@ -13,7 +13,14 @@ var/obj/item/organ/external/L = H.get_organ(limb) if(istype(L) && L.is_usable() && !L.splinted) return TRUE - return FALSE + else if(isanimal(user)) //VOREStation Addition Start + var/mob/living/simple_mob/S = user + if(S.has_hands) + return TRUE + else if(ispAI(user)) + return TRUE + else //VOREStation Addition End + return FALSE /decl/emote/audible/snap/do_emote(var/atom/user, var/extra_params) if(!can_snap(user)) diff --git a/code/modules/lighting/lighting_fake_sun_vr.dm b/code/modules/lighting/lighting_fake_sun_vr.dm index 41fb677fb69..98f3674337b 100644 --- a/code/modules/lighting/lighting_fake_sun_vr.dm +++ b/code/modules/lighting/lighting_fake_sun_vr.dm @@ -102,7 +102,7 @@ for(var/turf/T as anything in all_turfs) if(T.is_outdoors()) turfs_to_use += T - + if(!turfs_to_use.len) warning("Fake sun placed on a level where it can't find any outdoor turfs to color at [x],[y],[z].") return @@ -131,23 +131,14 @@ "color" = "#F4EA55" ), list( - "brightness" = 1.0, + "brightness" = 4.0, "color" = "#F07AD8" ), list( - "brightness" = 1.0, - "color" = "#b4361f" - ), - - list( - "brightness" = 0.7, + "brightness" = 4.0, "color" = "#f3932d" - ), - - list( - "brightness" = 0.1, - "color" = "#B92B00" ) + ) /obj/effect/fake_sun/cool diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index faa62c27d4e..03a36ceddf4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -384,7 +384,17 @@ return result /mob/living/proc/setMaxHealth(var/newMaxHealth) - health = (health/maxHealth) * (newMaxHealth) //VOREStation Add - Adjust existing health + var/h_mult = maxHealth / newMaxHealth //VOREStation Add Start - Calculate change multiplier + if(bruteloss) //In case a damage value is 0, divide by 0 bad + bruteloss = round(bruteloss / h_mult) //Health is calculated on life based on damage types, so we update the damage and let life handle health + if(fireloss) + fireloss = round(fireloss / h_mult) + if(toxloss) + toxloss = round(toxloss / h_mult) + if(oxyloss) + oxyloss = round(oxyloss / h_mult) + if(cloneloss) + cloneloss = round(cloneloss / h_mult) //VOREStation Add End maxHealth = newMaxHealth /mob/living/Stun(amount) diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm index 5bb86dac682..728b4d9f846 100644 --- a/code/modules/mob/living/silicon/emote.dm +++ b/code/modules/mob/living/silicon/emote.dm @@ -17,7 +17,8 @@ var/list/_silicon_default_emotes = list( /mob/living/silicon/pai/get_available_emotes() - var/list/fulllist = global._silicon_default_emotes.Copy() + var/list/fulllist = list() + fulllist |= _silicon_default_emotes fulllist |= _robot_default_emotes fulllist |= _human_default_emotes - return fulllist \ No newline at end of file + return fulllist diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 1b4f600a0b3..9001505ce1c 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -173,6 +173,9 @@ if(Process_Spacemove()) return TRUE + if(has_hands) + return TRUE + /mob/living/carbon/human/can_ztravel() if(incapacitated()) return FALSE diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 9ebfe39bffc..9e37b888cea 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -596,6 +596,10 @@ to_chat(user, "They aren't able to be devoured.") log_and_message_admins("[key_name_admin(src)] attempted to devour [key_name_admin(prey)] against their prefs ([prey ? ADMIN_JMP(prey) : "null"])") return FALSE + if(prey.absorbed || pred.absorbed) + to_chat(user, "They aren't aren't in a state to be devoured.") + return FALSE + // Slipnoms from chompstation downstream, credit to cadyn for the original PR. // Prepare messages if(prey.is_slipping)