everything but mob stuff

This commit is contained in:
Poojawa
2018-04-23 01:06:17 -05:00
parent cc6b320f83
commit 5518efebea
111 changed files with 978 additions and 3448 deletions
-140
View File
@@ -1,140 +0,0 @@
GLOBAL_LIST_INIT(message_servers, list())
/datum/data_pda_msg
var/recipient = "Unspecified" //name of the person
var/sender = "Unspecified" //name of the sender
var/message = "Blank" //transferred message
var/icon/photo //Attached photo
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_photo=null)
if(param_rec)
recipient = param_rec
if(param_sender)
sender = param_sender
if(param_message)
message = param_message
if(param_photo)
photo = param_photo
/datum/data_pda_msg/proc/get_photo_ref()
if(photo)
return "<a href='byond://?src=[REF(src)];photo=1'>(Photo)</a>"
return ""
/datum/data_pda_msg/Topic(href,href_list)
..()
if(href_list["photo"])
var/mob/M = usr
M << browse_rsc(photo, "pda_photo.png")
M << browse("<html><head><title>PDA Photo</title></head>" \
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
+ "<img src='pda_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />" \
+ "</body></html>", "window=book;size=192x192")
onclose(M, "PDA Photo")
/datum/data_rc_msg
var/rec_dpt = "Unspecified" //name of the person
var/send_dpt = "Unspecified" //name of the sender
var/message = "Blank" //transferred message
var/stamp = "Unstamped"
var/id_auth = "Unauthenticated"
var/priority = "Normal"
/datum/data_rc_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_stamp = "",var/param_id_auth = "",var/param_priority)
if(param_rec)
rec_dpt = param_rec
if(param_sender)
send_dpt = param_sender
if(param_message)
message = param_message
if(param_stamp)
stamp = param_stamp
if(param_id_auth)
id_auth = param_id_auth
if(param_priority)
switch(param_priority)
if(1)
priority = "Normal"
if(2)
priority = "High"
if(3)
priority = "Extreme"
else
priority = "Undetermined"
/obj/machinery/message_server
icon = 'icons/obj/machines/research.dmi'
icon_state = "server"
name = "Messaging Server"
desc = "A machine that attempts to gather the secret knowledge of the universe."
density = TRUE
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 100
var/list/datum/data_pda_msg/pda_msgs = list()
var/list/datum/data_rc_msg/rc_msgs = list()
var/active = 1
var/decryptkey = "password"
/obj/machinery/message_server/Initialize()
GLOB.message_servers += src
decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
. = ..()
/obj/machinery/message_server/Destroy()
GLOB.message_servers -= src
return ..()
/obj/machinery/message_server/proc/GenerateKey()
//Feel free to move to Helpers.
var/newKey
newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
return newKey
/obj/machinery/message_server/process()
if(active && (stat & (BROKEN|NOPOWER)))
active = 0
return
update_icon()
return
/obj/machinery/message_server/proc/send_pda_message(recipient = "",sender = "",message = "",photo=null)
. = new/datum/data_pda_msg(recipient,sender,message,photo)
pda_msgs += .
/obj/machinery/message_server/proc/send_rc_message(recipient = "",sender = "",message = "",stamp = "", id_auth = "", priority = 1)
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
/obj/machinery/message_server/attack_hand(mob/user)
to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]")
active = !active
update_icon()
return
/obj/machinery/message_server/update_icon()
if((stat & (BROKEN|NOPOWER)))
icon_state = "server-nopower"
else if (!active)
icon_state = "server-off"
else
icon_state = "server-on"
return
/obj/machinery/blackbox_recorder
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
name = "Blackbox Recorder"
density = TRUE
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 100
armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
+22 -50
View File
@@ -9,58 +9,18 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_HUGE
storage_slots = 50
use_to_pickup = 1
allow_quick_gather = 1
allow_quick_empty = 1
collection_mode = 1
display_contents_with_number = 1
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 100
can_hold = list(
/obj/item/reagent_containers/glass/beaker,
/obj/item/device/assembly/igniter,
/obj/item/stock_parts,
/obj/item/stack/ore/bluespace_crystal)
var/works_from_distance = 0
component_type = /datum/component/storage/concrete/rped
var/works_from_distance = FALSE
var/pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/rped.ogg'
var/alt_sound = null
/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/carbon/human/user, 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",time=5)
return
/obj/item/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"
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 400
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 800
works_from_distance = 1
pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/pshoom.ogg'
alt_sound = 'sound/items/pshoom_2.ogg'
/obj/item/storage/part_replacer/bluespace/dump_content_at(atom/dest_object, mob/user)
if(Adjacent(user))
var/atom/dumping_location = dest_object.get_dumping_location()
if(get_dist(user, dumping_location) < 8)
if(dumping_location.storage_contents_dump_act(src, user))
play_rped_sound()
user.Beam(dumping_location,icon_state="rped_upgrade",time=5)
return 1
to_chat(user, "The [src.name] buzzes.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return 0
if(!istype(T) || !T.component_parts)
return ..()
if(works_from_distance || user.Adjacent(T))
T.exchange_parts(user, src)
if(works_from_distance)
user.Beam(T, icon_state = "rped_upgrade", time = 5)
/obj/item/storage/part_replacer/proc/play_rped_sound()
//Plays the sound for RPED exhanging or installing parts.
@@ -69,6 +29,16 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
else
playsound(src, pshoom_or_beepboopblorpzingshadashwoosh, 40, 1)
/obj/item/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"
w_class = WEIGHT_CLASS_NORMAL
works_from_distance = TRUE
pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/pshoom.ogg'
alt_sound = 'sound/items/pshoom_2.ogg'
component_type = /datum/component/storage/concrete/bluespace/rped
/obj/item/storage/part_replacer/cyborg
name = "rapid part exchange device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
@@ -78,8 +48,9 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
//Sorts stock parts inside an RPED by their rating.
/proc/cmp_rped_sort(obj/item/A, obj/item/B)
return A.get_part_rating() - B.get_part_rating()
//Only use /obj/item/stock_parts/ with this sort proc!
/proc/cmp_rped_sort(obj/item/stock_parts/A, obj/item/stock_parts/B)
return B.rating - A.rating
/obj/item/stock_parts
name = "stock part"
@@ -95,6 +66,7 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
/obj/item/stock_parts/get_part_rating()
return rating
//Rating 1
/obj/item/stock_parts/capacitor
@@ -18,22 +18,16 @@ Reproductive extracts:
to_chat(user, "<span class='warning'>[src] is still digesting!</span>")
return
if(istype(O, /obj/item/storage/bag/bio))
var/obj/item/storage/P = O
var/obj/item/reagent_containers/food/snacks/monkeycube/M
for(var/obj/item/X in P.contents)
M = X
if(M && istype(M))
break
if(M && istype(M))
P.remove_from_storage(M, get_turf(src))
attackby(M,user)
var/list/inserted = list()
O.SendSignal(COMSIG_TRY_STORAGE_TAKE_TYPE, /obj/item/reagent_containers/food/snacks/monkeycube, src, 1, null, null, user, inserted)
if(inserted.len)
var/obj/item/reagent_containers/food/snacks/monkeycube/M = inserted[1]
if(istype(M))
eat_cube(M, user)
else
to_chat(user, "<span class='warning'>There are no monkey cubes in the bio bag!</span>")
if(istype(O,/obj/item/reagent_containers/food/snacks/monkeycube))
qdel(O)
cubes_eaten++
to_chat(user, "<span class='notice'>You feed [O] to [src], and it pulses gently.</span>")
playsound(src, 'sound/items/eatfood.ogg', 20, 1)
eat_cube(O, user)
if(cubes_eaten >= 3)
var/cores = rand(1,4)
visible_message("<span class='notice'>[src] briefly swells to a massive size, and expels [cores] extract[cores > 1 ? "s":""]!</span>")
@@ -43,6 +37,12 @@ Reproductive extracts:
new extract_type(get_turf(loc))
cubes_eaten = 0
/obj/item/slimecross/reproductive/proc/eat_cube(obj/item/reagent_containers/food/snacks/monkeycube, mob/user)
qdel(monkeycube)
cubes_eaten++
to_chat(user, "<span class='notice'>You feed [monkeycube] to [src], and it pulses gently.</span>")
playsound(src, 'sound/items/eatfood.ogg', 20, 1)
/obj/item/slimecross/reproductive/grey
extract_type = /obj/item/slime_extract/grey
colour = "grey"
@@ -22,14 +22,16 @@
desc = "A computer used for remotely handling slimes."
networks = list("ss13")
circuit = /obj/item/circuitboard/computer/xenobiology
var/datum/action/innate/slime_place/slime_place_action = new
var/datum/action/innate/slime_pick_up/slime_up_action = new
var/datum/action/innate/feed_slime/feed_slime_action = new
var/datum/action/innate/monkey_recycle/monkey_recycle_action = new
var/datum/action/innate/slime_scan/scan_action = new
var/datum/action/innate/feed_potion/potion_action = new
var/datum/action/innate/slime_place/slime_place_action
var/datum/action/innate/slime_pick_up/slime_up_action
var/datum/action/innate/feed_slime/feed_slime_action
var/datum/action/innate/monkey_recycle/monkey_recycle_action
var/datum/action/innate/slime_scan/scan_action
var/datum/action/innate/feed_potion/potion_action
var/list/stored_slimes = list()
var/datum/component/redirect/listener
var/list/stored_slimes
var/obj/item/slimepotion/slime/current_potion
var/max_slimes = 5
var/monkeys = 0
@@ -39,6 +41,26 @@
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/camera_advanced/xenobio/Initialize()
. = ..()
slime_place_action = new
slime_up_action = new
feed_slime_action = new
monkey_recycle_action = new
scan_action = new
potion_action = new
stored_slimes = list()
listener = AddComponent(/datum/component/redirect, COMSIG_ATOM_CONTENTS_DEL, CALLBACK(src, .proc/on_contents_del))
/obj/machinery/computer/camera_advanced/xenobio/Destroy()
stored_slimes = null
QDEL_NULL(current_potion)
for(var/i in contents)
var/mob/living/simple_animal/slime/S = i
if(istype(S))
S.forceMove(drop_location())
return ..()
/obj/machinery/computer/camera_advanced/xenobio/CreateEye()
eyeobj = new /mob/camera/aiEye/remote/xenobio(get_turf(src))
eyeobj.origin = src
@@ -64,7 +86,7 @@
feed_slime_action.Grant(user)
actions += feed_slime_action
if(monkey_recycle_action && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes remote monkey recycling require XENOBIO_UPGRADE_MONKEYS
if(monkey_recycle_action && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
monkey_recycle_action.target = src
monkey_recycle_action.Grant(user)
actions += monkey_recycle_action
@@ -79,6 +101,12 @@
potion_action.Grant(user)
actions += potion_action
/obj/machinery/computer/camera_advanced/xenobio/proc/on_contents_del(atom/deleted)
if(current_potion == deleted)
current_potion = null
if(deleted in stored_slimes)
stored_slimes -= deleted
/obj/machinery/computer/camera_advanced/xenobio/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube) && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS
monkeys++