From a15d2fdb11315ca72c71aaf89d6365b28075101d Mon Sep 17 00:00:00 2001 From: zxaber <37497534+zxaber@users.noreply.github.com> Date: Mon, 14 Sep 2020 22:23:59 -0700 Subject: [PATCH] updoot --- code/game/objects/items/weaponry.dm | 6 +----- code/modules/antagonists/highlander/highlander.dm | 11 +++++------ .../modules/mob/living/silicon/robot/inventory.dm | 4 ---- code/modules/mob/living/silicon/robot/robot.dm | 15 ++++++++------- .../mob/living/silicon/robot/robot_modules.dm | 13 +++++++++++++ 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index af5df9d69aa..30bfa5582f2 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -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, "The [src] forces itself into your primary equipment slot!") - return + loc.layer = LARGE_MOB_LAYER /obj/item/katana name = "katana" diff --git a/code/modules/antagonists/highlander/highlander.dm b/code/modules/antagonists/highlander/highlander.dm index 4d04837c45b..5f83b3245ff 100644 --- a/code/modules/antagonists/highlander/highlander.dm +++ b/code/modules/antagonists/highlander/highlander.dm @@ -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 diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 396a064bb5a..d2fa26831b4 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index bb6ecfe8558..de6b13112c1 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 3f2e3b71379..377f1186a05 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -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