Files
Aurora.3/code/game/objects/toys.dm
mport2004@gmail.com 62e28c2abf Organs:
Moved into their own folder and got split into three files.
Damage  zones have been regrouped slightly to make it easier to deal with them. Currently the organ groups are head, l/r leg, l/r arm, and head.

Attacking:
Armor is properly checked.
Currently aiming for the chest gives a higher chance to stun whereas the head will stun for longer.
Stungloves/Disarm now show up in the attack log.
Stungloves ignore intent.

Silicon:
AI units can now move between cams that are not on the ss13 network.
Cyborg's alert screen should not longer pop up every time they get an alert if they have opened it once during the round.
Robot vision now uses the standard amount of energy.

Gamemodes:
Added Deuryn's unrev message.
Runes can only be examined if you are close to them.
Moved the Loyalty implants to the HoS' locker at the request of HerpA.
Nuke agents now come with explosive implants that will activate upon death.

Projectiles:
Once again went though the gun code and cleaned things up, it is much better now.
Bullet_act fixed up and most mobs now use the one in living, just overload it if they need to do something diff.
Freeze /caplaser/xbow no longer have an infinite loop.
Shotguns have to be pumped manually.

Went though the latest runtime log.

Power cells now use return on their give/use procs

Assemblies have been reworked and are nearly finished, just need to finish up the special assembly code, redo the signalers, and add one or two new assembly items.
Laying down will now only take 3 ticks to get up, from 5.

You can no longer punch people on the spawn screen.

This is a big one and was cleared by two heads, TK will only allow you to pick up items.  If you have an item in your hand it will act normal.

This revision got much larger than originally intended my tests show everything is working fine, but you never know.  Ill likely do more mob teaks in the next few days.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2333 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-08 10:38:01 +00:00

197 lines
5.2 KiB
Plaintext

/*--------
//CONTAINS
CRAYONS
--------*/
/obj/item/toy/crayonbox/New()
..()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
new /obj/item/toy/crayon/green(src)
new /obj/item/toy/crayon/blue(src)
new /obj/item/toy/crayon/purple(src)
updateIcon()
/obj/item/toy/crayonbox/proc/updateIcon()
overlays = list() //resets list
overlays += image('crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('crayons.dmi',crayon.colourName)
/obj/item/toy/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
usr << "This crayon is too sad to be contained in this box."
return
if("rainbow")
usr << "This crayon is too powerful to be contained in this box."
return
else
usr << "You add the crayon to the box."
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
add_fingerprint(user)
updateIcon()
return
else
..()
/obj/item/toy/crayonbox/attack_hand(mob/user as mob)
if(user.r_hand == src || user.l_hand == src)
if(!contents.len)
user << "\red You're out of crayons!"
return
else
var/crayon = pick(contents)
user.contents += crayon
if(user.hand)
user.l_hand = crayon
else
user.r_hand = crayon
crayon:layer = 20
user << "You take the [crayon:colourName] crayon out of the box."
updateIcon()
else
return ..()
icon_state = "crayonbox[contents.len]"
return
/obj/item/toy/crayon/red
icon_state = "crayonred"
colour = "#DA0000"
shadeColour = "#810C0C"
colourName = "red"
/obj/item/toy/crayon/orange
icon_state = "crayonorange"
colour = "#FF9300"
shadeColour = "#A55403"
colourName = "orange"
/obj/item/toy/crayon/yellow
icon_state = "crayonyellow"
colour = "#FFF200"
shadeColour = "#886422"
colourName = "yellow"
/obj/item/toy/crayon/green
icon_state = "crayongreen"
colour = "#A8E61D"
shadeColour = "#61840F"
colourName = "green"
/obj/item/toy/crayon/blue
icon_state = "crayonblue"
colour = "#00B7EF"
shadeColour = "#0082A8"
colourName = "blue"
/obj/item/toy/crayon/purple
icon_state = "crayonpurple"
colour = "#DA00FF"
shadeColour = "#810CFF"
colourName = "purple"
/obj/item/toy/crayon/mime
icon_state = "crayonmime"
desc = "A very sad-looking crayon."
colour = "#FFFFFF"
shadeColour = "#000000"
colourName = "mime"
uses = 0
/obj/item/toy/crayon/mime/attack_self(mob/living/user as mob) //inversion
if(colour != "#FFFFFF" && shadeColour != "#000000")
colour = "#FFFFFF"
shadeColour = "#000000"
user << "You will now draw in white and black with this crayon."
else
colour = "#000000"
shadeColour = "#FFFFFF"
user << "You will now draw in black and white with this crayon."
return
/obj/item/toy/crayon/rainbow
icon_state = "crayonrainbow"
colour = "#FFF000"
shadeColour = "#000FFF"
colourName = "rainbow"
uses = 0
/obj/item/toy/crayon/rainbow/attack_self(mob/living/user as mob)
colour = input(user, "Please select the main colour.", "Crayon colour") as color
shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color
return
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob)
if(istype(target,/turf/simulated/floor))
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter")
switch(drawtype)
if("letter")
drawtype = input("Choose the letter.", "Crayon scribbles") in 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")
user << "You start drawing a letter on the [target.name]."
if("graffiti")
user << "You start drawing graffiti on the [target.name]."
if("rune")
user << "You start drawing a rune on the [target.name]."
if(instant || do_after(user, 50))
new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
user << "You finish drawing."
if(uses)
uses--
if(!uses)
user << "\red You used up your crayon!"
del(src)
return
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
if(M == user)
user << "You take a bite of the crayon. Delicious!"
user.nutrition += 5
if(uses)
uses -= 5
if(uses <= 0)
user << "\red You ate your crayon!"
del(src)
else
..()
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "A rune drawn in crayon."
icon = 'rune.dmi'
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay