mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] ERTs can now be summoned as a set species (#29513)
* ERTs can now be summoned as a set species (#85651) ## About The Pull Request This repurposes the redundant `mobtype` var on the ERT datum. Originally used to store the typepath for what mob the ERT would spawn (which was unchanged on any of the other datums), it is now null by default and can be modified in the summon_ert verb menu. If left blank, it will default to humans, but it can be set to any humanoid species.  ## Why It's Good For The Game As stated previously, mobtype was redundant, as it would either always spawn humans (human authority would immediately humanize the spawned mob) or be overridden by the preferences of the player being spawned. Rather than making it a hardcoded value and deleting the var, I've elected to repurpose it for further ERT customization. Moth ERT, Moth ERT, Moth ERT. ## Changelog 🆑 Rhials admin: You can now choose the humanoid species spawned by an ERT summon in the summon menu. /🆑 * ERTs can now be summoned as a set species --------- Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -1,5 +1,4 @@
|
||||
/datum/ert
|
||||
var/mobtype = /mob/living/carbon/human
|
||||
var/team = /datum/team/ert
|
||||
var/opendoors = TRUE
|
||||
var/leader_role = /datum/antagonist/ert/commander
|
||||
@@ -22,6 +21,8 @@
|
||||
var/datum/map_template/ert_template
|
||||
/// If we should actually _use_ the ert_template custom shuttle
|
||||
var/use_custom_shuttle = TRUE
|
||||
/// Used for spawning bodies for your ERT. Unless customized in the Summon-ERT verb settings, will be overridden and should not be defined at the datum level.
|
||||
var/mob/living/carbon/human/mob_type
|
||||
|
||||
/datum/ert/New()
|
||||
if (!polldesc)
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
"spawn_admin" = list("desc" = "Spawn yourself as briefing officer", "type" = "boolean", "value" = "[(ertemplate.spawn_admin ? "Yes" : "No")]"),
|
||||
"notify_players" = list("desc" = "Notify players that you have sent an ERT", "type" = "boolean", "value" = "[(ertemplate.notify_players ? "Yes" : "No")]"), //SKYRAT EDIT ADDITION
|
||||
"use_custom_shuttle" = list("desc" = "Use the ERT's custom shuttle (if it has one)", "type" = "boolean", "value" = "[(ertemplate.use_custom_shuttle ? "Yes" : "No")]"),
|
||||
"mob_type" = list("desc" = "Base Species", "callback" = CALLBACK(src, PROC_REF(makeERTTemplateModified)), "type" = "datum", "path" = "/mob/living/carbon/human", "subtypesonly" = TRUE, "value" = ertemplate.mob_type),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -119,6 +120,7 @@
|
||||
ertemplate.spawn_admin = prefs["spawn_admin"]["value"] == "Yes"
|
||||
ertemplate.notify_players = prefs["notify_players"]["value"] == "Yes" //SKYRAT EDIT ADDITION
|
||||
ertemplate.use_custom_shuttle = prefs["use_custom_shuttle"]["value"] == "Yes"
|
||||
ertemplate.mob_type = prefs["mob_type"]["value"]
|
||||
|
||||
var/list/spawnpoints = GLOB.emergencyresponseteamspawn
|
||||
var/index = 0
|
||||
@@ -224,8 +226,12 @@
|
||||
continue
|
||||
|
||||
//Spawn the body
|
||||
var/mob/living/carbon/human/ert_operative = new ertemplate.mobtype(spawnloc)
|
||||
chosen_candidate.client.prefs.safe_transfer_prefs_to(ert_operative, is_antag = TRUE)
|
||||
var/mob/living/carbon/human/ert_operative
|
||||
if(ertemplate.mob_type)
|
||||
ert_operative = new ertemplate.mob_type(spawnloc)
|
||||
else
|
||||
ert_operative = new /mob/living/carbon/human(spawnloc)
|
||||
chosen_candidate.client.prefs.safe_transfer_prefs_to(ert_operative, is_antag = TRUE)
|
||||
ert_operative.key = chosen_candidate.key
|
||||
|
||||
if(ertemplate.enforce_human || !(ert_operative.dna.species.changesource_flags & ERT_SPAWN))
|
||||
|
||||
Reference in New Issue
Block a user