mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #4987 from Fox-McCloud/cyborg-tweaks
Cyborg Upgrade Additions and Refactor
This commit is contained in:
@@ -21,6 +21,7 @@ var/list/robot_verbs_default = list(
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
var/obj/screen/lamp_button = null
|
||||
var/obj/screen/thruster_button = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
@@ -57,8 +58,6 @@ var/list/robot_verbs_default = list(
|
||||
var/viewalerts = 0
|
||||
var/modtype = "Default"
|
||||
var/lower_mod = 0
|
||||
var/jetpack = 0
|
||||
var/datum/effect/system/ion_trail_follow/ion_trail = null
|
||||
var/datum/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N
|
||||
var/jeton = 0
|
||||
var/low_power_mode = 0 //whether the robot has no charge left.
|
||||
@@ -81,8 +80,10 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD,NATIONS_HUD)
|
||||
|
||||
var/jetpackoverlay = 0
|
||||
var/magpulse = 0
|
||||
var/ionpulse = 0 // Jetpack-like effect.
|
||||
var/ionpulse_on = 0 // Jetpack-like effect.
|
||||
var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect.
|
||||
|
||||
var/obj/item/borg/sight/hud/sec/sechud = null
|
||||
var/obj/item/borg/sight/hud/med/healthhud = null
|
||||
@@ -464,6 +465,35 @@ var/list/robot_verbs_default = list(
|
||||
src.verbs -= robot_verbs_default
|
||||
src.verbs -= silicon_subsystems
|
||||
|
||||
/mob/living/silicon/robot/proc/ionpulse()
|
||||
if(!ionpulse_on)
|
||||
return
|
||||
|
||||
if(cell.charge <= 50)
|
||||
toggle_ionpulse()
|
||||
return
|
||||
|
||||
cell.charge -= 50 // 500 steps on a default cell.
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/toggle_ionpulse()
|
||||
if(!ionpulse)
|
||||
to_chat(src, "<span class='notice'>No thrusters are installed!</span>")
|
||||
return
|
||||
|
||||
if(!ion_trail)
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
|
||||
ionpulse_on = !ionpulse_on
|
||||
to_chat(src, "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>")
|
||||
if(ionpulse_on)
|
||||
ion_trail.start()
|
||||
else
|
||||
ion_trail.stop()
|
||||
if(thruster_button)
|
||||
thruster_button.icon_state = "ionpulse[ionpulse_on]"
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if(stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
@@ -488,23 +518,6 @@ var/list/robot_verbs_default = list(
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
return 0
|
||||
|
||||
|
||||
// this function displays jetpack pressure in the stat panel
|
||||
/mob/living/silicon/robot/proc/show_jetpack_pressure()
|
||||
// if you have a jetpack, show the internal tank pressure
|
||||
var/obj/item/weapon/tank/jetpack/current_jetpack = installed_jetpack()
|
||||
if(current_jetpack)
|
||||
stat("Internal Atmosphere Info", current_jetpack.name)
|
||||
stat("Tank Pressure", current_jetpack.air_contents.return_pressure())
|
||||
|
||||
|
||||
// this function returns the robots jetpack, if one is installed
|
||||
/mob/living/silicon/robot/proc/installed_jetpack()
|
||||
if(module)
|
||||
return (locate(/obj/item/weapon/tank/jetpack) in module.modules)
|
||||
return 0
|
||||
|
||||
|
||||
// this function displays the cyborgs current cell charge in the stat panel
|
||||
/mob/living/silicon/robot/proc/show_cell_power()
|
||||
if(cell)
|
||||
@@ -519,7 +532,6 @@ var/list/robot_verbs_default = list(
|
||||
statpanel("Status")
|
||||
if(client.statpanel == "Status")
|
||||
show_cell_power()
|
||||
show_jetpack_pressure()
|
||||
|
||||
/mob/living/silicon/robot/restrained()
|
||||
return 0
|
||||
@@ -1022,9 +1034,6 @@ var/list/robot_verbs_default = list(
|
||||
for(var/obj/item/borg/combat/shield/S in module.modules)
|
||||
if(activated(S))
|
||||
overlays += "[base_icon]-shield"
|
||||
|
||||
if(jetpackoverlay)
|
||||
overlays += "minerjetpack-[icon_state]"
|
||||
update_fire()
|
||||
|
||||
/mob/living/silicon/robot/proc/installed_modules()
|
||||
@@ -1343,6 +1352,7 @@ var/list/robot_verbs_default = list(
|
||||
faction = list("nanotrasen")
|
||||
designation = "Nanotrasen Combat"
|
||||
req_access = list(access_cent_specops)
|
||||
ionpulse = 1
|
||||
var/searching_for_ckey = 0
|
||||
|
||||
/mob/living/silicon/robot/deathsquad/New(loc)
|
||||
@@ -1390,6 +1400,7 @@ var/list/robot_verbs_default = list(
|
||||
designation = "Syndicate Assault"
|
||||
modtype = "Syndicate"
|
||||
req_access = list(access_syndicate)
|
||||
ionpulse = 1
|
||||
lawchannel = "State"
|
||||
var/playstyle_string = "<span class='userdanger'>You are a Syndicate assault cyborg!</span><br>\
|
||||
<b>You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
var/list/modules = list()
|
||||
var/obj/item/emag = null
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
var/list/subsystems = list()
|
||||
|
||||
var/module_type = "NoMod" // For icon usage
|
||||
@@ -39,8 +38,6 @@
|
||||
modules.Cut()
|
||||
qdel(emag)
|
||||
emag = null
|
||||
qdel(jetpack)
|
||||
jetpack = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/robot_module/proc/fix_modules()
|
||||
@@ -316,16 +313,18 @@
|
||||
module_type = "Miner"
|
||||
|
||||
/obj/item/weapon/robot_module/miner/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/ore/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/drill/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
modules += new /obj/item/device/flash/cyborg(src)
|
||||
modules += new /obj/item/borg/sight/meson(src)
|
||||
modules += new /obj/item/weapon/storage/bag/ore/cyborg(src)
|
||||
modules += new /obj/item/weapon/pickaxe/drill/cyborg(src)
|
||||
modules += new /obj/item/weapon/shovel(src)
|
||||
modules += new /obj/item/weapon/weldingtool/mini(src)
|
||||
modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
|
||||
modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
modules += new /obj/item/device/gps/cyborg(src)
|
||||
emag = new /obj/item/borg/stun(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
@@ -338,7 +337,6 @@
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/pulse/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.emag = null
|
||||
|
||||
@@ -354,7 +352,6 @@
|
||||
src.modules += new /obj/item/weapon/gun/energy/printer(src)
|
||||
src.modules += new /obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/card/emag(src)
|
||||
src.modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/pinpointer/operative(src)
|
||||
src.emag = null
|
||||
@@ -393,7 +390,6 @@
|
||||
src.modules += new /obj/item/weapon/surgicaldrill(src)
|
||||
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg/saw(src) //Energy saw -- primary weapon
|
||||
src.modules += new /obj/item/weapon/card/emag(src)
|
||||
src.modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/pinpointer/operative(src)
|
||||
src.emag = null
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/mob/living/silicon/robot/Process_Spacemove(var/movement_dir = 0)
|
||||
if(module)
|
||||
for(var/obj/item/weapon/tank/jetpack/J in module.modules)
|
||||
if(J && istype(J, /obj/item/weapon/tank/jetpack))
|
||||
if(J.allow_thrust(0.01)) return 1
|
||||
if(..()) return 1
|
||||
if(ionpulse())
|
||||
return 1
|
||||
if(..())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//No longer needed, but I'll leave it here incase we plan to re-use it.
|
||||
|
||||
Reference in New Issue
Block a user