Merge pull request #14504 from Very-Soft/misc_fixes

Misc fixes
This commit is contained in:
Casey
2023-02-17 14:22:17 -05:00
committed by CHOMPStation2
parent ddedbf2a8c
commit b82736dc53
12 changed files with 62 additions and 27 deletions

View File

@@ -509,17 +509,22 @@ var/list/global/slot_flags_enumeration = list(
return return
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr))
return 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, "<span class='warning'>You can't pick things up!</span>")
return
else if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
to_chat(usr, "<span class='warning'>You can't pick things up!</span>") to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
return 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 if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
to_chat(usr, "<span class='warning'>You can't pick things up!</span>") to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
return return
if(src.anchored) //Object isn't anchored if(src.anchored) //Object isn't anchored
to_chat(usr, "<span class='warning'>You can't pick that up!</span>") to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
return 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, "<span class='warning'>Your hand is full.</span>") to_chat(usr, "<span class='warning'>Your hand is full.</span>")
return return
if(!istype(src.loc, /turf)) //Object is on a turf if(!istype(src.loc, /turf)) //Object is on a turf

View File

@@ -397,6 +397,13 @@
if(ishuman(usr) || isrobot(usr)) if(ishuman(usr) || isrobot(usr))
add_fingerprint(usr) add_fingerprint(usr)
toggle(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, "<span class='warning'>This mob type can't use this verb.</span>") //VOREStation Addition End
else else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>") to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")

View File

@@ -14,7 +14,7 @@
var/oreAmount = 7 var/oreAmount = 7
var/knock_sound = 'sound/machines/door/knock_glass.ogg' var/knock_sound = 'sound/machines/door/knock_glass.ogg'
var/knock_hammer_sound = 'sound/weapons/sonic_jackhammer.ogg' var/knock_hammer_sound = 'sound/weapons/sonic_jackhammer.ogg'
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
TemperatureAct(exposed_temperature) TemperatureAct(exposed_temperature)
@@ -173,7 +173,7 @@
return return
/obj/structure/simple_door/bullet_act(var/obj/item/projectile/Proj) /obj/structure/simple_door/bullet_act(var/obj/item/projectile/Proj)
hardness -= Proj.force/10 take_damage(Proj.damage/10)
CheckHardness() CheckHardness()
/obj/structure/simple_door/take_damage(var/damage) /obj/structure/simple_door/take_damage(var/damage)

View File

@@ -1,9 +1,12 @@
var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
/turf/simulated/floor/outdoors/newdirt/attack_hand(mob/user) /turf/simulated/floor/outdoors/newdirt/attack_hand(mob/user)
if(user.pulling) if(user.pulling)
return ..() return ..()
var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
if(!Adjacent(user)) if(!Adjacent(user))
return ..() return ..()
if(user.a_intent != I_HELP)
return ..()
if(icon_state in has_rocks) if(icon_state in has_rocks)
user.visible_message("[user] loosens rocks from \the [src]...", "You loosen rocks from \the [src]...") 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)) if(do_after(user, 5 SECONDS, exclusive = TASK_USER_EXCLUSIVE))
@@ -76,4 +79,4 @@
S.pixel_y = rand(-6,6) S.pixel_y = rand(-6,6)
sticks = FALSE sticks = FALSE
else else
to_chat(user, "<span class='notice'>You don't see any loose sticks...</span>") to_chat(user, "<span class='notice'>You don't see any loose sticks...</span>")

View File

