mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
Merge pull request #10204 from Razharas/VarEdit
Some varedit improvements
This commit is contained in:
@@ -463,13 +463,18 @@ var/list/admin_verbs_hideable = list(
|
||||
set category = "Fun"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
|
||||
|
||||
var/list/spell_list = list()
|
||||
var/type_length = length("/obj/effect/proc_holder/spell") + 2
|
||||
for(var/A in spells)
|
||||
spell_list[copytext("[A]", type_length)] = A
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_list
|
||||
if(!S)
|
||||
return
|
||||
S = spell_list[S]
|
||||
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</span>")
|
||||
|
||||
if(T.mind)
|
||||
T.mind.AddSpell(new S)
|
||||
else
|
||||
|
||||
@@ -83,16 +83,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
usr << "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
|
||||
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/callproc_datum(var/atom/A as null|area|mob|obj|turf)
|
||||
/client/proc/callproc_datum(var/A as null|area|mob|obj|turf)
|
||||
set category = "Debug"
|
||||
set name = "Atom ProcCall"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(!istype(A))
|
||||
return
|
||||
|
||||
var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
|
||||
if(!procname)
|
||||
return
|
||||
@@ -101,7 +98,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!lst)
|
||||
return
|
||||
|
||||
if(!A || A.gc_destroyed)
|
||||
if(!A || !IsValidSrc(A))
|
||||
usr << "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>"
|
||||
return
|
||||
if(!hascall(A,procname))
|
||||
|
||||
Reference in New Issue
Block a user