Custom items 26/05 (#8958)

* Custom items 26/05

* tweaks this.

* Update code/modules/customitems/item_defines.dm

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>

* Update code/game/objects/items/devices/megaphone.dm

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>

* matt's suggestion.

* Fixes travis

Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
Alberyk
2020-06-02 14:07:32 -03:00
committed by GitHub
parent 1869a24a29
commit 66c8b4e52a
4 changed files with 187 additions and 7 deletions
+10 -7
View File
@@ -10,6 +10,8 @@
var/emagged = 0
var/insults = 0
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
var/activation_sound = 'sound/items/megaphone.ogg'
var/needs_user_location = TRUE
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
if (user.client)
@@ -29,19 +31,20 @@
if(!message)
return
message = capitalize(message)
if ((src.loc == user && usr.stat == 0))
if ((user.stat == CONSCIOUS))
if(needs_user_location)
if(!src.loc == user)
return
if(emagged)
if(insults)
for(var/mob/O in (viewers(user)))
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>",2) // 2 stands for hearable message
user.visible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>")
insults--
else
to_chat(user, "<span class='warning'>*BZZZZzzzzzt*</span>")
else
for(var/mob/O in (viewers(user)))
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>",2) // 2 stands for hearable message
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
user.visible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>")
if(activation_sound)
playsound(loc, activation_sound, 100, 0, 1)
spamcheck = 1
spawn(20)
spamcheck = 0
+177
View File
@@ -3350,3 +3350,180 @@ All custom items with worn sprites must follow the contained sprite system: http
icon_state = "ulmari_coat"
item_state = "ulmari_coat"
contained_sprite = TRUE
/obj/item/clothing/suit/storage/toggle/labcoat/fluff/mekesatis_labcoat //Biochemist Holocoat - Neith Mekesatis - vrow
name = "biochemist holocoat"
desc = "An Eridani Corporate Federation holocoat modelled after a standard biochemist labcoat. It is extremely well cared for."
icon = 'icons/obj/custom_items/mekesatis_holocoat.dmi'
icon_state = "mekesatis_labcoat"
item_state = "mekesatis_labcoat"
icon_open = "mekesatis_labcoat_open"
icon_closed = "mekesatis_labcoat"
contained_sprite = TRUE
var/changed = FALSE
var/changing = FALSE
/obj/item/clothing/suit/storage/toggle/labcoat/fluff/mekesatis_labcoat/examine(mob/user)
..()
if(!in_range(user, src))
to_chat(user, SPAN_NOTICE("There might be something written on the inside of the coat. You have to get closer if you want to read it."))
return
if(!(all_languages[LANGUAGE_TRADEBAND] in user.languages))
to_chat(user, SPAN_NOTICE("On the inside of the coat there are various sentences in Tradeband printed in an elegant blue font."))
return
else
to_chat(user, SPAN_NOTICE("On the inside of the coat, the following words are printed in an elegant blue font:<br>Exclusive Time Limited Holocoat Deal from July 30, 2459. \
Now with graced with an animated Eridani Corporate Federation logo. For the Prosperity of all Eridanians - <i>Delta HoloTextiles. Sector Alpha's best \
wears.</i><br><small><i><font face='Courier New'>Every cloud has a silver lining, and you should be happy for yours. Congratulations on your \
graduation.</font> - <font face='Times New Roman'>Teremun A. M.</font></i></small>"))
return
/obj/item/clothing/suit/storage/toggle/labcoat/fluff/mekesatis_labcoat/verb/activate_holocoat()
set name = "Toggle Holocoat"
set category = "Object"
set src in usr
if (use_check_and_message(usr))
return
if(changing)
return
if(!changed)
usr.visible_message("<span class='notice'>With a subtle gesture, the labcoat flickers activate!</span>")
icon_state = "mekesatis_holocoat_t"
item_state = "mekesatis_holocoat_t"
icon_open = "mekesatis_holocoat_t_open"
icon_closed = "mekesatis_holocoat_t"
flick("mekesatis_holocoat_t", src)
else
usr.visible_message("<span class='notice'>With a subtle gesture, the holocoat fades to a normal labcoat.</span>")
icon_state = "mekesatis_labcoat_r"
item_state = "mekesatis_labcoat_r"
icon_open = "mekesatis_labcoat_r_open"
icon_closed = "mekesatis_labcoat_r"
update_icon()
usr.update_inv_wear_suit()
changing = TRUE
addtimer(CALLBACK(src, .proc/finish_toggle, usr), 10 SECONDS)
/obj/item/clothing/suit/storage/toggle/labcoat/fluff/mekesatis_labcoat/proc/finish_toggle(mob/user)
if(!changed)
icon_state = "mekesatis_holocoat"
item_state = "mekesatis_holocoat"
icon_open = "mekesatis_holocoat_open"
icon_closed = "mekesatis_holocoat"
else
icon_state = "mekesatis_labcoat"
item_state = "mekesatis_labcoat"
icon_open = "mekesatis_labcoat_open"
icon_closed = "mekesatis_labcoat"
update_icon()
user.update_inv_wear_suit()
changed = !changed
changing = FALSE
/obj/item/device/megaphone/fluff/akinyi_mic //Resonance Microphone - Akinyi Idowu - kyres1
name = "resonance microphone"
desc = "A rather costly voice amplifier disguised as a microphone. A button on the side permits the user to dial their vocal volume with ease."
icon = 'icons/obj/custom_items/akinyi_symphette.dmi'
icon_state = "akinyi_mic"
item_state = "akinyi_mic"
w_class = ITEMSIZE_SMALL
contained_sprite = TRUE
activation_sound = null
needs_user_location = FALSE
/obj/item/fluff/akinyi_stand //Telescopic Mic Stand - Akinyi Idowu - kyres1
name = "telescopic mic stand"
desc = "A fold-able telescopic microphone with a built in battery to keep your fancy science fiction microphone charged on the go."
icon = 'icons/obj/custom_items/akinyi_symphette.dmi'
icon_state = "akinyi_stand-collapsed"
item_state = "akinyi_stand-collapsed"
w_class = ITEMSIZE_SMALL
contained_sprite = TRUE
var/obj/item/device/megaphone/fluff/akinyi_mic/mic
var/collapsed = TRUE
/obj/item/fluff/akinyi_stand/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/device/megaphone/fluff/akinyi_mic))
if(!mic && !collapsed)
user.unEquip(O)
O.forceMove(src)
mic = O
to_chat(user, SPAN_NOTICE("You place \the [O] on \the [src]."))
update_icon()
/obj/item/fluff/akinyi_stand/MouseDrop(mob/user as mob)
if((user == usr && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user)))
if(ishuman(user))
forceMove(get_turf(user))
user.put_in_hands(src)
update_icon()
/obj/item/fluff/akinyi_stand/attack_hand(mob/user)
if(!isturf(loc)) //so if you want to play the use the board, you need to put it down somewhere
..()
else
if(mic && !collapsed)
mic.attack_self(user)
/obj/item/fluff/akinyi_stand/attack_self(mob/user as mob)
if(mic)
mic.forceMove(get_turf(src))
user.put_in_hands(mic)
mic = null
update_icon()
return
if(collapsed)
w_class = ITEMSIZE_LARGE
collapsed = FALSE
else
w_class = ITEMSIZE_SMALL
collapsed = TRUE
update_icon()
user.update_inv_l_hand()
user.update_inv_r_hand()
/obj/item/fluff/akinyi_stand/update_icon()
if(collapsed)
icon_state = "akinyi_stand-collapsed"
item_state = "akinyi_stand-collapsed"
else
if(mic)
icon_state = "akinyi_stand-1"
item_state = "akinyi_stand-1"
else
icon_state = "akinyi_stand-0"
item_state = "akinyi_stand-0"
/obj/item/storage/fluff/akinyi_case //Instrument Case - Akinyi Idowu - kyres1
name = "instrument case"
desc = "A chunky white leather case, with lots of space inside for holding your delicate musical instruments."
icon = 'icons/obj/custom_items/akinyi_symphette.dmi'
icon_state = "akinyi_case"
item_state = "akinyi_case"
w_class = ITEMSIZE_LARGE
contained_sprite = TRUE
storage_slots = 3
max_w_class = 3
can_hold = list(
/obj/item/device/megaphone/fluff/akinyi_mic,
/obj/item/fluff/akinyi_stand,
/obj/item/fluff/akinyi_symphette
)
starts_with = list(
/obj/item/device/megaphone/fluff/akinyi_mic = 1,
/obj/item/fluff/akinyi_stand = 1,
/obj/item/fluff/akinyi_symphette = 1
)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB