mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #4782 from VOREStation/upstream-merge-5966
[MIRROR] Fixes blast door issue, and slimesky being considered unjustified.
This commit is contained in:
@@ -34,16 +34,22 @@
|
||||
|
||||
// Checks if disciplining the slime would be 'justified' right now.
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/proc/is_justified_to_discipline()
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Entered.", AI_LOG_TRACE)
|
||||
if(!can_act())
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Judged to be unjustified because we cannot act. Exiting.", AI_LOG_DEBUG)
|
||||
return FALSE // The slime considers it abuse if they get stunned while already stunned.
|
||||
if(rabid)
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Judged to be justified because we're rabid. Exiting.", AI_LOG_TRACE)
|
||||
return TRUE
|
||||
if(target && can_attack(target))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H.species, /datum/species/monkey))
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Judged to be unjustified because we're targeting a monkey. Exiting.", AI_LOG_DEBUG)
|
||||
return FALSE // Attacking monkeys is okay.
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Judged to be justified because we are targeting a non-monkey. Exiting.", AI_LOG_TRACE)
|
||||
return TRUE // Otherwise attacking other things is bad.
|
||||
ai_log("xenobio_slime/is_justified_to_discipline() : Judged to be unjustified because we are not targeting anything. Exiting.", AI_LOG_DEBUG)
|
||||
return FALSE // Not attacking anything.
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/proc/can_command(mob/living/commander)
|
||||
@@ -64,7 +70,7 @@
|
||||
if(amount > 0)
|
||||
if(rabid)
|
||||
return
|
||||
var/justified = is_justified_to_discipline()
|
||||
var/justified = my_slime.is_justified_to_discipline() // This will also consider the AI-side of that proc.
|
||||
lost_target() // Stop attacking.
|
||||
|
||||
if(justified)
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
var/awaiting_surrender = 0
|
||||
var/can_next_insult = 0 // Uses world.time
|
||||
var/stun_strength = 60 // For humans.
|
||||
var/xeno_stun_strength = 0 // For simple mobs.
|
||||
var/xeno_harm_strength = 15 // Ditto.
|
||||
var/xeno_harm_strength = 15 // How hard to hit simple_mobs.
|
||||
var/baton_glow = "#FF6A00"
|
||||
|
||||
var/used_weapon = /obj/item/weapon/melee/baton //Weapon used by the bot
|
||||
@@ -53,12 +52,13 @@
|
||||
desc = "A little security robot, with a slime baton subsituted for the regular one."
|
||||
default_icon_state = "slimesecbot"
|
||||
stun_strength = 10 // Slimebatons aren't meant for humans.
|
||||
xeno_stun_strength = 5
|
||||
xeno_harm_strength = 9
|
||||
|
||||
xeno_harm_strength = 9 // Weaker than regular slimesky but they can stun.
|
||||
baton_glow = "#33CCFF"
|
||||
req_one_access = list(access_research, access_robotics)
|
||||
botcard_access = list(access_research, access_robotics, access_xenobiology, access_xenoarch, access_tox, access_tox_storage, access_maint_tunnels)
|
||||
used_weapon = /obj/item/weapon/melee/baton/slime
|
||||
var/xeno_stun_strength = 5 // How hard to slimebatoned()'d naughty slimes. 5 works out to 2 discipline and 5 weaken.
|
||||
|
||||
/mob/living/bot/secbot/slime/slimesky
|
||||
name = "Doctor Slimesky"
|
||||
@@ -271,7 +271,6 @@
|
||||
busy = 0
|
||||
else if(istype(M, /mob/living/simple_mob))
|
||||
var/mob/living/simple_mob/S = M
|
||||
S.Weaken(xeno_stun_strength)
|
||||
S.adjustBruteLoss(xeno_harm_strength)
|
||||
do_attack_animation(M)
|
||||
playsound(loc, "swing_hit", 50, 1, -1)
|
||||
@@ -288,7 +287,7 @@
|
||||
|
||||
if(istype(L, /mob/living/simple_mob/slime/xenobio))
|
||||
var/mob/living/simple_mob/slime/xenobio/S = L
|
||||
S.adjust_discipline(2)
|
||||
S.slimebatoned(src, xeno_stun_strength)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user