Adds Trait Genetics (#16921)

* Adds Trait Genetics from Outpost21

Adds trait genetics from Outpost 21
- Tried to update each file it touched to be equivalent to their Chomp specific variants in order to maintain functionality and make sure no oddities would happen due to code differences. (Some things like the eardeaf loop were left there but commented out)

* Morph trait

* Fixes a server crashing bug with flip

aa

* flip

* Makes morph superpower better

- Makes it use the appearance_changer instead of 1000 different  procs

- Makes cocoon weaver able to change eye and skin color.

I did NOT select you. BAD

* begone

* fix dna modifier

* Fixes massive memory leak

* Brain Runtime Fix

* There was no reason for this to be a spawn(0)

And no I didn't spawn with no blood - https://i.imgur.com/vPizqCD.png

* revert

revert the dna changes there

* Deconf

* gets rid of unused proc vars that did nothing

* expects enough free slots

* glob

* fixed and added two other tests

* another few tests

* this is a list

* fixed bad injector

* lets wrap these for sanity

* better feedback

* wrong name

* don't allow multiple occupants into the dna pod

* future traits will have activation levels instead of binary on/off

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-02-11 02:01:27 -05:00
committed by GitHub
co-authored by Kashargul Willburd
parent 408b765def
commit cdafe425a5
108 changed files with 3805 additions and 2014 deletions
+15 -19
View File
@@ -9,8 +9,8 @@
return
for(var/obj/item/W in M)
if(istype(W, /obj/item/implant/backup) || istype(W, /obj/item/nif)) //VOREStation Edit - There's basically no reason to remove either of these
continue //VOREStation Edit
if(istype(W, /obj/item/implant/backup) || istype(W, /obj/item/nif)) //There's basically no reason to remove either of these
continue
M.drop_from_inventory(W)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
@@ -432,8 +432,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(samejob == "Yes")
charjob = record_found.fields["real_rank"]
else if(samejob == JOB_ALT_VISITOR) //VOREStation Edit - Visitor not Assistant
charjob = JOB_ALT_VISITOR //VOREStation Edit - Visitor not Assistant
else if(samejob == JOB_ALT_VISITOR)
charjob = JOB_ALT_VISITOR
else
records = tgui_alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records",list("No", "Yes", "Cancel"))
if(!records || records == "Cancel")
@@ -465,10 +465,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
//For logging later
var/admin = key_name_admin(src)
var/player_key = picked_client.key
//VOREStation Add - Needed for persistence
var/picked_ckey = picked_client.ckey
var/picked_slot = picked_client.prefs.default_slot
//VOREStation Add End
var/mob/living/carbon/human/new_character
var/spawnloc
@@ -517,6 +515,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
picked_client.prefs.copy_to(new_character)
if(new_character.dna)
new_character.dna.ResetUIFrom(new_character)
new_character.sync_dna_traits(TRUE) // Traitgenes Sync traits to genetics if needed
new_character.sync_organ_dna()
if(inhabit)
new_character.key = player_key
@@ -527,11 +526,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
antag_data.add_antagonist(new_character.mind)
antag_data.place_mob(new_character)
//VOREStation Add - Required for persistence
if(new_character.mind)
new_character.mind.loaded_from_ckey = picked_ckey
new_character.mind.loaded_from_slot = picked_slot
//VOREStation Add End
for(var/lang in picked_client.prefs.alternate_languages)
var/datum/language/chosen_language = GLOB.all_languages[lang]
@@ -546,7 +543,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(new_character.mind)
new_character.mind.assigned_role = charjob
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
//equip_custom_items(new_character) //VOREStation Removal
//If desired, add records.
if(records)
@@ -555,7 +551,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//A redraw for good measure
new_character.regenerate_icons()
new_character.update_transform() //VOREStation Edit
new_character.update_transform()
//If we're announcing their arrival
if(announce)
@@ -700,7 +696,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Fun.Do Not"
set name = "Explosion"
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
if(!check_rights(R_DEBUG|R_FUN)) return
var/devastation = tgui_input_number(usr, "Range of total devastation. -1 to none", text("Input"), min_value=-1)
if(devastation == null) return
@@ -728,7 +724,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Fun.Do Not"
set name = "EM Pulse"
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
if(!check_rights(R_DEBUG|R_FUN)) return
var/heavy = tgui_input_number(usr, "Range of heavy pulse.", text("Input"))
if(heavy == null) return
@@ -754,7 +750,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Fun.Do Not"
set name = "Gib"
if(!check_rights(R_ADMIN|R_FUN)) return //VOREStation Edit
if(!check_rights(R_ADMIN|R_FUN)) return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") return
@@ -855,7 +851,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
set category = "Admin.Investigate"
set name = "Check Contents"
set popup_menu = FALSE //VOREStation Edit - Declutter.
set popup_menu = FALSE
if(!holder)
return
@@ -912,7 +908,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
mob.set_viewsize(view)
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("<font color='blue'>[key_name_admin(usr)] changed their view range to [view].</font>", 1) //why? removed by order of XSI
message_admins("<font color='blue'>[key_name_admin(usr)] changed their view range to [view].</font>", 1)
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -923,7 +919,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return //VOREStation Edit
if(!check_rights(R_ADMIN)) return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") return
@@ -952,7 +948,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin.Events"
set name = "Cancel Shuttle"
if(!check_rights(R_ADMIN)) return //VOREStation Edit
if(!check_rights(R_ADMIN|R_FUN)) return
if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return
@@ -973,7 +969,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (!ticker)
return
if(!check_rights(R_ADMIN)) return //VOREStation Edit
if(!check_rights(R_ADMIN)) return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
@@ -1029,7 +1025,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
if(!check_rights(R_SERVER)) return //VOREStation Edit
if(!check_rights(R_SERVER)) return
if(!CONFIG_GET(flag/allow_random_events))
CONFIG_SET(flag/allow_random_events, TRUE)