Merge pull request #532 from SamCroswell/master

Deathsquad Cyborgs
This commit is contained in:
Fox-McCloud
2014-11-27 10:43:47 -05:00
7 changed files with 111 additions and 25 deletions
+2 -2
View File
@@ -121,8 +121,8 @@
var/throw_damage = O.throwforce*(speed/5)
//var/miss_chance = 15
if (O.throw_source)
var/distance = get_dist(O.throw_source, loc)
//if (O.throw_source)
//var/distance = get_dist(O.throw_source, loc)
//miss_chance = min(15*(distance-2), 0)
/*
if (prob(miss_chance))
+61 -6
View File
@@ -1242,7 +1242,7 @@
else
src << "Module isn't activated"
installed_modules()
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawc"])
switch(lawcheck[L+1])
@@ -1404,6 +1404,61 @@
else
src << "Your icon has been set. You now require a module reset to change it."
/mob/living/silicon/robot/deathsquad
var/searching_for_ckey = 0
icon_state = "nano_bloodhound"
lawupdate = 0
scrambledcodes = 1
syndicateborg = 1
modtype = "Commando"
faction = list("nanotrasen")
designation = "NT Combat Cyborg"
req_access = list(access_cent_specops)
/mob/living/silicon/robot/deathsquad/New(loc)
..()
cell.maxcharge = 50000
cell.charge = 50000
radio = new /obj/item/device/radio/borg/deathsquad(src)
module = new /obj/item/weapon/robot_module/deathsquad(src)
laws = new /datum/ai_laws/deathsquad()
/mob/living/silicon/robot/deathsquad/attack_hand(mob/user)
if((ckey == null) && searching_for_ckey == 0 && (alert(user,"Attempt to boot NanoTrasen Commando cyborg?","","Yes","No") == "Yes"))
get_borg_occupant(user, get_candidates())
return
..()
/mob/living/silicon/robot/deathsquad/proc/get_borg_occupant(mob/user as mob, var/list/possiblecandidates = list())
var/time_passed = world.time
searching_for_ckey = 1
if(possiblecandidates.len <= 0)
searching_for_ckey = 0
user << "<span class='notice'>Cyborg MMI interface failure, unit unable to be started.</span>"
return
else
var/possibleborg = pick(possiblecandidates)
spawn(0)
var/input = alert(possibleborg,"Do you want to spawn in as a cyborg for the NT Deathsquad?","Please answer in thirty seconds!","Yes","No")
if(input == "Yes" && ckey == null)
if((world.time-time_passed)>300)
return
possiblecandidates -= possibleborg
searching_for_ckey = 0
ckey = possibleborg
else
possiblecandidates -= possibleborg
get_borg_occupant(user, possiblecandidates)
return
sleep(300)
if(searching_for_ckey)
possiblecandidates -= possibleborg
get_borg_occupant(user, possiblecandidates)
return
/mob/living/silicon/robot/syndicate
icon_state = "syndie_bloodhound"
lawupdate = 0
@@ -1414,18 +1469,18 @@
designation = "Syndicate"
modtype = "Syndicate"
req_access = list(access_syndicate)
/mob/living/silicon/robot/syndicate/New(loc)
..()
cell.maxcharge = 25000
cell.charge = 25000
radio = new /obj/item/device/radio/borg/syndicate(src)
module = new /obj/item/weapon/robot_module/syndicate(src)
laws = new /datum/ai_laws/syndicate_override()
laws = new /datum/ai_laws/syndicate_override()
Namepick()
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
if(!connected_ai)
return
@@ -328,6 +328,20 @@
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
return
/obj/item/weapon/robot_module/deathsquad
name = "NT advanced combat module"
/obj/item/weapon/robot_module/deathsquad/New()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
src.modules += new /obj/item/weapon/gun/energy/pulse_rifle/cyborg(src)
src.modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.emag = null
return
/obj/item/weapon/robot_module/syndicate
name = "syndicate robot module"