mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Merge remote-tracking branch 'upstream/master' into discounts
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
// Squeak component ported over from tg
|
||||
|
||||
/datum/component/squeak
|
||||
var/static/list/default_squeak_sounds = list('sound/items/toysqueak1.ogg'=1, 'sound/items/toysqueak2.ogg'=1, 'sound/items/toysqueak3.ogg'=1)
|
||||
var/list/override_squeak_sounds
|
||||
var/squeak_chance = 100
|
||||
var/volume = 30
|
||||
|
||||
// This is so shoes don't squeak every step
|
||||
var/steps = 0
|
||||
var/step_delay = 1
|
||||
|
||||
// This is to stop squeak spam from inhand usage
|
||||
var/last_use = 0
|
||||
var/use_delay = 20
|
||||
|
||||
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
|
||||
if(ismovableatom(parent))
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
if(istype(parent, /obj/item/clothing/shoes))
|
||||
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
|
||||
|
||||
override_squeak_sounds = custom_sounds
|
||||
if(chance_override)
|
||||
squeak_chance = chance_override
|
||||
if(volume_override)
|
||||
volume = volume_override
|
||||
if(isnum(step_delay_override))
|
||||
step_delay = step_delay_override
|
||||
if(isnum(use_delay_override))
|
||||
use_delay = use_delay_override
|
||||
|
||||
/datum/component/squeak/proc/play_squeak()
|
||||
if(prob(squeak_chance))
|
||||
if(!override_squeak_sounds)
|
||||
playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
|
||||
else
|
||||
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
|
||||
|
||||
/datum/component/squeak/proc/step_squeak()
|
||||
if(steps > step_delay)
|
||||
play_squeak()
|
||||
steps = 0
|
||||
else
|
||||
steps++
|
||||
|
||||
/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE)
|
||||
|
||||
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
|
||||
|
||||
/datum/component/squeak/proc/play_squeak_crossed(atom/movable/AM)
|
||||
if(isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
if(I.flags & ABSTRACT)
|
||||
return
|
||||
else if(istype(AM, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = AM
|
||||
if(P.original != parent)
|
||||
return
|
||||
var/atom/current_parent = parent
|
||||
if(isturf(current_parent.loc))
|
||||
play_squeak()
|
||||
|
||||
/datum/component/squeak/proc/use_squeak()
|
||||
if(last_use + use_delay < world.time)
|
||||
last_use = world.time
|
||||
play_squeak()
|
||||
|
||||
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
//We don't need to worry about unregistering this signal as it will happen for us automaticaly when the holder is qdeleted
|
||||
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
|
||||
|
||||
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir)
|
||||
//If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall
|
||||
if(old_dir != new_dir)
|
||||
play_squeak()
|
||||
@@ -1063,7 +1063,9 @@
|
||||
H.mind.vampire.bloodtotal = 9999
|
||||
H.mind.vampire.check_vampire_upgrade(0)
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shapeshift/bats)
|
||||
to_chat(H, "You have gained the ability to shapeshift into bat form. While capable of basic self defense, you cannot use your other abilities in that form.")
|
||||
to_chat(H, "You have gained the ability to shapeshift into bat form. This is a weak form with no abilities, only useful for stealth.")
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shapeshift/hellhound)
|
||||
to_chat(H, "You have gained the ability to shapeshift into lesser hellhound form. This is a combat form with different abilities, tough but not invincible. It can regenerate itself over time by resting.")
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/raise_vampires)
|
||||
to_chat(H, "You have gained the ability to Raise Vampires. This extremely powerful AOE ability affects all humans near you. Vampires/thralls are healed. Corpses are raised as vampires. Others are stunned, then brain damaged, then killed.")
|
||||
H.dna.SetSEState(JUMPBLOCK, 1)
|
||||
|
||||
@@ -91,4 +91,24 @@
|
||||
shapeshift_type = /mob/living/simple_animal/hostile/scarybat/batswarm
|
||||
list/current_shapes = list(/mob/living/simple_animal/hostile/scarybat/batswarm)
|
||||
list/current_casters = list()
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/scarybat/batswarm)
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/scarybat/batswarm)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/hellhound
|
||||
name = "Lesser Hellhound Form"
|
||||
desc = "Take on the shape of a Hellhound."
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
action_background_icon_state = "bg_demon"
|
||||
action_icon_state = "glare"
|
||||
|
||||
shapeshift_type = /mob/living/simple_animal/hostile/hellhound
|
||||
list/current_shapes = list(/mob/living/simple_animal/hostile/hellhound)
|
||||
list/current_casters = list()
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/hellhound)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/hellhound/greater
|
||||
name = "Greater Hellhound Form"
|
||||
shapeshift_type = /mob/living/simple_animal/hostile/hellhound/greater
|
||||
list/current_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
|
||||
list/current_casters = list()
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
|
||||
@@ -737,6 +737,15 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
cost = 10
|
||||
containername = "advanced first aid kits crate"
|
||||
|
||||
/datum/supply_packs/medical/firstaidmachine
|
||||
name = "Machine First Aid Kits Crate"
|
||||
contains = list(/obj/item/storage/firstaid/machine,
|
||||
/obj/item/storage/firstaid/machine,
|
||||
/obj/item/storage/firstaid/machine,
|
||||
/obj/item/storage/firstaid/machine)
|
||||
cost = 10
|
||||
containername = "machine first aid kits crate"
|
||||
|
||||
/datum/supply_packs/medical/firstaibrute
|
||||
name = "Brute Treatment Kits Crate"
|
||||
contains = list(/obj/item/storage/firstaid/brute,
|
||||
|
||||
@@ -807,6 +807,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
refundable = TRUE
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/cqc
|
||||
name = "CQC Manual"
|
||||
desc = "A manual that teaches a single user tactical Close-Quarters Combat before self-destructing. Does not restrict weapon usage, but cannot be used alongside Gloves of the North Star."
|
||||
reference = "CQC"
|
||||
item = /obj/item/CQC_manual
|
||||
cost = 9
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/throwingweapons
|
||||
name = "Box of Throwing Weapons"
|
||||
desc = "A box of shurikens and reinforced bolas from ancient Earth martial arts. They are highly effective \
|
||||
|
||||
Reference in New Issue
Block a user