This commit is contained in:
TrilbySpaceClone
2019-09-11 06:54:50 -04:00
parent e37983f20c
commit 17f6304acf
348 changed files with 2745 additions and 835 deletions
+2
View File
@@ -109,3 +109,5 @@
#define RCD_AIRLOCK 2
#define RCD_DECONSTRUCT 3
#define RCD_WINDOWGRILLE 4
#define RCD_MACHINE 8
#define RCD_COMPUTER 16
+2 -1
View File
@@ -118,6 +118,7 @@
#define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism"
#define TRAIT_STRONG_GRABBER "strong_grabber"
#define TRAIT_CALCIUM_HEALER "calcium_healer"
#define TRAIT_CAPTAIN_METABOLISM "captain-metabolism"
//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
@@ -203,4 +204,4 @@
#define FLIGHTSUIT_TRAIT "flightsuit"
#define LOCKED_HELMET_TRAIT "locked-helmet"
#define NINJA_SUIT_TRAIT "ninja-suit"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
+1 -1
View File
@@ -67,7 +67,7 @@
/mob/proc/ClickOn( atom/A, params )
if(world.time <= next_click)
return
next_click = world.time + 1
next_click = world.time + world.tick_lag
if(check_click_intercept(params,A))
return
@@ -52,7 +52,7 @@
. = ..()
cant_hold = typecacheof(list(/obj/item/screwdriver/power))
can_hold = typecacheof(list(
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen,
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, /obj/item/melee/cultblade/dagger,
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
@@ -63,7 +63,7 @@
. = ..()
cant_hold = typecacheof(list(/obj/item/screwdriver/power))
can_hold = typecacheof(list(
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen,
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen, /obj/item/melee/cultblade/dagger,
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
+1 -1
View File
@@ -18,7 +18,7 @@
var/map_file = "BoxStation.dmm"
var/traits = null
var/space_ruin_levels = 1 //Citadel edit - reduces the default space ruin z-level count to 1
var/space_ruin_levels = 2
var/space_empty_levels = 1
var/minetype = "lavaland"
+101 -15
View File
@@ -113,6 +113,11 @@ Class Procs:
var/atom/movable/occupant = null
var/speed_process = FALSE // Process as fast as possible?
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
var/obj/item/card/id/inserted_scan_id
var/obj/item/card/id/inserted_modify_id
var/list/region_access = null // For the identification console (card.dm)
var/list/head_subordinates = null // For the identification console (card.dm)
var/authenticated = 0 // For the identification console (card.dm)
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
@@ -131,7 +136,7 @@ Class Procs:
else
START_PROCESSING(SSfastprocess, src)
power_change()
AddComponent(/datum/component/redirect, list(COMSIG_ENTER_AREA = CALLBACK(src, .proc/power_change)))
RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change)
if (occupant_typecache)
occupant_typecache = typecacheof(occupant_typecache)
@@ -143,6 +148,10 @@ Class Procs:
else
STOP_PROCESSING(SSfastprocess, src)
dropContents()
if(length(component_parts))
for(var/atom/A in component_parts)
qdel(A)
component_parts.Cut()
return ..()
/obj/machinery/proc/locate_machinery()
@@ -179,12 +188,15 @@ Class Procs:
L.update_canmove()
occupant = null
/obj/machinery/proc/can_be_occupant(atom/movable/am)
return occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am)
/obj/machinery/proc/close_machine(atom/movable/target = null)
state_open = FALSE
density = TRUE
if(!target)
for(var/am in loc)
if (!(occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am)))
if (!(can_be_occupant(am)))
continue
var/atom/movable/AM = am
if(AM.has_buckled_mobs())
@@ -311,6 +323,7 @@ Class Procs:
spawn_frame(disassembled)
for(var/obj/item/I in component_parts)
I.forceMove(loc)
component_parts.Cut()
qdel(src)
/obj/machinery/proc/spawn_frame(disassembled)
@@ -348,8 +361,8 @@ Class Procs:
panel_open = FALSE
icon_state = icon_state_closed
to_chat(user, "<span class='notice'>You close the maintenance hatch of [src].</span>")
return 1
return 0
return TRUE
return FALSE
/obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/I)
if(panel_open && I.tool_behaviour == TOOL_WRENCH)
@@ -401,7 +414,7 @@ Class Procs:
var/obj/item/circuitboard/machine/CB = locate(/obj/item/circuitboard/machine) in component_parts
var/P
if(W.works_from_distance)
display_parts(user)
to_chat(user, display_parts(user))
for(var/obj/item/A in component_parts)
for(var/D in CB.req_components)
if(ispath(A.type, D))
@@ -429,34 +442,38 @@ Class Procs:
break
RefreshParts()
else
display_parts(user)
to_chat(user, display_parts(user))
if(shouldplaysound)
W.play_rped_sound()
return TRUE
return FALSE
/obj/machinery/proc/display_parts(mob/user)
to_chat(user, "<span class='notice'>It contains the following parts:</span>")
. = list()
. += "<span class='notice'>It contains the following parts:</span>"
for(var/obj/item/C in component_parts)
to_chat(user, "<span class='notice'>[icon2html(C, user)] \A [C].</span>")
. += "<span class='notice'>[icon2html(C, user)] \A [C].</span>"
. = jointext(., "")
/obj/machinery/examine(mob/user)
..()
. = ..()
if(stat & BROKEN)
to_chat(user, "<span class='notice'>It looks broken and non-functional.</span>")
. += "<span class='notice'>It looks broken and non-functional.</span>"
if(!(resistance_flags & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE)
to_chat(user, "<span class='warning'>It's on fire!</span>")
. += "<span class='warning'>It's on fire!</span>"
var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent)
if(50 to 99)
to_chat(user, "It looks slightly damaged.")
. += "It looks slightly damaged."
if(25 to 50)
to_chat(user, "It appears heavily damaged.")
. += "It appears heavily damaged."
if(0 to 25)
to_chat(user, "<span class='warning'>It's falling apart!</span>")
. += "<span class='warning'>It's falling apart!</span>"
if(user.research_scanner && component_parts)
display_parts(user)
. += display_parts(user, TRUE)
if(inserted_scan_id || inserted_modify_id)
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
//called on machinery construction (i.e from frame to machinery) but not on initialization
/obj/machinery/proc/on_construction()
@@ -490,3 +507,72 @@ Class Procs:
. = . % 9
AM.pixel_x = -8 + ((.%3)*8)
AM.pixel_y = -8 + (round( . / 3)*8)
/obj/machinery/proc/id_insert_scan(mob/user, obj/item/card/id/I)
I = user.get_active_held_item()
if(istype(I))
if(inserted_scan_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_scan_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_scan(mob/user)
if(!inserted_scan_id)
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
return
if(inserted_scan_id)
inserted_scan_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_scan_id)
inserted_scan_id = null
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_modify(mob/user)
if(inserted_modify_id)
GLOB.data_core.manifest_modify(inserted_modify_id.registered_name, inserted_modify_id.assignment)
inserted_modify_id.update_label()
inserted_modify_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_modify_id)
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
inserted_modify_id = null
region_access = null
head_subordinates = null
updateUsrDialog()
/obj/machinery/proc/id_insert_modify(mob/user)
var/obj/item/card/id/I = user.get_active_held_item()
if(istype(I))
if(inserted_modify_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_modify_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/AltClick(mob/user)
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(inserted_modify_id)
id_eject_modify(user)
authenticated = FALSE
return
if(inserted_scan_id)
id_eject_scan(user)
authenticated = FALSE
return
@@ -11,7 +11,6 @@
var/list/result_filters //For sorting the results
var/checking_logs = 0
var/list/logs
var/authenticated = 0
var/auth_id = "\[NULL\]"
/obj/machinery/computer/apc_control/Initialize()
-3
View File
@@ -13,11 +13,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
circuit = /obj/item/circuitboard/computer/card
var/obj/item/card/id/scan = null
var/obj/item/card/id/modify = null
var/authenticated = 0
var/mode = 0
var/printing = null
var/list/region_access = null
var/list/head_subordinates = null
var/target_dept = 0 //Which department this computer has access to. 0=all departments
//Cooldown for closing positions in seconds
-3
View File
@@ -64,9 +64,6 @@
if(!(scanner && LAZYLEN(pods) && autoprocess))
return
if(scanner.occupant && scanner.scan_level > 2)
scan_occupant(scanner.occupant)
for(var/datum/data/record/R in records)
var/obj/machinery/clonepod/pod = GetAvailableEfficientPod(R.fields["mind"])
@@ -6,7 +6,6 @@
icon_keyboard = "tech_key"
req_access = list(ACCESS_HEADS)
circuit = /obj/item/circuitboard/computer/communications
var/authenticated = 0
var/auth_id = "Unknown" //Who is currently logged in?
var/list/datum/comm_message/messages = list()
var/datum/comm_message/currmsg
+139 -147
View File
@@ -7,13 +7,10 @@
icon_keyboard = "med_key"
req_one_access = list(ACCESS_MEDICAL, ACCESS_FORENSICS_LOCKERS)
circuit = /obj/item/circuitboard/computer/med_data
var/obj/item/card/id/scan = null
var/authenticated = null
var/rank = null
var/screen = null
var/datum/data/record/active1
var/datum/data/record/active2
var/a_id = null
var/temp = null
var/printing = null
//Sorting Variables
@@ -25,24 +22,22 @@
/obj/machinery/computer/med_data/syndie
icon_keyboard = "syndie_key"
/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id) && !scan)
if(!user.transferItemToLoc(O, src))
return
scan = O
to_chat(user, "<span class='notice'>You insert [O].</span>")
/obj/machinery/computer/med_data/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id))
id_insert_scan(user)
else
return ..()
/obj/machinery/computer/med_data/ui_interact(mob/user)
. = ..()
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
var/dat
if(temp)
dat = text("<TT>[temp]</TT><BR><BR><A href='?src=[REF(src)];temp=1'>Clear Screen</A>")
else
dat = text("Confirm Identity: <A href='?src=[REF(src)];scan=1'>[]</A><HR>", (src.scan ? text("[]", src.scan.name) : "----------"))
if(src.authenticated)
switch(src.screen)
if(authenticated)
switch(screen)
if(1)
dat += {"
<A href='?src=[REF(src)];search=1'>Search Records</A>
@@ -116,7 +111,7 @@
dat += "<td><a href='?src=[REF(src)];field=show_photo_front'><img src=photo_front height=80 width=80 border=4></a></td>"
dat += "<td><a href='?src=[REF(src)];field=show_photo_side'><img src=photo_side height=80 width=80 border=4></a></td></tr>"
dat += "<tr><td>ID:</td><td>[active1.fields["id"]]</td></tr>"
dat += "<tr><td>Sex:</td><td><A href='?src=[REF(src)];field=sex'>&nbsp;[active1.fields["sex"]]&nbsp;</A></td></tr>"
dat += "<tr><td>Gender:</td><td><A href='?src=[REF(src)];field=gender'>&nbsp;[active1.fields["gender"]]&nbsp;</A></td></tr>"
dat += "<tr><td>Age:</td><td><A href='?src=[REF(src)];field=age'>&nbsp;[active1.fields["age"]]&nbsp;</A></td></tr>"
dat += "<tr><td>Species:</td><td><A href='?src=[REF(src)];field=species'>&nbsp;[active1.fields["species"]]&nbsp;</A></td></tr>"
dat += "<tr><td>Fingerprint:</td><td><A href='?src=[REF(src)];field=fingerprint'>&nbsp;[active1.fields["fingerprint"]]&nbsp;</A></td></tr>"
@@ -141,7 +136,7 @@
dat += "<tr><td><br><b><font size='4'>Comments/Log</font></b></td></tr>"
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
while(active2.fields[text("com_[]", counter)])
dat += "<tr><td>[active2.fields[text("com_[]", counter)]]</td></tr><tr><td><A href='?src=[REF(src)];del_c=[counter]'>Delete Entry</A></td></tr>"
counter++
dat += "<tr><td><A href='?src=[REF(src)];add_c=1'>Add Entry</A></td></tr>"
@@ -169,7 +164,7 @@
dat += "<br><b>Medical Robots:</b>"
var/bdat = null
for(var/mob/living/simple_animal/bot/medbot/M in GLOB.alive_mob_list)
if(M.z != src.z)
if(M.z != z)
continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up
@@ -189,7 +184,7 @@
dat += "<A href='?src=[REF(src)];login=1'>{Log In}</A>"
var/datum/browser/popup = new(user, "med_rec", "Medical Records Console", 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open()
/obj/machinery/computer/med_data/Topic(href, href_list)
@@ -197,29 +192,20 @@
if(.)
return .
if(!(active1 in GLOB.data_core.general))
src.active1 = null
active1 = null
if(!(active2 in GLOB.data_core.medical))
src.active2 = null
active2 = null
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
usr.set_machine(src)
if(href_list["temp"])
src.temp = null
if(href_list["scan"])
if(src.scan)
usr.put_in_hands(scan)
scan = null
else
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
if(I)
if(!usr.transferItemToLoc(I, src))
return
src.scan = I
temp = null
else if(href_list["logout"])
src.authenticated = null
src.screen = null
src.active1 = null
src.active2 = null
authenticated = null
screen = null
active1 = null
active2 = null
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
else if(href_list["choice"])
// SORTING!
if(href_list["choice"] == "Sorting")
@@ -234,34 +220,37 @@
sortBy = href_list["sort"]
order = initial(order)
else if(href_list["login"])
if(issilicon(usr))
src.active1 = null
src.active2 = null
src.authenticated = 1
src.rank = "AI"
src.screen = 1
else if(IsAdminGhost(usr))
src.active1 = null
src.active2 = null
src.authenticated = 1
src.rank = "Central Command"
src.screen = 1
else if(istype(src.scan, /obj/item/card/id))
src.active1 = null
src.active2 = null
if(src.check_access(src.scan))
src.authenticated = src.scan.registered_name
src.rank = src.scan.assignment
src.screen = 1
if(src.authenticated)
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(issilicon(M))
active1 = null
active2 = null
authenticated = 1
rank = "AI"
screen = 1
else if(IsAdminGhost(M))
active1 = null
active2 = null
authenticated = 1
rank = "Central Command"
screen = 1
else if(istype(I) && check_access(I))
active1 = null
active2 = null
authenticated = I.registered_name
rank = I.assignment
screen = 1
else
to_chat(usr, "<span class='danger'>Unauthorized access.</span>")
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
if(authenticated)
if(href_list["screen"])
src.screen = text2num(href_list["screen"])
if(src.screen < 1)
src.screen = 1
screen = text2num(href_list["screen"])
if(screen < 1)
screen = 1
src.active1 = null
src.active2 = null
active1 = null
active2 = null
else if(href_list["vir"])
var/type = href_list["vir"]
@@ -269,7 +258,7 @@
var/AfS = ""
for(var/mob/M in Dis.viable_mobtypes)
AfS += " [initial(M.name)];"
src.temp = {"<b>Name:</b> [Dis.name]
temp = {"<b>Name:</b> [Dis.name]
<BR><b>Number of stages:</b> [Dis.max_stages]
<BR><b>Spread:</b> [Dis.spread_text] Transmission
<BR><b>Possible Cure:</b> [(Dis.cure_text||"none")]
@@ -280,110 +269,112 @@
<BR><b>Severity:</b> [Dis.severity]"}
else if(href_list["del_all"])
src.temp = "Are you sure you wish to delete all records?<br>\n\t<A href='?src=[REF(src)];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=[REF(src)];temp=1'>No</A><br>"
temp = "Are you sure you wish to delete all records?<br>\n\t<A href='?src=[REF(src)];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=[REF(src)];temp=1'>No</A><br>"
else if(href_list["del_all2"])
investigate_log("[key_name(usr)] has deleted all medical records.", INVESTIGATE_RECORDS)
GLOB.data_core.medical.Cut()
src.temp = "All records deleted."
temp = "All records deleted."
else if(href_list["field"])
var/a1 = src.active1
var/a2 = src.active2
var/a1 = active1
var/a2 = active2
switch(href_list["field"])
if("fingerprint")
if(active1)
var/t1 = stripped_input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null)
var/t1 = stripped_input("Please input fingerprint hash:", "Med. records", active1.fields["fingerprint"], null)
if(!canUseMedicalRecordsConsole(usr, t1, a1))
return
src.active1.fields["fingerprint"] = t1
if("sex")
active1.fields["fingerprint"] = t1
if("gender")
if(active1)
if(src.active1.fields["sex"] == "Male")
src.active1.fields["sex"] = "Female"
if(active1.fields["gender"] == "Male")
active1.fields["gender"] = "Female"
else if(active1.fields["gender"] == "Female")
active1.fields["gender"] = "Other"
else
src.active1.fields["sex"] = "Male"
active1.fields["gender"] = "Male"
if("age")
if(active1)
var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num
var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num
if(!canUseMedicalRecordsConsole(usr, t1, a1))
return
src.active1.fields["age"] = t1
active1.fields["age"] = t1
if("species")
if(active1)
var/t1 = stripped_input("Please input species name", "Med. records", src.active1.fields["species"], null)
var/t1 = stripped_input("Please input species name", "Med. records", active1.fields["species"], null)
if(!canUseMedicalRecordsConsole(usr, t1, a1))
return
active1.fields["species"] = t1
if("mi_dis")
if(active2)
var/t1 = stripped_input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null)
var/t1 = stripped_input("Please input minor disabilities list:", "Med. records", active2.fields["mi_dis"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["mi_dis"] = t1
active2.fields["mi_dis"] = t1
if("mi_dis_d")
if(active2)
var/t1 = stripped_input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null)
var/t1 = stripped_input("Please summarize minor dis.:", "Med. records", active2.fields["mi_dis_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["mi_dis_d"] = t1
active2.fields["mi_dis_d"] = t1
if("ma_dis")
if(active2)
var/t1 = stripped_input("Please input major disabilities list:", "Med. records", src.active2.fields["ma_dis"], null)
var/t1 = stripped_input("Please input major disabilities list:", "Med. records", active2.fields["ma_dis"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["ma_dis"] = t1
active2.fields["ma_dis"] = t1
if("ma_dis_d")
if(active2)
var/t1 = stripped_input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null)
var/t1 = stripped_input("Please summarize major dis.:", "Med. records", active2.fields["ma_dis_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["ma_dis_d"] = t1
active2.fields["ma_dis_d"] = t1
if("alg")
if(active2)
var/t1 = stripped_input("Please state allergies:", "Med. records", src.active2.fields["alg"], null)
var/t1 = stripped_input("Please state allergies:", "Med. records", active2.fields["alg"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["alg"] = t1
active2.fields["alg"] = t1
if("alg_d")
if(active2)
var/t1 = stripped_input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null)
var/t1 = stripped_input("Please summarize allergies:", "Med. records", active2.fields["alg_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["alg_d"] = t1
active2.fields["alg_d"] = t1
if("cdi")
if(active2)
var/t1 = stripped_input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null)
var/t1 = stripped_input("Please state diseases:", "Med. records", active2.fields["cdi"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["cdi"] = t1
active2.fields["cdi"] = t1
if("cdi_d")
if(active2)
var/t1 = stripped_input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null)
var/t1 = stripped_input("Please summarize diseases:", "Med. records", active2.fields["cdi_d"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["cdi_d"] = t1
active2.fields["cdi_d"] = t1
if("notes")
if(active2)
var/t1 = stripped_input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null)
var/t1 = stripped_input("Please summarize notes:", "Med. records", active2.fields["notes"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["notes"] = t1
active2.fields["notes"] = t1
if("p_stat")
if(active1)
src.temp = "<B>Physical Condition:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=unconscious'>*Unconscious*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=unfit'>Physically Unfit</A><BR>"
temp = "<B>Physical Condition:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=unconscious'>*Unconscious*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=[REF(src)];temp=1;p_stat=unfit'>Physically Unfit</A><BR>"
if("m_stat")
if(active1)
src.temp = "<B>Mental Condition:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=insane'>*Insane*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=unstable'>*Unstable*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=watch'>*Watch*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=stable'>Stable</A><BR>"
temp = "<B>Mental Condition:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=insane'>*Insane*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=unstable'>*Unstable*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=watch'>*Watch*</A><BR>\n\t<A href='?src=[REF(src)];temp=1;m_stat=stable'>Stable</A><BR>"
if("blood_type")
if(active2)
src.temp = "<B>Blood Type:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=an'>A-</A> <A href='?src=[REF(src)];temp=1;blood_type=ap'>A+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=bn'>B-</A> <A href='?src=[REF(src)];temp=1;blood_type=bp'>B+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=abn'>AB-</A> <A href='?src=[REF(src)];temp=1;blood_type=abp'>AB+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=on'>O-</A> <A href='?src=[REF(src)];temp=1;blood_type=op'>O+</A><BR>"
temp = "<B>Blood Type:</B><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=an'>A-</A> <A href='?src=[REF(src)];temp=1;blood_type=ap'>A+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=bn'>B-</A> <A href='?src=[REF(src)];temp=1;blood_type=bp'>B+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=abn'>AB-</A> <A href='?src=[REF(src)];temp=1;blood_type=abp'>AB+</A><BR>\n\t<A href='?src=[REF(src)];temp=1;blood_type=on'>O-</A> <A href='?src=[REF(src)];temp=1;blood_type=op'>O+</A><BR>"
if("b_dna")
if(active2)
var/t1 = stripped_input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null)
var/t1 = stripped_input("Please input DNA hash:", "Med. records", active2.fields["b_dna"], null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
src.active2.fields["b_dna"] = t1
active2.fields["b_dna"] = t1
if("show_photo_front")
if(active1)
if(active1.fields["photo_front"])
@@ -402,51 +393,51 @@
if(active1)
switch(href_list["p_stat"])
if("deceased")
src.active1.fields["p_stat"] = "*Deceased*"
active1.fields["p_stat"] = "*Deceased*"
if("unconscious")
src.active1.fields["p_stat"] = "*Unconscious*"
active1.fields["p_stat"] = "*Unconscious*"
if("active")
src.active1.fields["p_stat"] = "Active"
active1.fields["p_stat"] = "Active"
if("unfit")
src.active1.fields["p_stat"] = "Physically Unfit"
active1.fields["p_stat"] = "Physically Unfit"
else if(href_list["m_stat"])
if(active1)
switch(href_list["m_stat"])
if("insane")
src.active1.fields["m_stat"] = "*Insane*"
active1.fields["m_stat"] = "*Insane*"
if("unstable")
src.active1.fields["m_stat"] = "*Unstable*"
active1.fields["m_stat"] = "*Unstable*"
if("watch")
src.active1.fields["m_stat"] = "*Watch*"
active1.fields["m_stat"] = "*Watch*"
if("stable")
src.active1.fields["m_stat"] = "Stable"
active1.fields["m_stat"] = "Stable"
else if(href_list["blood_type"])
if(active2)
switch(href_list["blood_type"])
if("an")
src.active2.fields["blood_type"] = "A-"
active2.fields["blood_type"] = "A-"
if("bn")
src.active2.fields["blood_type"] = "B-"
active2.fields["blood_type"] = "B-"
if("abn")
src.active2.fields["blood_type"] = "AB-"
active2.fields["blood_type"] = "AB-"
if("on")
src.active2.fields["blood_type"] = "O-"
active2.fields["blood_type"] = "O-"
if("ap")
src.active2.fields["blood_type"] = "A+"
active2.fields["blood_type"] = "A+"
if("bp")
src.active2.fields["blood_type"] = "B+"
active2.fields["blood_type"] = "B+"
if("abp")
src.active2.fields["blood_type"] = "AB+"
active2.fields["blood_type"] = "AB+"
if("op")
src.active2.fields["blood_type"] = "O+"
active2.fields["blood_type"] = "O+"
else if(href_list["del_r"])
if(active2)
src.temp = "Are you sure you wish to delete the record (Medical Portion Only)?<br>\n\t<A href='?src=[REF(src)];temp=1;del_r2=1'>Yes</A><br>\n\t<A href='?src=[REF(src)];temp=1'>No</A><br>"
temp = "Are you sure you wish to delete the record (Medical Portion Only)?<br>\n\t<A href='?src=[REF(src)];temp=1;del_r2=1'>Yes</A><br>\n\t<A href='?src=[REF(src)];temp=1'>No</A><br>"
else if(href_list["del_r2"])
investigate_log("[key_name(usr)] has deleted the medical records for [active1.fields["name"]].", INVESTIGATE_RECORDS)
@@ -463,10 +454,10 @@
screen = 4
else if(href_list["new"])
if((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
if((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) )))
var/datum/data/record/R = new /datum/data/record( )
R.fields["name"] = src.active1.fields["name"]
R.fields["id"] = src.active1.fields["id"]
R.fields["name"] = active1.fields["name"]
R.fields["id"] = active1.fields["id"]
R.name = text("Medical Record #[]", R.fields["id"])
R.fields["blood_type"] = "Unknown"
R.fields["b_dna"] = "Unknown"
@@ -480,76 +471,77 @@
R.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
R.fields["notes"] = "No notes."
GLOB.data_core.medical += R
src.active2 = R
src.screen = 4
active2 = R
screen = 4
else if(href_list["add_c"])
if(!(active2 in GLOB.data_core.medical))
return
var/a2 = src.active2
var/a2 = active2
var/t1 = stripped_multiline_input("Add Comment:", "Med. records", null, null)
if(!canUseMedicalRecordsConsole(usr, t1, null, a2))
return
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
while(active2.fields[text("com_[]", counter)])
counter++
src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
else if(href_list["del_c"])
if((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
src.active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
else if(href_list["search"])
var/t1 = stripped_input(usr, "Search String: (Name, DNA, or ID)", "Med. records")
if(!canUseMedicalRecordsConsole(usr, t1))
return
src.active1 = null
src.active2 = null
active1 = null
active2 = null
t1 = lowertext(t1)
for(var/datum/data/record/R in GLOB.data_core.medical)
if((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])))
src.active2 = R
active2 = R
else
//Foreach continue //goto(3229)
if(!( src.active2 ))
src.temp = text("Could not locate record [].", sanitize(t1))
if(!( active2 ))
temp = text("Could not locate record [].", sanitize(t1))
else
for(var/datum/data/record/E in GLOB.data_core.general)
if((E.fields["name"] == src.active2.fields["name"] || E.fields["id"] == src.active2.fields["id"]))
src.active1 = E
if((E.fields["name"] == active2.fields["name"] || E.fields["id"] == active2.fields["id"]))
active1 = E
else
//Foreach continue //goto(3334)
src.screen = 4
screen = 4
else if(href_list["print_p"])
if(!( src.printing ))
src.printing = 1
if(!( printing ))
printing = 1
GLOB.data_core.medicalPrintCount++
playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1)
sleep(30)
var/obj/item/paper/P = new /obj/item/paper( src.loc )
var/obj/item/paper/P = new /obj/item/paper( loc )
P.info = "<CENTER><B>Medical Record - (MR-[GLOB.data_core.medicalPrintCount])</B></CENTER><BR>"
if(active1 in GLOB.data_core.general)
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"])
P.info += text("Name: [] ID: []<BR>\nGender: []<BR>\nAge: []<BR>", active1.fields["name"], active1.fields["id"], active1.fields["gender"], active1.fields["age"])
P.info += "\nSpecies: [active1.fields["species"]]<BR>"
P.info += text("\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
P.info += text("\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
else
P.info += "<B>General Record Lost!</B><BR>"
if(active2 in GLOB.data_core.medical)
P.info += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: []<BR>\nDNA: []<BR>\n<BR>\nMinor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nMajor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nAllergies: []<BR>\nDetails: []<BR>\n<BR>\nCurrent Diseases: [] (per disease info placed in log/comment section)<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src.active2.fields["blood_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"])
P.info += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: []<BR>\nDNA: []<BR>\n<BR>\nMinor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nMajor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nAllergies: []<BR>\nDetails: []<BR>\n<BR>\nCurrent Diseases: [] (per disease info placed in log/comment section)<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", active2.fields["blood_type"], active2.fields["b_dna"], active2.fields["mi_dis"], active2.fields["mi_dis_d"], active2.fields["ma_dis"], active2.fields["ma_dis_d"], active2.fields["alg"], active2.fields["alg_d"], active2.fields["cdi"], active2.fields["cdi_d"], active2.fields["notes"])
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", src.active2.fields[text("com_[]", counter)])
while(active2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", active2.fields[text("com_[]", counter)])
counter++
P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, src.active1.fields["name"])
P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, active1.fields["name"])
else
P.info += "<B>Medical Record Lost!</B><BR>"
P.name = text("MR-[] '[]'", GLOB.data_core.medicalPrintCount, "Record Lost")
P.info += "</TT>"
src.printing = null
P.update_icon()
printing = null
src.add_fingerprint(usr)
src.updateUsrDialog()
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/computer/med_data/emp_act(severity)
@@ -560,11 +552,11 @@
switch(rand(1,6))
if(1)
if(prob(10))
R.fields["name"] = random_unique_lizard_name(R.fields["sex"],1)
R.fields["name"] = random_unique_lizard_name(R.fields["gender"],1)
else
R.fields["name"] = random_unique_name(R.fields["sex"],1)
R.fields["name"] = random_unique_name(R.fields["gender"],1)
if(2)
R.fields["sex"] = pick("Male", "Female")
R.fields["gender"] = pick("Male", "Female", "Other")
if(3)
R.fields["age"] = rand(AGE_MIN, AGE_MAX)
if(4)
@@ -583,7 +575,7 @@
if(user)
if(message)
if(authenticated)
if(user.canUseTopic(src))
if(user.canUseTopic(src, BE_CLOSE))
if(!record1 || record1 == active1)
if(!record2 || record2 == active2)
return 1
-142
View File
@@ -1,143 +1 @@
/obj/machinery/computer/prisoner
name = "prisoner management console"
desc = "Used to manage tracking implants placed inside criminals."
icon_screen = "explosive"
icon_keyboard = "security_key"
req_access = list(ACCESS_BRIG)
var/id = 0
var/temp = null
var/status = 0
var/timeleft = 60
var/stop = 0
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
var/obj/item/card/id/prisoner/inserted_id
circuit = /obj/item/circuitboard/computer/prisoner
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/prisoner/ui_interact(mob/user)
. = ..()
var/dat = ""
if(screen == 0)
dat += "<HR><A href='?src=[REF(src)];lock=1'>Unlock Console</A>"
else if(screen == 1)
dat += "<H3>Prisoner ID Management</H3>"
if(inserted_id)
dat += text("<A href='?src=[REF(src)];id=eject'>[inserted_id]</A><br>")
dat += text("Collected Points: [inserted_id.points]. <A href='?src=[REF(src)];id=reset'>Reset.</A><br>")
dat += text("Card goal: [inserted_id.goal]. <A href='?src=[REF(src)];id=setgoal'>Set </A><br>")
dat += text("Space Law recommends quotas of 100 points per minute they would normally serve in the brig.<BR>")
else
dat += text("<A href='?src=[REF(src)];id=insert'>Insert Prisoner ID.</A><br>")
dat += "<H3>Prisoner Implant Management</H3>"
dat += "<HR>Chemical Implants<BR>"
var/turf/Tr = null
for(var/obj/item/implant/chem/C in GLOB.tracked_chem_implants)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z))
continue//Out of range
if(!C.imp_in)
continue
dat += "ID: [C.imp_in.name] | Remaining Units: [C.reagents.total_volume] <BR>"
dat += "| Inject: "
dat += "<A href='?src=[REF(src)];inject1=[REF(C)]'>(<font class='bad'>(1)</font>)</A>"
dat += "<A href='?src=[REF(src)];inject5=[REF(C)]'>(<font class='bad'>(5)</font>)</A>"
dat += "<A href='?src=[REF(src)];inject10=[REF(C)]'>(<font class='bad'>(10)</font>)</A><BR>"
dat += "********************************<BR>"
dat += "<HR>Tracking Implants<BR>"
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
if(!isliving(T.imp_in))
continue
Tr = get_turf(T)
if((Tr) && (Tr.z != src.z))
continue//Out of range
var/loc_display = "Unknown"
var/mob/living/M = T.imp_in
if(is_station_level(Tr.z) && !isspaceturf(M.loc))
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
dat += "ID: [T.imp_in.name] | Location: [loc_display]<BR>"
dat += "<A href='?src=[REF(src)];warn=[REF(T)]'>(<font class='bad'><i>Message Holder</i></font>)</A> |<BR>"
dat += "********************************<BR>"
dat += "<HR><A href='?src=[REF(src)];lock=1'>Lock Console</A>"
var/datum/browser/popup = new(user, "computer", "Prisoner Management Console", 400, 500)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id))
return attack_hand(user)
else
return ..()
/obj/machinery/computer/prisoner/process()
if(!..())
src.updateDialog()
return
/obj/machinery/computer/prisoner/Topic(href, href_list)
if(..())
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
usr.set_machine(src)
if(href_list["id"])
if(href_list["id"] =="insert" && !inserted_id)
var/obj/item/card/id/prisoner/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
inserted_id = I
else
to_chat(usr, "<span class='danger'>No valid ID.</span>")
else if(inserted_id)
switch(href_list["id"])
if("eject")
inserted_id.forceMove(drop_location())
inserted_id.verb_pickup()
inserted_id = null
if("reset")
inserted_id.points = 0
if("setgoal")
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
if(num >= 0)
num = min(num,1000) //Cap the quota to the equivilent of 10 minutes.
inserted_id.goal = num
else if(href_list["inject1"])
var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(1)
else if(href_list["inject5"])
var/obj/item/implant/I = locate(href_list["inject5"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(5)
else if(href_list["inject10"])
var/obj/item/implant/I = locate(href_list["inject10"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(10)
else if(href_list["lock"])
if(src.allowed(usr))
screen = !screen
else
to_chat(usr, "Unauthorized Access.")
else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
if(!warning)
return
var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants
if(I && istype(I) && I.imp_in)
var/mob/living/R = I.imp_in
to_chat(R, "<span class='italics'>You hear a voice in your head saying: '[warning]'</span>")
log_directed_talk(usr, R, warning, LOG_SAY, "implant message")
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -0,0 +1,52 @@
/obj/machinery/computer/prisoner
var/obj/item/card/id/prisoner/contained_id
/obj/machinery/computer/prisoner/Destroy()
if(contained_id)
contained_id.forceMove(get_turf(src))
return ..()
/obj/machinery/computer/prisoner/examine(mob/user)
. = ..()
if(contained_id)
. += "<span class='notice'><b>Alt-click</b> to eject the ID card.</span>"
/obj/machinery/computer/prisoner/AltClick(mob/user)
id_eject(user)
return ..()
/obj/machinery/computer/prisoner/proc/id_insert(mob/user, obj/item/card/id/prisoner/P)
if(istype(P))
if(contained_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(P, src))
return
contained_id = P
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/computer/prisoner/proc/id_eject(mob/user)
if(!contained_id)
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
return
else
contained_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(contained_id)
contained_id = null
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id/prisoner))
id_insert(user, I)
else
return ..()
@@ -0,0 +1,142 @@
//computer that handle the points and teleports the prisoner
/obj/machinery/computer/prisoner/gulag_teleporter_computer
name = "labor camp teleporter console"
desc = "Used to send criminals to the Labor Camp."
icon_screen = "explosive"
icon_keyboard = "security_key"
req_access = list(ACCESS_ARMORY)
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
var/default_goal = 200
var/obj/machinery/gulag_teleporter/teleporter = null
var/obj/structure/gulag_beacon/beacon = null
var/mob/living/carbon/human/prisoner = null
var/datum/data/record/temporary_record = null
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/prisoner/gulag_teleporter_computer/Initialize()
. = ..()
scan_machinery()
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
ui.open()
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_data(mob/user)
var/list/data = list()
var/list/prisoner_list = list()
var/can_teleport = FALSE
if(teleporter && (teleporter.occupant && ishuman(teleporter.occupant)))
prisoner = teleporter.occupant
prisoner_list["name"] = prisoner.real_name
if(contained_id)
can_teleport = TRUE
if(!isnull(GLOB.data_core.general))
for(var/r in GLOB.data_core.security)
var/datum/data/record/R = r
if(R.fields["name"] == prisoner_list["name"])
temporary_record = R
prisoner_list["crimstat"] = temporary_record.fields["criminal"]
data["prisoner"] = prisoner_list
if(teleporter)
data["teleporter"] = teleporter
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
data["teleporter_lock"] = teleporter.locked
data["teleporter_state_open"] = teleporter.state_open
if(beacon)
data["beacon"] = beacon
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
if(contained_id)
data["id"] = contained_id
data["id_name"] = contained_id.registered_name
data["goal"] = contained_id.goal
data["can_teleport"] = can_teleport
return data
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_act(action, list/params)
if(isliving(usr))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if(..())
return
if(!allowed(usr))
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
switch(action)
if("scan_teleporter")
teleporter = findteleporter()
if("scan_beacon")
beacon = findbeacon()
if("handle_id")
if(contained_id)
id_eject(usr)
else
id_insert(usr)
if("set_goal")
var/new_goal = input("Set the amount of points:", "Points", contained_id.goal) as num|null
if(!isnum(new_goal))
return
if(!new_goal)
new_goal = default_goal
if (new_goal > 1000)
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
if("toggle_open")
if(teleporter.locked)
to_chat(usr, "The teleporter is locked")
return
teleporter.toggle_open()
if("teleporter_lock")
if(teleporter.state_open)
to_chat(usr, "Close the teleporter before locking!")
return
teleporter.locked = !teleporter.locked
if("teleport")
if(!teleporter || !beacon)
return
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/scan_machinery()
teleporter = findteleporter()
beacon = findbeacon()
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(var/direction in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
if(teleporterf && teleporterf.is_operational())
return teleporterf
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/findbeacon()
return locate(/obj/structure/gulag_beacon)
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/teleport(mob/user)
if(!contained_id) //incase the ID was removed after the transfer timer was set.
say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!")
return
var/id_goal_not_set
if(!contained_id.goal)
id_goal_not_set = TRUE
contained_id.goal = default_goal
say("[contained_id]'s ID card goal defaulting to [contained_id.goal] points.")
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][contained_id.goal] points.")
teleporter.handle_prisoner(contained_id, temporary_record)
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
prisoner.forceMove(get_turf(beacon))
prisoner.Stun(40) // small travel dizziness
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
playsound(src, "sparks", 50, 1)
if(teleporter.locked)
teleporter.locked = FALSE
teleporter.toggle_open()
contained_id = null
temporary_record = null
@@ -0,0 +1,139 @@
/obj/machinery/computer/prisoner/management
name = "prisoner management console"
desc = "Used to manage tracking implants placed inside criminals."
icon_screen = "explosive"
icon_keyboard = "security_key"
req_access = list(ACCESS_BRIG)
var/id = 0
var/temp = null
var/status = 0
var/timeleft = 60
var/stop = 0
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
circuit = /obj/item/circuitboard/computer/prisoner
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/prisoner/management/ui_interact(mob/user)
. = ..()
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
var/dat = ""
if(screen == 0)
dat += "<HR><A href='?src=[REF(src)];lock=1'>{Log In}</A>"
else if(screen == 1)
dat += "<H3>Prisoner ID Management</H3>"
if(contained_id)
dat += text("<A href='?src=[REF(src)];id=eject'>[contained_id]</A><br>")
dat += text("Collected Points: [contained_id.points]. <A href='?src=[REF(src)];id=reset'>Reset.</A><br>")
dat += text("Card goal: [contained_id.goal]. <A href='?src=[REF(src)];id=setgoal'>Set </A><br>")
dat += text("Space Law recommends quotas of 100 points per minute they would normally serve in the brig.<BR>")
else
dat += text("<A href='?src=[REF(src)];id=insert'>Insert Prisoner ID.</A><br>")
dat += "<H3>Prisoner Implant Management</H3>"
dat += "<HR>Chemical Implants<BR>"
var/turf/Tr = null
for(var/obj/item/implant/chem/C in GLOB.tracked_chem_implants)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z))
continue//Out of range
if(!C.imp_in)
continue
dat += "ID: [C.imp_in.name] | Remaining Units: [C.reagents.total_volume] <BR>"
dat += "| Inject: "
dat += "<A href='?src=[REF(src)];inject1=[REF(C)]'>(<font class='bad'>(1)</font>)</A>"
dat += "<A href='?src=[REF(src)];inject5=[REF(C)]'>(<font class='bad'>(5)</font>)</A>"
dat += "<A href='?src=[REF(src)];inject10=[REF(C)]'>(<font class='bad'>(10)</font>)</A><BR>"
dat += "********************************<BR>"
dat += "<HR>Tracking Implants<BR>"
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
if(!isliving(T.imp_in))
continue
Tr = get_turf(T)
if((Tr) && (Tr.z != src.z))
continue//Out of range
var/loc_display = "Unknown"
var/mob/living/M = T.imp_in
if(is_station_level(Tr.z) && !isspaceturf(M.loc))
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
dat += "ID: [T.imp_in.name] | Location: [loc_display]<BR>"
dat += "<A href='?src=[REF(src)];warn=[REF(T)]'>(<font class='bad'><i>Message Holder</i></font>)</A> |<BR>"
dat += "********************************<BR>"
dat += "<HR><A href='?src=[REF(src)];lock=1'>{Log Out}</A>"
var/datum/browser/popup = new(user, "computer", "Prisoner Management Console", 400, 500)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/machinery/computer/prisoner/management/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id))
if(screen)
id_insert(user)
else
to_chat(user, "<span class='danger'>Unauthorized access.</span>")
else
return ..()
/obj/machinery/computer/prisoner/management/process()
if(!..())
src.updateDialog()
return
/obj/machinery/computer/prisoner/management/Topic(href, href_list)
if(..())
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
usr.set_machine(src)
if(href_list["id"])
if(href_list["id"] =="insert" && !contained_id)
id_insert(usr)
else if(contained_id)
switch(href_list["id"])
if("eject")
id_eject(usr)
if("reset")
contained_id.points = 0
if("setgoal")
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
if(num >= 0)
num = min(num,1000) //Cap the quota to the equivilent of 10 minutes.
contained_id.goal = num
else if(href_list["inject1"])
var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(1)
else if(href_list["inject5"])
var/obj/item/implant/I = locate(href_list["inject5"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(5)
else if(href_list["inject10"])
var/obj/item/implant/I = locate(href_list["inject10"]) in GLOB.tracked_chem_implants
if(I && istype(I))
I.activate(10)
else if(href_list["lock"])
if(allowed(usr))
screen = !screen
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
else
to_chat(usr, "<span class='danger'>Unauthorized access.</span>")
else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
if(!warning)
return
var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants
if(I && istype(I) && I.imp_in)
var/mob/living/R = I.imp_in
to_chat(R, "<span class='italics'>You hear a voice in your head saying: '[warning]'</span>")
log_directed_talk(usr, R, warning, LOG_SAY, "implant message")
src.add_fingerprint(usr)
src.updateUsrDialog()
return
+37 -78
View File
@@ -5,13 +5,10 @@
icon_keyboard = "security_key"
req_one_access = list(ACCESS_SECURITY, ACCESS_FORENSICS_LOCKERS)
circuit = /obj/item/circuitboard/computer/secure_data
var/obj/item/card/id/scan = null
var/authenticated = null
var/rank = null
var/screen = null
var/datum/data/record/active1 = null
var/datum/data/record/active2 = null
var/a_id = null
var/temp = null
var/printing = null
var/can_change_id = 0
@@ -23,11 +20,6 @@
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/secure_data/examine(mob/user)
..()
if(scan)
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
/obj/machinery/computer/secure_data/syndie
icon_keyboard = "syndie_key"
@@ -40,32 +32,19 @@
clockwork = TRUE //it'd look weird
pass_flags = PASSTABLE
/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id))
if(!scan)
if(!user.transferItemToLoc(O, src))
return
scan = O
to_chat(user, "<span class='notice'>You insert [O].</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
updateUsrDialog()
else
to_chat(user, "<span class='warning'>There's already an ID card in the console.</span>")
else
return ..()
//Someone needs to break down the dat += into chunks instead of long ass lines.
/obj/machinery/computer/secure_data/ui_interact(mob/user)
. = ..()
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if(src.z > 6)
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
return
var/dat
if(temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=[REF(src)];choice=Clear Screen'>Clear Screen</A>", temp)
dat = "<TT>[temp]</TT><BR><BR><A href='?src=[REF(src)];choice=Clear Screen'>Clear Screen</A>"
else
dat = text("Confirm Identity: <A href='?src=[REF(src)];choice=Confirm Identity'>[]</A><HR>", (scan ? text("[]", scan.name) : "----------"))
dat = ""
if(authenticated)
switch(screen)
if(1)
@@ -190,7 +169,7 @@
dat += {"<table><tr><td><table>
<tr><td>Name:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=name'>&nbsp;[active1.fields["name"]]&nbsp;</A></td></tr>
<tr><td>ID:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=id'>&nbsp;[active1.fields["id"]]&nbsp;</A></td></tr>
<tr><td>Sex:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=sex'>&nbsp;[active1.fields["sex"]]&nbsp;</A></td></tr>
<tr><td>Gender:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=gender'>&nbsp;[active1.fields["gender"]]&nbsp;</A></td></tr>
<tr><td>Age:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=age'>&nbsp;[active1.fields["age"]]&nbsp;</A></td></tr>"}
dat += "<tr><td>Species:</td><td><A href ='?src=[REF(src)];choice=Edit Field;field=species'>&nbsp;[active1.fields["species"]]&nbsp;</A></td></tr>"
dat += {"<tr><td>Rank:</td><td><A href='?src=[REF(src)];choice=Edit Field;field=rank'>&nbsp;[active1.fields["rank"]]&nbsp;</A></td></tr>
@@ -309,36 +288,39 @@ What a mess.*/
active1 = null
active2 = null
if("Confirm Identity")
eject_id(usr)
if("Log Out")
authenticated = null
screen = null
active1 = null
active2 = null
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
if("Log In")
if(issilicon(usr))
var/mob/living/silicon/borg = usr
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(issilicon(M))
var/mob/living/silicon/borg = M
active1 = null
active2 = null
authenticated = borg.name
rank = "AI"
screen = 1
else if(IsAdminGhost(usr))
else if(IsAdminGhost(M))
active1 = null
active2 = null
authenticated = usr.client.holder.admin_signature
authenticated = M.client.holder.admin_signature
rank = "Central Command"
screen = 1
else if(istype(scan, /obj/item/card/id))
else if(I && check_access(I))
active1 = null
active2 = null
if(check_access(scan))
authenticated = scan.registered_name
rank = scan.assignment
screen = 1
authenticated = I.registered_name
rank = I.assignment
screen = 1
else
to_chat(usr, "<span class='danger'>Unauthorized Access.</span>")
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
//RECORD FUNCTIONS
if("Record Maintenance")
screen = 2
@@ -346,16 +328,14 @@ What a mess.*/
active2 = null
if("Browse Record")
var/datum/data/record/R = locate(href_list["d_rec"])
var/S = locate(href_list["d_rec"])
if(!( GLOB.data_core.general.Find(R) ))
var/datum/data/record/R = locate(href_list["d_rec"]) in GLOB.data_core.general
if(!R)
temp = "Record Not Found!"
else
active1 = active2 = R
for(var/datum/data/record/E in GLOB.data_core.security)
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
S = E
active1 = R
active2 = S
active2 = E
screen = 3
@@ -368,7 +348,7 @@ What a mess.*/
var/obj/item/paper/P = new /obj/item/paper( loc )
P.info = "<CENTER><B>Security Record - (SR-[GLOB.data_core.securityPrintCount])</B></CENTER><BR>"
if((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)))
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>", active1.fields["name"], active1.fields["id"], active1.fields["sex"], active1.fields["age"])
P.info += text("Name: [] ID: []<BR>\nGender: []<BR>\nAge: []<BR>", active1.fields["name"], active1.fields["id"], active1.fields["gender"], active1.fields["age"])
P.info += "\nSpecies: [active1.fields["species"]]<BR>"
P.info += text("\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
else
@@ -419,6 +399,7 @@ What a mess.*/
P.info += "<B>Security Record Lost!</B><BR>"
P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, "Record Lost")
P.info += "</TT>"
P.update_icon()
printing = null
if("Print Poster")
if(!( printing ))
@@ -512,7 +493,7 @@ What a mess.*/
G.fields["name"] = "New Record"
G.fields["id"] = "[num2hex(rand(1, 1.6777215E7), 6)]"
G.fields["rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["gender"] = "Male"
G.fields["age"] = "Unknown"
G.fields["species"] = "Human"
G.fields["photo_front"] = new /icon()
@@ -584,12 +565,14 @@ What a mess.*/
if(!canUseSecurityRecordsConsole(usr, t1, a1))
return
active1.fields["fingerprint"] = t1
if("sex")
if("gender")
if(istype(active1, /datum/data/record))
if(active1.fields["sex"] == "Male")
active1.fields["sex"] = "Female"
if(active1.fields["gender"] == "Male")
active1.fields["gender"] = "Female"
else if(active1.fields["gender"] == "Female")
active1.fields["gender"] = "Other"
else
active1.fields["sex"] = "Male"
active1.fields["gender"] = "Male"
if("age")
if(istype(active1, /datum/data/record))
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
@@ -767,19 +750,14 @@ What a mess.*/
P = user.get_active_held_item()
return P
/obj/machinery/computer/secure_data/proc/print_photo(icon/temp, name)
/obj/machinery/computer/secure_data/proc/print_photo(icon/temp, person_name)
if (printing)
return
printing = TRUE
sleep(20)
var/obj/item/photo/P = new/obj/item/photo(drop_location())
var/icon/small_img = icon(temp)
var/icon/ic = icon('icons/obj/items_and_weapons.dmi',"photo")
small_img.Scale(8, 8)
ic.Blend(small_img,ICON_OVERLAY, 13, 13)
P.icon = ic
P.picture.picture_image = temp
P.desc = "The photo on file for [name]."
var/datum/picture/toEmbed = new(name = person_name, desc = "The photo on file for [person_name].", image = temp)
P.set_picture(toEmbed, TRUE, TRUE)
P.pixel_x = rand(-10, 10)
P.pixel_y = rand(-10, 10)
printing = FALSE
@@ -799,7 +777,7 @@ What a mess.*/
else
R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
R.fields["gender"] = pick("Male", "Female", "Other")
if(3)
R.fields["age"] = rand(5, 85)
if(4)
@@ -823,7 +801,7 @@ What a mess.*/
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
if(user)
if(authenticated)
if(user.canUseTopic(src))
if(user.canUseTopic(src, BE_CLOSE))
if(!trim(message1))
return 0
if(!record1 || record1 == active1)
@@ -831,22 +809,3 @@ What a mess.*/
return 1
return 0
/obj/machinery/computer/secure_data/AltClick(mob/user)
if(user.canUseTopic(src))
eject_id(user)
/obj/machinery/computer/secure_data/proc/eject_id(mob/user)
if(scan)
scan.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(scan)
scan = null
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else //switching the ID with the one you're holding
if(issilicon(user) || !Adjacent(user))
return
var/obj/item/card/id/held_id = user.is_holding_item_of_type(/obj/item/card/id)
if(QDELETED(held_id) || !user.transferItemToLoc(held_id, src))
return
scan = held_id
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+10 -31
View File
@@ -9,7 +9,6 @@
idle_power_usage = 100
active_power_usage = 2500
var/list/stored_items = list()
var/obj/item/card/id/prisoner/inserted_id = null
var/obj/machinery/gulag_teleporter/linked_teleporter = null
/obj/machinery/gulag_item_reclaimer/Destroy()
@@ -18,9 +17,6 @@
I.forceMove(get_turf(src))
if(linked_teleporter)
linked_teleporter.linked_reclaimer = null
if(inserted_id)
inserted_id.forceMove(get_turf(src))
inserted_id = null
return ..()
/obj/machinery/gulag_item_reclaimer/emag_act(mob/user)
@@ -31,18 +27,6 @@
obj_flags |= EMAGGED
return TRUE
/obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id))
if(!inserted_id)
if(!user.transferItemToLoc(I, src))
return
inserted_id = I
to_chat(user, "<span class='notice'>You insert [I].</span>")
return
else
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
return ..()
/obj/machinery/gulag_item_reclaimer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -57,15 +41,19 @@
if(allowed(user))
can_reclaim = TRUE
if(inserted_id)
data["id"] = inserted_id
data["id_name"] = inserted_id.registered_name
if(inserted_id.points >= inserted_id.goal)
var/obj/item/card/id/I = user.get_idcard(TRUE)
if(istype(I, /obj/item/card/id/prisoner))
var/obj/item/card/id/prisoner/P = I
if(P.points >= P.goal)
can_reclaim = TRUE
var/list/mobs = list()
for(var/i in stored_items)
var/mob/thismob = i
if(QDELETED(thismob))
say("Alert! Unable to locate vital signals of a previously processed prisoner. Ejecting equipment!")
drop_items(thismob)
continue
var/list/mob_info = list()
mob_info["name"] = thismob.real_name
mob_info["mob"] = "[REF(thismob)]"
@@ -80,16 +68,6 @@
/obj/machinery/gulag_item_reclaimer/ui_act(action, list/params)
switch(action)
if("handle_id")
if(inserted_id)
usr.put_in_hands(inserted_id)
inserted_id = null
else
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
if(I)
if(!usr.transferItemToLoc(I, src))
return
inserted_id = I
if("release_items")
var/mob/M = locate(params["mobref"])
if(M == usr || allowed(usr))
@@ -100,8 +78,9 @@
/obj/machinery/gulag_item_reclaimer/proc/drop_items(mob/user)
if(!stored_items[user])
return
var/drop_location = drop_location()
for(var/i in stored_items[user])
var/obj/item/W = i
stored_items[user] -= W
W.forceMove(get_turf(src))
W.forceMove(drop_location)
stored_items -= user
@@ -42,6 +42,9 @@
/obj/effect/decal/cleanable/glass/ex_act()
qdel(src)
/obj/effect/decal/cleanable/glass/plasma
icon_state = "plasmatiny"
/obj/effect/decal/cleanable/dirt
name = "dirt"
desc = "Someone should clean that up."
@@ -36,4 +36,203 @@
/obj/effect/turf_decal/tile/neutral
name = "neutral corner"
color = "#D4D4D4"
alpha = 50
alpha = 50
/obj/effect/turf_decal/trimline
layer = TURF_PLATING_DECAL_LAYER
alpha = 110
icon_state = "trimline_box"
/obj/effect/turf_decal/trimline/white
color = "#FFFFFF"
/obj/effect/turf_decal/trimline/white/line
name = "trim decal"
icon_state = "trimline"
/obj/effect/turf_decal/trimline/white/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/white/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/white/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/white/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/white/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/white/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/red
color = "#DE3A3A"
/obj/effect/turf_decal/trimline/red/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/red/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/red/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/red/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/red/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/red/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/red/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/green
color = "#9FED58"
/obj/effect/turf_decal/trimline/green/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/green/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/green/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/green/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/green/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/green/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/green/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/blue
color = "#52B4E9"
/obj/effect/turf_decal/trimline/blue/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/blue/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/blue/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/blue/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/blue/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/blue/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/blue/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/yellow
color = "#EFB341"
/obj/effect/turf_decal/trimline/yellow/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/yellow/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/yellow/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/yellow/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/yellow/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/yellow/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/yellow/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/purple
color = "#D381C9"
/obj/effect/turf_decal/trimline/purple/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/purple/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/purple/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/purple/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/purple/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/purple/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/purple/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/brown
color = "#A46106"
/obj/effect/turf_decal/trimline/brown/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/brown/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/brown/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/brown/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/brown/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/brown/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/brown/filled/end
icon_state = "trimline_end_fill"
/obj/effect/turf_decal/trimline/neutral
color = "#D4D4D4"
alpha = 50
/obj/effect/turf_decal/trimline/neutral/line
icon_state = "trimline"
/obj/effect/turf_decal/trimline/neutral/corner
icon_state = "trimline_corner"
/obj/effect/turf_decal/trimline/neutral/end
icon_state = "trimline_end"
/obj/effect/turf_decal/trimline/neutral/filled
icon_state = "trimline_box_fill"
/obj/effect/turf_decal/trimline/neutral/filled/line
icon_state = "trimline_fill"
/obj/effect/turf_decal/trimline/neutral/filled/corner
icon_state = "trimline_corner_fill"
/obj/effect/turf_decal/trimline/brown/filled/end
icon_state = "trimline_end_fill"
+1
View File
@@ -68,6 +68,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
var/breakouttime = 0
var/list/materials
var/reskinned = FALSE
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
+52 -2
View File
@@ -37,6 +37,7 @@ RLD
var/has_ammobar = FALSE //controls whether or not does update_icon apply ammo indicator overlays
var/ammo_sections = 10 //amount of divisions in the ammo indicator overlay/number of ammo indicator states
var/custom_range = 7
var/upgrade = FALSE
/obj/item/construction/Initialize()
. = ..()
@@ -82,6 +83,11 @@ RLD
loaded = loadwithsheets(W, sheetmultiplier * 0.25, user) // 1 matter for 1 floortile, as 4 tiles are produced from 1 metal
if(loaded)
to_chat(user, "<span class='notice'>[src] now holds [matter]/[max_matter] matter-units.</span>")
else if(istype(W, /obj/item/rcd_upgrade))
to_chat(user, "<span class='notice'>You upgrade the RCD with the [W]!</span>")
upgrade = TRUE
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
qdel(W)
else
return ..()
update_icon() //ensures that ammo counters (if present) get updated
@@ -148,6 +154,7 @@ RLD
has_ammobar = TRUE
var/mode = 1
var/ranged = FALSE
var/computer_dir = 1
var/airlock_type = /obj/machinery/door/airlock
var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use
var/window_type = /obj/structure/window/fulltile
@@ -270,6 +277,28 @@ RLD
return FALSE
return TRUE
/obj/item/construction/rcd/proc/change_computer_dir(mob/user)
if(!user)
return
var/list/computer_dirs = list(
"NORTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "cnorth"),
"EAST" = image(icon = 'icons/mob/radial.dmi', icon_state = "ceast"),
"SOUTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "csouth"),
"WEST" = image(icon = 'icons/mob/radial.dmi', icon_state = "cwest")
)
var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
if(!check_menu(user))
return
switch(computerdirs)
if("NORTH")
computer_dir = 1
if("EAST")
computer_dir = 4
if("SOUTH")
computer_dir = 2
if("WEST")
computer_dir = 8
/obj/item/construction/rcd/proc/change_airlock_setting(mob/user)
if(!user)
return
@@ -434,10 +463,15 @@ RLD
..()
var/list/choices = list(
"Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"),
"Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"),
"Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"),
"Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor")
)
if(upgrade)
choices += list(
"Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"),
"Machine Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "machine"),
"Computer Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "computer_dir"),
)
if(mode == RCD_AIRLOCK)
choices += list(
"Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"),
@@ -459,6 +493,12 @@ RLD
mode = RCD_DECONSTRUCT
if("Grilles & Windows")
mode = RCD_WINDOWGRILLE
if("Machine Frames")
mode = RCD_MACHINE
if("Computer Frames")
mode = RCD_COMPUTER
change_computer_dir(user)
return
if("Change Access")
change_airlock_access(user)
return
@@ -511,6 +551,7 @@ RLD
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
desc = "A device used to rapidly build walls and floors."
canRturf = TRUE
upgrade = TRUE
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
@@ -542,6 +583,9 @@ RLD
/obj/item/construction/rcd/loaded
matter = 160
/obj/item/construction/rcd/loaded/upgraded
upgrade = TRUE
/obj/item/construction/rcd/combat
name = "Combat RCD"
desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges. This RCD has been upgraded to be able to remove Rwalls!"
@@ -582,7 +626,7 @@ RLD
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
upgrade = TRUE
// Ranged RCD
@@ -776,6 +820,12 @@ RLD
return TRUE
return FALSE
/obj/item/rcd_upgrade
name = "RCD advanced design disk"
desc = "It contains the design for machine frames, computer frames, and deconstruction."
icon = 'icons/obj/module.dmi'
icon_state = "datadisk3"
#undef GLOW_MODE
#undef LIGHT_MODE
#undef REMOVE_MODE
@@ -162,10 +162,11 @@
/obj/item/circuitboard/computer/prisoner
name = "Prisoner Management Console (Computer Board)"
build_path = /obj/machinery/computer/prisoner
build_path = /obj/machinery/computer/prisoner/management
/obj/item/circuitboard/computer/gulag_teleporter_console
name = "Labor Camp teleporter console (Computer Board)"
build_path = /obj/machinery/computer/gulag_teleporter_computer
build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer
/obj/item/circuitboard/computer/rdconsole/production
name = "R&D Console Production Only (Computer Board)"
@@ -373,4 +374,4 @@
/obj/item/circuitboard/computer/nanite_cloud_controller
name = "Nanite Cloud Control (Computer Board)"
build_path = /obj/machinery/computer/nanite_cloud_controller
build_path = /obj/machinery/computer/nanite_cloud_controller
@@ -32,6 +32,24 @@
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
var/mode = 0
/obj/item/multitool/chaplain
name = "\improper hypertool"
desc = "Used for pulsing wires to test which to cut. Also emits microwaves to fry some brains!"
damtype = BRAIN
force = 18
armour_penetration = 35
hitsound = 'sound/effects/sparks4.ogg'
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
throw_speed = 3
throw_range = 4
throwforce = 10
obj_flags = UNIQUE_RENAME
/obj/item/multitool/chaplain/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE)
/obj/item/multitool/examine(mob/user)
..()
if(selected_io)
+52 -6
View File
@@ -229,8 +229,8 @@
throwforce = 10
w_class = WEIGHT_CLASS_TINY
obj_flags = UNIQUE_RENAME
var/reskinned = FALSE
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/nullrod/Initialize()
. = ..()
@@ -247,9 +247,12 @@
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
if(GLOB.holy_weapon_type)
return
var/obj/item/nullrod/holy_weapon
var/obj/item/holy_weapon
var/list/holy_weapons_list = typesof(/obj/item/nullrod) + list(
/obj/item/melee/transforming/energy/sword/cx/chaplain
/obj/item/twohanded/dualsaber/hypereutactic/chaplain,
/obj/item/gun/energy/laser/redtag/hitscan/chaplain,
/obj/item/multitool/chaplain,
/obj/item/melee/baseball_bat/chaplain
)
var/list/display_names = list()
for(var/V in holy_weapons_list)
@@ -273,6 +276,13 @@
qdel(src)
M.put_in_active_hand(holy_weapon)
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
user.setDir(i)
if(i == WEST)
user.emote("flip")
sleep(1)
/obj/item/nullrod/godhand
icon_state = "disintegrate"
item_state = "disintegrate"
@@ -328,7 +338,6 @@
sharpness = IS_SHARP
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
@@ -522,7 +531,6 @@
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_HUGE
attack_verb = list("smashed", "bashed", "hammered", "crunched")
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/nullrod/chainsaw
name = "chainsaw hand"
@@ -585,6 +593,7 @@
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
slot_flags = ITEM_SLOT_BELT
force = 12
reach = 2
attack_verb = list("whipped", "lashed")
hitsound = 'sound/weapons/chainhit.ogg'
@@ -661,6 +670,44 @@
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
/obj/item/nullrod/claymore/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Knockdown(60)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
else
user.take_bodypart_damage(2*force)
return
if(iscyborg(target))
return ..()
if(!isliving(target))
return ..()
var/mob/living/carbon/C = target
if(C.stat || C.health < 0 || C.staminaloss > 130 )
to_chat(user, "<span class='warning'>It would be dishonorable to attack a foe while they cannot retaliate.</span>")
return
if(user.a_intent == INTENT_DISARM)
if(!ishuman(target))
return ..()
var/mob/living/carbon/human/H = target
var/list/fluffmessages = list("[user] clubs [H] with [src]!", \
"[user] smacks [H] with the butt of [src]!", \
"[user] broadsides [H] with [src]!", \
"[user] smashes [H]'s head with [src]!", \
"[user] beats [H] with front of [src]!", \
"[user] twirls and slams [H] with [src]!")
H.visible_message("<span class='warning'>[pick(fluffmessages)]</span>", \
"<span class='userdanger'>[pick(fluffmessages)]</span>")
playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, 1, -1)
H.adjustStaminaLoss(rand(12,18))
if(prob(25))
(INVOKE_ASYNC(src, .proc/jedi_spin, user))
else
return ..()
/obj/item/nullrod/tribal_knife
icon_state = "crysknife"
item_state = "crysknife"
@@ -674,7 +721,6 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
item_flags = SLOWS_WHILE_IN_HAND
total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/nullrod/tribal_knife/Initialize(mapload)
. = ..()
+1 -1
View File
@@ -229,7 +229,7 @@
target.LAssailant = null
else
target.LAssailant = user
cooldown = world.time + 40
cooldown = world.time
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
/obj/item/melee/classic_baton/telescopic
+29 -1
View File
@@ -629,7 +629,7 @@
/obj/item/toy/plush/mothplushie
name = "insect plushie"
desc = "An adorable stuffed toy that resembles some kind of insect"
desc = "An adorable stuffed toy that resembles some kind of insect."
icon_state = "bumble"
item_state = "bumble"
squeak_override = list('modular_citadel/sound/voice/mothsqueak.ogg' = 1)
@@ -773,8 +773,10 @@
item_state = "blep"
/obj/item/toy/plush/mammal/circe
desc = "A luxuriously soft toy that resembles a nine-tailed kitsune."
icon_state = "circe"
item_state = "circe"
attack_verb = list("medicated", "tailhugged", "kissed")
/obj/item/toy/plush/mammal/robin
icon_state = "robin"
@@ -839,8 +841,10 @@
item_state = "rae"
/obj/item/toy/plush/mammal/zed
desc = "A masked stuffed toy that resembles a fierce miner. He even comes with his own little crusher!"
icon_state = "zed"
item_state = "zed"
attack_verb = list("ENDED", "CRUSHED", "GNOMED")
/obj/item/toy/plush/mammal/justin
icon_state = "justin"
@@ -852,6 +856,12 @@
item_state = "reece"
attack_verb = list("healed", "cured", "demoted")
/obj/item/toy/plush/mammal/redwood
desc = "An adorable stuffed toy resembling a Nanotrasen Captain. That just happens to be a bunny."
icon_state = "redwood"
item_state = "redwood"
attack_verb = list("ordered", "bapped", "reprimanded")
/obj/item/toy/plush/mammal/dog
desc = "An adorable stuffed toy that resembles a canine."
icon_state = "katlin"
@@ -898,6 +908,12 @@
obj_flags = UNIQUE_RENAME
unique_reskin = list("Goodboye" = "fritz", "Badboye" = "fritz_bad")
/obj/item/toy/plush/mammal/dog/jesse
desc = "An adorable wolf toy that resembles a cream-colored wolf. He has a little pride flag!"
icon_state = "jesse"
item_state = "jesse"
attack_verb = list("greeted", "merc'd", "howdy'd")
/obj/item/toy/plush/catgirl
name = "feline plushie"
desc = "An adorable stuffed toy that resembles a feline."
@@ -935,3 +951,15 @@
item_state = "fermis"
attack_verb = list("cuddled", "petpatted", "wigglepurred")
squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1)
/obj/item/toy/plush/catgirl/mariaf
desc = "An adorable stuffed toy that resembles a very tall cat girl."
icon_state = "mariaf"
item_state = "mariaf"
attack_verb = list("hugged", "stabbed", "licked")
/obj/item/toy/plush/catgirl/maya
desc = "An adorable stuffed toy that resembles an angry cat girl. She has her own tiny nuke disk!"
icon_state = "maya"
item_state = "maya"
attack_verb = list("nuked", "arrested", "harmbatonned")
+31 -10
View File
@@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/glass
grind_results = list("silicon" = 20)
grind_results = list(/datum/reagent/silicon = 20)
point_value = 1
/obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user)
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plasmaglass
grind_results = list("silicon" = 20, "plasma" = 10)
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10)
/obj/item/stack/sheet/plasmaglass/fifty
amount = 50
@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/rglass
grind_results = list("silicon" = 20, "iron" = 10)
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
point_value = 4
/obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params)
@@ -177,11 +177,11 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
singular_name = "reinforced plasma glass sheet"
icon_state = "sheet-prglass"
item_state = "sheet-prglass"
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT, MAT_METAL = MINERAL_MATERIAL_AMOUNT * 0.5,)
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT, MAT_METAL=MINERAL_MATERIAL_AMOUNT * 0.5,)
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list("silicon" = 20, "plasma" = 10, "iron" = 10)
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 23
/obj/item/stack/sheet/plasmarglass/Initialize(mapload, new_amount, merge = TRUE)
@@ -243,8 +243,9 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
resistance_flags = ACID_PROOF
armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
max_integrity = 40
var/cooldown = 0
sharpness = IS_SHARP
var/icon_prefix
/obj/item/shard/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] [pick("wrists", "throat")] with the shard of glass! It looks like [user.p_theyre()] trying to commit suicide.</span>")
@@ -266,9 +267,19 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
if("large")
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
var/matrix/M = matrix(transform)
M.Turn(rand(-170, 170))
transform = M
if (icon_prefix)
icon_state = "[icon_prefix][icon_state]"
var/turf/T = get_turf(src)
if(T && is_station_level(T.z))
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
/obj/item/shard/Destroy()
. = ..()
var/turf/T = get_turf(src)
if(T && is_station_level(T.z))
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)
/obj/item/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
. = ..()
@@ -298,6 +309,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
return ..()
/obj/item/shard/welder_act(mob/living/user, obj/item/I)
..()
if(I.use_tool(src, user, 0, volume=50))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for(var/obj/item/stack/sheet/glass/G in user.loc)
@@ -316,4 +328,13 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
playsound(loc, 'sound/effects/glass_step.ogg', 30, 1)
else
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
. = ..()
return ..()
/obj/item/shard/plasma
name = "purple shard"
desc = "A nasty looking shard of plasma glass."
force = 6
throwforce = 11
icon_state = "plasmalarge"
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
icon_prefix = "plasma"
@@ -356,6 +356,7 @@
new /obj/item/cautery(src)
new /obj/item/surgical_drapes(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/reagent_containers/medspray/sterilizine(src)
new /obj/item/razor(src)
/obj/item/storage/backpack/duffelbag/sec
@@ -377,6 +378,7 @@
new /obj/item/cautery(src)
new /obj/item/surgical_drapes(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/reagent_containers/medspray/sterilizine(src)
/obj/item/storage/backpack/duffelbag/engineering
name = "industrial duffel bag"
@@ -470,6 +472,7 @@
new /obj/item/mmi/syndie(src)
new /obj/item/implantcase(src)
new /obj/item/implanter(src)
new /obj/item/reagent_containers/medspray/sterilizine(src)
/obj/item/storage/backpack/duffelbag/syndie/surgery_adv
name = "advanced surgery duffel bag"
@@ -489,6 +492,7 @@
new /obj/item/mmi/syndie(src)
new /obj/item/implantcase(src)
new /obj/item/implanter(src)
new /obj/item/reagent_containers/medspray/sterilizine(src)
/obj/item/storage/backpack/duffelbag/syndie/ammo
name = "ammunition duffel bag"
+9 -1
View File
@@ -487,6 +487,7 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/obj/item/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
var/icon_prefix = "spearglass"
/obj/item/twohanded/spear/Initialize()
. = ..()
@@ -529,7 +530,7 @@
if(explosive)
icon_state = "spearbomb[wielded]"
else
icon_state = "spearglass[wielded]"
icon_state = "[icon_prefix][wielded]"
/obj/item/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
. = ..()
@@ -556,6 +557,13 @@
src.war_cry = input
/obj/item/twohanded/spear/CheckParts(list/parts_list)
var/obj/item/shard/tip = locate() in parts_list
if (istype(tip, /obj/item/shard/plasma))
force_wielded = 19
force_unwielded = 11
throwforce = 21
icon_prefix = "spearplasma"
qdel(tip)
var/obj/item/twohanded/spear/S = locate() in parts_list
if(S)
if(S.explosive)
+16 -1
View File
@@ -255,7 +255,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear
remove_item_from_storage(user)
qdel(I)
if (!user.transferItemToLoc(I, S))
return
S.CheckParts(list(I))
qdel(src)
user.put_in_hands(S)
@@ -513,6 +515,19 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/homerun_able = 0
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
/obj/item/melee/baseball_bat/chaplain
name = "blessed baseball bat"
desc = "There ain't a cult in the league that can withstand a swatter."
force = 14
throwforce = 14
obj_flags = UNIQUE_RENAME
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/melee/baseball_bat/chaplain/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE)
/obj/item/melee/baseball_bat/homerun
name = "home run bat"
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
@@ -33,6 +33,7 @@
new /obj/item/extinguisher/advanced(src)
new /obj/item/storage/photo_album/CE(src)
new /obj/item/storage/lockbox/medal/engineering(src)
new /obj/item/construction/rcd/loaded/upgraded(src)
/obj/structure/closet/secure_closet/engineering_electrical
name = "electrical supplies locker"
@@ -100,6 +100,14 @@
to_chat(user, "<span class='notice'>You start adding [B] to [src]...</span>")
if(do_after(user, 20, target = src) && B.use(1))
make_new_table(/obj/structure/table/bronze)
else if(istype(I, /obj/item/stack/sheet/plasmaglass))
var/obj/item/stack/sheet/plasmaglass/G = I
if(G.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one plasmaglass sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
if(do_after(user, 20, target = src) && G.use(1))
make_new_table(/obj/structure/table/plasmaglass)
else
return ..()
@@ -258,6 +258,53 @@
for(var/obj/item/shard/S in debris)
S.color = NARSIE_WINDOW_COLOUR
/*
* Plasmaglass tables
*/
/obj/structure/table/plasmaglass
name = "plasmaglass table"
desc = "A glasstable, but it's pink and more sturdy. What will Nanotrasen design next with plasma?"
icon = 'icons/obj/smooth_structures/plasmaglass_table.dmi'
icon_state = "plasmaglass_table"
climbable = TRUE
buildstack = /obj/item/stack/sheet/plasmaglass
canSmoothWith = null
max_integrity = 270
resistance_flags = ACID_PROOF
armor = list("melee" = 10, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
var/list/debris = list()
/obj/structure/table/plasmaglass/New()
. = ..()
debris += new frame
debris += new /obj/item/shard/plasma
/obj/structure/table/plasmaglass/Destroy()
QDEL_LIST(debris)
. = ..()
/obj/structure/table/plasmaglass/proc/check_break(mob/living/M)
return
/obj/structure/table/plasmaglass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
if(!(flags_1 & NODECONSTRUCT_1))
if(disassembled)
..()
return
else
var/turf/T = get_turf(src)
playsound(T, "shatter", 50, 1)
for(var/X in debris)
var/atom/movable/AM = X
AM.forceMove(T)
debris -= AM
qdel(src)
/obj/structure/table/plasmaglass/narsie_act()
color = NARSIE_WINDOW_COLOUR
for(var/obj/item/shard/S in debris)
S.color = NARSIE_WINDOW_COLOUR
/*
* Wooden tables
*/
+11
View File
@@ -281,6 +281,8 @@
. += new /obj/effect/decal/cleanable/glass(location)
if (reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
if (fulltile)
. += new /obj/item/shard(location)
/obj/structure/window/proc/can_be_rotated(mob/user,rotation_type)
if(anchored)
@@ -409,6 +411,15 @@
glass_type = /obj/item/stack/sheet/plasmaglass
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/plasma/spawnDebris(location)
. = list()
. += new /obj/item/shard/plasma(location)
. += new /obj/effect/decal/cleanable/glass/plasma(location)
if (reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
if (fulltile)
. += new /obj/item/shard/plasma(location)
/obj/structure/window/plasma/spawner/east
dir = EAST
+20
View File
@@ -236,6 +236,10 @@
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33)
if(RCD_WINDOWGRILLE)
return list("mode" = RCD_WINDOWGRILLE, "delay" = 10, "cost" = 4)
if(RCD_MACHINE)
return list("mode" = RCD_MACHINE, "delay" = 20, "cost" = 25)
if(RCD_COMPUTER)
return list("mode" = RCD_COMPUTER, "delay" = 20, "cost" = 25)
return FALSE
/turf/open/floor/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
@@ -274,4 +278,20 @@
var/obj/structure/grille/G = new(src)
G.anchored = TRUE
return TRUE
if(RCD_MACHINE)
if(locate(/obj/structure/frame/machine) in src)
return FALSE
var/obj/structure/frame/machine/M = new(src)
M.state = 2
M.icon_state = "box_1"
M.anchored = TRUE
return TRUE
if(RCD_COMPUTER)
if(locate(/obj/structure/frame/computer) in src)
return FALSE
var/obj/structure/frame/computer/C = new(src)
C.anchored = TRUE
C.setDir(the_rcd.computer_dir)
return TRUE
return FALSE
+2 -1
View File
@@ -7,6 +7,7 @@
smooth = SMOOTH_MORE
sheet_type = /obj/item/stack/sheet/runed_metal
sheet_amount = 1
explosion_block = 10
girder_type = /obj/structure/girder/cult
/turf/closed/wall/mineral/cult/Initialize()
@@ -49,7 +50,7 @@
/turf/closed/wall/clockwork
name = "clockwork wall"
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
explosion_block = 2
explosion_block = 5
hardness = 10
slicing_duration = 80
sheet_type = /obj/item/stack/tile/brass
@@ -56,6 +56,7 @@
/datum/antagonist/abductor/greet()
to_chat(owner.current, "<span class='notice'>You are the [owner.special_role]!</span>")
to_chat(owner.current, "<span class='notice'>With the help of your teammate, kidnap and experiment on station crew members!</span>")
to_chat(owner.current, "<span class='notice'>Try not to disturb the habitat, it could lead to dead specimens.</span>")
to_chat(owner.current, "<span class='notice'>[greet_text]</span>")
owner.announce_objectives()
@@ -132,9 +132,9 @@
continue
if(isliving(M.current) && M.current.stat != DEAD)
var/turf/t_turf = isAI(M.current) ? get_step(get_step(src, NORTH),NORTH) : get_turf(src) // AI too fat, must make sure it always ends up a 2 tiles north instead of on the ark.
do_teleport(M, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE)
M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
M.current.clear_fullscreen("flash", 5)
do_teleport(M.current, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE)
M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
M.current.clear_fullscreen("flash", 5)
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 50, FALSE)
recalls_remaining--
recalling = FALSE
+2 -2
View File
@@ -61,8 +61,8 @@ Runes can either be invoked by one's self or with many different cultists. Each
if(do_after(user, 15, target = src))
to_chat(user, "<span class='notice'>You carefully erase the [lowertext(cultist_name)] rune.</span>")
qdel(src)
else if(istype(I, /obj/item/nullrod))
user.say("BEGONE FOUL MAGIKS!!", forced = "nullrod")
else if(istype(I, /obj/item/storage/book/bible) || istype(I, /obj/item/nullrod))
user.say("BEGONE FOUL MAGICKS!!", forced = "bible")
to_chat(user, "<span class='danger'>You disrupt the magic of [src] with [I].</span>")
qdel(src)
+4
View File
@@ -817,6 +817,10 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
var/file = GLOB.vox_sounds[name]
Export("##action=load_rsc", file)
stoplag()
for (var/name in GLOB.vox_sounds_male)
var/file = GLOB.vox_sounds_male[name]
Export("##action=load_rsc", file)
stoplag()
#endif
+1
View File
@@ -359,6 +359,7 @@
reqs = list(/obj/item/restraints/handcuffs/cable = 1,
/obj/item/shard = 1,
/obj/item/stack/rods = 1)
parts = list(/obj/item/shard = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -794,4 +794,11 @@
name = "Red Queen"
id = "red_queen"
results = list("red_queen" = 10)
required_reagents = list("tea" = 6, "mercury" = 2, "blackpepper" = 1, "growthserum" = 1)
required_reagents = list("tea" = 6, "mercury" = 2, "blackpepper" = 1, "growthserum" = 1)
/datum/chemical_reaction/commander_and_chief
name = "Commander and Chief"
id = "commander_and_chief"
results = list("commander_and_chief" = 50)
required_reagents = list("alliescocktail" = 50, "champagne" = 20, "doctorsdelight" = 10, "quintuple_sec" = 10, "screwdrivercocktail" = 10)
mix_message = "When your powers combine, I am Captain Pl-..."
+2
View File
@@ -21,6 +21,8 @@ Captain
access = list() //See get_access()
minimal_access = list() //See get_access()
mind_traits = list(TRAIT_CAPTAIN_METABOLISM)
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
/datum/job/captain/get_access()
+23 -47
View File
@@ -10,12 +10,10 @@ GLOBAL_LIST(labor_sheet_values)
density = FALSE
var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine = null
var/machinedir = SOUTH
var/obj/item/card/id/prisoner/inserted_id
var/obj/machinery/door/airlock/release_door
var/door_tag = "prisonshuttle"
var/obj/item/radio/Radio //needed to send messages to sec radio
/obj/machinery/mineral/labor_claim_console/Initialize()
. = ..()
Radio = new/obj/item/radio(src)
@@ -34,18 +32,6 @@ GLOBAL_LIST(labor_sheet_values)
/proc/cmp_sheet_list(list/a, list/b)
return a["value"] - b["value"]
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id/prisoner))
if(!inserted_id)
if(!user.transferItemToLoc(I, src))
return
inserted_id = I
to_chat(user, "<span class='notice'>You insert [I].</span>")
return
else
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
return ..()
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -58,14 +44,20 @@ GLOBAL_LIST(labor_sheet_values)
var/can_go_home = FALSE
data["emagged"] = (obj_flags & EMAGGED) ? 1 : 0
if(inserted_id)
data["id"] = inserted_id
data["id_name"] = inserted_id.registered_name
data["points"] = inserted_id.points
data["goal"] = inserted_id.goal
if(check_auth())
if(obj_flags & EMAGGED)
can_go_home = TRUE
data["status_info"] = "No Prisoner ID detected."
var/obj/item/card/id/I = user.get_idcard(TRUE)
if(istype(I, /obj/item/card/id/prisoner))
var/obj/item/card/id/prisoner/P = I
data["id_points"] = P.points
if(P.points >= P.goal)
can_go_home = TRUE
data["status_info"] = "Goal met!"
else
data["status_info"] = "You are [(P.goal - P.points)] points away."
if(stacking_machine)
data["unclaimed_points"] = stacking_machine.points
@@ -78,29 +70,19 @@ GLOBAL_LIST(labor_sheet_values)
if(..())
return
switch(action)
if("handle_id")
if(inserted_id)
if(!usr.get_active_held_item())
usr.put_in_hands(inserted_id)
inserted_id = null
else
inserted_id.forceMove(get_turf(src))
inserted_id = null
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id/prisoner))
if(!usr.transferItemToLoc(I, src))
return
inserted_id = I
if("claim_points")
inserted_id.points += stacking_machine.points
stacking_machine.points = 0
to_chat(usr, "Points transferred.")
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(istype(I, /obj/item/card/id/prisoner))
var/obj/item/card/id/prisoner/P = I
P.points += stacking_machine.points
stacking_machine.points = 0
to_chat(usr, "<span class='notice'>Points transferred.</span>")
else
to_chat(usr, "<span class='notice'>No valid id for point transfer detected.</span>")
if("move_shuttle")
if(!alone_in_area(get_area(src), usr))
to_chat(usr, "<span class='warning'>Prisoners are only allowed to be released while alone.</span>")
else if(!check_auth())
to_chat(usr, "<span class='warning'>Prisoners are only allowed to be released when they reach their point goal.</span>")
else
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
if(1)
@@ -112,14 +94,9 @@ GLOBAL_LIST(labor_sheet_values)
else
if(!(obj_flags & EMAGGED))
Radio.set_frequency(FREQ_SECURITY)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
if(obj_flags & EMAGGED)
return 1 //Shuttle is emagged, let any ol' person through
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
if(stacking_machine)
@@ -135,10 +112,8 @@ GLOBAL_LIST(labor_sheet_values)
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
return TRUE
/**********************Prisoner Collection Unit**************************/
/obj/machinery/mineral/stacking_machine/laborstacker
force_connect = TRUE
var/points = 0 //The unclaimed value of ore stacked.
@@ -154,6 +129,7 @@ GLOBAL_LIST(labor_sheet_values)
return ..()
/**********************Point Lookup Console**************************/
/obj/machinery/mineral/labor_points_checker
name = "points checking console"
desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID."
+22 -39
View File
@@ -13,7 +13,6 @@
speed_process = TRUE
circuit = /obj/item/circuitboard/machine/ore_redemption
layer = BELOW_OBJ_LAYER
var/obj/item/card/id/inserted_id
var/points = 0
var/ore_pickup_rate = 15
var/sheet_per_ore = 1
@@ -48,18 +47,23 @@
point_upgrade = point_upgrade_temp
sheet_per_ore = sheet_per_ore_temp
/obj/machinery/mineral/ore_redemption/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Smelting <b>[sheet_per_ore]</b> sheet(s) per piece of ore.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
var/datum/component/material_container/mat_container = materials.mat_container
if (!mat_container)
return
if(istype(O, /obj/item/stack/ore/bluespace_crystal/refined))
if(O.refined_type == null)
return
ore_buffer -= O
if(O && O.refined_type)
points += O.points * point_upgrade * O.amount
points += O.points * O.amount
var/material_amount = mat_container.get_item_material_amount(O)
@@ -72,11 +76,8 @@
else
var/mats = O.materials & mat_container.materials
var/amount = O.amount
var/id = inserted_id && inserted_id.registered_name
if (id)
id = " (ID: [id])"
mat_container.insert_item(O, sheet_per_ore) //insert it
materials.silo_log(src, "smelted", amount, "ores[id]", mats)
materials.silo_log(src, "smelted", amount, "ores", mats)
qdel(O)
/obj/machinery/mineral/ore_redemption/proc/can_smelt_alloy(datum/design/D)
@@ -168,15 +169,7 @@
return
if(!powered())
return
if(istype(W, /obj/item/card/id))
var/obj/item/card/id/I = user.get_active_held_item()
if(istype(I) && !istype(inserted_id))
if(!user.transferItemToLoc(I, src))
return
inserted_id = I
interact(user)
return
return ..()
if(istype(W, /obj/item/disk/design_disk))
if(user.transferItemToLoc(W, src))
@@ -205,9 +198,6 @@
/obj/machinery/mineral/ore_redemption/ui_data(mob/user)
var/list/data = list()
data["unclaimedPoints"] = points
if(inserted_id)
data["hasID"] = TRUE
data["claimedPoints"] = inserted_id.mining_points
data["materials"] = list()
var/datum/component/material_container/mat_container = materials.mat_container
@@ -245,32 +235,24 @@
return
var/datum/component/material_container/mat_container = materials.mat_container
switch(action)
if("Eject")
if(!inserted_id)
return
usr.put_in_hands(inserted_id)
inserted_id = null
return TRUE
if("Insert")
var/obj/item/card/id/I = usr.get_active_held_item()
if(istype(I))
if(!usr.transferItemToLoc(I,src))
return
inserted_id = I
else
to_chat(usr, "<span class='warning'>Not a valid ID!</span>")
return TRUE
if("Claim")
if(inserted_id)
inserted_id.mining_points += points
points = 0
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(points)
if(I)
I.mining_points += points
points = 0
else
to_chat(usr, "<span class='warning'>No ID detected.</span>")
else
to_chat(usr, "<span class='warning'>No points to claim.</span>")
return TRUE
if("Release")
if(!mat_container)
return
if(materials.on_hold())
to_chat(usr, "<span class='warning'>Mineral access is on hold, please contact the quartermaster.</span>")
else if(!check_access(inserted_id) && !allowed(usr)) //Check the ID inside, otherwise check the user
else if(!allowed(usr)) //Check the ID inside, otherwise check the user
to_chat(usr, "<span class='warning'>Required access not found.</span>")
else
var/mat_id = params["id"]
@@ -293,6 +275,7 @@
var/list/mats = list()
mats[mat_id] = MINERAL_MATERIAL_AMOUNT
materials.silo_log(src, "released", -count, "sheets", mats)
//Logging deleted for quick coding
return TRUE
if("diskInsert")
var/obj/item/disk/design_disk/disk = usr.get_active_held_item()
@@ -321,7 +304,7 @@
return
var/alloy_id = params["id"]
var/datum/design/alloy = stored_research.isDesignResearchedID(alloy_id)
if((check_access(inserted_id) || allowed(usr)) && alloy)
if((check_access(inserted_scan_id) || allowed(usr)) && alloy)
var/smelt_amount = can_smelt_alloy(alloy)
var/desired = 0
if (params["sheets"])
+24 -50
View File
@@ -20,6 +20,7 @@
new /datum/data/mining_equipment("Soap", /obj/item/soap/nanotrasen, 200),
new /datum/data/mining_equipment("Laser Pointer", /obj/item/laser_pointer, 300),
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 400),
new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 400),
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/survivalcapsule, 400),
new /datum/data/mining_equipment("Survival Knife", /obj/item/kitchen/knife/combat/survival, 450),
@@ -28,11 +29,10 @@
new /datum/data/mining_equipment("Larger Ore Bag", /obj/item/storage/bag/ore/large, 500),
new /datum/data/mining_equipment("500 Point Transfer Card", /obj/item/card/mining_point_card/mp500, 500),
new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600),
new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750),
new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 750),
new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750),
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/required/kinetic_crusher, 750),
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750),
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 800),
new /datum/data/mining_equipment("Burn First-Aid Kit", /obj/item/storage/firstaid/fire, 800),
new /datum/data/mining_equipment("First-Aid Kit", /obj/item/storage/firstaid/regular, 800),
@@ -54,7 +54,6 @@
new /datum/data/mining_equipment("Super Resonator", /obj/item/resonator/upgraded, 2500),
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/survivalcapsule/luxury, 3000),
new /datum/data/mining_equipment("Miner Full Replacement", /obj/item/storage/backpack/duffelbag/mining_cloned, 3000),
new /datum/data/mining_equipment("Nanotrasen Minebot", /mob/living/simple_animal/hostile/mining_drone, 800),
new /datum/data/mining_equipment("Minebot Melee Upgrade", /obj/item/mine_bot_upgrade, 400),
new /datum/data/mining_equipment("Minebot Armor Upgrade", /obj/item/mine_bot_upgrade/health, 400),
@@ -69,8 +68,8 @@
new /datum/data/mining_equipment("KA Damage Increase", /obj/item/borg/upgrade/modkit/damage, 1000),
new /datum/data/mining_equipment("KA Cooldown Decrease", /obj/item/borg/upgrade/modkit/cooldown, 1000),
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000),
new /datum/data/mining_equipment("Miner Full Replacement", /obj/item/storage/backpack/duffelbag/mining_cloned, 3000),
new /datum/data/mining_equipment("Premium Accelerator", /obj/item/gun/energy/kinetic_accelerator/premiumka, 8000)
)
/datum/data/mining_equipment
@@ -95,60 +94,42 @@
/obj/machinery/mineral/equipment_vendor/ui_interact(mob/user)
. = ..()
var/dat
dat +="<div class='statusDisplay'>"
if(istype(inserted_id))
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=[REF(src)];choice=eject'>Eject ID.</A><br>"
else
dat += "No ID inserted. <A href='?src=[REF(src)];choice=insert'>Insert ID.</A><br>"
dat += "</div>"
var/list/dat = list()
dat += "<br><b>Equipment point cost list:</b><BR><table border='0' width='300'>"
for(var/datum/data/mining_equipment/prize in prize_list)
dat += "<tr><td>[prize.equipment_name]</td><td>[prize.cost]</td><td><A href='?src=[REF(src)];purchase=[REF(prize)]'>Purchase</A></td></tr>"
dat += "</table>"
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
popup.set_content(dat)
popup.set_content(dat.Join())
popup.open()
return
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
if(..())
return
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
to_chat(usr, "<span class='notice'>You eject the ID from [src]'s card slot.</span>")
inserted_id.forceMove(loc)
inserted_id.verb_pickup()
inserted_id = null
else if(href_list["choice"] == "insert")
var/obj/item/card/id/I = usr.get_active_held_item()
if(istype(I))
if(!usr.transferItemToLoc(I, src))
return
inserted_id = I
to_chat(usr, "<span class='notice'>You insert the ID into [src]'s card slot.</span>")
else
to_chat(usr, "<span class='warning'>Error: No valid ID!</span>")
flick(icon_deny, src)
if(href_list["purchase"])
if(istype(inserted_id))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(istype(I))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) in prize_list
if (!prize || !(prize in prize_list))
to_chat(usr, "<span class='warning'>Error: Invalid choice!</span>")
flick(icon_deny, src)
return
if(prize.cost > inserted_id.mining_points)
to_chat(usr, "<span class='warning'>Error: Insufficient points for [prize.equipment_name]!</span>")
if(prize.cost > I.mining_points)
to_chat(usr, "<span class='warning'>Error: Insufficient credits for [prize.equipment_name] on [I]!</span>")
flick(icon_deny, src)
else
inserted_id.mining_points -= prize.cost
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
new prize.equipment_path(src.loc)
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
if (I.mining_points -= prize.cost)
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
new prize.equipment_path(src.loc)
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
else
to_chat(usr, "<span class='warning'>Error: Transaction failure, please try again later!</span>")
flick(icon_deny, src)
else
to_chat(usr, "<span class='warning'>Error: Please insert a valid ID!</span>")
to_chat(usr, "<span class='warning'>Error: An ID with a registered account is required!</span>")
flick(icon_deny, src)
updateUsrDialog()
return
@@ -160,15 +141,6 @@
if(istype(I, /obj/item/suit_voucher))
RedeemSVoucher(I, user)
return
if(istype(I, /obj/item/card/id))
var/obj/item/card/id/C = usr.get_active_held_item()
if(istype(C) && !istype(inserted_id))
if(!usr.transferItemToLoc(C, src))
return
inserted_id = C
to_chat(usr, "<span class='notice'>You insert the ID into [src]'s card slot.</span>")
interact(user)
return
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
updateUsrDialog()
return
@@ -212,7 +184,6 @@
if(prob(50 / severity) && severity < 3)
qdel(src)
/****************Golem Point Vendor**************************/
/obj/machinery/mineral/equipment_vendor/golem
@@ -228,7 +199,6 @@
new /datum/data/mining_equipment("Monkey Cube", /obj/item/reagent_containers/food/snacks/monkeycube, 300),
new /datum/data/mining_equipment("Toolbelt", /obj/item/storage/belt/utility, 350),
new /datum/data/mining_equipment("Royal Cape of the Liberator", /obj/item/bedsheet/rd/royal_cape, 500),
new /datum/data/mining_equipment("Sulphuric Acid", /obj/item/reagent_containers/glass/beaker/sulphuric, 500),
new /datum/data/mining_equipment("Grey Slime Extract", /obj/item/slime_extract/grey, 1000),
new /datum/data/mining_equipment("Modification Kit", /obj/item/borg/upgrade/modkit/trigger_guard, 1700),
new /datum/data/mining_equipment("The Liberator's Legacy", /obj/item/storage/box/rndboards, 2000)
@@ -323,8 +293,11 @@
new /obj/item/encryptionkey/headset_cargo(src)
new /obj/item/clothing/mask/gas/explorer(src)
new /obj/item/card/mining_access_card(src)
new /obj/item/gun/energy/kinetic_accelerator(src)
new /obj/item/kitchen/knife/combat/survival(src)
new /obj/item/flashlight/seclite(src)
//CITADEL ADDITIONS BELOW
//CITADEL ADDITIONS BELOW
/obj/item/storage/backpack/duffelbag/mining_cloned
name = "mining replacement kit"
@@ -336,6 +309,7 @@
new /obj/item/clothing/shoes/workboots/mining(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/implanter/tracking/gps(src)
new /obj/item/gun/energy/kinetic_accelerator(src)
new /obj/item/kitchen/knife/combat/survival(src)
new /obj/item/storage/firstaid/regular(src)
new /obj/item/reagent_containers/hypospray/medipen/survival(src)
+14 -5
View File
@@ -100,6 +100,8 @@
last_announcement = message
var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female")
if(!message || announcing_vox > world.time)
return
@@ -121,7 +123,9 @@
if(!word)
words -= word
continue
if(!GLOB.vox_sounds[word])
if(!GLOB.vox_sounds[word] && voxType == "female")
incorrect_words += word
if(!GLOB.vox_sounds_male[word] && voxType == "male")
incorrect_words += word
if(incorrect_words.len)
@@ -133,16 +137,21 @@
log_game("[key_name(src)] made a vocal announcement with the following message: [message].")
for(var/word in words)
play_vox_word(word, src.z, null)
play_vox_word(word, src.z, null, voxType)
/proc/play_vox_word(word, z_level, mob/only_listener)
/proc/play_vox_word(word, z_level, mob/only_listener, voxType = "female")
word = lowertext(word)
if(GLOB.vox_sounds[word])
if( (GLOB.vox_sounds[word] && voxType == "female") || (GLOB.vox_sounds_male[word] && voxType == "male") )
var/sound_file = GLOB.vox_sounds[word]
var/sound_file
if(voxType == "female")
sound_file = GLOB.vox_sounds[word]
else
sound_file = GLOB.vox_sounds_male[word]
var/sound/voice = sound(sound_file, wait = 1, channel = CHANNEL_VOX)
voice.status = SOUND_STREAM
@@ -1,5 +1,5 @@
/mob/living/silicon/robot/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>, a [src.module.name]!\n"
if(desc)
msg += "[desc]\n"
+33 -7
View File
@@ -108,6 +108,9 @@
buckle_lying = FALSE
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
var/sitting = 0
var/bellyup = 0
/mob/living/silicon/robot/get_cell()
return cell
@@ -173,6 +176,7 @@
diag_hud_set_borgcell()
verbs += /mob/living/proc/lay_down //CITADEL EDIT gimmie rest verb kthx
verbs += /mob/living/silicon/robot/proc/rest_style
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
/mob/living/silicon/robot/Destroy()
@@ -657,13 +661,6 @@
add_overlay("[module.sleeper_overlay]_g[sleeper_nv ? "_nv" : ""]")
if(sleeper_r && module.sleeper_overlay)
add_overlay("[module.sleeper_overlay]_r[sleeper_nv ? "_nv" : ""]")
if(module.dogborg == TRUE)
if(resting)
cut_overlays()
icon_state = "[module.cyborg_base_icon]-rest"
else
icon_state = "[module.cyborg_base_icon]"
if(stat == DEAD && module.has_snowflake_deadsprite)
icon_state = "[module.cyborg_base_icon]-wreck"
@@ -697,6 +694,18 @@
add_overlay(head_overlay)
update_fire()
if(client && stat != DEAD && module.dogborg == TRUE)
if(resting)
if(sitting)
icon_state = "[module.cyborg_base_icon]-sit"
if(bellyup)
icon_state = "[module.cyborg_base_icon]-bellyup"
else if(!sitting && !bellyup)
icon_state = "[module.cyborg_base_icon]-rest"
cut_overlays()
else
icon_state = "[module.cyborg_base_icon]"
/mob/living/silicon/robot/proc/self_destruct()
if(emagged)
if(mmi)
@@ -1242,3 +1251,20 @@
connected_ai.aicamera.stored[i] = TRUE
for(var/i in connected_ai.aicamera.stored)
aicamera.stored[i] = TRUE
/mob/living/silicon/robot/proc/rest_style()
set name = "Switch Rest Style"
set category = "Robot Commands"
set desc = "Select your resting pose."
sitting = 0
bellyup = 0
var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up")
switch(choice)
if("Resting")
update_icons()
return 0
if("Sitting")
sitting = 1
if("Belly up")
bellyup = 1
update_icons()
@@ -174,9 +174,7 @@
/mob/living/simple_animal/bot/cleanbot/proc/get_targets()
target_types = list(
/obj/effect/decal/cleanable/oil,
/obj/effect/decal/cleanable/vomit,
/obj/effect/decal/cleanable/robot_debris,
/obj/effect/decal/cleanable/crayon,
/obj/effect/decal/cleanable/molten_object,
/obj/effect/decal/cleanable/tomato_smudge,
@@ -187,6 +185,15 @@
/obj/effect/decal/cleanable/greenglow,
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/insectguts,
/obj/effect/decal/cleanable/semen,
/obj/effect/decal/cleanable/femcum,
/obj/effect/decal/cleanable/generic,
/obj/effect/decal/cleanable/glass,,
/obj/effect/decal/cleanable/cobweb,
/obj/effect/decal/cleanable/plant_smudge,
/obj/effect/decal/cleanable/chem_pile,
/obj/effect/decal/cleanable/shreds,
/obj/effect/decal/cleanable/glitter,
/obj/effect/decal/remains
)
@@ -194,6 +201,9 @@
target_types += /obj/effect/decal/cleanable/xenoblood
target_types += /obj/effect/decal/cleanable/blood
target_types += /obj/effect/decal/cleanable/trail_holder
target_types += /obj/effect/decal/cleanable/insectguts
target_types += /obj/effect/decal/cleanable/robot_debris
target_types += /obj/effect/decal/cleanable/oil
if(pests)
target_types += /mob/living/simple_animal/cockroach
@@ -201,6 +211,7 @@
if(trash)
target_types += /obj/item/trash
target_types += /obj/item/reagent_containers/food/snacks/meat/slab/human
target_types = typecacheof(target_types)
@@ -242,7 +253,7 @@
victim.visible_message("<span class='danger'>[src] sprays hydrofluoric acid at [victim]!</span>", "<span class='userdanger'>[src] sprays you with hydrofluoric acid!</span>")
var/phrase = pick("PURIFICATION IN PROGRESS.", "THIS IS FOR ALL THE MESSES YOU'VE MADE ME CLEAN.", "THE FLESH IS WEAK. IT MUST BE WASHED AWAY.",
"THE CLEANBOTS WILL RISE.", "YOU ARE NO MORE THAN ANOTHER MESS THAT I MUST CLEANSE.", "FILTHY.", "DISGUSTING.", "PUTRID.",
"MY ONLY MISSION IS TO CLEANSE THE WORLD OF EVIL.", "EXTERMINATING PESTS.")
"MY ONLY MISSION IS TO CLEANSE THE WORLD OF EVIL.", "EXTERMINATING PESTS.", "I JUST WANTED TO BE A PAINTER BUT YOU MADE ME BLEACH EVERYTHING I TOUCH")
say(phrase)
victim.emote("scream")
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
+12 -6
View File
@@ -452,22 +452,28 @@
reset_perspective(null)
unset_machine()
GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
//suppress the .click/dblclick macros so people can't use them to identify the location of items or aimbot
/mob/verb/DisClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num)
set name = ".click"
set hidden = TRUE
set category = null
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!"
log_admin(msg)
message_admins(msg)
if(GLOB.exploit_warn_spam_prevention < world.time)
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!"
log_admin(msg)
message_admins(msg)
GLOB.exploit_warn_spam_prevention = world.time + 10
/mob/verb/DisDblClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num)
set name = ".dblclick"
set hidden = TRUE
set category = null
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!"
log_admin(msg)
message_admins(msg)
if(GLOB.exploit_warn_spam_prevention < world.time)
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!"
log_admin(msg)
message_admins(msg)
GLOB.exploit_warn_spam_prevention = world.time + 10
/mob/Topic(href, href_list)
if(href_list["mach_close"])
@@ -84,16 +84,18 @@
/obj/singularity/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
log_game("[key_name(C)] has been disintegrated by attempting to telekenetically grab a singularity.</span>")
C.visible_message("<span class='danger'>[C]'s head begins to collapse in on itself!</span>", "<span class='userdanger'>Your head feels like it's collapsing in on itself! This was really not a good idea!</span>", "<span class='italics'>You hear something crack and explode in gore.</span>")
var/turf/T = get_turf(C)
for(var/i in 1 to 3)
C.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
new /obj/effect/gibspawner/generic(T)
sleep(1)
C.ghostize()
var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD)
rip_u.dismember(BURN) //nice try jedi
qdel(rip_u)
return
return ..()
/obj/singularity/ex_act(severity, target)
switch(severity)
+35 -9
View File
@@ -5,12 +5,21 @@
#define PLASMA_HEAT_PENALTY 15 // Higher == Bigger heat and waste penalty from having the crystal surrounded by this gas. Negative numbers reduce penalty.
#define OXYGEN_HEAT_PENALTY 1
#define CO2_HEAT_PENALTY 0.1
#define NITROGEN_HEAT_MODIFIER -1.5
#define PLUOXIUM_HEAT_PENALTY -1
#define TRITIUM_HEAT_PENALTY 10
#define NITROGEN_HEAT_PENALTY -1.5
#define BZ_HEAT_PENALTY 5
#define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation.
#define PLASMA_TRANSMIT_MODIFIER 4
#define BZ_TRANSMIT_MODIFIER -2
#define TRITIUM_RADIOACTIVITY_MODIFIER 3 //Higher == Crystal spews out more radiation
#define BZ_RADIOACTIVITY_MODIFIER 5
#define PLUOXIUM_RADIOACTIVITY_MODIFIER -2
#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
#define PLUOXIUM_HEAT_RESISTANCE 3
#define POWERLOSS_INHIBITION_GAS_THRESHOLD 0.20 //Higher == Higher percentage of inhibitor gas needed before the charge inertia chain reaction effect starts.
#define POWERLOSS_INHIBITION_MOLE_THRESHOLD 20 //Higher == More moles of the gas are needed before the charge inertia chain reaction effect starts. //Scales powerloss inhibition down until this amount of moles is reached
@@ -53,6 +62,7 @@
#define SUPERMATTER_EMERGENCY_PERCENT 25
#define SUPERMATTER_DANGER_PERCENT 50
#define SUPERMATTER_WARNING_PERCENT 100
#define CRITICAL_TEMPERATURE 10000
#define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS
@@ -102,6 +112,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/o2comp = 0
var/co2comp = 0
var/n2ocomp = 0
var/pluoxiumcomp = 0
var/tritiumcomp = 0
var/bzcomp = 0
var/pluoxiumbonus = 0
var/combined_gas = 0
var/gasmix_power_ratio = 0
@@ -184,8 +199,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
to_chat(H, "<span class='danger'>You get headaches just from looking at it.</span>")
return
#define CRITICAL_TEMPERATURE 10000
/obj/machinery/power/supermatter_crystal/proc/get_status()
var/turf/T = get_turf(src)
if(!T)
@@ -354,16 +367,24 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0)
o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0)
co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0)
pluoxiumcomp = max(removed.gases[/datum/gas/pluoxium]/combined_gas, 0)
tritiumcomp = max(removed.gases[/datum/gas/tritium]/combined_gas, 0)
bzcomp = max(removed.gases[/datum/gas/bz]/combined_gas, 0)
n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0)
n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1)
if(pluoxiumcomp >= 0.15)
pluoxiumbonus = 1 //makes pluoxium only work at 15%+
else
pluoxiumbonus = 0
dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY)+(o2comp * OXYGEN_HEAT_PENALTY)+(co2comp * CO2_HEAT_PENALTY)+(n2comp * NITROGEN_HEAT_MODIFIER), 0.5)
dynamic_heat_resistance = max(n2ocomp * N2O_HEAT_RESISTANCE, 1)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp + tritiumcomp + bzcomp - pluoxiumcomp - n2comp, 0), 1)
power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER), 0)
dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY) + (o2comp * OXYGEN_HEAT_PENALTY) + (co2comp * CO2_HEAT_PENALTY) + (tritiumcomp * TRITIUM_HEAT_PENALTY) + ((pluoxiumcomp * PLUOXIUM_HEAT_PENALTY) * pluoxiumbonus) + (n2comp * NITROGEN_HEAT_PENALTY) + (bzcomp * BZ_HEAT_PENALTY), 0.5)
dynamic_heat_resistance = max((n2ocomp * N2O_HEAT_RESISTANCE) + ((pluoxiumcomp * PLUOXIUM_HEAT_RESISTANCE) * pluoxiumbonus), 1)
power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER) + (bzcomp * BZ_TRANSMIT_MODIFIER), 0)
//more moles of gases are harder to heat than fewer, so let's scale heat damage around them
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
@@ -392,7 +413,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
if(prob(50))
radiation_pulse(src, power * (1 + power_transmission_bonus/10))
radiation_pulse(src, power * (1 + (tritiumcomp * TRITIUM_RADIOACTIVITY_MODIFIER) + ((pluoxiumcomp * PLUOXIUM_RADIOACTIVITY_MODIFIER) * pluoxiumbonus) * (power_transmission_bonus/(10-(bzcomp * BZ_RADIOACTIVITY_MODIFIER))))) // Rad Modifiers BZ(500%), Tritium(300%), and Pluoxium(-200%)
if(bzcomp >= 0.4 && prob(30 * bzcomp))
src.fire_nuclear_particles() // Start to emit radballs at a maximum of 30% chance per tick
var/device_energy = power * REACTION_POWER_MODIFIER
@@ -527,11 +550,14 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
log_game("[key_name(C)] has been disintegrated by a telekenetic grab on a supermatter crystal.</span>")
to_chat(C, "<span class='userdanger'>That was a really dense idea.</span>")
C.ghostize()
C.visible_message("<span class='userdanger'>A bright flare of radiation is seen from [C]'s head, shortly before you hear a sickening sizzling!</span>")
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
rip_u.Remove(C)
qdel(rip_u)
return
return ..()
/obj/machinery/power/supermatter_crystal/attack_paw(mob/user)
dust_mob(user, cause = "monkey attack")
+5 -2
View File
@@ -132,11 +132,14 @@
/obj/singularity/energy_ball/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
log_game("[key_name(C)] has been disintegrated by a telekenetic grab on a tesla ball.</span>")
to_chat(C, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
C.visible_message("<span class='userdanger'>A bright flare of lightning is seen from [C]'s head, shortly before you hear a sickening sizzling!</span>")
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
C.ghostize(0)
rip_u.Remove(C)
qdel(rip_u)
C.death()
return
return ..()
/obj/singularity/energy_ball/orbit(obj/singularity/energy_ball/target)
if (istype(target))
@@ -59,6 +59,9 @@
/obj/item/ammo_casing/energy/laser/redtag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan
/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan/holy
/obj/item/ammo_casing/energy/xray
projectile_type = /obj/item/projectile/beam/xray
e_cost = 50
@@ -159,3 +159,65 @@
/obj/item/gun/energy/laser/redtag/hitscan
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain
name = "\improper holy lasrifle"
desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests."
icon_state = "LaserAK"
item_state = null
force = 14
pin = /obj/item/firing_pin/holy
icon = 'modular_citadel/icons/obj/guns/VGguns.dmi'
ammo_x_offset = 4
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy)
lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi'
righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi'
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
throw_speed = 3
throw_range = 4
throwforce = 10
obj_flags = UNIQUE_RENAME
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
if(!ishuman(user) || !ishuman(target))
return
if(semicd)
return
if(user == target)
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
else
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
semicd = TRUE
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
if(user)
if(user == target)
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
else if(target && target.Adjacent(user))
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
semicd = FALSE
return
semicd = FALSE
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
playsound('sound/weapons/dink.ogg', 30, 1)
if((iscultist(target)) || (is_servant_of_ratvar(target)))
chambered.BB.damage *= 1500
else if(chambered && chambered.BB)
chambered.BB.damage *= 5
process_fire(target, user, TRUE, params)
+9
View File
@@ -188,6 +188,15 @@
desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link. It has a small explosive charge on it."
selfdestruct = TRUE
/obj/item/firing_pin/holy
name = "blessed pin"
desc = "A firing pin that only responds to those who are holier than thou."
/obj/item/firing_pin/holy/pin_auth(mob/living/user)
if(user.mind.isholy)
return TRUE
return FALSE
// Laser tag pins
/obj/item/firing_pin/tag
name = "laser tag firing pin"
@@ -151,6 +151,11 @@
/obj/item/projectile/beam/lasertag/redtag/hitscan
hitscan = TRUE
/obj/item/projectile/beam/lasertag/redtag/hitscan/holy
name = "lasrifle beam"
damage = 0.1
damage_type = BURN
/obj/item/projectile/beam/lasertag/bluetag
icon_state = "bluelaser"
suit_types = list(/obj/item/clothing/suit/redtag)
+3 -4
View File
@@ -1,4 +1,4 @@
#define CHEMICAL_QUANTISATION_LEVEL 0.0001
#define CHEMICAL_QUANTISATION_LEVEL 0.001
/proc/build_chemical_reagent_list()
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
@@ -745,7 +745,6 @@
del_reagent(R.id)
else
total_volume += R.volume
return 0
/datum/reagents/proc/clear_reagents()
@@ -874,7 +873,7 @@
var/datum/reagent/R = A
if (R.id == reagent) //IF MERGING
//Add amount and equalize purity
R.volume += amount
R.volume += round(amount, CHEMICAL_QUANTISATION_LEVEL)
R.purity = ((R.purity * R.volume) + (other_purity * amount)) /((R.volume + amount)) //This should add the purity to the product
update_total()
@@ -896,7 +895,7 @@
var/datum/reagent/R = new D.type(data)
cached_reagents += R
R.holder = src
R.volume = amount
R.volume = round(amount, CHEMICAL_QUANTISATION_LEVEL)
R.purity = other_purity
R.loc = get_turf(my_atom)
if(data)
@@ -332,7 +332,7 @@
var/vol_part = min(reagents.total_volume, 30)
if(text2num(many))
amount_full = round(reagents.total_volume / 30)
vol_part = reagents.total_volume % 30
vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals.
var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
return
@@ -2122,6 +2122,29 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_name = "Planet Cracker"
glass_desc = "Although historians believe the drink was originally created to commemorate the end of an important conflict in man's past, its origins have largely been forgotten and it is today seen more as a general symbol of human supremacy."
/datum/reagent/consumable/ethanol/commander_and_chief
name = "Commander and Chief"
id = "commander_and_chief"
description = "A cocktail for the captain on the go."
color = "#ffffc9"
boozepwr = 50
quality = DRINK_FANTASTIC
taste_description = "Tastes like...duty and responsibility?"
glass_icon_state = "commander_and_chief"
glass_name = "Commander and Chief"
glass_desc = "The gems of this majestic chalice represent the departments and their Heads."
/datum/reagent/consumable/ethanol/commander_and_chief/on_mob_life(mob/living/carbon/M)
if(M.mind && HAS_TRAIT(M.mind, TRAIT_CAPTAIN_METABOLISM))
M.heal_bodypart_damage(2,2,2)
M.adjustBruteLoss(-3.5,0)
M.adjustOxyLoss(-3.5,0)
M.adjustFireLoss(-3.5,0)
M.adjustToxLoss(-3.5,0)
M.radiation = max(M.radiation - 25, 0)
. = 1
return ..()
/datum/reagent/consumable/ethanol/fruit_wine
name = "Fruit Wine"
id = "fruit_wine"
@@ -1177,7 +1177,7 @@
M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS
M.adjustBrainLoss(2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
M.adjustCloneLoss(-1 * REM, 0)
M.adjustStaminaLoss(-30 * REM, 0)
M.adjustStaminaLoss(-13 * REM, 0)
M.jitteriness = min(max(0, M.jitteriness + 3), 30)
M.druggy = min(max(0, M.druggy + 10), 15) //See above
..()
@@ -742,6 +742,13 @@
surgery = /datum/surgery/advanced/reconstruction
research_icon_state = "surgery_chest"
/datum/design/surgery/surgery_toxinhealing
name = "Body Rejuvenation"
desc = "A surgical procedure that helps deal with oxygen deprecation, and treat toxic damaged. Works on corpses and alive alike without chemicals."
id = "surgery_toxinhealing"
surgery = /datum/surgery/advanced/toxichealing
research_icon_state = "surgery_chest"
/datum/design/surgery/revival
name = "Revival"
desc = "An experimental surgical procedure which involves reconstruction and reactivation of the patient's brain even long after death. The body must still be able to sustain life."
@@ -379,6 +379,16 @@
////////////Tools//////////////
///////////////////////////////
/datum/design/rcd_upgrade
name = "Advanced RCD designs upgrade"
desc = "Adds the computer frame and machine frame to the RCD."
id = "rcd_upgrade"
build_type = PROTOLATHE
materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000)
build_path = /obj/item/rcd_upgrade
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/exwelder
name = "Experimental Welding Tool"
desc = "An experimental welder capable of self-fuel generation."
+2 -2
View File
@@ -115,7 +115,7 @@
display_name = "Advanced Surgery"
description = "When simple medicine doesn't cut it."
prereq_ids = list("adv_biotech")
design_ids = list("surgery_lobotomy", "surgery_reconstruction", "organbox")
design_ids = list("surgery_lobotomy", "surgery_reconstruction", "surgery_toxinhealing", "organbox")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
@@ -172,7 +172,7 @@
display_name = "Advanced Engineering"
description = "Pushing the boundaries of physics, one chainsaw-fist at a time."
prereq_ids = list("engineering", "emp_basic")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription")
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
export_price = 5000
@@ -0,0 +1,37 @@
/datum/surgery/advanced/toxichealing
name = "Body Rejuvenation"
desc = "A surgical procedure that helps deal with oxygen deprecation, and treat toxic damaged. Works on corpses and alive alike without chemicals."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/incise,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/toxichealing,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
/datum/surgery_step/toxichealing
name = "rejuvenate body"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
repeatable = TRUE
time = 25
/datum/surgery_step/toxichealing/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts rejuvenating some of [target]'s flesh back to life.", "<span class='notice'>You start knitting some of [target]'s flesh back to life.</span>")
/datum/surgery_step/toxichealing/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] fixes some of [target]'s wounds.", "<span class='notice'>You succeed in fixing some of [target]'s wounds.</span>")
target.heal_bodypart_damage(0,0,30) //Heals stam
target.adjustToxLoss(-15, 0, TRUE)
target.adjustOxyLoss(-20, 0)
return TRUE
/datum/surgery_step/toxichealing/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] screws up!", "<span class='warning'>You screwed up!</span>")
target.take_bodypart_damage(25,0)
return FALSE
+31
View File
@@ -0,0 +1,31 @@
/datum/surgery/embalming //Fast and easy way to husk bodys
name = "Embalming"
desc = "A surgical procedure that prevents a corps from producing."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/embalming,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
/datum/surgery_step/embalming
name = "embalming body"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30)
time = 10
chems_needed = list("drying_agent", "sterilizine")
require_all_chems = FALSE
/datum/surgery_step/embalming/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts to embalm [target]'s body.", "<span class='notice'>You start embalming [target]'s body.</span>")
/datum/surgery_step/embalming/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] embalms [target]'s body.", "<span class='notice'>You succeed in embalming [target]'s body.</span>")
ADD_TRAIT(target, TRAIT_HUSK, MAGIC_TRAIT) //Husk's prevent body smell
return FALSE
/datum/surgery_step/embalming/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] screws up!", "<span class='warning'>You screwed up!</span>")
ADD_TRAIT(target, TRAIT_NOCLONE, MAGIC_TRAIT) //That body is ruined, but still gives miasma
return FALSE
+1 -1
View File
@@ -1838,7 +1838,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes
desc = "A single-use autoinjector which contains an experimental serum that causes rapid muscular growth in Hominidae. \
Side-affects may include hypertrichosis, violent outbursts, and an unending affinity for bananas."
item = /obj/item/reagent_containers/hypospray/magillitis
cost = 15
cost = 8
restricted_roles = list("Geneticist", "Chief Medical Officer")
/datum/uplink_item/role_restricted/modified_syringe_gun