mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 17:43:35 +01:00
Merge remote-tracking branch 'upstream/master' into pAI-Drone-Port
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
new /obj/item/clothing/under/psyche(C)
|
||||
else
|
||||
new /obj/item/clothing/under/syndicate/combat(C)
|
||||
new /obj/item/clothing/shoes/swat(C)
|
||||
new /obj/item/clothing/shoes/combat(C)
|
||||
new /obj/item/clothing/gloves/swat(C)
|
||||
new /obj/item/clothing/mask/balaclava(C)
|
||||
if("glasses")
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
continue
|
||||
if(alarm.hidden)
|
||||
continue
|
||||
if(alarm.z != z)
|
||||
continue
|
||||
var/turf/pos = get_turf(alarm)
|
||||
var/list/alarm_data=list()
|
||||
alarm_data["ID"]="\ref[alarm]"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
else
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
if (O.damtype == STAMINA)
|
||||
damage = 0
|
||||
health -= damage
|
||||
for(var/mob/M in viewers(src, null))
|
||||
|
||||
@@ -74,18 +74,18 @@
|
||||
if(!crit_fail)
|
||||
if(prob(src.reliability)) return 1 //No failure
|
||||
if(prob(src.reliability))
|
||||
for (var/mob/M in range(0,src.parent)) //Only a minor failure, enjoy your radiation.
|
||||
for (var/mob/living/M in range(0,src.parent)) //Only a minor failure, enjoy your radiation.
|
||||
if(src.parent in M.contents)
|
||||
M << "<span class='danger'>Your armor feels pleasantly warm for a moment.</span>"
|
||||
else
|
||||
M << "<span class='danger'>You feel a warm sensation.</span>"
|
||||
M.radiation += rand(1,40)
|
||||
M.apply_effect(-rand(1,40),IRRADIATE,0)
|
||||
else
|
||||
for (var/mob/M in range(rand(1,4),src.parent)) //Big failure, TIME FOR RADIATION BITCHES
|
||||
for (var/mob/living/M in range(rand(1,4),src.parent)) //Big failure, TIME FOR RADIATION BITCHES
|
||||
if (src.parent in M.contents)
|
||||
M << "<span class='danger'><B>Your armor's reactor overloads!</B></span>"
|
||||
M << "<span class='danger'>You feel a wave of heat wash over you.</span>"
|
||||
M.radiation += 100
|
||||
M.apply_effect(100,IRRADIATE,0)
|
||||
crit_fail = 1 //broken~
|
||||
parent.powerdown(1)
|
||||
spawn(50)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/machinery/computer3/security/mining
|
||||
name = "Outpost Cameras"
|
||||
desc = "Used to access the various cameras on the outpost."
|
||||
spawn_files = list(/datum/file/camnet_key/mining)
|
||||
spawn_files = list(/datum/file/camnet_key/miningoutpost)
|
||||
|
||||
/*
|
||||
Camera monitoring computers, wall-mounted
|
||||
@@ -43,7 +43,7 @@
|
||||
spawn_files = list(/datum/file/camnet_key)
|
||||
|
||||
/obj/machinery/computer3/wall_comp/telescreen/entertainment
|
||||
desc = "Damn, they better have /tg/thechannel on these things."
|
||||
desc = "Damn, they better have Paradise Channel on these things."
|
||||
spawn_files = list(/datum/file/camnet_key/entertainment)
|
||||
|
||||
|
||||
@@ -76,53 +76,96 @@
|
||||
return
|
||||
computer.Crash(MISSING_PROGRAM)
|
||||
|
||||
/datum/file/camnet_key/mining
|
||||
name = "Mining Camera Network Key"
|
||||
title = "mining station"
|
||||
desc = "Connects to mining security cameras."
|
||||
networks = list("MINE")
|
||||
/datum/file/camnet_key/telecomms
|
||||
name = "Telecomms Network Key"
|
||||
title = "telecommunications satellite"
|
||||
desc = "Connects to telecommunications satellite security cameras."
|
||||
networks = list("Telecomms")
|
||||
|
||||
/datum/file/camnet_key/researchoutpost
|
||||
name = "Research Outpost Network Key"
|
||||
title = "research outpost"
|
||||
desc = "Connects to research outpost security cameras."
|
||||
networks = list("Research Outpost")
|
||||
|
||||
/datum/file/camnet_key/miningoutpost
|
||||
name = "Mining Outpost Network Key"
|
||||
title = "mining outpost"
|
||||
desc = "Connects to mining outpost security cameras."
|
||||
networks = list("Mining Outpost")
|
||||
screen = "miningcameras"
|
||||
|
||||
/datum/file/camnet_key/research
|
||||
name = "Research Camera Network Key"
|
||||
name = "Research Network Key"
|
||||
title = "research"
|
||||
networks = list("RD")
|
||||
|
||||
/datum/file/camnet_key/bombrange
|
||||
name = "R&D Bomb Range Camera Network Key"
|
||||
title = "bomb range"
|
||||
desc = "Monitors the bomb range."
|
||||
networks = list("Toxins")
|
||||
|
||||
/datum/file/camnet_key/xeno
|
||||
name = "R&D Misc. Research Camera Network Key"
|
||||
title = "special research"
|
||||
networks = list("Misc")
|
||||
|
||||
/datum/file/camnet_key/singulo
|
||||
name = "Singularity Camera Network Key"
|
||||
title = "singularity"
|
||||
networks = list("Singularity")
|
||||
|
||||
/datum/file/camnet_key/entertainment
|
||||
name = "Entertainment Channel Encryption Key"
|
||||
title = "entertainment"
|
||||
desc = "Damn, I hope they have /tg/thechannel on here."
|
||||
networks = list("thunder")
|
||||
screen = "entertainment"
|
||||
|
||||
/datum/file/camnet_key/creed
|
||||
name = "Special Ops Camera Encryption Key"
|
||||
title = "special ops"
|
||||
desc = "Connects to special ops secure camera feeds."
|
||||
networks = list("CREED")
|
||||
|
||||
desc = "Connects to research security cameras."
|
||||
networks = list("Research")
|
||||
|
||||
/datum/file/camnet_key/prison
|
||||
name = "Prison Camera Network Key"
|
||||
name = "Prison Network Key"
|
||||
title = "prison"
|
||||
desc = "Monitors the prison."
|
||||
desc = "Connects to prison security cameras."
|
||||
networks = list("Prison")
|
||||
|
||||
|
||||
/datum/file/camnet_key/interrogation
|
||||
name = "Interrogation Network Key"
|
||||
title = "interrogation"
|
||||
desc = "Connects to interrogation security cameras."
|
||||
networks = list("Interrogation")
|
||||
|
||||
/datum/file/camnet_key/supermatter
|
||||
name = "Supermatter Network Key"
|
||||
title = "supermatter"
|
||||
desc = "Connects to supermatter security cameras."
|
||||
networks = list("Supermatter")
|
||||
|
||||
/datum/file/camnet_key/singularity
|
||||
name = "Singularity Network Key"
|
||||
title = "singularity"
|
||||
desc = "Connects to singularity security cameras."
|
||||
networks = list("Singularity")
|
||||
|
||||
/datum/file/camnet_key/anomalyisolation
|
||||
name = "Anomaly Isolation Network Key"
|
||||
title = "anomalyisolation"
|
||||
desc = "Connects to interrogation security cameras."
|
||||
networks = list("Anomaly Isolation")
|
||||
|
||||
/datum/file/camnet_key/toxins
|
||||
name = "Toxins Network Key"
|
||||
title = "toxins"
|
||||
desc = "Connects to toxins security cameras."
|
||||
networks = list("Toxins")
|
||||
|
||||
/datum/file/camnet_key/telepad
|
||||
name = "Telepad Network Key"
|
||||
title = "telepad"
|
||||
desc = "Connects to telepad security cameras."
|
||||
networks = list("Telepad")
|
||||
|
||||
/datum/file/camnet_key/ert
|
||||
name = "Emergency Response Team Network Key"
|
||||
title = "emergency response team"
|
||||
desc = "Connects to emergency response team security cameras."
|
||||
networks = list("ERT")
|
||||
|
||||
/datum/file/camnet_key/centcom
|
||||
name = "Central Command Network Key"
|
||||
title = "central command"
|
||||
desc = "Connects to central command security cameras."
|
||||
networks = list("CentCom")
|
||||
|
||||
/datum/file/camnet_key/thunderdome
|
||||
name = "Thunderdome Network Key"
|
||||
title = "thunderdome"
|
||||
desc = "Connects to thunderdome security cameras."
|
||||
networks = list("Thunderdome")
|
||||
|
||||
/datum/file/camnet_key/entertainment
|
||||
name = "Entertainment Network Key"
|
||||
title = "entertainment"
|
||||
desc = "Connects to entertainment security cameras."
|
||||
networks = list("news")
|
||||
|
||||
|
||||
/*
|
||||
@@ -147,7 +190,7 @@
|
||||
if(temp.len)
|
||||
L.Add(C)
|
||||
|
||||
//camera_sort(L)
|
||||
camera_sort(L)
|
||||
|
||||
return L
|
||||
verify_machine(var/obj/machinery/camera/C,var/datum/file/camnet_key/key = null)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/machinery/computer3/card/hop
|
||||
default_prog = /datum/file/program/card_comp
|
||||
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot/dual)
|
||||
spawn_files = list(/datum/file/program/arcade, /datum/file/program/security, /datum/file/camnet_key/mining, /datum/file/camnet_key/entertainment,/datum/file/camnet_key/prison)
|
||||
spawn_files = list(/datum/file/program/arcade, /datum/file/program/security, /datum/file/camnet_key/miningoutpost, /datum/file/camnet_key/entertainment,/datum/file/camnet_key/prison)
|
||||
|
||||
|
||||
/obj/machinery/computer3/card/centcom
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
default_prog = /datum/file/program/communications
|
||||
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/cardslot/dual)
|
||||
spawn_files = list(/datum/file/program/card_comp, /datum/file/program/security, /datum/file/program/crew, /datum/file/program/arcade,
|
||||
/datum/file/camnet_key, /datum/file/camnet_key/entertainment, /datum/file/camnet_key/singulo)
|
||||
/datum/file/camnet_key, /datum/file/camnet_key/entertainment, /datum/file/camnet_key/singularity)
|
||||
|
||||
|
||||
/datum/file/program/communications
|
||||
@@ -130,6 +130,9 @@
|
||||
if("cancelshuttle" in href_list)
|
||||
state = STATE_DEFAULT
|
||||
if(authenticated)
|
||||
cancel_call_proc(usr)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
state = STATE_CANCELSHUTTLE
|
||||
if("messagelist" in href_list)
|
||||
currmsg = 0
|
||||
@@ -286,11 +289,11 @@
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];changeseclevel'>Change alert level</A> \]"
|
||||
if(emergency_shuttle.location())
|
||||
/*if(emergency_shuttle.location())
|
||||
if (emergency_shuttle.online())
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];cancelshuttle'>Cancel Shuttle Call</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];callshuttle'>Call Emergency Shuttle</A> \]"*/
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];status'>Set Status Display</A> \]"
|
||||
else
|
||||
|
||||
@@ -301,7 +301,6 @@ What a mess.*/
|
||||
//RECORD FUNCTIONS
|
||||
if("Search Records")
|
||||
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
|
||||
world << "input [t1]"
|
||||
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !interactable()))
|
||||
return
|
||||
Perp = new/list()
|
||||
|
||||
@@ -296,6 +296,9 @@
|
||||
if(access_security in C.access)
|
||||
newlap.spawn_files += (/datum/file/program/secure_data)
|
||||
newlap.spawn_files += (/datum/file/camnet_key)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/researchoutpost)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/miningoutpost)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/telecomms)
|
||||
newlap.spawn_files += (/datum/file/program/security)
|
||||
if(access_armory in C.access)
|
||||
newlap.spawn_files += (/datum/file/program/prisoner)
|
||||
@@ -312,13 +315,17 @@
|
||||
if(access_engine in C.access)
|
||||
newlap.spawn_files += (/datum/file/program/powermon)
|
||||
if(access_research in C.access)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/researchoutpost)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/research)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/bombrange)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/xeno)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/anomalyisolation)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/toxins)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/telepad)
|
||||
if(access_rd in C.access)
|
||||
newlap.spawn_files += (/datum/file/program/borg_control)
|
||||
if(access_cent_specops in C.access)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/creed)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/ert)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/centcom)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/thunderdome)
|
||||
newlap.spawn_files += (/datum/file/program/arcade)
|
||||
newlap.spawn_files += (/datum/file/camnet_key/entertainment)
|
||||
//Atlantis: Each laptop gets "invisible" program/security - REQUIRED for camnetkeys to work.
|
||||
|
||||
+30
-3
@@ -338,6 +338,32 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
candidates += G.key
|
||||
i++
|
||||
return candidates
|
||||
|
||||
/proc/get_blob_candidates()
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new blob core ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if( G.client && G.client.prefs.be_special & BE_BLOB)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
i++
|
||||
return candidates
|
||||
|
||||
/proc/get_vox_candidates()
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new blob core ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if( G.client && G.client.prefs.be_special & BE_VOX)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
i++
|
||||
return candidates
|
||||
|
||||
/proc/get_slime_candidates()
|
||||
|
||||
@@ -355,9 +381,10 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
proc/get_candidates(be_special_flag=0)
|
||||
. = list()
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
if(G)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
|
||||
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
||||
if(!isobj(O)) O = new /obj/screen/text()
|
||||
|
||||
@@ -22,6 +22,7 @@ var/global/list/side_effects = list() //list of all medical sideeffects types
|
||||
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
|
||||
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
|
||||
var/global/list/flag_list = list() //list of flags during Nations gamemode
|
||||
var/global/list/airlocks = list() //list of all airlocks
|
||||
|
||||
//Languages/species/whitelist.
|
||||
var/global/list/all_species[0]
|
||||
@@ -45,7 +46,7 @@ var/global/list/skin_styles_female_list = list() //unused
|
||||
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
|
||||
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
|
||||
//undershirt
|
||||
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
|
||||
var/global/list/undershirt_t = list("White Shirt", "White Tank top", "Black shirt", "Black Tank top", "Grey Shirt", "Grey tank top", "Lover Shirt", "Blue Ian Shirt", "UK Shirt","I Love NT Shirt", "Peace Shirt", "Band Shirt", "PogoMan Shirt", "Matroska Shirt", "White Short-sleeved shirt", "Purple Short-sleeved shirt", "Blue Short-sleeved shirt", "Green Short-sleeved shirt", "Black Short-Sleeved shirt", "Blue T-Shirt", "Red T-Shirt", "Yellow T-Shirt", "Green T-Shirt", "Blue Polo Shirt", "Red Polo Shirt", "White Polo Shirt", "Gray-Yellow Polo Shirt", "Green Sports Shirt", "Red Sports Shirt", "Blue Sports Shirt", "SS13 Shirt", "Fire Tank Top", "Question Shirt", "Skull Shirt", "Commie Shirt", "Nanotrasen Shirt", "Striped Shirt", "Blue Shirt", "Red Shirt", "Green Shirt", "Meat Shirt", "Tie-Dye Shirt", "Red Jersey", "Blue Jersey", "None")
|
||||
//Backpacks
|
||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
|
||||
/proc/sanitizeSQL(var/t as text)
|
||||
var/sqltext = dbcon.Quote(t);
|
||||
return copytext(sqltext, 2, lentext(sqltext)-1);//Quote() adds quotes around input, we already do that
|
||||
return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that
|
||||
|
||||
/*
|
||||
* Text sanitization
|
||||
|
||||
+58
-52
@@ -82,47 +82,51 @@
|
||||
hex = text("0[]", hex)
|
||||
return hex
|
||||
|
||||
|
||||
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
|
||||
/proc/list2text(list/ls, sep)
|
||||
if(ls.len <= 1) return ls.len ? ls[1] : ""
|
||||
. = ""
|
||||
var/l = ls.len
|
||||
var/i = 0
|
||||
if(ls.len <= 1) // Early-out code for empty or singleton lists.
|
||||
return ls.len ? ls[1] : ""
|
||||
|
||||
if(sep)
|
||||
#define S1 ls[++i]
|
||||
#define S4 S1, sep, S1, sep, S1, sep, S1
|
||||
#define S16 S4, sep, S4, sep, S4, sep, S4
|
||||
#define S64 S16, sep, S16, sep, S16, sep, S16
|
||||
var/l = ls.len // Made local for sanic speed.
|
||||
var/i = 0 // Incremented every time a list index is accessed.
|
||||
|
||||
while(l-i >= 128)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, sep, S64)
|
||||
if(l-i >= 64)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
if(sep != null)
|
||||
// Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
|
||||
#define S1 sep, ls[++i]
|
||||
#define S4 S1, S1, S1, S1
|
||||
#define S16 S4, S4, S4, S4
|
||||
#define S64 S16, S16, S16, S16
|
||||
|
||||
. = "[ls[++i]]" // Make sure the initial element is converted to text.
|
||||
|
||||
// Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
|
||||
if(l-1 & 0x01) // 'i' will always be 1 here.
|
||||
. = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
|
||||
if(l-i & 0x02)
|
||||
. = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
|
||||
if(l-i & 0x04)
|
||||
. = text("[][][][][][][][][]", ., S4) // And so on....
|
||||
if(l-i & 0x08)
|
||||
. = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
|
||||
if(l-i & 0x10)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
|
||||
if(l-i & 0x20)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
|
||||
if(l-i & 0x40)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
|
||||
if(l-i >= 32)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, sep, S16)
|
||||
if(l-i >= 16)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
|
||||
if(l-i >= 8)
|
||||
. = text("[][][][][][][][][][][][][][][][]", ., S4, sep, S4)
|
||||
if(l-i >= 4)
|
||||
. = text("[][][][][][][][]", ., S4)
|
||||
if(l-i >= 2)
|
||||
. = text("[][][][]", ., S1, sep, S1)
|
||||
if(l > i)
|
||||
. = text("[][][]", ., sep, S1)
|
||||
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
|
||||
|
||||
#undef S64
|
||||
#undef S16
|
||||
@@ -130,38 +134,40 @@
|
||||
#undef S1
|
||||
|
||||
else
|
||||
// Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
|
||||
#define S1 ls[++i]
|
||||
#define S4 S1, S1, S1, S1
|
||||
#define S16 S4, S4, S4, S4
|
||||
#define S64 S16, S16, S16, S16
|
||||
|
||||
while(l-i >= 128)
|
||||
. = "[ls[++i]]" // Make sure the initial element is converted to text.
|
||||
|
||||
if(l-1 & 0x01) // 'i' will always be 1 here.
|
||||
. += S1 // Append 1 element if the remaining elements are not a multiple of 2.
|
||||
if(l-i & 0x02)
|
||||
. = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
|
||||
if(l-i & 0x04)
|
||||
. = text("[][][][][]", ., S4) // And so on...
|
||||
if(l-i & 0x08)
|
||||
. = text("[][][][][][][][][]", ., S4, S4)
|
||||
if(l-i & 0x10)
|
||||
. = text("[][][][][][][][][][][][][][][][][]", ., S16)
|
||||
if(l-i & 0x20)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
|
||||
if(l-i & 0x40)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
|
||||
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
|
||||
if(l-i >= 64)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
|
||||
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
|
||||
if(l-i >= 32)
|
||||
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
|
||||
if(l-i >= 16)
|
||||
. = text("[][][][][][][][][][][][][][][][][]", ., S16)
|
||||
if(l-i >= 8)
|
||||
. = text("[][][][][][][][][]", ., S4, S4)
|
||||
if(l-i >= 4)
|
||||
. = text("[][][][][]", ., S4)
|
||||
if(l-i >= 2)
|
||||
. = text("[][][]", ., S1, S1)
|
||||
if(l > i)
|
||||
. += S1
|
||||
|
||||
#undef S64
|
||||
#undef S16
|
||||
#undef S4
|
||||
#undef S1
|
||||
|
||||
|
||||
//slower then list2text, but correctly processes associative lists.
|
||||
proc/tg_list2text(list/list, glue=",", assocglue=";")
|
||||
if(!istype(list) || !list.len)
|
||||
@@ -352,4 +358,4 @@ proc/tg_text2list(text, glue=",", assocglue=";")
|
||||
for(var/pos = end - 3, pos > 1, pos -= 3)
|
||||
finalNum = copytext(finalNum, 1, pos) + sep + copytext(finalNum, pos)
|
||||
|
||||
return finalNum
|
||||
return finalNum
|
||||
|
||||
+21
-1
@@ -42,6 +42,9 @@
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["alt"])
|
||||
AltShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
@@ -99,6 +102,8 @@
|
||||
|
||||
/mob/living/silicon/ai/CtrlShiftClickOn(var/atom/A)
|
||||
A.AICtrlShiftClick(src)
|
||||
/mob/living/silicon/ai/AltShiftClickOn(var/atom/A)
|
||||
A.AIAltShiftClick(src)
|
||||
/mob/living/silicon/ai/ShiftClickOn(var/atom/A)
|
||||
A.AIShiftClick(src)
|
||||
/mob/living/silicon/ai/CtrlClickOn(var/atom/A)
|
||||
@@ -118,6 +123,18 @@
|
||||
examine()
|
||||
return
|
||||
|
||||
/atom/proc/AIAltShiftClick()
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/AIAltShiftClick() // Sets/Unsets Emergency Access Override
|
||||
if(emagged)
|
||||
return
|
||||
if(!emergency)
|
||||
Topic("aiEnable=11", list("aiEnable"="11"), 1) // 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=11", list("aiDisable"="11"), 1)
|
||||
return
|
||||
|
||||
/atom/proc/AIShiftClick()
|
||||
return
|
||||
|
||||
@@ -128,7 +145,10 @@
|
||||
Topic("aiDisable=7", list("aiDisable"="7"), 1)
|
||||
return
|
||||
|
||||
/atom/proc/AICtrlClick()
|
||||
/atom/proc/AICtrlClick(var/mob/living/silicon/ai/user)
|
||||
if(user.holo)
|
||||
var/obj/machinery/hologram/holopad/H = user.holo
|
||||
H.face_atom(src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
|
||||
|
||||
+12
-1
@@ -46,6 +46,9 @@
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["alt"])
|
||||
AltShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
@@ -262,7 +265,7 @@
|
||||
return T.Adjacent(src)
|
||||
|
||||
/*
|
||||
Control+Shift click
|
||||
Control+Shift/Alt+Shift click
|
||||
Unused except for AI
|
||||
*/
|
||||
/mob/proc/CtrlShiftClickOn(var/atom/A)
|
||||
@@ -271,6 +274,14 @@
|
||||
|
||||
/atom/proc/CtrlShiftClick(var/mob/user)
|
||||
return
|
||||
|
||||
/mob/proc/AltShiftClickOn(var/atom/A)
|
||||
A.AltShiftClick(src)
|
||||
return
|
||||
|
||||
/atom/proc/AltShiftClick(var/mob/user)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Misc helpers
|
||||
|
||||
+12
-1
@@ -19,6 +19,9 @@
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["alt"])
|
||||
AltShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
@@ -117,6 +120,8 @@
|
||||
// for non-doors/apcs
|
||||
/mob/living/silicon/robot/CtrlShiftClickOn(var/atom/A)
|
||||
A.BorgCtrlShiftClick(src)
|
||||
/mob/living/silicon/robot/AltShiftClickOn(var/atom/A)
|
||||
A.BorgAltShiftClick(src)
|
||||
/mob/living/silicon/robot/ShiftClickOn(var/atom/A)
|
||||
A.BorgShiftClick(src)
|
||||
/mob/living/silicon/robot/CtrlClickOn(var/atom/A)
|
||||
@@ -129,9 +134,15 @@
|
||||
examine()
|
||||
user.face_atom(src)
|
||||
return
|
||||
|
||||
/atom/proc/BorgAltShiftClick()
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/BorgAltShiftClick() // Enables emergency override on doors! Forwards to AI code.
|
||||
AIAltShiftClick()
|
||||
|
||||
/atom/proc/BorgShiftClick()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code.
|
||||
AIShiftClick()
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
#define ui_monkey_mask "5:14,1:5" //monkey
|
||||
#define ui_monkey_back "6:14,1:5" //monkey
|
||||
|
||||
#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
|
||||
//Lower right, persistant menu
|
||||
//#define ui_dropbutton "11:22,1:5"
|
||||
#define ui_drop_throw "16:28,2:7"
|
||||
@@ -99,12 +102,14 @@
|
||||
#define ui_alien_toxin "16:28,13:25"
|
||||
#define ui_alien_fire "16:28,12:25"
|
||||
#define ui_alien_oxygen "16:28,11:25"
|
||||
#define ui_alien_nightvision "16:28,10:25"
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_nutrition "16:28,5:11"
|
||||
#define ui_temp "16:28,6:13"
|
||||
#define ui_health "16:28,7:15"
|
||||
#define ui_internal "16:28,8:17"
|
||||
#define ui_healthdoll "16:28,7:15"
|
||||
#define ui_health "16:28,8:17"
|
||||
#define ui_internal "16:28,9:19"
|
||||
//borgs
|
||||
#define ui_borg_health "16:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "16:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
|
||||
|
||||
+32
-110
@@ -2,71 +2,21 @@
|
||||
return
|
||||
|
||||
/datum/hud/proc/alien_hud()
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "harm" ? "harm" : mymob.a_intent)
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "harm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
@@ -76,35 +26,24 @@
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
move_intent = using
|
||||
|
||||
if(istype(mymob, /mob/living/carbon/alien/humanoid/hunter))
|
||||
mymob.leap_icon = new /obj/screen()
|
||||
mymob.leap_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.leap_icon.name = "toggle leap"
|
||||
mymob.leap_icon.icon_state = "leap_off"
|
||||
mymob.leap_icon.screen_loc = ui_alien_storage_r
|
||||
src.adding += mymob.leap_icon
|
||||
|
||||
//equippable shit
|
||||
//suit
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_alien_oclothing
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.layer = 19
|
||||
src.r_hand_hud_object = inv_box
|
||||
@@ -142,46 +81,23 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
//pocket 1
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//pocket 2
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//head
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hair"
|
||||
inv_box.screen_loc = ui_alien_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
//end of equippable shit
|
||||
|
||||
/*
|
||||
using = new /obj/screen()
|
||||
using.name = "resist"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -213,6 +129,12 @@
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
nightvisionicon = new /obj/screen()
|
||||
nightvisionicon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
nightvisionicon.icon_state = "nightvision1"
|
||||
nightvisionicon.name = "night vision"
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
@@ -246,5 +168,5 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, alien_plasma_display, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, alien_plasma_display, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
@@ -1,5 +1,4 @@
|
||||
/datum/hud/proc/larva_hud()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
@@ -50,6 +49,12 @@
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
nightvisionicon = new /obj/screen()
|
||||
nightvisionicon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
nightvisionicon.icon_state = "nightvision1"
|
||||
nightvisionicon.name = "night vision"
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -72,10 +77,11 @@
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
@@ -98,6 +98,7 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/blobhealthdisplay
|
||||
var/obj/screen/vampire_blood_display
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/nightvisionicon
|
||||
var/obj/screen/r_hand_hud_object
|
||||
var/obj/screen/l_hand_hud_object
|
||||
var/obj/screen/action_intent
|
||||
@@ -228,6 +229,7 @@ datum/hud/New(mob/owner)
|
||||
else
|
||||
src.client.screen -= src.healths
|
||||
src.client.screen -= src.internals
|
||||
src.client.screen -= src.healthdoll
|
||||
src.client.screen -= src.gun_setting_icon
|
||||
|
||||
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
||||
@@ -243,6 +245,8 @@ datum/hud/New(mob/owner)
|
||||
src.client.screen += src.hud_used.hotkeybuttons
|
||||
if(src.healths)
|
||||
src.client.screen |= src.healths
|
||||
if(src.healthdoll)
|
||||
src.client.screen |= src.healthdoll
|
||||
if(src.internals)
|
||||
src.client.screen |= src.internals
|
||||
if(src.gun_setting_icon)
|
||||
|
||||
@@ -410,6 +410,12 @@
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
|
||||
mymob.healthdoll = new /obj/screen()
|
||||
mymob.healthdoll.icon = ui_style
|
||||
mymob.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
mymob.healthdoll.name = "health doll"
|
||||
mymob.healthdoll.screen_loc = ui_healthdoll
|
||||
|
||||
mymob.nutrition_icon = new /obj/screen()
|
||||
mymob.nutrition_icon.icon = ui_style
|
||||
mymob.nutrition_icon.icon_state = "nutrition0"
|
||||
@@ -479,7 +485,7 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||
inventory_shown = 0;
|
||||
|
||||
@@ -517,13 +523,11 @@
|
||||
I = U.hastie
|
||||
if(I.icon_action_button)
|
||||
var/obj/screen/item_action/A = new(hud_used)
|
||||
|
||||
|
||||
//A.icon = 'icons/mob/screen1_action.dmi'
|
||||
//A.icon_state = I.icon_action_button
|
||||
|
||||
A.icon = ui_style2icon(client.prefs.UI_style)
|
||||
A.icon_state = "template"
|
||||
|
||||
var/image/img = image(I.icon, A, I.icon_state)
|
||||
img.pixel_x = 0
|
||||
img.pixel_y = 0
|
||||
@@ -534,9 +538,7 @@
|
||||
else
|
||||
A.name = "Use [I.name]"
|
||||
A.owner = I
|
||||
|
||||
hud_used.item_action_list += A
|
||||
|
||||
switch(num)
|
||||
if(1)
|
||||
A.screen_loc = ui_action_slot1
|
||||
@@ -548,16 +550,6 @@
|
||||
A.screen_loc = ui_action_slot4
|
||||
if(5)
|
||||
A.screen_loc = ui_action_slot5
|
||||
if(6)
|
||||
A.screen_loc = ui_action_slot6
|
||||
if(7)
|
||||
A.screen_loc = ui_action_slot7
|
||||
if(8)
|
||||
A.screen_loc = ui_action_slot8
|
||||
if(9)
|
||||
A.screen_loc = ui_action_slot9
|
||||
if(10)
|
||||
A.screen_loc = ui_action_slot10
|
||||
break //5 slots available, so no more can be added.
|
||||
num++
|
||||
src.client.screen += src.hud_used.item_action_list
|
||||
src.client.screen += src.hud_used.item_action_list
|
||||
@@ -558,7 +558,17 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.control_hud()
|
||||
|
||||
|
||||
// Alien
|
||||
if("night vision")
|
||||
var/mob/living/carbon/alien/humanoid/A = usr
|
||||
A.nightvisiontoggle()
|
||||
|
||||
if("toggle leap")
|
||||
if(istype(usr, /mob/living/carbon/alien/humanoid))
|
||||
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
|
||||
AH.toggle_leap()
|
||||
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -99,76 +99,6 @@
|
||||
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/RangedAttack(var/atom/A)
|
||||
if(!large && a_intent == "harm")
|
||||
Neurotox(A)
|
||||
return
|
||||
else if(large && a_intent == "harm")
|
||||
NeuroAOE(A)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/Neurotox(atom/A)
|
||||
if(world.time < next_attack)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(A) // Get the tile infront of the move, based on their direction
|
||||
|
||||
if(!isturf(U) || !isturf(T))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/bullet/neurotoxin/NT = new /obj/item/projectile/bullet/neurotoxin(loc)
|
||||
NT.firer = src
|
||||
// NT.def_zone = get_organ_target()
|
||||
NT.original = A
|
||||
NT.current = T
|
||||
NT.yo = U.y - T.y
|
||||
NT.xo = U.x - T.x
|
||||
spawn( 1)
|
||||
NT.process()
|
||||
next_attack = world.time + 100
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/NeuroAOE(atom/A)
|
||||
if(world.time < next_attack)
|
||||
return
|
||||
|
||||
var/direction = get_dir(src,A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/a=0, a<5, a++)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/water/D = new /obj/effect/effect/water( get_turf(src) )
|
||||
D.color = "#00FF21"
|
||||
var/turf/my_target = pick(the_targets)
|
||||
for(var/b=0, b<5, b++)
|
||||
if(!step_towards(D,my_target)) return
|
||||
if(!D) return
|
||||
// D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/atm in get_turf(D))
|
||||
if(!D) return
|
||||
if(istype(atm, /mob/living/carbon/alien))
|
||||
return
|
||||
if(istype(atm, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = atm
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space) && istype(H.head, /obj/item/clothing/head/helmet/space))
|
||||
return
|
||||
else
|
||||
C.Weaken(5)
|
||||
C.adjustToxLoss(20)
|
||||
C << "You were drenched with neurotoxin!"
|
||||
// D.reagents.reaction(atm, TOUCH) // Touch, since we sprayed it.
|
||||
if(D.loc == my_target) break
|
||||
sleep(2)
|
||||
next_attack = world.time + 100
|
||||
|
||||
|
||||
// Babby aliens
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(var/atom/A)
|
||||
A.attack_larva(src)
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/health_threshold_softcrit = 0
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
|
||||
@@ -217,8 +217,8 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
)
|
||||
|
||||
VS.announcer = "NSV Icarus"
|
||||
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.arrival_message = "Attention, Cyberiad, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Cyberiad - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.interim = locate(/area/vox_station/transit)
|
||||
|
||||
VS.warmup_time = 0
|
||||
@@ -240,8 +240,8 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
)
|
||||
|
||||
MS.announcer = "NSV Icarus"
|
||||
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||
MS.arrival_message = "Attention, Cyberiad, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Cyberiad, burning delta-v like it's nothing. Good riddance."
|
||||
MS.interim = locate(/area/syndicate_station/transit)
|
||||
|
||||
MS.warmup_time = 0
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/obj/item/robot_parts/r_leg = 1,
|
||||
/obj/item/stack/sheet/metal = 5,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/gun/energy/taser = 1,
|
||||
/obj/item/weapon/gun/energy/advtaser = 1,
|
||||
/obj/item/weapon/cell = 1,
|
||||
/obj/item/device/assembly/prox_sensor = 1,
|
||||
/obj/item/robot_parts/r_arm = 1)
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
return
|
||||
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(!(target.type in compatible_mobs))
|
||||
user << "<span class='notice'>It'd be stupid to curse [target] with a horse's head!</span>"
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
range = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human,/mob/living/carbon/monkey) //which types of mobs are affected by the spell. NOTE: change at your own risk
|
||||
var/base_spell_loss_chance = 20 //base probability of the wizard losing a spell in the process
|
||||
var/spell_loss_chance_modifier = 7 //amount of probability of losing a spell added per spell (mind_transfer included)
|
||||
var/spell_loss_amount = 1 //the maximum amount of spells possible to lose during a single transfer
|
||||
var/msg_wait = 500 //how long in deciseconds it waits before telling that body doesn't feel right or mind swap robbed of a spell
|
||||
var/paralysis_amount_caster = 20 //how much the caster is paralysed for after the spell
|
||||
var/paralysis_amount_victim = 20 //how much the victim is paralysed for after the spell
|
||||
|
||||
icon_power_button = "spell_mind"
|
||||
|
||||
/*
|
||||
@@ -40,12 +38,8 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
user << "They are too far away!"
|
||||
return
|
||||
|
||||
if(!(target.type in compatible_mobs))
|
||||
user << "Their mind isn't compatible with yours."
|
||||
return
|
||||
|
||||
if(target.stat == DEAD)
|
||||
user << "You didn't study necromancy back at the Space Wizard Federation academy."
|
||||
user << "You don't particularly want to be dead."
|
||||
return
|
||||
|
||||
if(!target.key || !target.mind)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
icon_power_button = "spell_missile"
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/inflict_handler/magic_missile
|
||||
amt_weakened = 5
|
||||
amt_weakened = 3
|
||||
amt_dam_fire = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/noclothes
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
|
||||
smoke_spread = 1
|
||||
smoke_amt = 10
|
||||
smoke_amt = 1
|
||||
|
||||
inner_tele_radius = 0
|
||||
outer_tele_radius = 6
|
||||
@@ -268,7 +268,7 @@
|
||||
icon_power_button = "spell_fireball"
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/turf/fireball/cast(var/turf/T)
|
||||
explosion(T, -1, 0, 2, 0)
|
||||
explosion(T, -1, 0, 2, 3, 0)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/inflict_handler/fireball
|
||||
@@ -277,5 +277,5 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/explosion/fireball
|
||||
ex_severe = -1
|
||||
ex_heavy = 0
|
||||
ex_light = 2
|
||||
ex_heavy = -1
|
||||
ex_light = 2
|
||||
@@ -239,7 +239,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/bikehorn,
|
||||
/obj/item/clothing/under/mime,
|
||||
/obj/item/clothing/shoes/black,
|
||||
/obj/item/clothing/gloves/white,
|
||||
/obj/item/clothing/gloves/color/white,
|
||||
/obj/item/clothing/mask/gas/mime,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/suit/suspenders,
|
||||
@@ -341,6 +341,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "cat crate"
|
||||
group = "Organic"
|
||||
|
||||
/datum/supply_packs/organic/fox
|
||||
name = "Fox Crate"
|
||||
cost = 55 //Foxes are cool.
|
||||
containertype = /obj/structure/closet/critter/fox
|
||||
containername = "fox crate"
|
||||
group = "Organic"
|
||||
|
||||
/datum/supply_packs/seeds
|
||||
name = "Seeds Crate"
|
||||
contains = list(/obj/item/seeds/chiliseed,
|
||||
@@ -657,8 +664,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/gun/energy/laser,
|
||||
/obj/item/weapon/gun/energy/laser,
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
/obj/item/weapon/gun/energy/advtaser,
|
||||
/obj/item/weapon/gun/energy/advtaser,
|
||||
/obj/item/weapon/storage/box/flashbangs,
|
||||
/obj/item/weapon/storage/box/flashbangs)
|
||||
cost = 30
|
||||
@@ -1067,6 +1074,26 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
access = access_hydroponics
|
||||
group = "Hydroponics"
|
||||
|
||||
/datum/supply_packs/misc/lasertag
|
||||
name = "Laser Tag Crate"
|
||||
contains = list(/obj/item/weapon/gun/energy/laser/redtag,
|
||||
/obj/item/weapon/gun/energy/laser/redtag,
|
||||
/obj/item/weapon/gun/energy/laser/redtag,
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,
|
||||
/obj/item/clothing/suit/redtag,
|
||||
/obj/item/clothing/suit/redtag,
|
||||
/obj/item/clothing/suit/redtag,
|
||||
/obj/item/clothing/suit/bluetag,
|
||||
/obj/item/clothing/suit/bluetag,
|
||||
/obj/item/clothing/suit/bluetag,
|
||||
/obj/item/clothing/head/helmet/redtaghelm,
|
||||
/obj/item/clothing/head/helmet/bluetaghelm)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "laser tag crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/vending
|
||||
name = "Bartending Supply Crate"
|
||||
@@ -1120,7 +1147,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "autodrobe supply crate"
|
||||
group = "Operations"
|
||||
|
||||
|
||||
/datum/supply_packs/clothingvendor
|
||||
name = "Clothing Vendor Supply crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/hatdispenser,
|
||||
|
||||
+55
-41
@@ -108,14 +108,6 @@ var/list/uplink_items = list()
|
||||
cost = 8
|
||||
job = list("Clown")
|
||||
|
||||
//Detective
|
||||
/datum/uplink_item/jobspecific/evidenceforger
|
||||
name = "Evidence Forger"
|
||||
desc = "An evidence scanner that allows you forge evidence by setting the output before scanning the item."
|
||||
item = /obj/item/device/detective_scanner/forger
|
||||
cost = 6
|
||||
job = list("Detective")
|
||||
|
||||
/datum/uplink_item/jobspecific/conversionkit
|
||||
name = "Conversion Kit Bundle"
|
||||
desc = "A bundle that comes with a professional revolver conversion kit and 1 box of .357 ammo. The kit allows you to convert your revolver to fire lethal rounds or vice versa, modification is nearly perfect and will not result in catastrophic failure."
|
||||
@@ -205,28 +197,29 @@ var/list/uplink_items = list()
|
||||
/datum/uplink_item/dangerous
|
||||
category = "Highly Visible and Dangerous Weapons"
|
||||
|
||||
/datum/uplink_item/dangerous/revolver
|
||||
name = "Fully Loaded Revolver"
|
||||
desc = "A traditional handgun which fires .357 rounds. Has 7 chambers. Can down an unarmoured target with two shots."
|
||||
item = /obj/item/weapon/gun/projectile/revolver
|
||||
cost = 13
|
||||
|
||||
/datum/uplink_item/dangerous/pistol
|
||||
name = "Stechkin Pistol"
|
||||
desc = "A small, easily concealable handgun that uses 10mm magazines and is compatible with suppressors."
|
||||
name = "Syndicate Pistol"
|
||||
desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible with suppressors."
|
||||
item = /obj/item/weapon/gun/projectile/automatic/pistol
|
||||
cost = 9
|
||||
|
||||
/datum/uplink_item/dangerous/revolver
|
||||
name = "Syndicate Revolver"
|
||||
desc = "A brutally simple syndicate revolver that fires .357 Magnum cartridges and has 7 chambers."
|
||||
item = /obj/item/weapon/gun/projectile/revolver
|
||||
cost = 13
|
||||
|
||||
/datum/uplink_item/dangerous/smg
|
||||
name = "C-20r Submachine Gun"
|
||||
desc = "A fully-loaded Scarborough Arms-developed submachine gun that fires 12mm automatic rounds with a 20-round magazine."
|
||||
name = "Syndicate SMG"
|
||||
desc = "A fully-loaded Scarborough Arms bullpup submachine gun that fires .45 rounds with a 20-round magazine and is compatible with suppressors."
|
||||
item = /obj/item/weapon/gun/projectile/automatic/c20r
|
||||
cost = 14
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/dangerous/machinegun
|
||||
name = "L6 Squad Automatic Weapon"
|
||||
desc = "A traditionally constructed machine gun made by AA-2531. This deadly weapon has a massive 50-round magazine of 7.62×51mm ammunition."
|
||||
name = "Syndicate LMG"
|
||||
desc = "A fully-loaded Aussec Armoury belt-fed machine gun. This deadly weapon has a massive 50-round magazine of devastating 7.62x51mm ammunition."
|
||||
item = /obj/item/weapon/gun/projectile/automatic/l6_saw
|
||||
cost = 40
|
||||
gamemodes = list("nuclear emergency")
|
||||
@@ -304,53 +297,74 @@ var/list/uplink_items = list()
|
||||
/datum/uplink_item/ammo
|
||||
category = "Ammunition"
|
||||
|
||||
/datum/uplink_item/ammo/revolver
|
||||
name = "Ammo-357"
|
||||
desc = "A box that contains seven additional rounds for the revolver, made using an automatic lathe."
|
||||
item = /obj/item/ammo_box/a357
|
||||
cost = 4
|
||||
|
||||
/datum/uplink_item/ammo/pistol
|
||||
name = "Ammo-10mm"
|
||||
desc = "An additional 8-round 10mm magazine for use in the Stetchkin pistol."
|
||||
desc = "An additional 8-round 10mm magazine for use in the syndicate pistol. These subsonic rounds are dirt cheap but are half as effective as .357 rounds."
|
||||
item = /obj/item/ammo_box/magazine/m10mm
|
||||
cost = 1
|
||||
|
||||
/datum/uplink_item/ammo/revolver
|
||||
name = "Speed Loader - .357"
|
||||
desc = "A speed loader that contains seven additional .357 Magnum rounds for the syndicate revolver. For when you really need a lot of things dead."
|
||||
item = /obj/item/ammo_box/a357
|
||||
cost = 4
|
||||
|
||||
/datum/uplink_item/ammo/smg
|
||||
name = "Ammo-12mm"
|
||||
desc = "A 20-round 12mm magazine for use in the C-20r submachine gun."
|
||||
item = /obj/item/ammo_box/magazine/m12mm
|
||||
name = "Magazine - .45"
|
||||
desc = "An additional 20-round .45 magazine for use in the C-20r submachine gun. These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
|
||||
item = /obj/item/ammo_box/magazine/smgm45
|
||||
cost = 2
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/machinegun
|
||||
name = "Ammo-7.62×51mm"
|
||||
desc = "A 50-round magazine of 7.62×51mm ammunition for use in the L6 SAW machinegun. By the time you need to use this, you'll already be on a pile of corpses."
|
||||
item = /obj/item/ammo_box/magazine/m762
|
||||
cost = 12
|
||||
/datum/uplink_item/dangerous/car
|
||||
name = "C-90gl Compact Assault Rifle"
|
||||
desc = "A fully-loaded Zashchita Industriya toploading bullpup assault rifle that uses 30-round 5.45x39mm magazines with a togglable underslung 40mm grenade launcher."
|
||||
item = /obj/item/weapon/gun/projectile/automatic/c90gl
|
||||
cost = 18
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/bullstun
|
||||
name = "Ammo-12g Stun Slug"
|
||||
name = "Drum Magazine - 12g Stun Slug"
|
||||
desc = "An additional 8-round stun slug magazine for use in the Bulldog shotgun. Saying that they're non-lethal would be lying."
|
||||
item = /obj/item/ammo_box/magazine/m12g
|
||||
cost = 2
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/bullbuck
|
||||
name = "Ammo-12g Buckshot"
|
||||
name = "Drum Magazine - 12g Buckshot"
|
||||
desc = "An alternative 8-round buckshot magazine for use in the Bulldog shotgun. Front towards enemy."
|
||||
item = /obj/item/ammo_box/magazine/m12g/buckshot
|
||||
cost = 2
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/bulldragon
|
||||
name = "Ammo-12g Dragon's Breath"
|
||||
name = "Drum Magazine - 12g Dragon's Breath"
|
||||
desc = "An alternative 8-round dragon's breath magazine for use in the Bulldog shotgun. I'm a fire starter, twisted fire starter!"
|
||||
item = /obj/item/ammo_box/magazine/m12g/dragon
|
||||
cost = 3
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/car
|
||||
name = "Box Magazine - 5.45x39mm"
|
||||
desc = "An additional 30-round 5.45x39mm magazine for use in the C-90gl assault rifle. These bullets don't have the punch to knock most targets down, but dish out higher overall damage."
|
||||
item = /obj/item/ammo_box/magazine/m545
|
||||
cost = 2
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/a40mm
|
||||
name = "Ammo Box - 40mm grenades"
|
||||
desc = "A box of 4 additional 40mm HE grenades for use the C-90gl's underbarrel grenade launcher. Your teammates will thank you to not shoot these down small hallways."
|
||||
item = /obj/item/ammo_box/a40mm
|
||||
cost = 4
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
/datum/uplink_item/ammo/machinegun
|
||||
name = "Box Magazine - 7.62×51mm"
|
||||
desc = "A 50-round magazine of 7.62x51mm ammunition for use in the L6 SAW machinegun. By the time you need to use this, you'll already be on a pile of corpses."
|
||||
item = /obj/item/ammo_box/magazine/m762
|
||||
cost = 12
|
||||
gamemodes = list("nuclear emergency")
|
||||
|
||||
|
||||
// STEALTHY WEAPONS
|
||||
|
||||
@@ -379,9 +393,9 @@ var/list/uplink_items = list()
|
||||
// Commented out until a fix can be found, currently doesn't work with the PDA NanoUI and people keep wasting Telecrystals on it. -- Dave
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/silencer
|
||||
name = "Stetchkin Silencer"
|
||||
desc = "Fitted for use on the Stetchkin pistol, this silencer will make its shots quieter when equipped onto it."
|
||||
item = /obj/item/weapon/silencer
|
||||
name = "Universal Suppressor"
|
||||
desc = "Fitted for use on any small caliber weapon with a threaded barrel, this suppressor will silence the shots of the weapon for increased stealth and superior ambushing capability."
|
||||
item = /obj/item/weapon/suppressor
|
||||
cost = 3
|
||||
|
||||
// STEALTHY TOOLS
|
||||
@@ -514,7 +528,7 @@ var/list/uplink_items = list()
|
||||
/datum/uplink_item/device_tools/cipherkey
|
||||
name = "Syndicate Encryption Key"
|
||||
desc = "A key, that when inserted into a radio headset, allows you to listen to all station department channels as well as talk on an encrypted Syndicate channel."
|
||||
item = /obj/item/device/encryptionkey/syndicate
|
||||
item = /obj/item/device/encryptionkey/syndicate/hacked
|
||||
cost = 5
|
||||
|
||||
/datum/uplink_item/device_tools/hacked_module
|
||||
|
||||
@@ -34,12 +34,13 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
/datum/wires/airlock/GetInteractWindow()
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
. += ..()
|
||||
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
|
||||
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
|
||||
(A.lights ? "The door bolt lights are on." : "The door bolt lights are off!"),
|
||||
((A.arePowerSystemsOn() && !(A.stat & NOPOWER)) ? "The test light is on." : "The test light is off!"),
|
||||
(A.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
|
||||
(A.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
|
||||
(A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."))
|
||||
(A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
|
||||
(A.emergency==0 ? "The emergency lights are off." : "The emergency lights are on."))
|
||||
|
||||
|
||||
/datum/wires/airlock/UpdateCut(var/index, var/mended)
|
||||
@@ -123,9 +124,12 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(index)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through this flashes the red light on the door (if the door has power).
|
||||
//Sending a pulse through this disables emergency access and flashes the red light on the door (if the door has power).
|
||||
if((A.arePowerSystemsOn()) && (!(A.stat & NOPOWER)))
|
||||
A.door_animate("deny")
|
||||
if(A.emergency)
|
||||
A.emergency = 0
|
||||
A.update_icon()
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
|
||||
A.loseMainPower()
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/datum/wires/autolathe
|
||||
|
||||
holder_type = /obj/machinery/autolathe
|
||||
wire_count = 10
|
||||
|
||||
var/const/AUTOLATHE_HACK_WIRE = 1
|
||||
var/const/AUTOLATHE_SHOCK_WIRE = 2
|
||||
var/const/AUTOLATHE_DISABLE_WIRE = 4
|
||||
|
||||
/datum/wires/autolathe/GetInteractWindow()
|
||||
var/obj/machinery/autolathe/A = holder
|
||||
. += ..()
|
||||
. += text("<BR>The red light is [A.disabled ? "off" : "on"].<BR>The green light is [A.shocked ? "off" : "on"].<BR>The blue light is [A.hacked ? "off" : "on"].<BR>")
|
||||
|
||||
/datum/wires/autolathe/CanUse()
|
||||
var/obj/machinery/autolathe/A = holder
|
||||
if(A.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/autolathe/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/autolathe/V = holder
|
||||
V.attack_hand(user)
|
||||
|
||||
/datum/wires/autolathe/UpdateCut(index, mended)
|
||||
var/obj/machinery/autolathe/A = holder
|
||||
switch(index)
|
||||
if(AUTOLATHE_HACK_WIRE)
|
||||
A.adjust_hacked(!mended)
|
||||
if(AUTOLATHE_SHOCK_WIRE)
|
||||
A.shocked = !mended
|
||||
if(AUTOLATHE_DISABLE_WIRE)
|
||||
A.disabled = !mended
|
||||
|
||||
/datum/wires/autolathe/UpdatePulsed(index)
|
||||
if(IsIndexCut(index))
|
||||
return
|
||||
var/obj/machinery/autolathe/A = holder
|
||||
switch(index)
|
||||
if(AUTOLATHE_HACK_WIRE)
|
||||
A.adjust_hacked(!A.hacked)
|
||||
spawn(50)
|
||||
if(A && !IsIndexCut(index))
|
||||
A.adjust_hacked(0)
|
||||
Interact(usr)
|
||||
if(AUTOLATHE_SHOCK_WIRE)
|
||||
A.shocked = !A.shocked
|
||||
spawn(50)
|
||||
if(A && !IsIndexCut(index))
|
||||
A.shocked = 0
|
||||
Interact(usr)
|
||||
if(AUTOLATHE_DISABLE_WIRE)
|
||||
A.disabled = !A.disabled
|
||||
spawn(50)
|
||||
if(A && !IsIndexCut(index))
|
||||
A.disabled = 0
|
||||
Interact(usr)
|
||||
@@ -550,7 +550,7 @@
|
||||
throwforce = 5.0
|
||||
sharp = 1
|
||||
edge = 1
|
||||
throw_speed = 1
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
@@ -594,6 +594,7 @@
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
|
||||
icon_state = "RPED"
|
||||
item_state = "RPED"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 5
|
||||
can_hold = list("/obj/item/weapon/stock_parts","/obj/item/weapon/cell")
|
||||
storage_slots = 50
|
||||
|
||||
@@ -56,6 +56,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
|
||||
var/air_doors_activated = 0
|
||||
|
||||
var/tele_proof = 0
|
||||
|
||||
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
|
||||
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
|
||||
var/list/teleportlocs = list()
|
||||
@@ -237,15 +239,15 @@ var/list/ghostteleportlocs = list()
|
||||
|
||||
/area/shuttle/gamma/space
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Gamma Shuttle Space"
|
||||
requires_power = 1
|
||||
name = "\improper Gamma Armory"
|
||||
requires_power = 0
|
||||
luminosity = 0
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
/area/shuttle/gamma/station
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Gamma Shuttle Station"
|
||||
requires_power = 1
|
||||
name = "\improper Gamma Armory Station"
|
||||
requires_power = 0
|
||||
luminosity = 0
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
@@ -468,6 +470,12 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Syndicate Elite Squad"
|
||||
icon_state = "syndie-elite"
|
||||
|
||||
/area/syndicate_depot
|
||||
name = "\improper Suspicious Supply Depot"
|
||||
icon_state = "red"
|
||||
tele_proof = 1
|
||||
requires_power = 0
|
||||
|
||||
//EXTRA
|
||||
|
||||
/area/asteroid // -- TLE
|
||||
@@ -626,37 +634,54 @@ var/list/ghostteleportlocs = list()
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/start
|
||||
name = "\improper Start Area"
|
||||
name = "\improper Alien Shuttle"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/transit
|
||||
name = "\improper Hyperspace"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southwest
|
||||
name = "\improper Aft Port Solars"
|
||||
name = "\improper Aft Port Solars Landing Area"
|
||||
icon_state = "southwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northwest
|
||||
name = "\improper Fore Port Solars"
|
||||
name = "\improper Fore Port Solars Landing Area"
|
||||
icon_state = "northwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northeast
|
||||
name = "\improper Fore Starboard Solars"
|
||||
name = "\improper Fore Starboard Solars Landing Area"
|
||||
icon_state = "northeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southeast
|
||||
name = "\improper Aft Starboard Solars"
|
||||
name = "\improper Aft Starboard Solars Landing Area"
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/north
|
||||
name = "\improper West Landing Area"
|
||||
icon_state = "north"
|
||||
|
||||
/area/xenos_station/south
|
||||
/area/xenos_station/east
|
||||
name = "\improper East Landing Area"
|
||||
icon_state = "east"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/west
|
||||
name = "\improper West Landing Area"
|
||||
icon_state = "west"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/researchoutpost
|
||||
name = "\improper Research Outpost Landing Area"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/miningoutpost
|
||||
name = "\improper Mining Outpost Landing Area"
|
||||
icon_state = "south"
|
||||
requires_power = 0
|
||||
|
||||
//PRISON
|
||||
/area/prison
|
||||
@@ -978,6 +1003,10 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Blueshield's Office"
|
||||
icon_state = "blueold"
|
||||
|
||||
/area/centcomdocks
|
||||
name = "\improper Central Command Docks"
|
||||
icon_state = "centcom"
|
||||
|
||||
//Crew
|
||||
|
||||
/area/crew_quarters
|
||||
@@ -1562,6 +1591,14 @@ area/security/podbay
|
||||
name = "\improper Vault"
|
||||
icon_state = "nuke_storage"
|
||||
|
||||
/area/security/customs
|
||||
name = "\improper Customs"
|
||||
icon_state = "checkpoint1"
|
||||
|
||||
/area/security/customs2
|
||||
name = "\improper Customs"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/checkpoint
|
||||
name = "\improper Security Checkpoint"
|
||||
icon_state = "checkpoint1"
|
||||
@@ -1660,8 +1697,12 @@ area/security/podbay
|
||||
name = "\improper Xenobiology Lab"
|
||||
icon_state = "toxlab"
|
||||
|
||||
/area/toxins/xenobiology/flora
|
||||
name = "\improper Xenobiology Flora Lab"
|
||||
/area/toxins/xenobiology/xenoflora_storage
|
||||
name = "\improper Xenoflora Storage"
|
||||
icon_state = "toxlab"
|
||||
|
||||
/area/toxins/xenobiology/xenoflora
|
||||
name = "\improper Xenoflora Lab"
|
||||
icon_state = "toxlab"
|
||||
|
||||
/area/toxins/storage
|
||||
@@ -2017,8 +2058,20 @@ area/security/podbay
|
||||
name = "\improper AI Satellite"
|
||||
icon_state = "ai"
|
||||
|
||||
/area/aisat
|
||||
name = "\improper AI Satellite Exterior"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/aisat/entrance
|
||||
name = "\improper AI Satellite Entrance"
|
||||
icon_state = "ai_foyer"
|
||||
|
||||
/area/aisat/maintenance
|
||||
name = "\improper AI Satellite Maintenance"
|
||||
icon_state = "storage"
|
||||
|
||||
/area/turret_protected/aisat_interior
|
||||
name = "\improper AI Satellite"
|
||||
name = "\improper AI Satellite Antechamber"
|
||||
icon_state = "ai"
|
||||
|
||||
/area/turret_protected/AIsatextFP
|
||||
|
||||
+11
-1
@@ -1,6 +1,16 @@
|
||||
// Areas.dm
|
||||
|
||||
|
||||
// Added to fix mech fabs 05/2013 ~Sayu
|
||||
// This is necessary due to lighting subareas. If you were to go in assuming that things in
|
||||
// the same logical /area have the parent /area object... well, you would be mistaken. If you
|
||||
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
|
||||
// related areas. This returns a master contents list to assist in that.
|
||||
/proc/area_contents(var/area/A)
|
||||
if(!istype(A)) return null
|
||||
var/list/contents = list()
|
||||
for(var/area/LSA in A.related)
|
||||
contents += LSA.contents
|
||||
return contents
|
||||
|
||||
// ===
|
||||
/area
|
||||
|
||||
@@ -23,7 +23,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
|
||||
|
||||
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
|
||||
if(!wall)
|
||||
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
|
||||
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/structure/alien/resin/wall)
|
||||
if(!floor)
|
||||
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)
|
||||
|
||||
@@ -44,9 +44,9 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
|
||||
|
||||
|
||||
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
|
||||
if(wall == /obj/effect/alien/resin)
|
||||
if(wall == /obj/structure/alien/resin/wall)
|
||||
T = new floor(cur_loc)
|
||||
new /obj/effect/alien/resin(T)
|
||||
new /obj/structure/alien/resin/wall(T)
|
||||
else
|
||||
T = new wall(cur_loc)
|
||||
room_turfs["walls"] += T
|
||||
@@ -74,7 +74,7 @@ proc/admin_spawn_room_at_pos()
|
||||
if("Regular wall")
|
||||
wall=/turf/simulated/wall
|
||||
if("Resin wall")
|
||||
wall=/obj/effect/alien/resin
|
||||
wall=/obj/structure/alien/resin/wall
|
||||
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
|
||||
if("Regular floor")
|
||||
floor=/turf/simulated/floor
|
||||
|
||||
+46
-86
@@ -92,7 +92,8 @@
|
||||
/atom/proc/emp_act(var/severity)
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
|
||||
/atom/proc/bullet_act(var/obj/item/projectile/Proj, def_zone)
|
||||
Proj.on_hit(src, 0, def_zone)
|
||||
return 0
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
@@ -250,35 +251,32 @@ its easier to just keep the beam vertical.
|
||||
/atom/proc/add_hiddenprint(mob/living/M as mob)
|
||||
if(isnull(M)) return
|
||||
if(isnull(M.key)) return
|
||||
if (!( src.flags ) & FPRINT)
|
||||
return
|
||||
if (ishuman(M))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!istype(H.dna, /datum/dna))
|
||||
if(!istype(H.dna, /datum/dna))
|
||||
return 0
|
||||
if (H.gloves)
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
if(H.gloves)
|
||||
if(fingerprintslast != H.ckey)
|
||||
fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
fingerprintslast = H.ckey
|
||||
return 0
|
||||
if (!( src.fingerprints ))
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
if(!( fingerprints ))
|
||||
if(fingerprintslast != H.ckey)
|
||||
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
||||
fingerprintslast = H.ckey
|
||||
return 1
|
||||
else
|
||||
if(src.fingerprintslast != M.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
|
||||
src.fingerprintslast = M.key
|
||||
if(fingerprintslast != M.ckey)
|
||||
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
|
||||
fingerprintslast = M.ckey
|
||||
return
|
||||
|
||||
|
||||
//Set ignoregloves to add prints irrespective of the mob having gloves on.
|
||||
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
|
||||
if(isnull(M)) return
|
||||
if(isAI(M)) return
|
||||
if(isnull(M.key)) return
|
||||
if (!( src.flags ) & FPRINT)
|
||||
return
|
||||
if (ishuman(M))
|
||||
if(ishuman(M))
|
||||
//Add the list if it does not exist.
|
||||
if(!fingerprintshidden)
|
||||
fingerprintshidden = list()
|
||||
@@ -300,25 +298,25 @@ its easier to just keep the beam vertical.
|
||||
H.dna.real_name = H.real_name
|
||||
H.check_dna()
|
||||
|
||||
//Now, deal with gloves.
|
||||
if (H.gloves && H.gloves != src)
|
||||
if(fingerprintslast != H.key)
|
||||
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
H.gloves.add_fingerprint(M)
|
||||
//Check if the gloves (if any) hide fingerprints
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(G.transfer_prints)
|
||||
ignoregloves = 1
|
||||
|
||||
//Deal with gloves the pass finger/palm prints.
|
||||
//Now, deal with gloves.
|
||||
if(!ignoregloves)
|
||||
if(H.gloves != src)
|
||||
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
if(H.gloves && H.gloves != src)
|
||||
if(fingerprintslast != H.ckey)
|
||||
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
||||
fingerprintslast = H.ckey
|
||||
H.gloves.add_fingerprint(M)
|
||||
return 0
|
||||
|
||||
//More adminstuffz
|
||||
if(fingerprintslast != H.key)
|
||||
if(fingerprintslast != H.ckey)
|
||||
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
fingerprintslast = H.ckey
|
||||
|
||||
//Make the list if it does not exist.
|
||||
if(!fingerprints)
|
||||
@@ -328,75 +326,37 @@ its easier to just keep the beam vertical.
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
|
||||
// Add the fingerprints
|
||||
//
|
||||
if(fingerprints[full_print])
|
||||
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.
|
||||
|
||||
if(28 to 32)
|
||||
if(prob(1))
|
||||
fingerprints[full_print] = full_print // You rolled a one buddy.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32
|
||||
|
||||
if(24 to 27)
|
||||
if(prob(3))
|
||||
fingerprints[full_print] = full_print //Sucks to be you.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29
|
||||
|
||||
if(20 to 23)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = full_print //Had a good run didn't ya.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25
|
||||
|
||||
if(16 to 19)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = full_print //Welp.
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21
|
||||
|
||||
if(0 to 15)
|
||||
if(prob(5))
|
||||
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
|
||||
else
|
||||
fingerprints[full_print] = full_print
|
||||
|
||||
else
|
||||
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.
|
||||
|
||||
fingerprints[full_print] = full_print
|
||||
|
||||
return 1
|
||||
else
|
||||
//Smudge up dem prints some
|
||||
if(fingerprintslast != M.key)
|
||||
if(fingerprintslast != M.ckey)
|
||||
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
|
||||
fingerprintslast = M.key
|
||||
fingerprintslast = M.ckey
|
||||
|
||||
//Cleaning up shit.
|
||||
if(fingerprints && !fingerprints.len)
|
||||
del(fingerprints)
|
||||
return
|
||||
|
||||
|
||||
/atom/proc/transfer_fingerprints_to(var/atom/A)
|
||||
|
||||
if(!istype(A.fingerprints,/list))
|
||||
// Make sure everything are lists.
|
||||
if(!islist(A.fingerprints))
|
||||
A.fingerprints = list()
|
||||
|
||||
if(!istype(A.fingerprintshidden,/list))
|
||||
if(!islist(A.fingerprintshidden))
|
||||
A.fingerprintshidden = list()
|
||||
|
||||
if(!istype(fingerprintshidden, /list))
|
||||
if(!islist(fingerprints))
|
||||
fingerprints = list()
|
||||
if(!islist(fingerprintshidden))
|
||||
fingerprintshidden = list()
|
||||
|
||||
//skytodo
|
||||
//A.fingerprints |= fingerprints //detective
|
||||
//A.fingerprintshidden |= fingerprintshidden //admin
|
||||
if(A.fingerprints && fingerprints)
|
||||
// Transfer
|
||||
if(fingerprints)
|
||||
A.fingerprints |= fingerprints.Copy() //detective
|
||||
if(A.fingerprintshidden && fingerprintshidden)
|
||||
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
|
||||
if(fingerprintshidden)
|
||||
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
|
||||
A.fingerprintslast = fingerprintslast
|
||||
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
|
||||
precision_coeff = P.rating
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/P in component_parts)
|
||||
damage_coeff = P.rating
|
||||
|
||||
damage_coeff = P.rating
|
||||
|
||||
/obj/machinery/dna_scannernew/allow_drop()
|
||||
return 0
|
||||
|
||||
@@ -186,8 +186,8 @@
|
||||
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", item)
|
||||
|
||||
if(exchange_parts(user, item))
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(istype(item, /obj/item/weapon/crowbar))
|
||||
if(panel_open)
|
||||
for(var/obj/I in contents) // in case there is something in the scanner
|
||||
@@ -237,22 +237,21 @@
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
|
||||
|
||||
if(!M.client && M.mind)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.mind == M.mind)
|
||||
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
|
||||
break
|
||||
var/mob/dead/observer/ghost = occupant.get_ghost()
|
||||
if(ghost)
|
||||
ghost << "<span class='ghostalert'>Your corpse has been placed into a cloning scanner. Return to your body if you want to be cloned!</span> (Verbs -> Ghost -> Re-enter corpse)"
|
||||
ghost << sound('sound/effects/genetics.ogg')
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/proc/go_out()
|
||||
if (!src.occupant)
|
||||
usr << "<span class=\"warning\">The scanner is empty!</span>"
|
||||
return
|
||||
|
||||
|
||||
if (src.locked)
|
||||
usr << "<span class=\"warning\">The scanner is locked!</span>"
|
||||
return
|
||||
|
||||
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
@@ -222,19 +222,26 @@ Obviously, requires DNA2.
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/choose_targets(mob/user = usr)
|
||||
var/list/targets = new /list()
|
||||
var/list/validtargets = new /list()
|
||||
for(var/mob/M in view(usr))
|
||||
validtargets += M
|
||||
for(var/mob/M in living_mob_list)
|
||||
if(M && M.mind)
|
||||
var/special_role = M.mind.special_role
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien")
|
||||
continue
|
||||
|
||||
validtargets += M
|
||||
|
||||
if(!validtargets.len || validtargets.len == 1)
|
||||
usr << "<span class='warning'>There are no valid targets in range!</span>"
|
||||
usr << "<span class='warning'>There are no valid targets!</span>"
|
||||
start_recharge()
|
||||
return
|
||||
|
||||
targets += input("Choose the target to talk to.", "Targeting") as mob in validtargets
|
||||
|
||||
perform(targets)
|
||||
|
||||
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/cast(list/targets)
|
||||
if(!ishuman(usr)) return
|
||||
var/say = input("What do you wish to say")
|
||||
var/say = strip_html(input("What do you wish to say"))
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
if(M_REMOTE_TALK in target.mutations)
|
||||
|
||||
@@ -30,7 +30,7 @@ var/list/blob_nodes = list()
|
||||
|
||||
/datum/game_mode/blob/pre_setup()
|
||||
|
||||
var/list/possible_blobs = get_players_for_role(BE_ALIEN)
|
||||
var/list/possible_blobs = get_players_for_role(BE_BLOB)
|
||||
|
||||
// stop setup if no possible traitors
|
||||
if(!possible_blobs.len)
|
||||
@@ -182,7 +182,7 @@ var/list/blob_nodes = list()
|
||||
return
|
||||
|
||||
if (2)
|
||||
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to mantain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
|
||||
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
|
||||
set_security_level("gamma")
|
||||
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
|
||||
if(V && V.z == 1)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/list/candidates = list()
|
||||
|
||||
if(!new_overmind)
|
||||
candidates = get_candidates(BE_ALIEN)
|
||||
candidates = get_candidates(BE_BLOB)
|
||||
if(candidates.len)
|
||||
C = pick(candidates)
|
||||
else
|
||||
|
||||
@@ -573,6 +573,8 @@
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.adjustStaminaLoss(-75)
|
||||
C.reagents.add_reagent("synaptizine", 20)
|
||||
C.lying = 0
|
||||
C.update_canmove()
|
||||
|
||||
@@ -685,7 +687,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
/mob/proc/changeling_hivedownload()
|
||||
set category = "Changeling"
|
||||
set name = "Hive Absorb (20)"
|
||||
set desc = "Allows you to absorb DNA that is being channeled in the airwaves."
|
||||
set desc = "Allows you to absorb DNA that is being channelled in the airwaves."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(20,1)
|
||||
if(!changeling) return
|
||||
@@ -770,6 +772,12 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
if(!sting_can_reach(T, changeling.sting_range)) return
|
||||
if(!changeling_power(required_chems)) return
|
||||
|
||||
if(ishuman(T))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
src << "<span class='warning'>This won't work on synthetics.</span>"
|
||||
return
|
||||
|
||||
changeling.chem_charges -= required_chems
|
||||
changeling.sting_range = 1
|
||||
src.verbs -= verb_path
|
||||
@@ -885,7 +893,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
|
||||
var/mob/living/carbon/T = changeling_sting(5,/mob/proc/changeling_unfat_sting)
|
||||
if(!T) return 0
|
||||
T << "<span class='danger'>you feel a small prick as stomach churns violently and you become to feel skinnier.</span>"
|
||||
T << "<span class='danger'>You feel a small prick as stomach churns violently and you become to feel skinnier.</span>"
|
||||
T.overeatduration = 0
|
||||
T.nutrition -= 100
|
||||
feedback_add_details("changeling_powers","US")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
icon_state = "paper_talisman"
|
||||
var/imbue = null
|
||||
var/uses = 0
|
||||
|
||||
info = "<center><img src='talisman.png'></center><br/><br/>"
|
||||
|
||||
examine()
|
||||
set src in view(2)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
@@ -19,18 +20,25 @@
|
||||
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || C.z != 1)
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
if(announce)
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in machines)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || C.z != 1)
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
|
||||
@@ -280,7 +280,7 @@ Implants;
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind)
|
||||
// NT relation option
|
||||
var/special_role = man.mind.special_role
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate")
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien")
|
||||
continue //NT intelligence ruled out possiblity that those are too classy to pretend to be a crew.
|
||||
if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
|
||||
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
|
||||
|
||||
@@ -48,7 +48,7 @@ rcd light flash thingy on matter drain
|
||||
for(var/mob/living/silicon/ai/ai in player_list)
|
||||
ai.fire_res_on_core = 1
|
||||
src.verbs -= /mob/living/silicon/ai/proc/fireproof_core
|
||||
src << "\red Core fireproofed."
|
||||
src << "<span class='notice'>Core fireproofed.</span>"
|
||||
|
||||
/datum/AI_Module/large/upgrade_turrets
|
||||
module_name = "AI Turret upgrade"
|
||||
@@ -66,6 +66,81 @@ rcd light flash thingy on matter drain
|
||||
for(var/obj/machinery/turret/turret in machines)
|
||||
turret.health += 30
|
||||
turret.shot_delay = 20
|
||||
src << "<span class='notice'>Turrets upgraded.</span>"
|
||||
|
||||
/datum/AI_Module/large/lockdown
|
||||
module_name = "Hostile Station Lockdown"
|
||||
mod_pick_name = "lockdown"
|
||||
description = "Take control of the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks."
|
||||
cost = 20
|
||||
one_time = 1
|
||||
|
||||
power_type = /mob/living/silicon/ai/proc/lockdown
|
||||
|
||||
/mob/living/silicon/ai/proc/lockdown()
|
||||
set category = "Malfunction"
|
||||
set name = "Initiate Hostile Lockdown"
|
||||
|
||||
if(src.stat == 2)
|
||||
src <<"You cannot begin a lockdown because you are dead!"
|
||||
return
|
||||
|
||||
if(malf_cooldown)
|
||||
return
|
||||
|
||||
var/obj/machinery/door/airlock/AL
|
||||
for(var/obj/machinery/door/D in airlocks)
|
||||
spawn()
|
||||
if(istype(D, /obj/machinery/door/airlock))
|
||||
AL = D
|
||||
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
|
||||
AL.locked = 0 //For airlocks that were bolted open.
|
||||
AL.safe = 0 //DOOR CRUSH
|
||||
AL.close()
|
||||
AL.locked = 1 //Bolt it!
|
||||
AL.lights = 0 //Stealth bolt for a classic AI door trap.
|
||||
AL.secondsElectrified = -1 //Shock it!
|
||||
else if(!D.stat) //So that only powered doors are closed.
|
||||
D.close() //Close ALL the doors!
|
||||
|
||||
var/obj/machinery/computer/communications/C = locate() in machines
|
||||
if(C)
|
||||
C.post_status("alert", "lockdown")
|
||||
|
||||
src.verbs += /mob/living/silicon/ai/proc/disablelockdown
|
||||
src << "<span class = 'warning'>Lockdown Initiated.</span>"
|
||||
malf_cooldown = 1
|
||||
spawn(30)
|
||||
malf_cooldown = 0
|
||||
|
||||
/mob/living/silicon/ai/proc/disablelockdown()
|
||||
set category = "Malfunction"
|
||||
set name = "Disable Lockdown"
|
||||
|
||||
if(src.stat == 2)
|
||||
src <<"You cannot disable lockdown because you are dead!"
|
||||
return
|
||||
if(malf_cooldown)
|
||||
return
|
||||
|
||||
var/obj/machinery/door/airlock/AL
|
||||
for(var/obj/machinery/door/D in airlocks)
|
||||
spawn()
|
||||
if(istype(D, /obj/machinery/door/airlock))
|
||||
AL = D
|
||||
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
|
||||
AL.locked = 0
|
||||
AL.secondsElectrified = 0
|
||||
AL.open()
|
||||
AL.safe = 1
|
||||
AL.lights = 1 //Essentially reset the airlock to normal.
|
||||
else if(!D.stat) //Opens only powered doors.
|
||||
D.open() //Open everything!
|
||||
|
||||
src << "<span class = 'notice'>Lockdown Lifted.</span>"
|
||||
malf_cooldown = 1
|
||||
spawn(30)
|
||||
malf_cooldown = 0
|
||||
|
||||
/datum/AI_Module/large/disable_rcd
|
||||
module_name = "RCD disable"
|
||||
@@ -85,8 +160,8 @@ rcd light flash thingy on matter drain
|
||||
rcd.disabled = 1
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/tool/rcd/rcd in world)
|
||||
rcd.disabled = 1
|
||||
src << "RCD-disabling pulse emitted."
|
||||
else src << "Out of uses."
|
||||
src << "<span class='warning>RCD-disabling pulse emitted.</span>"
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
|
||||
/datum/AI_Module/small/overload_machine
|
||||
module_name = "Machine overload"
|
||||
@@ -101,17 +176,48 @@ rcd light flash thingy on matter drain
|
||||
set name = "Overload Machine"
|
||||
set category = "Malfunction"
|
||||
if (istype(M, /obj/machinery))
|
||||
if(istype(M, /obj/machinery/singularity) || istype(M,/obj/machinery/field_generator) || istype(M, /obj/machinery/singularity/narsie))
|
||||
src << "This machine can not be overloaded due to a firewall."
|
||||
return
|
||||
for(var/datum/AI_Module/small/overload_machine/overload in current_modules)
|
||||
if(overload.uses > 0)
|
||||
overload.uses --
|
||||
for(var/mob/V in hearers(M, null))
|
||||
V.show_message("\blue You hear a loud electrical buzzing sound!", 2)
|
||||
V.show_message("<span class='notice'>You hear a loud electrical buzzing sound!</span>", 2)
|
||||
spawn(50)
|
||||
explosion(get_turf(M), 0,1,1,0)
|
||||
del(M)
|
||||
else src << "Out of uses."
|
||||
else src << "That's not a machine."
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
else src << "<span class='notice'>That's not a machine.</span>"
|
||||
|
||||
/datum/AI_Module/small/override_machine
|
||||
module_name = "Machine override"
|
||||
mod_pick_name = "override"
|
||||
description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. 4 uses."
|
||||
uses = 4
|
||||
cost = 15
|
||||
|
||||
power_type = /mob/living/silicon/ai/proc/override_machine
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/override_machine(obj/machinery/M as obj in world)
|
||||
set name = "Override Machine"
|
||||
set category = "Malfunction"
|
||||
if (istype(M, /obj/machinery))
|
||||
if(istype(M, /obj/machinery/singularity) || istype(M,/obj/machinery/field_generator) || istype(M, /obj/machinery/singularity/narsie))
|
||||
src << "This machine can not be overloaded due to a firewall."
|
||||
return
|
||||
for(var/datum/AI_Module/small/override_machine/override in current_modules)
|
||||
if(override.uses > 0)
|
||||
override.uses --
|
||||
for(var/mob/V in hearers(M, null))
|
||||
V.show_message("<span class='notice'>You hear a loud electrical buzzing sound!</span>", 2)
|
||||
src << "<span class='warning'>Reprogramming machine behaviour...</span>"
|
||||
spawn(50)
|
||||
if(M)
|
||||
new /mob/living/simple_animal/hostile/mimic/copy/machine(get_turf(M), M, src, 1)
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
else src << "<span class='notice'>That's not a machine.</span>"
|
||||
|
||||
/datum/AI_Module/large/place_cyborg_transformer
|
||||
module_name = "Robotic Factory (Removes Shunting)"
|
||||
@@ -173,7 +279,7 @@ rcd light flash thingy on matter drain
|
||||
playsound(middle, 'sound/effects/phasein.ogg', 100, 1)
|
||||
src.can_shunt = 0
|
||||
PCT.uses -= 1
|
||||
src << "You cannot shunt anymore."
|
||||
src << "<span class='warning'>You cannot shunt anymore.</span>"
|
||||
|
||||
|
||||
/datum/AI_Module/small/blackout
|
||||
@@ -195,33 +301,18 @@ rcd light flash thingy on matter drain
|
||||
if(prob(30*apc.overload))
|
||||
apc.overload_lighting()
|
||||
else apc.overload++
|
||||
else src << "Out of uses."
|
||||
|
||||
/datum/AI_Module/small/interhack
|
||||
module_name = "Hack intercept"
|
||||
mod_pick_name = "interhack"
|
||||
description = "Hacks the status upgrade from Cent. Com, removing any information about malfunctioning electrical systems."
|
||||
cost = 15
|
||||
one_time = 1
|
||||
|
||||
power_type = /mob/living/silicon/ai/proc/interhack
|
||||
|
||||
/mob/living/silicon/ai/proc/interhack()
|
||||
set category = "Malfunction"
|
||||
set name = "Hack intercept"
|
||||
src.verbs -= /mob/living/silicon/ai/proc/interhack
|
||||
ticker.mode:hack_intercept()
|
||||
src << "<span class='notice'>Overcurrent applied to the powernet.</span>"
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
|
||||
/datum/AI_Module/small/reactivate_camera
|
||||
module_name = "Reactivate camera"
|
||||
mod_pick_name = "recam"
|
||||
description = "Reactivates a currently disabled camera. 10 uses."
|
||||
uses = 10
|
||||
cost = 15
|
||||
description = "Reactivates a currently disabled camera. 5 uses."
|
||||
uses = 5
|
||||
cost = 5
|
||||
|
||||
power_type = /client/proc/reactivate_camera
|
||||
|
||||
|
||||
/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.viewpoints)
|
||||
set name = "Reactivate Camera"
|
||||
set category = "Malfunction"
|
||||
@@ -231,17 +322,18 @@ rcd light flash thingy on matter drain
|
||||
if(!C.status)
|
||||
C.deactivate(src)
|
||||
camera.uses --
|
||||
src << "<span class='notice'>Camera reactivated.</span>"
|
||||
else
|
||||
src << "This camera is either active, or not repairable."
|
||||
else src << "Out of uses."
|
||||
else src << "That's not a camera."
|
||||
src << "<span class='notice'>This camera is either active, or not repairable.</span>"
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
else src << "<span class='notice'>That's not a camera.</span>"
|
||||
|
||||
/datum/AI_Module/small/upgrade_camera
|
||||
module_name = "Upgrade Camera"
|
||||
mod_pick_name = "upgradecam"
|
||||
description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
|
||||
uses = 10
|
||||
cost = 15
|
||||
description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 5 uses."
|
||||
uses = 5
|
||||
cost = 5
|
||||
|
||||
power_type = /client/proc/upgrade_camera
|
||||
|
||||
@@ -274,11 +366,11 @@ rcd light flash thingy on matter drain
|
||||
if(upgraded)
|
||||
UC.uses --
|
||||
C.visible_message("<span class='notice'>\icon[C] *beep*</span>")
|
||||
src << "Camera successully upgraded!"
|
||||
src << "<span class='notice'>Camera successully upgraded!</span>"
|
||||
else
|
||||
src << "This camera is already upgraded!"
|
||||
src << "<span class='notice'>This camera is already upgraded!</span>"
|
||||
else
|
||||
src << "Out of uses."
|
||||
src << "<span class='notice'>Out of uses.</span>"
|
||||
|
||||
|
||||
/datum/module_picker
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
name = "AI malfunction"
|
||||
config_tag = "malfunction"
|
||||
required_players = 2
|
||||
required_players_secret = 15
|
||||
required_players_secret = 20
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/const/waittime_l = 600
|
||||
var/const/waittime_h = 1800 // started at 1800
|
||||
|
||||
var/AI_win_timeleft = 1800 //started at 1800, in case I change this for testing round end.
|
||||
var/AI_win_timeleft = 5400 //started at 5400, in case I change this for testing round end.
|
||||
var/malf_mode_declared = 0
|
||||
var/station_captured = 0
|
||||
var/to_nuke_or_not_to_nuke = 0
|
||||
@@ -88,8 +88,8 @@
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/process()
|
||||
if (apcs >= 3 && malf_mode_declared)
|
||||
AI_win_timeleft -= ((apcs/6)*last_tick_duration) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
|
||||
if ((apcs > 0) && malf_mode_declared)
|
||||
AI_win_timeleft -= apcs * last_tick_duration //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
|
||||
..()
|
||||
if (AI_win_timeleft<=0)
|
||||
check_win()
|
||||
@@ -106,8 +106,8 @@
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/proc/capture_the_station()
|
||||
world << {"<FONT size = 3><B>The AI has won!</B></FONT><br />
|
||||
<B>It has fully taken control of all of [station_name()]'s systems.</B>"}
|
||||
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
|
||||
world << "<B>It has fully taken control of all of [station_name()]'s systems.</B>"
|
||||
|
||||
to_nuke_or_not_to_nuke = 1
|
||||
for(var/datum/mind/AI_mind in malf_ai)
|
||||
@@ -170,6 +170,12 @@
|
||||
command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert")
|
||||
set_security_level("delta")
|
||||
|
||||
for(var/obj/item/weapon/pinpointer/point in world)
|
||||
for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
|
||||
var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns
|
||||
if(A.stat != DEAD)
|
||||
point.the_disk = A //The pinpointer now tracks the AI core.
|
||||
|
||||
ticker.mode:malf_mode_declared = 1
|
||||
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
|
||||
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
|
||||
|
||||
@@ -231,7 +231,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
synd_mob.equip_to_slot_or_del(R, slot_l_ear)
|
||||
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(synd_mob), slot_shoes)
|
||||
synd_mob.equip_or_collect(new /obj/item/clothing/gloves/combat(synd_mob), slot_gloves)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate(synd_mob), slot_wear_id)
|
||||
if(synd_mob.backbag == 2) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(synd_mob), slot_back)
|
||||
|
||||
@@ -29,6 +29,7 @@ var/bomb_set
|
||||
var/uititle
|
||||
flags = FPRINT
|
||||
use_power = 0
|
||||
unacidable = 1
|
||||
|
||||
/obj/machinery/nuclearbomb/New()
|
||||
..()
|
||||
|
||||
@@ -386,7 +386,7 @@ datum/objective/silence
|
||||
|
||||
|
||||
datum/objective/escape
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive and free."
|
||||
explanation_text = "Escape on the shuttle alive and free."
|
||||
|
||||
check_completion()
|
||||
if(issilicon(owner.current))
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
name = "a functional AI"
|
||||
typepath = /obj/item/device/aicard
|
||||
|
||||
/datum/theft_objective/defib
|
||||
name = "a defibrillator"
|
||||
typepath = /obj/item/weapon/defibrillator
|
||||
protected_jobs = list("Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", "Psychiatrist", "Paramedic", "Brig Physician")
|
||||
|
||||
/datum/theft_objective/magboots
|
||||
name = "the chief engineer's advanced magnetic boots"
|
||||
typepath = /obj/item/clothing/shoes/magboots/advance
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
M.current.weakened = 0
|
||||
M.current.stunned = 0
|
||||
M.current.paralysis = 0
|
||||
M.current.adjustStaminaLoss(-75)
|
||||
//M.vampire.bloodusable -= 10
|
||||
M.current << "\blue You flush your system with clean blood and remove any incapacitating effects."
|
||||
spawn(1)
|
||||
|
||||
@@ -9,9 +9,9 @@ VOX TRADE ROUNDTYPE
|
||||
/datum/game_mode/vox/trade
|
||||
name = "trade"
|
||||
config_tag = "trade"
|
||||
required_players = 10
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
required_players = 15
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
@@ -94,7 +94,7 @@ datum/objective/vox/heist/loot
|
||||
if(2)
|
||||
target = /obj/machinery/the_singularitygen
|
||||
target_amount = 1
|
||||
loot = "a gravitational generator"
|
||||
loot = "a gravitational singularity generator"
|
||||
if(3)
|
||||
target = /obj/machinery/power/emitter
|
||||
target_amount = 4
|
||||
@@ -216,7 +216,7 @@ datum/objective/vox/trade/trade
|
||||
if(2)
|
||||
target = /obj/machinery/the_singularitygen
|
||||
target_amount = 1
|
||||
loot = "a gravitational generator"
|
||||
loot = "a gravitational singularity generator"
|
||||
if(3)
|
||||
target = /obj/machinery/power/emitter
|
||||
target_amount = 4
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
var/randomizeguns = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
|
||||
var/randomizeguns = pick("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car")
|
||||
var/randomizemagic = pick("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge","wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying")
|
||||
if(!summon_type)
|
||||
switch (randomizeguns)
|
||||
if("taser")
|
||||
new /obj/item/weapon/gun/energy/taser(get_turf(H))
|
||||
new /obj/item/weapon/gun/energy/advtaser(get_turf(H))
|
||||
if("egun")
|
||||
new /obj/item/weapon/gun/energy/gun(get_turf(H))
|
||||
if("laser")
|
||||
@@ -33,7 +33,7 @@
|
||||
new /obj/item/weapon/gun/projectile/revolver(get_turf(H))
|
||||
if("detective")
|
||||
new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H))
|
||||
if("smg")
|
||||
if("c20r")
|
||||
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
|
||||
if("nuclear")
|
||||
new /obj/item/weapon/gun/energy/gun/nuclear(get_turf(H))
|
||||
@@ -45,7 +45,7 @@
|
||||
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
|
||||
if("silenced")
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H))
|
||||
new /obj/item/weapon/silencer(get_turf(H))
|
||||
new /obj/item/weapon/suppressor(get_turf(H))
|
||||
if("cannon")
|
||||
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
|
||||
if("doublebarrel")
|
||||
@@ -54,16 +54,18 @@
|
||||
new /obj/item/weapon/gun/projectile/shotgun/(get_turf(H))
|
||||
if("combatshotgun")
|
||||
new /obj/item/weapon/gun/projectile/shotgun/combat(get_turf(H))
|
||||
if("bulldog")
|
||||
new /obj/item/weapon/gun/projectile/automatic/bulldog(get_turf(H))
|
||||
if("mateba")
|
||||
new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H))
|
||||
if("smg")
|
||||
if("sabr")
|
||||
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
|
||||
if("uzi")
|
||||
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||
if("crossbow")
|
||||
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
|
||||
if("saw")
|
||||
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
|
||||
if("car")
|
||||
new /obj/item/weapon/gun/projectile/automatic/c90gl(get_turf(H))
|
||||
else
|
||||
switch (randomizemagic)
|
||||
if("fireball")
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/fireball/recoil(mob/user as mob)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
explosion(user.loc, -1, 0, 2, 3, 0)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke
|
||||
@@ -406,6 +406,7 @@
|
||||
spellname = "mindswap"
|
||||
icon_state ="bookmindswap"
|
||||
desc = "This book's cover is pristine, though its pages look ragged and torn."
|
||||
var/mob/stored_swap = null //Used in used book recoils to store an identity for mindswaps
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap/onlearned()
|
||||
spellname = pick("fireball","smoke","blind","forcewall","knock","horses","charge")
|
||||
@@ -415,8 +416,45 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You suddenly don't feel like yourself!</span>"
|
||||
wabbajack(user)
|
||||
if(stored_swap in dead_mob_list)
|
||||
stored_swap = null
|
||||
if(!stored_swap)
|
||||
stored_swap = user
|
||||
user <<"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>"
|
||||
return
|
||||
if(stored_swap == user)
|
||||
user <<"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>"
|
||||
return
|
||||
|
||||
if(user.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
user.verbs -= V
|
||||
|
||||
if(stored_swap.mind.special_verbs.len)
|
||||
for(var/V in stored_swap.mind.special_verbs)
|
||||
stored_swap.verbs -= V
|
||||
|
||||
var/mob/dead/observer/ghost = stored_swap.ghostize(0)
|
||||
ghost.spell_list = stored_swap.spell_list
|
||||
|
||||
user.mind.transfer_to(stored_swap)
|
||||
stored_swap.spell_list = user.spell_list
|
||||
|
||||
if(stored_swap.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
user.verbs += V
|
||||
|
||||
ghost.mind.transfer_to(user)
|
||||
user.key = ghost.key
|
||||
user.spell_list = ghost.spell_list
|
||||
|
||||
if(user.mind.special_verbs.len)
|
||||
for(var/V in user.mind.special_verbs)
|
||||
user.verbs += V
|
||||
|
||||
stored_swap <<"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>"
|
||||
user <<"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>"
|
||||
stored_swap = null
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/forcewall
|
||||
spell = /obj/effect/proc_holder/spell/wizard/aoe_turf/conjure/forcewall
|
||||
|
||||
@@ -8,20 +8,25 @@
|
||||
required_players = 0
|
||||
recommended_players = 30
|
||||
required_players_secret = 20
|
||||
required_enemies = 5
|
||||
recommended_enemies = 8
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
var/result = 0
|
||||
var/checkwin_counter = 0
|
||||
var/xenos_list = list()
|
||||
var/gammacalled = 0
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/list/raid_objectives = list() //Raid objectives.
|
||||
var/xenoai = 0 //Should the Xenos have their own AI?
|
||||
var/xenoborg = 0 //Should the Xenos have their own borg?
|
||||
var/gammaratio = 4 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
|
||||
|
||||
/datum/game_mode/xenos/announce()
|
||||
world << "<B>The current game mode is - Xenos!</B>"
|
||||
world << "<B>There is a \red Xenos Attack\black on the station. You can't let them take over!</B>"
|
||||
world << "<B>There is an Xenomorph attack on the station.<BR>Aliens - Kill or infect the crew. Protect the Queen. <BR>Crew - Protect the station. Exterminate all aliens.</B>"
|
||||
|
||||
/datum/game_mode/xenos/can_start()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
@@ -32,7 +37,6 @@
|
||||
if((player.client)&&(player.ready))
|
||||
playersready += 1
|
||||
|
||||
|
||||
//Check that we have enough alien candidates
|
||||
if(candidates.len < required_enemies)
|
||||
return 0
|
||||
@@ -67,15 +71,15 @@
|
||||
continue
|
||||
|
||||
var/xenoai_selected = 0
|
||||
var/xenoborg_selected=0
|
||||
var/xenoqueen_selected=0
|
||||
var/xenoborg_selected = 0
|
||||
var/xenoqueen_selected = 0
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
//XenoAI selection
|
||||
if(!xenoai_selected)
|
||||
//XenoAI selection
|
||||
if(xenoai && !xenoai_selected)
|
||||
var/mob/living/silicon/ai/O = new(xenos_spawn[spawnpos],,,1)//No MMI but safety is in effect.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
@@ -85,7 +89,8 @@
|
||||
O.mind.original = O
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
|
||||
//del(xeno_mind)
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name == "XenoAI")
|
||||
@@ -99,6 +104,7 @@
|
||||
O.laws = new /datum/ai_laws/alienmov
|
||||
O.name = "Alien AI"
|
||||
O.real_name = name
|
||||
xeno_mind.name = O.name
|
||||
O.alienAI = 1
|
||||
O.network = list("SS13","Xeno")
|
||||
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
|
||||
@@ -106,34 +112,35 @@
|
||||
xenoai_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoQueen Selection
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xenos_spawn[spawnpos])
|
||||
var/mob/living/carbon/alien/humanoid/queen/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
xeno_mind.name = O.name
|
||||
//del(xeno_mind)
|
||||
xenoqueen_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoBorg Selection
|
||||
if(!xenoborg_selected)
|
||||
//XenoBorg Selection
|
||||
if(xenoborg && !xenoborg_selected)
|
||||
var/mob/living/silicon/robot/O = new(xenos_spawn[spawnpos],0,0,1)
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.alien = 1
|
||||
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
|
||||
O.cell = new(O)
|
||||
O.cell.maxcharge = 15000
|
||||
O.cell.charge = 15000
|
||||
O.cell.maxcharge = 25000
|
||||
O.cell.charge = 25000
|
||||
O.gender = xeno_mind.current.gender
|
||||
O.invisibility = 0
|
||||
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
//del(xeno_mind)
|
||||
O.job = "Alien Cyborg"
|
||||
O.name = "Alien Cyborg"
|
||||
O.real_name = name
|
||||
xeno_mind.name = O.name
|
||||
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
|
||||
O.hands.icon_state = "standard"
|
||||
O.icon = 'icons/mob/alien.dmi'
|
||||
@@ -142,24 +149,133 @@
|
||||
O.connected_ai = select_active_alien_ai()
|
||||
O.laws = new /datum/ai_laws/alienmov()
|
||||
O.scrambledcodes = 1
|
||||
O.hiddenborg = 1
|
||||
O.alien_talk_understand = 1
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
|
||||
|
||||
xenoborg_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
xeno_mind.name = O.name
|
||||
//del(xeno_mind)
|
||||
spawnpos++
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/process()
|
||||
checkwin_counter++
|
||||
if(checkwin_counter >= 5)
|
||||
if(!result)
|
||||
ticker.mode.check_win()
|
||||
checkwin_counter = 0
|
||||
return 0
|
||||
|
||||
|
||||
/datum/game_mode/xenos/check_win()
|
||||
var/xenosalive = xenos_alive()
|
||||
var/playersalive = players_alive()
|
||||
var/playeralienratio = 0
|
||||
if(playersalive)
|
||||
playeralienratio = xenosalive / playersalive
|
||||
if(emergency_shuttle && emergency_shuttle.returned())
|
||||
return ..()
|
||||
if(!xenosalive)
|
||||
result = 1
|
||||
return 1
|
||||
else if(!playersalive)
|
||||
result = 2
|
||||
return 1
|
||||
else if(station_was_nuked)
|
||||
result = 3
|
||||
return 1
|
||||
else
|
||||
if(playeralienratio >= gammaratio && !gammacalled)
|
||||
gammacalled = 1
|
||||
command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
|
||||
set_security_level("gamma")
|
||||
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
|
||||
if(V && V.z == 1)
|
||||
V.locked = 0
|
||||
V.update_icon()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/check_finished()
|
||||
if(config.continous_rounds)
|
||||
if(result)
|
||||
return ..()
|
||||
if(emergency_shuttle && emergency_shuttle.returned())
|
||||
return ..()
|
||||
if(result || station_was_nuked)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/game_mode/xenos/proc/get_nuke_code()
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
if(bomb && bomb.r_code && bomb.z == 1)
|
||||
nukecode = bomb.r_code
|
||||
return nukecode
|
||||
|
||||
/datum/game_mode/xenos/proc/xenos_alive()
|
||||
var/list/livingxenos = list()
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
|
||||
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
|
||||
livingxenos += xeno
|
||||
return livingxenos.len
|
||||
|
||||
/datum/game_mode/xenos/proc/players_alive()
|
||||
var/list/livingplayers = list()
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
|
||||
if(ishuman(M))
|
||||
livingplayers += 1
|
||||
return livingplayers.len
|
||||
|
||||
/datum/game_mode/xenos/declare_completion()
|
||||
if(station_was_nuked)
|
||||
feedback_set_details("round_end_result","win - xenos nuked")
|
||||
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
|
||||
world << "<B>The station was destroyed in a nuclear explosion, preventing the aliens from overrunning it!</B>"
|
||||
else if(result == 1)
|
||||
feedback_set_details("round_end_result","win - xenos killed")
|
||||
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
|
||||
world << "<B>The aliens did not succeed and were exterminated by the crew!</B>"
|
||||
else if(result == 2)
|
||||
feedback_set_details("round_end_result","win - crew killed")
|
||||
world << "<FONT size = 3><B>Alien Victory</B></FONT>"
|
||||
world << "<B>The aliens were successful and slaughtered the crew!</B>"
|
||||
else
|
||||
feedback_set_details("round_end_result","win - crew escaped")
|
||||
world << "<FONT size = 3><B>Draw</B></FONT>"
|
||||
world << "<B>The crew has escaped from the aliens but did not exterminate them, allowing them to overrun the station.</B>"
|
||||
|
||||
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
|
||||
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
text += "<br><b>[xeno.key]</b> was <b>[xeno.name]</b> ("
|
||||
if(xeno.current)
|
||||
if(xeno.current.stat == DEAD)
|
||||
text += "died"
|
||||
else if(!xeno.current.client)
|
||||
text += "SSD"
|
||||
else
|
||||
text += "survived"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
world << text
|
||||
|
||||
..()
|
||||
return 1
|
||||
@@ -71,7 +71,10 @@
|
||||
/var/const/access_salvage_captain = 69 // Salvage ship captain's quarters
|
||||
/var/const/access_mechanic = 70
|
||||
/var/const/access_pilot = 71
|
||||
|
||||
/var/const/access_ntrec = 72
|
||||
/var/const/access_ntrep = 73
|
||||
/var/const/access_magistrate = 74
|
||||
/var/const/access_minisat = 75
|
||||
|
||||
/var/const/access_weapons = 99 //Weapon authorization for secbots
|
||||
|
||||
@@ -235,7 +238,7 @@
|
||||
access_theatre, access_research, access_mining, access_mailsorting,
|
||||
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
|
||||
access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_paramedic, access_blueshield, access_customs, access_mechanic,access_weapons,
|
||||
access_pilot)
|
||||
access_pilot, access_ntrec, access_ntrep, access_magistrate, access_minisat)
|
||||
|
||||
/proc/get_all_centcom_access()
|
||||
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
|
||||
@@ -248,17 +251,17 @@
|
||||
if(0)
|
||||
return get_all_accesses()
|
||||
if(1) //security
|
||||
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
|
||||
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_customs, access_pilot, access_hos)
|
||||
if(2) //medbay
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo, access_paramedic)
|
||||
if(3) //research
|
||||
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_rd)
|
||||
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_minisat, access_rd)
|
||||
if(4) //engineering and maintenance
|
||||
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_ce, access_mechanic)
|
||||
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_minisat, access_ce, access_mechanic)
|
||||
if(5) //command
|
||||
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_tcomsat, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain, access_blueshield, access_customs)
|
||||
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_tcomsat, access_gateway, access_all_personal_lockers, access_heads_vault, access_blueshield, access_ntrec, access_ntrep, access_hop, access_captain)
|
||||
if(6) //station general
|
||||
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
|
||||
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_magistrate, access_clown, access_mime)
|
||||
if(7) //supply
|
||||
return list(access_mailsorting, access_mining, access_mining_station, access_cargo, access_qm)
|
||||
|
||||
@@ -416,12 +419,22 @@
|
||||
return "Brig"
|
||||
if(access_blueshield)
|
||||
return "Blueshield"
|
||||
if(access_ntrec)
|
||||
return "Nanotrasen Recruiter"
|
||||
if(access_ntrep)
|
||||
return "Nanotrasen Rep."
|
||||
if(access_paramedic)
|
||||
return "Paramedic"
|
||||
if(access_customs)
|
||||
return "Customs"
|
||||
if(access_mechanic)
|
||||
return "Mechanic Workshop"
|
||||
if(access_pilot)
|
||||
return "Security Pod Pilot"
|
||||
if(access_magistrate)
|
||||
return "Magistrate"
|
||||
if(access_minisat)
|
||||
return "AI Satellite"
|
||||
if(access_weapons)
|
||||
return "Weapon Permit"
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
|
||||
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
|
||||
access_heads, access_construction, access_sec_doors,
|
||||
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload)
|
||||
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic)
|
||||
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
|
||||
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
|
||||
access_heads, access_construction, access_sec_doors,
|
||||
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_mechanic)
|
||||
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic)
|
||||
minimal_player_age = 21
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery, access_maint_tunnels)
|
||||
alt_titles = list("Surgeon","Nurse","Mortician")
|
||||
alt_titles = list("Surgeon","Nurse","Coroner")
|
||||
minimal_player_age = 3
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -60,10 +60,11 @@
|
||||
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
if (H.mind.role_alt_title)
|
||||
switch(H.mind.role_alt_title)
|
||||
if("Mortician")
|
||||
if("Coroner")
|
||||
H.equip_or_collect(new /obj/item/clothing/under/rank/medical/mortician(H), slot_w_uniform)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat/mortician(H), slot_wear_suit)
|
||||
if(H.backbag != 1)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/surgery/black(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/autopsy_scanner(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/device/mass_spectrometer(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/bodybags(H.back), slot_in_backpack)
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_tech_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat)
|
||||
minimal_access = list(access_eva, access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_tech_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_maint_tunnels)
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat, access_maint_tunnels)
|
||||
minimal_player_age = 21
|
||||
|
||||
// All science-y guys get bonuses for maxing out their tech.
|
||||
@@ -52,7 +52,7 @@
|
||||
selection_color = "#ffeeff"
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch)
|
||||
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch, access_maint_tunnels)
|
||||
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher")
|
||||
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobotanist")
|
||||
minimal_player_age = 3
|
||||
|
||||
// All science-y guys get bonuses for maxing out their tech.
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_forensics_lockers, access_customs, access_pilot, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_weapons)
|
||||
minimal_access = list(access_eva, access_security, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs,access_weapons)
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs, access_pilot, access_weapons)
|
||||
minimal_player_age = 21
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -30,8 +30,7 @@
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/armor/hos(H), slot_wear_suit)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/helmet/HoS(H), slot_head)
|
||||
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
|
||||
H.equip_or_collect(new /obj/item/clothing/head/HoS(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
@@ -72,11 +71,14 @@
|
||||
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_or_collect(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/warden(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/warden(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
|
||||
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
|
||||
@@ -104,7 +106,7 @@
|
||||
alt_titles = list("Forensic Technician")
|
||||
|
||||
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
|
||||
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
|
||||
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
|
||||
alt_titles = list("Forensic Technician")
|
||||
minimal_player_age = 14
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -136,6 +138,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -170,8 +173,10 @@
|
||||
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/security(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/soft/sec(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
@@ -208,9 +213,9 @@
|
||||
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_or_collect(new /obj/item/clothing/under/fluff/milo_hachert(H), slot_w_uniform)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/helmet/customs(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/customs(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/stamp(H), slot_in_backpack)
|
||||
@@ -279,10 +284,10 @@
|
||||
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
|
||||
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/bomber(H), slot_wear_suit)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/jacket(H), slot_wear_suit)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_belt)
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
flag = CYBORG
|
||||
department_flag = ENGSEC
|
||||
total_positions = 0
|
||||
spawn_positions = 2
|
||||
spawn_positions = 1
|
||||
supervisors = "your laws and the AI" //Nodrak
|
||||
selection_color = "#ddffdd"
|
||||
minimal_player_age = 21
|
||||
|
||||
@@ -101,23 +101,23 @@
|
||||
selection_color = "#ddddff"
|
||||
idtype = /obj/item/weapon/card/id/centcom
|
||||
req_admin_notify = 1
|
||||
minimal_player_age = 10
|
||||
minimal_player_age = 21
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_medical, access_engine, access_change_ids, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons, access_ntrep)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_ai_upload, access_eva, access_heads,
|
||||
access_medical, access_engine, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons, access_ntrep)
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/ntrep(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
@@ -127,7 +127,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/lighter/zippo/fluff/nt_rep(H.back), slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
|
||||
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/ntrep(H), slot_wear_pda)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -146,23 +146,23 @@
|
||||
selection_color = "#ddddff"
|
||||
idtype = /obj/item/weapon/card/id/centcom
|
||||
req_admin_notify = 1
|
||||
minimal_player_age = 10
|
||||
minimal_player_age = 21
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, access_change_ids,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_ntrec)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_ai_upload, access_eva, access_heads, access_change_ids,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_ntrec)
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/ntrec(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
@@ -171,7 +171,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/lighter/zippo/fluff/nt_rep(H.back), slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
|
||||
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/ntrec(H), slot_wear_pda)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -190,9 +190,9 @@
|
||||
selection_color = "#ddddff"
|
||||
idtype = /obj/item/weapon/card/id/centcom
|
||||
req_admin_notify = 1
|
||||
minimal_player_age = 10
|
||||
minimal_player_age = 21
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_medical, access_engine, access_change_ids, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/blueshield(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
|
||||
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
@@ -215,9 +215,10 @@
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/combat(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health_advanced, slot_glasses)
|
||||
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
|
||||
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/blueshield(H), slot_w_uniform)
|
||||
H.equip_if_possible(new /obj/item/clothing/suit/armor/vest/fluff/deus_blueshield(H), slot_wear_suit)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/blueshield(H), slot_wear_pda)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/deathimp(H), slot_r_hand)
|
||||
else
|
||||
@@ -240,18 +241,18 @@
|
||||
selection_color = "#ddddff"
|
||||
idtype = /obj/item/weapon/card/id/centcom
|
||||
req_admin_notify = 1
|
||||
minimal_player_age = 10
|
||||
minimal_player_age = 21
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_medical, access_engine, access_change_ids, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_magistrate)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate)
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/heads/magistrate(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
@@ -261,7 +262,8 @@
|
||||
H.equip_if_possible(new /obj/item/clothing/suit/judgerobe(H), slot_wear_suit)
|
||||
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/powdered_wig(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
|
||||
H.equip_or_collect(new /obj/item/device/pda/heads/magistrate(H), slot_wear_pda)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/device/pda/mime(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/white(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/color/white(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/clothing/head/beret(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
|
||||
if(H.backbag == 1)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
|
||||
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
|
||||
return
|
||||
|
||||
var/mob/living/L = O
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
_color = "blue"
|
||||
can_label = 0
|
||||
/obj/machinery/portable_atmospherics/canister/toxins
|
||||
name = "Canister \[Toxin (Bio)\]"
|
||||
name = "Canister \[Toxin (Plasma)\]"
|
||||
icon_state = "orange"
|
||||
_color = "orange"
|
||||
can_label = 0
|
||||
@@ -252,6 +252,9 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
|
||||
return src.ui_interact(user)
|
||||
@@ -333,7 +336,7 @@ update_flag
|
||||
"\[N2O\]" = "redws", \
|
||||
"\[N2\]" = "red", \
|
||||
"\[O2\]" = "blue", \
|
||||
"\[Toxin (Bio)\]" = "orange", \
|
||||
"\[Toxin (Plasma)\]" = "orange", \
|
||||
"\[CO2\]" = "black", \
|
||||
"\[Air\]" = "grey", \
|
||||
"\[CAUTION\]" = "yellow", \
|
||||
|
||||
+269
-412
@@ -1,73 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/stack/sheet/metal(), \
|
||||
new /obj/item/stack/sheet/glass(), \
|
||||
new /obj/item/stack/sheet/rglass(), \
|
||||
new /obj/item/stack/sheet/fur(), \
|
||||
new /obj/item/stack/rods(), \
|
||||
new /obj/item/weapon/crowbar(), \
|
||||
new /obj/item/weapon/screwdriver(), \
|
||||
new /obj/item/weapon/weldingtool(), \
|
||||
new /obj/item/weapon/wirecutters(), \
|
||||
new /obj/item/weapon/wrench(), \
|
||||
new /obj/item/device/multitool(), \
|
||||
new /obj/item/device/analyzer(), \
|
||||
new /obj/item/device/t_scanner(), \
|
||||
new /obj/item/device/flashlight(), \
|
||||
new /obj/item/weapon/extinguisher(), \
|
||||
new /obj/item/clothing/head/welding(), \
|
||||
new /obj/item/weapon/stock_parts/console_screen(), \
|
||||
new /obj/item/weapon/airlock_electronics(), \
|
||||
new /obj/item/weapon/airalarm_electronics(), \
|
||||
new /obj/item/weapon/firealarm_electronics(), \
|
||||
new /obj/item/weapon/kitchenknife(), \
|
||||
new /obj/item/weapon/scalpel(), \
|
||||
new /obj/item/weapon/circular_saw(), \
|
||||
new /obj/item/weapon/surgicaldrill(),\
|
||||
new /obj/item/weapon/retractor(),\
|
||||
new /obj/item/weapon/cautery(),\
|
||||
new /obj/item/weapon/hemostat(),\
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(), \
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
|
||||
new /obj/item/weapon/reagent_containers/glass/bucket(), \
|
||||
new /obj/item/device/taperecorder(), \
|
||||
new /obj/item/device/assembly/igniter(), \
|
||||
new /obj/item/device/assembly/signaler(), \
|
||||
new /obj/item/device/radio/headset(), \
|
||||
new /obj/item/device/radio/off(), \
|
||||
new /obj/item/device/assembly/infra(), \
|
||||
new /obj/item/device/assembly/timer(), \
|
||||
new /obj/item/device/assembly/prox_sensor(), \
|
||||
new /obj/item/device/assembly/voice(), \
|
||||
new /obj/item/weapon/light/tube(), \
|
||||
new /obj/item/weapon/light/bulb(), \
|
||||
new /obj/item/weapon/camera_assembly(), \
|
||||
new /obj/item/weapon/rcd_ammo(), \
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
||||
new /obj/item/ammo_box/c38(), \
|
||||
new /obj/item/clothing/ears/earmuffs/tribblemuffs(), \
|
||||
new /obj/item/clothing/gloves/furgloves(), \
|
||||
new /obj/item/clothing/head/furcap(), \
|
||||
new /obj/item/clothing/shoes/furboots(), \
|
||||
new /obj/item/clothing/suit/furcoat(), \
|
||||
new /obj/item/clothing/suit/furcape(), \
|
||||
)
|
||||
|
||||
var/global/list/autolathe_recipes_hidden = list( \
|
||||
new /obj/item/weapon/flamethrower/full(), \
|
||||
new /obj/item/weapon/rcd(), \
|
||||
new /obj/item/device/radio/electropack(), \
|
||||
new /obj/item/weapon/weldingtool/largetank(), \
|
||||
new /obj/item/weapon/handcuffs(), \
|
||||
new /obj/item/weapon/hatchet(), \
|
||||
new /obj/item/ammo_box/a357(), \
|
||||
new /obj/item/ammo_casing/shotgun(), \
|
||||
new /obj/item/ammo_casing/shotgun/buck(), \
|
||||
new /obj/item/ammo_casing/shotgun/incendiary(), \
|
||||
/*new /obj/item/ammo_casing/shotgun/dart(), \
|
||||
new /obj/item/weapon/shield/riot(), */ \
|
||||
)
|
||||
/obj/machinery/autolathe
|
||||
name = "autolathe"
|
||||
desc = "It produces items using metal and glass."
|
||||
@@ -80,18 +10,13 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
var/g_amount = 0.0
|
||||
var/max_g_amount = 75000.0
|
||||
|
||||
var/f_amount = 0.0
|
||||
var/max_f_amount = 50000.0
|
||||
|
||||
var/operating = 0.0
|
||||
var/opened = 0.0
|
||||
anchored = 1.0
|
||||
var/list/L = list()
|
||||
var/list/LL = list()
|
||||
var/hacked = 0
|
||||
var/disabled = 0
|
||||
var/shocked = 0
|
||||
var/list/wires = list()
|
||||
var/hack_wire
|
||||
var/disable_wire
|
||||
var/shock_wire
|
||||
@@ -100,70 +25,278 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
active_power_usage = 100
|
||||
var/busy = 0
|
||||
var/prod_coeff
|
||||
var/datum/wires/autolathe/wires = null
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
var/datum/design/being_built
|
||||
var/datum/research/files
|
||||
var/selected_category
|
||||
var/screen = 1
|
||||
|
||||
var/list/categories = list(
|
||||
"Communication",
|
||||
"Construction",
|
||||
"Electronics",
|
||||
"Medical",
|
||||
"Miscellaneous",
|
||||
"Security",
|
||||
"Tools"
|
||||
)
|
||||
|
||||
/obj/machinery/autolathe/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
wires = new(src)
|
||||
src.L = autolathe_recipes
|
||||
src.LL = autolathe_recipes_hidden
|
||||
files = new /datum/research/autolathe(src)
|
||||
|
||||
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
|
||||
var/dat as text
|
||||
dat += "Autolathe Wires:<BR>"
|
||||
for(var/wire in src.wires)
|
||||
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
|
||||
/obj/machinery/autolathe/interact(mob/user)
|
||||
if(shocked && !(stat & NOPOWER))
|
||||
shock(user,50)
|
||||
|
||||
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
|
||||
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
|
||||
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
|
||||
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
|
||||
onclose(user, "autolathe_hack")
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
|
||||
var/coeff = 2 ** prod_coeff
|
||||
var/dat as text
|
||||
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<BR>\n<FONT color=orange><B>Fur Amount:</B></FONT> [src.f_amount] cm<sup>3</sup> (MAX: [max_f_amount])<HR>")
|
||||
var/list/objs = list()
|
||||
objs += src.L
|
||||
if (src.hacked)
|
||||
objs += src.LL
|
||||
for(var/obj/t in objs)
|
||||
var/title = "[t.name] ([t.m_amt/coeff] m / [t.g_amt/coeff] g / [t.f_amt/coeff] f)"
|
||||
if (m_amount<t.m_amt || g_amount<t.g_amt || f_amount<t.f_amt)
|
||||
dat += title + "<br>"
|
||||
if(panel_open)
|
||||
dat = wires.GetInteractWindow()
|
||||
|
||||
else
|
||||
if(screen == 1)
|
||||
dat = main_win(user)
|
||||
else
|
||||
dat += category_win(user,selected_category)
|
||||
|
||||
var/datum/browser/popup = new(user, "autolathe", name, 500, 500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/attackby(obj/item/O, mob/user)
|
||||
if (busy)
|
||||
user << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
|
||||
return 1
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if (panel_open)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
if(m_amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
|
||||
G.amount = round(m_amount / MINERAL_MATERIAL_AMOUNT)
|
||||
if(g_amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / MINERAL_MATERIAL_AMOUNT)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
attack_hand(user)
|
||||
return 1
|
||||
if (stat)
|
||||
return 1
|
||||
|
||||
if (src.m_amount + O.m_amt > max_m_amount)
|
||||
user << "<span class=\"alert\">The autolathe is full. Please remove metal from the autolathe in order to insert more.</span>"
|
||||
return 1
|
||||
if (src.g_amount + O.g_amt > max_g_amount)
|
||||
user << "<span class=\"alert\">The autolathe is full. Please remove glass from the autolathe in order to insert more.</span>"
|
||||
return 1
|
||||
if (O.m_amt == 0 && O.g_amt == 0)
|
||||
user << "<span class=\"alert\">This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials.</span>"
|
||||
return 1
|
||||
|
||||
var/amount = 1
|
||||
var/obj/item/stack/stack
|
||||
var/m_amt = O.m_amt
|
||||
var/g_amt = O.g_amt
|
||||
if (istype(O, /obj/item/stack))
|
||||
stack = O
|
||||
amount = stack.amount
|
||||
if (m_amt)
|
||||
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
if (g_amt)
|
||||
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
|
||||
flick("autolathe_r",src)//plays glass insertion animation
|
||||
stack.use(amount)
|
||||
else
|
||||
if(!user.before_take_item(O))
|
||||
user << "<span class='notice'>/the [O] is stuck to your hand, you can't put it in \the [src]!</span>"
|
||||
O.loc = src
|
||||
icon_state = "autolathe"
|
||||
busy = 1
|
||||
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
||||
src.m_amount += m_amt * amount
|
||||
src.g_amount += g_amt * amount
|
||||
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
|
||||
if (O && O.loc == src)
|
||||
qdel(O)
|
||||
busy = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/autolathe/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/autolathe/attack_hand(mob/user)
|
||||
if(..(user, 0))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/autolathe/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (!busy)
|
||||
if(href_list["menu"])
|
||||
screen = text2num(href_list["menu"])
|
||||
|
||||
if(href_list["category"])
|
||||
selected_category = href_list["category"]
|
||||
|
||||
if(href_list["make"])
|
||||
|
||||
var/turf/T = get_step(src.loc, get_dir(src,usr))
|
||||
|
||||
/////////////////
|
||||
//href protection
|
||||
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
|
||||
if(!being_built)
|
||||
return
|
||||
|
||||
//multiplier checks : only stacks can have one and its value is 1, 10 ,25 or max_multiplier
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
var/max_multiplier = min(50, being_built.materials["$metal"] ?round(m_amount/being_built.materials["$metal"]):INFINITY,being_built.materials["$glass"]?round(g_amount/being_built.materials["$glass"]):INFINITY)
|
||||
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
|
||||
|
||||
if(!is_stack && (multiplier > 1))
|
||||
return
|
||||
if (!(multiplier in list(1,10,25,max_multiplier))) //"enough materials ?" is checked further down
|
||||
return
|
||||
/////////////////
|
||||
|
||||
var/coeff = (is_stack ? 1 : 2 ** prod_coeff) //stacks are unaffected by production coefficient
|
||||
var/metal_cost = being_built.materials["$metal"]
|
||||
var/glass_cost = being_built.materials["$glass"]
|
||||
|
||||
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
|
||||
|
||||
if((m_amount >= metal_cost*multiplier/coeff) && (g_amount >= glass_cost*multiplier/coeff))
|
||||
busy = 1
|
||||
use_power(power)
|
||||
icon_state = "autolathe"
|
||||
flick("autolathe_n",src)
|
||||
spawn(32/coeff)
|
||||
use_power(power)
|
||||
if(is_stack)
|
||||
m_amount -= metal_cost*multiplier
|
||||
g_amount -= glass_cost*multiplier
|
||||
var/obj/item/stack/S = new being_built.build_path(T)
|
||||
S.amount = multiplier
|
||||
else
|
||||
m_amount -= metal_cost/coeff
|
||||
g_amount -= glass_cost/coeff
|
||||
var/obj/item/new_item = new being_built.build_path(T)
|
||||
new_item.m_amt /= coeff
|
||||
new_item.g_amt /= coeff
|
||||
if(m_amount < 0)
|
||||
m_amount = 0
|
||||
if(g_amount < 0)
|
||||
g_amount = 0
|
||||
busy = 0
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
var/tot_rating = 0
|
||||
prod_coeff = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||
tot_rating += MB.rating
|
||||
tot_rating *= 25000
|
||||
max_m_amount = tot_rating * 2
|
||||
max_g_amount = tot_rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
prod_coeff += M.rating - 1
|
||||
|
||||
/obj/machinery/autolathe/proc/main_win(mob/user)
|
||||
var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
|
||||
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
|
||||
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
|
||||
|
||||
var/line_length = 1
|
||||
dat += "<table style='width:100%' align='center'><tr>"
|
||||
|
||||
for(var/C in categories)
|
||||
if(line_length > 2)
|
||||
dat += "</tr><tr>"
|
||||
line_length = 1
|
||||
|
||||
dat += "<td><A href='?src=\ref[src];category=[C];menu=2'>[C]</A></td>"
|
||||
line_length++
|
||||
|
||||
dat += "</tr></table></div>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/category_win(mob/user,var/selected_category)
|
||||
var/dat = "<A href='?src=\ref[src];menu=1'>Return to category screen</A>"
|
||||
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
|
||||
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
|
||||
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
|
||||
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(!(selected_category in D.category))
|
||||
continue
|
||||
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
|
||||
if (istype(t, /obj/item/stack))
|
||||
var/obj/item/stack/S = t
|
||||
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY, S.f_amt?round(f_amount/S.f_amt):INFINITY)
|
||||
if (max_multiplier>1)
|
||||
dat += " |"
|
||||
if (max_multiplier>10)
|
||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
|
||||
if (max_multiplier>25)
|
||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
|
||||
if (max_multiplier>1)
|
||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
|
||||
dat += "<br>"
|
||||
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
|
||||
onclose(user, "autolathe_regular")
|
||||
|
||||
if(disabled || !can_build(D))
|
||||
dat += "<span class='linkOff'>[D.name]</span>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];make=[D.id];multiplier=1'>[D.name]</a>"
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/max_multiplier = min(50, D.materials["$metal"] ?round(m_amount/D.materials["$metal"]):INFINITY,D.materials["$glass"]?round(g_amount/D.materials["$glass"]):INFINITY)
|
||||
if (max_multiplier>10 && !disabled)
|
||||
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=10'>x10</a>"
|
||||
if (max_multiplier>25 && !disabled)
|
||||
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=25'>x25</a>"
|
||||
if(max_multiplier > 0 && !disabled)
|
||||
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
|
||||
|
||||
dat += "[get_design_cost(D)]<br>"
|
||||
|
||||
dat += "</div>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/can_build(var/datum/design/D)
|
||||
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
|
||||
|
||||
if(D.materials["$metal"] && (m_amount < (D.materials["$metal"] / coeff)))
|
||||
return 0
|
||||
if(D.materials["$glass"] && (g_amount < (D.materials["$glass"] / coeff)))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/autolathe/proc/get_design_cost(var/datum/design/D)
|
||||
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
|
||||
var/dat
|
||||
if(D.materials["$metal"])
|
||||
dat += "[D.materials["$metal"] / coeff] metal "
|
||||
if(D.materials["$glass"])
|
||||
dat += "[D.materials["$glass"] / coeff] glass"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/shock(mob/user, prb)
|
||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
@@ -178,290 +311,14 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/autolathe/interact(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
/obj/machinery/autolathe/proc/adjust_hacked(var/hack)
|
||||
hacked = hack
|
||||
|
||||
if (src.shocked)
|
||||
src.shock(user,50)
|
||||
|
||||
if (src.panel_open)
|
||||
wires_win(user,50)
|
||||
return
|
||||
|
||||
if (src.disabled)
|
||||
user << "\red You press the button, but nothing happens."
|
||||
return
|
||||
|
||||
regular_win(user)
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (stat)
|
||||
return 1
|
||||
|
||||
if (busy)
|
||||
user << "\red The autolathe is busy. Please wait for completion of previous operation."
|
||||
return 1
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O)
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if (panel_open)
|
||||
//Don't eat multitools or wirecutters used on an open lathe.
|
||||
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
//Dismantle the frame.
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
if(m_amount >= 3750)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
|
||||
G.amount = round(m_amount / 3750)
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return 1
|
||||
|
||||
if (src.m_amount + O.m_amt > max_m_amount)
|
||||
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
|
||||
return 1
|
||||
if (src.g_amount + O.g_amt > max_g_amount)
|
||||
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
|
||||
return 1
|
||||
if (src.f_amount + O.f_amt > max_f_amount)
|
||||
user << "\red The autolathe is full. Please remove fur from the autolathe in order to insert more."
|
||||
return 1
|
||||
if (O.m_amt == 0 && O.g_amt == 0 && O.f_amt == 0)
|
||||
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
|
||||
return 1
|
||||
/*
|
||||
if (istype(O, /obj/item/weapon/grab) && src.hacked)
|
||||
var/obj/item/weapon/grab/G = O
|
||||
if (prob(25) && G.affecting)
|
||||
G.affecting.gib()
|
||||
m_amount += 50000
|
||||
f_amount += 1000
|
||||
return
|
||||
*/
|
||||
|
||||
var/amount = 1
|
||||
var/obj/item/stack/stack
|
||||
var/m_amt = O.m_amt
|
||||
var/g_amt = O.g_amt
|
||||
var/f_amt = O.f_amt
|
||||
if (istype(O, /obj/item/stack))
|
||||
stack = O
|
||||
amount = stack.amount
|
||||
if (m_amt)
|
||||
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
if (g_amt)
|
||||
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
|
||||
flick("autolathe_r",src)//plays glass insertion animation
|
||||
if (f_amt)
|
||||
amount = min(amount, round((max_f_amount-src.f_amount)/f_amt))
|
||||
flick("autolathe_f",src)//plays fur insertion animation
|
||||
stack.use(amount)
|
||||
if(hack)
|
||||
for(var/datum/design/D in files.possible_designs)
|
||||
if((D.build_type & 4) && ("hacked" in D.category))
|
||||
files.known_designs += D
|
||||
else
|
||||
usr.before_take_item(O)
|
||||
O.loc = src
|
||||
icon_state = "autolathe"
|
||||
busy = 1
|
||||
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
||||
src.m_amount += m_amt * amount
|
||||
src.g_amount += g_amt * amount
|
||||
src.f_amount += f_amt * amount
|
||||
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
|
||||
if (O && O.loc == src)
|
||||
del(O)
|
||||
busy = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/autolathe/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/autolathe/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
|
||||
/obj/machinery/autolathe/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if (!busy)
|
||||
if(href_list["make"])
|
||||
var/coeff = 2 ** prod_coeff
|
||||
var/turf/T = get_step(src.loc, get_dir(src,usr))
|
||||
|
||||
// critical exploit fix start -walter0o
|
||||
var/obj/item/template = null
|
||||
var/attempting_to_build = locate(href_list["make"])
|
||||
|
||||
if(!attempting_to_build)
|
||||
return
|
||||
|
||||
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
|
||||
template = attempting_to_build
|
||||
|
||||
else // somebody is trying to exploit, alert admins -walter0o
|
||||
|
||||
var/turf/LOC = get_turf(usr)
|
||||
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
|
||||
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
|
||||
return
|
||||
|
||||
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
|
||||
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
|
||||
if (!multiplier) multiplier = 1
|
||||
var/max_multiplier = 1
|
||||
|
||||
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
|
||||
var/obj/item/stack/S = template
|
||||
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
|
||||
|
||||
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
|
||||
|
||||
var/turf/LOC = get_turf(usr)
|
||||
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
|
||||
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
|
||||
return
|
||||
|
||||
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
|
||||
if(src.m_amount >= template.m_amt*multiplier/coeff && src.g_amount >= template.g_amt*multiplier/coeff && src.f_amount >= template.f_amt*multiplier/coeff)
|
||||
busy = 1
|
||||
use_power(power)
|
||||
icon_state = "autolathe"
|
||||
flick("autolathe_n",src)
|
||||
spawn(32/coeff)
|
||||
use_power(power)
|
||||
if(istype(template, /obj/item/stack))
|
||||
src.m_amount -= template.m_amt*multiplier
|
||||
src.g_amount -= template.g_amt*multiplier
|
||||
src.f_amount -= template.f_amt*multiplier
|
||||
var/obj/new_item = new template.type(T)
|
||||
var/obj/item/stack/S = new_item
|
||||
S.amount = multiplier
|
||||
else
|
||||
src.m_amount -= template.m_amt/coeff
|
||||
src.g_amount -= template.g_amt/coeff
|
||||
src.f_amount -= template.f_amt/coeff
|
||||
var/obj/item/new_item = new template.type(T)
|
||||
new_item.m_amt /= coeff
|
||||
new_item.g_amt /= coeff
|
||||
new_item.f_amt /= coeff
|
||||
if(src.m_amount < 0)
|
||||
src.m_amount = 0
|
||||
if(src.g_amount < 0)
|
||||
src.g_amount = 0
|
||||
if(src.f_amount < 0)
|
||||
src.f_amount = 0
|
||||
busy = 0
|
||||
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
usr << "You can't pulse a cut wire."
|
||||
else
|
||||
if(src.hack_wire == temp_wire)
|
||||
src.hacked = !src.hacked
|
||||
spawn(100) src.hacked = !src.hacked
|
||||
if(src.disable_wire == temp_wire)
|
||||
src.disabled = !src.disabled
|
||||
src.shock(usr,50)
|
||||
spawn(100) src.disabled = !src.disabled
|
||||
if(src.shock_wire == temp_wire)
|
||||
src.shocked = !src.shocked
|
||||
src.shock(usr,50)
|
||||
spawn(100) src.shocked = !src.shocked
|
||||
if(href_list["act"] == "wire")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
if(src.hack_wire == temp_wire)
|
||||
src.hacked = !src.hacked
|
||||
if(src.disable_wire == temp_wire)
|
||||
src.disabled = !src.disabled
|
||||
src.shock(usr,50)
|
||||
if(src.shock_wire == temp_wire)
|
||||
src.shocked = !src.shocked
|
||||
src.shock(usr,50)
|
||||
else
|
||||
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
var/tot_rating = 0
|
||||
prod_coeff = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||
tot_rating += MB.rating
|
||||
tot_rating *= 25000
|
||||
max_m_amount = tot_rating * 2
|
||||
max_g_amount = tot_rating
|
||||
max_f_amount = tot_rating
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
prod_coeff += M.rating - 1
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
..()
|
||||
var/tot_rating = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||
tot_rating += MB.rating
|
||||
tot_rating *= 25000
|
||||
max_m_amount = tot_rating * 2
|
||||
max_g_amount = tot_rating
|
||||
max_f_amount = tot_rating
|
||||
|
||||
/obj/machinery/autolathe/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
RefreshParts()
|
||||
|
||||
src.L = autolathe_recipes
|
||||
src.LL = autolathe_recipes_hidden
|
||||
src.wires["Light Red"] = 0
|
||||
src.wires["Dark Red"] = 0
|
||||
src.wires["Blue"] = 0
|
||||
src.wires["Green"] = 0
|
||||
src.wires["Yellow"] = 0
|
||||
src.wires["Black"] = 0
|
||||
src.wires["White"] = 0
|
||||
src.wires["Gray"] = 0
|
||||
src.wires["Orange"] = 0
|
||||
src.wires["Pink"] = 0
|
||||
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
|
||||
src.hack_wire = pick(w)
|
||||
w -= src.hack_wire
|
||||
src.shock_wire = pick(w)
|
||||
w -= src.shock_wire
|
||||
src.disable_wire = pick(w)
|
||||
w -= src.disable_wire
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if("hacked" in D.category)
|
||||
files.known_designs -= D
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/processing = 0
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/points = 0
|
||||
var/in_beaker = 1
|
||||
var/menustat = "menu"
|
||||
var/efficiency = 0
|
||||
var/productivity = 0
|
||||
@@ -137,11 +138,12 @@
|
||||
menustat = "menu"
|
||||
if(beaker)
|
||||
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
|
||||
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A>"
|
||||
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A><BR>"
|
||||
dat += "Put fertilizer in: <A href='?src=\ref[src];inbeaker=1'>[in_beaker ? "Beaker" : "Bottle"]</A>"
|
||||
dat += "<h3>Food:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A> ([20/efficiency])<BR>"
|
||||
/*dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"*/
|
||||
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"
|
||||
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A> ([250/efficiency])"
|
||||
dat += "</div>"
|
||||
dat += "<h3>Nutrients:</h3>"
|
||||
@@ -153,14 +155,14 @@
|
||||
dat += "<h3>Leather:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
|
||||
/*dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Plant bag: <A href='?src=\ref[src];create=ptbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"*/
|
||||
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"
|
||||
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
|
||||
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
|
||||
dat += "Leather Satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
dat += "Cash Bag: <A href='?src=\ref[src];create=cashbag;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
/*dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"*/
|
||||
dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
|
||||
//dat += "<h3>Other:</h3>"
|
||||
//dat += "Monkey: <A href='?src=\ref[src];create=monkey;amount=1'>Make</A> ([400/efficiency])<BR>"
|
||||
dat += "</div>"
|
||||
@@ -225,26 +227,38 @@
|
||||
if(check_container_volume(10)) return 0
|
||||
else if (check_cost(20/efficiency)) return 0
|
||||
else beaker.reagents.add_reagent("milk",10)
|
||||
/*if("cream")
|
||||
if("cream")
|
||||
if(check_container_volume(10)) return 0
|
||||
else if (check_cost(30/efficiency)) return 0
|
||||
else beaker.reagents.add_reagent("cream",10)*/
|
||||
else beaker.reagents.add_reagent("cream",10)
|
||||
if("meat")
|
||||
if (check_cost(250/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
|
||||
if("ez")
|
||||
if (check_cost(10/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
if(in_beaker)
|
||||
if(check_container_volume(10)) return 0
|
||||
else beaker.reagents.add_reagent("eznutrient",10)
|
||||
else
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
||||
if("l4z")
|
||||
if (check_cost(20/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
if(in_beaker)
|
||||
if(check_container_volume(10)) return 0
|
||||
else beaker.reagents.add_reagent("left4zed",10)
|
||||
else
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
||||
if("rh")
|
||||
if (check_cost(25/efficiency)) return 0
|
||||
else new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
if(in_beaker)
|
||||
if(check_container_volume(10)) return 0
|
||||
else beaker.reagents.add_reagent("robustharvest",10)
|
||||
else
|
||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
||||
if("wallet")
|
||||
if (check_cost(100/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/wallet(src.loc)
|
||||
/*if("bkbag")
|
||||
if("bkbag")
|
||||
if (check_cost(200/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/books(src.loc)
|
||||
if("ptbag")
|
||||
@@ -252,7 +266,7 @@
|
||||
else new/obj/item/weapon/storage/bag/plants(src.loc)
|
||||
if("mnbag")
|
||||
if (check_cost(200/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/ore(src.loc)*/
|
||||
else new/obj/item/weapon/storage/bag/ore(src.loc)
|
||||
if("gloves")
|
||||
if (check_cost(250/efficiency)) return 0
|
||||
else new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
||||
@@ -265,9 +279,9 @@
|
||||
if("cashbag")
|
||||
if (check_cost(400/efficiency)) return 0
|
||||
else new/obj/item/weapon/storage/bag/cash(src.loc)
|
||||
/*if("jacket")
|
||||
if("jacket")
|
||||
if (check_cost(500/efficiency)) return 0
|
||||
else new/obj/item/clothing/suit/jacket/leather(src.loc)*/
|
||||
else new/obj/item/clothing/suit/jacket/leather(src.loc)
|
||||
//if("monkey")
|
||||
// if (check_cost(500)) return 0
|
||||
// else new/mob/living/carbon/monkey(src.loc)
|
||||
@@ -309,4 +323,8 @@
|
||||
|
||||
else if(href_list["menu"])
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["inbeaker"])
|
||||
in_beaker = !in_beaker
|
||||
updateUsrDialog()
|
||||
@@ -30,6 +30,7 @@
|
||||
var/mob/living/silicon/ai/calling_ai //Links a bot to the AI calling it.
|
||||
var/obj/item/device/radio/Radio //The bot's radio, for speaking to people.
|
||||
var/radio_frequency //The bot's default radio speaking freqency. Recommended to be on a department frequency.
|
||||
var/radio_name = "Common"
|
||||
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
|
||||
var/auto_patrol = 0// set to make bot automatically patrol
|
||||
var/turf/patrol_target // this is turf to navigate to (location of beacon)
|
||||
@@ -55,6 +56,7 @@
|
||||
#define FLOOR_BOT 3 // Floorbots
|
||||
#define CLEAN_BOT 4 // Cleanbots
|
||||
#define MED_BOT 5 // Medibots
|
||||
var/bot_type_name = "Bot"
|
||||
|
||||
#define DEFAULT_SCAN_RANGE 7 //default view range for finding targets.
|
||||
|
||||
@@ -101,6 +103,7 @@
|
||||
set_custom_texts()
|
||||
Radio = new /obj/item/device/radio(src)
|
||||
Radio.listening = 0 //Makes bot radios transmit only so no one hears things while adjacent to one.
|
||||
Radio.config(list("[radio_name]" = 0))
|
||||
|
||||
|
||||
/obj/machinery/bot/proc/add_to_beacons(bot_filter) //Master filter control for bots. Must be placed in the bot's local New() to support map spawned bots.
|
||||
@@ -335,14 +338,13 @@
|
||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/bot/proc/speak(var/message, freq) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
|
||||
/obj/machinery/bot/proc/speak(var/message, freq, var/freqname = null) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
|
||||
if((!on) || (!message))
|
||||
return
|
||||
if(freq)
|
||||
return
|
||||
// Commenting out the radio code until our say code's compatible with /tg/'s
|
||||
/* Radio.set_frequency(radio_frequency)
|
||||
Radio.talk_into_atom(src, message, radio_frequency) */
|
||||
Radio.set_frequency(radio_frequency)
|
||||
if(freqname)
|
||||
Radio.autosay(message, src.name, freqname, list(src.z))
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"</span>",2)
|
||||
@@ -413,13 +415,13 @@ obj/machinery/bot/proc/bot_move(var/dest, var/move_speed)
|
||||
|
||||
obj/machinery/bot/proc/bot_step(var/dest)
|
||||
if(path && path.len > 1)
|
||||
step_to(src, path[1])
|
||||
step_towards(src, path[1])
|
||||
if(get_turf(src) == path[1]) //Successful move
|
||||
path -= path[1]
|
||||
else
|
||||
return 0
|
||||
else if(path.len == 1)
|
||||
step_to(src, dest)
|
||||
step_towards(src, dest)
|
||||
path = list()
|
||||
return 1
|
||||
|
||||
@@ -651,7 +653,7 @@ obj/machinery/bot/proc/start_patrol()
|
||||
botcard.access = user_access + prev_access //Adds the user's access, if any.
|
||||
mode = BOT_SUMMON
|
||||
calc_summon_path()
|
||||
speak("Responding."/*, radio_frequency*/)
|
||||
speak("Responding.", radio_frequency, radio_name)
|
||||
return
|
||||
|
||||
// receive response from beacon
|
||||
@@ -738,7 +740,7 @@ obj/machinery/bot/proc/bot_summon()
|
||||
check_bot_access()
|
||||
path = AStar(loc, summon_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 150, id=botcard, exclude=avoid)
|
||||
if(!path || tries >= 5) //Cannot reach target. Give up and announce the issue.
|
||||
speak("Summon command failed, destination unreachable."/*,radio_frequency*/)
|
||||
speak("Summon command failed, destination unreachable.", radio_frequency, radio_name)
|
||||
bot_reset()
|
||||
|
||||
/obj/machinery/bot/proc/summon_step()
|
||||
@@ -776,7 +778,7 @@ obj/machinery/bot/proc/bot_summon()
|
||||
|
||||
|
||||
/obj/machinery/bot/Bump(M as mob|obj) //Leave no door unopened!
|
||||
if((istype(M, /obj/machinery/door/airlock) || istype(M, /obj/machinery/door/window)) && (!isnull(botcard)))
|
||||
if((istype(M, /obj/machinery/door/airlock) || istype(M, /obj/machinery/door/window)) && (!isnull(botcard)))
|
||||
var/obj/machinery/door/D = M
|
||||
if(D.check_access(botcard))
|
||||
D.open()
|
||||
@@ -785,4 +787,5 @@ obj/machinery/bot/proc/bot_summon()
|
||||
var/mob/living/Mb = M
|
||||
loc = Mb.loc
|
||||
frustration = 0
|
||||
return
|
||||
return
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
var/next_dest
|
||||
var/next_dest_loc
|
||||
radio_frequency = SRV_FREQ //Service
|
||||
radio_name = "Service"
|
||||
bot_type = CLEAN_BOT
|
||||
bot_type_name = "Cleanbot"
|
||||
bot_filter = RADIO_CLEANBOT
|
||||
|
||||
/obj/machinery/bot/cleanbot/New()
|
||||
@@ -120,6 +122,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
if(allowed(usr) && !open && !emagged)
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the [src] behaviour controls.</span>"
|
||||
updateUsrDialog()
|
||||
else
|
||||
if(emagged)
|
||||
user << "<span class='warning'>ERROR</span>"
|
||||
@@ -234,7 +237,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
icon_state = "cleanbot-c"
|
||||
visible_message("<span class='notice'>[src] begins to clean up [target]</span>")
|
||||
mode = BOT_CLEANING
|
||||
spawn(50)
|
||||
spawn(25)
|
||||
if(mode == BOT_CLEANING)
|
||||
qdel(target)
|
||||
anchored = 0
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
var/projectile = /obj/item/projectile/energy/electrode //Holder for projectile type
|
||||
var/shoot_sound = 'sound/weapons/Taser.ogg'
|
||||
radio_frequency = SEC_FREQ
|
||||
radio_name = "Security"
|
||||
bot_type = SEC_BOT
|
||||
bot_type_name = "ED-209"
|
||||
bot_filter = RADIO_SECBOT
|
||||
|
||||
//List of weapons that secbots will not arrest for
|
||||
@@ -43,8 +45,7 @@
|
||||
/obj/item/weapon/gun/energy/laser/redtag,\
|
||||
/obj/item/weapon/gun/energy/laser/practice,\
|
||||
/obj/item/weapon/melee/telebaton,\
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator,\
|
||||
/obj/item/weapon/melee/baton/loaded/ntcane)
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator)
|
||||
|
||||
|
||||
/obj/item/weapon/ed209_assembly
|
||||
@@ -113,6 +114,7 @@
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
usr.set_machine(src)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += text({"
|
||||
@@ -267,8 +269,8 @@ Auto Patrol[]"},
|
||||
M.Stun(5)
|
||||
|
||||
if(declare_arrests)
|
||||
//var/area/location = get_area(src)
|
||||
declare_arrest()
|
||||
var/area/location = get_area(src)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
|
||||
target.visible_message("<span class='danger'>[target] has been stunned by [src]!</span>",\
|
||||
"<span class='userdanger'>[target] has been stunned by [src]!</span></span>")
|
||||
|
||||
@@ -400,25 +402,6 @@ Auto Patrol[]"},
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
|
||||
if ((istype(M, /obj/machinery/door)) && (!isnull(botcard)))
|
||||
var/obj/machinery/door/D = M
|
||||
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(botcard))
|
||||
D.open()
|
||||
frustration = 0
|
||||
else if ((istype(M, /mob/living/)) && (!anchored))
|
||||
loc = M:loc
|
||||
frustration = 0
|
||||
return
|
||||
|
||||
/* terrible
|
||||
/obj/machinery/bot/ed209/Bumped(atom/movable/M as mob|obj)
|
||||
spawn(0)
|
||||
if (M)
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
*/
|
||||
|
||||
/obj/machinery/bot/ed209/explode()
|
||||
walk_to(src,0)
|
||||
visible_message("<span class='userdanger'>[src] blows apart!</span>")
|
||||
@@ -431,7 +414,7 @@ Auto Patrol[]"},
|
||||
new /obj/item/device/assembly/prox_sensor(Tsec)
|
||||
|
||||
if(!lasercolor)
|
||||
var/obj/item/weapon/gun/energy/taser/G = new /obj/item/weapon/gun/energy/taser(Tsec)
|
||||
var/obj/item/weapon/gun/energy/advtaser/G = new /obj/item/weapon/gun/energy/advtaser(Tsec)
|
||||
G.power_supply.charge = 0
|
||||
G.update_icon()
|
||||
else if(lasercolor == "b")
|
||||
@@ -661,7 +644,7 @@ Auto Patrol[]"},
|
||||
return
|
||||
name = "redtag ED-209 assembly"
|
||||
if("")
|
||||
if(!istype(W, /obj/item/weapon/gun/energy/taser))
|
||||
if(!istype(W, /obj/item/weapon/gun/energy/advtaser))
|
||||
return
|
||||
name = "taser ED-209 assembly"
|
||||
else
|
||||
@@ -725,10 +708,4 @@ Auto Patrol[]"},
|
||||
|
||||
/obj/machinery/bot/ed209/redtag/New()
|
||||
new /obj/machinery/bot/ed209(get_turf(src),null,"r")
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/bot/ed209/proc/declare_arrest()
|
||||
var/area/location = get_area(src)
|
||||
for(var/mob/living/carbon/human/human in world)
|
||||
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
|
||||
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
qdel(src)
|
||||
@@ -50,7 +50,9 @@
|
||||
req_one_access = list(access_construction, access_robotics)
|
||||
var/targetdirection
|
||||
radio_frequency = ENG_FREQ //Engineering channel
|
||||
radio_name = "Engineering"
|
||||
bot_type = FLOOR_BOT
|
||||
bot_type_name = "Floorbot"
|
||||
bot_filter = RADIO_FLOORBOT
|
||||
var/process_type //Determines what to do when process_scan() recieves a target. See process_scan() for details.
|
||||
#define HULL_BREACH 1
|
||||
@@ -150,6 +152,7 @@
|
||||
if(allowed(user) && !open && !emagged)
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>"
|
||||
updateUsrDialog()
|
||||
else
|
||||
if(emagged)
|
||||
user << "<span class='warning'>ERROR</span>"
|
||||
@@ -270,9 +273,9 @@
|
||||
if(path.len == 0)
|
||||
if(!istype(target, /turf/))
|
||||
var/turf/TL = get_turf(target)
|
||||
path = AStar(loc, TL, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
path = get_path_to(loc, TL, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
else
|
||||
path = AStar(loc, target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
path = get_path_to(loc, target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
|
||||
if(!bot_move(target))
|
||||
add_to_ignore(target)
|
||||
@@ -307,14 +310,15 @@
|
||||
anchored = 0
|
||||
mode = BOT_IDLE
|
||||
target = null
|
||||
path = new()
|
||||
path = list()
|
||||
return
|
||||
|
||||
oldloc = loc
|
||||
|
||||
/obj/machinery/bot/floorbot/proc/nag() //Annoy everyone on the channel to refill us!
|
||||
if(!nagged)
|
||||
speak("Requesting refill at <b>[get_area(src)]</b>!"/*, radio_frequency*/)
|
||||
var/area/location = get_area(src)
|
||||
speak("Requesting refill at <b>[location]</b>!", radio_frequency, radio_name)
|
||||
nagged = 1
|
||||
|
||||
/obj/machinery/bot/floorbot/proc/is_hull_breach(var/turf/t) //Ignore space tiles not considered part of a structure, also ignores shuttle docking areas.
|
||||
@@ -343,9 +347,8 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
|
||||
result = F
|
||||
if(FIX_TILE) //Selects only damaged floors.
|
||||
F = scan_target
|
||||
if(istype(F, /turf))
|
||||
if(F.broken || F.burnt)
|
||||
result = F
|
||||
if(istype(F) && (F.broken || F.burnt))
|
||||
result = F
|
||||
if(TILE_EMAG) //Emag mode! Rip up the floor and cause breaches to space!
|
||||
F = scan_target
|
||||
if(!istype(F, /turf/simulated/floor/plating))
|
||||
@@ -370,7 +373,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
|
||||
anchored = 1
|
||||
icon_state = "floorbot-c"
|
||||
if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is
|
||||
visible_message("<span class='notice'> [targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
|
||||
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
|
||||
mode = BOT_REPAIRING
|
||||
spawn(50)
|
||||
if(mode == BOT_REPAIRING)
|
||||
@@ -385,32 +388,18 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
|
||||
target = null
|
||||
else
|
||||
var/turf/simulated/floor/F = target_turf
|
||||
if(F.burnt || F.broken)
|
||||
mode = BOT_REPAIRING
|
||||
visible_message("<span class='notice'> [src] begins repairing the floor.</span>")
|
||||
spawn(50)
|
||||
if(mode == BOT_REPAIRING)
|
||||
F.burnt = 0
|
||||
F.broken = 0
|
||||
F.icon_state = "floor"
|
||||
mode = BOT_IDLE
|
||||
amount -= 1
|
||||
updateicon()
|
||||
anchored = 0
|
||||
target = null
|
||||
else
|
||||
mode = BOT_REPAIRING
|
||||
visible_message("<span class='notice'> [src] begins repairing the floor.</span>")
|
||||
spawn(50)
|
||||
if(mode == BOT_REPAIRING)
|
||||
F.burnt = 0
|
||||
F.broken = 0
|
||||
target_turf.ChangeTurf(/turf/simulated/floor)
|
||||
mode = BOT_IDLE
|
||||
amount -= 1
|
||||
updateicon()
|
||||
anchored = 0
|
||||
target = null
|
||||
mode = BOT_REPAIRING
|
||||
visible_message("<span class='notice'>[src] begins repairing the floor.</span>")
|
||||
spawn(50)
|
||||
if(mode == BOT_REPAIRING)
|
||||
F.broken = 0
|
||||
F.burnt = 0
|
||||
F.ChangeTurf(/turf/simulated/floor)
|
||||
mode = BOT_IDLE
|
||||
amount -= 1
|
||||
updateicon()
|
||||
anchored = 0
|
||||
target = null
|
||||
|
||||
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/plasteel/T)
|
||||
if(!istype(T, /obj/item/stack/tile/plasteel))
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/declare_cooldown = 0 //Prevents spam of critical patient alerts.
|
||||
var/stationary_mode = 0 //If enabled, the Medibot will not move automatically.
|
||||
radio_frequency = MED_FREQ //Medical frequency
|
||||
radio_name = "Medical"
|
||||
//Setting which reagents to use to treat what by default. By id.
|
||||
var/treatment_brute = "tricordrazine"
|
||||
var/treatment_oxy = "tricordrazine"
|
||||
@@ -40,6 +41,7 @@
|
||||
var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible.
|
||||
var/shut_up = 0 //self explanatory :)
|
||||
bot_type = MED_BOT
|
||||
bot_type_name = "Medbot"
|
||||
bot_filter = RADIO_MEDBOT
|
||||
|
||||
/obj/machinery/bot/medbot/syndicate
|
||||
@@ -49,8 +51,8 @@
|
||||
treatment_oxy = "dexalin"
|
||||
treatment_brute = "bicaridine"
|
||||
treatment_fire = "kelotane"
|
||||
treatment_tox = "anti_toxin"
|
||||
|
||||
treatment_tox = "anti_toxin"
|
||||
|
||||
/obj/machinery/bot/medbot/mysterious
|
||||
name = "\improper Mysterious Medibot"
|
||||
desc = "International Medibot of mystery."
|
||||
@@ -135,6 +137,7 @@
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
usr.set_machine(src)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += "<TT><B>Medical Unit Controls v1.1</B></TT><BR><BR>"
|
||||
@@ -326,12 +329,17 @@
|
||||
return
|
||||
|
||||
//Patient has moved away from us!
|
||||
else if(patient && path && path.len && (get_dist(patient,path[path.len]) > 2))
|
||||
else if(patient && path.len && (get_dist(patient,path[path.len]) > 2))
|
||||
path = list()
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
|
||||
if(!stationary_mode && patient && path.len == 0 && (get_dist(src,patient) > 1))
|
||||
else if(stationary_mode && patient)
|
||||
patient = null
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
return
|
||||
if(patient && path.len == 0 && (get_dist(src,patient) > 1))
|
||||
spawn(0)
|
||||
path = AStar(loc, get_turf(patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 30,id=botcard)
|
||||
if(!path)
|
||||
@@ -367,10 +375,10 @@
|
||||
|
||||
if(emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
|
||||
return 1
|
||||
|
||||
|
||||
if((skin == "bezerk") && (!("syndicate" in C.faction)))
|
||||
return 0
|
||||
|
||||
|
||||
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
|
||||
declare(C)
|
||||
|
||||
@@ -393,7 +401,7 @@
|
||||
if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(treatment_tox)))
|
||||
return 1
|
||||
|
||||
if((C.virus2.len) && (!C.reagents.has_reagent(treatment_virus)))
|
||||
if((C.virus2.len) && (!C.reagents.has_reagent(treatment_virus)))
|
||||
for (var/ID in C.virus2)
|
||||
if (ID in virusDB) // If the virus is known, the medbot is aware of it
|
||||
return 1
|
||||
@@ -424,18 +432,18 @@
|
||||
if(emagged == 2) //Emagged! Time to poison everybody.
|
||||
reagent_id = "toxin"
|
||||
|
||||
if(treat_virus)
|
||||
var/virus = 0
|
||||
if(C:virus2.len)
|
||||
for (var/ID in C.virus2)
|
||||
if (ID in virusDB) // If the virus is known, the medbot is aware of it and will try to cure it
|
||||
virus = 1
|
||||
|
||||
if (!reagent_id && (virus))
|
||||
if(!C.reagents.has_reagent(treatment_virus))
|
||||
reagent_id = treatment_virus
|
||||
|
||||
else
|
||||
if(treat_virus)
|
||||
var/virus = 0
|
||||
if(C:virus2.len)
|
||||
for (var/ID in C.virus2)
|
||||
if (ID in virusDB) // If the virus is known, the medbot is aware of it and will try to cure it
|
||||
virus = 1
|
||||
|
||||
if (!reagent_id && (virus))
|
||||
if(!C.reagents.has_reagent(treatment_virus))
|
||||
reagent_id = treatment_virus
|
||||
|
||||
if (!reagent_id && (C.getBruteLoss() >= heal_threshold))
|
||||
if(!C.reagents.has_reagent(treatment_brute))
|
||||
reagent_id = treatment_brute
|
||||
@@ -522,11 +530,13 @@
|
||||
/obj/machinery/bot/medbot/proc/declare(var/crit_patient)
|
||||
if(declare_cooldown)
|
||||
return
|
||||
//var/area/location = get_area(src)
|
||||
declare_critical(crit_patient)
|
||||
if((skin == "bezerk"))
|
||||
return
|
||||
var/area/location = get_area(src)
|
||||
speak("Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!",radio_frequency, radio_name)
|
||||
declare_cooldown = 1
|
||||
spawn(200) //Twenty seconds
|
||||
declare_cooldown = 0
|
||||
declare_cooldown = 0
|
||||
|
||||
/*
|
||||
* Medbot Assembly -- Can be made out of all three medkits.
|
||||
@@ -589,18 +599,4 @@
|
||||
S.skin = skin
|
||||
S.name = created_name
|
||||
user.before_take_item(src, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/bot/medbot/proc/declare_critical(var/crit_patient)
|
||||
var/area/location = get_area(src)
|
||||
for(var/mob/living/carbon/human/human in world)
|
||||
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/health) || istype(human.glasses, /obj/item/clothing/glasses/hud/health_advanced) && !human.blinded)
|
||||
if((skin == "bezerk") && (!("syndicate" in human.faction)))
|
||||
continue
|
||||
human << "<span class='info'>\icon[human.glasses] Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
|
||||
for(var/mob/living/silicon/robot in world)
|
||||
if((robot.z == src.z) && !robot.blinded)
|
||||
if((skin == "bezerk") && (!("syndicate" in robot.faction)))
|
||||
continue
|
||||
if(robot.sensor_mode == 2)
|
||||
robot << "<span class='info'>Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
|
||||
qdel(src)
|
||||
@@ -23,6 +23,7 @@ var/global/mulebot_count = 0
|
||||
beacon_freq = 1400
|
||||
control_freq = 1447
|
||||
bot_type = MULE_BOT
|
||||
bot_type_name = "MULEbot"
|
||||
bot_filter = RADIO_MULEBOT
|
||||
|
||||
suffix = ""
|
||||
@@ -94,7 +95,7 @@ var/global/mulebot_count = 0
|
||||
else if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
|
||||
if(toggle_lock(user))
|
||||
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
|
||||
|
||||
updateUsrDialog()
|
||||
else if(istype(I,/obj/item/weapon/cell) && open && !cell)
|
||||
var/obj/item/weapon/cell/C = I
|
||||
user.drop_item()
|
||||
@@ -237,7 +238,7 @@ var/global/mulebot_count = 0
|
||||
|
||||
//user << browse("<HEAD><TITLE>M.U.L.E. Mk. III [suffix ? "([suffix])" : ""]</TITLE></HEAD>[dat]", "window=mulebot;size=350x500")
|
||||
//onclose(user, "mulebot")
|
||||
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 500)
|
||||
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 535)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
@@ -683,6 +684,8 @@ var/global/mulebot_count = 0
|
||||
/obj/machinery/bot/mulebot/proc/at_target()
|
||||
if(!reached_target)
|
||||
radio_frequency = SUP_FREQ //Supply channel
|
||||
radio_name = "Supply"
|
||||
Radio.config(list("[radio_name]" = 0))
|
||||
visible_message("[src] makes a chiming sound!", "You hear a chime.")
|
||||
playsound(loc, 'sound/machines/chime.ogg', 50, 0)
|
||||
reached_target = 1
|
||||
@@ -694,9 +697,11 @@ var/global/mulebot_count = 0
|
||||
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
|
||||
calling_ai = null
|
||||
radio_frequency = AIPRIV_FREQ //Report on AI Private instead if the AI is controlling us.
|
||||
radio_name = "AI Private"
|
||||
Radio.config(list("[radio_name]" = 0))
|
||||
|
||||
if(load) // if loaded, unload at target
|
||||
speak("Destination <b>[destination]</b> reached. Unloading [load]."/*,radio_frequency*/)
|
||||
speak("Destination <b>[destination]</b> reached. Unloading [load].", radio_frequency, radio_name)
|
||||
unload(loaddir)
|
||||
else
|
||||
// not loaded
|
||||
@@ -712,7 +717,7 @@ var/global/mulebot_count = 0
|
||||
if(AM)
|
||||
load(AM)
|
||||
if(report_delivery)
|
||||
speak("Now loading [load] at <b>[get_area(src)]</b>."/*,radio_frequency*/)
|
||||
speak("Now loading [load] at <b>[get_area(src)]</b>.", radio_frequency, radio_name)
|
||||
// whatever happened, check to see if we return home
|
||||
|
||||
if(auto_return && destination != home_destination)
|
||||
|
||||
@@ -23,8 +23,12 @@
|
||||
var/weaponscheck = 1 //If true, arrest people for weapons if they lack access
|
||||
var/check_records = 1 //Does it check security records?
|
||||
var/arrest_type = 0 //If true, don't handcuff
|
||||
var/harmbaton = 0
|
||||
var/base_icon = "secbot"
|
||||
radio_frequency = SEC_FREQ //Security channel
|
||||
radio_name = "Security"
|
||||
bot_type = SEC_BOT
|
||||
bot_type_name = "Secbot"
|
||||
bot_filter = RADIO_SECBOT
|
||||
|
||||
//List of weapons that secbots will not arrest for
|
||||
@@ -33,21 +37,31 @@
|
||||
/obj/item/weapon/gun/energy/laser/redtag,\
|
||||
/obj/item/weapon/gun/energy/laser/practice,\
|
||||
/obj/item/weapon/melee/telebaton,\
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator,\
|
||||
/obj/item/weapon/melee/baton/loaded/ntcane)
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator)
|
||||
|
||||
|
||||
/obj/machinery/bot/secbot/beepsky
|
||||
name = "Officer Beepsky"
|
||||
desc = "It's Officer Beepsky! Powered by a potato and a shot of whiskey."
|
||||
idcheck = 0
|
||||
weaponscheck = 0
|
||||
weaponscheck = 1
|
||||
auto_patrol = 1
|
||||
|
||||
/obj/machinery/bot/secbot/pingsky
|
||||
name = "Officer Pingsky"
|
||||
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
|
||||
radio_frequency = AIPRIV_FREQ
|
||||
radio_name = "AI Private"
|
||||
|
||||
/obj/machinery/bot/secbot/buzzsky
|
||||
name = "Officer Buzzsky"
|
||||
desc = "It's Officer Buzzsky! Rusted and falling apart, he seems less than thrilled with the crew for leaving him in his current state."
|
||||
base_icon = "rustbot"
|
||||
icon_state = "rustbot0"
|
||||
declare_arrests = 0
|
||||
arrest_type = 1
|
||||
harmbaton = 1
|
||||
emagged = 2
|
||||
|
||||
/obj/item/weapon/secbot_assembly
|
||||
name = "incomplete securitron assembly"
|
||||
@@ -62,7 +76,7 @@
|
||||
|
||||
/obj/machinery/bot/secbot/New()
|
||||
..()
|
||||
icon_state = "secbot[on]"
|
||||
icon_state = "[base_icon][on]"
|
||||
spawn(3)
|
||||
|
||||
var/datum/job/detective/J = new/datum/job/detective
|
||||
@@ -73,12 +87,12 @@
|
||||
|
||||
/obj/machinery/bot/secbot/turn_on()
|
||||
..()
|
||||
icon_state = "secbot[on]"
|
||||
icon_state = "[base_icon][on]"
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/bot/secbot/turn_off()
|
||||
..()
|
||||
icon_state = "secbot[on]"
|
||||
icon_state = "[base_icon][on]"
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/bot/secbot/bot_reset()
|
||||
@@ -189,7 +203,7 @@ Auto Patrol: []"},
|
||||
oldtarget_name = user.name
|
||||
visible_message("<span class='danger'>[src] buzzes oddly!</span>")
|
||||
declare_arrests = 0
|
||||
icon_state = "secbot[on]"
|
||||
icon_state = "[base_icon][on]"
|
||||
|
||||
/obj/machinery/bot/secbot/bot_process()
|
||||
if (!..())
|
||||
@@ -215,13 +229,17 @@ Auto Patrol: []"},
|
||||
if(target) // make sure target exists
|
||||
if(Adjacent(target) && isturf(target.loc)) // if right next to perp
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
icon_state = "secbot-c"
|
||||
if(harmbaton)
|
||||
playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1)
|
||||
icon_state = "[base_icon]-c"
|
||||
spawn(2)
|
||||
icon_state = "secbot[on]"
|
||||
icon_state = "[base_icon][on]"
|
||||
var/mob/living/carbon/M = target
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if( M.stuttering < 5 && !(M_HULK in M.mutations) )
|
||||
M.stuttering = 5
|
||||
if(harmbaton) // Bots with harmbaton enabled become shitcurity. - Dave
|
||||
M.apply_damage(10)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
else
|
||||
@@ -230,10 +248,10 @@ Auto Patrol: []"},
|
||||
M.Stun(5)
|
||||
|
||||
if(declare_arrests)
|
||||
//var/area/location = get_area(src)
|
||||
declare_arrest()
|
||||
target.visible_message("<span class='danger'>[target] has been stunned by [src]!</span>",\
|
||||
"<span class='userdanger'>[target] has been stunned by [src]!</span>")
|
||||
var/area/location = get_area(src)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
|
||||
target.visible_message("<span class='danger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>",\
|
||||
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>")
|
||||
|
||||
mode = BOT_PREP_ARREST
|
||||
anchored = 1
|
||||
@@ -475,13 +493,4 @@ Auto Patrol: []"},
|
||||
overlays -= "hs_arm"
|
||||
new /obj/item/robot_parts/l_arm(get_turf(src))
|
||||
user << "<span class='notice'>You remove the robot arm from [src].</span>"
|
||||
build_step--
|
||||
|
||||
/obj/machinery/bot/secbot/proc/declare_arrest()
|
||||
var/area/location = get_area(src)
|
||||
for(var/mob/living/carbon/human/human in world)
|
||||
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
|
||||
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
for(var/mob/living/silicon/robot in world)
|
||||
if((robot.z == src.z) && !robot.blinded && robot.sensor_mode == 1)
|
||||
robot << "<span class='info'>[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
build_step--
|
||||
@@ -28,6 +28,7 @@
|
||||
var/light_disabled = 0
|
||||
var/alarm_on = 0
|
||||
var/busy = 0
|
||||
var/indestructible = 0 // If set, prevents aliens from destroying it
|
||||
|
||||
/obj/machinery/camera/New()
|
||||
wires = new(src)
|
||||
@@ -97,6 +98,8 @@
|
||||
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(indestructible)
|
||||
return
|
||||
status = 0
|
||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
else
|
||||
src << "\red You've failed to open an airlock for [target]"
|
||||
return
|
||||
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob)
|
||||
/mob/living/silicon/ai/proc/ai_actual_track(atom/target as mob|obj)
|
||||
if(!istype(target)) return
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/holo
|
||||
damtype = HALLOSS
|
||||
damtype = STAMINA
|
||||
|
||||
/obj/item/weapon/holo/esword
|
||||
desc = "May the force be within you. Sorta"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
networks["Fire Alarms"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Power Alarms"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Supermatter"] = list(access_ce,access_hos,access_captain)
|
||||
networks["MiniSat"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Singularity"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Anomaly Isolation"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Toxins"] = list(access_rd,access_hos,access_captain)
|
||||
@@ -34,10 +35,7 @@
|
||||
networks["Thunderdome"] = list(access_cent_captain)
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
if(isAI(user))
|
||||
return ui_interact(user)
|
||||
else
|
||||
return attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -50,6 +48,7 @@
|
||||
|
||||
// Network configuration
|
||||
attackby(I as obj, user as mob)
|
||||
access = list()
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emagged)
|
||||
@@ -70,18 +69,45 @@
|
||||
..()
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(src.z > 6) return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(user.stat) return
|
||||
|
||||
var/data[0]
|
||||
|
||||
data["current"] = null
|
||||
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.viewpoints)
|
||||
if(can_access_camera(C))
|
||||
L.Add(C)
|
||||
|
||||
camera_sort(L)
|
||||
|
||||
var/cameras[0]
|
||||
for(var/obj/machinery/camera/C in L)
|
||||
var/cam[0]
|
||||
cam["name"] = C.c_tag
|
||||
cam["deact"] = !C.can_use()
|
||||
cam["camera"] = "\ref[C]"
|
||||
cam["x"] = C.x
|
||||
cam["y"] = C.y
|
||||
cam["z"] = C.z
|
||||
|
||||
cameras[++cameras.len] = cam
|
||||
|
||||
if(C == current)
|
||||
data["current"] = cam
|
||||
|
||||
data["cameras"] = cameras
|
||||
|
||||
data.Cut()
|
||||
tempnets.Cut()
|
||||
if(emagged)
|
||||
access = list(access_captain) // Assume captain level access when emagged
|
||||
data["emagged"] = 1
|
||||
if(isAI(user))
|
||||
if(isAI(user) || isrobot (user))
|
||||
access = list(access_captain) // Assume captain level access when AI
|
||||
|
||||
// Loop through the ID's permission, and check which networks the ID has access to.
|
||||
for(var/l in networks) // Loop through networks.
|
||||
for(var/m in networks[l]) // Loop through access levels of the networks.
|
||||
@@ -92,16 +118,36 @@
|
||||
tempnets.Add(list(list("name" = l, "active" = 0)))
|
||||
break
|
||||
data["networks"] = tempnets
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "camera_console.tmpl", "Camera Monitor UI", 660, 280)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
|
||||
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
ui.set_auto_update(1)
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["activate"]) // Activate: enable or disable networks
|
||||
if(href_list["switchTo"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.viewpoints
|
||||
if(!C) return
|
||||
|
||||
switch_to_camera(usr, C)
|
||||
return 1
|
||||
else if(href_list["reset"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
current = null
|
||||
usr.check_eye(current)
|
||||
return 1
|
||||
else if(href_list["activate"]) // Activate: enable or disable networks
|
||||
var/net = href_list["activate"] // Network to be enabled or disabled.
|
||||
var/active = href_list["active"] // Is the network currently active.
|
||||
for(var/a in networks[net])
|
||||
@@ -113,50 +159,26 @@
|
||||
src.network += net
|
||||
break
|
||||
nanomanager.update_uis(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection:</b> \black You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
access = list()
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(!isAI(user))
|
||||
user.set_machine(src)
|
||||
|
||||
if(network.len == 0)
|
||||
user << "\red No networks configured! Swipe the monitor with an authorized ID to configure them."
|
||||
return
|
||||
|
||||
// Camera listing
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.viewpoints)
|
||||
L.Add(C)
|
||||
camera_sort(L)
|
||||
|
||||
var/list/D = list()
|
||||
D["Cancel"] = "Cancel"
|
||||
for(var/obj/machinery/camera/C in L)
|
||||
if(can_access_camera(C))
|
||||
D[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
C.watcherslist -= user
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in D
|
||||
if(!t)
|
||||
user.unset_machine()
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.wear_id)
|
||||
var/obj/item/weapon/card/id/gold/C = H.wear_id
|
||||
access = C.access
|
||||
|
||||
if(t == "Cancel")
|
||||
user.unset_machine()
|
||||
return 0
|
||||
|
||||
if(C)
|
||||
C.watcherslist += user
|
||||
switch_to_camera(user, C)
|
||||
spawn(5)
|
||||
attack_hand(user)
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
// Check if camera is accessible when jumping
|
||||
proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/computer/crew
|
||||
name = "Crew monitoring computer"
|
||||
name = "Crew Monitoring Computer"
|
||||
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
|
||||
icon_state = "crew"
|
||||
use_power = 1
|
||||
|
||||
@@ -23,14 +23,13 @@ var/specops_shuttle_timeleft = 0
|
||||
var/specops_shuttle_timereset = 0
|
||||
|
||||
/proc/specops_return()
|
||||
var/area/centcom/control/command = locate()//To find announcer. This area should exist for this proc to work.
|
||||
var/mob/living/silicon/decoy/announcer = locate() in command//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
|
||||
var/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
|
||||
announcer.config(list("Response Team" = 0))
|
||||
|
||||
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
|
||||
var/message = "\"THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN\""//Initial message shown.
|
||||
if(announcer)
|
||||
announcer.say(message)
|
||||
announcer.say(message)
|
||||
announcer.autosay(message, "A.L.I.C.E.", "Response Team", list(1,2))
|
||||
|
||||
while(specops_shuttle_time - world.timeofday > 0)
|
||||
var/ticksleft = specops_shuttle_time - world.timeofday
|
||||
@@ -46,7 +45,7 @@ var/specops_shuttle_timeleft = 0
|
||||
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
|
||||
if(rounded_time_left==0)
|
||||
message = "\"ALERT: TAKEOFF\""
|
||||
announcer.say(message)
|
||||
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
|
||||
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
|
||||
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
|
||||
|
||||
@@ -94,21 +93,20 @@ var/specops_shuttle_timeleft = 0
|
||||
|
||||
for(var/obj/machinery/computer/specops_shuttle/S in world)
|
||||
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
|
||||
|
||||
del(announcer)
|
||||
|
||||
/proc/specops_process()
|
||||
var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
|
||||
var/area/centcom/control/command = locate()//To find announcer. This area should exist for this proc to work.
|
||||
var/mob/living/silicon/decoy/announcer = locate() in command//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
|
||||
|
||||
var/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
|
||||
announcer.config(list("Response Team" = 0))
|
||||
|
||||
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
|
||||
var/message = "\"THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH\""//Initial message shown.
|
||||
if(announcer)
|
||||
announcer.say(message)
|
||||
announcer.say(message)
|
||||
/*
|
||||
message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
|
||||
announcer.say(message)
|
||||
*/
|
||||
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
|
||||
//message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
|
||||
//announcer.autosay(message, "A.L.I.C.E.", "Response Team")
|
||||
|
||||
while(specops_shuttle_time - world.timeofday > 0)
|
||||
var/ticksleft = specops_shuttle_time - world.timeofday
|
||||
@@ -124,8 +122,7 @@ var/specops_shuttle_timeleft = 0
|
||||
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
|
||||
if(rounded_time_left==0)
|
||||
message = "\"ALERT: TAKEOFF\""
|
||||
announcer.say(message)
|
||||
announcer.say(message)
|
||||
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
|
||||
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
|
||||
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
|
||||
|
||||
@@ -237,6 +234,8 @@ var/specops_shuttle_timeleft = 0
|
||||
|
||||
for(var/obj/machinery/computer/specops_shuttle/S in world)
|
||||
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
|
||||
|
||||
del(announcer)
|
||||
|
||||
/proc/specops_can_move()
|
||||
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom)
|
||||
@@ -247,7 +246,8 @@ var/specops_shuttle_timeleft = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
user << "\red Access Denied."
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -339,248 +339,4 @@ var/specops_shuttle_timeleft = 0
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/*//Config stuff
|
||||
#define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
|
||||
#define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station
|
||||
#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock
|
||||
|
||||
var/specops_shuttle_moving_to_station = 0
|
||||
var/specops_shuttle_moving_to_centcom = 0
|
||||
var/specops_shuttle_at_station = 0
|
||||
var/specops_shuttle_can_send = 1
|
||||
var/specops_shuttle_time = 0
|
||||
var/specops_shuttle_timeleft = 0
|
||||
|
||||
/obj/machinery/computer/specops_shuttle
|
||||
name = "Spec. Ops. Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
req_access = list(access_cent_specops)
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
|
||||
/proc/specops_process()
|
||||
var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work.
|
||||
var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
|
||||
var/mob/living/silicon/decoy/announcer = locate() in cent_com//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
|
||||
|
||||
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
|
||||
var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
|
||||
if(announcer)
|
||||
announcer.say(message)
|
||||
message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
|
||||
announcer.say(message)
|
||||
|
||||
while(specops_shuttle_time - world.timeofday > 0)
|
||||
var/ticksleft = specops_shuttle_time - world.timeofday
|
||||
|
||||
if(ticksleft > 1e5)
|
||||
specops_shuttle_time = world.timeofday + 10 // midnight rollover
|
||||
specops_shuttle_timeleft = (ticksleft / 10)
|
||||
|
||||
//All this does is announce the time before launch.
|
||||
if(announcer)
|
||||
var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
|
||||
if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
|
||||
message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
|
||||
if(rounded_time_left==0)
|
||||
message = "ALERT: TAKEOFF"
|
||||
announcer.say(message)
|
||||
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
|
||||
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
|
||||
|
||||
sleep(5)
|
||||
|
||||
specops_shuttle_moving_to_station = 0
|
||||
specops_shuttle_moving_to_centcom = 0
|
||||
|
||||
specops_shuttle_at_station = 1
|
||||
if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
|
||||
|
||||
if (!specops_can_move())
|
||||
usr << "\red The Special Operations shuttle is unable to leave."
|
||||
return
|
||||
|
||||
//Begin Marauder launchpad.
|
||||
spawn(0)//So it parallel processes it.
|
||||
for(var/obj/machinery/door/poddoor/M in special_ops)
|
||||
switch(M.id)
|
||||
if("ASSAULT0")
|
||||
spawn(10)//1 second delay between each.
|
||||
M.open()
|
||||
if("ASSAULT1")
|
||||
spawn(20)
|
||||
M.open()
|
||||
if("ASSAULT2")
|
||||
spawn(30)
|
||||
M.open()
|
||||
if("ASSAULT3")
|
||||
spawn(40)
|
||||
M.open()
|
||||
|
||||
sleep(10)
|
||||
|
||||
var/spawn_marauder[] = new()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Entry")
|
||||
spawn_marauder.Add(L)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Exit")
|
||||
var/obj/effect/portal/P = new(L.loc)
|
||||
P.invisibility = 101//So it is not seen by anyone.
|
||||
P.failchance = 0//So it has no fail chance when teleporting.
|
||||
P.target = pick(spawn_marauder)//Where the marauder will arrive.
|
||||
spawn_marauder.Remove(P.target)
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/obj/machinery/mass_driver/M in special_ops)
|
||||
switch(M.id)
|
||||
if("ASSAULT0")
|
||||
spawn(10)
|
||||
M.drive()
|
||||
if("ASSAULT1")
|
||||
spawn(20)
|
||||
M.drive()
|
||||
if("ASSAULT2")
|
||||
spawn(30)
|
||||
M.drive()
|
||||
if("ASSAULT3")
|
||||
spawn(40)
|
||||
M.drive()
|
||||
|
||||
sleep(50)//Doors remain open for 5 seconds.
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in special_ops)
|
||||
switch(M.id)//Doors close at the same time.
|
||||
if("ASSAULT0")
|
||||
spawn(0)
|
||||
M.close()
|
||||
if("ASSAULT1")
|
||||
spawn(0)
|
||||
M.close()
|
||||
if("ASSAULT2")
|
||||
spawn(0)
|
||||
M.close()
|
||||
if("ASSAULT3")
|
||||
spawn(0)
|
||||
M.close()
|
||||
special_ops.readyreset()//Reset firealarm after the team launched.
|
||||
//End Marauder launchpad.
|
||||
|
||||
var/area/start_location = locate(/area/shuttle/specops/centcom)
|
||||
var/area/end_location = locate(/area/shuttle/specops/station)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
|
||||
for(var/turf/T in get_area_turfs(end_location) )
|
||||
var/mob/M = locate(/mob) in T
|
||||
M << "\red You have arrived to [station_name]. Commence operation!"
|
||||
|
||||
/proc/specops_can_move()
|
||||
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied."
|
||||
return
|
||||
|
||||
// if (sent_strike_team == 0)
|
||||
// usr << "\red The strike team has not yet deployed."
|
||||
// return
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (temp)
|
||||
dat = temp
|
||||
else
|
||||
dat += {"<BR><B>Special Operations Shuttle</B><HR>
|
||||
\nLocation: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]<BR>
|
||||
[specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*<BR>\n<BR>":specops_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Shuttle Offline</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Depart to [station_name]</A><BR>\n<BR>"]
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
|
||||
if (href_list["sendtodock"])
|
||||
if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
|
||||
|
||||
usr << "\blue Central Command will not allow the Special Operations shuttle to return."
|
||||
return
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
|
||||
|
||||
if (!specops_can_move())
|
||||
usr << "\red The Special Operations shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The Special Operations shuttle will arrive on [station_name] in [(SPECOPS_MOVETIME/10)] seconds."
|
||||
|
||||
temp += "Shuttle departing.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
updateUsrDialog()
|
||||
|
||||
var/area/centcom/specops/special_ops = locate()
|
||||
if(special_ops)
|
||||
special_ops.readyalert()//Trigger alarm for the spec ops area.
|
||||
specops_shuttle_moving_to_station = 1
|
||||
|
||||
specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
|
||||
spawn(0)
|
||||
specops_process()
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
temp = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
*/
|
||||
return
|
||||
@@ -180,7 +180,8 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
user << "\red Access Denied."
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -1,315 +0,0 @@
|
||||
/obj/machinery/computer/telescience
|
||||
name = "Telepad Control Console"
|
||||
desc = "Used to teleport objects to and from the telescience telepad."
|
||||
icon_state = "teleport-sci"
|
||||
circuit = "/obj/item/weapon/circuitboard/telesci_console"
|
||||
var/teles_left // How many teleports left until it becomes uncalibrated
|
||||
var/x_off // X offset
|
||||
var/y_off // Y offset
|
||||
var/x_co // X coordinate
|
||||
var/y_co // Y coordinate
|
||||
var/z_co // Z coordinate
|
||||
var/trueX // X + offset
|
||||
var/trueY // Y + offset
|
||||
var/obj/machinery/telepad/telepad
|
||||
var/tele_id = "Telesci"
|
||||
var/obj/item/device/sps/inserted_sps
|
||||
var/last_target
|
||||
|
||||
/obj/machinery/computer/telescience/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "telescib"
|
||||
else
|
||||
if(stat & NOPOWER)
|
||||
src.icon_state = "teleport0"
|
||||
stat |= NOPOWER
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
|
||||
/obj/machinery/computer/telescience/Destroy()
|
||||
if(inserted_sps)
|
||||
inserted_sps.loc = loc
|
||||
inserted_sps = null
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/telescience/attack_paw(mob/user)
|
||||
usr << "You are too primitive to use this computer."
|
||||
return
|
||||
|
||||
/obj/machinery/telescience/station/attack_ai(mob/user)
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/computer/telescience/attack_hand(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/telescience/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
// On first use, the coordinates are null. Rather than displaying null, we'll set them to unset.
|
||||
if(!x_co)
|
||||
x_co = "Unset"
|
||||
if(!y_co)
|
||||
y_co = "Unset"
|
||||
if(!z_co)
|
||||
z_co = "Unset"
|
||||
|
||||
var/data[0]
|
||||
data["coordx"] = x_co
|
||||
data["coordy"] = y_co
|
||||
data["coordz"] = z_co
|
||||
data["sps"] = inserted_sps
|
||||
|
||||
// Set up the Nano UI
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "telescience_console.tmpl", "Telescience Console UI", 640, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/telescience/proc/telefail(var/level)
|
||||
var/teleturf = get_turf(telepad)
|
||||
switch(level)
|
||||
if(1)
|
||||
for(var/mob/O in hearers(telepad, null))
|
||||
O.show_message("\red The telepad weakly fizzles.", 2)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, teleturf)
|
||||
s.start()
|
||||
if(2)
|
||||
for(var/mob/living/carbon/human/M in viewers(telepad, null))
|
||||
if(M.loc.loc == telepad.loc.loc) // Stops the geneticists with X-Ray vision getting irradiated
|
||||
M.apply_effect((rand(50, 100)), IRRADIATE, 0)
|
||||
M << "\red You feel irradiated."
|
||||
if(3)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,telepad))
|
||||
var/datum/gas_mixture/napalm = new
|
||||
napalm.toxins = 25
|
||||
napalm.temperature = 2000
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
for(var/mob/O in hearers(telepad, null))
|
||||
O.show_message("\red The telepad sets on fire!", 2)
|
||||
if(4)
|
||||
var/blocked = list(/mob/living/simple_animal/hostile,
|
||||
/mob/living/simple_animal/hostile/alien/queen/large,
|
||||
/mob/living/simple_animal/hostile/pirate,
|
||||
/mob/living/simple_animal/hostile/pirate/ranged,
|
||||
/mob/living/simple_animal/hostile/russian,
|
||||
/mob/living/simple_animal/hostile/russian/ranged,
|
||||
/mob/living/simple_animal/hostile/syndicate,
|
||||
/mob/living/simple_animal/hostile/syndicate/melee,
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/space,
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged,
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/space,
|
||||
/mob/living/simple_animal/hostile/retaliate,
|
||||
/mob/living/simple_animal/hostile/giant_spider/nurse)
|
||||
var/list/hostiles = typesof(/mob/living/simple_animal/hostile) - blocked
|
||||
playsound(teleturf, 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(telepad, null))
|
||||
flick("e_flash", M.flash)
|
||||
var/chosen = pick(hostiles)
|
||||
var/mob/living/simple_animal/hostile/H = new chosen
|
||||
H.loc = teleturf
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/proc/teleprep(var/type)
|
||||
if(!telepad)
|
||||
usr << "\red Error: No associated telepad. Please recalibrate and try again."
|
||||
return
|
||||
if(telepad.panel_open)
|
||||
usr << "\red Error: The telepad can not be used while in maintenance mode."
|
||||
return
|
||||
var/numpick
|
||||
var/failure = checkFail()
|
||||
if(failure > 0)
|
||||
numpick = pick(1,1,1,1,1,2,2,2,2,3)
|
||||
telefail(numpick)
|
||||
return
|
||||
if(teles_left > 0)
|
||||
if(prob(70 + (5 * telepad.efficiency)))
|
||||
teles_left -= 1
|
||||
tele(type)
|
||||
if(teles_left == 0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red The telepad has become uncalibrated.", 2)
|
||||
return
|
||||
else
|
||||
if(prob(25 + (10 * telepad.efficiency)))
|
||||
tele(type)
|
||||
else
|
||||
numpick = pick(1,1,1,2,2,3,4)
|
||||
telefail(numpick)
|
||||
return
|
||||
numpick = pick(1,1,1,1,1,2,2,2,2,3)
|
||||
telefail(numpick)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/proc/tele(var/type)
|
||||
var/tele = get_turf(telepad)
|
||||
trueX = (x_co + x_off)
|
||||
trueY = (y_co + y_off)
|
||||
var/target = locate(trueX, trueY, z_co)
|
||||
last_target = target
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, tele)
|
||||
s.start()
|
||||
flick("pad-beam", telepad)
|
||||
var/list/teleportables = list()
|
||||
switch(type)
|
||||
if(0)
|
||||
for(var/atom/A in tele)
|
||||
if(!istype(A, /obj/effect) && !istype(A, /mob/living/silicon/ai) && !istype(A, /obj/item/device/radio/intercom) && !istype(A, /obj/structure/closet/secure_closet/brig))
|
||||
if(istype(A, /obj/structure))
|
||||
var/obj/structure/S = A
|
||||
if(!S.anchored)
|
||||
teleportables += S
|
||||
else if(istype(A, /obj/machinery))
|
||||
var/obj/machinery/M = A
|
||||
if(!M.anchored)
|
||||
teleportables += M
|
||||
else
|
||||
teleportables += A
|
||||
for(var/atom/T in teleportables)
|
||||
do_teleport(T, target, 0)
|
||||
usr << "\blue Teleport successful."
|
||||
if(1)
|
||||
for(var/atom/A in target)
|
||||
if(!istype(A, /obj/effect) && !istype(A, /mob/living/silicon/ai) && !istype(A, /obj/item/device/radio/intercom))
|
||||
if(istype(A, /obj/structure))
|
||||
var/obj/structure/S = A
|
||||
if(!S.anchored)
|
||||
teleportables += S
|
||||
else if(istype(A, /obj/machinery))
|
||||
var/obj/machinery/M = A
|
||||
if(!M.anchored)
|
||||
teleportables += M
|
||||
else
|
||||
teleportables += A
|
||||
for(var/atom/T in teleportables)
|
||||
do_teleport(T, tele, 0)
|
||||
usr << "\blue Teleport successful."
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/proc/checkFail()
|
||||
var/fail = 0
|
||||
if(x_co == "" || x_co == "Unset")
|
||||
usr << "\red Error: set X coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(y_co == "" || y_co == "Unset")
|
||||
usr << "\red Error: set Y coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(z_co == "" || z_co == "Unset")
|
||||
usr << "\red Error: set Z coordinate."
|
||||
fail = 1
|
||||
return fail
|
||||
if(x_co < 11 || x_co > 245)
|
||||
usr << "\red Error: X is less than 11 or greater than 245."
|
||||
fail = 1
|
||||
return fail
|
||||
if(y_co < 11 || y_co > 245)
|
||||
usr << "\red Error: Y is less than 11 or greater than 245."
|
||||
fail = 1
|
||||
return fail
|
||||
if(z_co == 2 || z_co < 1 || z_co > 6)
|
||||
if (z_co == 7 & src.emagged == 1)
|
||||
// This should be empty, allows for it to continue if the z-level is 7 and the machine is emagged.
|
||||
else
|
||||
usr << "\red Error: Z is less than 1, greater than [src.emagged ? "7" : "6"], or equal to 2."
|
||||
fail = 1
|
||||
return fail
|
||||
if(istype(get_area(locate(x_co,y_co,z_co)), /area/security/armoury/gamma))
|
||||
usr << "\red Error: Attempting to access telescience-protected area."
|
||||
fail = 1
|
||||
return fail
|
||||
return fail
|
||||
|
||||
/obj/machinery/computer/telescience/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["ejectSPS"])
|
||||
inserted_sps.loc = loc
|
||||
inserted_sps = null
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["setMemory"])
|
||||
if(last_target)
|
||||
inserted_sps.locked_location = last_target
|
||||
usr << "\blue Location saved."
|
||||
else
|
||||
usr << "\red Error: No data stored."
|
||||
nanomanager.update_uis(src)
|
||||
if(href_list["setx"])
|
||||
var/a = input("Please input desired X coordinate.", name, x_co) as num
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
x_co = a
|
||||
x_co = text2num(x_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["sety"])
|
||||
var/b = input("Please input desired Y coordinate.", name, y_co) as num
|
||||
b = copytext(sanitize(b), 1, 20)
|
||||
y_co = b
|
||||
y_co = text2num(y_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["setz"])
|
||||
var/c = input("Please input desired Z coordinate.", name, z_co) as num
|
||||
c = copytext(sanitize(c), 1, 20)
|
||||
z_co = c
|
||||
z_co = text2num(z_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["send"])
|
||||
teleprep(0)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["receive"])
|
||||
teleprep(1)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["recal"])
|
||||
if(telepad == null)
|
||||
for(var/obj/machinery/telepad/T in range(src,10))
|
||||
telepad = T
|
||||
if(!telepad)
|
||||
usr << "\red Error: No telepads in range were found."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/teleturf = get_turf(telepad)
|
||||
teles_left = rand(8,12)
|
||||
x_off = rand(-10,10)
|
||||
y_off = rand(-10,10)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, teleturf)
|
||||
s.start()
|
||||
usr << "\blue Calibration successful."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(I as obj, var/mob/user as mob) // Emagging
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!"
|
||||
src.emagged = 1
|
||||
else
|
||||
user << "\red The machine seems unaffected by the card swipe..."
|
||||
else if(istype(I, /obj/item/device/sps))
|
||||
if(!inserted_sps)
|
||||
inserted_sps = I
|
||||
user.before_take_item(I)
|
||||
inserted_sps.loc = src
|
||||
user.visible_message("<span class='notice'>You insert [I] into the SPS device slot.</span>")
|
||||
attack_hand(user)
|
||||
else if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = I
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/telepad))
|
||||
telepad = M.buffer
|
||||
M.buffer = null
|
||||
user << "<span class='caution'>You upload the data from [I]'s buffer.</span>"
|
||||
else
|
||||
..()
|
||||
@@ -9,10 +9,11 @@
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
unacidable = 1
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/New()
|
||||
curr_location= locate(/area/xenos_station/start)
|
||||
curr_location = locate(/area/xenos_station/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/proc/xenos_move_to(area/destination as area)
|
||||
@@ -23,13 +24,61 @@
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
for(var/obj/machinery/door/airlock/alien/A in world)
|
||||
A.close()
|
||||
A.locked = 1
|
||||
A.update_icon()
|
||||
|
||||
for(var/mob/M in curr_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
M << "\red Sudden acceleration presses you into your chair!"
|
||||
shake_camera(M, 3, 1)
|
||||
else
|
||||
M << "\red The floor lurches beneath you!"
|
||||
shake_camera(M, 10, 1)
|
||||
if(istype(M, /mob/living/carbon) && !isalien(M))
|
||||
if(!M.buckled)
|
||||
M.Weaken(3)
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/xenos_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(XENOS_SHUTTLE_MOVE_TIME)
|
||||
|
||||
for(var/obj/machinery/door/airlock/alien/A in world)
|
||||
A.close()
|
||||
if(dest_location != locate(/area/xenos_station/start))
|
||||
A.locked = 0
|
||||
A.update_icon()
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in dest_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
for(var/mob/living/carbon/bug in dest_location) // If someone somehow is still in the shuttle's docking area...
|
||||
bug.gib()
|
||||
|
||||
for(var/mob/living/simple_animal/pest in dest_location) // And for the other kind of bug...
|
||||
pest.gib()
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
@@ -47,20 +96,25 @@
|
||||
|
||||
/obj/machinery/computer/xenos_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(!isalien(user) && !isrobot(user) && !isAI(user))
|
||||
user << "You do not know how to operate this terminal."
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + XENOS_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + XENOS_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=\ref[src];xenos=1'>Xenos Space</a><br>
|
||||
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
|
||||
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
|
||||
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
|
||||
<a href='?src=\ref[src];xenos=1'>Alien Space</a><br>
|
||||
<a href='?src=\ref[src];station_nw=1'>North-West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_ne=1'>North-East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_e=1'>East of SS13</a> <br>
|
||||
<a href='?src=\ref[src];station_sw=1'>South-West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_se=1'>South-East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_west=1'>West of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_ro=1'>North of Research Outpost</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
@@ -79,17 +133,18 @@
|
||||
xenos_move_to(/area/xenos_station/start)
|
||||
else if(href_list["station_nw"])
|
||||
xenos_move_to(/area/xenos_station/northwest)
|
||||
else if(href_list["station_n"])
|
||||
xenos_move_to(/area/xenos_station/north)
|
||||
else if(href_list["station_ne"])
|
||||
xenos_move_to(/area/xenos_station/northeast)
|
||||
else if(href_list["station_e"])
|
||||
xenos_move_to(/area/xenos_station/east)
|
||||
else if(href_list["station_sw"])
|
||||
xenos_move_to(/area/xenos_station/southwest)
|
||||
else if(href_list["station_s"])
|
||||
xenos_move_to(/area/xenos_station/south)
|
||||
else if(href_list["station_se"])
|
||||
xenos_move_to(/area/xenos_station/southeast)
|
||||
|
||||
else if(href_list["station_w"])
|
||||
xenos_move_to(/area/xenos_station/west)
|
||||
else if(href_list["station_ro"])
|
||||
xenos_move_to(/area/xenos_station/researchoutpost)
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -266,7 +266,15 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
//Make an announcement and log the person entering storage.
|
||||
frozen_crew += "[occupant.real_name]"
|
||||
|
||||
announce.autosay("[occupant.real_name] has entered long-term storage.", "Cryogenic Oversight")
|
||||
var/ailist[] = list()
|
||||
for (var/mob/living/silicon/ai/A in living_mob_list)
|
||||
ailist += A
|
||||
if (ailist.len)
|
||||
var/mob/living/silicon/ai/announcer = pick(ailist)
|
||||
announcer.say(";[occupant.real_name] has entered long-term storage.")
|
||||
else
|
||||
announce.autosay("[occupant.real_name] has entered long-term storage.", "Cryogenic Oversight")
|
||||
|
||||
visible_message("\blue The crypod hums and hisses as it moves [occupant.real_name] into storage.", 3)
|
||||
|
||||
// Delete the mob.
|
||||
|
||||
@@ -284,6 +284,26 @@
|
||||
name = "Secure Armory Airlock"
|
||||
hackProof = 1
|
||||
aiControlDisabled = 1
|
||||
|
||||
/obj/machinery/door/airlock/alien
|
||||
name = "Alien Airlock"
|
||||
desc = "A mysterious alien airlock with a complicated opening mechanism."
|
||||
hackProof = 1
|
||||
icon = 'icons/obj/doors/Doorplasma.dmi'
|
||||
|
||||
/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob)
|
||||
if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user))
|
||||
..(user)
|
||||
else
|
||||
user << "You do not know how to operate this airlock's mechanism."
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob)
|
||||
if(isalien(user) || isrobot(user) || isAI(user))
|
||||
..(C, user)
|
||||
else
|
||||
user << "You do not know how to operate this airlock's mechanism."
|
||||
return
|
||||
|
||||
/*
|
||||
About the new airlock wires panel:
|
||||
@@ -314,174 +334,14 @@ About the new airlock wires panel:
|
||||
return
|
||||
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
user.halloss += 10
|
||||
user.stunned += 10
|
||||
user.staminaloss += 50
|
||||
user.stunned += 5
|
||||
return
|
||||
..(user)
|
||||
|
||||
/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user as mob)
|
||||
..(user)
|
||||
|
||||
|
||||
/*
|
||||
/obj/machinery/door/airlock/proc/pulse(var/wireColor)
|
||||
//var/wireFlag = airlockWireColorToFlag[wireColor] //not used in this function
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through this flashes the red light on the door (if the door has power).
|
||||
if((src.arePowerSystemsOn()) && (!(stat & NOPOWER)))
|
||||
do_animate("deny")
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
|
||||
src.loseMainPower()
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
|
||||
//raises them if they are down (only if power's on)
|
||||
if(!src.locked)
|
||||
src.lock()
|
||||
else
|
||||
src.unlock()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
||||
src.loseBackupPower()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
if(src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if(src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateDialog()
|
||||
spawn(10)
|
||||
if(src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if(src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
if(src.secondsElectrified==0)
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
src.secondsElectrified = 30
|
||||
spawn(10)
|
||||
//TODO: Move this into process() and make pulsing reset secondsElectrified to 30
|
||||
while (src.secondsElectrified>0)
|
||||
src.secondsElectrified-=1
|
||||
if(src.secondsElectrified<0)
|
||||
src.secondsElectrified = 0
|
||||
// src.updateUsrDialog() //Commented this line out to keep the airlock from clusterfucking you with electricity. --NeoFite
|
||||
sleep(10)
|
||||
if(AIRLOCK_WIRE_OPEN_DOOR)
|
||||
//tries to open the door without ID
|
||||
//will succeed only if the ID wire is cut or the door requires no access
|
||||
if(!src.requiresID() || src.check_access(null))
|
||||
if(density) open()
|
||||
else close()
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
safe = !safe
|
||||
if(!src.density)
|
||||
close()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
normalspeed = !normalspeed
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = !lights
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/proc/cut(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
|
||||
src.loseMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
||||
src.lock()
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||
src.loseBackupPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if(src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if(src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
|
||||
if(src.secondsElectrified != -1)
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
src.secondsElectrified = -1
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
safe = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
autoclose = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/door/airlock/proc/mend(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor] //not used in this function
|
||||
wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
if((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
src.regainMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
if((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
src.regainBackupPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if(src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if(src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
if(src.secondsElectrified == -1)
|
||||
src.secondsElectrified = 0
|
||||
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
safe = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
autoclose = 1
|
||||
if(!src.density)
|
||||
close()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/door/airlock/proc/isElectrified()
|
||||
if(src.secondsElectrified != 0)
|
||||
return 1
|
||||
@@ -575,13 +435,14 @@ About the new airlock wires panel:
|
||||
|
||||
/obj/machinery/door/airlock/update_icon()
|
||||
if(overlays) overlays.Cut()
|
||||
overlays = list()
|
||||
if(emergency) overlays += image('icons/obj/doors/doorint.dmi', "elights")
|
||||
if(density)
|
||||
if(locked && lights)
|
||||
icon_state = "door_locked"
|
||||
else
|
||||
icon_state = "door_closed"
|
||||
if(p_open || welded || frozen)
|
||||
overlays = list()
|
||||
if(p_open)
|
||||
overlays += image(icon, "panel_open")
|
||||
if(welded)
|
||||
@@ -648,6 +509,11 @@ About the new airlock wires panel:
|
||||
else
|
||||
t1 += text("IdScan enabled. <A href='?src=\ref[];aiDisable=1'>Disable?</a><br>\n", src)
|
||||
|
||||
if(src.emergency)
|
||||
t1 += text("Emergency Access Override is enabled. <A href='?src=\ref[];aiDisable=11'>Disable?</a><br>\n", src)
|
||||
else
|
||||
t1 += text("Emergency Access Override is disabled. <A href='?src=\ref[];aiEnable=11'>Enable?</a><br>\n", src)
|
||||
|
||||
if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1))
|
||||
t1 += text("Main Power Input wire is cut.<br>\n")
|
||||
if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2))
|
||||
@@ -826,8 +692,9 @@ About the new airlock wires panel:
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0)
|
||||
// If you add an if(..()) check you must first remove the var/nowindow parameter.
|
||||
// Otherwise it will runtime with this kind of error: null.Topic()
|
||||
//AI
|
||||
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed, 11 emergency access
|
||||
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door, 8 door safties, 9 door speed, 11 emergency access
|
||||
if(!nowindow)
|
||||
..()
|
||||
if(usr.stat || usr.restrained()|| usr.small)
|
||||
@@ -966,6 +833,13 @@ About the new airlock wires panel:
|
||||
usr << "The door bolt lights have been disabled."
|
||||
else
|
||||
usr << "The door bolt lights are already disabled!"
|
||||
if(11)
|
||||
// Emergency access
|
||||
if (src.emergency)
|
||||
emergency = 0
|
||||
else
|
||||
usr << text("Emergency access is already disabled!")
|
||||
|
||||
|
||||
else if(href_list["aiEnable"])
|
||||
var/code = text2num(href_list["aiEnable"])
|
||||
@@ -1057,6 +931,13 @@ About the new airlock wires panel:
|
||||
usr << "The door bolt lights have been enabled"
|
||||
else
|
||||
usr << "The door bolt lights are already enabled!"
|
||||
if(11)
|
||||
// Emergency access
|
||||
if (!src.emergency)
|
||||
emergency = 1
|
||||
else
|
||||
usr << text("Emergency access is already enabled!")
|
||||
|
||||
|
||||
add_fingerprint(usr)
|
||||
update_icon()
|
||||
@@ -1349,3 +1230,8 @@ About the new airlock wires panel:
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/CanAStarPass(var/obj/item/weapon/card/id/ID)
|
||||
//Airlock is passable if it is open (!density), bot has access, and is not bolted shut)
|
||||
return !density || (check_access(ID) && !locked)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/glass = 0
|
||||
var/normalspeed = 1
|
||||
var/heat_proof = 0 // For glass airlocks/opacity firedoors
|
||||
var/emergency = 0
|
||||
var/air_properties_vary_with_direction = 0
|
||||
|
||||
//Multi-tile doors
|
||||
@@ -44,12 +45,14 @@
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
airlocks += src
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
airlocks -= src
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -68,7 +71,7 @@
|
||||
|
||||
if(istype(AM, /obj/machinery/bot))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
if(src.check_access(bot.botcard))
|
||||
if(src.check_access(bot.botcard) || emergency == 1)
|
||||
if(density)
|
||||
open()
|
||||
return
|
||||
@@ -76,7 +79,7 @@
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density)
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access) || emergency == 1))
|
||||
open()
|
||||
else
|
||||
flick("door_deny", src)
|
||||
@@ -101,7 +104,7 @@
|
||||
|
||||
//used in the AStar algorithm to determinate if the turf the door is on is passable
|
||||
/obj/machinery/door/proc/CanAStarPass(var/obj/item/weapon/card/id/ID)
|
||||
return !density || check_access(ID)
|
||||
return !density
|
||||
|
||||
/obj/machinery/door/proc/bumpopen(mob/user as mob)
|
||||
if(operating) return
|
||||
@@ -113,8 +116,10 @@
|
||||
user = null
|
||||
|
||||
if(density)
|
||||
if(allowed(user)) open()
|
||||
else flick("door_deny", src)
|
||||
if(allowed(user) || src.emergency == 1)
|
||||
open()
|
||||
else
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/meteorhit(obj/M as obj)
|
||||
@@ -153,7 +158,7 @@
|
||||
open()
|
||||
operating = -1
|
||||
return 1
|
||||
if(src.allowed(user))
|
||||
if(src.allowed(user) || src.emergency == 1)
|
||||
if(src.density)
|
||||
open()
|
||||
else
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
desc = "Emergency air-tight shutter, capable of sealing off breached areas."
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
icon_state = "door_open"
|
||||
req_one_access = list(access_atmospherics, access_engine_equip)
|
||||
req_one_access = list(access_atmospherics, access_engine)
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
@@ -132,9 +132,9 @@
|
||||
o += "<span class='warning'>"
|
||||
else
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[celsius]Celsius</span> "
|
||||
o += "[celsius] Celsius</span> "
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[pressure]kPa</span></li>"
|
||||
o += "[pressure] kPa</span></li>"
|
||||
usr << o
|
||||
|
||||
if( islist(users_to_open) && users_to_open.len)
|
||||
@@ -468,7 +468,3 @@
|
||||
/obj/machinery/door/firedoor/multi_tile/triple
|
||||
icon = 'icons/obj/doors/DoorHazard3x1.dmi'
|
||||
width = 3
|
||||
|
||||
//used in the AStar algorithm to determinate if the turf the door is on is passable
|
||||
/obj/machinery/door/firedoor/CanAStarPass()
|
||||
return !density
|
||||
|
||||
@@ -81,13 +81,13 @@ var/const/HOLOPAD_MODE = 0
|
||||
|
||||
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text)
|
||||
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb)
|
||||
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
|
||||
if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad.
|
||||
text = stars(text)
|
||||
var/name_used = M.GetVoice()
|
||||
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
|
||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[M.say_quote(text)]</span></span></i>"
|
||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
||||
master.show_message(rendered, 2)
|
||||
return
|
||||
|
||||
@@ -101,7 +101,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.SetLuminosity(2) //hologram lighting
|
||||
SetLuminosity(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
A.current = src
|
||||
A.holo = src
|
||||
master = A//AI is the master.
|
||||
use_power = 2//Active power usage.
|
||||
return 1
|
||||
@@ -109,8 +109,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/hologram/holopad/proc/clear_holo()
|
||||
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
|
||||
del(hologram)//Get rid of hologram.
|
||||
if(master.current == src)
|
||||
master.current = null
|
||||
if(master.holo == src)
|
||||
master.holo = null
|
||||
master = null//Null the master, since no-one is using it now.
|
||||
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||
icon_state = "holopad0"
|
||||
@@ -141,6 +141,25 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.loc = get_turf(master.eyeobj)
|
||||
|
||||
return 1
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/obj/machinery/hologram/holopad/proc/face_atom(var/atom/A)
|
||||
if( !hologram || !A || !hologram.x || !hologram.y || !A.x || !A.y ) return
|
||||
var/dx = A.x - hologram.x
|
||||
var/dy = A.y - hologram.y
|
||||
if(!dx && !dy) // Wall items are graphically shifted but on the floor
|
||||
if(A.pixel_y > 16) hologram.dir = NORTH
|
||||
else if(A.pixel_y < -16)hologram.dir = SOUTH
|
||||
else if(A.pixel_x > 16) hologram.dir = EAST
|
||||
else if(A.pixel_x < -16)hologram.dir = WEST
|
||||
return
|
||||
|
||||
if(abs(dx) < abs(dy))
|
||||
if(dy > 0) hologram.dir = NORTH
|
||||
else hologram.dir = SOUTH
|
||||
else
|
||||
if(dx > 0) hologram.dir = EAST
|
||||
else hologram.dir = WEST
|
||||
|
||||
/*
|
||||
* Hologram
|
||||
@@ -153,23 +172,17 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
active_power_usage = 100
|
||||
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
|
||||
|
||||
/obj/machinery/hologram/power_change()
|
||||
if (powered())
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
|
||||
//Destruction procs.
|
||||
/obj/machinery/hologram/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
del(src)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/machinery/hologram/blob_act()
|
||||
@@ -180,7 +193,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/machinery/hologram/Destroy()
|
||||
/obj/machinery/hologram/Del()
|
||||
if(hologram)
|
||||
src:clear_holo()
|
||||
..()
|
||||
@@ -213,4 +226,4 @@ Holographic project of everything else.
|
||||
name = "hologram projector"
|
||||
desc = "It makes a hologram appear...with magnets or something..."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "hologram0"
|
||||
icon_state = "hologram0"
|
||||
|
||||
@@ -713,24 +713,19 @@
|
||||
check_level_sanity()
|
||||
update_icon()
|
||||
|
||||
//Check if container is Plant-B-Gone spray (doesn't work with other sprays, may add in future)
|
||||
else if (istype(O, /obj/item/weapon/reagent_containers/spray/plantbgone))
|
||||
//Check if container is any spray container
|
||||
else if (istype(O, /obj/item/weapon/reagent_containers/spray))
|
||||
var/obj/item/weapon/reagent_containers/spray/S = O
|
||||
//Check if there is a plant in the tray
|
||||
if(seed)
|
||||
health -= rand(5,20)
|
||||
|
||||
if(pestlevel > 0)
|
||||
pestlevel -= 2
|
||||
|
||||
if(weedlevel > 0)
|
||||
weedlevel -= 3
|
||||
|
||||
toxins += 4
|
||||
|
||||
check_level_sanity()
|
||||
|
||||
if(!S.reagents.total_volume)
|
||||
user << "\red [S] is empty."
|
||||
return
|
||||
//Container not empty, transfer contents to tray
|
||||
S.reagents.trans_to(src, S.amount_per_transfer_from_this)
|
||||
visible_message("\red <B>\The [src] has been sprayed with \the [O][(user ? " by [user]." : ".")]")
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
check_level_sanity()
|
||||
update_icon()
|
||||
else
|
||||
user << "There's nothing in [src] to spray!"
|
||||
|
||||
@@ -56,8 +56,20 @@
|
||||
|
||||
|
||||
slime
|
||||
process(loc, what)
|
||||
var/mob/living/carbon/slime/S = what
|
||||
var/C = S.cores
|
||||
if(S.stat != DEAD)
|
||||
S.loc = loc
|
||||
S.visible_message("<span class='notice'>[C] crawls free of the processor!</span>")
|
||||
return
|
||||
for(var/i = 1, i <= C, i++)
|
||||
new S.coretype(loc)
|
||||
feedback_add_details("slime_core_harvested","[replacetext(S.colour," ","_")]")
|
||||
..()
|
||||
|
||||
input = /mob/living/carbon/slime
|
||||
output = /obj/item/weapon/reagent_containers/glass/beaker/slime
|
||||
output = null
|
||||
|
||||
monkey
|
||||
process(loc, what)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
iconholder = 1
|
||||
reqpower = 700
|
||||
|
||||
if(/obj/item/weapon/gun/energy/taser)
|
||||
if(/obj/item/weapon/gun/energy/advtaser)
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
eprojectile = projectile
|
||||
iconholder = 1
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
|
||||
B.bcell.charge += 1750
|
||||
icon_state = "recharger1"
|
||||
icon_state = icon_state_charging
|
||||
use_power(2000)
|
||||
else
|
||||
icon_state = icon_state_charged
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
component_parts += new /obj/item/weapon/cell/high(src)
|
||||
RefreshParts()
|
||||
build_icon()
|
||||
|
||||
/obj/machinery/recharge_station/upgraded/New()
|
||||
..()
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
|
||||
component_parts += new /obj/item/weapon/cell/hyper(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/recharge_station/RefreshParts()
|
||||
recharge_speed = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define FONT_SIZE "5pt"
|
||||
#define FONT_SIZE "4pt"
|
||||
#define FONT_COLOR "#09f"
|
||||
#define FONT_STYLE "Arial Black"
|
||||
#define SCROLL_SPEED 2
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/obj/machinery/status_display/supply_display
|
||||
name = "supply status display"
|
||||
ignore_friendc = 1
|
||||
|
||||
/obj/machinery/status_display/supply_display/update()
|
||||
@@ -31,4 +32,4 @@
|
||||
if(signal.data["command"] == "supply")
|
||||
mode = STATUS_DISPLAY_CUSTOM
|
||||
else
|
||||
..(signal)
|
||||
return
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/obj/machinery/telepad
|
||||
name = "telepad"
|
||||
desc = "A bluespace telepad used for teleporting objects to and from a location."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "pad-idle"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 50
|
||||
var/efficiency
|
||||
|
||||
/obj/machinery/telepad/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(src)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(src)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/telepad/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
E += C.rating
|
||||
efficiency = E
|
||||
|
||||
/obj/machinery/telepad/attackby(obj/item/I, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, "pad-idle-o", "pad-idle", I))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = I
|
||||
M.buffer = src
|
||||
user << "<span class='caution'>You save the data in the [I.name]'s buffer.</span>"
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/telepad_cargo
|
||||
name = "cargo telepad"
|
||||
desc = "A telepad used by the Rapid Crate Sender."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "pad-idle"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 50
|
||||
var/stage = 0
|
||||
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(stage == 0)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='caution'>You unscrew the telepad's tracking beacon.</span>"
|
||||
stage = 1
|
||||
else if(stage == 1)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='caution'>You screw in the telepad's tracking beacon.</span>"
|
||||
stage = 0
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && stage == 1)
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
user << "<span class='caution'>You disassemble the telepad.</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
qdel(src)
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Used to control a linked teleportation Hub and Station."
|
||||
icon_state = "teleport"
|
||||
circuit = "/obj/item/weapon/circuitboard/teleporter"
|
||||
var/obj/item/device/sps/locked = null
|
||||
var/obj/item/device/gps/locked = null
|
||||
var/regime_set = "Teleporter"
|
||||
var/id = null
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
@@ -40,16 +40,16 @@
|
||||
user << "\blue The teleporter can now lock on to Syndicate beacons!"
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I, /obj/item/device/sps))
|
||||
var/obj/item/device/sps/L = I
|
||||
else if(istype(I, /obj/item/device/gps))
|
||||
var/obj/item/device/gps/L = I
|
||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||
user.before_take_item(L)
|
||||
L.loc = src
|
||||
locked = L
|
||||
user << "<span class='caution'>You insert the SPS device into the [name]'s slot.</span>"
|
||||
user << "<span class='caution'>You insert the GPS device into the [name]'s slot.</span>"
|
||||
src.attack_hand(user)
|
||||
else
|
||||
user << "<span class='warning'>No useable data was found on te SPS device.</span>"
|
||||
user << "<span class='warning'>No useable data was found on te GPS device.</span>"
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user