mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
214 lines
7.1 KiB
Plaintext
214 lines
7.1 KiB
Plaintext
/obj/item/toy/plush
|
|
name = "plush"
|
|
desc = "This is the special coder plush, do not steal."
|
|
icon = 'icons/obj/plushes.dmi'
|
|
icon_state = "debug"
|
|
attack_verb = list("thumped", "whomped", "bumped")
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
resistance_flags = FLAMMABLE
|
|
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
|
|
var/stuffed = TRUE //If the plushie has stuffing in it
|
|
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
|
|
|
|
/obj/item/toy/plush/Initialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/squeak, squeak_override)
|
|
|
|
/obj/item/toy/plush/Destroy()
|
|
QDEL_NULL(grenade)
|
|
return ..()
|
|
|
|
/obj/item/toy/plush/handle_atom_del(atom/A)
|
|
if(A == grenade)
|
|
grenade = null
|
|
..()
|
|
|
|
/obj/item/toy/plush/attack_self(mob/user)
|
|
. = ..()
|
|
if(stuffed || grenade)
|
|
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
|
|
if(grenade && !grenade.active)
|
|
if(istype(grenade, /obj/item/grenade/chem_grenade))
|
|
var/obj/item/grenade/chem_grenade/G = grenade
|
|
if(G.nadeassembly) //We're activated through different methods
|
|
return
|
|
log_game("[key_name(user)] activated a hidden grenade in [src].")
|
|
grenade.preprime(user, msg = FALSE, volume = 10)
|
|
else
|
|
to_chat(user, "<span class='notice'>You try to pet [src], but it has no stuffing. Aww...</span>")
|
|
|
|
/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params)
|
|
if(I.is_sharp())
|
|
if(!grenade)
|
|
if(!stuffed)
|
|
to_chat(user, "<span class='warning'>You already murdered it!</span>")
|
|
return
|
|
user.visible_message("<span class='notice'>[user] tears out the stuffing from [src]!</span>", "<span class='notice'>You rip a bunch of the stuffing from [src]. Murderer.</span>")
|
|
playsound(I, I.usesound, 50, TRUE)
|
|
stuffed = FALSE
|
|
else
|
|
to_chat(user, "<span class='notice'>You remove the grenade from [src].</span>")
|
|
user.put_in_hands(grenade)
|
|
grenade = null
|
|
return
|
|
if(istype(I, /obj/item/grenade))
|
|
if(stuffed)
|
|
to_chat(user, "<span class='warning'>You need to remove some stuffing first!</span>")
|
|
return
|
|
if(grenade)
|
|
to_chat(user, "<span class='warning'>[src] already has a grenade!</span>")
|
|
return
|
|
if(!user.transferItemToLoc(I, src))
|
|
return
|
|
user.visible_message("<span class='warning'>[user] slides [grenade] into [src].</span>", \
|
|
"<span class='danger'>You slide [I] into [src].</span>")
|
|
grenade = I
|
|
var/turf/T = get_turf(user)
|
|
log_game("[key_name(user)] added a grenade ([I.name]) to [src] at [COORD(T)].")
|
|
return
|
|
return ..()
|
|
|
|
/obj/item/toy/plush/carpplushie
|
|
name = "space carp plushie"
|
|
desc = "An adorable stuffed toy that resembles a space carp."
|
|
icon_state = "carpplush"
|
|
item_state = "carp_plushie"
|
|
attack_verb = list("bitten", "eaten", "fin slapped")
|
|
squeak_override = list('sound/weapons/bite.ogg'=1)
|
|
|
|
/obj/item/toy/plush/bubbleplush
|
|
name = "bubblegum plushie"
|
|
desc = "The friendly red demon that gives good miners gifts."
|
|
icon_state = "bubbleplush"
|
|
attack_verb = list("rends")
|
|
squeak_override = list('sound/magic/demon_attack1.ogg'=1)
|
|
|
|
/obj/item/toy/plush/plushvar
|
|
name = "ratvar plushie"
|
|
desc = "An adorable plushie of the clockwork justiciar himself with new and improved spring arm action."
|
|
icon_state = "plushvar"
|
|
var/obj/item/toy/plush/narplush/clash_target
|
|
|
|
/obj/item/toy/plush/plushvar/Moved()
|
|
. = ..()
|
|
if(clash_target)
|
|
return
|
|
var/obj/item/toy/plush/narplush/P = locate() in range(1, src)
|
|
if(P && istype(P.loc, /turf/open) && !P.clashing)
|
|
clash_of_the_plushies(P)
|
|
|
|
/obj/item/toy/plush/plushvar/proc/clash_of_the_plushies(obj/item/toy/plush/narplush/P)
|
|
clash_target = P
|
|
P.clashing = TRUE
|
|
say("YOU.")
|
|
P.say("Ratvar?!")
|
|
var/obj/item/toy/plush/a_winnar_is
|
|
var/victory_chance = 10
|
|
for(var/i in 1 to 10) //We only fight ten times max
|
|
if(QDELETED(src))
|
|
P.clashing = FALSE
|
|
return
|
|
if(QDELETED(P))
|
|
clash_target = null
|
|
return
|
|
if(!Adjacent(P))
|
|
visible_message("<span class='warning'>The two plushies angrily flail at each other before giving up.</span>")
|
|
clash_target = null
|
|
P.clashing = FALSE
|
|
return
|
|
playsound(src, 'sound/magic/clockwork/ratvar_attack.ogg', 50, TRUE, frequency = 2)
|
|
sleep(2.4)
|
|
if(QDELETED(src))
|
|
P.clashing = FALSE
|
|
return
|
|
if(QDELETED(P))
|
|
clash_target = null
|
|
return
|
|
if(prob(victory_chance))
|
|
a_winnar_is = src
|
|
break
|
|
P.SpinAnimation(5, 0)
|
|
sleep(5)
|
|
if(QDELETED(src))
|
|
P.clashing = FALSE
|
|
return
|
|
if(QDELETED(P))
|
|
clash_target = null
|
|
return
|
|
playsound(P, 'sound/magic/clockwork/narsie_attack.ogg', 50, TRUE, frequency = 2)
|
|
sleep(3.3)
|
|
if(QDELETED(src))
|
|
P.clashing = FALSE
|
|
return
|
|
if(QDELETED(P))
|
|
clash_target = null
|
|
return
|
|
if(prob(victory_chance))
|
|
a_winnar_is = P
|
|
break
|
|
SpinAnimation(5, 0)
|
|
victory_chance += 10
|
|
sleep(5)
|
|
if(!a_winnar_is)
|
|
a_winnar_is = pick(src, P)
|
|
if(a_winnar_is == src)
|
|
say(pick("DIE.", "ROT."))
|
|
P.say(pick("Nooooo...", "Not die. To y-", "Die. Ratv-", "Sas tyen re-"))
|
|
playsound(src, 'sound/magic/clockwork/anima_fragment_attack.ogg', 50, TRUE, frequency = 2)
|
|
playsound(P, 'sound/magic/demon_dies.ogg', 50, TRUE, frequency = 2)
|
|
explosion(P, 0, 0, 1)
|
|
qdel(P)
|
|
clash_target = null
|
|
else
|
|
say("NO! I will not be banished again...")
|
|
P.say(pick("Ha.", "Ra'sha fonn dest.", "You fool. To come here."))
|
|
playsound(src, 'sound/magic/clockwork/anima_fragment_death.ogg', 50, TRUE, frequency = 2)
|
|
playsound(P, 'sound/magic/demon_attack1.ogg', 50, TRUE, frequency = 2)
|
|
explosion(src, 0, 0, 1)
|
|
qdel(src)
|
|
P.clashing = FALSE
|
|
|
|
/obj/item/toy/plush/narplush
|
|
name = "nar'sie plushie"
|
|
desc = "A small stuffed doll of the elder god nar'sie. Who thought this was a good children's toy?"
|
|
icon_state = "narplush"
|
|
var/clashing
|
|
|
|
/obj/item/toy/plush/narplush/Moved()
|
|
. = ..()
|
|
var/obj/item/toy/plush/plushvar/P = locate() in range(1, src)
|
|
if(P && istype(P.loc, /turf/open) && !P.clash_target && !clashing)
|
|
P.clash_of_the_plushies(src)
|
|
|
|
/obj/item/toy/plush/lizardplushie
|
|
name = "lizard plushie"
|
|
desc = "An adorable stuffed toy that resembles a lizardperson."
|
|
icon_state = "plushie_lizard"
|
|
item_state = "plushie_lizard"
|
|
attack_verb = list("clawed", "hissed", "tail slapped")
|
|
squeak_override = list('sound/weapons/slash.ogg' = 1)
|
|
|
|
/obj/item/toy/plush/snakeplushie
|
|
name = "snake plushie"
|
|
desc = "An adorable stuffed toy that resembles a snake. Not to be mistaken for the real thing."
|
|
icon_state = "plushie_snake"
|
|
item_state = "plushie_snake"
|
|
attack_verb = list("bitten", "hissed", "tail slapped")
|
|
squeak_override = list('sound/weapons/bite.ogg' = 1)
|
|
|
|
/obj/item/toy/plush/nukeplushie
|
|
name = "operative plushie"
|
|
desc = "An stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
|
icon_state = "plushie_nuke"
|
|
item_state = "plushie_nuke"
|
|
attack_verb = list("shot", "nuked", "detonated")
|
|
squeak_override = list('sound/effects/hit_punch.ogg' = 1)
|
|
|
|
/obj/item/toy/plush/slimeplushie
|
|
name = "slime plushie"
|
|
desc = "An adorable stuffed toy that resembles a slime. It is practically just a hacky sack."
|
|
icon_state = "plushie_slime"
|
|
item_state = "plushie_slime"
|
|
attack_verb = list("blorbled", "slimed", "absorbed")
|
|
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|