Machine Upgrade Update

- Partial port of tgstation/-tg-station#9813
This commit is contained in:
DZD
2015-08-20 21:03:19 -04:00
parent 639478ace5
commit 5ce49bb3b3
26 changed files with 443 additions and 58 deletions
+2 -1
View File
@@ -208,7 +208,8 @@
var/mob/living/carbon/human/occupant = null
var/possible_chems = list(list("epinephrine", "ether", "salbutamol", "styptic_powder"),
list("epinephrine", "ether", "salbutamol", "styptic_powder", "oculine"),
list("epinephrine", "ether", "salbutamol", "styptic_powder", "oculine", "charcoal", "mutadone", "mannitol"))
list("epinephrine", "ether", "salbutamol", "styptic_powder", "oculine", "charcoal", "mutadone", "mannitol"),
list("epinephrine", "ether", "salbutamol", "styptic_powder", "oculine", "charcoal", "mutadone", "mannitol", "pen_acid", "omnizine"))
var/amounts = list(5, 10)
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/filtering = 0
+9 -5
View File
@@ -14,6 +14,7 @@
var/menustat = "menu"
var/efficiency = 0
var/productivity = 0
var/max_items = 40
/obj/machinery/biogenerator/New()
..()
@@ -25,7 +26,7 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/stack/cable_coil(null, 1)
RefreshParts()
/obj/machinery/biogenerator/upgraded/New()
..()
component_parts = list()
@@ -39,12 +40,15 @@
/obj/machinery/biogenerator/RefreshParts()
var/E = 0
var/P = 0
var/max_storage = 40
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
P += B.rating
max_storage = 40 * B.rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
E += M.rating
efficiency = E
productivity = P
max_items = max_storage
/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
@@ -94,15 +98,15 @@
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
if(i >= max_items)
user << "<span class='warning'>The biogenerator is already full! Activate it.</span>"
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
if(i >= 10)
if(i >= max_items)
break
G.loc = src
i++
if(i<10)
if(i < max_items)
user << "<span class='info'>You empty the plant bag into the biogenerator.</span>"
else if(O.contents.len == 0)
user << "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>"
@@ -115,7 +119,7 @@
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
if(i >= max_items)
user << "<span class='warning'>The biogenerator is full! Activate it.</span>"
else
user.unEquip(O)
@@ -225,6 +225,14 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/stock_parts/cell = 5,
/obj/item/weapon/stock_parts/capacitor = 1)
/obj/item/weapon/circuitboard/emitter
name = "circuit board (Emitter)"
build_path = /obj/machinery/power/emitter
board_type = "machine"
origin_tech = "programming=4;powerstorage=5;engineering=5"
req_components = list(
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/thermomachine
name = "circuit board (Freezer)"
@@ -316,6 +324,49 @@ to destroy them and players will be able to make replacements.
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/item/weapon/circuitboard/processor
name = "circuit board (Food processor)"
build_path = /obj/machinery/processor
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/seed_extractor
name = "circuit board (Seed Extractor)"
build_path = /obj/machinery/seed_extractor
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/smartfridge
name = "circuit board (Smartfridge)"
build_path = /obj/machinery/smartfridge
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1)
/obj/item/weapon/circuitboard/monkey_recycler
name = "circuit board (Monkey Recycler)"
build_path = /obj/machinery/monkey_recycler
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/holopad
name = "circuit board (AI Holopad)"
build_path = /obj/machinery/hologram/holopad
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 1)
/obj/item/weapon/circuitboard/chem_dispenser
name = "circuit board (Portable Chem Dispenser)"
build_path = /obj/machinery/chem_dispenser/constructable
+26
View File
@@ -40,6 +40,32 @@ var/const/HOLOPAD_MODE = 0
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
/obj/machinery/hologram/holopad/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/holopad(null)
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
RefreshParts()
/obj/machinery/hologram/holopad/RefreshParts()
var/holograph_range = 4
for(var/obj/item/weapon/stock_parts/capacitor/B in component_parts)
holograph_range += 1 * B.rating
holo_range = holograph_range
/obj/machinery/hologram/holopad/attackby(obj/item/P as obj, mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
return
if(exchange_parts(user, P))
return
if(default_unfasten_wrench(user, P))
return
default_deconstruction_crowbar(P)
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
+33 -2
View File
@@ -10,9 +10,40 @@
idle_power_usage = 5
active_power_usage = 50
var/grinded = 0
var/required_grind = 5
var/cube_production = 1
/obj/machinery/monkey_recycler/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/monkey_recycler(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
RefreshParts()
/obj/machinery/monkey_recycler/RefreshParts()
var/req_grind = 5
var/cubes_made = 1
for(var/obj/item/weapon/stock_parts/manipulator/B in component_parts)
req_grind -= B.rating
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
cubes_made = M.rating
cube_production = cubes_made
required_grind = req_grind
/obj/machinery/monkey_recycler/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
return
if(exchange_parts(user, O))
return
if(default_unfasten_wrench(user, O))
power_change()
return
default_deconstruction_crowbar(O)
if (src.stat != 0) //NOPOWER etc
return
if (istype(O, /obj/item/weapon/grab))
@@ -44,12 +75,12 @@
/obj/machinery/monkey_recycler/attack_hand(var/mob/user as mob)
if (src.stat != 0) //NOPOWER etc
return
if(grinded >=5)
if(grinded >= required_grind)
user << "\blue The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube."
playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1)
grinded -= 5
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src.loc)
user << "\blue The machine's display flashes that it has [grinded] monkeys worth of material left."
else
user << "\red The machine needs at least 5 monkeys worth of material to produce a monkey cube. It only has [grinded]."
user << "\red The machine needs at least [required_grind] monkey\s worth of material to produce a monkey cube. It only has [grinded]."
return
+51 -24
View File
@@ -12,7 +12,22 @@
use_power = 1
idle_power_usage = 5
active_power_usage = 50
var/rating_speed = 1
var/rating_amount = 1
/obj/machinery/processor/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/processor(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/processor/RefreshParts()
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
rating_amount = B.rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
rating_speed = M.rating
//RECIPE DATUMS
/datum/food_processor_process
@@ -20,9 +35,10 @@
var/output
var/time = 40
/datum/food_processor_process/proc/process(loc, what)
if (src.output && loc)
new src.output(loc)
/datum/food_processor_process/proc/process_food(loc, what, obj/machinery/processor/processor)
if (src.output && loc && processor)
for(var/i = 0, i < processor.rating_amount, i++)
new src.output(loc)
if (what)
qdel(what)
@@ -56,7 +72,7 @@
///END OBJECT RECIPIES///
/////////////////////////
/datum/food_processor_process/mob/process(loc, what)
/datum/food_processor_process/mob/process_food(loc, what, processor)
..()
//////////////////////
@@ -66,14 +82,14 @@
input = /mob/living/carbon/slime
output = null
/datum/food_processor_process/mob/slime/process(loc, what)
/datum/food_processor_process/mob/slime/process_food(loc, what, obj/machinery/processor/processor)
var/mob/living/carbon/slime/S = what
var/C = S.cores
if(S.stat != DEAD)
S.loc = loc
S.visible_message("<span class='notice'>[S] crawls free of the processor!</span>")
return
for(var/i = 1, i <= C, i++)
for(var/i = 1, i <= C + processor.rating_amount, i++)
new S.coretype(loc)
feedback_add_details("slime_core_harvested","[replacetext(S.colour," ","_")]")
..()
@@ -82,7 +98,7 @@
input = /mob/living/carbon/human/monkey
output = null
/datum/food_processor_process/mob/monkey/process(loc, what)
/datum/food_processor_process/mob/monkey/process_food(loc, what, processor)
var/mob/living/carbon/human/monkey/O = what
if (O.client) //grief-proof
O.loc = loc
@@ -130,6 +146,17 @@
user << "<span class='warning'>\the [src] is already processing something!</span>"
return 1
if(default_deconstruction_screwdriver(user, "processor1", "processor", O))
return
if(exchange_parts(user, O))
return
if(default_unfasten_wrench(user, O))
return
default_deconstruction_crowbar(O)
if(src.contents.len > 0) //TODO: several items at once? several different items?
user << "<span class='warning'>Something is already in the processing chamber.</span>"
return 1
@@ -164,28 +191,28 @@
if(src.contents.len == 0)
user << "<span class='warning'>\the [src] is empty.</span>"
return 1
src.processing = 1
user.visible_message("[user] turns on [src].", \
"<span class='notice'>You turn on [src].</span>", \
"<span class='italics'>You hear a food processor.</span>")
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(500)
var/total_time = 0
for(var/O in src.contents)
var/datum/food_processor_process/P = select_recipe(O)
if (!P)
log_admin("DEBUG: The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.")
continue
total_time += P.time
sleep(total_time / rating_speed)
for(var/O in src.contents)
var/datum/food_processor_process/P = select_recipe(O)
if (!P)
log_admin("DEBUG: WARNING: The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.") //-rastaf0
log_admin("DEBUG: The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.")
continue
src.processing = 1
user.visible_message("<span class='notice'> \the [user] turns on \the [src].", \
"<span class='notice'>You turn on \the [src].</span>", \
"<span class='notice'>You hear a food processor.</span>")
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = P.time*5) //start shaking
use_power(500)
sleep(P.time)
pixel_x = initial(pixel_x) //return to its spot after shaking
P.process(src.loc, O)
src.processing = 0
P.process_food(src.loc, O, src)
src.processing = 0
src.visible_message("<span class='notice'>\the [src] has finished processing.</span>", \
"<span class='notice'>\the [src] has finished processing.</span>", \
+9 -9
View File
@@ -11,7 +11,7 @@
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
var/max_n_of_items = 999 //No, this should NOT be a global var.
var/icon_on = "smartfridge"
var/icon_off = "smartfridge-off"
var/icon_panel = "smartfridge-panel"
@@ -22,7 +22,7 @@
var/scan_id = 1
var/is_secure = 0
var/datum/wires/smartfridge/wires = null
/obj/machinery/smartfridge/secure
is_secure = 1
@@ -60,7 +60,7 @@
desc = "A refrigerated storage unit for storing medicine and chemicals."
icon_state = "smartfridge" //To fix the icon in the map editor.
icon_on = "smartfridge_chem"
/obj/machinery/smartfridge/medbay/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/weapon/reagent_containers/glass/))
return 1
@@ -79,7 +79,7 @@
if(istype(O,/obj/item/slime_extract))
return 1
return 0
/obj/machinery/smartfridge/secure/medbay
name = "\improper Secure Refrigerated Medicine Storage"
desc = "A refrigerated storage unit for storing medicine and chemicals."
@@ -117,7 +117,7 @@
icon_state = "smartfridge" //To fix the icon in the map editor.
icon_on = "smartfridge_chem"
req_access_txt = "33"
/obj/machinery/smartfridge/chemistry/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers))
return 1
@@ -262,12 +262,12 @@
if(P.contents.len > 0)
user << "<span class='notice'>Some items are refused.</span>"
nanomanager.update_uis(src)
/obj/machinery/smartfridge/secure/emag_act(user as mob)
/obj/machinery/smartfridge/secure/emag_act(user as mob)
emagged = 1
locked = -1
user << "You short out the product lock on [src]."
/*******************
* SmartFridge Menu
********************/
@@ -361,7 +361,7 @@
*************************/
/obj/machinery/smartfridge/secure/Topic(href, href_list)
if(stat & (NOPOWER|BROKEN))
if(stat & (NOPOWER|BROKEN))
return 0
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
+12 -8
View File
@@ -179,8 +179,8 @@ Class Procs:
//sets the use_power var and then forces an area power update
/obj/machinery/proc/update_use_power(var/new_use_power)
use_power = new_use_power
use_power = new_use_power
/obj/machinery/proc/auto_use_power()
if(!powered(power_channel))
return 0
@@ -298,7 +298,7 @@ Class Procs:
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state)
if(..(href, href_list, nowindow, state))
return 1
handle_multitool_topic(href,href_list,usr)
add_fingerprint(usr)
return 0
@@ -308,7 +308,7 @@ Class Procs:
/obj/machinery/proc/inoperable(var/additional_flags = 0)
return (stat & (NOPOWER|BROKEN|additional_flags))
/obj/machinery/CanUseTopic(var/mob/user)
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
return STATUS_CLOSE
@@ -431,9 +431,13 @@ Class Procs:
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
var/shouldplaysound = 0
if(istype(W) && component_parts)
if(panel_open)
if(panel_open || W.works_from_distance)
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
var/P
if(W.works_from_distance)
user << "<span class='notice'>Following parts detected in the machine:</span>"
for(var/var/obj/item/C in component_parts)
user << "<span class='notice'> [C.name]</span>"
for(var/obj/item/weapon/stock_parts/A in component_parts)
for(var/D in CB.req_components)
if(ispath(A.type, D))
@@ -498,8 +502,8 @@ Class Procs:
threatcount -= 2
if(check_access && !allowed(perp))
threatcount += 4
threatcount += 4
if(auth_weapons && !src.allowed(perp))
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
threatcount += 4
@@ -526,7 +530,7 @@ Class Procs:
threatcount += 4
return threatcount
/obj/machinery/proc/shock(mob/user, prb)
if(inoperable())
@@ -85,6 +85,19 @@
..()
charge = 0
/obj/item/weapon/stock_parts/cell/bluespace
name = "bluespace power cell"
origin_tech = "powerstorage=7"
icon_state = "bscell"
maxcharge = 40000
g_amt = 80
rating = 6
construction_cost = list("metal"=800,"gold"=300,"silver"=300,"glass"=160,"diamond"=160)
/obj/item/weapon/stock_parts/cell/bluespace/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
+76 -1
View File
@@ -16,10 +16,40 @@
display_contents_with_number = 1
max_w_class = 3
max_combined_w_class = 100
var/works_from_distance = 0
var/primary_sound = 'sound/items/rped.ogg'
var/alt_sound = null
/obj/item/weapon/storage/part_replacer/afterattack(obj/machinery/T as obj, mob/living/carbon/human/user as mob, flag, params)
if(flag)
return
else
if(works_from_distance)
if(istype(T))
if(T.component_parts)
T.exchange_parts(user, src)
user.Beam(T,icon_state="rped_upgrade",icon='icons/effects/effects.dmi',time=5)
return
/obj/item/weapon/storage/part_replacer/bluespace
name = "bluespace rapid part exchange device"
desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts."
icon_state = "BS_RPED"
item_state = "BS_RPED"
w_class = 3
storage_slots = 400
max_w_class = 3
max_combined_w_class = 800
works_from_distance = 1
primary_sound = 'sound/items/PSHOOM.ogg'
alt_sound = 'sound/items/PSHOOM_2.ogg'
/obj/item/weapon/storage/part_replacer/proc/play_rped_sound()
//Plays the sound for RPED exchanging or installing parts.
playsound(src, 'sound/items/rped.ogg', 40, 1)
if(alt_sound && prob(30))
playsound(src, alt_sound, 40, 1)
else
playsound(src, primary_sound, 40, 1)
//Sorts stock parts inside an RPED by their rating.
//Only use /obj/item/weapon/stock_parts/ with this sort proc!
@@ -174,6 +204,51 @@
rating = 3
m_amt = 80
//Rating 4
/obj/item/weapon/stock_parts/capacitor/quadratic
name = "quadratic capacitor"
desc = "An capacity capacitor used in the construction of a variety of devices."
icon_state = "quadratic_capacitor"
origin_tech = "powerstorage=6;materials=5"
rating = 4
m_amt = 50
g_amt = 50
/obj/item/weapon/stock_parts/scanning_module/triphasic
name = "triphasic scanning module"
desc = "A compact, ultra resolution triphasic scanning module used in the construction of certain devices."
icon_state = "triphasic_scan_module"
origin_tech = "magnets=6"
rating = 4
m_amt = 50
g_amt = 20
/obj/item/weapon/stock_parts/manipulator/femto
name = "femto-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "femto_mani"
origin_tech = "materials=6;programming=3"
rating = 4
m_amt = 30
/obj/item/weapon/stock_parts/micro_laser/quadultra
name = "quad-ultra micro-laser"
icon_state = "quadultra_micro_laser"
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=6"
rating = 4
m_amt = 10
g_amt = 20
/obj/item/weapon/stock_parts/matter_bin/bluespace
name = "bluespace matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "bluespace_matter_bin"
origin_tech = "materials=6"
rating = 4
m_amt = 80
// Subspace stock parts
/obj/item/weapon/stock_parts/subspace/ansible
+5 -4
View File
@@ -150,7 +150,8 @@ var/list/admin_verbs_debug = list(
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/client/proc/test_movable_UI,
/client/proc/test_snap_UI
/client/proc/test_snap_UI,
/proc/machine_upgrade
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -203,7 +204,7 @@ var/list/admin_verbs_mentor = list(
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
if(holder.rights & R_MOD) verbs += admin_verbs_mod
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
/client/proc/remove_admin_verbs()
verbs.Remove(
admin_verbs_default,
@@ -244,7 +245,7 @@ var/list/admin_verbs_mentor = list(
add_admin_verbs()
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_ghost()
set category = "Admin"
@@ -576,7 +577,7 @@ var/list/admin_verbs_mentor = list(
deadmins += ckey
src << "<span class='interface'>You are now a normal player.</span>"
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/readmin()
set name = "Re-admin self"
set category = "Admin"
+10
View File
@@ -0,0 +1,10 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
set category = "Debug"
var/new_rating = input("Enter new rating:","Num") as num
if(new_rating && M.component_parts)
for(var/obj/item/weapon/stock_parts/P in M.component_parts)
P.rating = new_rating
M.RefreshParts()
feedback_add_details("admin_verb","MU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+36 -2
View File
@@ -16,6 +16,8 @@
var/active = 0
var/powered = 0
var/fire_delay = 100
var/maximum_fire_delay = 100
var/minimum_fire_delay = 20
var/last_shot = 0
var/shot_number = 0
var/state = 0
@@ -25,6 +27,30 @@
var/id_tag = null
var/datum/radio_frequency/radio_connection
/obj/machinery/power/emitter/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/emitter(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/power/emitter/RefreshParts()
var/max_firedelay = 120
var/firedelay = 120
var/min_firedelay = 24
var/power_usage = 350
for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts)
max_firedelay -= 20 * L.rating
min_firedelay -= 4 * L.rating
firedelay -= 20 * L.rating
maximum_fire_delay = max_firedelay
minimum_fire_delay = min_firedelay
fire_delay = firedelay
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
power_usage -= 50 * M.rating
active_power_usage = power_usage
//Radio remote control
/obj/machinery/power/emitter/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
@@ -114,7 +140,7 @@
src.active = 1
user << "You turn on the [src]."
src.shot_number = 0
src.fire_delay = 100
src.fire_delay = maximum_fire_delay
message_admins("Emitter turned on by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])")
investigate_log("turned <font color='green'>on</font> by [key_name(usr)]","singulo")
@@ -162,7 +188,7 @@
src.fire_delay = 2
src.shot_number ++
else
src.fire_delay = rand(20,100)
src.fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
src.shot_number = 0
var/obj/item/projectile/beam/emitter/A = PoolOrNew(/obj/item/projectile/beam/emitter,src.loc)
@@ -269,6 +295,14 @@
user << "\red Access denied."
return
if(default_deconstruction_screwdriver(user, "emitter_open", "emitter", W))
return
if(exchange_parts(user, W))
return
default_deconstruction_crowbar(W)
..()
return
@@ -242,6 +242,36 @@
build_path = /obj/item/weapon/circuitboard/rdserver
category = list("Research Machinery")
/datum/design/monkey_recycler
name = "Machine Design (Monkey Recycler Board)"
desc = "The circuit board for a monkey recycler."
id = "smartfridge"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/monkey_recycler
category = list ("Misc. Machinery")
/datum/design/processor
name = "Machine Design (Processor Board)"
desc = "The circuit board for a processor."
id = "processor"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/processor
category = list ("Misc. Machinery")
/datum/design/holopad
name = "Machine Design (AI Holopad Board)"
desc = "The circuit board for a holopad."
id = "holopad"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/holopad
category = list ("Misc. Machinery")
/datum/design/arcadebattle
name = "Machine Board (Battle Arcade Machine)"
desc = "Allows for the construction of circuit boards used to build a new Arcade Machine."
@@ -48,6 +48,18 @@
build_path = /obj/item/weapon/stock_parts/cell/super
category = list("Misc","Power")
/datum/design/bluespace_cell
name = "Bluespace Power Cell"
desc = "A power cell that holds 40000 units of energy."
id = "bluespace_cell"
req_tech = list("powerstorage" = 6, "materials" = 5)
reliability_base = 70
build_type = PROTOLATHE | MECHFAB
materials = list("$metal" = 800, "$gold" = 300, "$silver" = 300, "$glass" = 160, "$diamond" = 160)
construction_time=100
build_path = /obj/item/weapon/stock_parts/cell/bluespace
category = list("Misc","Power")
/datum/design/pacman
name = "Machine Board (PACMAN-type Generator)"
desc = "The circuit board that for a PACMAN-type portable generator."
@@ -156,13 +156,78 @@
reliability_base = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/super
category = list("Stock Parts")
/datum/design/quadratic_capacitor
name = "Quadratic Capacitor"
desc = "A stock part used in the construction of various devices."
id = "quadratic_capacitor"
req_tech = list("powerstorage" = 6, "materials" = 5)
build_type = PROTOLATHE
reliability_base = 71
materials = list("$metal" = 100, "$glass" = 100, "$diamond" = 40)
build_path = /obj/item/weapon/stock_parts/capacitor/quadratic
category = list("Stock Parts")
/datum/design/triphasic_scanning
name = "Triphasic Scanning Module"
desc = "A stock part used in the construction of various devices."
id = "triphasic_scanning"
req_tech = list("magnets" = 6, "materials" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 100, "$glass" = 40, "$diamond" = 20)
reliability_base = 72
build_path = /obj/item/weapon/stock_parts/scanning_module/triphasic
category = list("Stock Parts")
/datum/design/femto_mani
name = "Femto Manipulator"
desc = "A stock part used in the construction of various devices."
id = "femto_mani"
req_tech = list("materials" = 6, "programming" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 60, "$diamond" = 30)
reliability_base = 73
build_path = /obj/item/weapon/stock_parts/manipulator/femto
category = list("Stock Parts")
/datum/design/quadultra_micro_laser
name = "Quad-Ultra Micro-Laser"
desc = "A stock part used in the construction of various devices."
id = "quadultra_micro_laser"
req_tech = list("magnets" = 6, "materials" = 6)
build_type = PROTOLATHE
materials = list("$metal" = 20, "$glass" = 40, "$uranium" = 20, "$diamond" = 20)
reliability_base = 70
build_path = /obj/item/weapon/stock_parts/micro_laser/quadultra
category = list("Stock Parts")
/datum/design/bluespace_matter_bin
name = "Bluespace Matter Bin"
desc = "A stock part used in the construction of various devices."
id = "bluespace_matter_bin"
req_tech = list("materials" = 6)
build_type = PROTOLATHE
materials = list("$metal" = 160, "$diamond" = 200)
reliability_base = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/bluespace
category = list("Stock Parts")
/datum/design/RPED
name = "Rapid Part Exchange Device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
id = "rped"
req_tech = list("engineering" = 3, "materials" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 15000, "$glass" = 5000) //hardcore
materials = list("$metal" = 10000, "$glass" = 5000) //hardcore
build_path = /obj/item/weapon/storage/part_replacer
category = list("Stock Parts")
/datum/design/BS_RPED
name = "Bluespace RPED"
desc = "Powered by bluespace technology, this RPED variant can upgrade buildings from a distance, without needing to remove the panel first."
id = "bs_rped"
req_tech = list("engineering" = 3, "materials" = 5, "programming" = 3, "bluespace" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 15000, "$glass" = 5000, "$silver" = 2500) //hardcore
build_path = /obj/item/weapon/storage/part_replacer/bluespace
category = list("Stock Parts")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 70 KiB

+1
View File
@@ -902,6 +902,7 @@
#include "code\modules\admin\create_turf.dm"
#include "code\modules\admin\holder2.dm"
#include "code\modules\admin\IsBanned.dm"
#include "code\modules\admin\machine_upgrade.dm"
#include "code\modules\admin\NewBan.dm"
#include "code\modules\admin\newbanjob.dm"
#include "code\modules\admin\player_notes.dm"
Binary file not shown.
Binary file not shown.