From b8fac2681fdffb0644f1e990bb6e0a6a66870de8 Mon Sep 17 00:00:00 2001 From: datlo Date: Mon, 7 Jan 2019 06:35:22 +0000 Subject: [PATCH] add verb to cham, general improvements --- .../objects/items/devices/chameleonproj.dm | 12 ++--- .../mob/living/silicon/robot/syndicate.dm | 48 +++++++++++-------- code/modules/mob/mob_helpers.dm | 9 ++-- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 2572f826735..d4e41a824fc 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -159,11 +159,14 @@ var/activationCost = 300 var/activationUpkeep = 50 var/disguise = "landmate" - var/datum/component/mobhook // need this to deal with unregistration properly - var/mob/living/silicon/robot/syndicate/saboteur/user // needed for process() + var/mob/living/silicon/robot/syndicate/saboteur/user + +/obj/item/borg_chameleon/New() + ..() + user.cham_proj = src /obj/item/borg_chameleon/Destroy() - QDEL_NULL(mobhook) + user.cham_proj = null return ..() /obj/item/borg_chameleon/dropped(mob/user) @@ -228,16 +231,13 @@ user.base_icon = disguise user.icon_state = disguise active = TRUE - user.active_proj = src user.update_icons() /obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user) processing_objects.Remove(src) - QDEL_NULL(mobhook) user.base_icon = initial(user.base_icon) user.icon_state = initial(user.icon_state) active = FALSE - user.active_proj = null user.update_icons() src.user = user diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm index 25cf1dd184d..13cbed08ec0 100644 --- a/code/modules/mob/living/silicon/robot/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/syndicate.dm @@ -57,27 +57,37 @@ modtype = "Syndicate Saboteur" designation = "Syndicate Saboteur" var/mail_destination = 0 - var/obj/item/borg_chameleon/active_proj = null + var/obj/item/borg_chameleon/cham_proj = null playstyle_string = "You are a Syndicate saboteur cyborg!
\ You are equipped with robust engineering tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \ - Your destination tagger will allow you to stealthily traverse the disposal network across the station \ + Your built-in mail tagger will allow you to stealthily traverse the disposal network across the station. \ Your cyborg chameleon projector allows you to assume the appearance of a Nanotrasen engineering cyborg, and undertake covert actions on the station. \ You are able to hijack Nanotrasen cyborgs by emagging their internal components, make sure to flash them first. \ You are armed with a standard energy sword, use it to ambush key targets if needed.\ - Be aware that taking damage or being touched will break your disguise. \ + Be aware that taking damage will break your disguise. \ Help the operatives secure the disk at all costs!" /mob/living/silicon/robot/syndicate/saboteur/init() ..() module = new /obj/item/robot_module/syndicate_saboteur(src) -/mob/living/silicon/robot/verb/modify_name() - set name = "Modify name" +/mob/living/silicon/robot/syndicate/saboteur/verb/modify_name() + set name = "Modify Name" + set desc = "Change your systems' registered name to fool Nanotrasen systems. No cost." set category = "Saboteur" - rename_self(braintype, 1) + rename_self(braintype, TRUE, TRUE) + +/mob/living/silicon/robot/syndicate/saboteur/verb/toggle_chameleon() + set name = "Toggle Chameleon Projector" + set desc = "Change your appearance to a Nanotrasen cyborg. Costs power to use and maintain." + set category = "Saboteur" + if(cham_proj) + cham_proj.attack_self(src) + else + to_chat("Error : No chameleon projector system found.") /mob/living/silicon/robot/syndicate/saboteur/verb/set_mail_tag() - set name = "Set mail tag" + set name = "Set Mail Tag" set desc = "Tag yourself for delivery through the disposals system." set category = "Saboteur" @@ -99,31 +109,31 @@ return /mob/living/silicon/robot/syndicate/saboteur/attackby() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() /mob/living/silicon/robot/syndicate/saboteur/attack_hand() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() /mob/living/silicon/robot/syndicate/saboteur/ex_act() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() /mob/living/silicon/robot/syndicate/saboteur/emp_act() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() /mob/living/silicon/robot/syndicate/saboteur/bullet_act() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() /mob/living/silicon/robot/syndicate/saboteur/attackby() - if(active_proj) - active_proj.disrupt(src) + if(cham_proj) + cham_proj.disrupt(src) ..() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 46b7d1141b8..8115e4d9ff0 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -560,7 +560,7 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM) objective.explanation_text = copytext(objective.explanation_text, 1, pos)+newname+copytext(objective.explanation_text, pos+length) return 1 -/mob/proc/rename_self(var/role, var/allow_numbers=0) +/mob/proc/rename_self(var/role, var/allow_numbers = FALSE, var/force = FALSE) spawn(0) var/oldname = real_name @@ -568,8 +568,11 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM) var/newname for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name. - newname = input(src, "You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname) as text - if((world.time - time_passed) > 1800) + if(force) + newname = input(src, "Pick a new name.", "Name Change", oldname) as text + else + newname = input(src, "You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname) as text + if(((world.time - time_passed) > 1800) && !force) alert(src, "Unfortunately, more than 3 minutes have passed for selecting your name. If you are a robot, use the Namepick verb; otherwise, adminhelp.", "Name Change") return //took too long newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.