Adding syndicate cyborgs (#559)

Adding an improved syndicate and a tool that allows people to deploy one, by getting one from the ghost pool.
This commit is contained in:
Alberyk
2016-08-02 15:40:13 -03:00
committed by skull132
parent fef1c0181b
commit 525b3f0864
9 changed files with 162 additions and 30 deletions

View File

@@ -0,0 +1,74 @@
// Helper proc to make sure no more than one active syndieborg exists at a time.
/proc/can_buy_syndieborg()
for (var/mob/living/silicon/robot/R in silicon_mob_list)
if (istype(R, /mob/living/silicon/robot/syndicate))
return 0
return 1
/obj/item/weapon/antag_spawner
throw_speed = 1
throw_range = 5
w_class = 1.0
var/used = 0
/obj/item/weapon/antag_spawner/proc/spawn_antag(var/client/C, var/turf/T, var/type = "")
return
/obj/item/weapon/antag_spawner/proc/equip_antag(mob/target as mob)
return
/obj/item/weapon/antag_spawner/borg_tele
name = "Syndicate Cyborg Teleporter"
desc = "A single-use teleporter used to deploy a Syndicate Cyborg on the field. Due to budget restrictions, it is only possible to deploy a single cyborg at time."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/searching = 0
var/askDelay = 10 * 60 * 1
/obj/item/weapon/antag_spawner/borg_tele/attack_self(mob/user)
user << "<span class='notice'>The syndicate robot teleporter is attempting to locate an available cyborg.</span>"
searching = 1
for(var/mob/dead/observer/O in player_list)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "Syndicate") && jobban_isbanned(O, "Mercenary") && jobban_isbanned(O, "Cyborg"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_OPERATIVE)
question(O.client)
spawn(600)
searching = 0
if(!used)
user << "<span class='warning'>Unable to connect to the Syndicate Command. Perhaps you could try again later?</span>"
/obj/item/weapon/antag_spawner/borg_tele/proc/question(var/client/C)
spawn(0)
if(!C)
return
var/response = alert(C, "Someone is requesting a syndicate cyborg Would you like to play as one?",
"Syndicate robot request","Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a syndicate cyborg?", "Syndicate cyborg request", "Yes", "No")
if(!C || used || !searching)
return
if(response == "Yes")
spawn_antag(C, get_turf(src))
else if (response == "Never for this round")
C.prefs.be_special ^= BE_OPERATIVE
obj/item/weapon/antag_spawner/borg_tele/spawn_antag(client/C, turf/T)
var/datum/effect/effect/system/spark_spread/S = new /datum/effect/effect/system/spark_spread
S.set_up(4, 1, src)
S.start()
var/mob/living/silicon/robot/H = new /mob/living/silicon/robot/syndicate(T)
C.prefs.copy_to(H)
H.key = C.key
H.name = "S.Y.N.D.I."
H.mind.special_role = "Mercenary"
H << "<b>You are a syndicate cyborg, bound to help and follow the orders of the mercenaries that are deploying you. Remember to speak to the other mercenaries to know more about their plans, you are also able to change your name using the name pick command.</b>"
spawn(1)
used = 1
qdel(src)

View File

@@ -88,7 +88,8 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP")
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP"),
new/datum/uplink_item(/obj/item/weapon/antag_spawner/borg_tele, 14, "Syndicate Cyborg Teleporter", "SCT", /proc/can_buy_syndieborg)
),
"Implants" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_freedom, 3, "Freedom Implant", "FI"),

View File

@@ -12,13 +12,17 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/path = null
var/reference = ""
var/description = ""
var/canBuyCheck = null
var/list/canBuyParams = list()
datum/uplink_item/New(var/itemPath, var/itemCost, var/itemName, var/itemReference, var/itemDescription)
datum/uplink_item/New(var/itemPath, var/itemCost, var/itemName, var/itemReference, var/itemDescription, var/newBuyCheck = null, var/list/newBuyParams = list())
cost = itemCost
path = itemPath
name = itemName
reference = itemReference
description = itemDescription
canBuyCheck = newBuyCheck
canBuyParams = newBuyParams
datum/uplink_item/proc/description()
if(!description)
@@ -36,6 +40,12 @@ datum/uplink_item/proc/description()
L += new item_path(newloc)
return L
/datum/uplink_item/proc/can_buy()
if (!canBuyCheck)
return 1
return call(canBuyCheck)(canBuyParams)
datum/nano_item_lists
var/list/items_nano
var/list/items_reference
@@ -125,7 +135,7 @@ datum/nano_item_lists
var/list/random_items = new
for(var/IR in ItemsReference)
var/datum/uplink_item/UI = ItemsReference[IR]
if(UI.cost <= uses)
if(UI.cost <= uses && UI.can_buy())
random_items += UI
return pick(random_items)
@@ -144,6 +154,10 @@ datum/nano_item_lists
/obj/item/device/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(UI && UI.cost <= uses)
if (!UI.can_buy())
usr << "<span class='warning'>This item is restricted for the time being! See about buying something else.</span>"
return 0
uses -= UI.cost
used_TC += UI.cost
feedback_add_details("traitor_uplink_items_bought", reference)

View File

@@ -95,21 +95,6 @@
/mob/living/silicon/robot/proc/robot_checklaws
)
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
..()
/mob/living/silicon/robot/New(loc,var/unfinished = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
@@ -184,17 +169,6 @@
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
new /obj/item/weapon/robot_module/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/SetName(pickedName as text)
custom_name = pickedName
updatename()

View File

@@ -642,7 +642,9 @@ var/global/list/robot_modules = list(
loc = R
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/energy/sword(src)
src.modules += new /obj/item/weapon/gun/energy/pulse_rifle/destroyer(src)
src.modules += new /obj/item/weapon/gun/energy/mountedsmg(src)
src.modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/card/emag(src)
supported_upgrades = list(/obj/item/robot_parts/robot_component/jetpack)

View File

@@ -0,0 +1,59 @@
//syndicate cyborgs, they aren't fully linked to the station, also are more combat oriented, for now only the regular assault module - alberyk
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
modtype = "Syndicate"
icon = 'icons/mob/robots.dmi'
icon_state = "syndie_bloodhound"
lawchannel = "State"
req_access = list(access_syndicate)
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
new /obj/item/weapon/robot_module/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
if(!jetpack)
jetpack = new /obj/item/weapon/tank/jetpack/carbondioxide/synthetic(src)
..()
//syndicate borg gear
/obj/item/weapon/gun/energy/mountedsmg
name = "mounted SMG"
desc = "A cyborg mounted sub machine gun, it can print more bullets over time."
icon_state = "lawgiver" //placeholder for now
item_state = "lawgiver"
fire_sound = 'sound/weapons/Gunshot_light.ogg'
max_shots = 20
charge_cost = 100
projectile_type = /obj/item/projectile/bullet/pistol
self_recharge = 1
use_external_power = 1
recharge_time = 5
firemodes = list(
list(name="semiauto", burst=1, fire_delay=0),
list(name="3-round bursts", burst=3, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 1.0)),
list(name="short bursts", burst=5, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)),
)
/obj/item/weapon/gun/energy/crossbow/cyborg
name = "mounted energy-crossbow"
desc = "A weapon favored by mercenary infiltration teams, this one is suited to be used by cyborgs."
max_shots = 4
charge_cost = 200
use_external_power = 1