refactors poles and trees into basic mobs (#74812)

## About The Pull Request
refactors poles and trees into basic mobs. If trees now see you holding
a chainsaw, hatchet, or some wood they will get angry and knock you out
for longer. Poles will run around giving some of their charge to APCs
they find along the way. i did them both in this PR coz poles were a
subtype of trees.

## Why It's Good For The Game
refactor

## Changelog
🆑
refactor: refactors trees into basic mobs
refactor: refactors poles into basic mobs
add: If trees now see you holding a chainsaw, hatchet, or some wood they
will get angry and knock you out for longer
add: Poles will run around giving some of their charge to APCs they find
along the way
fix: cells charged by the pole will now have their icon correctly
updated to reflect their charge
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
SMOSMOSMOSMOSMO
2023-04-19 16:17:17 -06:00
committed by GitHub
co-authored by Mothblocks
parent 0aa744ca4f
commit f3f274de5c
13 changed files with 272 additions and 122 deletions
+19
View File
@@ -0,0 +1,19 @@
/datum/action/cooldown/mob_cooldown/charge_apc
name = "Charge APCs"
button_icon = 'icons/obj/power.dmi'
button_icon_state = "apc0"
desc = "Give off charge to an APC."
cooldown_time = 5 SECONDS
///how much charge are we giving off to an APC?
var/given_charge = 80
/datum/action/cooldown/mob_cooldown/charge_apc/Activate(atom/target_atom)
if(!istype(target_atom,/obj/machinery/power/apc))
return
var/obj/machinery/power/apc/target_apc = target_atom
if(!target_apc.cell)
return
new /obj/effect/particle_effect/sparks(target_apc.loc)
target_apc.cell.give(given_charge)
StartCooldown()
return TRUE
@@ -116,3 +116,7 @@
speak = list("Gnot a gnelf!", "Gnot a gnoblin!", "Howdy chum!")
emote_hear = list("snores.", "burps.")
emote_see = list("blinks.")
/datum/ai_planning_subtree/random_speech/tree
speech_chance = 3
emote_see = list("photosynthesizes angirly.")