mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge pull request #515 from Markolie/master
Adds Syndiborg to Nuke Ops, enables shortcuts for borgs/drones, notifies the AI of borg changes
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
Paralyse(3)
|
||||
has_power = 0
|
||||
else
|
||||
if(src.module_state_1)
|
||||
src.cell.use(3)
|
||||
@@ -55,6 +56,7 @@
|
||||
Paralyse(3)
|
||||
|
||||
src.stat = 0
|
||||
has_power = 1
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
var/pose
|
||||
var/base_icon = ""
|
||||
var/crisis = 0
|
||||
var/syndicateborg = 0
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
@@ -143,6 +144,9 @@
|
||||
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
|
||||
/mob/living/silicon/robot/proc/init(var/alien=0)
|
||||
if(syndicateborg)
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
return
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
if(mmi.alien || alien)
|
||||
laws = new /datum/ai_laws/alienmov()
|
||||
@@ -187,7 +191,7 @@
|
||||
if(mmi != null && mmi.alien)
|
||||
modules="Hunter"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
|
||||
designation = modtype
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
var/channels = list()
|
||||
|
||||
@@ -306,6 +310,7 @@
|
||||
|
||||
choose_icon(6,module_sprites)
|
||||
radio.config(channels)
|
||||
notify_ai(2)
|
||||
|
||||
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
|
||||
if(prefix)
|
||||
@@ -359,6 +364,7 @@
|
||||
var/newname
|
||||
newname = copytext(sanitize(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text),1,MAX_NAME_LEN)
|
||||
if (newname != "")
|
||||
notify_ai(3, name, newname)
|
||||
custom_name = newname
|
||||
|
||||
updatename()
|
||||
@@ -1395,3 +1401,35 @@
|
||||
return
|
||||
else
|
||||
src << "Your icon has been set. You now require a module reset to change it."
|
||||
|
||||
/mob/living/silicon/robot/syndicate
|
||||
icon_state = "syndie_bloodhound"
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
syndicateborg = 1
|
||||
modtype = "Synd"
|
||||
faction = list("syndicate")
|
||||
designation = "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()
|
||||
|
||||
Namepick()
|
||||
|
||||
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
|
||||
if(!connected_ai)
|
||||
return
|
||||
switch(notifytype)
|
||||
if(1) //New Cyborg
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='byond://?src=\ref[connected_ai];track2=\ref[connected_ai];track=\ref[src]'>[name]</a></span><br>"
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
@@ -331,14 +331,16 @@
|
||||
/obj/item/weapon/robot_module/syndicate
|
||||
name = "syndicate robot module"
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
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/card/emag(src)
|
||||
return
|
||||
/obj/item/weapon/robot_module/syndicate/New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/card/emag(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/laser/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/combat
|
||||
name = "combat robot module"
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
// robot_upgrades.dm
|
||||
// Contains various borg upgrades.
|
||||
|
||||
/obj/item/borg/upgrade/
|
||||
name = "A borg upgrade module."
|
||||
desc = "Protected by FRM."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade"
|
||||
var/construction_time = 120
|
||||
var/construction_cost = list("metal"=10000)
|
||||
var/locked = 0
|
||||
var/require_module = 0
|
||||
var/installed = 0
|
||||
|
||||
/obj/item/borg/upgrade/proc/action()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset/
|
||||
name = "Borg module reset board"
|
||||
desc = "Used to reset a borg's module. Destroys any other upgrades applied to the borg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
|
||||
R.uneq_all()
|
||||
del(R.module)
|
||||
R.module = null
|
||||
R.modtype = "robot"
|
||||
R.real_name = "Cyborg [R.ident]"
|
||||
R.name = R.real_name
|
||||
R.nopush = 0
|
||||
R.hands.icon_state = "nomod"
|
||||
R.base_icon = "robot"
|
||||
R.icon_state = "robot"
|
||||
R.updateicon()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/flashproof/
|
||||
name = "Borg Flash-Supression"
|
||||
desc = "A highly advanced, complicated system for supressing incoming flashes directed at the borg's optical processing system."
|
||||
construction_cost = list("metal"=10000,"gold"=2000,"silver"=3000,"glass"=2000, "diamond"=5000)
|
||||
icon_state = "cyborg_upgrade4"
|
||||
require_module = 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/flashproof/New() // Why the fuck does the fabricator make a new instance of all the items?
|
||||
//desc = "Sunglasses with duct tape." // Why? D:
|
||||
|
||||
/obj/item/borg/upgrade/flashproof/action(var/mob/living/silicon/robot/R)
|
||||
if(R.module)
|
||||
R.module += src
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/restart/
|
||||
name = "Borg emergancy restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired borg, bringing it back online."
|
||||
construction_cost = list("metal"=60000 , "glass"=5000)
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
|
||||
if(!R.key)
|
||||
for(var/mob/dead/observer/ghost in world)
|
||||
if(ghost.corpse == R && ghost.client)
|
||||
ghost.client.mob = ghost.corpse
|
||||
|
||||
if(R.health < 0)
|
||||
usr << "You have to repair the borg before using this module!"
|
||||
return 0
|
||||
|
||||
R.stat = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/vtec/
|
||||
name = "Borg VTEC Module"
|
||||
desc = "Used to kick in a borgs VTEC systems, increasing their speed."
|
||||
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
|
||||
icon_state = "cyborg_upgrade2"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
|
||||
if(R.speed == -1)
|
||||
return 0
|
||||
|
||||
R.speed--
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/tasercooler/
|
||||
name = "Borg Rapid Taser Cooling Module"
|
||||
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate.."
|
||||
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/tasercooler/action(var/mob/living/silicon/robot/R)
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/security))
|
||||
R << "Upgrade mounting error! No suitable hardpoint detected!"
|
||||
usr << "There's no mounting point for the module!"
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R.module
|
||||
if(!T)
|
||||
T = locate() in R.module.contents
|
||||
if(!T)
|
||||
T = locate() in R.module.modules
|
||||
if(!T)
|
||||
usr << "This cyborg has had its taser removed!"
|
||||
return 0
|
||||
|
||||
if(T.recharge_time <= 2)
|
||||
R << "Maximum cooling achieved for this hardpoint!"
|
||||
usr << "There's no room for another cooling unit!"
|
||||
return 0
|
||||
|
||||
else
|
||||
T.recharge_time = max(2 , T.recharge_time - 4)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/jetpack/
|
||||
name = "Mining Borg Jetpack"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations"
|
||||
construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/jetpack/action(var/mob/living/silicon/robot/R)
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/miner))
|
||||
R << "Upgrade mounting error! No suitable hardpoint detected!"
|
||||
usr << "There's no mounting point for the module!"
|
||||
return 0
|
||||
else
|
||||
R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
|
||||
R.internals = src
|
||||
R.icon_state="Miner+j"
|
||||
return 1
|
||||
@@ -111,21 +111,31 @@
|
||||
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
var/desig = "Unknown" //ezmode for taters
|
||||
if(isrobot(src))
|
||||
var/mob/living/silicon/S = src
|
||||
if(S.designation)
|
||||
desig = trim_left(S.designation)
|
||||
else
|
||||
desig = "Default"
|
||||
else if(isAI(src))
|
||||
desig = "AI"
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name] ([desig])</span> <span class='message'>[message_a]</span></span></i>"
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
if(S.robot_talk_understand && (S.robot_talk_understand == robot_talk_understand)) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else if(istype(S , /mob/dead/observer) && S.stat == DEAD)
|
||||
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name] ([desig])</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(rendered2, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/list/hud_list[10]
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/designation = ""
|
||||
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
|
||||
O.loc = loc
|
||||
O.job = "Cyborg"
|
||||
O.notify_ai(1)
|
||||
|
||||
if(O.mind.assigned_role == "Cyborg")
|
||||
if(O.mind.role_alt_title == "Android")
|
||||
|
||||
@@ -18,31 +18,31 @@
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 10 //Time it takes for shots to recharge (in ticks)
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(!power_supply) return 0 //sanity
|
||||
if(power_supply.charge >= power_supply.maxcharge) return 0 // check if we actually need to recharge
|
||||
if(!power_supply) return 0 //sanity
|
||||
if(power_supply.charge >= power_supply.maxcharge) return 0 // check if we actually need to recharge
|
||||
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(charge_cost) //Take power from the borg...
|
||||
power_supply.give(charge_cost) //... to recharge the shot
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(charge_cost) //Take power from the borg...
|
||||
power_supply.give(charge_cost) //... to recharge the shot
|
||||
|
||||
update_icon()
|
||||
return 1
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/stunrevolver
|
||||
@@ -70,30 +70,39 @@
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
var/charge_tick = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
/obj/item/weapon/gun/energy/crossbow/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 4) return 0
|
||||
charge_tick = 0
|
||||
if(!power_supply) return 0
|
||||
power_supply.give(1000)
|
||||
return 1
|
||||
|
||||
Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
process()
|
||||
charge_tick++
|
||||
if(charge_tick < 4) return 0
|
||||
charge_tick = 0
|
||||
if(!power_supply) return 0
|
||||
power_supply.give(1000)
|
||||
/obj/item/weapon/gun/energy/crossbow/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/cyborg/process()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/cyborg/process_chambered()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(100)
|
||||
in_chamber = new /obj/item/projectile/energy/bolt(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/largecrossbow
|
||||
name = "Energy Crossbow"
|
||||
|
||||
Reference in New Issue
Block a user