Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Flavor Text & Examining #262

Merged
merged 10 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@
req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE //wew lad
var/secure = FALSE
//DOPPLER EDIT CHANGE - Makes them upgraded by default because who in the hell is going to upgrade all of them manually.
def_components = list(/datum/stock_part/capacitor = /datum/stock_part/capacitor/tier4)

/obj/item/circuitboard/machine/holopad/multitool_act(mob/living/user, obj/item/tool)
if(secure)
Expand Down
14 changes: 14 additions & 0 deletions code/modules/mob/living/silicon/ai/examine.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// Adds a newline to the examine list if the above entry is not empty and it is not the first element in the list
#define ADD_NEWLINE_IF_NECESSARY(list) if(length(list) > 0 && list[length(list)]) { list += "" }

/mob/living/silicon/ai/examine(mob/user)
. = list()
if(stat == DEAD)
Expand Down Expand Up @@ -26,5 +29,16 @@
. += "The wireless networking light is blinking."
else if (!shunted && !client)
. += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem..."
// DOPPLER EDIT BEGIN: flavor text
var/short_desc = READ_PREFS(src, text/silicon_short_desc)
if (short_desc)
. += "[short_desc] [get_extended_description_href("\[👁️\]")]"
ADD_NEWLINE_IF_NECESSARY(.)
var/custom_model_name = READ_PREFS(src, text/silicon_model_name)
if (custom_model_name)
. += "It is [prefix_a_or_an(custom_model_name)] <em>[get_species_description_href(custom_model_name)]</em> model construct."
// DOPPLER EDIT END

. += ..()

#undef ADD_NEWLINE_IF_NECESSARY
105 changes: 68 additions & 37 deletions modular_doppler/flavortext_and_records/code/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,37 +69,32 @@
if (href_list["full_desc"])
// scuffed not-tgui flavor text stuff
var/mob/viewer = usr
var/can_see = (viewer in viewers(src))

if (HAS_TRAIT(src, TRAIT_UNKNOWN))
to_chat(viewer, span_notice("You can't discern a thing about them!"))
return

if (can_see)
var/short_desc = src.dna.features["flavor_short_desc"]
var/extended_desc = src.dna.features["flavor_extended_desc"]
var/headshot_url = src.dna.features["headshot_url"]
var/ooc_notes = src.dna.features["ooc_notes"]
var/short_desc = src.dna.features["flavor_short_desc"]
var/extended_desc = src.dna.features["flavor_extended_desc"]
var/headshot_url = src.dna.features["headshot_url"]
var/ooc_notes = src.dna.features["ooc_notes"]

var/full_examine = compile_examined_text(short_desc, extended_desc, headshot_url, ooc_notes)
var/full_examine = compile_examined_text(short_desc, extended_desc, headshot_url, ooc_notes)

to_chat(viewer, examine_block(span_info(full_examine)))
return
else
to_chat(viewer, span_notice("You're too far away to get a good look at [src]!"))
return
to_chat(viewer, examine_block(span_info(full_examine)))
return
else if (href_list["species_info"])
// return a blurb detailing their species
var/mob/viewer = usr
var/can_see = (viewer in viewers(src))
if (can_see)
var/species_name = src.dna.features["custom_species_name"] ? src.dna.features["custom_species_name"] : src.dna.species.name
var/species_desc = src.dna.features["custom_species_desc"] ? src.dna.features["custom_species_desc"] : src.dna.species.get_species_description()

var/full_examine = compile_species_info_text(species_name, species_desc, FALSE)
var/species_name = src.dna.features["custom_species_name"] ? src.dna.features["custom_species_name"] : src.dna.species.name
var/species_desc = src.dna.features["custom_species_desc"] ? src.dna.features["custom_species_desc"] : src.dna.species.get_species_description()

var/full_examine = compile_species_info_text(species_name, species_desc, FALSE)

to_chat(viewer, examine_block(span_info(full_examine)))
return

to_chat(viewer, examine_block(span_info(full_examine)))
return
/*
SILICONS (AKA HORRIBLE RUSTBUCKETS)
*/
Expand All @@ -118,34 +113,70 @@

if (href_list["full_desc"])
var/mob/viewer = usr
var/can_see = (viewer in viewers(src))

if (HAS_TRAIT(src, TRAIT_UNKNOWN))
to_chat(viewer, span_notice("You can't discern a thing about them!"))
return

if (can_see)
var/short_desc = READ_PREFS(src, text/silicon_short_desc)
var/extended_desc = READ_PREFS(src, text/silicon_extended_desc)
var/headshot_url = READ_PREFS(src, text/headshot/silicon)
var/ooc_notes = READ_PREFS(src, text/ooc_notes)
var/short_desc = READ_PREFS(src, text/silicon_short_desc)
var/extended_desc = READ_PREFS(src, text/silicon_extended_desc)
var/headshot_url = READ_PREFS(src, text/headshot/silicon)
var/ooc_notes = READ_PREFS(src, text/ooc_notes)

var/full_examine = compile_examined_text(short_desc, extended_desc, headshot_url, ooc_notes)
var/full_examine = compile_examined_text(short_desc, extended_desc, headshot_url, ooc_notes)

to_chat(viewer, examine_block(span_info(full_examine)))
return
else
to_chat(viewer, span_notice("You're too far away to get a good look at [src]!"))
return
to_chat(viewer, examine_block(span_info(full_examine)))
return
else if (href_list["species_info"])
var/mob/viewer = usr
var/can_see = (viewer in viewers(src))

