readds V-tech control, modularized properly
This commit is contained in:
@@ -79,7 +79,9 @@
|
||||
to_chat(user, "<span class='notice'>There's no room for another VTEC unit!</span>")
|
||||
return FALSE
|
||||
|
||||
R.speed = -2 // Gotta go fast.
|
||||
//R.speed = -2 // Gotta go fast.
|
||||
//Citadel change - makes vtecs give an ability rather than reducing the borg's speed instantly
|
||||
R.AddAbility(new/obj/effect/proc_holder/silicon/cyborg/vtecControl)
|
||||
|
||||
/obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//V-tech kicked in yo
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl
|
||||
name = "vTec Control"
|
||||
desc = "Allows finer-grained control of the vTec speed boost."
|
||||
action_icon = 'icons/mob/actions.dmi'
|
||||
action_icon_state = "Chevron_State_0"
|
||||
|
||||
var/currentState = 0
|
||||
var/maxReduction = 2
|
||||
|
||||
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user)
|
||||
|
||||
var/mob/living/silicon/robot/self = usr
|
||||
|
||||
currentState = (currentState + 1) % 3
|
||||
|
||||
if(usr)
|
||||
switch(currentState)
|
||||
if (0)
|
||||
self.speed += maxReduction
|
||||
if (1)
|
||||
self.speed -= maxReduction*0.5
|
||||
if (2)
|
||||
self.speed -= maxReduction*0.5
|
||||
|
||||
action.button_icon_state = "Chevron_State_[currentState]"
|
||||
action.UpdateButtonIcon()
|
||||
|
||||
return
|
||||
@@ -2821,6 +2821,7 @@
|
||||
#include "modular_citadel\code\game\objects\items\melee\energy.dm"
|
||||
#include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm"
|
||||
#include "modular_citadel\code\game\objects\items\melee\transforming.dm"
|
||||
#include "modular_citadel\code\game\objects\items\robot\robot_upgrades.dm"
|
||||
#include "modular_citadel\code\game\objects\items\storage\firstaid.dm"
|
||||
#include "modular_citadel\code\game\objects\structures\tables_racks.dm"
|
||||
#include "modular_citadel\code\game\objects\structures\beds_chairs\chair.dm"
|
||||
|
||||
Reference in New Issue
Block a user