mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-04 14:33:10 +00:00
IPC Tag Project (#8649)
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
S["species"] >> pref.species
|
||||
S["spawnpoint"] >> pref.spawnpoint
|
||||
S["OOC_Notes"] >> pref.metadata
|
||||
if(istype(all_species[pref.species], /datum/species/machine))
|
||||
S["ipc_tag_status"] >> pref.machine_tag_status
|
||||
S["ipc_serial_number"] >> pref.machine_serial_number
|
||||
S["ipc_ownership_status"] >> pref.machine_ownership_status
|
||||
|
||||
/datum/category_item/player_setup_item/general/basic/save_character(var/savefile/S)
|
||||
S["real_name"] << pref.real_name
|
||||
@@ -17,7 +21,13 @@
|
||||
S["species"] << pref.species
|
||||
S["spawnpoint"] << pref.spawnpoint
|
||||
S["OOC_Notes"] << pref.metadata
|
||||
if(istype(all_species[pref.species], /datum/species/machine))
|
||||
S["ipc_tag_status"] << pref.machine_tag_status
|
||||
S["ipc_serial_number"] << pref.machine_serial_number
|
||||
S["ipc_ownership_status"] << pref.machine_ownership_status
|
||||
|
||||
// if table_name and pref.var_name is different, then do it like
|
||||
// "table_name" = "pref.var_name", as below
|
||||
/datum/category_item/player_setup_item/general/basic/gather_load_query()
|
||||
return list(
|
||||
"ss13_characters" = list(
|
||||
@@ -30,12 +40,25 @@
|
||||
"species"
|
||||
),
|
||||
"args" = list("id")
|
||||
),
|
||||
"ss13_characters_ipc_tags" = list(
|
||||
"vars" = list(
|
||||
"tag_status" = "machine_tag_status",
|
||||
"serial_number" = "machine_serial_number",
|
||||
"ownership_status" = "machine_ownership_status"
|
||||
),
|
||||
"args" = list("char_id")
|
||||
)
|
||||
)
|
||||
|
||||
// Generally, this doesn't USUALLY need changing
|
||||
/datum/category_item/player_setup_item/general/basic/gather_load_parameters()
|
||||
return list("id" = pref.current_character)
|
||||
return list(
|
||||
"id" = pref.current_character,
|
||||
"char_id" = pref.current_character
|
||||
)
|
||||
|
||||
// Only need to list the SQL table field names here
|
||||
/datum/category_item/player_setup_item/general/basic/gather_save_query()
|
||||
return list(
|
||||
"ss13_characters" = list(
|
||||
@@ -47,6 +70,12 @@
|
||||
"species",
|
||||
"id" = 1,
|
||||
"ckey" = 1
|
||||
),
|
||||
"ss13_characters_ipc_tags" = list(
|
||||
"tag_status",
|
||||
"serial_number",
|
||||
"ownership_status",
|
||||
"char_id" = 1 // = 1 signifies argument
|
||||
)
|
||||
)
|
||||
|
||||
@@ -58,12 +87,17 @@
|
||||
"metadata" = pref.metadata,
|
||||
"spawnpoint" = pref.spawnpoint,
|
||||
"species" = pref.species,
|
||||
"tag_status" = pref.machine_tag_status,
|
||||
"serial_number" = pref.machine_serial_number,
|
||||
"ownership_status" = pref.machine_ownership_status,
|
||||
"id" = pref.current_character,
|
||||
"char_id" = pref.current_character,
|
||||
"ckey" = PREF_CLIENT_CKEY
|
||||
)
|
||||
|
||||
/datum/category_item/player_setup_item/general/basic/load_special()
|
||||
pref.can_edit_name = 1
|
||||
pref.can_edit_name = TRUE
|
||||
pref.can_edit_ipc_tag = TRUE
|
||||
|
||||
if (config.sql_saves && pref.current_character)
|
||||
if (!establish_db_connection(dbcon))
|
||||
@@ -76,7 +110,9 @@
|
||||
|
||||
if (query.NextRow())
|
||||
if (text2num(query.item[1]) > 5)
|
||||
pref.can_edit_name = 0
|
||||
pref.can_edit_name = FALSE
|
||||
if(config.ipc_timelock_active)
|
||||
pref.can_edit_ipc_tag = FALSE
|
||||
else
|
||||
error("SQL CHARACTER LOAD: Logic error, general/basic/load_special() didn't return any rows when it should have.")
|
||||
log_debug("SQL CHARACTER LOAD: Logic error, general/basic/load_special() didn't return any rows when it should have. Character ID: [pref.current_character].")
|
||||
@@ -85,12 +121,13 @@
|
||||
if(!pref.species || !(pref.species in playable_species))
|
||||
pref.species = "Human"
|
||||
|
||||
pref.age = sanitize_integer(text2num(pref.age), pref.getMinAge(), pref.getMaxAge(), initial(pref.age))
|
||||
pref.gender = sanitize_gender(pref.gender, pref.species)
|
||||
pref.real_name = sanitize_name(pref.real_name, pref.species)
|
||||
pref.age = sanitize_integer(text2num(pref.age), pref.getMinAge(), pref.getMaxAge(), initial(pref.age))
|
||||
pref.gender = sanitize_gender(pref.gender, pref.species)
|
||||
pref.real_name = sanitize_name(pref.real_name, pref.species)
|
||||
if(!pref.real_name)
|
||||
pref.real_name = random_name(pref.gender, pref.species)
|
||||
pref.spawnpoint = sanitize_inlist(pref.spawnpoint, SSatlas.spawn_locations, initial(pref.spawnpoint))
|
||||
pref.real_name = random_name(pref.gender, pref.species)
|
||||
pref.spawnpoint = sanitize_inlist(pref.spawnpoint, SSatlas.spawn_locations, initial(pref.spawnpoint))
|
||||
pref.machine_tag_status = text2num(pref.machine_tag_status) // SQL queries return as text, so make this a num
|
||||
|
||||
/datum/category_item/player_setup_item/general/basic/content()
|
||||
var/list/dat = list("<b>Name:</b> ")
|
||||
@@ -104,6 +141,22 @@
|
||||
dat += "<b>Gender:</b> <a href='?src=\ref[src];gender=1'><b>[capitalize(lowertext(pref.gender))]</b></a><br>"
|
||||
dat += "<b>Age:</b> <a href='?src=\ref[src];age=1'>[pref.age]</a><br>"
|
||||
dat += "<b>Spawn Point</b>: <a href='?src=\ref[src];spawnpoint=1'>[pref.spawnpoint]</a><br>"
|
||||
if(istype(all_species[pref.species], /datum/species/machine))
|
||||
if(pref.can_edit_ipc_tag)
|
||||
dat += "<b>Has Tag:</b> <a href='?src=\ref[src];ipc_tag=1'>[pref.machine_tag_status ? "Yes" : "No"]</a><br>"
|
||||
else
|
||||
dat += "<b>Has Tag:</b> [pref.machine_tag_status ? "Yes" : "No"] (<a href='?src=\ref[src];namehelp=1'>?</a>)<br>"
|
||||
if(pref.machine_tag_status)
|
||||
if(!pref.machine_serial_number)
|
||||
var/generated_serial = uppertext(dd_limittext(md5(pref.real_name), 12))
|
||||
pref.machine_serial_number = generated_serial
|
||||
if(pref.can_edit_ipc_tag)
|
||||
dat += "<b>Serial Number:</b> <a href='?src=\ref[src];serial_number=1'>[pref.machine_serial_number]</a><br>"
|
||||
dat += "(<a href='?src=\ref[src];generate_serial=1'>Generate Serial Number</A>)<br>"
|
||||
dat += "<b>Ownership Status:</b> <a href='?src=\ref[src];ownership_status=1'>[pref.machine_ownership_status]</a><br>"
|
||||
else
|
||||
dat += "<b>Serial Number:</b> [pref.machine_serial_number] (<a href='?src=\ref[src];namehelp=1'>?</a>)<br>"
|
||||
dat += "<b>Ownership Status:</b> [pref.machine_ownership_status] (<a href='?src=\ref[src];namehelp=1'>?</a>)<br>"
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?src=\ref[src];metadata=1'> Edit </a><br>"
|
||||
|
||||
@@ -126,7 +179,7 @@
|
||||
return TOPIC_NOACTION
|
||||
|
||||
else if(href_list["namehelp"])
|
||||
alert(user, "Due to game mechanics, you are no longer able to edit the name for this character. The grace period offered is 5 days since the character's initial save.\n\nIf you have a need to change the character's name, or further questions regarding this policy, please contact an administrator.")
|
||||
alert(user, "Due to game mechanics, you are no longer able to edit this information for this character. The grace period offered is 5 days since the character's initial save.\n\nIf you have a need to change the character's information, or further questions regarding this policy, please contact an administrator.")
|
||||
return TOPIC_NOACTION
|
||||
|
||||
else if(href_list["random_name"])
|
||||
@@ -167,4 +220,45 @@
|
||||
pref.metadata = sanitize(new_metadata)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["ipc_tag"])
|
||||
if(!pref.can_edit_ipc_tag)
|
||||
to_chat(usr, SPAN_WARNING("You are unable to edit your IPC tag due to a timelock restriction. If you got here, it is either a hack or a bug."))
|
||||
return
|
||||
var/choice = alert(user, "Do you wish for your IPC to have a tag?\n\nWARNING: Being an untagged IPC in Tau space is highly illegal!", "IPC Tag", "Yes", "No")
|
||||
if(CanUseTopic(user))
|
||||
if(choice == "Yes")
|
||||
pref.machine_tag_status = TRUE
|
||||
else
|
||||
pref.machine_tag_status = FALSE
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["serial_number"])
|
||||
if(!pref.can_edit_ipc_tag)
|
||||
to_chat(usr, SPAN_WARNING("You are unable to edit your IPC tag due to a timelock restriction. If you got here, it is either a hack or a bug."))
|
||||
return
|
||||
var/new_serial_number = sanitize(input(user, "Enter what you want to set your serial number to.", "IPC Serial Number", pref.machine_serial_number) as message|null)
|
||||
new_serial_number = uppertext(dd_limittext(new_serial_number, 12))
|
||||
if(new_serial_number && CanUseTopic(user))
|
||||
pref.machine_serial_number = sanitize(new_serial_number)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["generate_serial"])
|
||||
if(!pref.can_edit_ipc_tag)
|
||||
to_chat(usr, SPAN_WARNING("You are unable to edit your IPC tag due to a timelock restriction. If you got here, it is either a hack or a bug."))
|
||||
return
|
||||
if(pref.real_name)
|
||||
var/generated_serial = uppertext(dd_limittext(md5(pref.real_name), 12))
|
||||
pref.machine_serial_number = generated_serial
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["ownership_status"])
|
||||
if(!pref.can_edit_ipc_tag)
|
||||
to_chat(usr, SPAN_WARNING("You are unable to edit your IPC tag due to a timelock restriction. If you got here, it is either a hack or a bug."))
|
||||
return
|
||||
var/static/list/ownership_options = list(IPC_OWNERSHIP_COMPANY, IPC_OWNERSHIP_PRIVATE, IPC_OWNERSHIP_SELF)
|
||||
var/new_ownership_status = input(user, "Choose your IPC's ownership status.", "IPC Ownership Status") as null|anything in ownership_options
|
||||
if(new_ownership_status && CanUseTopic(user))
|
||||
pref.machine_ownership_status = new_ownership_status
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -35,7 +35,8 @@ datum/preferences
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
var/can_edit_name = 1 //Whether or not a character's name can be edited. Used with SQL saving.
|
||||
var/can_edit_name = TRUE //Whether or not a character's name can be edited. Used with SQL saving.
|
||||
var/can_edit_ipc_tag = TRUE
|
||||
var/gender = MALE //gender of character (well duh)
|
||||
var/age = 30 //age of character
|
||||
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
|
||||
@@ -67,6 +68,11 @@ datum/preferences
|
||||
var/list/language_prefixes = list() // Language prefix keys
|
||||
var/list/gear // Custom/fluff item loadout.
|
||||
|
||||
// IPC Stuff
|
||||
var/machine_tag_status = TRUE
|
||||
var/machine_serial_number
|
||||
var/machine_ownership_status = IPC_OWNERSHIP_COMPANY
|
||||
|
||||
//Some faction information.
|
||||
var/home_system = "Unset" //System of birth.
|
||||
var/citizenship = "None" //Current home system.
|
||||
@@ -478,6 +484,8 @@ datum/preferences
|
||||
player_setup = new(src)
|
||||
gender = pick(MALE, FEMALE)
|
||||
real_name = random_name(gender,species)
|
||||
var/generated_serial = uppertext(dd_limittext(md5(real_name), 12))
|
||||
machine_serial_number = generated_serial
|
||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||
signature = "<i>[real_name]</i>"
|
||||
signfont = "Verdana"
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
msg += ", a <b><font color='[species.examine_color || species.flesh_color]'>[species.name]</font></b>"
|
||||
msg += "!\n"
|
||||
|
||||
if (should_have_organ(BP_IPCTAG) && internal_organs_by_name[BP_IPCTAG])
|
||||
msg += "[T.He] [T.is] wearing a tag designating them as Integrated Positronic Chassis <b>[src.real_name]</b>.\n"
|
||||
|
||||
//uniform
|
||||
if(w_uniform && !skipjumpsuit)
|
||||
//Ties
|
||||
|
||||
@@ -1061,6 +1061,23 @@ mob/living/carbon/human/proc/change_monitor()
|
||||
|
||||
to_chat(src, output)
|
||||
|
||||
/mob/living/carbon/human/proc/check_tag()
|
||||
set name = "Check Tag"
|
||||
set desc = "Run diagnostics on your tag to display its information."
|
||||
set category = "Abilities"
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/ipc_tag/tag = internal_organs_by_name[BP_IPCTAG]
|
||||
if(isnull(tag) || !tag)
|
||||
to_chat(src, SPAN_WARNING("Error: No Tag Found."))
|
||||
return
|
||||
to_chat(src, SPAN_NOTICE("[capitalize_first_letters(tag.name)]:"))
|
||||
to_chat(src, SPAN_NOTICE("<b>Serial Number:</b> [tag.serial_number]"))
|
||||
to_chat(src, SPAN_NOTICE("<b>Ownership Status:</b> [tag.ownership_info]"))
|
||||
to_chat(src, SPAN_NOTICE("<b>Citizenship Info:</b> [tag.citizenship_info]"))
|
||||
|
||||
/mob/living/carbon/human/proc/sonar_ping()
|
||||
set name = "Psychic Ping"
|
||||
set desc = "Allows you to listen in to psychic traces of organisms around you."
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/change_monitor
|
||||
/mob/living/carbon/human/proc/change_monitor,
|
||||
/mob/living/carbon/human/proc/check_tag
|
||||
)
|
||||
|
||||
flags = IS_IPC
|
||||
@@ -146,28 +147,24 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
return sanitizeName(new_name, allow_numbers = 1)
|
||||
|
||||
/datum/species/machine/proc/check_tag(var/mob/living/carbon/human/new_machine, var/client/player)
|
||||
if (!new_machine || !player)
|
||||
if(!new_machine || !player)
|
||||
var/obj/item/organ/internal/ipc_tag/tag = new_machine.internal_organs_by_name[BP_IPCTAG]
|
||||
if(tag)
|
||||
tag.serial_number = uppertext(dd_limittext(md5(new_machine.real_name), 12))
|
||||
tag.ownership_info = IPC_OWNERSHIP_COMPANY
|
||||
tag.citizenship_info = CITIZENSHIP_BIESEL
|
||||
return
|
||||
|
||||
if (establish_db_connection(dbcon))
|
||||
var/obj/item/organ/internal/ipc_tag/tag = new_machine.internal_organs_by_name[BP_IPCTAG]
|
||||
|
||||
var/obj/item/organ/internal/ipc_tag/tag = new_machine.internal_organs_by_name[BP_IPCTAG]
|
||||
|
||||
var/status = TRUE
|
||||
var/list/query_details = list("ckey" = player.ckey, "character_name" = player.prefs.real_name)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT tag_status FROM ss13_ipc_tracking WHERE player_ckey = :ckey: AND character_name = :character_name:")
|
||||
query.Execute(query_details)
|
||||
|
||||
if (query.NextRow())
|
||||
status = text2num(query.item[1])
|
||||
else
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO ss13_ipc_tracking (player_ckey, character_name, tag_status) VALUES (:ckey:, :character_name:, 1)")
|
||||
log_query.Execute(query_details)
|
||||
|
||||
if (!status)
|
||||
new_machine.internal_organs_by_name -= BP_IPCTAG
|
||||
new_machine.internal_organs -= tag
|
||||
qdel(tag)
|
||||
if(player.prefs.machine_tag_status)
|
||||
tag.serial_number = player.prefs.machine_serial_number
|
||||
tag.ownership_info = player.prefs.machine_ownership_status
|
||||
tag.citizenship_info = new_machine.citizenship
|
||||
else
|
||||
new_machine.internal_organs_by_name -= BP_IPCTAG
|
||||
new_machine.internal_organs -= tag
|
||||
qdel(tag)
|
||||
|
||||
/datum/species/machine/proc/update_tag(var/mob/living/carbon/human/target, var/client/player)
|
||||
if (!target || !player)
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag,
|
||||
/mob/living/carbon/human/proc/tie_hair)
|
||||
|
||||
/datum/species/machine/shell/get_light_color()
|
||||
@@ -164,7 +165,8 @@
|
||||
sprint_charge_factor = 1.1
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag
|
||||
)
|
||||
|
||||
/datum/species/machine/industrial/get_light_color()
|
||||
@@ -308,6 +310,7 @@
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag,
|
||||
/mob/living/carbon/human/proc/crush
|
||||
)
|
||||
|
||||
@@ -434,7 +437,8 @@
|
||||
)
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag
|
||||
)
|
||||
|
||||
/datum/species/machine/zenghu/get_light_color(mob/living/carbon/human/H)
|
||||
@@ -480,7 +484,8 @@
|
||||
)
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag
|
||||
)
|
||||
|
||||
/datum/species/machine/bishop/get_light_color(mob/living/carbon/human/H)
|
||||
@@ -519,7 +524,8 @@
|
||||
)
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/carbon/human/proc/self_diagnostics
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
/mob/living/carbon/human/proc/check_tag
|
||||
)
|
||||
|
||||
/datum/species/machine/unbranded/remote
|
||||
|
||||
@@ -85,9 +85,15 @@
|
||||
to_chat(user, SPAN_NOTICE("Internal prosthetics:"))
|
||||
organ_found = FALSE
|
||||
if(length(H.internal_organs))
|
||||
var/obj/item/organ/external/head = H.get_organ(BP_HEAD)
|
||||
var/show_tag = FALSE
|
||||
if(head?.open == 3) // Hatch open
|
||||
show_tag = TRUE
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
if(!(O.status & ORGAN_ROBOT))
|
||||
continue
|
||||
if(!show_tag && istype(O, /obj/item/organ/internal/ipc_tag))
|
||||
continue
|
||||
organ_found = TRUE
|
||||
to_chat(user, "[O.name]: <font color='red'>[O.damage]</font>")
|
||||
if(!organ_found)
|
||||
|
||||
@@ -138,14 +138,74 @@
|
||||
name = "identification tag"
|
||||
organ_tag = "ipc tag"
|
||||
parent_organ = BP_HEAD
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "gps-c"
|
||||
dead_icon = "gps-c"
|
||||
icon = 'icons/obj/ipc_utilities.dmi'
|
||||
icon_state = "ipc_tag"
|
||||
item_state = "ipc_tag"
|
||||
dead_icon = "ipc_tag_dead"
|
||||
contained_sprite = TRUE
|
||||
var/auto_generate = TRUE
|
||||
var/serial_number = ""
|
||||
var/ownership_info = IPC_OWNERSHIP_COMPANY
|
||||
var/citizenship_info = CITIZENSHIP_BIESEL
|
||||
|
||||
/obj/item/organ/internal/ipc_tag/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/ipc_tag/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, SPAN_NOTICE("Serial Autogeneration: [auto_generate ? "Yes" : "No"]"))
|
||||
to_chat(user, SPAN_NOTICE("Serial Number: [serial_number]"))
|
||||
to_chat(user, SPAN_NOTICE("Ownership Info: [ownership_info]"))
|
||||
to_chat(user, SPAN_NOTICE("Citizenship Info: [citizenship_info]"))
|
||||
|
||||
/obj/item/organ/internal/ipc_tag/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/ipc_tag_scanner))
|
||||
if(src.loc != user)
|
||||
to_chat(user, SPAN_WARNING("You can't scan \the [src] if it's not on your person!"))
|
||||
return
|
||||
var/obj/item/ipc_tag_scanner/S = W
|
||||
if(!S.powered)
|
||||
to_chat(user, SPAN_WARNING("\The [src] reads, \"Scanning failure, please submit scanner for repairs.\""))
|
||||
return
|
||||
if(!S.hacked)
|
||||
user.examinate(src)
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("\The [user] starts fiddling with \the [src]..."), SPAN_NOTICE("You start fiddling with \the [src]..."))
|
||||
if(do_after(user, 30, TRUE, src))
|
||||
if(src.loc != user)
|
||||
to_chat(user, SPAN_WARNING("You can only modify \the [src] if it's on your person!"))
|
||||
return
|
||||
var/static/list/modification_options = list("Serial Number", "Ownership Status", "Citizenship")
|
||||
var/choice = input(user, "How do you want to modify the IPC tag?", "IPC Tag Modification") as null|anything in modification_options
|
||||
if(choice)
|
||||
if(choice == "Serial Number")
|
||||
var/serial_selection = alert(user, "In what way do you want to modify the serial number?", "Serial Number Selection", "Auto Generation", "Manual Input", "Cancel")
|
||||
if(serial_selection != "Cancel")
|
||||
if(serial_selection == "Auto Generation")
|
||||
var/auto_generation_choice = alert(user, "Do you wish for the IPC tag to automatically generate its serial number based on the IPCs name?", "Serial Autogeneration", "Yes", "No")
|
||||
if(auto_generation_choice == "Yes")
|
||||
auto_generate = TRUE
|
||||
else
|
||||
auto_generate = FALSE
|
||||
if(serial_selection == "Manual Input")
|
||||
var/new_serial = input(user, "What do you wish for the new serial number to be? (Limit of 12 characters)", "Serial Number Modification", serial_number) as text|null
|
||||
new_serial = uppertext(dd_limittext(new_serial, 12))
|
||||
if(new_serial)
|
||||
serial_number = new_serial
|
||||
auto_generate = FALSE
|
||||
if(choice == "Ownership Status")
|
||||
var/static/list/ownership_options = list(IPC_OWNERSHIP_COMPANY, IPC_OWNERSHIP_PRIVATE, IPC_OWNERSHIP_SELF)
|
||||
var/new_ownership = input(user, "What do you wish for the new ownership status to be?", "Ownership Status Modification") as null|anything in ownership_options
|
||||
if(new_ownership)
|
||||
ownership_info = new_ownership
|
||||
if(choice == "Citizenship")
|
||||
var/datum/citizenship/citizenship = input(user, "What do you wish for the new citizenship setting to be?", "Citizenship Setting Modification") as null|anything in SSrecords.citizenships
|
||||
if(citizenship)
|
||||
citizenship_info = citizenship
|
||||
else
|
||||
..()
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/internal/mmi_holder
|
||||
name = "brain"
|
||||
|
||||
@@ -99,6 +99,14 @@ datum/design/item/tool/advanced_light_replacer
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
build_path = /obj/item/device/analyzer
|
||||
|
||||
|
||||
/datum/design/item/tool/tag_scanner
|
||||
name = "Tag Scanner"
|
||||
desc = "A hand-held scanner used to scan IPCs and receive data from their tags."
|
||||
req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
|
||||
build_path = /obj/item/ipc_tag_scanner
|
||||
|
||||
/datum/design/item/tool/plant_analyzer
|
||||
name = "Plant Analyzer"
|
||||
desc = "A hand-held plant scanner for hydroponicists and xenobotanists."
|
||||
|
||||
Reference in New Issue
Block a user