mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
202 lines
5.3 KiB
Plaintext
202 lines
5.3 KiB
Plaintext
/* Pens!
|
|
* Contains:
|
|
* Pens
|
|
* Sleepy Pens
|
|
* Parapens
|
|
*/
|
|
|
|
|
|
/*
|
|
* Pens
|
|
*/
|
|
/obj/item/weapon/pen
|
|
desc = "It's a normal black ink pen."
|
|
name = "pen"
|
|
icon = 'icons/obj/bureaucracy.dmi'
|
|
icon_state = "pen"
|
|
item_state = "pen"
|
|
slot_flags = SLOT_BELT | SLOT_EARS
|
|
throwforce = 0
|
|
w_class = ITEMSIZE_TINY
|
|
throw_speed = 7
|
|
throw_range = 15
|
|
matter = list(DEFAULT_WALL_MATERIAL = 10)
|
|
var/colour = "black" //what colour the ink is!
|
|
pressure_resistance = 2
|
|
|
|
|
|
/obj/item/weapon/pen/blue
|
|
desc = "It's a normal blue ink pen."
|
|
icon_state = "pen_blue"
|
|
colour = "blue"
|
|
|
|
/obj/item/weapon/pen/red
|
|
desc = "It's a normal red ink pen."
|
|
icon_state = "pen_red"
|
|
colour = "red"
|
|
|
|
/obj/item/weapon/pen/fountain
|
|
desc = "A well made fountain pen."
|
|
icon_state = "pen_fountain"
|
|
|
|
/obj/item/weapon/pen/multi
|
|
desc = "It's a pen with multiple colors of ink!"
|
|
var/selectedColor = 1
|
|
var/colors = list("black","blue","red")
|
|
|
|
/obj/item/weapon/pen/multi/attack_self(mob/user)
|
|
if(++selectedColor > 3)
|
|
selectedColor = 1
|
|
|
|
colour = colors[selectedColor]
|
|
|
|
if(colour == "black")
|
|
icon_state = "pen"
|
|
else
|
|
icon_state = "pen_[colour]"
|
|
|
|
to_chat(user, "<span class='notice'>Changed color to '[colour].'</span>")
|
|
|
|
/obj/item/weapon/pen/invisible
|
|
desc = "It's an invisble pen marker."
|
|
icon_state = "pen"
|
|
colour = "white"
|
|
|
|
/*
|
|
* Reagent pens
|
|
*/
|
|
|
|
/obj/item/weapon/pen/reagent
|
|
flags = OPENCONTAINER
|
|
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
|
|
|
/obj/item/weapon/pen/reagent/New()
|
|
..()
|
|
create_reagents(30)
|
|
|
|
/obj/item/weapon/pen/reagent/attack(mob/living/M as mob, mob/user as mob)
|
|
|
|
if(!istype(M))
|
|
return
|
|
|
|
. = ..()
|
|
|
|
if(M.can_inject(user,1))
|
|
if(reagents.total_volume)
|
|
if(M.reagents)
|
|
var/contained = reagents.get_reagents()
|
|
var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD)
|
|
add_attack_logs(user,M,"Injected with [src.name] containing [contained], trasferred [trans] units")
|
|
|
|
/*
|
|
* Sleepy Pens
|
|
*/
|
|
/obj/item/weapon/pen/reagent/sleepy
|
|
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
|
|
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
|
|
|
/obj/item/weapon/pen/reagent/sleepy/New()
|
|
..()
|
|
reagents.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N
|
|
|
|
|
|
/*
|
|
* Parapens
|
|
*/
|
|
/obj/item/weapon/pen/reagent/paralysis
|
|
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
|
|
|
/obj/item/weapon/pen/reagent/paralysis/New()
|
|
..()
|
|
reagents.add_reagent("zombiepowder", 5)
|
|
reagents.add_reagent("cryptobiolin", 10)
|
|
|
|
/*
|
|
* Chameleon pen
|
|
*/
|
|
/obj/item/weapon/pen/chameleon
|
|
var/signature = ""
|
|
|
|
/obj/item/weapon/pen/chameleon/attack_self(mob/user as mob)
|
|
/*
|
|
// Limit signatures to official crew members
|
|
var/personnel_list[] = list()
|
|
for(var/datum/data/record/t in data_core.locked) //Look in data core locked.
|
|
personnel_list.Add(t.fields["name"])
|
|
personnel_list.Add("Anonymous")
|
|
|
|
var/new_signature = input("Enter new signature pattern.", "New Signature") as null|anything in personnel_list
|
|
if(new_signature)
|
|
signature = new_signature
|
|
*/
|
|
signature = sanitize(input("Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature))
|
|
|
|
/obj/item/weapon/pen/proc/get_signature(var/mob/user)
|
|
return (user && user.real_name) ? user.real_name : "Anonymous"
|
|
|
|
/obj/item/weapon/pen/chameleon/get_signature(var/mob/user)
|
|
return signature ? signature : "Anonymous"
|
|
|
|
/obj/item/weapon/pen/chameleon/verb/set_colour()
|
|
set name = "Change Pen Colour"
|
|
set category = "Object"
|
|
|
|
var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red", "Invisible", "Black")
|
|
var/selected_type = input("Pick new colour.", "Pen Colour", null, null) as null|anything in possible_colours
|
|
|
|
if(selected_type)
|
|
switch(selected_type)
|
|
if("Yellow")
|
|
colour = COLOR_YELLOW
|
|
if("Green")
|
|
colour = COLOR_LIME
|
|
if("Pink")
|
|
colour = COLOR_PINK
|
|
if("Blue")
|
|
colour = COLOR_BLUE
|
|
if("Orange")
|
|
colour = COLOR_ORANGE
|
|
if("Cyan")
|
|
colour = COLOR_CYAN
|
|
if("Red")
|
|
colour = COLOR_RED
|
|
if("Invisible")
|
|
colour = COLOR_WHITE
|
|
else
|
|
colour = COLOR_BLACK
|
|
to_chat(usr, "<span class='info'>You select the [lowertext(selected_type)] ink container.</span>")
|
|
|
|
|
|
/*
|
|
* Crayons
|
|
*/
|
|
|
|
/obj/item/weapon/pen/crayon
|
|
name = "crayon"
|
|
desc = "A colourful crayon. Please refrain from eating it or putting it in your nose."
|
|
icon = 'icons/obj/crayons.dmi'
|
|
icon_state = "crayonred"
|
|
w_class = ITEMSIZE_TINY
|
|
attack_verb = list("attacked", "coloured")
|
|
colour = "#FF0000" //RGB
|
|
var/shadeColour = "#220000" //RGB
|
|
var/uses = 30 //0 for unlimited uses
|
|
var/instant = 0
|
|
var/colourName = "red" //for updateIcon purposes
|
|
|
|
/obj/item/weapon/pen/crayon/suicide_act(mob/user)
|
|
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
|
to_chat(viewers(user),"<font color='red'><b>[user] is jamming the [src.name] up [TU.his] nose and into [TU.his] brain. It looks like [TU.he] [TU.is] trying to commit suicide.</b></font>")
|
|
return (BRUTELOSS|OXYLOSS)
|
|
|
|
/obj/item/weapon/pen/crayon/New()
|
|
name = "[colourName] crayon"
|
|
|
|
/obj/item/weapon/pen/crayon/marker
|
|
name = "marker"
|
|
desc = "A chisel-tip permanent marker. Hopefully non-toxic."
|
|
icon_state = "markerred"
|
|
|
|
/obj/item/weapon/pen/crayon/marker/New()
|
|
name = "[colourName] marker"
|