From 3042f9df696af3d7cc1938811f4405d3c64ec18d Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:06:52 -0700 Subject: [PATCH 1/7] i am literally hand-writing these on my phone from my computer because of my lack of internet --- code/__DEFINES/movespeed_modification.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/__DEFINES/movespeed_modification.dm b/code/__DEFINES/movespeed_modification.dm index d224c0f1..0fadae6d 100644 --- a/code/__DEFINES/movespeed_modification.dm +++ b/code/__DEFINES/movespeed_modification.dm @@ -37,5 +37,7 @@ #define MOVESPEED_ID_PRONE_DRAGGING "PRONE_DRAG" #define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY" +#define MOVESPEED_ID_SILICON_VTEC "SILICON_VTEC" + #define MOVESPEED_ID_SHRUNK "SHRINK_SPEED_MODIFIER" #define MOVESPEED_ID_GROW "GROWTH_SPEED_MODIFIER" From a297b6f05c4964bed67e08bb3cf52f7b6591fcbd Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:14:50 -0700 Subject: [PATCH 2/7] 2 --- code/game/objects/items/robot/robot_upgrades.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 7fcd7eff..4af282f7 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -74,19 +74,24 @@ /obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R, user = usr) . = ..() if(.) - if(R.speed < 0) + if(R.speed["enabled"]) to_chat(R, "A VTEC unit is already installed!") to_chat(user, "There's no room for another VTEC unit!") return FALSE //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) + //Citadel change - makes vtecs give an ability rather than reducing the borg's speed instantly + //Hyper change - Also adds an emag option and makes the upgrade take up charge + var/obj/effect/proc_holder/silicon/cyborg/vtecControl/vtec = new + R.speed["enabled"] = TRUE + R.speed["ref"] = vtec + R.speed["timer"] = addtimer(CALLBACK(vtec, /obj/effect/proc_holder/silicon/cyborg/vtecControl/proc/useCharge, R), 50, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_LOOP) + R.AddAbility (R.speed["ref"]) /obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) - R.speed = initial(R.speed) + R.removeVTecStats() /obj/item/borg/upgrade/disablercooler name = "cyborg rapid disabler cooling module" @@ -581,14 +586,12 @@ R.SetLockdown(0) R.anchored = FALSE R.notransform = FALSE - R.resize = 2 R.hasExpanded = TRUE R.update_transform() /obj/item/borg/upgrade/expand/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) - R.resize = 0.5 R.hasExpanded = FALSE R.update_transform() From 5d2afad223b8c012e92e530badef0f407ecce665 Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:21:42 -0700 Subject: [PATCH 3/7] 3 --- .../modules/mob/living/silicon/robot/robot.dm | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index f9cb5102..2e5ef04e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -53,7 +53,7 @@ var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list()) - var/speed = 0 // VTEC speed boost. + var/speed = list("enabled"=FALSE, "timer"=null, "ref"=null) // VTEC variables var/magpulse = FALSE // Magboot-like effect. var/ionpulse = FALSE // Jetpack-like effect. var/ionpulse_on = FALSE // Jetpack-like effect. @@ -1041,11 +1041,6 @@ shown_robot_modules = FALSE if(hud_used) hud_used.update_robot_modules_display() - - if (hasExpanded) - resize = 0.5 - hasExpanded = FALSE - update_transform() module.transform_to(/obj/item/robot_module) // Remove upgrades. @@ -1055,7 +1050,7 @@ upgrades.Cut() - speed = 0 + removeVTecStats() ionpulse = FALSE revert_shell() @@ -1087,6 +1082,13 @@ magpulse = module.magpulsing updatename() +/mob/living/silicon/robot/update_transform() + . = ..() + var/matrix/ntransform = matriz(transform) + if (hasExpanded) + ntransform.Scale(2) //This seems a bit big + ntransform.Translate(0, 16) + transform = ntransform /mob/living/silicon/robot/proc/place_on_head(obj/item/new_hat) if(hat) @@ -1242,3 +1244,14 @@ connected_ai.aicamera.stored[i] = TRUE for(var/i in connected_ai.aicamera.stored) aicamera.stored[i] = TRUE + +/mob/living/silicon/robot/proc/removeVTecStats() + if (speed["enabled"]) + speed["enabled"] = false + deltimer(speed["timer"]) + RemoveAbility (speed["ref"]) + speed["ref"] = null + remove_movespeed_modifier(MOVESPEED_ID_SILICON_VTEC) + update_transform() + return TRUE + return FALSE From 274f49531f63457a781e0c6bd661cc96317c926f Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:22:38 -0700 Subject: [PATCH 4/7] 4 --- code/modules/mob/living/silicon/robot/robot_modules.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index abf6bfc9..25d9e911 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -235,6 +235,7 @@ R.notify_ai(NEW_MODULE) if(R.hud_used) R.hud_used.update_robot_modules_display() + R.update_transform() SSblackbox.record_feedback("tally", "cyborg_modules", 1, R.module) /* //Broken From f9488ea6604a4c63f4f40af0fadbda7be3320cb1 Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:23:38 -0700 Subject: [PATCH 5/7] 5 --- code/modules/mob/living/silicon/silicon.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 1a0d9f8a..15b7fde0 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -389,7 +389,7 @@ /mob/living/silicon/proc/GetPhoto(mob/user) if (aicamera) return aicamera.selectpicture(user) - +/* /mob/living/silicon/update_transform() var/matrix/ntransform = matrix(transform) //aka transform.Copy() var/changed = 0 @@ -401,6 +401,7 @@ if(changed) animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT) return ..() +*/ /mob/living/silicon/is_literate() return 1 From f976eee3df64e4604d4084585ddf0980914c2dec Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 14:39:12 -0700 Subject: [PATCH 6/7] 6 (?) --- .../objects/items/robot/robot_upgrades.dm | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm b/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm index 5f65b971..01a6782a 100644 --- a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm +++ b/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm @@ -6,24 +6,51 @@ action_icon_state = "Chevron_State_0" var/currentState = 0 - var/maxReduction = 2 + var/iteration = FALSE -/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) - var/mob/living/silicon/robot/self = usr - +/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user = usr) currentState = (currentState + 1) % 3 if(usr) + if (!user.cell) //If we run out of power, make the module not work. + to_chat(user, "You cannot cycle through your VTEC upgrade while you don't have power!") + currentState = 0 + if (user.cell) if (user.cell.charge <= 200) + to_chat(user, "You cannot cycle through your VTEC upgrade while you don't have power!") + currentState = 0 + user.cell.charge = 0 + switch(currentState) if (0) - self.speed = maxReduction + user.add_movespeed_modifier(MOVESPEED_ID_SILICON_VTEC, override=TRUE, multiplicative_slowdown = (user.emagged*1.5)) if (1) - self.speed -= maxReduction*0.5 + user.add_movespeed_modifier(MOVESPEED_ID_SILICON_VTEC, override=TRUE, multiplicative_slowdown = -0.15*((user.emagged/2)+1)) if (2) - self.speed -= maxReduction*1.25 + user.add_movespeed_modifier(MOVESPEED_ID_SILICON_VTEC, override=TRUE, multiplicative_slowdown = -0.325*((user.emagged/2)+1)) action.button_icon_state = "Chevron_State_[currentState]" action.UpdateButtonIcon() return + +/obj/effect/proc_holder/silicon/cyborg/vtecControl/proc/useCharge(mob/living/silicon/robot/user) + if (!user) return + if (user.emagged && currentState && prob(20) && user.cell && user.cell.charge > 200) + currentState = 2 //Sets to 0 after Click() is called + Click(user) + if (!iteration) + to_chat(user, "Your VTEC upgrade malfunctions!") + iteration = !iteration //So we don't spam the player with warnings + + if (user.cell) + if (user.cell.charge <= 200) + user.add_movespeed_modifier(MOVESPEED_ID_SILICON_VTEC, override=TRUE, multiplicative_slowdown = (user.emagged*1.5)) + user.cell.charge = 0 + action.button_icon_state = "Chevron_State_0" + action.UpdateButtonIcon() + return + user.cell.charge -= round(15*(rand((currentState*2)+user.emagged, (currentState*2)+(1.1*(user.emagged+1)))))//rand(5.0, 6.2) + return + action.button_icon_state = "Chevron_State_0" + action.UpdateButtonIcon() From 536d0db11923eca0e07e0d2fd9ffad0b56cd4431 Mon Sep 17 00:00:00 2001 From: DragonTrance Date: Sun, 22 Nov 2020 17:36:35 -0700 Subject: [PATCH 7/7] stupid mobile fat fingered --- code/modules/mob/living/silicon/robot/robot.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 2e5ef04e..7e9b45dc 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1084,7 +1084,7 @@ /mob/living/silicon/robot/update_transform() . = ..() - var/matrix/ntransform = matriz(transform) + var/matrix/ntransform = matrix(transform) if (hasExpanded) ntransform.Scale(2) //This seems a bit big ntransform.Translate(0, 16)