mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Robot Cleanup (#9332)
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/**********************************************************************
|
||||
Cyborg Spec Items
|
||||
***********************************************************************/
|
||||
//Might want to move this into several files later but for now it works here
|
||||
// Consider changing this to a child of the stun baton class. ~Z
|
||||
/obj/item/borg/stun
|
||||
name = "electrified arm"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
|
||||
/obj/item/borg/stun/apply_hit_effect(mob/living/M, mob/living/silicon/robot/user, var/hit_zone)
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] has prodded \the [M] with \a [src]!</span>")
|
||||
|
||||
if(!user.cell || !user.cell.checked_use(1250)) //Slightly more than a baton.
|
||||
return 0
|
||||
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
M.apply_effect(5, STUTTER)
|
||||
M.stun_effect_act(0, 70, check_zone(hit_zone), src)
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.forcesay(hit_appends)
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/borg/overdrive
|
||||
name = "overdrive"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
|
||||
/**********************************************************************
|
||||
HUD/SIGHT things
|
||||
***********************************************************************/
|
||||
/obj/item/borg/sight
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "securearea"
|
||||
var/sight_mode = null
|
||||
|
||||
/obj/item/borg/sight/on_module_hotbar(mob/living/silicon/robot/R)
|
||||
R.sight_mode |= sight_mode
|
||||
|
||||
/obj/item/borg/sight/on_module_store(mob/living/silicon/robot/R)
|
||||
R.sight_mode &= ~sight_mode
|
||||
|
||||
/obj/item/borg/sight/xray
|
||||
name = "\proper x-ray vision"
|
||||
sight_mode = BORGXRAY
|
||||
|
||||
|
||||
/obj/item/borg/sight/thermal
|
||||
name = "\proper thermal vision"
|
||||
desc_antag = "Having this device on your hotbar will allow you to see in enhanced thermal vision, which allows you to see heat signatures through solid walls."
|
||||
sight_mode = BORGTHERM
|
||||
icon_state = "thermal"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
|
||||
|
||||
/obj/item/borg/sight/meson
|
||||
name = "\proper meson vision"
|
||||
sight_mode = BORGMESON
|
||||
icon_state = "meson"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
|
||||
/obj/item/borg/sight/material
|
||||
name = "\proper material scanner vision"
|
||||
sight_mode = BORGMATERIAL
|
||||
|
||||
/obj/item/borg/sight/hud
|
||||
name = "hud"
|
||||
var/obj/item/clothing/glasses/hud/hud = null
|
||||
|
||||
|
||||
/obj/item/borg/sight/hud/med
|
||||
name = "medical hud"
|
||||
icon_state = "healthhud"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
|
||||
New()
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/health(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/borg/sight/hud/sec
|
||||
name = "security hud"
|
||||
icon_state = "securityhud"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
|
||||
New()
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/security(src)
|
||||
return
|
||||
@@ -1,381 +0,0 @@
|
||||
/obj/item/robot_parts
|
||||
name = "robot parts"
|
||||
icon = 'icons/obj/robot_parts.dmi'
|
||||
item_state = "buildpipe"
|
||||
icon_state = "blank"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/list/part = null // Order of args is important for installing robolimbs.
|
||||
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
var/model_info
|
||||
var/linked_frame = "Unbranded Frame"
|
||||
dir = SOUTH
|
||||
|
||||
/obj/item/robot_parts/set_dir()
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/New(var/newloc, var/model)
|
||||
..(newloc)
|
||||
if(model_info && model)
|
||||
model_info = model
|
||||
var/datum/robolimb/R = all_robolimbs[model]
|
||||
if(R)
|
||||
name = "[R.company] robot [initial(name)]"
|
||||
desc = "[R.desc]"
|
||||
linked_frame = R.linked_frame
|
||||
if(icon_state in icon_states(R.icon))
|
||||
icon = R.icon
|
||||
else
|
||||
name = "robot [initial(name)]"
|
||||
|
||||
/obj/item/robot_parts/l_arm
|
||||
name = "left arm"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "l_arm"
|
||||
part = list(BP_L_ARM,BP_L_HAND)
|
||||
model_info = 1
|
||||
|
||||
/obj/item/robot_parts/r_arm
|
||||
name = "right arm"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "r_arm"
|
||||
part = list(BP_R_ARM,BP_R_HAND)
|
||||
model_info = 1
|
||||
|
||||
/obj/item/robot_parts/l_leg
|
||||
name = "left leg"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "l_leg"
|
||||
part = list(BP_L_LEG,BP_L_FOOT)
|
||||
model_info = 1
|
||||
|
||||
/obj/item/robot_parts/r_leg
|
||||
name = "right leg"
|
||||
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
|
||||
icon_state = "r_leg"
|
||||
part = list(BP_R_LEG,BP_R_FOOT)
|
||||
model_info = 1
|
||||
|
||||
/obj/item/robot_parts/chest
|
||||
name = "torso"
|
||||
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
|
||||
icon_state = "chest"
|
||||
part = list(BP_GROIN,BP_CHEST)
|
||||
var/wires = 0.0
|
||||
var/obj/item/cell/cell = null
|
||||
|
||||
/obj/item/robot_parts/head
|
||||
name = "head"
|
||||
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
|
||||
icon_state = "head"
|
||||
part = list(BP_HEAD)
|
||||
var/obj/item/device/flash/flash1 = null
|
||||
var/obj/item/device/flash/flash2 = null
|
||||
var/law_manager = TRUE
|
||||
|
||||
/obj/item/robot_parts/robot_suit
|
||||
name = "endoskeleton"
|
||||
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
|
||||
icon_state = "robo_suit"
|
||||
var/obj/item/robot_parts/l_arm/l_arm = null
|
||||
var/obj/item/robot_parts/r_arm/r_arm = null
|
||||
var/obj/item/robot_parts/l_leg/l_leg = null
|
||||
var/obj/item/robot_parts/r_leg/r_leg = null
|
||||
var/obj/item/robot_parts/chest/chest = null
|
||||
var/obj/item/robot_parts/head/head = null
|
||||
var/created_name = ""
|
||||
|
||||
/obj/item/robot_parts/robot_suit/Initialize()
|
||||
. = ..()
|
||||
src.updateicon()
|
||||
|
||||
/obj/item/robot_parts/robot_suit/equipped/Initialize()
|
||||
. = ..()
|
||||
l_leg = new /obj/item/robot_parts/l_leg(src)
|
||||
r_leg = new /obj/item/robot_parts/r_leg(src)
|
||||
l_arm = new /obj/item/robot_parts/l_arm(src)
|
||||
r_arm = new /obj/item/robot_parts/r_arm(src)
|
||||
updateicon()
|
||||
|
||||
/obj/item/robot_parts/robot_suit/proc/updateicon()
|
||||
cut_overlays()
|
||||
if(src.l_arm)
|
||||
add_overlay("l_arm+o")
|
||||
if(src.r_arm)
|
||||
add_overlay("r_arm+o")
|
||||
if(src.chest)
|
||||
add_overlay("chest+o")
|
||||
if(src.l_leg)
|
||||
add_overlay("l_leg+o")
|
||||
if(src.r_leg)
|
||||
add_overlay("r_leg+o")
|
||||
if(src.head)
|
||||
add_overlay("head+o")
|
||||
|
||||
/obj/item/robot_parts/robot_suit/proc/check_completion()
|
||||
if(src.l_arm && src.r_arm)
|
||||
if(src.l_leg && src.r_leg)
|
||||
if(src.chest && src.head)
|
||||
feedback_inc("cyborg_frames_built",1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
var/obj/item/stack/material/M = W
|
||||
if (M.use(1))
|
||||
var/obj/item/secbot_assembly/ed209_assembly/B = new /obj/item/secbot_assembly/ed209_assembly
|
||||
B.forceMove(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>You armed the robot frame.</span>")
|
||||
if (user.get_inactive_hand()==src)
|
||||
user.remove_from_mob(src)
|
||||
user.put_in_inactive_hand(B)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of metal to arm the robot frame.</span>")
|
||||
if(istype(W, /obj/item/robot_parts/l_leg))
|
||||
if(src.l_leg) return
|
||||
user.drop_from_inventory(W,src)
|
||||
src.l_leg = W
|
||||
src.updateicon()
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/r_leg))
|
||||
if(src.r_leg) return
|
||||
user.drop_from_inventory(W,src)
|
||||
src.r_leg = W
|
||||
src.updateicon()
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/l_arm))
|
||||
if(src.l_arm) return
|
||||
user.drop_from_inventory(W,src)
|
||||
src.l_arm = W
|
||||
src.updateicon()
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/r_arm))
|
||||
if(src.r_arm) return
|
||||
user.drop_from_inventory(W,src)
|
||||
src.r_arm = W
|
||||
src.updateicon()
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/chest))
|
||||
if(src.chest) return
|
||||
if(W:wires && W:cell)
|
||||
user.drop_from_inventory(W,src)
|
||||
src.chest = W
|
||||
src.updateicon()
|
||||
else if(!W:wires)
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/head))
|
||||
if(src.head) return
|
||||
if(W:flash2 && W:flash1)
|
||||
user.drop_from_inventory(W,src)
|
||||
src.head = W
|
||||
src.updateicon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = W
|
||||
if(check_completion())
|
||||
if(!istype(loc,/turf))
|
||||
to_chat(user, "<span class='warning'>You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise.</span>")
|
||||
return
|
||||
if(!M.brainmob)
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [W] into the frame would sort of defeat the purpose.</span>")
|
||||
return
|
||||
if(!M.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(M.brainmob.mind)
|
||||
for(var/mob/abstract/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; there's no point.</span>")
|
||||
return
|
||||
|
||||
if(M.brainmob.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>Sticking a dead [W] into the frame would sort of defeat the purpose.</span>")
|
||||
return
|
||||
|
||||
if(!src.head.law_manager)
|
||||
|
||||
if(!is_alien_whitelisted(M.brainmob, "Baseline Frame") && config.usealienwhitelist)
|
||||
to_chat(user, "<span class='warning'>\The [W] does not seem to fit.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/new_shell = new(get_turf(loc), src.chest.linked_frame)
|
||||
src.forceMove(new_shell) //so people won't mess around with the chassis until it is deleted
|
||||
M.brainmob.mind.transfer_to(new_shell)
|
||||
qdel(M)
|
||||
var/newname = sanitizeSafe(input(new_shell,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if(!newname)
|
||||
var/datum/language/L = all_languages[new_shell.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
new_shell.real_name = newname
|
||||
new_shell.name = new_shell.real_name
|
||||
new_shell.change_appearance(APPEARANCE_ALL_HAIR | APPEARANCE_SKIN | APPEARANCE_EYE_COLOR, new_shell.loc, new_shell)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else
|
||||
|
||||
if(jobban_isbanned(M.brainmob, "Cyborg"))
|
||||
to_chat(user, "<span class='warning'>\The [W] does not seem to fit.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), TRUE)
|
||||
if(!O) return
|
||||
|
||||
user.drop_item() //TODO: Look into this.
|
||||
|
||||
O.mmi = W
|
||||
O.invisibility = 0
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.cell = chest.cell
|
||||
O.cell.forceMove(O)
|
||||
W.forceMove(O)//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
|
||||
// Since we "magically" installed a cell, we also have to update the correct component.
|
||||
if(O.cell)
|
||||
var/datum/robot_component/cell_component = O.components["power cell"]
|
||||
cell_component.wrapped = O.cell
|
||||
cell_component.installed = 1
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
callHook("borgify", list(O))
|
||||
O.Namepick()
|
||||
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
|
||||
if (W.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
|
||||
src.created_name = t
|
||||
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/cell))
|
||||
if(src.cell)
|
||||
to_chat(user, "<span class='warning'>You have already inserted a cell!</span>")
|
||||
return
|
||||
else
|
||||
user.drop_from_inventory(W,src)
|
||||
src.cell = W
|
||||
to_chat(user, "<span class='notice'>You insert the cell!</span>")
|
||||
if(W.iscoil())
|
||||
if(src.wires)
|
||||
to_chat(user, "<span class='warning'>You have already inserted wire!</span>")
|
||||
return
|
||||
else
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.use(1)
|
||||
src.wires = 1.0
|
||||
to_chat(user, "<span class='notice'>You insert the wire!</span>")
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(W.ismultitool())
|
||||
if(law_manager)
|
||||
to_chat(user, "<span class='notice'>You disable the lawing circuits on \the [src].</span>")
|
||||
law_manager = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You enable the lawing circuits on \the [src].</span>")
|
||||
law_manager = TRUE
|
||||
|
||||
if(istype(W, /obj/item/device/flash))
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
var/current_module = user.get_active_hand()
|
||||
if(current_module == W)
|
||||
to_chat(user, "<span class='warning'>How do you propose to do that?</span>")
|
||||
return
|
||||
else
|
||||
add_flashes(W,user)
|
||||
else
|
||||
add_flashes(W,user)
|
||||
else if(istype(W, /obj/item/stock_parts/manipulator))
|
||||
to_chat(user, "<span class='notice'>You install some manipulators and modify the head, creating a functional spider-bot!</span>")
|
||||
|
||||
|
||||
|
||||
new /mob/living/simple_animal/spiderbot(get_turf(loc))
|
||||
user.drop_from_inventory(W,get_turf(loc))
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/head/proc/add_flashes(obj/item/W as obj, mob/user as mob) //Made into a seperate proc to avoid copypasta
|
||||
if(src.flash1 && src.flash2)
|
||||
to_chat(user, "<span class='notice'>You have already inserted the eyes!</span>")
|
||||
return
|
||||
else if(src.flash1)
|
||||
user.drop_from_inventory(W,src)
|
||||
src.flash2 = W
|
||||
to_chat(user, "<span class='notice'>You insert the flash into the eye socket!</span>")
|
||||
else
|
||||
user.drop_from_inventory(W,src)
|
||||
src.flash1 = W
|
||||
to_chat(user, "<span class='notice'>You insert the flash into the eye socket!</span>")
|
||||
|
||||
|
||||
/obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(sabotaged)
|
||||
to_chat(user, "<span class='warning'>[src] is already sabotaged!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You short out the safeties.</span>")
|
||||
sabotaged = 1
|
||||
return 1
|
||||
|
||||
//branded chest, to be used in ipc ressurection
|
||||
|
||||
/obj/item/robot_parts/chest/bishop
|
||||
name = "Bishop cybernetics torso"
|
||||
model_info = 1
|
||||
linked_frame = "Bishop Accessory Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/hephaestus
|
||||
name = "Hephaestus industries torso"
|
||||
linked_frame = "Hephaestus G2 Industrial Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/zenghu
|
||||
name = "Zeng-Hu pharmaceuticals torso"
|
||||
linked_frame = "Zeng-Hu Mobility Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/synthskin
|
||||
name = "Human synthskin torso"
|
||||
linked_frame = "Shell Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/xion
|
||||
name = "Xion manufacturing group torso"
|
||||
linked_frame = "Xion Industrial Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/ipc
|
||||
name = "Hephaestus integrated torso"
|
||||
linked_frame = "Baseline Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/industrial
|
||||
name = "Hephaestus industrial torso"
|
||||
linked_frame = "Hephaestus G1 Industrial Frame"
|
||||
@@ -1,146 +0,0 @@
|
||||
// robot_upgrades.dm
|
||||
// Contains various borg upgrades.
|
||||
|
||||
/obj/item/borg/upgrade
|
||||
name = "borg upgrade module."
|
||||
desc = "Protected by FRM."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade"
|
||||
var/locked = 0
|
||||
var/require_module = 0
|
||||
var/installed = 0
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(usr, "<span class='warning'>The [src] will not function on a deceased robot.</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "robotic module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return FALSE
|
||||
if(istype(R, /mob/living/silicon/robot/syndicate))
|
||||
return FALSE
|
||||
R.uneq_all()
|
||||
R.mod_type = initial(R.mod_type)
|
||||
R.hands.icon_state = initial(R.hands.icon_state)
|
||||
|
||||
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
|
||||
R.module.Reset(R)
|
||||
qdel(R.module)
|
||||
R.module = null
|
||||
R.updatename("Default")
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
name = "robot reclassification board"
|
||||
desc = "Used to rename a cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
// construction_cost = list(DEFAULT_WALL_MATERIAL=1000)
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
|
||||
heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.notify_ai(ROBOT_NOTIFICATION_NEW_NAME, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
R.real_name = heldname
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/floodlight
|
||||
name = "robot floodlight module"
|
||||
desc = "Used to boost cyborg's light intensity."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
/obj/item/borg/upgrade/floodlight/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(R.intense_light)
|
||||
to_chat(usr, "<span class='notice'>This cyborg's light was already upgraded </span>")
|
||||
return 0
|
||||
else
|
||||
R.intense_light = 1
|
||||
R.update_robot_light()
|
||||
to_chat(R, "Lighting systems upgrade detected.")
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/restart
|
||||
name = "robot emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
|
||||
if(R.health < 0)
|
||||
to_chat(usr, "<span class='warning'>You have to repair the robot before using this module!</span>")
|
||||
return 0
|
||||
|
||||
if(!R.key)
|
||||
for(var/mob/abstract/observer/ghost in player_list)
|
||||
if(ghost.mind && ghost.mind.current == R)
|
||||
R.key = ghost.key
|
||||
|
||||
R.stat = CONSCIOUS
|
||||
dead_mob_list -= R
|
||||
living_mob_list |= R
|
||||
R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "robotic VTEC Module"
|
||||
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
|
||||
icon_state = "cyborg_upgrade2"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(R.speed == -1)
|
||||
return 0
|
||||
|
||||
R.speed--
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/
|
||||
name = "illegal equipment module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a robot"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(R.emagged == 1)
|
||||
return 0
|
||||
|
||||
R.emagged = 1
|
||||
R.fake_emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/combat
|
||||
name = "combat cyborg module"
|
||||
desc = "Unlocks the combat cyborg module"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 0
|
||||
|
||||
/obj/item/borg/upgrade/combat/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(R.crisis_override == 1)
|
||||
return 0
|
||||
|
||||
R.crisis_override = 1
|
||||
return 1
|
||||
Reference in New Issue
Block a user