TG: Adds randomlly spawning rooms to the mining asteroid that contain various

goodies.  (Among them are a modified traitor beacon, a cloaking device and a
closet full of resources so you can go build your own honk.)
These rooms will spawn at least out of range of space and the explored pathways,
so at the very least some mining is required to even detect them with mesons.
Adds a borg upgrade system. Right now, it just contians a borg reset module that
allows the borg to choose their module again.  Adds some support code to borgs
to suppot flashproofing and renaming.
Adds a few various admin commands like a quick-list of objects (which is
hardcoded) and a command to break the local air group.
Revision: r3415
Author: 	 VivianFoxfoot
This commit is contained in:
Ren Erthilo
2012-05-02 00:21:18 +01:00
parent adc0b18918
commit f7e4ab6975
19 changed files with 554 additions and 37 deletions
+5
View File
@@ -392,6 +392,10 @@
#include "code\game\vote.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
#include "code\game\asteroid\artifacts.dm"
#include "code\game\asteroid\asteroid.dm"
#include "code\game\asteroid\device.dm"
#include "code\game\asteroid\turf.dm"
#include "code\game\events\Event.dm"
#include "code\game\events\EventsMain.dm"
#include "code\game\events\EventProcs\black_hole.dm"
@@ -1006,6 +1010,7 @@
#include "code\modules\mob\living\silicon\robot\robot_defense.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\robot_upgrades.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\new_player\hud.dm"
@@ -383,6 +383,24 @@ proc/process_ghost_teleport_locs()
icon_state = "cave"
requires_power = 0
/area/asteroid/artifactroom
name = "Asteroid - Artifact"
icon_state = "cave"
/area/planet/clown
name = "Clown Planet"
icon_state = "honk"
+1 -1
View File
@@ -12,7 +12,7 @@ var/global
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
// list/global_map = null
list/global_map = null
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
+115
View File
@@ -0,0 +1,115 @@
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
// /obj/effect/critter/spesscarp =2,
/obj/effect/critter/spesscarp/elite =2,
// /obj/creature =0,
// /obj/item/weapon/rcd =0,
// /obj/item/weapon/rcd_ammo =0,
// /obj/item/weapon/spacecash =0,
// /obj/item/weapon/cloaking_device =1,
// /obj/item/weapon/gun/energy/teleport_gun =0,
// /obj/item/weapon/rubber_chicken =0,
/obj/item/weapon/melee/energy/sword/pirate =3,
/obj/structure/closet/syndicate/resources =2,
// /obj/machinery/wish_granter =1, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.>
// /obj/item/clothing/glasses/thermal =2, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe.
// /obj/item/weapon/storage/box/stealth/ =2
// =11
)
var/global/list/spawned_surprises = list()
/obj/machinery/wish_granter
name = "Wish Granter"
desc = "You're not so sure about this, anymore..."
icon = 'device.dmi'
icon_state = "syndbeacon"
anchored = 1
density = 1
var
charges = 1
insisting = 0
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.machine = src
if(charges <= 0)
user << "The Wish Granter lies silent."
return
else if(!istype(user, /mob/living/carbon/human))
user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."
return
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
else if (!insisting)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insisting++
else
user << "You speak. [pick("I want the station to disappear","Humanity is corrupt, mankind must be destroyed","I want to be rich", "I want to rule the world","I want immortality.")]. The Wish Granter answers."
user << "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first."
charges--
insisting = 0
if (!(user.mutations & HULK))
user.mutations |= HULK
if (!(user.mutations & LASER))
user.mutations |= LASER
if (!(user.mutations & XRAY))
user.mutations |= XRAY
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = 2
if (!(user.mutations & COLD_RESISTANCE))
user.mutations |= COLD_RESISTANCE
if (!(user.mutations & TK))
user.mutations |= TK
if(!(user.mutations & HEAL))
user.mutations |= HEAL
ticker.mode.traitors += user.mind
user.mind.special_role = "Avatar of the Wish Granter"
var/datum/objective/silence/silence = new
silence.owner = user.mind
user.mind.objectives += silence
var/obj_count = 1
for(var/datum/objective/OBJ in user.mind.objectives)
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
world << "You have a very bad feeling about this."
return
/obj/item/weapon/storage/box/stealth/
name = "Infiltration Gear"
desc = "An old box full of old equipment. It doesn't look like it was ever opened."
/obj/item/weapon/storage/box/stealth/New()
..()
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/clothing/shoes/syndigaloshes(src)
return
+112 -23
View File
@@ -1,3 +1,8 @@
var/global/max_secret_rooms = 3
proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon
if(!size)
size = pick(100;2,50;3,35;4,25;6,10;12)
@@ -51,7 +56,8 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
density--
return
//this is terrible! -Pete
/*
/datum/game_mode/proc/setup_sectors()
world << "\blue \b Randomizing space sectors."
var/list/sectors = list(1,3,4,0,0,0,0,0,0)
@@ -95,9 +101,9 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
new /obj/item/weapon/storage/explorers_box(L.loc)
del(L)
return
*/
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
@@ -110,24 +116,45 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
del(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
T = new wall(cur_loc)
room_turfs["walls"] += T
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
proc/admin_spawn_room_at_pos()
var/wall
var/floor
var/x = input("X position","X pos",1)
var/y = input("Y position","Y pos",1)
var/z = input("Z position","Z pos",1)
var/x = input("X position","X pos",usr.x)
var/y = input("Y position","Y pos",usr.y)
var/z = input("Z position","Z pos",usr.z)
var/x_len = input("Desired length.","Length",5)
var/y_len = input("Desired width.","Width",5)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Asteroid wall","Resin wall"))
var/clean = input("Delete existing items in area?" , "Clean area?", 0)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Resin wall"))
if("Reinforced wall")
wall=/turf/simulated/wall/r_wall
if("Regular wall")
@@ -142,21 +169,83 @@ proc/admin_spawn_room_at_pos()
if("Reinforced floor")
floor=/turf/simulated/floor/engine
if(x && y && z && wall && floor && x_len && y_len)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor,clean)
return
var/global/list/space_surprises = list(/obj/item/clothing/mask/facehugger,
/obj/effect/critter/spesscarp,
/obj/effect/critter/spesscarp/elite,
// /obj/creature,
/obj/item/weapon/rcd,
/obj/item/weapon/rcd_ammo,
/obj/item/weapon/spacecash,
// /obj/item/weapon/cloaking_device,
// /obj/item/weapon/gun/energy/teleport_gun,
/obj/item/weapon/rubber_chicken,
/obj/item/weapon/melee/energy/sword/pirate
)
var/global/max_secret_rooms = 6
proc/make_mining_asteroid_secret(var/size = 5)
var/valid = 0
var/turf/T = null
var/sanity = 0
var/list/room = null
var/list/turfs = null
turfs = get_area_turfs(/area/mine/unexplored)
if(!turfs.len)
return 0
while(!valid)
valid = 1
sanity++
if(sanity > 100)
return 0
T=pick(turfs)
if(!T)
return 0
var/list/surroundings = list()
surroundings += range(7, locate(T.x,T.y,T.z))
surroundings += range(7, locate(T.x+size,T.y,T.z))
surroundings += range(7, locate(T.x,T.y+size,T.z))
surroundings += range(7, locate(T.x+size,T.y+size,T.z))
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
valid = 0
continue
if(locate(/turf/space) in surroundings)
valid = 0
continue
if(locate(/area/asteroid/artifactroom) in surroundings)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
if(!T)
return 0
room = spawn_room(T,size,size,,,1)
if(room)
T = pick(room["floors"])
if(T)
var/surprise = null
valid = 0
while(!valid)
surprise = pickweight(space_surprises)
if(surprise in spawned_surprises)
if(prob(20))
valid++
else
continue
else
valid++
spawned_surprises.Add(surprise)
new surprise(T)
return 1
+2 -2
View File
@@ -1071,7 +1071,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
return
/*/atom/proc/get_global_map_pos()
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null
var/cur_y = null
@@ -1085,7 +1085,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
return 0 */
return 0
/atom/proc/checkpass(passflag)
return pass_flags&passflag
+31 -1
View File
@@ -1355,4 +1355,34 @@ datum
captured_amount+=2
if(captured_amount<target_amount)
return 0
return 1
return 1
datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(emergency_shuttle.location<2)
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/area/pod1 = locate(/area/shuttle/escape_pod1/centcom)
var/area/pod2 = locate(/area/shuttle/escape_pod2/centcom)
var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
for(var/mob/living/player in world)
if (player == owner.current)
continue
if (player.mind)
if (player.stat != 2)
if (get_turf(player) in shuttle)
return 0
if (get_turf(player) in pod1)
return 0
if (get_turf(player) in pod2)
return 0
if (get_turf(player) in pod3)
return 0
if (get_turf(player) in pod4)
return 0
return 1
+9 -3
View File
@@ -70,12 +70,18 @@
continue
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses)) continue
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses))
continue
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
if(!H.head:up) continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice)) continue
if(!H.head:up)
continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice))
continue
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
if (istype(O, /mob/living/silicon/robot))
if(O:flashproof())
continue
O.Weaken(strength)
if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
+3
View File
@@ -34,6 +34,9 @@ datum/controller/game_controller
setupgenetics()
for(var/i = 0, i < max_secret_rooms, i++)
make_mining_asteroid_secret()
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
syndicate_code_response = generate_code_phrase()
+18 -1
View File
@@ -111,6 +111,21 @@
/obj/item/mecha_parts/mecha_equipment/weapon/honker
),
"Cyborg Upgrade Modules" = list(
/obj/item/borg/upgrade/reset,
/obj/item/borg/upgrade/restart,
/obj/item/borg/upgrade/vtec
///obj/item/borg/upgrade/tasercooler
///obj/item/borg/upgrade/flashproof
),
"Misc"=list(/obj/item/mecha_parts/mecha_tracking)
)
@@ -128,6 +143,8 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
// part_sets["Cyborg Upgrade Modules"] = typesof(/obj/item/borg/upgrade/) - /obj/item/borg/upgrade/ // Eh. This does it dymaically, but to support having the items referenced otherwhere in the code but not being constructable, going to do it manaully.
for(var/part_set in part_sets)
convert_part_set(part_set)
files = new /datum/research(src) //Setup the research data holder.
@@ -299,7 +316,7 @@
return
proc/check_resources(var/obj/item/mecha_parts/part)
if(istype(part, /obj/item/robot_parts) || istype(part, /obj/item/mecha_parts))
if(istype(part, /obj/item/robot_parts) || istype(part, /obj/item/mecha_parts) || istype(part,/obj/item/borg/upgrade))
for(var/resource in part.construction_cost)
if(resource in src.resources)
if(src.resources[resource] < get_resource_cost_w_coeff(part,resource))
+49 -1
View File
@@ -19,6 +19,8 @@ var/const
var/strength = 5
var/attached = 0
attack_paw(user as mob) //can be picked up by aliens
if(isalien(user))
attack_hand(user)
@@ -87,6 +89,13 @@ var/const
if(!isliving(M) || isalien(M))
return
if(attached)
return
else
attached++
spawn(MAX_IMPREGNATION_TIME)
attached = 0
var/mob/living/L = M //just so I don't need to use :
if(stat != CONSCIOUS)
@@ -180,7 +189,8 @@ var/const
for(var/mob/living/carbon/alien/alien in world)
var/image/activeIndicator = image('alien.dmi', loc = src, icon_state = "facehugger_active")
activeIndicator.override = 1
alien.client.images += activeIndicator
if(alien && alien.client)
alien.client.images += activeIndicator
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
GoIdle()
@@ -220,3 +230,41 @@ var/const
return
/obj/item/clothing/mask/facehugger/angry
stat = CONSCIOUS
/obj/item/clothing/mask/facehugger/angry/HasProximity(atom/movable/AM as mob|obj)
if(istype(AM , /mob/living/))
Attach(AM)
/*
/obj/item/clothing/mask/facehugger/angry/New()
processing_objects.Add(src)
/obj/item/clothing/mask/facehugger/angry/process()
if(!src || src.stat == (DEAD))
return
for(var/mob/living/carbon/C in range(1,src))
Attach(C)
return
for(var/mob/living/carbon/C in range(5,src))
if(isInSight(C,src))
step_to(src,C,0)
spawn(5)
if(C in range(1,src))
Attach(C)
return
step_rand(src)
return
/obj/item/clothing/mask/facehugger/angry/Attach(var/mob/M as mob)
..(M)
processing_objects.Remove(src)
*/
+4 -1
View File
@@ -97,7 +97,10 @@
flashfail = 1
else if(issilicon(M))
M.Weaken(rand(5,10))
if(!M:flashproof())
M.Weaken(rand(5,10))
else
flashfail++
if(isrobot(user))
spawn(0)
+2 -2
View File
@@ -1421,7 +1421,7 @@ turf/simulated/floor/return_siding_icon_state()
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
/*
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
var/cur_y
@@ -1530,7 +1530,7 @@ turf/simulated/floor/return_siding_icon_state()
if ((A && A.loc))
A.loc.Entered(A)
return
*/
/obj/effect/vaultspawner
var/maxX = 6
var/maxY = 6
+9
View File
@@ -1372,11 +1372,19 @@ var/global/BSACooldown = 0
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["quick_create_object"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master"))
return quick_create_object(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_turf"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master"))
return create_turf(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_mob"])
if (src.rank in list("Badmin", "Game Admin", "Game Master"))
return create_mob(usr)
@@ -2519,6 +2527,7 @@ var/global/BSACooldown = 0
if(lvl >= 3 )
dat += "<A href='?src=\ref[src];create_object=1'>Create Object</A><br>"
dat += "<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>"
dat += "<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>"
if(lvl >= 5)
dat += "<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>"
+2
View File
@@ -244,6 +244,7 @@
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/kill_airgroup
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
@@ -443,6 +444,7 @@
//verbs -= /obj/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/admin_deny_shuttle
verbs -= /client/proc/cmd_admin_christmas
verbs -= /client/proc/editappear
+19
View File
@@ -1,4 +1,5 @@
/var/create_object_html = null
/obj/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
@@ -7,3 +8,21 @@
create_object_html = dd_replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(dd_replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
/obj/admins/proc/quick_create_object(var/mob/user)
var/quick_create_object_html = null
var/pathtext = null
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/machinery")
var path = text2path(pathtext)
if (!quick_create_object_html)
var/objectjs = null
objectjs = dd_list2text(typesof(path), ";")
quick_create_object_html = file2text('create_object.html')
quick_create_object_html = dd_replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(dd_replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
+22
View File
@@ -202,6 +202,28 @@
//feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
kill_airgroup()
set name = "Kill Local Airgroup"
set desc = "Use this to allow manual manupliation of atmospherics."
set category = "Debug"
if(!holder)
src << "Only administrators may use this command."
return
if(!air_master)
usr << "Cannot find air_system"
return
var/turf/T = get_turf(usr)
if(istype(T, /turf/simulated))
var/datum/air_group/AG = T:parent
AG.next_check = 30
AG.group_processing = 0
else
usr << "Local airgroup is unsimulated!"
//feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
tension_report()
set category = "Debug"
set name = "Show Tension Report"
+20 -2
View File
@@ -551,6 +551,24 @@
if(prob(25))
src << "Hack attempt detected."
return
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
usr << "You must access the borgs internals!"
else if(!src.module && U.require_module)
usr << "The borg must choose a module before he can be upgraded!"
else if(U.locked)
usr << "The upgrade is locked and cannot be used yet!"
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
else
usr << "Upgrade error!"
else
spark_system.start()
return ..()
@@ -1207,9 +1225,9 @@ Frequency:
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
/*/mob/living/silicon/robot/proc/flashproof()
/mob/living/silicon/robot/proc/flashproof()
if(module)
for(var/obj/item/borg/upgrade/flashproof/F in module.modules)
return 1
return 0*/
return 0
@@ -0,0 +1,113 @@
// robot_upgrades.dm
// Contains various borg upgrades.
/obj/item/borg/upgrade/
name = "A borg upgrade module."
desc = "Protected by FRM."
icon = 'module.dmi'
icon_state = "id_mod"
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."
require_module = 1
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
R.uneq_all()
R.hands.icon_state = "nomod"
R.icon_state = "robot"
del(R.module)
R.module = null
R.modtype = "robot"
R.real_name = "Cyborg [R.ident]"
R.name = R.real_name
R.nopush = 0
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)
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)
/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)
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)
require_module = 1
/obj/item/borg/upgrade/tasercooler/action(var/mob/living/silicon/robot/R)
if(R.module != /obj/item/weapon/robot_module/security)
R << "Upgrade mounting error! No suitable hardpoint detected!"
return 0
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R
if(!T)
return 0
if(T.recharge_time <= 2)
R << "Maximum cooling achieved for this hardpoint!"
return 0
else
T.recharge_time = min(2 , T.recharge_time - 4)
return 1