@@ -70,10 +70,10 @@
// Step 4, give us our selected target. // Step 4, give us our selected target.
/datum/ai_holder/proc/give_target(new_target, urgent = FALSE) /datum/ai_holder/proc/give_target(new_target, urgent = FALSE)
ai_log("give_target() : Given '[new_target]', urgent=[urgent].", AI_LOG_TRACE) ai_log("give_target() : Given '[new_target]', urgent=[urgent].", AI_LOG_TRACE)
if(target) if(target)
remove_target() remove_target()
target = new_target target = new_target
if(target != null) if(target != null)
@@ -282,7 +282,7 @@
// Checks to see if an atom attacked us lately // Checks to see if an atom attacked us lately
/datum/ai_holder/proc/check_attacker(var/atom/movable/A) /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 // We were attacked by this thing recently
/datum/ai_holder/proc/add_attacker(var/atom/movable/A) /datum/ai_holder/proc/add_attacker(var/atom/movable/A)

View File

@@ -198,6 +198,10 @@
emote_sound = pick(smolsound) emote_sound = pick(smolsound)
else else
emote_sound = pick(bigsound) 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) else if(user.size_multiplier >= 1.5)
emote_sound = pick(bigsound) emote_sound = pick(bigsound)
else else

View File

@@ -13,7 +13,14 @@
var/obj/item/organ/external/L = H.get_organ(limb) var/obj/item/organ/external/L = H.get_organ(limb)
if(istype(L) && L.is_usable() && !L.splinted) if(istype(L) && L.is_usable() && !L.splinted)
return TRUE 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) /decl/emote/audible/snap/do_emote(var/atom/user, var/extra_params)
if(!can_snap(user)) if(!can_snap(user))

View File

@@ -102,7 +102,7 @@
for(var/turf/T as anything in all_turfs) for(var/turf/T as anything in all_turfs)
if(T.is_outdoors()) if(T.is_outdoors())
turfs_to_use += T turfs_to_use += T
if(!turfs_to_use.len) 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].") warning("Fake sun placed on a level where it can't find any outdoor turfs to color at [x],[y],[z].")
return return
@@ -131,23 +131,14 @@
"color" = "#F4EA55" "color" = "#F4EA55"
), ),
list( list(
"brightness" = 1.0, "brightness" = 4.0,
"color" = "#F07AD8" "color" = "#F07AD8"
), ),
list( list(
"brightness" = 1.0, "brightness" = 4.0,
"color" = "#b4361f"
),
list(
"brightness" = 0.7,
"color" = "#f3932d" "color" = "#f3932d"
),
list(
"brightness" = 0.1,
"color" = "#B92B00"
) )
) )
/obj/effect/fake_sun/cool /obj/effect/fake_sun/cool

View File

@@ -384,7 +384,17 @@
return result return result
/mob/living/proc/setMaxHealth(var/newMaxHealth) /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 maxHealth = newMaxHealth
/mob/living/Stun(amount) /mob/living/Stun(amount)

View File

@@ -17,7 +17,8 @@ var/list/_silicon_default_emotes = list(
/mob/living/silicon/pai/get_available_emotes() /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 |= _robot_default_emotes
fulllist |= _human_default_emotes fulllist |= _human_default_emotes
return fulllist return fulllist

View File

@@ -173,6 +173,9 @@
if(Process_Spacemove()) if(Process_Spacemove())
return TRUE return TRUE
if(has_hands)
return TRUE
/mob/living/carbon/human/can_ztravel() /mob/living/carbon/human/can_ztravel()
if(incapacitated()) if(incapacitated())
return FALSE return FALSE

View File

@@ -618,6 +618,10 @@
to_chat(user, "<span class='notice'>They aren't able to be devoured.</span>") to_chat(user, "<span class='notice'>They aren't able to be devoured.</span>")
log_and_message_admins("[key_name_admin(src)] attempted to devour [key_name_admin(prey)] against their prefs ([prey ? ADMIN_JMP(prey) : "null"])") 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 return FALSE
if(prey.absorbed || pred.absorbed)
to_chat(user, "<span class='warning'>They aren't aren't in a state to be devoured.</span>")
return FALSE
// Slipnoms from chompstation downstream, credit to cadyn for the original PR. // Slipnoms from chompstation downstream, credit to cadyn for the original PR.
// Prepare messages // Prepare messages
if(prey.is_slipping) if(prey.is_slipping)