mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
2ede6af8bc
## About The Pull Request Basic Mobs used to always trigger cooldown on clicks. This resulted in missed attacks causing you to have a delay before you could attack again, this makes it really punishing to play as a basic mob. To resolve this I did a mini-refactor on basic mob's attack chain to allow for the return values to determine whether we go on cooldown or not. Preventing attacks that did nothing (due to not passing checks, or simply not having any behavior) from causing cooldown. This fixes #95605 ## Why It's Good For The Game being able to perform melee with the same rules as /human is only fair ## Changelog 🆑 DresserOnFire fix: Fixes a bug where player-controlled basic mobs would get a cooldown when their attacks miss refactor: basic mob attack chain can now decided whether an attack resulted in a cooldown or not. /🆑
63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
/mob/living/basic/alien/maid
|
|
name = "lusty xenomorph maid"
|
|
melee_damage_lower = 0
|
|
melee_damage_upper = 0
|
|
combat_mode = FALSE
|
|
friendly_verb_continuous = "caresses"
|
|
friendly_verb_simple = "caress"
|
|
obj_damage = 0
|
|
environment_smash = ENVIRONMENT_SMASH_NONE
|
|
gold_core_spawnable = HOSTILE_SPAWN
|
|
icon_state = "maid"
|
|
icon_living = "maid"
|
|
icon_dead = "maid_dead"
|
|
|
|
/mob/living/basic/alien/maid/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/cleaning)
|
|
|
|
///Handles the maid attacking other players, cancelling the attack to clean up instead.
|
|
/mob/living/basic/alien/maid/early_melee_attack(atom/target, list/modifiers, ignore_cooldown)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
target.wash(CLEAN_SCRUB)
|
|
if(istype(target, /obj/effect/decal/cleanable))
|
|
visible_message(span_notice("[src] cleans up \the [target]."))
|
|
else
|
|
visible_message(span_notice("[src] polishes \the [target]."))
|
|
return BASIC_MOB_END_ATTACK_CHAIN_COOLDOWN
|
|
|
|
/**
|
|
* Barmaid special type
|
|
* Spawns on emergency shuttles, has access to them and godmode while inside of them.
|
|
*/
|
|
/mob/living/basic/alien/maid/barmaid
|
|
gold_core_spawnable = NO_SPAWN
|
|
name = "Barmaid"
|
|
desc = "A barmaid, a maiden found in a bar."
|
|
pass_flags = PASSTABLE
|
|
unique_name = FALSE
|
|
initial_language_holder = /datum/language_holder/universal
|
|
|
|
ai_controller = null //they don't have their own AI and can uniquely only be controlled by players.
|
|
|
|
///The access card we use to store access to the emergency shuttle.
|
|
var/obj/item/card/id/access_card
|
|
|
|
/mob/living/basic/alien/maid/barmaid/Initialize(mapload)
|
|
. = ..()
|
|
// Simple bot ID card that can hold all accesses. Someone turn access into a component at some point, please.
|
|
access_card = new /obj/item/card/id/advanced/simple_bot(src)
|
|
|
|
var/datum/id_trim/job/cap_trim = SSid_access.trim_singletons_by_path[/datum/id_trim/job/captain]
|
|
access_card.add_access(cap_trim.access + cap_trim.wildcard_access + list(ACCESS_CENT_BAR))
|
|
|
|
ADD_TRAIT(access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
|
|
AddComponentFrom(ROUNDSTART_TRAIT, /datum/component/area_based_godmode, area_type = /area/shuttle/escape, allow_area_subtypes = TRUE)
|
|
|
|
/mob/living/basic/alien/maid/barmaid/Destroy()
|
|
QDEL_NULL(access_card)
|
|
return ..()
|