mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge remote-tracking branch 'upstream/master' into Health-Analyzer
This commit is contained in:
+2
-2
@@ -216,7 +216,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
|
||||
// for(var/mob/M in hearers(src))
|
||||
// M.show_message("\red <B>[src] slams into [A]!</B>",1,"\red You hear a loud slam!",2)
|
||||
playsound(src.loc, "punch", 25, 1, -1)
|
||||
if (prob(33))
|
||||
/* if (prob(33))
|
||||
loc:add_blood(src)
|
||||
bloody_body(src)
|
||||
var/b_loss = airflow_speed * vsc.airflow_damage
|
||||
@@ -230,7 +230,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
|
||||
blocked = run_armor_check("groin","melee")
|
||||
apply_damage(b_loss/3, BRUTE, "groin", blocked, 0, "Airflow")
|
||||
|
||||
/* if(airflow_speed > 10)
|
||||
if(airflow_speed > 10)
|
||||
Paralyse(round(airflow_speed * vsc.airflow_stun))
|
||||
Stun(paralysis + 3)
|
||||
else
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
name = "Arm Blade"
|
||||
desc = "We reform one of our arms into a deadly blade."
|
||||
helptext = "Cannot be used while in lesser form."
|
||||
chemical_cost = 20
|
||||
chemical_cost = 25
|
||||
dna_cost = 2
|
||||
genetic_damage = 10
|
||||
req_human = 1
|
||||
@@ -294,7 +294,7 @@
|
||||
name = "Chitinous Armor"
|
||||
desc = "We turn our skin into tough chitin to protect us from damage."
|
||||
helptext = "Upkeep of the armor requires a low expenditure of chemicals. The armor is strong against brute force, but does not provide much protection from lasers. Retreating the armor damages our genomes. Cannot be used in lesser form."
|
||||
chemical_cost = 20
|
||||
chemical_cost = 25
|
||||
dna_cost = 2
|
||||
genetic_damage = 11
|
||||
req_human = 1
|
||||
@@ -313,7 +313,7 @@
|
||||
flags = NODROP
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
slowdown = 2
|
||||
armor = list(melee = 65, bullet = 20, laser = 10, energy = 13, bomb = 0, bio = 0, rad = 0)
|
||||
armor = list(melee = 65, bullet = 20, laser = 10, energy = 15, bomb = 0, bio = 0, rad = 0)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
cold_protection = 0
|
||||
heat_protection = 0
|
||||
@@ -331,7 +331,7 @@
|
||||
desc = "A tough, hard covering of black chitin with transparent chitin in front."
|
||||
icon_state = "lingarmorhelmet"
|
||||
flags = HEADCOVERSEYES | BLOCKHAIR | NODROP
|
||||
armor = list(melee = 70, bullet = 15, laser = 7,energy = 10, bomb = 5, bio = 2, rad = 0)
|
||||
armor = list(melee = 65, bullet = 20, laser = 10,energy = 15, bomb = 0, bio = 0, rad = 0)
|
||||
flags_inv = HIDEEARS
|
||||
|
||||
/obj/item/clothing/head/helmet/changeling/dropped()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Resonant Shriek"
|
||||
desc = "Our lungs and vocal chords shift, allowing us to briefly emit a noise that deafens and confuses the weak-minded."
|
||||
helptext = "Emits a high-frequency sound that confuses and deafens humans, blows out nearby lights and overloads cyborg sensors."
|
||||
chemical_cost = 20
|
||||
chemical_cost = 30
|
||||
dna_cost = 1
|
||||
req_human = 1
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/effect/proc_holder/changeling/dissonant_shriek
|
||||
name = "Dissonant Shriek"
|
||||
desc = "We shift our vocal cords to release a high-frequency sound that overloads nearby electronics."
|
||||
chemical_cost = 20
|
||||
chemical_cost = 30
|
||||
dna_cost = 1
|
||||
|
||||
//A flashy ability, good for crowd control and sewing chaos.
|
||||
@@ -40,7 +40,7 @@
|
||||
for(var/obj/machinery/light/L in range(5, usr))
|
||||
L.on = 1
|
||||
L.broken()
|
||||
empulse(get_turf(user), 2, 5, 1)
|
||||
empulse(get_turf(user), 2, 4, 1)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -30,47 +30,6 @@
|
||||
var/obj/O = new path()
|
||||
req_component_names[tname] = O.name
|
||||
|
||||
/obj/machinery/constructable_frame/proc/find_square()
|
||||
// This is fucking stupid but what the hell.
|
||||
|
||||
// This corresponds to indicies from alldirs.
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
var/valid_patterns=list(
|
||||
list(1,3,5), //SW - NORTH,EAST,NORTHEAST
|
||||
list(2,3,7), //NW - SOUTH,EAST,SOUTHEAST
|
||||
list(1,4,6), //SE - NORTH,WEST,NORTHWEST
|
||||
list(2,4,8) //NE - SOUTH,WEST,SOUTHWEST
|
||||
)
|
||||
var/detected_parts[8]
|
||||
var/tally=0
|
||||
var/turf/T
|
||||
var/obj/machinery/constructable_frame/machine_frame/friend
|
||||
for(var/i=1;i<=8;i++)
|
||||
T=get_step(src.loc,alldirs[i])
|
||||
friend = locate() in T
|
||||
if(friend)
|
||||
detected_parts[i]=friend
|
||||
tally++
|
||||
// Need at least 3 connections to make a square
|
||||
if(tally<3)
|
||||
return
|
||||
// Find stuff in the patterns indicated
|
||||
for(var/i=1;i<=4;i++)
|
||||
var/list/scanidxs=valid_patterns[i]
|
||||
var/list/new_connected=list()
|
||||
var/allfound=1
|
||||
for(var/diridx in scanidxs)
|
||||
if(detected_parts[diridx]==null)
|
||||
allfound=0
|
||||
break
|
||||
new_connected.Add(detected_parts[diridx])
|
||||
if(allfound)
|
||||
connected_parts=new_connected
|
||||
pattern_idx=i
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// update description of required components remaining
|
||||
/obj/machinery/constructable_frame/proc/update_req_desc()
|
||||
if(!req_components || !req_component_names)
|
||||
@@ -123,35 +82,7 @@
|
||||
new /obj/structure/displaycase_frame(src.loc)
|
||||
del(src)
|
||||
return
|
||||
else if(istype(P, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R=P
|
||||
if(R.amount<10)
|
||||
user << "\red You need 10 rods to assemble a pod frame."
|
||||
return
|
||||
if(!find_square())
|
||||
user << "\red You cannot assemble a pod frame without a 2x2 square of machine frames."
|
||||
return
|
||||
|
||||
R.use(10)
|
||||
|
||||
for(var/obj/machinery/constructable_frame/machine_frame/F in connected_parts)
|
||||
qdel(F)
|
||||
|
||||
var/turf/T=get_turf(src)
|
||||
// Offset frame (if needed) so it doesn't look wonky when it spawns.
|
||||
switch(pattern_idx)
|
||||
if(2)
|
||||
T=get_step(T,SOUTH)
|
||||
if(3)
|
||||
T=get_step(T,WEST)
|
||||
if(4)
|
||||
T=get_step(T,SOUTHWEST)
|
||||
|
||||
new /obj/structure/spacepod_frame(T)
|
||||
user << "\blue You assemble the pod frame."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'>You dismantle the frame.</span>"
|
||||
@@ -485,6 +416,19 @@ obj/item/weapon/circuitboard/rdserver
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/podfab
|
||||
name = "Circuit board (Spacepod Fabricator)"
|
||||
build_path = "/obj/machinery/spod_part_fabricator" //ah fuck my life
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;engineering=3"
|
||||
frame_desc = "Requires 3 Matter Bins, 2 Manipulators, 2 Micro-Lasers, and 1 Console Screen."
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/clonepod
|
||||
name = "Circuit board (Clone Pod)"
|
||||
build_path = "/obj/machinery/clonepod"
|
||||
|
||||
@@ -1,62 +1,112 @@
|
||||
/obj/item/device/taperecorder
|
||||
desc = "A device that can record up to an hour of dialogue and play it back. It automatically translates the content in playback."
|
||||
name = "universal recorder"
|
||||
icon_state = "taperecorderidle"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
w_class = 1.0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 60
|
||||
g_amt = 30
|
||||
var/emagged = 0.0
|
||||
var/recording = 0.0
|
||||
var/playing = 0.0
|
||||
var/timerecorded = 0.0
|
||||
var/playsleepseconds = 0.0
|
||||
var/list/storedinfo = new/list()
|
||||
var/list/timestamp = new/list()
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/open_panel = 0
|
||||
var/datum/wires/taperecorder/wires = null
|
||||
var/canprint = 1
|
||||
flags = CONDUCT
|
||||
throwforce = 2
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg)
|
||||
if(recording)
|
||||
var/ending = copytext(msg, length(msg))
|
||||
timestamp+= timerecorded
|
||||
if(M.stuttering)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
|
||||
/obj/item/device/taperecorder/New()
|
||||
wires = new(src)
|
||||
mytape = new /obj/item/device/tape/random(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine()
|
||||
set src in view(1)
|
||||
..()
|
||||
usr << "The wire panel is [open_panel ? "opened" : "closed"]."
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
mytape = I
|
||||
user << "<span class='notice'>You insert [I] into [src].</span>"
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
open_panel = !open_panel
|
||||
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
|
||||
if(open_panel)
|
||||
wires.Interact(user)
|
||||
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler))
|
||||
wires.Interact(user)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
user << "<span class='notice'>You remove [mytape] from [src].</span>"
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(user.l_hand != src && user.r_hand != src)
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
if(M.getBrainLoss() >= 60)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
return
|
||||
if(ending == "?")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
return
|
||||
else if(ending == "!")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
return
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
/obj/item/device/taperecorder/emag_act(user as mob)
|
||||
if(emagged == 0)
|
||||
emagged = 1
|
||||
recording = 0
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
user << "<span class='warning'>It is already emagged!</span>"
|
||||
|
||||
/obj/item/device/taperecorder/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M << "<span class='danger'>\The [src] explodes!</span>"
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
explosion(T, -1, -1, 0, 4)
|
||||
del(src)
|
||||
return
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg)
|
||||
if(mytape && recording)
|
||||
var/ending = copytext(msg, length(msg))
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
if(M.stuttering)
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
return
|
||||
if(M.getBrainLoss() >= 60)
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
return
|
||||
if(ending == "?")
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
return
|
||||
else if(ending == "!")
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
return
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
@@ -64,25 +114,35 @@
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
icon_state = "taperecorderrecording"
|
||||
if(timerecorded < 3600 && playing == 0)
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
if(!wires.get_record())
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
usr << "<span class='notice'>Recording started.</span>"
|
||||
recording = 1
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(timerecorded, timerecorded<3600)
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
timerecorded++
|
||||
if(!wires.get_record())
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='notice'>Either your tape recorder's memory is full, or it is currently playing back its memory.</span>"
|
||||
usr << "<span class='notice'>The tape is full.</span>"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
@@ -91,101 +151,76 @@
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
if(recording == 1)
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
usr << "<span class='notice'>Recording stopped.</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else if(playing == 1)
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/clear_memory()
|
||||
set name = "Clear Memory"
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording == 1 || playing == 1)
|
||||
usr << "<span class='notice'>You can't clear the memory while playing or recording!</span>"
|
||||
if(recording)
|
||||
return
|
||||
else
|
||||
if(storedinfo) storedinfo.Cut()
|
||||
if(timestamp) timestamp.Cut()
|
||||
timerecorded = 0
|
||||
usr << "<span class='notice'>Memory cleared.</span>"
|
||||
if(playing)
|
||||
return
|
||||
if(!wires.get_play())
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/playback_memory()
|
||||
set name = "Playback Memory"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
if(recording == 1)
|
||||
usr << "<span class='notice'>You can't playback when recording!</span>"
|
||||
return
|
||||
if(playing == 1)
|
||||
usr << "<span class='notice'>You're already playing!</span>"
|
||||
return
|
||||
playing = 1
|
||||
icon_state = "taperecorderplaying"
|
||||
update_icon()
|
||||
usr << "<span class='notice'>Playing started.</span>"
|
||||
for(var/i=1,timerecorded<3600,sleep(10 * (playsleepseconds) ))
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(!wires.get_play())
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(storedinfo.len < i)
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: [storedinfo[i]]</font>")
|
||||
if(storedinfo.len < i+1)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: [mytape.storedinfo[i]]</font>")
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: End of recording.</font>")
|
||||
else
|
||||
playsleepseconds = timestamp[i+1] - timestamp[i]
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Skipping [playsleepseconds] seconds of silence</font>")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
icon_state = "taperecorderidle"
|
||||
|
||||
playing = 0
|
||||
if(emagged == 1.0)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: This tape recorder will self-destruct in... Five.</font>")
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Four.</font>")
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Three.</font>")
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Two.</font>")
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: One.</font>")
|
||||
sleep(10)
|
||||
explode()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
@@ -194,68 +229,74 @@
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
usr << "<span class='notice'>The recorder can't print that fast!</span>"
|
||||
return
|
||||
if(recording == 1 || playing == 1)
|
||||
usr << "<span class='notice'>You can't print the transcript while playing or recording!</span>"
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
usr << "<span class='notice'>Transcript printed.</span>"
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i=1,storedinfo.len >= i,i++)
|
||||
t1 += "[storedinfo[i]]<BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(recording == 0 && playing == 0)
|
||||
if(usr.stat)
|
||||
return
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
icon_state = "taperecorderrecording"
|
||||
if(timerecorded < 3600 && playing == 0)
|
||||
usr << "\blue Recording started."
|
||||
recording = 1
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(timerecorded, timerecorded<3600)
|
||||
if(recording == 0)
|
||||
break
|
||||
timerecorded++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Either your tape recorder's memory is full, or it is currently playing back its memory."
|
||||
else
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapacitated."
|
||||
return
|
||||
if(recording == 1)
|
||||
recording = 0
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
usr << "\blue Recording stopped."
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else if(playing == 1)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>",2)
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Stop what?"
|
||||
return
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty/New()
|
||||
wires = new(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
w_class = 1
|
||||
m_amt = 20
|
||||
g_amt = 5
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
user << "<span class='notice'>You pull out all the tape!</span>"
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
overlays += "ribbonoverlay"
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
overlays -= "ribbonoverlay"
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user)
|
||||
if(ruined && istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You start winding the tape back in.</span>"
|
||||
if(do_after(user, 120))
|
||||
user << "<span class='notice'>You wound the tape back in!</span>"
|
||||
fix()
|
||||
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
@@ -102,6 +102,7 @@
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/pod_parts/core,
|
||||
,
|
||||
"vis_msg" = "{USER} inserts the core into the {HOLDER}.",
|
||||
"self_msg" = "You carefully insert the core into the {HOLDER}.",
|
||||
"delete" = 1
|
||||
@@ -179,10 +180,10 @@
|
||||
"self_msg" = "You cut the {HOLDER}'s bulkhead panelling loose."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
"vis_msg" = "{USER} installs the {HOLDER}'s plasteel armor.",
|
||||
"self_msg" = "You install the {HOLDER}'s plasteel armor."
|
||||
"key" = /obj/item/pod_parts/armor,
|
||||
"vis_msg" = "{USER} installs the {HOLDER}'s armor plating.",
|
||||
"self_msg" = "You install the {HOLDER}'s armor plating.",
|
||||
"delete" = 1
|
||||
)
|
||||
),
|
||||
// 11. Loose armor
|
||||
@@ -191,7 +192,9 @@
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"vis_msg" = "{USER} pries off {HOLDER}'s armor.",
|
||||
"self_msg" = "You pry off {HOLDER}'s armor."
|
||||
"self_msg" = "You pry off {HOLDER}'s armor.",
|
||||
"spawn" = /obj/item/pod_parts/armor,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
|
||||
@@ -1,10 +1,126 @@
|
||||
/obj/item/pod_parts
|
||||
parent_type = /obj/item/mecha_parts
|
||||
icon = 'icons/pods/equipment.dmi'
|
||||
icon = 'icons/pods/pod_parts.dmi'
|
||||
|
||||
/obj/item/pod_parts/core
|
||||
name="Space Pod Core"
|
||||
icon_state = "core"
|
||||
construction_cost = list("iron"=5000,"uranium"=1000,"plasma"=5000)
|
||||
flags = CONDUCT
|
||||
origin_tech = "programming=2;materials=3;bluespace=2;engineering=3"
|
||||
origin_tech = "programming=2;materials=3;bluespace=2;engineering=3"
|
||||
|
||||
/obj/item/pod_parts/pod_frame
|
||||
name = "Space Pod Frame"
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
density = 0
|
||||
anchored = 0
|
||||
var/link_to = null
|
||||
var/link_angle = 0
|
||||
|
||||
/obj/item/pod_parts/pod_frame/proc/find_square()
|
||||
/*
|
||||
each part, in essence, stores the relative position of another part
|
||||
you can find where this part should be by looking at the current direction of the current part and applying the link_angle
|
||||
the link_angle is the angle between the part's direction and its following part, which is the current part's link_to
|
||||
the code works by going in a loop - each part is capable of starting a loop by checking for the part after it, and that part checking, and so on
|
||||
this 4-part loop, starting from any part of the frame, can determine if all the parts are properly in place and aligned
|
||||
it also checks that each part is unique, and that all the parts are there for the spacepod itself
|
||||
*/
|
||||
var/neededparts = list(/obj/item/pod_parts/pod_frame/aft_port, /obj/item/pod_parts/pod_frame/aft_starboard, /obj/item/pod_parts/pod_frame/fore_port, /obj/item/pod_parts/pod_frame/fore_starboard)
|
||||
var/turf/T
|
||||
var/obj/item/pod_parts/pod_frame/linked
|
||||
var/obj/item/pod_parts/pod_frame/pointer
|
||||
var/connectedparts = list()
|
||||
neededparts -= src
|
||||
//log_admin("Starting with [src]")
|
||||
linked = src
|
||||
for(var/i = 1; i <= 4; i++)
|
||||
T = get_turf(get_step(linked, turn(linked.dir, -linked.link_angle))) //get the next place that we want to look at
|
||||
if(locate(linked.link_to) in T)
|
||||
pointer = locate(linked.link_to) in T
|
||||
//log_admin("Looking at [pointer.type]")
|
||||
if(istype(pointer, linked.link_to) && pointer.dir == linked.dir && pointer.anchored)
|
||||
if(!(pointer in connectedparts))
|
||||
connectedparts += pointer
|
||||
linked = pointer
|
||||
pointer = null
|
||||
//log_admin("Parts left: [neededparts.len]") //len not working
|
||||
for(var/i = 1; i <=4; i++)
|
||||
var/obj/item/pod_parts/pod_frame/F = connectedparts[i]
|
||||
if(F.type in neededparts) //if one of the items can be founded in neededparts
|
||||
neededparts -= F.type
|
||||
log_admin("Found [F.type]")
|
||||
else //because neededparts has 4 distinct items, this must be called if theyre not all in place and wrenched
|
||||
return 0
|
||||
return connectedparts
|
||||
|
||||
/obj/item/pod_parts/pod_frame/attackby(var/obj/O, mob/user)
|
||||
if(istype(O, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = O
|
||||
var/list/linkedparts = find_square()
|
||||
if(!linkedparts)
|
||||
user << "<span class='rose'>You cannot assemble a pod frame because you do not have the necessary assembly.</span>"
|
||||
return
|
||||
var/obj/structure/spacepod_frame/pod = new /obj/structure/spacepod_frame(src.loc)
|
||||
pod.dir = src.dir
|
||||
user << "<span class='notice'>You strut the pod frame together.</span>"
|
||||
R.use(10)
|
||||
for(var/obj/item/pod_parts/pod_frame/F in linkedparts)
|
||||
if(1 == turn(F.dir, -F.link_angle)) //if the part links north during construction, as the bottom left part always does
|
||||
//log_admin("Repositioning")
|
||||
pod.loc = F.loc
|
||||
qdel(F)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You [!anchored ? "secure \the [src] in place." : "remove the securing bolts."]</span>"
|
||||
anchored = !anchored
|
||||
density = anchored
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
/obj/item/pod_parts/pod_frame/verb/rotate()
|
||||
set name = "Rotate Frame"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(anchored)
|
||||
usr << "\The [src] is securely bolted!"
|
||||
return 0
|
||||
src.dir = turn(src.dir, -90)
|
||||
return 1
|
||||
|
||||
/obj/item/pod_parts/pod_frame/attack_hand()
|
||||
src.rotate()
|
||||
|
||||
/obj/item/pod_parts/pod_frame/fore_port
|
||||
name = "fore port pod frame"
|
||||
icon_state = "pod_fp"
|
||||
desc = "A space pod frame component. This is the fore port component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/fore_starboard
|
||||
link_angle = 90
|
||||
|
||||
/obj/item/pod_parts/pod_frame/fore_starboard
|
||||
name = "fore starboard pod frame"
|
||||
icon_state = "pod_fs"
|
||||
desc = "A space pod frame component. This is the fore starboard component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/aft_starboard
|
||||
link_angle = 180
|
||||
|
||||
/obj/item/pod_parts/pod_frame/aft_port
|
||||
name = "aft port pod frame"
|
||||
icon_state = "pod_ap"
|
||||
desc = "A space pod frame component. This is the aft port component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/fore_port
|
||||
link_angle = 0
|
||||
|
||||
/obj/item/pod_parts/pod_frame/aft_starboard
|
||||
name = "aft starboard pod frame"
|
||||
icon_state = "pod_as"
|
||||
desc = "A space pod frame component. This is the aft starboard component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/aft_port
|
||||
link_angle = 270
|
||||
|
||||
/obj/item/pod_parts/armor
|
||||
name = "civilian pod armor"
|
||||
icon = 'icons/pods/pod_parts.dmi'
|
||||
icon_state = "pod_armor_civ"
|
||||
desc = "Spacepod armor. This is the civilian version. It looks rather flimsy."
|
||||
@@ -0,0 +1,576 @@
|
||||
/obj/machinery/spod_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
name = "spacepod fabricator"
|
||||
desc = "Nothing is being built."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
req_access = list(access_robotics)
|
||||
var/time_coeff = 1
|
||||
var/resource_coeff = 1
|
||||
var/time_coeff_tech = 1
|
||||
var/resource_coeff_tech = 1
|
||||
var/list/resources = list(
|
||||
"$metal"=0,
|
||||
"$glass"=0,
|
||||
"$bananium"=0,
|
||||
"$diamond"=0,
|
||||
"$gold"=0,
|
||||
"$plasma"=0,
|
||||
"$silver"=0,
|
||||
"$uranium"=0
|
||||
)
|
||||
var/res_max_amount = 200000
|
||||
var/datum/research/files
|
||||
var/id
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list(
|
||||
"Pod_Weaponry",
|
||||
"Pod_Armor",
|
||||
"Pod_Parts",
|
||||
"Pod_Frame",
|
||||
"Misc",
|
||||
)
|
||||
var/turf/exit
|
||||
|
||||
/obj/machinery/spod_part_fabricator/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(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/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
files = new /datum/research(src) //Setup the research data holder.
|
||||
for(var/direction in cardinal)
|
||||
exit = get_step(src,direction)
|
||||
if(!exit.density)
|
||||
break
|
||||
exit = loc
|
||||
|
||||
/obj/machinery/spod_part_fabricator/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/spod_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
//maximum stocking amount (max 412000)
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
res_max_amount = (187000+(T * 37500))
|
||||
|
||||
//ressources adjustment coefficient (1 -> 0.88 -> 0.75)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts)
|
||||
T += Ma.rating
|
||||
resource_coeff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/8,0.01)
|
||||
|
||||
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/check_access(obj/item/weapon/card/id/I)
|
||||
if(istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if(!istype(I) || !I.access) //not ID or no access
|
||||
return 0
|
||||
for(var/req in req_access)
|
||||
if(!(req in I.access)) //doesn't have this access
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/emag()
|
||||
switch(emagged)
|
||||
if(0)
|
||||
emagged = 0.5
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
|
||||
sleep(10)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"Attempting auto-repair\"")
|
||||
sleep(15)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
|
||||
sleep(30)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
|
||||
req_access = null
|
||||
emagged = 1
|
||||
if(0.5)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
|
||||
if(1)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"No records in User DB\"")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
var/resources_available = check_resources(D)
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\[[resources_available?"<a href='?src=\ref[src];part=[D.id]'>Build</a> | ":null]<a href='?src=\ref[src];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=\ref[src];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10] seconds"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
if(c in resources)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D,c)] [material2name(c)]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
for(var/resource in resources)
|
||||
var/amount = min(res_max_amount, resources[resource])
|
||||
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm³"
|
||||
if(amount>0)
|
||||
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_resources(datum/design/D)
|
||||
for(var/resource in D.materials)
|
||||
if(resource in resources)
|
||||
resources[resource] -= get_resource_cost_w_coeff(D,resource)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/check_resources(datum/design/D)
|
||||
for(var/R in D.materials)
|
||||
if(R in resources)
|
||||
if(resources[R] < get_resource_cost_w_coeff(D, R))
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/build_part(datum/design/D)
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(D.name)]."
|
||||
remove_resources(D)
|
||||
overlays += "fab-active"
|
||||
use_power = 2
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = 1
|
||||
overlays -= "fab-active"
|
||||
desc = initial(desc)
|
||||
|
||||
var/obj/item/I = new D.build_path
|
||||
var/O = D.locked
|
||||
if(O)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(exit)
|
||||
I.loc = L
|
||||
L.name += " ([I.name])"
|
||||
else
|
||||
I.loc = exit
|
||||
I.m_amt = get_resource_cost_w_coeff(D,"$metal")
|
||||
I.g_amt = get_resource_cost_w_coeff(D,"$glass")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"\The [I] is complete.\"")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(set_name in D.category)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_from_queue(index)
|
||||
if(!isnum(index) || !istype(queue) || (index<1 || index>queue.len))
|
||||
return 0
|
||||
queue.Cut(index,++index)
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/process_queue()
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!check_resources(D))
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing stopped.\"")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=\ref[src];process_queue=1'>Try again</a> | <a href='?src=\ref[src];clear_temp=1'>Return</a><a>"}
|
||||
return 0
|
||||
remove_from_queue(1)
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
if(!istype(queue) || !queue.len)
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>[initial(part.name)] - [i>1?"<a href='?src=\ref[src];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] [i<queue.len?"<a href='?src=\ref[src];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] <a href='?src=\ref[src];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=\ref[src];process_queue=1'>Process queue</a> | <a href='?src=\ref[src];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_tech()
|
||||
if(!files)
|
||||
return
|
||||
var/output
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
if(T && T.level > 1)
|
||||
var/diff
|
||||
switch(T.id)
|
||||
if("materials")
|
||||
//one materials level is 1/32, so that max level is 0.75 coefficient
|
||||
diff = round(initial(resource_coeff_tech) - (initial(resource_coeff_tech)*(T.level-1))/32,0.01)
|
||||
if(resource_coeff_tech>diff)
|
||||
resource_coeff_tech = diff
|
||||
output+="Production efficiency increased.<br>"
|
||||
if("programming")
|
||||
//one materials level is 1/40, so that max level is 0.8 coefficient
|
||||
diff = round(initial(time_coeff_tech) - (initial(time_coeff_tech)*(T.level-1))/40,0.1)
|
||||
if(time_coeff_tech>diff)
|
||||
time_coeff_tech = diff
|
||||
output+="Production routines updated.<br>"
|
||||
return output
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in area_contents(get_area(src)))
|
||||
if(!RDC.sync)
|
||||
continue
|
||||
for(var/datum/tech/T in RDC.files.known_tech)
|
||||
files.AddTech2Known(T)
|
||||
for(var/datum/design/D in RDC.files.known_designs)
|
||||
files.AddDesign2Known(D)
|
||||
files.RefreshResearch()
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//check if the tech coefficients have changed
|
||||
temp += update_tech()
|
||||
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Successfully synchronized with R&D server.\"")
|
||||
return
|
||||
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attack_hand(mob/user)
|
||||
if(!(..()))
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/interact(mob/user as mob)
|
||||
var/dat, left_part
|
||||
if (..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(exit.density)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Error! Part outlet is obstructed.\"")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
if("main")
|
||||
left_part = output_available_resources()+"<hr>"
|
||||
left_part += "<a href='?src=\ref[src];sync=1'>Sync with R&D servers</a><hr>"
|
||||
for(var/part_set in part_sets)
|
||||
left_part += "<a href='?src=\ref[src];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=\ref[src];partset_to_queue=[part_set]'>Add all parts to queue</a>\]<br>"
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=\ref[src];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
.part {margin-bottom: 10px;}
|
||||
.arrow {text-decoration: none; font-size: 10px;}
|
||||
body, table {height: 100%;}
|
||||
td {vertical-align: top; padding: 5px;}
|
||||
html, body {padding: 0px; margin: 0px;}
|
||||
h1 {font-size: 18px; margin: 5px 0px;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
</head><body>
|
||||
<body>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #ccc;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=mecha_fabricator;size=1000x430")
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = filter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
else
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = filter.getStr("part")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = filter.getStr("add_to_queue")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
add_to_queue(D)
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(filter.getNum("remove_from_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(filter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(-1)
|
||||
if(processing_queue || being_built)
|
||||
return 0
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = filter.getNum("index")
|
||||
var/new_index = index + filter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index))
|
||||
if(IsInRange(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = filter.getStr("part_desc")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=\ref[src];clear_temp=1'>Return</a>
|
||||
"}
|
||||
break
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/amount = text2num(href_list["remove_mat"])
|
||||
var/material = href_list["material"]
|
||||
if(amount < 0 || amount > resources[material]) //href protection
|
||||
return
|
||||
|
||||
var/removed = remove_material(material,amount)
|
||||
if(removed == -1)
|
||||
temp = "Not enough [material2name(material)] to produce a sheet."
|
||||
else
|
||||
temp = "Ejected [removed] of [material2name(material)]"
|
||||
temp += "<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_material(var/mat_string, var/amount)
|
||||
if(resources[mat_string] < MINERAL_MATERIAL_AMOUNT) //not enough mineral for a sheet
|
||||
return -1
|
||||
var/type
|
||||
switch(mat_string)
|
||||
if("$metal")
|
||||
type = /obj/item/stack/sheet/metal
|
||||
if("$glass")
|
||||
type = /obj/item/stack/sheet/glass
|
||||
if("$gold")
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
if("$silver")
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
if("$diamond")
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
if("$plasma")
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
if("$uranium")
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
if("$bananium")
|
||||
type = /obj/item/stack/sheet/mineral/clown
|
||||
else
|
||||
return 0
|
||||
var/result = 0
|
||||
|
||||
while(amount > 50)
|
||||
new type(get_turf(src),50)
|
||||
amount -= 50
|
||||
result += 50
|
||||
resources[mat_string] -= 50 * MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
var/total_amount = round(resources[mat_string]/MINERAL_MATERIAL_AMOUNT)
|
||||
if(total_amount)//if there's still enough material for sheets
|
||||
var/obj/item/stack/sheet/res = new type(get_turf(src),min(amount,total_amount))
|
||||
resources[mat_string] -= res.amount*MINERAL_MATERIAL_AMOUNT
|
||||
result += res.amount
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attackby(obj/W as obj, mob/user as mob, params)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
for(var/material in resources)
|
||||
remove_material(material, resources[material]/MINERAL_MATERIAL_AMOUNT)
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
else
|
||||
user << "<span class='danger'>You can't load \the [name] while it's opened.</span>"
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = "$gold"
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = "$silver"
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = "$diamond"
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = "$plasma"
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = "$metal"
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = "$glass"
|
||||
if(/obj/item/stack/sheet/mineral/clown)
|
||||
material = "$bananium"
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = "$uranium"
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(being_built)
|
||||
user << "\The [src] is currently processing. Please wait until completion."
|
||||
return
|
||||
if(res_max_amount - resources[material] < MINERAL_MATERIAL_AMOUNT) //overstuffing the fabricator
|
||||
user << "\The [src] [material2name(material)] storage is full."
|
||||
return
|
||||
var/obj/item/stack/sheet/stack = W
|
||||
var/sname = "[stack.name]"
|
||||
if(resources[material] < res_max_amount)
|
||||
overlays += "fab-load-[material2name(material)]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
|
||||
|
||||
var/transfer_amount = min(stack.amount, round((res_max_amount - resources[material])/MINERAL_MATERIAL_AMOUNT,1))
|
||||
resources[material] += transfer_amount * MINERAL_MATERIAL_AMOUNT
|
||||
stack.use(transfer_amount)
|
||||
user << "You insert [transfer_amount] [sname] sheet\s into \the [src]."
|
||||
sleep(10)
|
||||
updateUsrDialog()
|
||||
overlays -= "fab-load-[material2name(material)]" //No matter what the overlay shall still be deleted
|
||||
else
|
||||
user << "\The [src] cannot hold any more [sname] sheet\s."
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/emag_act(user as mob)
|
||||
emag()
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/material2name(var/ID)
|
||||
return copytext(ID,2)
|
||||
@@ -167,7 +167,7 @@
|
||||
name = "security hailer"
|
||||
desc = "A set of recognizable pre-recorded messages for cyborgs to use when apprehending criminals."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "taperecorderidle"
|
||||
icon_state = "taperecorder_idle"
|
||||
aggressiveness = 1 //Borgs are nicecurity!
|
||||
ignore_maskadjust = 1
|
||||
|
||||
|
||||
@@ -173,6 +173,43 @@
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/adminbooze
|
||||
name = "Admin Booze"
|
||||
desc = "Bottled Griffon tears. Drink with caution."
|
||||
icon_state = "adminbooze"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("admorinazine", 5)
|
||||
reagents.add_reagent("capsaicin", 5)
|
||||
reagents.add_reagent("hyperzine", 20)
|
||||
reagents.add_reagent("thirteenloko", 20)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/madminmalt
|
||||
name = "Madmin Malt"
|
||||
desc = "Bottled essence of angry admins. Drink with <i>EXTREME</i> caution."
|
||||
icon_state = "madminmalt"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("hellwater", 20)
|
||||
reagents.add_reagent("neurotoxin", 15)
|
||||
reagents.add_reagent("thirteenloko", 15)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/badminbrew
|
||||
name = "Badmin Brew"
|
||||
desc = "Bottled trickery and terrible admin work. Probably shouldn't drink this one at all."
|
||||
icon_state = "badminbrew"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("mutagen", 25)
|
||||
reagents.add_reagent("anti_toxin", 10)
|
||||
reagents.add_reagent("thirteenloko", 15)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/ale
|
||||
name = "Magm-Ale"
|
||||
desc = "A true dorf's drink of choice."
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
materials = list("$metal" = 30, "$glass" = 20)
|
||||
build_path = /obj/item/device/analyzer
|
||||
category = list("initial","Tools")
|
||||
|
||||
|
||||
/datum/design/bucket
|
||||
name = "Bucket"
|
||||
id = "bucket"
|
||||
@@ -25,7 +25,7 @@
|
||||
materials = list("$metal" = 50)
|
||||
build_path = /obj/item/weapon/crowbar
|
||||
category = list("initial","Tools")
|
||||
|
||||
|
||||
/datum/design/extinguisher
|
||||
name = "Fire Extinguisher"
|
||||
id = "extinguisher"
|
||||
@@ -49,7 +49,7 @@
|
||||
materials = list("$metal" = 50, "$glass" = 20)
|
||||
build_path = /obj/item/device/multitool
|
||||
category = list("initial","Tools")
|
||||
|
||||
|
||||
/datum/design/screwdriver
|
||||
name = "Screwdriver"
|
||||
id = "screwdriver"
|
||||
@@ -72,8 +72,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 1750, "$glass" = 400)
|
||||
build_path = /obj/item/clothing/head/welding
|
||||
category = list("initial","Tools")
|
||||
|
||||
category = list("initial","Tools")
|
||||
|
||||
/datum/design/weldingtool
|
||||
name = "Welding Tool"
|
||||
id = "welding_tool"
|
||||
@@ -104,16 +104,16 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = /obj/item/weapon/airalarm_electronics
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/airlock_board
|
||||
name = "Airlock Electronics"
|
||||
id = "airlock_board"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = /obj/item/weapon/airlock_electronics
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/console_screen
|
||||
name = "Console Screen"
|
||||
id = "console_screen"
|
||||
@@ -128,7 +128,7 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = /obj/item/weapon/firealarm_electronics
|
||||
category = list("initial", "Electronics")
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/igniter
|
||||
name = "Igniter"
|
||||
@@ -137,7 +137,7 @@
|
||||
materials = list("$metal" = 500, "$glass" = 50)
|
||||
build_path = /obj/item/device/assembly/igniter
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
|
||||
/datum/design/infrared_emitter
|
||||
name = "Infrared Emitter"
|
||||
id = "infrared_emitter"
|
||||
@@ -145,15 +145,15 @@
|
||||
materials = list("$metal" = 1000, "$glass" = 500)
|
||||
build_path = /obj/item/device/assembly/infra
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
|
||||
/datum/design/kitchen_knife
|
||||
name = "Kitchen knife"
|
||||
id = "kitchen_knife"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 12000)
|
||||
build_path = /obj/item/weapon/kitchenknife
|
||||
category = list("initial","Miscellaneous")
|
||||
|
||||
category = list("initial","Miscellaneous")
|
||||
|
||||
/datum/design/pipe_painter
|
||||
name = "Pipe Painter"
|
||||
id = "pipe_painter"
|
||||
@@ -161,15 +161,15 @@
|
||||
materials = list("$metal" = 5000, "$glass" = 2000)
|
||||
build_path = /obj/item/device/pipe_painter
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
|
||||
/datum/design/prox_sensor
|
||||
name = "Proximity Sensor"
|
||||
id = "prox_sensor"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 800, "$glass" = 200)
|
||||
build_path = /obj/item/device/assembly/prox_sensor
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/timer
|
||||
name = "Timer"
|
||||
id = "timer"
|
||||
@@ -183,9 +183,17 @@
|
||||
id = "recorder"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 60, "$glass" = 30)
|
||||
build_path = /obj/item/device/taperecorder
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
build_path = /obj/item/device/taperecorder/empty
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/tape
|
||||
name = "Tape"
|
||||
id = "tape"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 20, "$glass" = 5)
|
||||
build_path = /obj/item/device/tape/random
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/voice_analyser
|
||||
name = "Voice Analyser"
|
||||
id = "voice_analyser"
|
||||
@@ -200,8 +208,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 400, "$glass" = 250)
|
||||
build_path = /obj/item/weapon/camera_assembly
|
||||
category = list("initial", "Construction")
|
||||
|
||||
category = list("initial", "Construction")
|
||||
|
||||
/datum/design/glass
|
||||
name = "Glass"
|
||||
id = "glass"
|
||||
@@ -216,16 +224,16 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 60, "$glass" = 100)
|
||||
build_path = /obj/item/weapon/light/bulb
|
||||
category = list("initial", "Construction")
|
||||
|
||||
category = list("initial", "Construction")
|
||||
|
||||
/datum/design/light_tube
|
||||
name = "Light Tube"
|
||||
id = "light_tube"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 60, "$glass" = 100)
|
||||
build_path = /obj/item/weapon/light/tube
|
||||
category = list("initial", "Construction")
|
||||
|
||||
category = list("initial", "Construction")
|
||||
|
||||
/datum/design/metal
|
||||
name = "Metal"
|
||||
id = "metal"
|
||||
@@ -233,7 +241,7 @@
|
||||
materials = list("$metal" = 3750)
|
||||
build_path = /obj/item/stack/sheet/metal
|
||||
category = list("initial","Construction")
|
||||
|
||||
|
||||
/datum/design/newscaster_frame
|
||||
name = "Newscaster Frame"
|
||||
id = "newscaster_frame"
|
||||
@@ -248,8 +256,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 16000, "$glass"=8000)
|
||||
build_path = /obj/item/weapon/rcd_ammo
|
||||
category = list("initial","Construction")
|
||||
|
||||
category = list("initial","Construction")
|
||||
|
||||
/datum/design/rglass
|
||||
name = "Reinforced Glass"
|
||||
id = "rglass"
|
||||
@@ -265,7 +273,7 @@
|
||||
materials = list("$metal" = 1875)
|
||||
build_path = /obj/item/stack/rods
|
||||
category = list("initial","Construction")
|
||||
|
||||
|
||||
/datum/design/beaker
|
||||
name = "Beaker"
|
||||
id = "beaker"
|
||||
@@ -280,16 +288,16 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 2500, "$glass" = 750)
|
||||
build_path = /obj/item/weapon/cautery
|
||||
category = list("initial", "Medical")
|
||||
|
||||
category = list("initial", "Medical")
|
||||
|
||||
/datum/design/circular_saw
|
||||
name = "Circular Saw"
|
||||
id = "circular_saw"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 10000, "$glass" = 6000)
|
||||
build_path = /obj/item/weapon/circular_saw
|
||||
category = list("initial", "Medical")
|
||||
|
||||
category = list("initial", "Medical")
|
||||
|
||||
/datum/design/hemostat
|
||||
name = "Hemostat"
|
||||
id = "hemostat"
|
||||
@@ -297,7 +305,7 @@
|
||||
materials = list("$metal" = 5000, "$glass" = 2500)
|
||||
build_path = /obj/item/weapon/hemostat
|
||||
category = list("initial", "Medical")
|
||||
|
||||
|
||||
/datum/design/large_beaker
|
||||
name = "Large Beaker"
|
||||
id = "large_beaker"
|
||||
@@ -313,7 +321,7 @@
|
||||
materials = list("$metal" = 6000, "$glass" = 3000)
|
||||
build_path = /obj/item/weapon/retractor
|
||||
category = list("initial", "Medical")
|
||||
|
||||
|
||||
/datum/design/scalpel
|
||||
name = "Scalpel"
|
||||
id = "scalpel"
|
||||
@@ -329,7 +337,7 @@
|
||||
materials = list("$metal" = 10000, "$glass" = 6000)
|
||||
build_path = /obj/item/weapon/surgicaldrill
|
||||
category = list("initial", "Medical")
|
||||
|
||||
|
||||
/datum/design/syringe
|
||||
name = "Syringe"
|
||||
id = "syringe"
|
||||
@@ -360,8 +368,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 75)
|
||||
build_path = /obj/item/device/radio/headset
|
||||
category = list("initial", "Communication")
|
||||
|
||||
category = list("initial", "Communication")
|
||||
|
||||
/datum/design/signaler
|
||||
name = "Remote Signaling Device"
|
||||
id = "signaler"
|
||||
@@ -401,8 +409,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 30000)
|
||||
build_path = /obj/item/ammo_box/c9mm
|
||||
category = list("hacked", "Security")
|
||||
|
||||
category = list("hacked", "Security")
|
||||
|
||||
/datum/design/c10mm
|
||||
name = "Ammo Box (10mm)"
|
||||
id = "c10mm"
|
||||
@@ -410,7 +418,7 @@
|
||||
materials = list("$metal" = 30000)
|
||||
build_path = /obj/item/ammo_box/c10mm
|
||||
category = list("hacked", "Security")
|
||||
|
||||
|
||||
/datum/design/buckshot_shell
|
||||
name = "Buckshot Shell"
|
||||
id = "buckshot_shell"
|
||||
@@ -418,7 +426,7 @@
|
||||
materials = list("$metal" = 4000)
|
||||
build_path = /obj/item/ammo_casing/shotgun/buckshot
|
||||
category = list("hacked", "Security")
|
||||
|
||||
|
||||
/datum/design/electropack
|
||||
name = "Electropack"
|
||||
id = "electropack"
|
||||
@@ -426,7 +434,7 @@
|
||||
materials = list("$metal" = 10000, "$glass" = 2500)
|
||||
build_path = /obj/item/device/radio/electropack
|
||||
category = list("hacked", "Tools")
|
||||
|
||||
|
||||
/datum/design/flamethrower
|
||||
name = "Flamethrower"
|
||||
id = "flamethrower"
|
||||
@@ -434,7 +442,7 @@
|
||||
materials = list("$metal" = 500)
|
||||
build_path = /obj/item/weapon/flamethrower/full
|
||||
category = list("hacked", "Security")
|
||||
|
||||
|
||||
/datum/design/handcuffs
|
||||
name = "Handcuffs"
|
||||
id = "handcuffs"
|
||||
@@ -442,7 +450,7 @@
|
||||
materials = list("$metal" = 500)
|
||||
build_path = /obj/item/weapon/restraints/handcuffs
|
||||
category = list("hacked", "Security")
|
||||
|
||||
|
||||
/datum/design/incendiary_slug
|
||||
name = "Incendiary Slug"
|
||||
id = "incendiary_slug"
|
||||
@@ -457,8 +465,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 70, "$glass" = 60)
|
||||
build_path = /obj/item/weapon/weldingtool/largetank
|
||||
category = list("hacked", "Tools")
|
||||
|
||||
category = list("hacked", "Tools")
|
||||
|
||||
/datum/design/rcd
|
||||
name = "Rapid Construction Device (RCD)"
|
||||
id = "rcd"
|
||||
@@ -473,8 +481,8 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 4000)
|
||||
build_path = /obj/item/ammo_casing/shotgun/dart
|
||||
category = list("hacked", "Security")
|
||||
|
||||
category = list("hacked", "Security")
|
||||
|
||||
/datum/design/shotgun_slug
|
||||
name = "Shotgun Slug"
|
||||
id = "shotgun_slug"
|
||||
@@ -482,4 +490,3 @@
|
||||
materials = list("$metal" = 4000)
|
||||
build_path = /obj/item/ammo_casing/shotgun
|
||||
category = list("hacked", "Security")
|
||||
|
||||
@@ -166,14 +166,3 @@
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/mecha/honker/targeting
|
||||
category = list("Exosuit Modules")
|
||||
|
||||
// Space pod
|
||||
/datum/design/spacepod_main
|
||||
name = "Exosuit Board (Space Pod Mainboard)"
|
||||
desc = "Allows for the construction of a Space Pod mainboard."
|
||||
id = "spacepod_main"
|
||||
req_tech = list("programming" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/mecha/pod
|
||||
category = list("Exosuit Modules")
|
||||
@@ -7,7 +7,7 @@
|
||||
desc = "A basic power cell that holds 1000 units of energy"
|
||||
id = "basic_cell"
|
||||
req_tech = list("powerstorage" = 1)
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB
|
||||
materials = list("$metal" = 700, "$glass" = 50)
|
||||
construction_time=100
|
||||
build_path = /obj/item/weapon/stock_parts/cell
|
||||
@@ -18,7 +18,7 @@
|
||||
desc = "A power cell that holds 10000 units of energy"
|
||||
id = "high_cell"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB
|
||||
materials = list("$metal" = 700, "$glass" = 60)
|
||||
construction_time=100
|
||||
build_path = /obj/item/weapon/stock_parts/cell/high
|
||||
@@ -30,7 +30,7 @@
|
||||
id = "hyper_cell"
|
||||
req_tech = list("powerstorage" = 5, "materials" = 4)
|
||||
reliability_base = 70
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
build_type = PROTOLATHE | MECHFAB | PODFAB
|
||||
materials = list("$metal" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70)
|
||||
construction_time=100
|
||||
build_path = /obj/item/weapon/stock_parts/cell/hyper
|
||||
@@ -42,7 +42,7 @@
|
||||
id = "super_cell"
|
||||
req_tech = list("powerstorage" = 3, "materials" = 2)
|
||||
reliability_base = 75
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
build_type = PROTOLATHE | MECHFAB | PODFAB
|
||||
materials = list("$metal" = 700, "$glass" = 70)
|
||||
construction_time=100
|
||||
build_path = /obj/item/weapon/stock_parts/cell/super
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/datum/design/spacepod_main
|
||||
construction_time = 100
|
||||
name = "Circuit Design (Space Pod Mainboard)"
|
||||
desc = "Allows for the construction of a Space Pod mainboard."
|
||||
id = "spacepod_main"
|
||||
req_tech = list("materials" = 1) //All parts required to build a basic pod have materials 1, so the mechanic can do his damn job.
|
||||
build_type = PODFAB
|
||||
materials = list("$metal"=5000)
|
||||
build_path = /obj/item/weapon/circuitboard/mecha/pod
|
||||
category = list("Pod_Parts")
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/////////SPACEPOD PARTS///////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
/datum/design/podframe_fp
|
||||
construction_time = 200
|
||||
name = "Fore port pod frame"
|
||||
desc = "Allows for the construction of spacepod frames. This is the fore port component."
|
||||
id = "podframefp"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/pod_frame/fore_port
|
||||
category = list("Pod_Frame")
|
||||
materials = list("$metal"=15000,"$glass"=5000)
|
||||
|
||||
/datum/design/podframe_ap
|
||||
construction_time = 200
|
||||
name = "Aft port pod frame"
|
||||
desc = "Allows for the construction of spacepod frames. This is the aft port component."
|
||||
id = "podframeap"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/pod_frame/aft_port
|
||||
category = list("Pod_Frame")
|
||||
materials = list("$metal"=15000,"$glass"=5000)
|
||||
|
||||
/datum/design/podframe_fs
|
||||
construction_time = 200
|
||||
name = "Fore starboard pod frame"
|
||||
desc = "Allows for the construction of spacepod frames. This is the fore starboard component."
|
||||
id = "podframefs"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/pod_frame/fore_starboard
|
||||
category = list("Pod_Frame")
|
||||
materials = list("$metal"=15000,"$glass"=5000)
|
||||
|
||||
/datum/design/podframe_as
|
||||
construction_time = 200
|
||||
name = "Aft starboard pod frame"
|
||||
desc = "Allows for the construction of spacepod frames. This is the aft starboard component."
|
||||
id = "podframeas"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/pod_frame/aft_starboard
|
||||
category = list("Pod_Frame")
|
||||
materials = list("$metal"=15000,"$glass"=5000)
|
||||
|
||||
//////////////////////////
|
||||
////////POD CORE////////
|
||||
//////////////////////////
|
||||
|
||||
/datum/design/pod_core
|
||||
construction_time = 700 //Pod core should take a bit to process, after all, it's a big complicated engine and stuff.
|
||||
name = "Spacepod Core"
|
||||
desc = "Allows for the construction of a spacepod core system, made up of the engine and life support systems."
|
||||
id = "podcore"
|
||||
build_type = MECHFAB | PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/core
|
||||
category = list("Pod_Parts")
|
||||
materials = list("$metal"=5000,"$uranium"=1000,"$plasma"=5000)
|
||||
|
||||
//////////////////////////////////////////
|
||||
////////SPACEPOD ARMOR////////////////////
|
||||
//////////////////////////////////////////
|
||||
|
||||
/datum/design/pod_armor_civ
|
||||
construction_time = 400 //more time than frames, less than pod core
|
||||
name = "Pod Armor (civilian)"
|
||||
desc = "Allows for the construction of spacepod armor. This is the civilian version."
|
||||
id = "podarmor_civ"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 1)
|
||||
build_path = /obj/item/pod_parts/armor
|
||||
category = list("Pod_Armor")
|
||||
materials = list("$metal"=15000,"$glass"=5000,"$plasma"=10000)
|
||||
|
||||
//////////////////////////////////////////
|
||||
//////SPACEPOD GUNS///////////////////////
|
||||
//////////////////////////////////////////
|
||||
/datum/design/pod_gun_taser
|
||||
construction_time = 200
|
||||
name = "Spacepod Equipment (Taser)"
|
||||
desc = "Allows for the construction of a spacepod mounted taser."
|
||||
id = "podgun_taser"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 2, "combat" = 2)
|
||||
build_path = /obj/item/device/spacepod_equipment/weaponry/taser
|
||||
category = list("Pod_Weaponry")
|
||||
materials = list("$metal" = 15000)
|
||||
locked = 1
|
||||
|
||||
/datum/design/pod_gun_btaser
|
||||
construction_time = 200
|
||||
name = "Spacepod Equipment (Burst Taser)"
|
||||
desc = "Allows for the construction of a spacepod mounted taser. This is the burst-fire model."
|
||||
id = "podgun_btaser"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 3, "combat" = 3)
|
||||
build_path = /obj/item/device/spacepod_equipment/weaponry/burst_taser
|
||||
category = list("Pod_Weaponry")
|
||||
materials = list("$metal" = 15000,"$plasma"=2000)
|
||||
locked = 1
|
||||
|
||||
/datum/design/pod_gun_laser
|
||||
construction_time = 200
|
||||
name = "Spacepod Equipment (Laser)"
|
||||
desc = "Allows for the construction of a spacepod mounted laser."
|
||||
id = "podgun_laser"
|
||||
build_type = PODFAB
|
||||
req_tech = list("materials" = 3, "combat" = 3, "plasma" = 2)
|
||||
build_path = /obj/item/device/spacepod_equipment/weaponry/laser
|
||||
category = list("Pod_Weaponry")
|
||||
materials = list("$metal"=10000,"$glass"=5000,"$gold"=1000,"$silver"=2000)
|
||||
locked = 1
|
||||
@@ -252,7 +252,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 2.1
|
||||
|
||||
else if(href_list["maxresearch"]) //Eject the item inside the destructive analyzer.
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
screen = 0.0
|
||||
if(alert("Are you sure you want to maximize research levels?","Confirmation","Yes","No")=="No")
|
||||
@@ -1112,6 +1112,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
req_access = null
|
||||
req_access_txt = "29"
|
||||
|
||||
/obj/machinery/computer/rdconsole/mechanics
|
||||
name = "Mechanics R&D Console"
|
||||
desc = "A console used to interface with R&D tools."
|
||||
id = 2
|
||||
req_access = null
|
||||
req_access_txt = "70"
|
||||
|
||||
/obj/machinery/computer/rdconsole/core
|
||||
name = "Core R&D Console"
|
||||
desc = "A console used to interface with R&D tools."
|
||||
|
||||
@@ -953,6 +953,7 @@ var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF")
|
||||
#define AUTOLATHE 4 //Uses glass/metal only.
|
||||
#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define PODFAB 32 //Used by the spacepod part fabricator. Same idea as the mechfab
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
// Suit sensor levels
|
||||
|
||||
Reference in New Issue
Block a user