This commit is contained in:
zxaber
2020-09-14 22:23:59 -07:00
parent e787862ffe
commit a15d2fdb11
5 changed files with 27 additions and 22 deletions
+1 -5
View File
@@ -222,11 +222,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
return ..()
/obj/item/claymore/highlander/robot/process()
if(robot && !src in robot.held_items)
robot.uneq_all()
robot.equip_module_to_slot(src, 1)
to_chat(robot, "<span clas='danger'>The [src] forces itself into your primary equipment slot!</span>")
return
loc.layer = LARGE_MOB_LAYER
/obj/item/katana
name = "katana"
@@ -9,12 +9,14 @@
var/mob/living/L = owner.current || mob_override
ADD_TRAIT(L, TRAIT_NOGUNS, "highlander")
ADD_TRAIT(L, TRAIT_NODISMEMBER, "highlander")
ADD_TRAIT(L, TRAIT_SHOCKIMMUNE, "highlander")
REMOVE_TRAIT(L, TRAIT_PACIFISM, ROUNDSTART_TRAIT)
/datum/antagonist/highlander/remove_innate_effects(mob/living/mob_override)
var/mob/living/L = owner.current || mob_override
REMOVE_TRAIT(L, TRAIT_NOGUNS, "highlander")
REMOVE_TRAIT(L, TRAIT_NODISMEMBER, "highlander")
REMOVE_TRAIT(L, TRAIT_SHOCKIMMUNE, "highlander")
if(L.has_quirk(/datum/quirk/nonviolent))
ADD_TRAIT(L, TRAIT_PACIFISM, ROUNDSTART_TRAIT)
@@ -85,19 +87,16 @@
/datum/antagonist/highlander/robot
name="highlander"
/datum/antagonist/highlander/robot/on_gain()
forge_objectives()
owner.special_role = "highlander"
give_equipment()
/datum/antagonist/highlander/robot/give_equipment()
var/mob/living/silicon/robot/robotlander = owner.current
if(!istype(robotlander))
return ..()
robotlander.set_connected_ai() //disconnect from prior AI, if any
robotlander.revive(full_heal = TRUE, admin_revive = TRUE)
robotlander.set_connected_ai() //DISCONNECT FROM AI
robotlander.laws.clear_inherent_laws()
robotlander.laws.set_zeroth_law("THERE CAN BE ONLY ONE")
robotlander.laws.show_laws(robotlander)
robotlander.module.transform_to(/obj/item/robot_module/syndicate/kiltborg)
robotlander.place_on_head(new /obj/item/clothing/head/beret/highlander(robotlander))
ADD_TRAIT(robotlander.hat, TRAIT_NODROP, HIGHLANDER)
sword = locate(/obj/item/claymore/highlander/robot) in robotlander.module.basic_modules
@@ -132,8 +132,6 @@
* * module_num - the slot number being repaired.
*/
/mob/living/silicon/robot/proc/break_cyborg_slot(module_num)
if(!module.breakable_modules)
return FALSE
if(is_invalid_module_number(module_num, TRUE))
return FALSE
@@ -186,8 +184,6 @@
* Breaks all of a cyborg's slots.
*/
/mob/living/silicon/robot/proc/break_all_cyborg_slots()
if(!module.breakable_modules)
return FALSE
for(var/cyborg_slot in 1 to 3)
break_cyborg_slot(cyborg_slot)
@@ -75,7 +75,7 @@
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
var/scrambledcodes = FALSE // Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
var/lockcharge //Boolean of whether the borg is locked down or not
var/lockcharge = FALSE //Boolean of whether the borg is locked down or not
var/toner = 0
var/tonermax = 40
@@ -730,14 +730,15 @@
/// the current percent health of the robot (-1 to 1)
var/percent_hp = health/maxHealth
if(health <= previous_health) //if change in health is negative (we're losing hp)
if(percent_hp <= 0.5)
break_cyborg_slot(3)
if(module.breakable_modules)
if(percent_hp <= 0.5)
break_cyborg_slot(3)
if(percent_hp <= 0)
break_cyborg_slot(2)
if(percent_hp <= 0)
break_cyborg_slot(2)
if(percent_hp <= -0.5)
break_cyborg_slot(1)
if(percent_hp <= -0.5)
break_cyborg_slot(1)
else //if change in health is positive (we're gaining hp)
if(percent_hp >= 0.5)
@@ -7,6 +7,8 @@
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
///Host of this module
var/mob/living/silicon/robot/robot
var/list/basic_modules = list() //a list of paths, converted to a list of instances on New()
var/list/emag_modules = list() //ditto
@@ -185,6 +187,7 @@
/obj/item/robot_module/proc/transform_to(new_module_type)
var/mob/living/silicon/robot/R = loc
var/obj/item/robot_module/RM = new new_module_type(R)
RM.robot = R
if(!RM.be_transformed_to(src))
qdel(RM)
return
@@ -655,6 +658,16 @@
breakable_modules = FALSE
locked_transform = FALSE //GO GO QUICKLY AND SLAUGHTER THEM ALL
/obj/item/robot_module/syndicate/kiltborg/be_transformed_to(obj/item/robot_module/old_module)
. = ..()
qdel(robot.radio)
robot.radio = new /obj/item/radio/borg/syndicate(robot)
robot.scrambledcodes = TRUE
robot.maxHealth = 50 //DIE IN THREE HITS, LIKE REAL SCOT
robot.break_cyborg_slot(3) //YOU ONLY HAVE TWO ITEMS ANYWAY
robot.equip_module_to_slot(locate(/obj/item/claymore/highlander/robot) in basic_modules, 1)
robot.equip_module_to_slot(locate(/obj/item/pinpointer/nuke) in basic_modules, 2)
/datum/robot_energy_storage
var/name = "Generic energy storage"
var/max_energy = 30000