Files
Paradise/code/game/objects/items/crayons.dm
SabreML 678435d50a Blood Cult 2: Electric Boogaloo (#14516)
* DMI files

* Progress

* we compiling

* innate cult action, various progress

* Reorganise runes, fix cult dagger action and admin cultist

* Cult tooltips, dagger icons

* Add mirror shield, return runes back to OG circles

* Cult structure lights, pylon update

* bola update, progress..

* cleaning rune fix, girder/structures anchor

* speed up cult walls

* Convert rune update, tweaks

* Add teleport portals

* fix runtimes

* cult objs start

* move current cult objs to backup

* Rework cult objectives, add narsie/singulo interactions

* spacing, admin log and message

* reviewstuff

* refactor cult conceal/reveal

* add a bit of range to reveal

* blood magic tweaks, hallway not in summon areas

* implement structure concealment, offer uncuff

* add parry sound, fix cult airlock reveal appearance

* Update remaining runes

* fix pylon blood restaure, up blood magic cost

* review tweaks and progress

* fix compilation

* fix offering rune bug

* Draw blood rune action refactor

* moar tweaks

* fixes, holy water blood magic clean, icons

* Add cultist hardsuit, tweaks

* reduce needed pylons for cult ghost, cult shield

* spirit realm fixes

* fix dark spirit

* Add blood rites

* exotic blood handling

* spacing, add adminbus dagger, bal. rune health cost

* woops

missed a var

* fix blood rite healing

* emp spell cult immunity

* fix exploit and narsie references

* new rune sprites

* color defines

* SEND_SOUNDS, cult summon areas

* fix soap, barrier, and add CC location on narsie

* cult structure fix

* functional ascendance, undo cult spacesuit changes

* woops

* whetstone qdel, tweaks

* fix empty area selection bug

* cult ascendance numbers

* add cult blade sprite, add sacrificing head/brains

* review stuff

* fix runtime and twisted cons target

* review stuff

* code clarity

* remove unnecessary cultist checks

* Add support for wizard cultists

* cleanip

* fix concealed glass airlocks

* update objs

* remove talisman ref

* fix status procs

* clarifications, remove unnecessary var

* deconflicting

* deconflicting LF

* oops

* readd new icons

* more conflcit stuff

* readd drill and jaws icons

* review stuff

* silence on conversion

* Readd compact sniper icons

* Remove ambiguity

* 2 sacrifices required

* check antag panel improvements, bug fixes

* limits narsie cult ghost cheese

* CC message

* trailing newlines

* Shade/construct update

* bug fixes

* balance bloodboil, update CC message

* add a newline to something i didnt touch

idk ask travis bout it

* remove metastation extra null rod and shard

* fix teleport runes list, update icon

* remove tg cultist icon

* update cult actions with new tome

* Remove mirror shield throw, spell constructs

Add in sacrificing any brain with a mind.

* Fix more conflicts

* Fix double return

* Add descriptions to cult recipes, fix icons

* fix shuttle curse exploit

* Update wall rune, cult shields, runed recipe width

* implement flagellant sprites, misc changes

* Fix conversion rune

* Add cult blood barrage healing

* Trailing line

* fix whitespace

* Remove can_speak check on invoke

* Deconflict pt. 2

* Bugfixes the 1st

Fixes bugs 2 and 4 in the 'Known Issues' section

* cult.dm tweaks

Oh boy, even more commits!

* Fixes blood halberds swapping directions on wield

* Tweaks and stylin'

Changed a few span classes around and added a 'Remaining Charges' display to the Blood Rite spell

* Ritual tweaks (And some other stuff)

Fixes:
Altar stray pixel,
Using 'Twisted Construction' on a cult door,
Rune drawing checks,
probably more idk

* Rune tweaks & fixes

Fixes:
Wraith glowing not turning off while jaunted,
A MASSIVE oversight by me with playsound(),

probably also some other stuff but I've been staring at this file for a week and I've forgot most of what I did.

* Testmerge fixes the 1st

Fixes:
Ascendent is now Ascendant,
The Cultist greeting is now in the correct order,
IPCs now draw oil coloured runes,
No longer able to sacrifice a body multiple times,
Sacrificing a brain or head now gives a soul shard,
Converting an IPC or someone with robotic limbs now heals them correctly,
Probably more.

* Mirror Shield balancing

Being hit by a projectile above a damage threshold (10) now increases the chances of the mirror shield shattering, by 3% per damage point.

This may seem pretty low, but an Energy Gun would have a 30% chance of breaking the shield per hit. (Assuming I did this right, anyway.)

* Insect repairs and more

Changes:

Makes the shuttle curse lines a define,
Comments out the changing construct names,
Made flagellant robes block hair,
Added documentation to the mirror shield (See said documentation for details),
Made the cooldown examine text for cult structures display minutes and seconds,
Removed the ability to sacrifice the same body multiple times,
Cleaned up the soulstone code (and hopefully didn't break anything),

Probably still missed something, oh well!

* Rune opacity and Stun timing

Changes:

Halved all the values of the 'Stun' spell, since it was presumably an oversight. (20 second stun to 10)
The 'mouse_opacity' for runes has been set to 'opaque', this means that clicking on any spot on the tile will select it. (Less fiddly)
The '(REMOVE SPELL)' choice when choosing spells now only shows if there's any spells to remove.
Dunking someones head in the lava forge now only works if they have a head.

Also fixed a whole bunch of typos/gramatical errors.

* Blood Boil, Blood Barrage and EMP Sprites!

Changes:

Overhauled the 'Blood Boil' rune (See documentation)
Added in-hand sprites and red sparks for 'Blood bolt barrage'.
The nar'sie rune now removes all runes around it to prevent clipping.
Fixed runtime when examining the 'Arcane Barrage' spell.

Added new sprites for the EMP spell, courtesy of @kugamo!

Co-Authored-By: Kugamo <thekugamo@gmail.com>

* A few more tweaks

Changes:

Halved the percentages of 'Rise' (Glowing eyes) and 'Ascend' (Halos) to 10% and 20% respectively.
Hopefully fixed shield walls being passable while active.
Changed "Nar-sie" to "Nar'sie" in a few places.

* TM 2 fixes

Changes:

Teleport runes now only show the user when the animation has finished.
Cult shields are now invisible to ghosts when disabled.
Crayon runes now use the new rune sprites.
Construct night vision now actually works.
You can no longer soulstone yourself.
The death message for cult structures is now bigger.
Cult objectives are now displayed at roundstart.
Tweaked the icons for artificer spells.
Tweaked some cult related 'Tip of the round's.
Summoned cult ghosts no longer show in the 'Check Antagonists' panel when dead. (Hopefully)

* Cult members and Deconversion

Changes:

Using the 'Study the Veil' ability now shows how many members the cult has.
Holy water now unequips all cult clothing on deconversion. (Flagellant robe, blindfold, etc.)
Nar'Sie no longer warns admins that it doesn't have a containment field.
Fixed Zealot's Blindfolds not temporarily blinding any non-cultists who touch them.
The 'Summon Cultist' rune description now explains that restrained cultists cannot be summoned.
Fixed Travis (Probably)

* Cult Rise/Ascend balancing V1

The values here will almost certainly need some tweaking, but I feel like it's better than it was before; and certainly more customisable.

* Possibly maybe hopefully (one of) the last commits

Changes:

The cult halo no longer vanishes on relogging.
It's now possible to drag things on to runes again.

* A few minor fixes, and a major one

Changes:

Resetting your action button positions no longer completely breaks blood spells.
The downside to this fix is that Blood spells can no longer be moved around, so sorry sorry about that.

Fixes: #14393
Fixes: #13855

* New weapon sprites!

Adds fancy new sprites for all cult daggers and swords, courtesy of @McRamon!

They will need adjustments for Vox and Kidan at some point, and the Skrell inhand can look a bit odd at times, but those are also problems for every other weapon in the game so that can be fixed later.

Co-Authored-By: McRamon <31545294+McRamon@users.noreply.github.com>

* TM 3 fixes

Changes:

Fixed action button related bugs, including making them movable again! (probably caused a bunch more but eh),
Slightly tweaked threshold for ascendance,
Blood Rites now cleans up slime blood,
The Deconversion message is now bigger,
Flagellant robes now take 5% more damage (Lasers do 30 damage rather than 29),
Teleport runes can no longer be erased while a portal effect is open,
Teleport rune portals now always show the Z-Level if they're not in station space,
Teleporting another player no longer makes you temporarily invisible,
Attempting to summon a restrained cultist now gives said cultist a warning message,
Fixed a runtime when placing a soulstone in a construct,
Cultists now show on the Orbit menu if you have AntagHUD enabled,
Fixed a few typos

Co-authored-by: datlo <quentinkoyote@gmail.com>
Co-authored-by: Kugamo <thekugamo@gmail.com>
Co-authored-by: McRamon <31545294+McRamon@users.noreply.github.com>
2020-11-06 20:41:41 -05:00

288 lines
8.7 KiB
Plaintext

/*
* Crayons
*/
/obj/item/toy/crayon
name = "crayon"
desc = "A colourful crayon. Looks tasty. Mmmm..."
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonred"
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_BELT | SLOT_EARS
attack_verb = list("attacked", "coloured")
toolspeed = 1
var/colour = COLOR_RED
var/drawtype = "rune"
var/list/graffiti = list("body","amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","up","down","left","right","heart","borgsrogue","voxpox","shitcurity","catbeast","hieroglyphs1","hieroglyphs2","hieroglyphs3","security","syndicate1","syndicate2","nanotrasen","lie","valid","arrowleft","arrowright","arrowup","arrowdown","chicken","hailcrab","brokenheart","peace","scribble","scribble2","scribble3","skrek","squish","tunnelsnake","yip","youaredead")
var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
var/uses = 30 //0 for unlimited uses
var/instant = 0
var/colourName = "red" //for updateIcon purposes
var/dat
var/busy = FALSE
var/list/validSurfaces = list(/turf/simulated/floor)
/obj/item/toy/crayon/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide.</span>")
return BRUTELOSS|OXYLOSS
/obj/item/toy/crayon/New()
..()
name = "[colourName] crayon" //Makes crayons identifiable in things like grinders
drawtype = pick(pick(graffiti), pick(letters), "rune[rand(1, 8)]")
/obj/item/toy/crayon/attack_self(mob/living/user as mob)
update_window(user)
/obj/item/toy/crayon/proc/update_window(mob/living/user as mob)
dat += "<center><h2>Currently selected: [drawtype]</h2><br>"
dat += "<a href='?src=[UID()];type=random_letter'>Random letter</a><a href='?src=[UID()];type=letter'>Pick letter</a>"
dat += "<hr>"
dat += "<h3>Runes:</h3><br>"
dat += "<a href='?src=[UID()];type=random_rune'>Random rune</a>"
for(var/i = 1; i <= 8; i++)
dat += "<a href='?src=[UID()];type=rune[i]'>Rune [i]</a>"
if(!((i + 1) % 3)) //3 buttons in a row
dat += "<br>"
dat += "<hr>"
graffiti.Find()
dat += "<h3>Graffiti:</h3><br>"
dat += "<a href='?src=[UID()];type=random_graffiti'>Random graffiti</a>"
var/c = 1
for(var/T in graffiti)
dat += "<a href='?src=[UID()];type=[T]'>[T]</a>"
if(!((c + 1) % 3)) //3 buttons in a row
dat += "<br>"
c++
dat += "<hr>"
var/datum/browser/popup = new(user, "crayon", name, 300, 500)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
dat = ""
/obj/item/toy/crayon/Topic(href, href_list, hsrc)
var/temp = "a"
switch(href_list["type"])
if("random_letter")
temp = pick(letters)
if("letter")
temp = input("Choose the letter.", "Scribbles") in letters
if("random_rune")
temp = "rune[rand(1,10)]"
if("random_graffiti")
temp = pick(graffiti)
else
temp = href_list["type"]
if((usr.restrained() || usr.stat || !usr.is_in_active_hand(src)))
return
drawtype = temp
update_window(usr)
/obj/item/toy/crayon/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
if(busy) return
if(is_type_in_list(target,validSurfaces))
var/temp = "rune"
if(letters.Find(drawtype))
temp = "letter"
else if(graffiti.Find(drawtype))
temp = "graffiti"
to_chat(user, "<span class='info'>You start drawing a [temp] on the [target.name].</span>")
busy = TRUE
if(instant || do_after(user, 50 * toolspeed, target = target))
var/obj/effect/decal/cleanable/crayon/C = new /obj/effect/decal/cleanable/crayon(target,colour,drawtype,temp)
C.add_hiddenprint(user)
to_chat(user, "<span class='info'>You finish drawing [temp].</span>")
if(uses)
uses--
if(!uses)
to_chat(user, "<span class='danger'>You used up your [name]!</span>")
qdel(src)
busy = FALSE
/obj/item/toy/crayon/attack(mob/M, mob/user)
var/huffable = istype(src,/obj/item/toy/crayon/spraycan)
if(M == user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.check_has_mouth())
to_chat(user, "<span class='warning'>You do not have a mouth!</span>")
return
playsound(loc, 'sound/items/eatfood.ogg', 50, 0)
to_chat(user, "<span class='notice'>You take a [huffable ? "huff" : "bite"] of the [name]. Delicious!</span>")
user.adjust_nutrition(5)
if(uses)
uses -= 5
if(uses <= 0)
to_chat(user, "<span class='warning'>There is no more of [name] left!</span>")
qdel(src)
else
..()
/obj/item/toy/crayon/red
icon_state = "crayonred"
colour = COLOR_RED
colourName = "red"
/obj/item/toy/crayon/orange
icon_state = "crayonorange"
colour = COLOR_ORANGE
colourName = "orange"
/obj/item/toy/crayon/yellow
icon_state = "crayonyellow"
colour = COLOR_YELLOW
colourName = "yellow"
/obj/item/toy/crayon/green
icon_state = "crayongreen"
colour = COLOR_GREEN
colourName = "green"
/obj/item/toy/crayon/blue
icon_state = "crayonblue"
colour = COLOR_BLUE
colourName = "blue"
/obj/item/toy/crayon/purple
icon_state = "crayonpurple"
colour = COLOR_PURPLE
colourName = "purple"
/obj/item/toy/crayon/random/New()
icon_state = pick(list("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple"))
switch(icon_state)
if("crayonred")
colour = COLOR_RED
colourName = "red"
if("crayonorange")
colour = COLOR_ORANGE
colourName = "orange"
if("crayonyellow")
colour = COLOR_YELLOW
colourName = "yellow"
if("crayongreen")
colour =COLOR_GREEN
colourName = "green"
if("crayonblue")
colour = COLOR_BLUE
colourName = "blue"
if("crayonpurple")
colour = COLOR_PURPLE
colourName = "purple"
..()
/obj/item/toy/crayon/white
icon_state = "crayonwhite"
colour = "#FFFFFF"
colourName = "white"
/obj/item/toy/crayon/mime
icon_state = "crayonmime"
desc = "A very sad-looking crayon."
colour = "#FFFFFF"
colourName = "mime"
uses = 0
/obj/item/toy/crayon/mime/attack_self(mob/living/user as mob)
update_window(user)
/obj/item/toy/crayon/mime/update_window(mob/living/user as mob)
dat += "<center><span style='border:1px solid #161616; background-color: [colour];'>&nbsp;&nbsp;&nbsp;</span><a href='?src=[UID()];color=1'>Change color</a></center>"
..()
/obj/item/toy/crayon/mime/Topic(href,href_list)
if(!Adjacent(usr) || usr.incapacitated())
return
if(href_list["color"])
if(colour != COLOR_WHITE)
colour = COLOR_WHITE
else
colour = COLOR_BLACK
update_window(usr)
else
..()
/obj/item/toy/crayon/rainbow
icon_state = "crayonrainbow"
colour = "#FFF000"
colourName = "rainbow"
uses = 0
/obj/item/toy/crayon/rainbow/attack_self(mob/living/user as mob)
update_window(user)
/obj/item/toy/crayon/rainbow/update_window(mob/living/user as mob)
dat += "<center><span style='border:1px solid #161616; background-color: [colour];'>&nbsp;&nbsp;&nbsp;</span><a href='?src=[UID()];color=1'>Change color</a></center>"
..()
/obj/item/toy/crayon/rainbow/Topic(href,href_list[])
if(!Adjacent(usr) || usr.incapacitated())
return
if(href_list["color"])
var/temp = input(usr, "Please select colour.", "Crayon colour") as color
colour = temp
update_window(usr)
else
..()
//Spraycan stuff
/obj/item/toy/crayon/spraycan
icon_state = "spraycan_cap"
desc = "A metallic container containing tasty paint."
var/capped = 1
instant = 1
validSurfaces = list(/turf/simulated/floor,/turf/simulated/wall)
/obj/item/toy/crayon/spraycan/New()
..()
name = "Nanotrasen-brand Rapid Paint Applicator"
update_icon()
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
switch(choice)
if("Toggle Cap")
to_chat(user, "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>")
capped = capped ? 0 : 1
icon_state = "spraycan[capped ? "_cap" : ""]"
update_icon()
if("Change Drawing")
..()
if("Change Color")
colour = input(user,"Choose Color") as color
update_icon()
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity)
return
if(capped)
return
else
if(iscarbon(target))
if(uses-10 > 0)
uses = uses - 10
var/mob/living/carbon/human/C = target
user.visible_message("<span class='danger'> [user] sprays [src] into the face of [target]!</span>")
if(C.client)
C.EyeBlurry(3)
C.EyeBlind(1)
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
C.Confused(3)
C.Weaken(3)
C.lip_style = "spray_face"
C.lip_color = colour
C.update_body()
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
..()
/obj/item/toy/crayon/spraycan/update_icon()
overlays.Cut()
var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]")
I.color = colour
overlays += I