mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 06:28:01 +01:00
Electrovore virgo (#18986)
* Refactored and fixed the Electrovore code in compliance with the review and requests for fixes. * Address review feedback for electrovore element and traits * Removed unneeded return Missed this while I was going through unresolved issues - unneeded return has been removed. * Remove redundant check and use spark_effect helper * Switched to spark_effect Should clean up nicely. * Swaps to !isitem Changes from if(!istype(target, /obj/item)) to if(!isitem(target)) as requested. * Spark Spread reinstated Uses the proper, updated code block for spark_spread. * ident * should be fine --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
fbadd5fc2e
commit
afd6ce3aba
@@ -259,6 +259,35 @@
|
||||
..()
|
||||
add_verb(H, /mob/living/carbon/human/proc/bloodsuck)
|
||||
|
||||
/datum/trait/neutral/electrovore
|
||||
name = "Electrovore, Obligate"
|
||||
desc = "Makes you unable to gain nutrition from anything but electricity"
|
||||
tutorial = "HELP intent lets you consume nutrition to charge a Cell by clicking it in your hand.<br>\
|
||||
HARM intent drains battery charge and gives nutrition in exchange"
|
||||
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
excludes = list(/datum/trait/neutral/electrovore_freeform)
|
||||
|
||||
/datum/trait/neutral/electrovore/apply(var/datum/species/S, var/mob/living/carbon/human/human)
|
||||
..()
|
||||
ADD_TRAIT(human, TRAIT_ELECTROVORE, ROUNDSTART_TRAIT)
|
||||
ADD_TRAIT(human, TRAIT_ELECTROVORE_OBLIGATE, ROUNDSTART_TRAIT)
|
||||
|
||||
/datum/trait/neutral/electrovore_freeform
|
||||
name = "Electrovore"
|
||||
desc = "Allows you to drain power cells for nutrition."
|
||||
tutorial = "This trait allows you to consume electricity!<br>\
|
||||
Clicking a power cell in your hand on HARM intent drains its power for nutrition"
|
||||
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
excludes = list(/datum/trait/neutral/electrovore)
|
||||
|
||||
/datum/trait/neutral/electrovore_freeform/apply(var/datum/species/S, var/mob/living/carbon/human/human)
|
||||
..()
|
||||
ADD_TRAIT(human, TRAIT_ELECTROVORE, ROUNDSTART_TRAIT)
|
||||
|
||||
/datum/trait/neutral/succubus_drain
|
||||
name = "Succubus Drain"
|
||||
desc = "Makes you able to gain nutrition from draining prey in your grasp."
|
||||
|
||||
@@ -26,9 +26,11 @@
|
||||
var/charge_amount = 25 // How much power to give, if self_recharge is true. The number is in absolute cell charge, as it gets divided by CELLRATE later.
|
||||
var/last_use = 0 // A tracker for use in self-charging
|
||||
var/connector_type = "standard" //What connector sprite to use when in a cell charger, null if no connectors
|
||||
var/charge_delay = 0 // How long it takes for the cell to start recharging after last use
|
||||
var/charge_delay = 0 // How long it takes for the cell to start recharging after last use
|
||||
var/robot_durability = 50
|
||||
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 50)
|
||||
|
||||
drop_sound = 'sound/items/drop/component.ogg'
|
||||
pickup_sound = 'sound/items/pickup/component.ogg'
|
||||
|
||||
@@ -38,6 +40,7 @@
|
||||
|
||||
/obj/item/cell/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/electrovoreable)
|
||||
c_uid = cell_uid++
|
||||
update_icon()
|
||||
if(self_recharge)
|
||||
|
||||
Reference in New Issue
Block a user