if (can_see)
var/model_name = READ_PREFS(src, text/silicon_model_name)
var/model_desc = READ_PREFS(src, text/silicon_model_desc)
var/model_name = READ_PREFS(src, text/silicon_model_name)
var/model_desc = READ_PREFS(src, text/silicon_model_desc)

var/full_examine = compile_species_info_text(model_name, model_desc, TRUE)

to_chat(viewer, examine_block(span_info(full_examine)))
return

/*
AIS (AKA ALSO HORRIBLE RUSTBUCKETS)
*/

/mob/living/silicon/ai/examine_title(mob/user, thats)
. = ..()

// much simpler for silicons since disguises aren't really a thing... for now
var/model_name = READ_PREFS(src, text/silicon_model_name)
if (model_name)
. += ", [prefix_a_or_an(model_name)] <EM>[model_name]</EM>"


var/full_examine = compile_species_info_text(model_name, model_desc, TRUE)
/mob/living/silicon/ai/Topic(href, href_list)
. = ..()

to_chat(viewer, examine_block(span_info(full_examine)))
if (href_list["full_desc"])
var/mob/viewer = usr

if (HAS_TRAIT(src, TRAIT_UNKNOWN))
to_chat(viewer, span_notice("You can't discern a thing about them!"))
return

var/short_desc = READ_PREFS(src, text/silicon_short_desc)
var/extended_desc = READ_PREFS(src, text/silicon_extended_desc)
var/headshot_url = READ_PREFS(src, text/headshot/silicon)
var/ooc_notes = READ_PREFS(src, text/ooc_notes)

var/full_examine = compile_examined_text(short_desc, extended_desc, headshot_url, ooc_notes)

to_chat(viewer, examine_block(span_info(full_examine)))
return
else if (href_list["species_info"])
var/mob/viewer = usr

var/model_name = READ_PREFS(src, text/silicon_model_name)
var/model_desc = READ_PREFS(src, text/silicon_model_desc)

var/full_examine = compile_species_info_text(model_name, model_desc, TRUE)

to_chat(viewer, examine_block(span_info(full_examine)))
return
86 changes: 86 additions & 0 deletions modular_doppler/modular_silicons/silicon_edits/on_click.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* AI CHANGES
*/

/mob/living/silicon/ai/CtrlShiftClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.AICtrlShiftClick(src)
else
target.AICtrlShiftClick(src)

/mob/living/silicon/ai/ShiftClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.AIShiftClick(src)
else
target.AIShiftClick(src)
target.AIExamine(target)

/mob/living/silicon/ai/CtrlClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.AICtrlClick(src)
else
target.AICtrlClick(src)

/turf/ai_click_alt(mob/living/silicon/ai/user)
var/obj/machinery/door/airlock/airlock = locate() in src
if(airlock)
airlock.ai_click_alt(user)
return
return ..()


/atom/proc/AIExamine() // Used for AI specific examines .Currently only employed to stop door examines.
usr.examinate(src)

// Should keep all AI Examines in here in a list.
/obj/machinery/door/airlock/AIExamine() // Lets not spam the AI with door examinations
return

/mob/living/silicon/ai/ClickOn(atom/A, params)
..()
var/list/modifiers = params2list(params)
if(isturf(A) && !modifiers) // Have to check for modifiers.
var/obj/machinery/door/firedoor/the_door = locate() in A
if(the_door)
the_door.attack_ai(usr)

/*
* CYBORG CHANGES
*/

/mob/living/silicon/robot/CtrlShiftClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.BorgCtrlShiftClick(src)
else
target.BorgCtrlShiftClick(src)

/mob/living/silicon/robot/ShiftClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.BorgShiftClick(src)
else
target.BorgShiftClick(src)

/mob/living/silicon/robot/CtrlClickOn(atom/target)
if(isturf(target))
var/obj/machinery/door/airlock/airlock = locate() in target
if(airlock)
airlock.BorgCtrlClick(src)
else
target.BorgCtrlClick(src)

/turf/borg_click_alt(mob/living/silicon/robot/user)
var/obj/machinery/door/airlock/airlock = locate() in src
if(airlock)
airlock.borg_click_alt(user)
return
return ..()
23 changes: 23 additions & 0 deletions modular_doppler/modular_silicons/silicon_edits/pda.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/obj/item/modular_computer/pda/silicon
starting_programs = list(
/datum/computer_file/program/messenger,
/datum/computer_file/program/ntnetdownload,
/datum/computer_file/program/chatclient
)

/obj/item/modular_computer/pda/silicon/pai
starting_programs = list(
/datum/computer_file/program/messenger,
/datum/computer_file/program/ntnetdownload,
/datum/computer_file/program/chatclient
)

/obj/item/modular_computer/pda/silicon/cyborg
starting_programs = list(
/datum/computer_file/program/filemanager,
/datum/computer_file/program/robotact,
/datum/computer_file/program/atmosscan,
/datum/computer_file/program/crew_manifest,
/datum/computer_file/program/ntnetdownload,
/datum/computer_file/program/chatclient
)
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7102,6 +7102,8 @@
#include "modular_doppler\modular_quirks\permitted_cybernetic\permitted_cybernetic.dm"
#include "modular_doppler\modular_quirks\permitted_cybernetic\code\preferences.dm"
#include "modular_doppler\modular_quirks\system_shock\system_shock.dm"
#include "modular_doppler\modular_silicons\silicon_edits\on_click.dm"
#include "modular_doppler\modular_silicons\silicon_edits\pda.dm"
#include "modular_doppler\modular_sounds\code\sounds.dm"
#include "modular_doppler\modular_species\_species.dm"
#include "modular_doppler\modular_species\code\bloodsplatter.dm"
Expand Down
Loading