mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3415 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -381,6 +381,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"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
var/wiresexposed = 0
|
||||
var/locked = 1
|
||||
var/list/req_access = list(access_robotics)
|
||||
var/ident = 0
|
||||
//var/list/laws = list()
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||
var/viewalerts = 0
|
||||
|
||||
@@ -407,3 +407,35 @@
|
||||
desc = "It has a picture of drinking glasses on it."
|
||||
icon_state = "box"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/resources/
|
||||
desc = "It's an emergancy storage closet for repairs."
|
||||
|
||||
/obj/structure/closet/syndicate/resources/New()
|
||||
..()
|
||||
|
||||
var/list/resources = list(
|
||||
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/gold,
|
||||
/obj/item/stack/sheet/silver,
|
||||
/obj/item/stack/sheet/plasma,
|
||||
/obj/item/stack/sheet/uranium,
|
||||
/obj/item/stack/sheet/diamond,
|
||||
/obj/item/stack/sheet/clown,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
sleep(2)
|
||||
|
||||
for(var/i = 0, i<2, i++)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
|
||||
return
|
||||
|
||||
93
code/game/asteroid/artifacts.dm
Normal file
93
code/game/asteroid/artifacts.dm
Normal file
@@ -0,0 +1,93 @@
|
||||
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,
|
||||
/obj/structure/closet/syndicate/resources,
|
||||
/obj/machinery/wish_granter
|
||||
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
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++
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
var/global/max_secret_rooms = 6
|
||||
|
||||
|
||||
|
||||
|
||||
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)
|
||||
@@ -97,7 +102,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
|
||||
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 +115,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)
|
||||
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 +168,73 @@ 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
|
||||
|
||||
while(!valid)
|
||||
valid = 1
|
||||
sanity++
|
||||
if(sanity > 100)
|
||||
return 0
|
||||
|
||||
|
||||
T=pick(get_area_turfs(/area/mine/unexplored))
|
||||
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(!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 = pick(space_surprises)
|
||||
if(surprise in spawned_surprises)
|
||||
if(prob(20))
|
||||
valid++
|
||||
else
|
||||
continue
|
||||
else
|
||||
valid++
|
||||
|
||||
spawned_surprises.Add(surprise)
|
||||
new surprise(T)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -201,6 +201,35 @@ datum/objective/block
|
||||
return 0
|
||||
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)
|
||||
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
|
||||
|
||||
|
||||
datum/objective/escape
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -111,8 +111,24 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
),
|
||||
|
||||
"Cyborg Upgrade Modules" = list(
|
||||
/obj/item/borg/upgrade/reset
|
||||
///obj/item/borg/upgrade/flashproof
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"Misc"=list(/obj/item/mecha_parts/mecha_tracking)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
component_parts = list()
|
||||
@@ -124,6 +140,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.
|
||||
@@ -295,7 +313,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))
|
||||
|
||||
@@ -85,7 +85,10 @@
|
||||
flashfail = 1
|
||||
|
||||
else if(issilicon(M))
|
||||
if(!M:flashproof())
|
||||
M.Weaken(rand(5,10))
|
||||
else
|
||||
flashfail++
|
||||
|
||||
if(isrobot(user))
|
||||
spawn(0)
|
||||
|
||||
@@ -1273,11 +1273,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)
|
||||
@@ -2309,6 +2317,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>"
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
verbs += /client/proc/drop_bomb
|
||||
verbs += /client/proc/cmd_admin_grantfullaccess
|
||||
verbs += /client/proc/jump_to_dead_group
|
||||
verbs += /client/proc/kill_airgroup
|
||||
verbs += /client/proc/cmd_admin_drop_everything
|
||||
verbs += /client/proc/make_sound
|
||||
verbs += /client/proc/play_local_sound
|
||||
@@ -411,6 +412,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 --removed due to runtimes
|
||||
verbs -= /client/proc/kill_airgroup
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -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")
|
||||
@@ -195,6 +195,27 @@
|
||||
usr.loc = pick(dest_group.members)
|
||||
return
|
||||
|
||||
kill_airgroup()
|
||||
set name = "Kill Local Airgroup"
|
||||
set desc = "Use this to allow manual manupliation of atmospherics."
|
||||
set category = "Debug"
|
||||
if(!authenticated || !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!"
|
||||
|
||||
|
||||
tension_report()
|
||||
set category = "Debug"
|
||||
set name = "Show Tension Report"
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.real_name == "Cyborg")
|
||||
src.ident = rand(1, 999)
|
||||
src.real_name += " "
|
||||
src.real_name += "-[rand(1, 999)]"
|
||||
src.real_name += "-[ident]"
|
||||
src.name = src.real_name
|
||||
if(!src.connected_ai)
|
||||
for(var/mob/living/silicon/ai/A in world)
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
updateicon()
|
||||
// syndicate = syndie
|
||||
if(real_name == "Cyborg")
|
||||
real_name += " [pick(rand(1, 999))]"
|
||||
ident = rand(1, 999)
|
||||
real_name += "-[ident]"
|
||||
name = real_name
|
||||
|
||||
spawn (4)
|
||||
@@ -487,10 +488,61 @@
|
||||
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)
|
||||
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
|
||||
usr << "You apply the upgrade to [src]!"
|
||||
usr.drop_item()
|
||||
U.loc = src
|
||||
U.action(src)
|
||||
|
||||
|
||||
else
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -1026,3 +1078,11 @@ Frequency:
|
||||
R.UnlinkSelf()
|
||||
R << "Buffers flushed and reset. All systems operational."
|
||||
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/flashproof()
|
||||
if(module)
|
||||
for(var/obj/item/borg/upgrade/flashproof/F in module.modules)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
47
code/modules/mob/living/silicon/robot/robot_upgrades.dm
Normal file
47
code/modules/mob/living/silicon/robot/robot_upgrades.dm
Normal file
@@ -0,0 +1,47 @@
|
||||
// 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
|
||||
|
||||
/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."
|
||||
|
||||
/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
|
||||
|
||||
|
||||
|
||||
/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)
|
||||
|
||||
|
||||
/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
|
||||
@@ -178,6 +178,7 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
@@ -371,6 +372,7 @@
|
||||
#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"
|
||||
@@ -934,6 +936,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"
|
||||
|
||||
Reference in New Issue
Block a user