Merge pull request #3749 from Nalarac/Jetpack

Removes Cyborg Module Restraint on Jetpack
This commit is contained in:
Anewbe
2017-09-03 17:09:43 -04:00
committed by GitHub
3 changed files with 54 additions and 16 deletions
+18 -15
View File
@@ -12,7 +12,7 @@
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
if(R.stat == DEAD)
usr << "<span class='warning'>The [src] will not function on a deceased robot.</span>"
to_chat(usr, "<span class='warning'>The [src] will not function on a deceased robot.</span>")
return 1
return 0
@@ -66,7 +66,7 @@
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
if(R.health < 0)
usr << "You have to repair the robot before using this module!"
to_chat(usr, "You have to repair the robot before using this module!")
return 0
if(!R.key)
@@ -110,8 +110,8 @@
if(..()) return 0
if(!R.module || !(type in R.module.supported_upgrades))
R << "Upgrade mounting error! No suitable hardpoint detected!"
usr << "There's no mounting point for the module!"
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 0
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in R.module
@@ -120,12 +120,12 @@
if(!T)
T = locate() in R.module.modules
if(!T)
usr << "This robot has had its taser removed!"
to_chat(usr, "<span class='warning'>This robot has had its taser removed!</span>")
return 0
if(T.recharge_time <= 2)
R << "Maximum cooling achieved for this hardpoint!"
usr << "There's no room for another cooling unit!"
to_chat(R, "Maximum cooling achieved for this hardpoint!")
to_chat(usr, "There's no room for another cooling unit!")
return 0
else
@@ -135,7 +135,7 @@
/obj/item/borg/upgrade/jetpack
name = "mining robot jetpack"
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
desc = "A carbon dioxide jetpack suitable for low-gravity operations."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
@@ -143,17 +143,20 @@
/obj/item/borg/upgrade/jetpack/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(!R.module || !(type in R.module.supported_upgrades))
R << "Upgrade mounting error! No suitable hardpoint detected!"
usr << "There's no mounting point for the module!"
return 0
else
var/obj/item/weapon/tank/jetpack/carbondioxide/T = locate() in R.module
if(!T)
T = locate() in R.module.contents
if(!T)
T = locate() in R.module.modules
if(!T)
R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide
for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
R.internals = src
//R.icon_state="Miner+j"
return 1
if(T)
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 0
/obj/item/borg/upgrade/syndicate/
name = "scrambled equipment module"
@@ -671,7 +671,6 @@ var/global/list/robot_modules = list(
"Treadhead" = "Miner",
"Drone" = "drone-miner"
)
supported_upgrades = list(/obj/item/borg/upgrade/jetpack)
/obj/item/weapon/robot_module/robot/miner/New()
..()