Oh-cee, the original content skeleton

🆑 coiax, Nienhaus
rscdel: Unfortunately, the Belowyarn toys have been withdrawn from use
due to Assistants choking on the batteries. Centcom has sent their
condolences to the battery manufacturing plant.
rscadd: We are introducing Oh-cee the original content skeleton figurines.
Pull its string, and hear it say a variety of phrases. Not suitable for
infants or assistants under 36 months.
tweak: Note that pulling the string of all talking toys is now visible
to others.
/🆑

With thanks to Nienhaus for doing the sprite.

- The toy AI has also been made a "talking" toy because it works the
  same as the others.
This commit is contained in:
Jack Edge
2016-05-06 09:16:40 +01:00
parent b9e3e6ad34
commit 8260743465
30 changed files with 137 additions and 34 deletions
@@ -60469,7 +60469,7 @@
pixel_y = 6
},
/obj/structure/table/wood,
/obj/item/toy/AI{
/obj/item/toy/talking/AI{
name = "NanoTrasen-brand toy AI";
pixel_y = 6
},
+1 -1
View File
@@ -2716,7 +2716,7 @@
/area/centcom/evac)
"io" = (
/obj/structure/table/reinforced,
/obj/item/toy/AI,
/obj/item/toy/talking/AI,
/obj/structure/window/reinforced{
dir = 4
},
+2 -1
View File
@@ -5,7 +5,7 @@
icon_keyboard = null
icon_screen = "invaders"
var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2,
/obj/item/toy/AI = 2,
/obj/item/toy/talking/AI = 2,
/obj/item/clothing/under/syndicate/tacticool = 2,
/obj/item/toy/sword = 2,
/obj/item/toy/gun = 2,
@@ -33,6 +33,7 @@
/obj/item/toy/redbutton = 2,
/obj/item/toy/talking/owl = 2,
/obj/item/toy/talking/griffin = 2,
/obj/item/toy/talking/skeleton = 2,
/obj/item/weapon/coin/antagtoken = 2,
/obj/item/stack/tile/fakespace/loaded = 2,
/obj/item/toy/toy_xeno = 2,
+78 -30
View File
@@ -673,53 +673,50 @@
icon_state = "reticenceprize"
quiet = 1
/*
* AI core prizes
*/
/obj/item/toy/AI
name = "toy AI"
desc = "A little toy model AI core with real law announcing action!"
icon = 'icons/obj/toy.dmi'
icon_state = "AI"
w_class = 2
var/cooldown = 0
/obj/item/toy/AI/attack_self(mob/user)
if(!cooldown) //for the sanity of everyone
var/message = generate_ion_law()
user << "<span class='notice'>You press the button on [src].</span>"
playsound(user, 'sound/machines/click.ogg', 20, 1)
src.loc.visible_message("<span class='danger'>\icon[src] [message]</span>")
cooldown = 1
spawn(30) cooldown = 0
return
..()
/obj/item/toy/talking
name = "talking action figure"
desc = "A generic action figure modeled after nothing in particular."
icon = 'icons/obj/toy.dmi'
icon_state = "owlprize"
w_class = 2
var/cooldown = 0
var/cooldown = FALSE
var/messages = list("I'm super generic!", "Mathematics class is of variable difficulty!")
var/span = "danger"
var/recharge_time = 30
// Talking toys are language universal, and thus all species can use them
/obj/item/toy/talking/attack_alien(mob/user)
. = attack_hand(user)
/obj/item/toy/talking/attack_self(mob/user)
if(!cooldown)
var/message = pick(messages)
user << "<span class='notice'>You pull the string on the [src].</span>"
toy_talk(user, message)
cooldown = 1
spawn(recharge_time) cooldown = 0
var/message = generate_message()
user.visible_message("<span class='notice'>[user] pulls the string on \the [src].</span>", "<span class='notice'>You pull the string on \the [src].</span>", "<span class='notice'>You hear a string being pulled.</span>")
toy_talk(user.loc, message)
cooldown = TRUE
spawn(recharge_time)
cooldown = FALSE
return
..()
/obj/item/toy/talking/proc/toy_talk(user, message)
playsound(user, 'sound/machines/click.ogg', 20, 1)
/obj/item/toy/talking/proc/generate_message()
return pick(messages)
/obj/item/toy/talking/proc/toy_talk(loc, message)
playsound(loc, 'sound/machines/click.ogg', 20, 1)
src.loc.visible_message("<span class='[span]'>\icon[src] [message]</span>")
/*
* AI core prizes
*/
/obj/item/toy/talking/AI
name = "toy AI"
desc = "A little toy model AI core with real law announcing action!"
icon_state = "AI"
/obj/item/toy/talking/AI/generate_message()
return generate_ion_law()
/obj/item/toy/talking/owl
name = "owl action figure"
desc = "An action figure modeled after 'The Owl', defender of justice."
@@ -732,6 +729,57 @@
icon_state = "griffinprize"
messages = list("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!")
/obj/item/toy/talking/skeleton
name = "skeleton action figure"
desc = "An action figure modeled after 'Oh-cee', the original content \
skeleton.\nNot suitable for infants or assistants under 36 months \
of age."
icon_state = "skeletonprize"
attack_verb = list("boned", "dunked on", "worked down to the bone")
var/phomeme
var/list/papyrus_messages = list(
"That's the disposal bin. Feel free to visit it at any time.",
"I can't just let anyone ERP with me, I'm a skeleton with standards!",
"Sorry. Can't talk. I'm busy being popular on a video game.",
"You can't spell 'robust' without several letters from my name!!!")
var/list/sans_messages = list(
"You feel your redtext crawling on your back.",
"On days like these, references like this should be BURNING IN HELL.")
/obj/item/toy/talking/skeleton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to commit \
suicide with \the [src].</span>")
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.set_species(/datum/species/skeleton)
set_phomeme("sans")
toy_talk(user, "You feel like you're going to have a bad time.")
user.Stun(5)
sleep(20)
return OXYLOSS
/obj/item/toy/talking/skeleton/generate_message()
return pick(papyrus_messages + sans_messages)
/obj/item/toy/talking/skeleton/proc/set_phomeme(a_phomeme)
phomeme = a_phomeme
span = "danger [a_phomeme]"
/obj/item/toy/talking/skeleton/toy_talk(mob/user, message)
// change spans dynamically depending on the message
if(sans_messages.Find(message))
set_phomeme("sans")
if(papyrus_messages.Find(message))
set_phomeme("papyrus")
// If message isn't in the defined lists, just use whatever was set last
..(user.loc, message)
chatter(message, phomeme, user)
/*
|| A Deck of Cards for playing various games of chance ||
+2 -1
View File
@@ -1346,9 +1346,10 @@
contains = list(/obj/item/toy/spinningtoy,
/obj/item/toy/sword,
/obj/item/toy/foamblade,
/obj/item/toy/AI,
/obj/item/toy/talking/AI,
/obj/item/toy/talking/owl,
/obj/item/toy/talking/griffin,
/obj/item/toy/talking/skeleton,
/obj/item/toy/nuke,
/obj/item/toy/minimeteor,
/obj/item/toy/carpplushie,
+52
View File
@@ -0,0 +1,52 @@
/proc/chatter(message, phomeme, mob/user)
// We want to transform any message into a list of numbers
// and punctuation marks
// For example:
// "Hi." -> [2, '.']
// "HALP GEROGE MELLONS, that swine, is GRIFFIN ME!"
// -> [4, 6, 7, ',', 4, 5, ',', '2', 7, 2, '!']
// "fuck,thissentenceissquashed" -> [4, ',', 21]
var/list/punctuation = list(",",":",";",".","?","!","\'","-")
var/regex/R = regex("(\[\\l\\d]*)(\[^\\l\\d\\s])?", "g")
var/list/letter_count = list()
while(R.next <= length(message))
R.Find(message)
if(R.group[1])
letter_count += length(R.group[1])
if(R.group[2])
letter_count += R.group[2]
spawn(0)
for(var/item in letter_count)
if (item in punctuation)
// simulate pausing in talking
// ignore semi-colons because of their use in HTML escaping
if (item in list(",", ":"))
sleep(3)
if (item in list("!", "?", "."))
sleep(6)
continue
if(isnum(item))
var/length = min(item, 10)
if (length == 0)
// "verbalise" long spaces
sleep(1)
chatter_speak_word(user, phomeme, length)
/proc/chatter_speak_word(mob/user, phomeme, length)
var/path = "sound/chatter/[phomeme]_[length].ogg"
playsound(user.loc, path,
vol = 40, vary = 0, extrarange = 3, falloff = 1, surround = 1)
sleep((length + 1) * chatter_get_sleep_multiplier(phomeme))
/proc/chatter_get_sleep_multiplier(phomeme)
if(phomeme == "papyrus")
. = 0.5
else if(phomeme == "sans")
. = 0.7
else
. = 1
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -936,6 +936,7 @@
#include "code\modules\cargo\exports\sheets.dm"
#include "code\modules\cargo\exports\tools.dm"
#include "code\modules\cargo\exports\weapons.dm"
#include "code\modules\chatter\chatter.dm"
#include "code\modules\client\asset_cache.dm"
#include "code\modules\client\client defines.dm"
#include "code\modules\client\client procs.dm"