mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
[READY FOR REVIEW] Adds more xenoarch large artifact triggers, adds manual trigger picking to the admin spawn option (#14448)
* manual trigger picking for admin spawned artifacts * adds in a light based trigger * misc fixes * adds in pressure trigger * quick electricity prototype, needs more refining * unfuck dme * SPEED trigger and misc fixes * not visible trigger D E V I L I S H edition * prototype pay2use trigger * finalise everything before testing * bug fixes * requested changes * misc tweaks
This commit is contained in:
@@ -3052,25 +3052,50 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","CA")
|
||||
var/answer = alert("Are you sure you want to create a custom artifact?",,"Yes","No")
|
||||
|
||||
if(answer == "Yes")
|
||||
//Either have them as all random, or have custom artifacts
|
||||
var/list/effects = typesof(/datum/artifact_effect)
|
||||
var/list/triggers = typesof(/datum/artifact_trigger)
|
||||
effects.Remove(/datum/artifact_effect)
|
||||
triggers.Remove(/datum/artifact_trigger)
|
||||
|
||||
var/answer1 = alert("Just a primary, or primary and secondary effects?",,"Primary only","Primary and Secondary")
|
||||
var/primary_effect = input(usr, "Which primary effect would you like?", "Primary effect") as null|anything in effects
|
||||
var/secondary_effect
|
||||
var/answer2 = alert("Randomly generated triggers (safer), or manually picked (might break certain effects)?",,"Random","Manual")
|
||||
|
||||
var/custom_primary_effect = input(usr, "Which primary effect would you like?", "Primary effect") as null|anything in effects
|
||||
var/custom_primary_trigger
|
||||
if(answer2 == "Manual")
|
||||
custom_primary_trigger = input(usr, "Which trigger would you like for the primary effect?", "Primary trigger") as null|anything in triggers
|
||||
|
||||
var/custom_secondary_effect
|
||||
var/custom_secondary_trigger
|
||||
if(answer1 == "Primary and Secondary")
|
||||
secondary_effect = input(usr, "Which secondary effect would you like?", "Secondary effect") as null|anything in effects
|
||||
var/obj/machinery/artifact/custom = new /obj/machinery/artifact(get_turf(usr))
|
||||
qdel(custom.primary_effect); custom.primary_effect = null
|
||||
custom.primary_effect = new primary_effect(custom)
|
||||
custom.primary_effect.GenerateTrigger()
|
||||
qdel(custom.secondary_effect); custom.secondary_effect = null
|
||||
if(secondary_effect)
|
||||
custom.secondary_effect = new secondary_effect(custom)
|
||||
custom.secondary_effect.GenerateTrigger()
|
||||
custom_secondary_effect = input(usr, "Which secondary effect would you like?", "Secondary effect") as null|anything in effects
|
||||
if(answer2 == "Manual")
|
||||
custom_secondary_trigger = input(usr, "Which trigger would you like for the secondary effect?", "Secondary trigger") as null|anything in triggers
|
||||
|
||||
var/obj/machinery/artifact/custom = new /obj/machinery/artifact(get_turf(usr), null, 0)
|
||||
custom.primary_effect = new custom_primary_effect(custom)
|
||||
if(answer2 == "Random")
|
||||
custom.primary_effect.GenerateTrigger()
|
||||
else
|
||||
custom.primary_effect.trigger = new custom_primary_trigger(custom.primary_effect)
|
||||
|
||||
custom.investigation_log(I_ARTIFACT, "|| admin-spawned by [key_name_admin(usr)] with a primary effect [custom.primary_effect.artifact_id]: [custom.primary_effect] || range: [custom.primary_effect.effectrange] || charge time: [custom.primary_effect.chargelevelmax] || trigger: [custom.primary_effect.trigger].")
|
||||
|
||||
if(custom_secondary_effect)
|
||||
custom.secondary_effect = new custom_secondary_effect(custom)
|
||||
if(answer2 == "Random")
|
||||
custom.secondary_effect.GenerateTrigger()
|
||||
else
|
||||
custom.secondary_effect.trigger = new custom_secondary_trigger(custom.secondary_effect)
|
||||
custom.investigation_log(I_ARTIFACT, "|| admin-spawned by [key_name_admin(usr)] with a secondary effect [custom.secondary_effect.artifact_id]: [custom.secondary_effect] || range: [custom.secondary_effect.effectrange] || charge time: [custom.secondary_effect.chargelevelmax] || trigger: [custom.secondary_effect.trigger].")
|
||||
|
||||
|
||||
message_admins("[key_name_admin(usr)] has created a custom artifact")
|
||||
|
||||
|
||||
if("schoolgirl")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SG")
|
||||
|
||||
Reference in New Issue
Block a user