mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Miscellaneous fixes
- Fixes holodeck eswords - Fixes toy swords not showing the blade - Temporarily disables vent sounds Fixes #6265
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
var/radio_filter_out
|
var/radio_filter_out
|
||||||
var/radio_filter_in
|
var/radio_filter_in
|
||||||
|
|
||||||
var/datum/looping_sound/air_pump/soundloop
|
//var/datum/looping_sound/air_pump/soundloop //VOREStation Removal
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/on
|
/obj/machinery/atmospherics/unary/vent_pump/on
|
||||||
use_power = 1
|
use_power = 1
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/Initialize()
|
/obj/machinery/atmospherics/unary/vent_pump/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
soundloop = new(list(src), FALSE)
|
//soundloop = new(list(src), FALSE) //VOREStation Removal
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/New()
|
/obj/machinery/atmospherics/unary/vent_pump/New()
|
||||||
..()
|
..()
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
if(initial_loc)
|
if(initial_loc)
|
||||||
initial_loc.air_vent_info -= id_tag
|
initial_loc.air_vent_info -= id_tag
|
||||||
initial_loc.air_vent_names -= id_tag
|
initial_loc.air_vent_names -= id_tag
|
||||||
QDEL_NULL(soundloop)
|
//QDEL_NULL(soundloop) //VOREStation Removal
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/high_volume
|
/obj/machinery/atmospherics/unary/vent_pump/high_volume
|
||||||
@@ -171,15 +171,15 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/proc/can_pump()
|
/obj/machinery/atmospherics/unary/vent_pump/proc/can_pump()
|
||||||
if(stat & (NOPOWER|BROKEN))
|
if(stat & (NOPOWER|BROKEN))
|
||||||
soundloop.stop()
|
//soundloop.stop() //VOREStation Removal
|
||||||
return 0
|
return 0
|
||||||
if(!use_power)
|
if(!use_power)
|
||||||
soundloop.stop()
|
//soundloop.stop() //VOREStation Removal
|
||||||
return 0
|
return 0
|
||||||
if(welded)
|
if(welded)
|
||||||
soundloop.stop()
|
//soundloop.stop() //VOREStation Removal
|
||||||
return 0
|
return 0
|
||||||
soundloop.start()
|
//soundloop.start() //VOREStation Removal
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/process()
|
/obj/machinery/atmospherics/unary/vent_pump/process()
|
||||||
|
|||||||
@@ -271,10 +271,12 @@
|
|||||||
if (src.active)
|
if (src.active)
|
||||||
user << "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>"
|
user << "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>"
|
||||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||||
|
src.item_state = "[icon_state]_blade"
|
||||||
src.w_class = ITEMSIZE_LARGE
|
src.w_class = ITEMSIZE_LARGE
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You push the plastic blade back down into the handle.</span>"
|
user << "<span class='notice'>You push the plastic blade back down into the handle.</span>"
|
||||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1
|
||||||
|
src.item_state = "[icon_state]"
|
||||||
src.w_class = ITEMSIZE_SMALL
|
src.w_class = ITEMSIZE_SMALL
|
||||||
update_icon()
|
update_icon()
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|||||||
@@ -7,4 +7,19 @@
|
|||||||
|
|
||||||
/obj/item/weapon/melee/energy/sword/imperial/activate(mob/living/user)
|
/obj/item/weapon/melee/energy/sword/imperial/activate(mob/living/user)
|
||||||
..()
|
..()
|
||||||
icon_state = "sword1"
|
icon_state = "sword1"
|
||||||
|
|
||||||
|
/obj/item/weapon/melee/energy/sword/green/New()
|
||||||
|
lcolor = "#008000"
|
||||||
|
|
||||||
|
/obj/item/weapon/melee/energy/sword/red/New()
|
||||||
|
lcolor = "#FF0000"
|
||||||
|
|
||||||
|
/obj/item/weapon/melee/energy/sword/blue/New()
|
||||||
|
lcolor = "#0000FF"
|
||||||
|
|
||||||
|
/obj/item/weapon/melee/energy/sword/purple/New()
|
||||||
|
lcolor = "#800080"
|
||||||
|
|
||||||
|
/obj/item/weapon/melee/energy/sword/white/New()
|
||||||
|
lcolor = "#FFFFFF"
|
||||||
@@ -264,7 +264,9 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
|||||||
|
|
||||||
/obj/item/weapon/holo/esword
|
/obj/item/weapon/holo/esword
|
||||||
desc = "May the force be within you. Sorta."
|
desc = "May the force be within you. Sorta."
|
||||||
icon_state = "sword0"
|
icon_state = "esword"
|
||||||
|
var/lcolor
|
||||||
|
var/rainbow = FALSE
|
||||||
item_icons = list(
|
item_icons = list(
|
||||||
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
|
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
|
||||||
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
|
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
|
||||||
@@ -276,15 +278,14 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
|||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
flags = NOBLOODY
|
flags = NOBLOODY
|
||||||
var/active = 0
|
var/active = 0
|
||||||
var/item_color
|
|
||||||
|
|
||||||
/obj/item/weapon/holo/esword/green
|
/obj/item/weapon/holo/esword/green
|
||||||
New()
|
New()
|
||||||
item_color = "green"
|
lcolor = "#008000"
|
||||||
|
|
||||||
/obj/item/weapon/holo/esword/red
|
/obj/item/weapon/holo/esword/red
|
||||||
New()
|
New()
|
||||||
item_color = "red"
|
lcolor = "#FF0000"
|
||||||
|
|
||||||
/obj/item/weapon/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
/obj/item/weapon/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||||
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
|
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
|
||||||
@@ -297,31 +298,64 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
|||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/item/weapon/holo/esword/New()
|
|
||||||
item_color = pick("red","blue","green","purple")
|
|
||||||
|
|
||||||
/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
|
/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
|
||||||
active = !active
|
active = !active
|
||||||
if (active)
|
if (active)
|
||||||
force = 30
|
force = 30
|
||||||
icon_state = "sword[item_color]"
|
item_state = "[icon_state]_blade"
|
||||||
w_class = ITEMSIZE_LARGE
|
w_class = ITEMSIZE_LARGE
|
||||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||||
else
|
else
|
||||||
force = 3
|
force = 3
|
||||||
icon_state = "sword0"
|
item_state = "[icon_state]"
|
||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||||
|
|
||||||
if(istype(user,/mob/living/carbon/human))
|
update_icon()
|
||||||
var/mob/living/carbon/human/H = user
|
add_fingerprint(user)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/holo/esword/attackby(obj/item/weapon/W, mob/user)
|
||||||
|
if(istype(W, /obj/item/device/multitool) && !active)
|
||||||
|
if(!rainbow)
|
||||||
|
rainbow = TRUE
|
||||||
|
else
|
||||||
|
rainbow = FALSE
|
||||||
|
to_chat(user, "<span class='notice'>You manipulate the color controller in [src].</span>")
|
||||||
|
update_icon()
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/weapon/holo/esword/update_icon()
|
||||||
|
. = ..()
|
||||||
|
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "[icon_state]_blade")
|
||||||
|
blade_overlay.color = lcolor
|
||||||
|
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
|
||||||
|
if(active)
|
||||||
|
add_overlay(blade_overlay)
|
||||||
|
if(istype(usr,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
H.update_inv_l_hand()
|
H.update_inv_l_hand()
|
||||||
H.update_inv_r_hand()
|
H.update_inv_r_hand()
|
||||||
|
|
||||||
add_fingerprint(user)
|
/obj/item/weapon/holo/esword/AltClick(mob/living/user)
|
||||||
return
|
if(!in_range(src, user)) //Basic checks to prevent abuse
|
||||||
|
return
|
||||||
|
if(user.incapacitated() || !istype(user))
|
||||||
|
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
if(alert("Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes")
|
||||||
|
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
|
||||||
|
if(energy_color_input)
|
||||||
|
lcolor = sanitize_hexcolor(energy_color_input)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/holo/esword/examine(mob/user)
|
||||||
|
..()
|
||||||
|
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||||
|
|
||||||
//BASKETBALL OBJECTS
|
//BASKETBALL OBJECTS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user