mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Merge pull request #15360 from neersighted/ionsomething
Remove borg jetpack, give them ion thrusters instead
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:16, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:16, SOUTH:5" //borgies
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5"//borgies
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
|
||||
@@ -36,14 +36,13 @@
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
|
||||
/obj/screen/robot/radio
|
||||
name = "radio"
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio_menu()
|
||||
R.radio.interact(R)
|
||||
|
||||
/obj/screen/robot/store
|
||||
name = "store"
|
||||
@@ -61,9 +60,17 @@
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
/obj/screen/robot/thrusters
|
||||
name = "ion thrusters"
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
//Radio
|
||||
@@ -72,9 +79,6 @@
|
||||
static_inventory += using
|
||||
|
||||
//Module select
|
||||
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
|
||||
using = new /obj/screen/robot/module1()
|
||||
using.screen_loc = ui_inv1
|
||||
static_inventory += using
|
||||
@@ -93,7 +97,6 @@
|
||||
//End of module select
|
||||
|
||||
//Photography stuff
|
||||
|
||||
using = new /obj/screen/ai/image_take()
|
||||
using.screen_loc = ui_borg_camera
|
||||
static_inventory += using
|
||||
@@ -113,6 +116,12 @@
|
||||
static_inventory += using
|
||||
mymobR.lamp_button = using
|
||||
|
||||
//Thrusters
|
||||
using = new /obj/screen/robot/thrusters()
|
||||
using.screen_loc = ui_borg_thrusters
|
||||
static_inventory += using
|
||||
mymobR.thruster_button = using
|
||||
|
||||
//Intent
|
||||
using = new /obj/screen/act_intent/robot()
|
||||
using.icon_state = mymob.a_intent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// robot_upgrades.dm
|
||||
// robot_upgrades.dm
|
||||
// Contains various borg upgrades.
|
||||
|
||||
/obj/item/borg/upgrade
|
||||
@@ -8,8 +8,8 @@
|
||||
icon_state = "cyborg_upgrade"
|
||||
origin_tech = "programming=4"
|
||||
var/locked = 0
|
||||
var/require_module = 0
|
||||
var/installed = 0
|
||||
var/require_module = 0
|
||||
var/module_type = null
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
|
||||
@@ -20,7 +20,6 @@
|
||||
R << "Upgrade mounting error! No suitable hardpoint detected!"
|
||||
usr << "There's no mounting point for the module!"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "cyborg module reset board"
|
||||
@@ -29,24 +28,32 @@
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
|
||||
R.notify_ai(2)
|
||||
|
||||
R.uneq_all()
|
||||
R.hands.icon_state = "nomod"
|
||||
R.icon_state = "robot"
|
||||
qdel(R.module)
|
||||
R.module = null
|
||||
|
||||
R.modtype = "robot"
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.designation = "Default"
|
||||
R.notify_ai(2)
|
||||
R.updatename("Default")
|
||||
|
||||
R.update_icons()
|
||||
R.update_headlamp()
|
||||
R.magpulse = 0
|
||||
|
||||
R.speed = 0 // Remove upgrades.
|
||||
R.ionpulse = FALSE
|
||||
R.magpulse = FALSE
|
||||
|
||||
R.status_flags |= CANPUSH
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
name = "cyborg reclassification board"
|
||||
desc = "Used to rename a cyborg."
|
||||
@@ -57,12 +64,10 @@
|
||||
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.real_name = heldname
|
||||
R.camera.c_tag = heldname
|
||||
R.custom_name = heldname //Required or else if the cyborg's module changes, their name is lost.
|
||||
if(..())
|
||||
return
|
||||
|
||||
R.fully_replace_character_name(R.name, heldname)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -82,17 +87,18 @@
|
||||
if(ghost.mind && ghost.mind.current == R)
|
||||
R.key = ghost.key
|
||||
|
||||
R.notify_ai(1)
|
||||
|
||||
R.stat = UNCONSCIOUS
|
||||
R.update_stat()
|
||||
if(R.camera && !R.wires.is_cut(WIRE_CAMERA))
|
||||
R.camera.toggle_cam(R,0)
|
||||
|
||||
dead_mob_list -= R //please never forget this ever kthx
|
||||
living_mob_list += R
|
||||
R.notify_ai(1)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "cyborg VTEC module"
|
||||
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
|
||||
@@ -101,15 +107,17 @@
|
||||
origin_tech = "engineering=4;materials=5"
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
if(R.speed < 0)
|
||||
R << "<span class='notice'>A VTEC unit is already installed!</span>"
|
||||
usr << "<span class='notice'>There's no room for another VTEC unit!</span>"
|
||||
return
|
||||
|
||||
if(R.speed == -1)
|
||||
return 0
|
||||
R.speed = -2 // Gotta go fast.
|
||||
|
||||
R.speed--
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler
|
||||
name = "cyborg rapid disabler cooling module"
|
||||
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
|
||||
@@ -119,47 +127,39 @@
|
||||
origin_tech = "engineering=4;powerstorage=4"
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
|
||||
if(!T)
|
||||
T = locate() in R.module.contents
|
||||
if(!T)
|
||||
T = locate() in R.module.modules
|
||||
if(!T)
|
||||
usr << "This cyborg has had its disabler removed!"
|
||||
return 0
|
||||
|
||||
usr << "<span class='notice'>There's no disabler in this unit!</span>"
|
||||
return
|
||||
if(T.charge_delay <= 2)
|
||||
R << "Maximum cooling achieved for this hardpoint!"
|
||||
usr << "There's no room for another cooling unit!"
|
||||
return 0
|
||||
R << "<span class='notice'>A cooling unit is already installed!</span>"
|
||||
usr << "<span class='notice'>There's no room for another cooling unit!</span>"
|
||||
return
|
||||
|
||||
else
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/jetpack
|
||||
name = "mining cyborg jetpack"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
|
||||
/obj/item/borg/upgrade/thrusters
|
||||
name = "ion thruster upgrade"
|
||||
desc = "A energy-operated thruster system for cyborgs."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
origin_tech = "engineering=4;powerstorage=4"
|
||||
|
||||
/obj/item/borg/upgrade/jetpack/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide(R.module)
|
||||
for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
|
||||
R.internal = src
|
||||
R.jetpackoverlay = 1
|
||||
R.module.rebuild()
|
||||
if(R.ionpulse)
|
||||
usr << "<span class='notice'>This unit already has ion thrusters installed!</span>"
|
||||
return
|
||||
|
||||
R.ionpulse = TRUE
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/ddrill
|
||||
name = "mining cyborg diamond drill"
|
||||
desc = "A diamond drill replacement for the mining module's standard drill."
|
||||
@@ -169,16 +169,18 @@
|
||||
origin_tech = "engineering=5;materials=5"
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module.modules)
|
||||
qdel(D)
|
||||
for(var/obj/item/weapon/shovel/S in R.module.modules)
|
||||
qdel(S)
|
||||
|
||||
R.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/soh
|
||||
name = "mining cyborg satchel of holding"
|
||||
@@ -189,14 +191,16 @@
|
||||
origin_tech = "engineering=5;materials=5;bluespace=3"
|
||||
|
||||
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module.modules)
|
||||
qdel(S)
|
||||
|
||||
R.module.modules += new /obj/item/weapon/storage/bag/ore/holding(R.module)
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
@@ -206,12 +210,14 @@
|
||||
origin_tech = "combat=4;syndicate=2"
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(R.emagged == 1)
|
||||
return 0
|
||||
if(R.emagged)
|
||||
return
|
||||
|
||||
R.SetEmagged(1)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
@@ -228,14 +234,17 @@
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return 0
|
||||
return
|
||||
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
usr << "<span class='warning'>This unit is already equipped with a self-repair module.</span>"
|
||||
return 0
|
||||
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
action_button_name = "Toggle Self-Repair"
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
@@ -256,7 +265,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
|
||||
SSobj.processing -= src
|
||||
on = 0
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
@@ -264,8 +273,8 @@
|
||||
repair_tick = 1
|
||||
return
|
||||
|
||||
if( cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(cyborg.cell.charge < powercost*2)
|
||||
if(cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(cyborg.cell.charge < powercost * 2)
|
||||
cyborg << "<span class='warning'>Self-repair module deactivated. Please recharge.</span>"
|
||||
deactivate()
|
||||
return
|
||||
@@ -285,7 +294,7 @@
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if( (world.time - 2000) > msg_cooldown )
|
||||
if((world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
w_class = 4
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
var/gas_type = "o2"
|
||||
var/on = 0
|
||||
var/stabilization_on = 0
|
||||
var/on = FALSE
|
||||
var/turbo = FALSE
|
||||
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
@@ -63,16 +63,16 @@
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
if(!on && !stabilization_on)
|
||||
if(!on)
|
||||
turn_on()
|
||||
user << "<span class='notice'>You turn the thrusters on.</span>"
|
||||
else if(on && !stabilization_on)
|
||||
stabilization_on = TRUE
|
||||
user << "<span class='notice'>You turn the stabilizers on.</span>"
|
||||
else if(on && stabilization_on)
|
||||
else if(!turbo)
|
||||
turbo = TRUE
|
||||
user << "<span class='notice'>You engage turbo mode.</span>"
|
||||
else
|
||||
turn_off()
|
||||
stabilization_on = FALSE
|
||||
user << "<span class='notice'>You turn the thrusters and stabilizers off.</span>"
|
||||
turbo = FALSE
|
||||
user << "<span class='notice'>You turn jetpack off.</span>"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_on()
|
||||
on = TRUE
|
||||
|
||||
@@ -1,39 +1,32 @@
|
||||
/mob/living/carbon/human/movement_delay()
|
||||
|
||||
. += dna.species.movement_delay(src)
|
||||
|
||||
. += ..()
|
||||
. += config.human_delay
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
if(..())
|
||||
return 1
|
||||
if(!isturf(loc)) // In a mecha? A locker? Who knows!
|
||||
return 0
|
||||
|
||||
//Do we have a working jetpack
|
||||
if(istype(back, /obj/item/weapon/tank/jetpack) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if((movement_dir || J.stabilization_on) && J.allow_thrust(0.01, src))
|
||||
return 1
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
|
||||
// Do we have a jetpack (and is it on)?
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if(!istype(J))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
if(C.jetpack)
|
||||
if((movement_dir || C.jetpack.stabilization_on) && C.jetpack.allow_thrust(0.01, src))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
J = C.jetpack
|
||||
if(istype(J) && J.allow_thrust(0.01, src))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/slip(s_amount, w_amount, obj/O, lube)
|
||||
if(isobj(shoes) && (shoes.flags&NOSLIP) && !(lube&GALOSHES_DONT_HELP))
|
||||
return 0
|
||||
.=..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/experience_pressure_difference()
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, 1)
|
||||
if(shoes && shoes.flags&NOSLIP)
|
||||
return 0
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/mob_has_gravity()
|
||||
. = ..()
|
||||
|
||||
@@ -749,61 +749,47 @@
|
||||
/datum/species/proc/movement_delay(mob/living/carbon/human/H)
|
||||
. = 0
|
||||
|
||||
if(H.status_flags & GOTTAGOFAST)
|
||||
. -= 1
|
||||
if(H.status_flags & GOTTAGOREALLYFAST)
|
||||
. -= 2
|
||||
|
||||
if(!(H.status_flags & IGNORESLOWDOWN))
|
||||
|
||||
var/grav = has_gravity(H)
|
||||
var/hasjetpack = 0
|
||||
if(!grav)
|
||||
var/obj/item/weapon/tank/jetpack/J
|
||||
var/obj/item/weapon/tank/jetpack/P
|
||||
|
||||
if(istype(H.back, /obj/item/weapon/tank/jetpack))
|
||||
J = H.back
|
||||
if(istype(H.wear_suit,/obj/item/clothing/suit/space/hardsuit)) //copypasta but faster implementation currently
|
||||
if(!has_gravity(H))
|
||||
// If there's no gravity we have the option of sanic speed.
|
||||
var/obj/item/weapon/tank/jetpack/J = H.back
|
||||
if(!istype(J))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
|
||||
P = C.jetpack
|
||||
if(J)
|
||||
if(J.allow_thrust(0.01, H))
|
||||
hasjetpack = 1
|
||||
else if(P)
|
||||
if(P.allow_thrust(0.01, H))
|
||||
hasjetpack = 1
|
||||
J = C.jetpack
|
||||
|
||||
. = -1 - hasjetpack
|
||||
if(istype(J) && J.turbo && J.allow_thrust(0.01, H))
|
||||
return -2 // Turbo mode. Gotta go fast.
|
||||
|
||||
if(grav || !hasjetpack)
|
||||
var/health_deficiency = (100 - H.health + H.staminaloss)
|
||||
if(health_deficiency >= 40)
|
||||
. += (health_deficiency / 25)
|
||||
var/health_deficiency = (100 - H.health + H.staminaloss)
|
||||
if(health_deficiency >= 40)
|
||||
. += (health_deficiency / 25)
|
||||
|
||||
var/hungry = (500 - H.nutrition) / 5 //So overeat would be 100 and default level would be 80
|
||||
if(hungry >= 70)
|
||||
. += hungry / 50
|
||||
var/hungry = (500 - H.nutrition) / 5 // So overeat would be 100 and default level would be 80
|
||||
if(hungry >= 70)
|
||||
. += hungry / 50
|
||||
|
||||
if(H.wear_suit)
|
||||
. += H.wear_suit.slowdown
|
||||
if(H.shoes)
|
||||
. += H.shoes.slowdown
|
||||
if(H.back)
|
||||
. += H.back.slowdown
|
||||
if(H.l_hand && (H.l_hand.flags & HANDSLOW))
|
||||
. += H.l_hand.slowdown
|
||||
if(H.r_hand && (H.r_hand.flags & HANDSLOW))
|
||||
. += H.r_hand.slowdown
|
||||
if(H.wear_suit)
|
||||
. += H.wear_suit.slowdown
|
||||
if(H.shoes)
|
||||
. += H.shoes.slowdown
|
||||
if(H.back)
|
||||
. += H.back.slowdown
|
||||
if(H.l_hand && (H.l_hand.flags & HANDSLOW))
|
||||
. += H.l_hand.slowdown
|
||||
if(H.r_hand && (H.r_hand.flags & HANDSLOW))
|
||||
. += H.r_hand.slowdown
|
||||
|
||||
if((H.disabilities & FAT))
|
||||
. += 1.5
|
||||
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
. += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR
|
||||
if((H.disabilities & FAT))
|
||||
. += 1.5
|
||||
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
. += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR
|
||||
|
||||
. += speedmod
|
||||
|
||||
if(grav)
|
||||
if(H.status_flags & GOTTAGOFAST)
|
||||
. -= 1
|
||||
|
||||
if(H.status_flags & GOTTAGOREALLYFAST)
|
||||
. -= 2
|
||||
. += speedmod
|
||||
|
||||
//////////////////
|
||||
// ATTACK PROCS //
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
/mob/living/silicon/robot/handle_regular_hud_updates()
|
||||
|
||||
if(!client)
|
||||
return
|
||||
|
||||
update_cell_hud_icon()
|
||||
|
||||
if (syndicate)
|
||||
if(syndicate)
|
||||
if(ticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in ticker.mode.traitors)
|
||||
if(tra.current)
|
||||
|
||||
@@ -8,11 +8,14 @@
|
||||
macro_default = "robot-default"
|
||||
macro_hotkeys = "robot-hotkeys"
|
||||
bubble_icon = "robot"
|
||||
var/sight_mode = 0
|
||||
var/custom_name = ""
|
||||
designation = "Default" //used for displaying the prefix & getting the current module of cyborg
|
||||
has_limbs = 1
|
||||
var/magpulse = 0
|
||||
|
||||
var/custom_name = ""
|
||||
var/braintype = "Cyborg"
|
||||
var/modtype = "robot"
|
||||
var/obj/item/robot_parts/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
|
||||
var/obj/item/device/mmi/mmi = null
|
||||
|
||||
//Hud stuff
|
||||
|
||||
@@ -20,6 +23,7 @@
|
||||
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
|
||||
@@ -35,40 +39,39 @@
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
|
||||
var/obj/item/device/mmi/mmi = null
|
||||
|
||||
var/opened = 0
|
||||
var/emagged = 0
|
||||
var/emag_cooldown = 0
|
||||
var/wiresexposed = 0
|
||||
|
||||
var/ident = 0
|
||||
var/locked = 1
|
||||
var/list/req_access = list(access_robotics)
|
||||
var/ident = 0
|
||||
//var/list/laws = list()
|
||||
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
|
||||
var/viewalerts = 0
|
||||
var/modtype = "robot"
|
||||
var/jetpack = 0
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail = null
|
||||
var/datum/effect_system/spark_spread/spark_system//So they can initialize sparks whenever/N
|
||||
var/jeton = 0
|
||||
|
||||
var/speed = 0 // VTEC speed boost.
|
||||
var/magpulse = FALSE // Magboot-like effect.
|
||||
var/ionpulse = FALSE // Jetpack-like effect.
|
||||
var/ionpulse_on = FALSE // Jetpack-like effect.
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect.
|
||||
|
||||
var/low_power_mode = 0 //whether the robot has no charge left.
|
||||
var/datum/effect_system/spark_spread/spark_system // So they can initialize sparks whenever/N
|
||||
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/lockcharge //Boolean of whether the borg is locked down or not
|
||||
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
var/lockcharge //Boolean of whether the borg is locked down or not
|
||||
|
||||
var/obj/item/weapon/tank/internal = null //Hatred. Used if a borg has a jetpack.
|
||||
var/obj/item/robot_parts/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
|
||||
var/toner = 0
|
||||
var/tonermax = 40
|
||||
var/jetpackoverlay = 0
|
||||
var/braintype = "Cyborg"
|
||||
|
||||
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
|
||||
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
|
||||
var/lamp_recharging = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
|
||||
|
||||
var/sight_mode = 0
|
||||
var/updating = 0 //portable camera camerachunk update
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD)
|
||||
|
||||
@@ -159,11 +162,15 @@
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
if(module)
|
||||
return
|
||||
|
||||
designation = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security")
|
||||
var/animation_length=0
|
||||
var/animation_length = 0
|
||||
|
||||
if(module)
|
||||
return
|
||||
|
||||
updatename()
|
||||
|
||||
switch(designation)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
@@ -239,9 +246,11 @@
|
||||
feedback_inc("cyborg_janitor",1)
|
||||
|
||||
transform_animation(animation_length)
|
||||
|
||||
notify_ai(2)
|
||||
update_icons()
|
||||
update_headlamp()
|
||||
|
||||
SetEmagged(emagged) // Update emag status and give/take emag modules.
|
||||
|
||||
/mob/living/silicon/robot/proc/transform_animation(animation_length)
|
||||
@@ -256,7 +265,6 @@
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
|
||||
/mob/living/silicon/robot/proc/updatename()
|
||||
|
||||
var/changed_name = ""
|
||||
if(custom_name)
|
||||
changed_name = custom_name
|
||||
@@ -267,7 +275,6 @@
|
||||
if(camera)
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
|
||||
|
||||
/mob/living/silicon/robot/verb/cmd_robot_alerts()
|
||||
set category = "Robot Commands"
|
||||
set name = "Show Alerts"
|
||||
@@ -286,7 +293,6 @@
|
||||
set hidden = 1
|
||||
uneq_active()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/robot_alerts()
|
||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += "<A HREF='?src=\ref[src];mach_close=robotalerts'>Close</A><BR><BR>"
|
||||
@@ -310,6 +316,35 @@
|
||||
viewalerts = 1
|
||||
src << browse(dat, "window=robotalerts&can_close=0")
|
||||
|
||||
/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)
|
||||
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
|
||||
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)
|
||||
@@ -330,10 +365,6 @@
|
||||
|
||||
stat("Station Time:", worldtime2text())
|
||||
if(module)
|
||||
internal = locate(/obj/item/weapon/tank/jetpack) in module.modules
|
||||
if(internal)
|
||||
stat("Internal Atmosphere Info:", internal.name)
|
||||
stat("Tank Pressure:", internal.air_contents.return_pressure())
|
||||
for(var/datum/robot_energy_storage/st in module.storages)
|
||||
stat("[st.name]:", "[st.energy]/[st.max_energy]")
|
||||
if(connected_ai)
|
||||
@@ -342,7 +373,6 @@
|
||||
/mob/living/silicon/robot/restrained()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/silicon/robot/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
@@ -358,7 +388,6 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
@@ -368,7 +397,7 @@
|
||||
/mob/living/silicon/robot/triggerAlarm(class, area/A, O, obj/alarmsource)
|
||||
if(alarmsource.z != z)
|
||||
return
|
||||
if (stat == 2)
|
||||
if(stat == DEAD)
|
||||
return 1
|
||||
var/list/L = alarms[class]
|
||||
for (var/I in L)
|
||||
@@ -391,7 +420,6 @@
|
||||
// if (viewalerts) robot_alerts()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/silicon/robot/cancelAlarm(class, area/A, obj/origin)
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
@@ -409,12 +437,11 @@
|
||||
// if (viewalerts) robot_alerts()
|
||||
return !cleared
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
if(istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && (user.a_intent != "harm" || user == src))
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && (user.a_intent != "harm" || user == src))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (!getBruteLoss())
|
||||
@@ -674,8 +701,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(..()) //successful slime shock
|
||||
flash_eyes()
|
||||
@@ -695,11 +720,8 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
if(cell)
|
||||
cell.updateicon()
|
||||
@@ -718,7 +740,6 @@
|
||||
sleep(3)
|
||||
step_away(src,user,15)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
if(check_access(null))
|
||||
@@ -793,8 +814,6 @@
|
||||
else
|
||||
overlays += "ov-opencover -c"
|
||||
|
||||
if(jetpackoverlay)
|
||||
overlays += "minerjetpack"
|
||||
update_fire()
|
||||
|
||||
/mob/living/silicon/robot/proc/installed_modules()
|
||||
@@ -838,7 +857,6 @@
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/Topic(href, href_list)
|
||||
..()
|
||||
if(usr && (src != usr))
|
||||
@@ -882,11 +900,6 @@
|
||||
src << "Module isn't activated"
|
||||
installed_modules()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/radio_menu()
|
||||
radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code
|
||||
|
||||
#define BORG_CAMERA_BUFFER 30
|
||||
/mob/living/silicon/robot/Move(a, b, flag)
|
||||
var/oldLoc = src.loc
|
||||
@@ -951,7 +964,7 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/UnlinkSelf()
|
||||
if (src.connected_ai)
|
||||
if(src.connected_ai)
|
||||
src.connected_ai = null
|
||||
lawupdate = 0
|
||||
lockcharge = 0
|
||||
@@ -966,11 +979,10 @@
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/ResetSecurityCodes()
|
||||
set category = "Robot Commands"
|
||||
set name = "Reset Identity Codes"
|
||||
set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permenantly severs you from your AI and the robotics console and will deactivate your camera system."
|
||||
set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and permenantly severs you from your AI and the robotics console and will deactivate your camera system."
|
||||
|
||||
var/mob/living/silicon/robot/R = src
|
||||
|
||||
@@ -985,7 +997,7 @@
|
||||
set src = usr
|
||||
|
||||
var/obj/item/W = get_active_hand()
|
||||
if (W)
|
||||
if(W)
|
||||
W.attack_self(src)
|
||||
|
||||
return
|
||||
@@ -1061,8 +1073,6 @@
|
||||
|
||||
update_icons()
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/deconstruct()
|
||||
var/turf/T = get_turf(src)
|
||||
if (robot_suit)
|
||||
@@ -1108,13 +1118,14 @@
|
||||
|
||||
/mob/living/silicon/robot/syndicate
|
||||
icon_state = "syndie_bloodhound"
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
modtype = "Synd"
|
||||
faction = list("syndicate")
|
||||
bubble_icon = "syndibot"
|
||||
designation = "Syndicate Assault"
|
||||
req_access = list(access_syndicate)
|
||||
lawupdate = FALSE
|
||||
scrambledcodes = TRUE // These are rogue borgs.
|
||||
ionpulse = TRUE
|
||||
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. \
|
||||
Your cyborg LMG will slowly produce ammunition from your power supply, and your operative pinpointer will find and locate fellow nuclear operatives. \
|
||||
@@ -1178,7 +1189,6 @@
|
||||
diag_hud_set_status()
|
||||
update_health_hud()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
@@ -1254,7 +1264,7 @@
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
|
||||
/mob/living/silicon/robot/fully_replace_character_name(oldname,newname)
|
||||
/mob/living/silicon/robot/fully_replace_character_name(oldname, newname)
|
||||
..()
|
||||
if(oldname != real_name)
|
||||
notify_ai(3, oldname, newname)
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
emag.name = "Placeholder Emag Item"
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
|
||||
for(var/datum/robot_energy_storage/st in storages)
|
||||
st.energy = min(st.max_energy, st.energy + coeff * st.recharge_rate)
|
||||
@@ -99,10 +98,6 @@
|
||||
var/obj/item/weapon/melee/baton/B = I
|
||||
if(B.bcell)
|
||||
B.bcell.charge = B.bcell.maxcharge
|
||||
if(istype(I, /obj/item/weapon/tank/jetpack))
|
||||
var/obj/item/weapon/tank/jetpack/J = I
|
||||
J.air_contents.assert_gas("co2")
|
||||
J.air_contents.gases["co2"][MOLES] = (6 * ONE_ATMOSPHERE) * J.volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
|
||||
R.toner = R.tonermax
|
||||
|
||||
@@ -125,7 +120,6 @@
|
||||
/obj/item/weapon/robot_module/proc/on_emag()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
|
||||
@@ -209,8 +203,6 @@
|
||||
|
||||
fix_modules()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/security
|
||||
name = "security robot module"
|
||||
|
||||
@@ -234,8 +226,6 @@
|
||||
else
|
||||
T.charge_tick = 0
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/janitor
|
||||
name = "janitorial robot module"
|
||||
var/obj/item/weapon/reagent_containers/spray/drying_agent
|
||||
@@ -312,8 +302,6 @@
|
||||
modules += new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
|
||||
fix_modules()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/syndicate
|
||||
name = "syndicate assault robot module"
|
||||
|
||||
@@ -323,7 +311,6 @@
|
||||
modules += new /obj/item/weapon/gun/energy/printer(src)
|
||||
modules += new /obj/item/weapon/gun/projectile/revolver/grenadelauncher/cyborg(src)
|
||||
modules += new /obj/item/weapon/card/emag(src)
|
||||
modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
modules += new /obj/item/weapon/crowbar/red(src)
|
||||
modules += new /obj/item/weapon/pinpointer/operative(src)
|
||||
emag = null
|
||||
@@ -345,14 +332,11 @@
|
||||
modules += new /obj/item/weapon/melee/energy/sword/cyborg/saw(src) //Energy saw -- primary weapon
|
||||
modules += new /obj/item/roller/robo(src)
|
||||
modules += new /obj/item/weapon/card/emag(src)
|
||||
modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
modules += new /obj/item/weapon/crowbar(src)
|
||||
modules += new /obj/item/weapon/pinpointer/operative(src)
|
||||
emag = null
|
||||
|
||||
|
||||
add_module(new /obj/item/stack/medical/gauze/cyborg())
|
||||
|
||||
fix_modules()
|
||||
|
||||
/datum/robot_energy_storage
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
/mob/living/silicon/robot/Process_Spacemove(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(..())
|
||||
if(ionpulse())
|
||||
return 1
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/movement_delay()
|
||||
. = ..()
|
||||
|
||||
. += speed
|
||||
|
||||
. += config.robot_delay
|
||||
|
||||
/mob/living/silicon/robot/mob_negates_gravity()
|
||||
|
||||
@@ -608,6 +608,16 @@
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_thrusters
|
||||
name = "Cyborg Upgrade (Ion Thrusters)"
|
||||
id = "borg_upgrade_thrusters"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/borg/upgrade/thrusters
|
||||
req_tech = list("engineering" = 4, "powerstorage" = 4)
|
||||
materials = list(MAT_METAL=10000, MAT_PLASMA=5000, MAT_URANIUM = 6000)
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_disablercooler
|
||||
name = "Cyborg Upgrade (Rapid Disabler Cooling Module)"
|
||||
id = "borg_upgrade_disablercooler"
|
||||
@@ -618,16 +628,6 @@
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_jetpack
|
||||
name = "Cyborg Upgrade (Mining Jetpack)"
|
||||
id = "borg_upgrade_jetpack"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/borg/upgrade/jetpack
|
||||
req_tech = list("engineering" = 4, "powerstorage" = 4)
|
||||
materials = list(MAT_METAL=10000, MAT_PLASMA=5000, MAT_URANIUM = 6000)
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_diamonddrill
|
||||
name = "Cyborg Upgrade (Diamond Drill)"
|
||||
id = "borg_upgrade_diamonddrill"
|
||||
@@ -649,8 +649,7 @@
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_syndicate_module
|
||||
name = "Cyborg Illegal Upgrades Module"
|
||||
desc = "Allows for the construction of restricted upgrades for cyborgs"
|
||||
name = "Cyborg Upgrade (Illegal Modules)"
|
||||
id = "borg_syndicate_module"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat" = 4, "syndicate" = 3)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Reference in New Issue
Block a user