mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 07:22:15 +00:00
Qoi Custom Item (#11668)
This commit is contained in:
@@ -676,4 +676,15 @@
|
||||
'sound/weapons/marauder.ogg',
|
||||
'sound/weapons/laserdeep.ogg',
|
||||
'sound/weapons/laserstrong.ogg'
|
||||
)
|
||||
)
|
||||
|
||||
/decl/sound_category/quick_arcade // quick punchy arcade sounds
|
||||
sounds = list(
|
||||
'sound/arcade/get_fuel.ogg',
|
||||
'sound/arcade/heal.ogg',
|
||||
'sound/arcade/hit.ogg',
|
||||
'sound/arcade/kill_crew.ogg',
|
||||
'sound/arcade/lose_fuel.ogg',
|
||||
'sound/arcade/mana.ogg',
|
||||
'sound/arcade/steal.ogg'
|
||||
)
|
||||
@@ -1991,4 +1991,182 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
icon_state = "rajka_suit"
|
||||
item_state = "rajka_suit"
|
||||
contained_sprite = TRUE
|
||||
species_restricted = list(BODYTYPE_TAJARA)
|
||||
species_restricted = list(BODYTYPE_TAJARA)
|
||||
|
||||
|
||||
/obj/item/fluff/holoconsole // Holoconsole - Qoi Liuiq - shestrying
|
||||
name = "holoconsole"
|
||||
desc = "A game console capable of displaying a three-dimensional, holographic image of the player's game of choice. It's pink!"
|
||||
icon = 'icons/obj/custom_items/qoi_console.dmi'
|
||||
icon_state = "console"
|
||||
|
||||
var/on = FALSE
|
||||
var/obj/item/fluff/holoconsole_controller/left_controller
|
||||
var/obj/item/fluff/holoconsole_controller/r/right_controller
|
||||
var/mutable_appearance/screen
|
||||
|
||||
var/sound_delay = 0.5 SECONDS // so we don't deafen everyone by spam clicking
|
||||
var/last_sound = 0
|
||||
|
||||
/obj/item/fluff/holoconsole/Initialize()
|
||||
. = ..()
|
||||
left_controller = new /obj/item/fluff/holoconsole_controller(src)
|
||||
right_controller = new /obj/item/fluff/holoconsole_controller/r(src)
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_left
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_right
|
||||
screen = mutable_appearance(icon, "screen")
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/holoconsole/Destroy()
|
||||
QDEL_NULL(left_controller)
|
||||
QDEL_NULL(right_controller)
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holoconsole/update_icon()
|
||||
icon_state = "console[left_controller ? "_l" : ""][right_controller ? "_r" : ""]"
|
||||
|
||||
/obj/item/fluff/holoconsole/attack_self(mob/user)
|
||||
if(on && !(world.time < last_sound + sound_delay))
|
||||
playsound(loc, /decl/sound_category/quick_arcade, 60)
|
||||
last_sound = world.time
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holoconsole/attackby(obj/item/I, mob/user)
|
||||
switch(I.type)
|
||||
if(/obj/item/fluff/holoconsole_controller)
|
||||
if(left_controller)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already has its left controller connected!"))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> slots \the [I] back into to \the [src].", SPAN_NOTICE("You slot \the [I] back into \the [src]."))
|
||||
user.drop_from_inventory(I, src)
|
||||
left_controller = I
|
||||
left_controller.parent_console = null
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_left
|
||||
update_icon()
|
||||
return
|
||||
if(/obj/item/fluff/holoconsole_controller/r)
|
||||
if(right_controller)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already has its right controller connected!"))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> slots \the [I] back into to \the [src].", SPAN_NOTICE("You slot \the [I] back into \the [src]."))
|
||||
user.drop_from_inventory(I, src)
|
||||
right_controller = I
|
||||
right_controller.parent_console = null
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_right
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holoconsole/verb/toggle_on()
|
||||
set name = "Toggle On"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
on = !on
|
||||
usr.visible_message("<b>[usr]</b> turns \the [src] [on ? "on" : "off"].", SPAN_NOTICE("You turn \the [src] [on ? "on" : "off"]."))
|
||||
if(on)
|
||||
playsound(loc, 'sound/machines/synth_yes.ogg', 50)
|
||||
add_overlay(screen)
|
||||
else
|
||||
playsound(loc, 'sound/machines/synth_no.ogg', 50)
|
||||
cut_overlay(screen)
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/holoconsole/proc/remove_left()
|
||||
set name = "Remove Left Controller"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
usr.visible_message("<b>[usr]</b> removes the left controller from \the [src], flicking it open.", SPAN_NOTICE("You remove the left controller from \the [src], flicking it open."))
|
||||
usr.put_in_hands(left_controller)
|
||||
left_controller.parent_console = WEAKREF(src)
|
||||
left_controller = null
|
||||
verbs -= /obj/item/fluff/holoconsole/proc/remove_left
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/holoconsole/proc/remove_right()
|
||||
set name = "Remove Right Controller"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
usr.visible_message("<b>[usr]</b> removes the right controller from \the [src], flicking it open.", SPAN_NOTICE("You remove the right controller from \the [src], flicking it open."))
|
||||
usr.put_in_hands(right_controller)
|
||||
right_controller.parent_console = WEAKREF(src)
|
||||
right_controller = null
|
||||
verbs -= /obj/item/fluff/holoconsole/proc/remove_right
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/holoconsole_controller // Holoconsole - Qoi Liuiq - shestrying
|
||||
name = "left holoconsole controller"
|
||||
desc = "A controller for the Holoconsole, capable of folding in half and re-attaching to the machine. It's pink!"
|
||||
icon = 'icons/obj/custom_items/qoi_console.dmi'
|
||||
icon_state = "controller"
|
||||
|
||||
var/datum/weakref/parent_console
|
||||
var/sound_delay = 0.5 SECONDS // so we don't deafen everyone by spam clicking
|
||||
var/last_sound = 0
|
||||
|
||||
/obj/item/fluff/holoconsole_controller/attack_self(mob/user)
|
||||
if(world.time < last_sound + sound_delay)
|
||||
return
|
||||
|
||||
var/obj/item/fluff/holoconsole/H = parent_console.resolve()
|
||||
if(H?.on)
|
||||
playsound(H.loc, /decl/sound_category/quick_arcade, 60)
|
||||
last_sound = world.time
|
||||
|
||||
/obj/item/fluff/holoconsole_controller/r // Holoconsole - Qoi Liuiq - shestrying
|
||||
name = "right holoconsole controller"
|
||||
|
||||
/obj/item/fluff/holocase // Holoconsole Case - Qoi Liuiq - shestrying
|
||||
name = "holoconsole case"
|
||||
desc = "A case for the Holoconsole. This one is made of fabric, with various iron-on patches attached to it. It's pink!"
|
||||
icon = 'icons/obj/custom_items/qoi_console.dmi'
|
||||
icon_state = "case"
|
||||
|
||||
var/spinned = FALSE
|
||||
var/obj/item/fluff/holoconsole/contained_console
|
||||
|
||||
/obj/item/fluff/holocase/Initialize()
|
||||
. = ..()
|
||||
contained_console = new /obj/item/fluff/holoconsole(src)
|
||||
|
||||
/obj/item/fluff/holocase/Destroy()
|
||||
QDEL_NULL(contained_console)
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holocase/update_icon()
|
||||
if(!contained_console)
|
||||
icon_state = "case_o"
|
||||
return
|
||||
icon_state = spinned ? "case_b" : "case"
|
||||
|
||||
/obj/item/fluff/holocase/attack_self(mob/user)
|
||||
if(!contained_console)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have a console inside it! Insert it before trying to spin \the [src] around."))
|
||||
return
|
||||
spinned = !spinned
|
||||
user.visible_message("<b>[usr]</b> deftly spins \the [src], showing its [spinned ? "back" : "front"].", SPAN_NOTICE("You deftly spin \the [src], showing its [spinned ? "back" : "front"]."))
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/holocase/attack_hand(mob/user)
|
||||
if(contained_console && src == user.get_inactive_hand())
|
||||
user.visible_message("<b>[usr]</b> removes \the [contained_console] from \the [src].", SPAN_NOTICE("You remove \the [contained_console] from \the [src]."))
|
||||
user.put_in_hands(contained_console)
|
||||
contained_console = null
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holocase/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/fluff/holoconsole))
|
||||
if(contained_console)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already contains a holoconsole!"))
|
||||
return
|
||||
user.drop_from_inventory(I, src)
|
||||
contained_console = I
|
||||
user.visible_message("<b>[usr]</b> puts \the [contained_console] into \the [src], zipping it back up.", SPAN_NOTICE("You put \the [contained_console] into \the [src], zipping it back up."))
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
BIN
icons/obj/custom_items/qoi_console.dmi
Normal file
BIN
icons/obj/custom_items/qoi_console.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Reference in New Issue
Block a user