mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Adminboooooooooooooos
This commit is contained in:
@@ -1708,4 +1708,12 @@ var/mob/dview/dview_mob = new
|
||||
|
||||
see_in_dark = 1e6
|
||||
|
||||
/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox
|
||||
/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox
|
||||
|
||||
/proc/IsValidSrc(var/A)
|
||||
if(istype(A, /datum))
|
||||
var/datum/B = A
|
||||
return isnull(B.gcDestroyed)
|
||||
if(istype(A, /client))
|
||||
return 1
|
||||
return 0
|
||||
@@ -238,6 +238,7 @@ client
|
||||
|
||||
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
body += "<option value='?_src_=vars;proc_call=\ref[D]'>Call Proc</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
@@ -696,6 +697,15 @@ client
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["proc_call"])
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
var/T = locate(href_list["proc_call"])
|
||||
|
||||
if(T)
|
||||
callproc_datum(T)
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
|
||||
@@ -406,8 +406,14 @@ var/list/admin_verbs_mentor = list(
|
||||
set category = "Event"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
var/obj/effect/proc_holder/spell/wizard/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
|
||||
if(!S) return
|
||||
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]
|
||||
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 || !isnull(A.gcDestroyed))
|
||||
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