TG: - Added a cookie food type, which cannot be made ingame

- slightly altered the pray format to include a (SC) link, which stands for
'spawn cookie'. This attempts to spawn a cookie in the hands of the person who
prayed. It's intent is to be a consolation prize when the prayer cannot be
answered, due to it ruining the round. Only humans will get a cookie.

Screenshot:
http://www.kamletos.si/cookie%20spawner.PNG
Revision: r3766
Author: 	 baloh.matevz
This commit is contained in:
Erthilo
2012-06-23 15:49:05 +01:00
parent adff0de024
commit 6cf06cc9ac
3 changed files with 30 additions and 1 deletions
+20
View File
@@ -1422,6 +1422,26 @@ var/global/BSACooldown = 0
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
if (href_list["adminspawncookie"])
var/mob/M = locate(href_list["adminspawncookie"])
if(M && ishuman(M))
var/mob/living/carbon/human/H = M
H.equip_if_possible( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), H.slot_l_hand )
if(!(istype(H.l_hand,/obj/item/weapon/reagent_containers/food/snacks/cookie)))
H.equip_if_possible( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), H.slot_r_hand )
if(!(istype(H.r_hand,/obj/item/weapon/reagent_containers/food/snacks/cookie)))
log_admin("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].")
message_admins("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].")
return
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
feedback_inc("admin_cookies_spawned",1)
H << "\blue Your prayers have been answered!! You received the <b>best cookie</b>!"
else
src << "\blue The person who prayed is not a human. Cookies cannot be spawned."
if (href_list["traitor_panel_pp"])
if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master"))
var/mob/M = locate(href_list["traitor_panel_pp"])
+1 -1
View File
@@ -14,7 +14,7 @@
for (var/mob/M in world)
if (M.client && M.client.holder && M.client.seeprayers)
M << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
M << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
usr << "Your prayers have been received by the gods."
//feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!