Files
Bubberstation/code/modules/mob/living/basic/syndicate/russian.dm
Jacquerel 29c3d38c7e Give basic mob ranged attacks a cooldown (#77575)
## About The Pull Request

Atomised change from a different PR I am working on.
This changes the basic mob ranged attacks element into a component so
that it can also track an attack cooldown on the mob, preventing it from
firing until the cooldown is complete.
This was possible with simple mobs but wasn't kept going forwards when
converting things to basic ones.

## Why It's Good For The Game

Ideally player and mob behaviour should be unified as much as is
realistically possible. Currently mobs which are designed to fire a
powerful weapon slowly can blast as rapidly as the click cooldown if
placed under control of a player, which is not ideal.
This isn't currently aligned for melee attacks either but I will look at
that later.

## Changelog

🆑
fix: Player-controlled basic mobs with ranged attacks can now only fire
about as fast as AI-controlled ones.
/🆑
2023-08-13 14:39:47 -06:00

39 lines
1.3 KiB
Plaintext

/**
* Russian subtype of Syndicate troops
* We're a subtype because we are nearly the same mob with a different Faction.
*/
/mob/living/basic/syndicate/russian
name = "Russian Mobster"
desc = "For the Motherland!"
speed = 0
melee_damage_lower = 15
melee_damage_upper = 15
unsuitable_cold_damage = 1
unsuitable_heat_damage = 1
faction = list(FACTION_RUSSIAN)
mob_spawner = /obj/effect/mob_spawn/corpse/human/russian
r_hand = /obj/item/knife/kitchen
loot = list(
/obj/effect/mob_spawn/corpse/human/russian,
/obj/item/knife/kitchen,
)
/mob/living/basic/syndicate/russian/ranged
ai_controller = /datum/ai_controller/basic_controller/syndicate/ranged
mob_spawner = /obj/effect/mob_spawn/corpse/human/russian/ranged
r_hand = /obj/item/gun/ballistic/automatic/pistol
loot = list(
/obj/effect/mob_spawn/corpse/human/russian/ranged,
/obj/item/gun/ballistic/revolver/nagant,
)
var/casingtype = /obj/item/ammo_casing/n762
var/projectilesound = 'sound/weapons/gun/revolver/shot.ogg'
/mob/living/basic/syndicate/russian/ranged/Initialize(mapload)
. = ..()
AddComponent(/datum/component/ranged_attacks, casing_type = casingtype, projectile_sound = projectilesound, cooldown_time = 1 SECONDS)
/mob/living/basic/syndicate/russian/ranged/lootless
loot = list()