9e1ef0ffe2
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
99 lines
3.5 KiB
Plaintext
99 lines
3.5 KiB
Plaintext
/datum/round_event_control/wizard/greentext //Gotta have it!
|
|
name = "Greentext"
|
|
weight = 4
|
|
typepath = /datum/round_event/wizard/greentext
|
|
max_occurrences = 1
|
|
earliest_start = 0
|
|
|
|
/datum/round_event/wizard/greentext/start()
|
|
|
|
var/list/holder_canadates = GLOB.player_list.Copy()
|
|
for(var/mob/M in holder_canadates)
|
|
if(!ishuman(M))
|
|
holder_canadates -= M
|
|
if(!holder_canadates) //Very unlikely, but just in case
|
|
return 0
|
|
|
|
var/mob/living/carbon/human/H = pick(holder_canadates)
|
|
new /obj/item/weapon/greentext(H.loc)
|
|
to_chat(H, "<font color='green'>The mythical greentext appear at your feet! Pick it up if you dare...</font>")
|
|
|
|
|
|
/obj/item/weapon/greentext
|
|
name = "greentext"
|
|
desc = "No one knows what this massive tome does, but it feels <i><font color='green'>desirable</font></i> all the same..."
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
icon = 'icons/obj/wizard.dmi'
|
|
icon_state = "greentext"
|
|
var/mob/living/last_holder
|
|
var/mob/living/new_holder
|
|
var/list/color_altered_mobs = list()
|
|
resistance_flags = FIRE_PROOF | ACID_PROOF
|
|
var/quiet = FALSE
|
|
|
|
/obj/item/weapon/greentext/New()
|
|
..()
|
|
GLOB.poi_list |= src
|
|
|
|
/obj/item/weapon/greentext/equipped(mob/living/user as mob)
|
|
to_chat(user, "<font color='green'>So long as you leave this place with greentext in hand you know will be happy...</font>")
|
|
if(user.mind && user.mind.objectives.len > 0)
|
|
to_chat(user, "<span class='warning'>... so long as you still perform your other objectives that is!</span>")
|
|
new_holder = user
|
|
if(!last_holder)
|
|
last_holder = user
|
|
if(!(user in color_altered_mobs))
|
|
color_altered_mobs += user
|
|
user.add_atom_colour("#00FF00", ADMIN_COLOUR_PRIORITY)
|
|
START_PROCESSING(SSobj, src)
|
|
..()
|
|
|
|
/obj/item/weapon/greentext/dropped(mob/living/user as mob)
|
|
if(user in color_altered_mobs)
|
|
to_chat(user, "<span class='warning'>A sudden wave of failure washes over you...</span>")
|
|
user.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY) //ya blew it
|
|
last_holder = null
|
|
new_holder = null
|
|
STOP_PROCESSING(SSobj, src)
|
|
..()
|
|
|
|
/obj/item/weapon/greentext/process()
|
|
if(new_holder && new_holder.z == ZLEVEL_CENTCOM)//you're winner!
|
|
to_chat(new_holder, "<font color='green'>At last it feels like victory is assured!</font>")
|
|
if(!(new_holder in SSticker.mode.traitors))
|
|
SSticker.mode.traitors += new_holder.mind
|
|
new_holder.mind.special_role = "winner"
|
|
var/datum/objective/O = new /datum/objective("Succeed")
|
|
O.completed = 1 //YES!
|
|
O.owner = new_holder.mind
|
|
new_holder.mind.objectives += O
|
|
new_holder.log_message("<font color='green'>Won with greentext!!!</font>", INDIVIDUAL_ATTACK_LOG)
|
|
color_altered_mobs -= new_holder
|
|
resistance_flags |= ON_FIRE
|
|
qdel(src)
|
|
|
|
if(last_holder && last_holder != new_holder) //Somehow it was swiped without ever getting dropped
|
|
to_chat(last_holder, "<span class='warning'>A sudden wave of failure washes over you...</span>")
|
|
last_holder.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
|
|
last_holder = new_holder //long live the king
|
|
|
|
/obj/item/weapon/greentext/Destroy(force)
|
|
if(!(resistance_flags & ON_FIRE) && !force)
|
|
return QDEL_HINT_LETMELIVE
|
|
|
|
. = ..()
|
|
GLOB.poi_list.Remove(src)
|
|
for(var/mob/M in GLOB.mob_list)
|
|
var/message = "<span class='warning'>A dark temptation has passed from this world"
|
|
if(M in color_altered_mobs)
|
|
message += " and you're finally able to forgive yourself"
|
|
if(M.color == "#FF0000" || M.color == "#00FF00")
|
|
M.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
|
|
message += "...</span>"
|
|
// can't skip the mob check as it also does the decolouring
|
|
if(!quiet)
|
|
to_chat(M, message)
|
|
|
|
/obj/item/weapon/greentext/quiet
|
|
quiet = TRUE
|