mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-17 01:52:38 +01:00
Merge pull request #3438 from Neerti/5/9/2017_reopening_the_salt_mines
Adds Recently Cloned Modifier to Cloners
This commit is contained in:
@@ -658,6 +658,29 @@ var/list/admin_verbs_mentor = list(
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].</font>", 1)
|
||||
|
||||
/client/proc/admin_give_modifier(var/mob/living/L)
|
||||
set category = "Debug"
|
||||
set name = "Give Modifier"
|
||||
set desc = "Makes a mob weaker or stronger by adding a specific modifier to them."
|
||||
|
||||
if(!L)
|
||||
to_chat(usr, "<span class='warning'>Looks like you didn't select a mob.</span>")
|
||||
return
|
||||
|
||||
var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier
|
||||
|
||||
var/new_modifier_type = input("What modifier should we add to [L]?", "Modifier Type") as null|anything in possible_modifiers
|
||||
if(!new_modifier_type)
|
||||
return
|
||||
var/duration = input("How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
|
||||
if(duration == 0)
|
||||
duration = null
|
||||
else
|
||||
duration = duration SECONDS
|
||||
|
||||
L.add_modifier(new_modifier_type, duration)
|
||||
log_and_message_admins("has given [key_name(L)] the modifer [new_modifier_type], with a duration of [duration ? "[duration / 600] minutes" : "forever"].")
|
||||
|
||||
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
||||
set category = "Special Verbs"
|
||||
set name = "Make Sound"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
return ..() + {"
|
||||
<option value='?_src_=vars;mob_player_panel=\ref[src]'>Show player panel</option>
|
||||
<option>---</option>
|
||||
<option value='?_src_=vars;give_modifier=\ref[src]'>Give Modifier</option>
|
||||
<option value='?_src_=vars;give_spell=\ref[src]'>Give Spell</option>
|
||||
<option value='?_src_=vars;give_disease2=\ref[src]'>Give Disease</option>
|
||||
<option value='?_src_=vars;give_disease=\ref[src]'>Give TG-style Disease</option>
|
||||
|
||||
@@ -74,6 +74,18 @@
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_modifier"])
|
||||
if(!check_rights(R_ADMIN|R_FUN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/mob/living/M = locate(href_list["give_modifier"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
return
|
||||
|
||||
src.admin_give_modifier(M)
|
||||
href_list["datumrefresh"] = href_list["give_modifier"]
|
||||
|
||||
else if(href_list["give_disease2"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user