Merge pull request #9818 from GrayRachnid/portssaboteur

Ports the Saboteur borg for nukeops and new cyborg tools/weapon icons.
This commit is contained in:
kevinz000
2019-11-19 21:28:25 -07:00
committed by GitHub
22 changed files with 301 additions and 7 deletions
@@ -182,6 +182,10 @@
name = "syndicate medical teleporter"
borg_to_spawn = "Medical"
/obj/item/antag_spawner/nuke_ops/borg_tele/saboteur
name = "syndicate saboteur teleporter"
borg_to_spawn = "Saboteur"
/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/silicon/robot/R
var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
@@ -191,6 +195,8 @@
switch(borg_to_spawn)
if("Medical")
R = new /mob/living/silicon/robot/modules/syndicate/medical(T)
if("Saboteur")
R = new /mob/living/silicon/robot/modules/syndicate/saboteur(T)
else
R = new /mob/living/silicon/robot/modules/syndicate(T) //Assault borg by default
@@ -0,0 +1,181 @@
/obj/item/borg_chameleon
name = "cyborg chameleon projector"
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
flags_1 = CONDUCT_1
item_flags = NOBLUDGEON
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_SMALL
var/friendlyName
var/savedName
var/active = FALSE
var/activationCost = 300
var/activationUpkeep = 50
var/disguise = null
var/disguise_icon_override = null
var/disguise_pixel_offset = null
var/mob/listeningTo
var/static/list/signalCache = list( // list here all signals that should break the camouflage
COMSIG_PARENT_ATTACKBY,
COMSIG_ATOM_ATTACK_HAND,
COMSIG_MOVABLE_IMPACT_ZONE,
COMSIG_ATOM_BULLET_ACT,
COMSIG_ATOM_EX_ACT,
COMSIG_ATOM_FIRE_ACT,
COMSIG_ATOM_EMP_ACT,
)
var/mob/living/silicon/robot/user // needed for process()
var/animation_playing = FALSE
var/list/engymodels = list("Default", "Default - Treads", "Heavy", "Sleek", "Marina", "Can", "Spider", "Loader","Handy", "Pup Dozer", "Vale")
/obj/item/borg_chameleon/Initialize()
. = ..()
friendlyName = pick(GLOB.ai_names)
/obj/item/borg_chameleon/Destroy()
listeningTo = null
return ..()
/obj/item/borg_chameleon/dropped(mob/user)
. = ..()
disrupt(user)
/obj/item/borg_chameleon/equipped(mob/user)
. = ..()
disrupt(user)
/obj/item/borg_chameleon/attack_self(mob/living/silicon/robot/user)
if (user && user.cell && user.cell.charge > activationCost)
if (isturf(user.loc))
toggle(user)
else
to_chat(user, "<span class='warning'>You can't use [src] while inside something!</span>")
else
to_chat(user, "<span class='warning'>You need at least [activationCost] charge in your cell to use [src]!</span>")
/obj/item/borg_chameleon/proc/toggle(mob/living/silicon/robot/user)
if(active)
playsound(src, 'sound/effects/pop.ogg', 100, TRUE, -6)
to_chat(user, "<span class='notice'>You deactivate \the [src].</span>")
deactivate(user)
else
if(animation_playing)
to_chat(user, "<span class='notice'>\the [src] is recharging.</span>")
return
var/borg_icon = input(user, "Select an icon!", "Robot Icon", null) as null|anything in engymodels
if(!borg_icon)
return FALSE
switch(borg_icon)
if("Default")
disguise = "engineer"
disguise_icon_override = 'icons/mob/robots.dmi'
if("Default - Treads")
disguise = "engi-tread"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Loader")
disguise = "loaderborg"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Handy")
disguise = "handyeng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Sleek")
disguise = "sleekeng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Can")
disguise = "caneng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Marina")
disguise = "marinaeng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Spider")
disguise = "spidereng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Heavy")
disguise = "heavyeng"
disguise_icon_override = 'modular_citadel/icons/mob/robots.dmi'
if("Pup Dozer")
disguise = "pupdozer"
disguise_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
disguise_pixel_offset = -16
if("Vale")
disguise = "valeeng"
disguise_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
disguise_pixel_offset = -16
animation_playing = TRUE
to_chat(user, "<span class='notice'>You activate \the [src].</span>")
playsound(src, 'sound/effects/seedling_chargeup.ogg', 100, TRUE, -6)
var/start = user.filters.len
var/X,Y,rsq,i,f
for(i=1, i<=7, ++i)
do
X = 60*rand() - 30
Y = 60*rand() - 30
rsq = X*X + Y*Y
while(rsq<100 || rsq>900)
user.filters += filter(type="wave", x=X, y=Y, size=rand()*2.5+0.5, offset=rand())
for(i=1, i<=7, ++i)
f = user.filters[start+i]
animate(f, offset=f:offset, time=0, loop=3, flags=ANIMATION_PARALLEL)
animate(offset=f:offset-1, time=rand()*20+10)
if (do_after(user, 50, target=user) && user.cell.use(activationCost))
playsound(src, 'sound/effects/bamf.ogg', 100, TRUE, -6)
to_chat(user, "<span class='notice'>You are now disguised as the Nanotrasen engineering borg \"[friendlyName]\".</span>")
activate(user)
else
to_chat(user, "<span class='warning'>The chameleon field fizzles.</span>")
do_sparks(3, FALSE, user)
for(i=1, i<=min(7, user.filters.len), ++i) // removing filters that are animating does nothing, we gotta stop the animations first
f = user.filters[start+i]
animate(f)
user.filters = null
animation_playing = FALSE
/obj/item/borg_chameleon/process()
if (user)
if (!user.cell || !user.cell.use(activationUpkeep))
disrupt(user)
else
return PROCESS_KILL
/obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/user)
START_PROCESSING(SSobj, src)
src.user = user
savedName = user.name
user.name = friendlyName
user.module.cyborg_base_icon = disguise
user.module.cyborg_icon_override = disguise_icon_override
user.module.cyborg_pixel_offset = disguise_pixel_offset
user.bubble_icon = "robot"
active = TRUE
user.update_icons()
if(listeningTo == user)
return
if(listeningTo)
UnregisterSignal(listeningTo, signalCache)
RegisterSignal(user, signalCache, .proc/disrupt)
listeningTo = user
/obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/user)
STOP_PROCESSING(SSobj, src)
if(listeningTo)
UnregisterSignal(listeningTo, signalCache)
listeningTo = null
do_sparks(5, FALSE, user)
user.name = savedName
user.module.cyborg_base_icon = initial(user.module.cyborg_base_icon)
user.module.cyborg_icon_override = 'icons/mob/robots.dmi'
user.bubble_icon = "syndibot"
active = FALSE
user.update_icons()
user.pixel_x = 0 //this solely exists because of dogborgs. I want anyone who ever reads this code later on to know this. Don't ask me why it's here, doesn't work above update_icons()
src.user = user
/obj/item/borg_chameleon/proc/disrupt(mob/living/silicon/robot/user)
if(active)
to_chat(user, "<span class='danger'>Your chameleon field deactivates.</span>")
deactivate(user)
@@ -917,6 +917,17 @@
<i>Help the operatives secure the disk at all costs!</i></b>"
set_module = /obj/item/robot_module/syndicate_medical
/mob/living/silicon/robot/modules/syndicate/saboteur
icon_state = "synd_engi"
playstyle_string = "<span class='big bold'>You are a Syndicate saboteur cyborg!</span><br>\
<b>You are armed 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 welder will allow you to repair the operatives' exosuits, but also yourself and your fellow cyborgs \
Your cyborg chameleon projector allows you to assume the appearance and registered name of a Nanotrasen engineering borg, and undertake covert actions on the station \
Be aware that almost any physical contact or incidental damage will break your camouflage \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_module = /obj/item/robot_module/saboteur
/mob/living/silicon/robot/proc/notify_ai(notifytype, oldname, newname)
if(!connected_ai)
return
@@ -34,6 +34,7 @@
var/list/ride_offset_y = list("north" = 4, "south" = 4, "east" = 3, "west" = 3)
var/ride_allow_incapacitated = FALSE
var/allow_riding = TRUE
var/canDispose = FALSE // Whether the borg can stuff itself into disposal
var/sleeper_overlay
var/icon/cyborg_icon_override
@@ -989,6 +990,47 @@
can_be_pushed = FALSE
hat_offset = 3
/obj/item/robot_module/saboteur
name = "Syndicate Saboteur"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/borg/sight/thermal,
/obj/item/construction/rcd/borg/syndicate,
/obj/item/pipe_dispenser,
/obj/item/restraints/handcuffs/cable/zipties,
/obj/item/extinguisher,
/obj/item/weldingtool/largetank/cyborg,
/obj/item/screwdriver/nuke,
/obj/item/wrench/cyborg,
/obj/item/crowbar/cyborg,
/obj/item/wirecutters/cyborg,
/obj/item/multitool/cyborg,
/obj/item/storage/part_replacer/cyborg,
/obj/item/holosign_creator/atmos,
/obj/item/weapon/gripper,
/obj/item/lightreplacer/cyborg,
/obj/item/stack/sheet/metal/cyborg,
/obj/item/stack/sheet/glass/cyborg,
/obj/item/stack/sheet/rglass/cyborg,
/obj/item/stack/rods/cyborg,
/obj/item/stack/tile/plasteel/cyborg,
/obj/item/destTagger/borg,
/obj/item/stack/cable_coil/cyborg,
/obj/item/pinpointer/syndicate_cyborg,
/obj/item/borg_chameleon,
)
ratvar_modules = list(
/obj/item/clockwork/slab/cyborg/engineer,
/obj/item/clockwork/replica_fabricator/cyborg)
cyborg_base_icon = "synd_engi"
moduleselect_icon = "malf"
can_be_pushed = FALSE
magpulsing = TRUE
hat_offset = -4
canDispose = TRUE
/datum/robot_energy_storage
var/name = "Generic energy storage"
var/max_energy = 30000
@@ -64,6 +64,8 @@
/obj/item/gun/energy/laser/cyborg
can_charge = FALSE
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "laser_cyborg"
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 3
@@ -26,6 +26,8 @@
/obj/item/gun/energy/e_gun/advtaser/cyborg
name = "cyborg taser"
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_flashlight = FALSE
can_charge = FALSE
selfcharge = EGUN_SELFCHARGE_BORG
@@ -48,6 +50,8 @@
/obj/item/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_charge = FALSE
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
selfcharge = EGUN_SELFCHARGE_BORG
@@ -153,6 +153,7 @@
var/robot = pick(200;/mob/living/silicon/robot,
/mob/living/silicon/robot/modules/syndicate,
/mob/living/silicon/robot/modules/syndicate/medical,
/mob/living/silicon/robot/modules/syndicate/saboteur,
200;/mob/living/simple_animal/drone/polymorphed)
new_mob = new robot(M.loc)
if(issilicon(new_mob))
+6 -1
View File
@@ -132,7 +132,12 @@
/obj/machinery/disposal/proc/can_stuff_mob_in(mob/living/target, mob/living/user, pushing = FALSE)
if(!pushing && !iscarbon(user) && !user.ventcrawler) //only carbon and ventcrawlers can climb into disposal by themselves.
return FALSE
if (iscyborg(user))
var/mob/living/silicon/robot/borg = user
if (!borg.module || !borg.module.canDispose)
return
else
return FALSE
if(!isturf(user.loc)) //No magically doing it from inside closets
return FALSE
if(target.buckled || target.has_buckled_mobs())
@@ -52,6 +52,10 @@
if(istype(AM, /obj/item/smallDelivery) && !hasmob)
var/obj/item/smallDelivery/T = AM
src.destinationTag = T.sortTag
else if(istype(AM, /mob/living/silicon/robot))
var/obj/item/destTagger/borg/tagger = locate() in AM
if (tagger)
src.destinationTag = tagger.currTag
// start the movement process
+8 -2
View File
@@ -147,6 +147,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "cargotagger"
var/currTag = 0 //Destinations are stored in code\globalvars\lists\flavor_misc.dm
var/locked_destination = FALSE //if true, users can't open the destination tag window to prevent changing the tagger's current destination
w_class = WEIGHT_CLASS_TINY
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
@@ -154,6 +155,10 @@
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
/obj/item/destTagger/borg
name = "cyborg destination tagger"
desc = "Used to fool the disposal mail network into thinking that you're a harmless parcel. Does actually work as a regular destination tagger as well."
/obj/item/destTagger/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins tagging [user.p_their()] final destination! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if (islizard(user))
@@ -179,8 +184,9 @@
onclose(user, "destTagScreen")
/obj/item/destTagger/attack_self(mob/user)
openwindow(user)
return
if(!locked_destination)
openwindow(user)
return
/obj/item/destTagger/Topic(href, href_list)
add_fingerprint(usr)
+10
View File
@@ -1123,6 +1123,16 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes
cost = 35
restricted = TRUE
/datum/uplink_item/support/reinforcement/saboteur_borg
name = "Syndicate Saboteur Cyborg"
desc = "A streamlined engineering cyborg, equipped with covert modules. Also incapable of leaving the welder in the shuttle. \
Aside from regular Engineering equipment, it comes with a special destination tagger that lets it traverse disposals networks. \
Its chameleon projector lets it disguise itself as a Nanotrasen cyborg, on top it has thermal vision and a pinpointer."
item = /obj/item/antag_spawner/nuke_ops/borg_tele/saboteur
refundable = TRUE
cost = 35
restricted = TRUE
/datum/uplink_item/support/gygax
name = "Dark Gygax Exosuit"
desc = "A lightweight exosuit, painted in a dark scheme. Its speed and equipment selection make it excellent \