Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/modules/mob/living/simple_mob/defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
to_chat(user, "<span class='notice'>\The [src] can't be [harvest_verb] so soon.</span>")
return

if(user.a_intent == I_HELP && istype(O, /obj/item/weapon/reagent_containers/food/snacks))
handle_food(O,user)

if(can_tame(O, user))
to_chat(user, "<span class='notice'>You offer \the [src] \the [O].</span>")
if(tame_prob(O, user))
Expand Down
57 changes: 57 additions & 0 deletions code/modules/mob/living/simple_mob/elements.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/mob/living/simple_mob
var/sm_element = "c"

/mob/living/simple_mob/vore/e/engine
name = "Electric guy"
desc = "It looks pretty fluffy!"

sm_element = "e"
var/energy_charge = 0
var/discharge = FALSE

var/datum/powernet/PN
var/obj/structure/cable/attached


/mob/living/simple_mob/vore/e/engine/Life()
. = ..()

if(discharge)

else if(nutrition >= 300)
energy_charge += 100
nutrition -= 1

else if(energy_charge >= 1000)
discharge = TRUE

/mob/living/simple_mob/vore/solargrub/Life()
. = ..()
if(!.) return

if(!ai_holder.target)
//first, check for potential cables nearby to powersink
var/turf/S = loc
attached = locate(/obj/structure/cable) in S
if(attached)
set_AI_busy(TRUE)
if(prob(2))
src.visible_message("<b>\The [src]</b> begins to sink power from the net.")
if(prob(5))
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(5, 0, get_turf(src))
sparks.start()
anchored = TRUE
PN = attached.powernet
PN.draw_power(100000) // previous value 150000
var/apc_drain_rate = 750 //Going to see if grubs are better as a minimal bother. previous value : 4000
for(var/obj/machinery/power/terminal/T in PN.nodes)
if(istype(T.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = T.master
if(A.operating && A.cell)
var/cur_charge = A.cell.charge / CELLRATE
var/drain_val = min(apc_drain_rate, cur_charge)
A.cell.use(drain_val * CELLRATE)
else if(!attached && anchored)
anchored = FALSE
PN = null
27 changes: 27 additions & 0 deletions code/modules/mob/living/simple_mob/feeding.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/mob/living/simple_mob/proc/handle_food(var/obj/item/weapon/reagent_containers/food/snacks/O as obj, var/mob/user as mob)
if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks))
return ..()
if(resting)
to_chat(user, "<span class='notice'>\The [src] is napping, and doesn't respond to \the [O].</span>")
return
if(nutrition >= max_nutrition)
if(user == src)
to_chat(src, "<span class='notice'>You're too full to eat another bite.</span>")
return
to_chat(user, "<span class='notice'>\The [src] seems too full to eat.</span>")
return

if(stat)
return ..()

user.setClickCooldown(user.get_attack_speed(O))
if(O.reagents)
O.reagents.trans_to_mob(src, O.bitesize, CHEM_INGEST)
adjust_nutrition(O.bitesize * 20)
O.bitecount ++
O.On_Consume(src)
if(O)
to_chat(user, "<span class='notice'>\The [src] takes a bite of \the [O].</span>")
if(user != src)
to_chat(src, "<span class='notice'>\The [user] feeds \the [O] to you.</span>")
playsound(src, 'sound/items/eatfood.ogg', 75, 1)
1 change: 1 addition & 0 deletions vorestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3066,6 +3066,7 @@
#include "code\modules\mob\living\simple_mob\combat.dm"
#include "code\modules\mob\living\simple_mob\defense.dm"
#include "code\modules\mob\living\simple_mob\donteatpets_vr.dm"
#include "code\modules\mob\living\simple_mob\feeding.dm"
#include "code\modules\mob\living\simple_mob\hands.dm"
#include "code\modules\mob\living\simple_mob\harvesting.dm"
#include "code\modules\mob\living\simple_mob\life.dm"
Expand Down