Files
Bubberstation/code/modules/events/wizard/greentext.dm
coiax 4483d5275c Shuttle manipulator (#17436)
* Starting out on our tgui journey

* God tgui, why do you need to be updated

You're dynamically generated anyway

* Commit of stuff

* Further progress is being made

* Everyone loves buildscripts

* Further modifications to my incredible running script

* Starting to modify the minimap code to be better

* It's going well thusfar, I guess

* What have I done

* RIP minimap

* FUN FUN FUN FUN FUN

* Adds shuttle_manipulator.dmi

MUH HOLOGRAMS

* Is it done? IS IT OVER

* Peer review

* Some bug fixes

* Makes that damn greentext shut up

* Shuttle registration

* Made the Emergency Escape Bar more robust

No climbing on the bar.

* Do not stare into the operation end of the device

* Compile shame

* THE MOST DUMB

* Passive barmaiden

* Emergency shuttle memes

* MORE SAFETY CODE

* Fancy shuttle manipulator icons

* Smoothing it out

* We are going to have a lot of fun with this one

* Independent blobbernauts

* WABBAJACK WABBAJACK

* Message for attempting to authenticate old style

* Angry alert noise is back

* Revert "Independent blobbernauts"

This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3.

* No parrot sleep plz

* Moves the special shuttle stuff to special.dm

* No Bartender like a Centcom Bartender

* Non-controversial map changes

- Backup shuttle moved closer to Centcom main structure, docking tube
created
- Moved shuttle import landmark to above Centcom main building
- Added shuttle displays to Conference Room
- Squashed the Chapel a bit in Metastation
- Made the docking port on Z2 massive
- Made the docking port on Metastation a lot larger

* Hacks and slashes at Box

A bunch of things are extended and squashed so Box shuttle dock can
support the MetaStation emergency shuttle.

* Some Metastationshit

* Never ending changes

* Wabbajack to TGM

* Modified the bar, I think that's all of them

* Stops Barmaiden wandering around

* More code review

* Whitspace, the bane of us all

* DIE WHITESPACE DIE
2016-05-26 15:15:19 +02:00

98 lines
3.2 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 = 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)
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 = 4
icon = 'icons/obj/wizard.dmi'
icon_state = "greentext"
var/mob/living/last_holder
var/mob/living/new_holder
var/list/color_altered_mobs = list()
burn_state = FIRE_PROOF
var/quiet = FALSE
/obj/item/weapon/greentext/New()
..()
poi_list |= src
/obj/item/weapon/greentext/equipped(mob/living/user as mob)
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)
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.color = "#00FF00"
SSobj.processing |= src
..()
/obj/item/weapon/greentext/dropped(mob/living/user as mob)
if(user in color_altered_mobs)
user << "<span class='warning'>A sudden wave of failure washes over you...</span>"
user.color = "#FF0000" //ya blew it
last_holder = null
new_holder = null
SSobj.processing.Remove(src)
..()
/obj/item/weapon/greentext/process()
if(new_holder && new_holder.z == ZLEVEL_CENTCOM)//you're winner!
new_holder << "<font color='green'>At last it feels like victory is assured!</font>"
if(!(new_holder in ticker.mode.traitors))
ticker.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.attack_log += "\[[time_stamp()]\] <font color='green'>Won with greentext!!!</font>"
color_altered_mobs -= new_holder
burn_state = ON_FIRE
qdel(src)
if(last_holder && last_holder != new_holder) //Somehow it was swiped without ever getting dropped
last_holder << "<span class='warning'>A sudden wave of failure washes over you...</span>"
last_holder.color = "#FF0000"
last_holder = new_holder //long live the king
/obj/item/weapon/greentext/Destroy(force)
if((burn_state != ON_FIRE) && (!force))
return QDEL_HINT_LETMELIVE
. = ..()
poi_list.Remove(src)
for(var/mob/M in 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"
M.color = initial(M.color)
message += "...</span>"
// can't skip the mob check as it also does the decolouring
if(!quiet)
M << message
/obj/item/weapon/greentext/quiet
quiet = TRUE