mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 21:27:01 +01:00
Event stuff, but also Squeak component (#7285)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/obj/item/clothing/shoes/mech_shoes
|
||||
name = "mech shoes"
|
||||
desc = "Thud thud."
|
||||
icon_state = "nothing"
|
||||
armor = list(melee = 30, bullet = 10, laser = 10, energy = 15, bomb = 20, bio = 0, rad = 0) // Same as loadout jackboots.
|
||||
siemens_coefficient = 0.7 // Same as loadout jackboots.
|
||||
force = 2
|
||||
species_restricted = null
|
||||
var/list/squeak_sound = list("mechstep"=1) //Squeak sound list. Necessary so our subtypes can have different sounds loaded into their component
|
||||
|
||||
/obj/item/clothing/shoes/mech_shoes/Initialize(mapload)
|
||||
.=..()
|
||||
LoadComponent(/datum/component/squeak, squeak_sound, 15*step_volume_mod)
|
||||
|
||||
/obj/item/clothing/shoes/mech_shoes/light
|
||||
name = "light mech shoes"
|
||||
desc = "Thud thud, but quieter."
|
||||
squeak_sound = list("powerloaderstep"=1)
|
||||
|
||||
/obj/item/clothing/shoes/mech_shoes/heavy
|
||||
name = "heavy mech shoes"
|
||||
desc = "Thud thud, but heavy."
|
||||
squeak_sound = list('modular_chomp/sound/mob/footstep_large.ogg'=1,'modular_chomp/sound/mob/footstep_large2.ogg'=1)
|
||||
step_volume_mod = 4
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes
|
||||
var/list/squeak_sound = list("clownstep"=1)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/Initialize(mapload)
|
||||
.=..()
|
||||
LoadComponent(/datum/component/squeak, squeak_sound, 20*step_volume_mod)
|
||||
@@ -0,0 +1,30 @@
|
||||
//Adminspawn item for hunters who're doing kidnaps during events
|
||||
/obj/item/weapon/pen/autostun
|
||||
desc = "A well made and expensive fountain pen. This one has gold accents."
|
||||
icon_state = "blueg_fountain"
|
||||
var/stun_duration = 10
|
||||
|
||||
/obj/item/weapon/pen/autostun/attack(mob/living/M as mob, mob/user as mob)
|
||||
|
||||
if(!istype(M))
|
||||
return
|
||||
M.Stun(stun_duration)
|
||||
|
||||
/obj/item/weapon/pen/autostun/paralyse
|
||||
desc = "A well made and expensive fountain pen. This one has gold accents."
|
||||
|
||||
/obj/item/weapon/pen/autostun/paralyse/attack(mob/living/M as mob, mob/user as mob)
|
||||
|
||||
if(!istype(M))
|
||||
return
|
||||
M.Paralyse(stun_duration)
|
||||
|
||||
|
||||
/obj/item/weapon/pen/autostun/weaken
|
||||
desc = "A well made and expensive fountain pen. This one has gold accents."
|
||||
|
||||
/obj/item/weapon/pen/autostun/weaken/attack(mob/living/M as mob, mob/user as mob)
|
||||
|
||||
if(!istype(M))
|
||||
return
|
||||
M.Weaken(stun_duration)
|
||||
@@ -0,0 +1,24 @@
|
||||
/obj/item/weapon/gun/energy/taser/disabler/slow
|
||||
name = "plasma snare device"
|
||||
desc = "A modified disabler adjusted to impulse a target with a restrictive slowdown."
|
||||
icon_state = "disabler"
|
||||
projectile_type = /obj/item/projectile/energy/plasmastun/slow
|
||||
charge_cost = 480
|
||||
self_recharge = 1
|
||||
recharge_time = 3
|
||||
|
||||
/obj/item/projectile/energy/plasmastun/slow
|
||||
name = "plasma pulse"
|
||||
icon_state = "plasma_stun"
|
||||
fire_sound = 'sound/weapons/weaponsounds_laserstrong.ogg'
|
||||
armor_penetration = 10
|
||||
range = 9
|
||||
damage = 0
|
||||
agony = 0
|
||||
vacuum_traversal = 1
|
||||
hud_state = "plasma_rifle_blast"
|
||||
|
||||
/obj/item/projectile/energy/plasmastun/slow/on_hit(var/atom/target)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.add_modifier(/datum/modifier/entangled, 10 SECONDS)
|
||||
@@ -0,0 +1,169 @@
|
||||
//This is pretty much just copied from construct_spells but adjusted so anyone can use them
|
||||
|
||||
/spell/targeted/unrestricted
|
||||
name = "Base Unrestricted Spell"
|
||||
desc = "If you see this, you should probably remind coders to refactor spell code."
|
||||
|
||||
range = -1
|
||||
school = "evocation"
|
||||
charge_type = Sp_RECHARGE
|
||||
invocation_type = SpI_NONE
|
||||
|
||||
spell_flags = INCLUDEUSER
|
||||
|
||||
hud_state = "const_rune"
|
||||
smoke_amt = 0
|
||||
|
||||
charge_max = 10
|
||||
|
||||
var/obj/item/weapon/spell/unrestricted/spell_obj = null //This is the var that determines what Technomancer-style spell is put into their hands.
|
||||
|
||||
/spell/targeted/unrestricted/cast(list/targets, mob/living/user)
|
||||
user.place_spell_in_hand(spell_obj)
|
||||
|
||||
/obj/item/weapon/spell/unrestricted
|
||||
name = "a spell"
|
||||
desc = "Remind the devs to refactor spell code."
|
||||
icon = 'icons/obj/spells.dmi'
|
||||
icon_state = "generic"
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_spells.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_spells.dmi',
|
||||
)
|
||||
throwforce = 0
|
||||
force = 0
|
||||
show_examine = FALSE
|
||||
owner = null
|
||||
core = null
|
||||
cast_methods = null // Controls how the spell is casted.
|
||||
aspect = ASPECT_UNHOLY // Not used for everything we do
|
||||
toggled = 0 // Mainly used for overlays.
|
||||
cooldown = 0 // If set, will add a cooldown overlay and adjust click delay. Must be a multiple of 5 for overlays.
|
||||
cast_sound = null // Sound file played when this is used.
|
||||
var/last_castcheck = null // The last time this spell was cast.
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/New()
|
||||
if(isliving(loc))
|
||||
owner = loc
|
||||
if(!owner)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/run_checks()
|
||||
if(owner)
|
||||
if(world.time >= (last_castcheck + cooldown)) //Are they a cultist or a construct, and has the cooldown time passed?
|
||||
last_castcheck = world.time
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/pay_energy(var/amount)
|
||||
if(owner)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!run_checks())
|
||||
return
|
||||
if(!proximity_flag)
|
||||
if(cast_methods & CAST_RANGED)
|
||||
on_ranged_cast(target, user)
|
||||
else
|
||||
if(istype(target, /obj/item/weapon/spell))
|
||||
var/obj/item/weapon/spell/spell = target
|
||||
if(spell.cast_methods & CAST_COMBINE)
|
||||
spell.on_combine_cast(src, user)
|
||||
return
|
||||
if(cast_methods & CAST_MELEE)
|
||||
on_melee_cast(target, user)
|
||||
else if(cast_methods & CAST_RANGED) //Try to use a ranged method if a melee one doesn't exist.
|
||||
on_ranged_cast(target, user)
|
||||
if(cooldown)
|
||||
var/effective_cooldown = round(cooldown, 5)
|
||||
user.setClickCooldown(effective_cooldown)
|
||||
flick("cooldown_[effective_cooldown]",src)
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/projectile //This makes me angry, but we need the template, and we can't use it because special check overrides on the base.
|
||||
name = "construct projectile template"
|
||||
icon_state = "generic"
|
||||
desc = "This is a generic template that shoots projectiles. If you can read this, the game broke!"
|
||||
cast_methods = CAST_RANGED
|
||||
var/obj/item/projectile/spell_projectile = null
|
||||
var/pre_shot_delay = 0
|
||||
var/fire_sound = null
|
||||
var/energy_cost_per_shot = 5
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/projectile/on_ranged_cast(atom/hit_atom, mob/living/user)
|
||||
if(set_up(hit_atom, user))
|
||||
var/obj/item/projectile/new_projectile = make_projectile(spell_projectile, user)
|
||||
new_projectile.old_style_target(hit_atom)
|
||||
new_projectile.firer = user //Don't shoot yourself while moving
|
||||
new_projectile.fire()
|
||||
log_attack("has casted [src] at \the [hit_atom].")
|
||||
if(fire_sound)
|
||||
playsound(src, fire_sound, 75, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/projectile/proc/make_projectile(obj/item/projectile/projectile_type, mob/living/user)
|
||||
var/obj/item/projectile/P = new projectile_type(get_turf(user))
|
||||
return P
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/projectile/proc/set_up(atom/hit_atom, mob/living/user)
|
||||
if(spell_projectile)
|
||||
if(pay_energy(energy_cost_per_shot))
|
||||
if(pre_shot_delay)
|
||||
var/image/target_image = image(icon = 'icons/obj/spells.dmi', loc = get_turf(hit_atom), icon_state = "target")
|
||||
user << target_image
|
||||
user.Stun(pre_shot_delay / 10)
|
||||
sleep(pre_shot_delay)
|
||||
qdel(target_image)
|
||||
if(owner)
|
||||
return TRUE
|
||||
return FALSE // We got dropped before the firing occured.
|
||||
return TRUE // No delay, no need to check.
|
||||
return FALSE
|
||||
|
||||
//
|
||||
// The actual spells
|
||||
//
|
||||
|
||||
/spell/targeted/unrestricted/plasmastun
|
||||
name = "Plasma Snare"
|
||||
desc = "Fire a debillitating slowing projectile."
|
||||
|
||||
hud_state = "const_beam"
|
||||
spell_obj = /obj/item/weapon/spell/unrestricted/projectile/plasmastun
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/projectile/plasmastun
|
||||
name = "plasma snare"
|
||||
icon_state = "generic"
|
||||
desc = "Your hands fire a debillitating slowing projectile."
|
||||
cast_methods = CAST_RANGED
|
||||
spell_projectile = /obj/item/projectile/energy/plasmastun/slow
|
||||
pre_shot_delay = 0
|
||||
cooldown = 5
|
||||
fire_sound = 'sound/weapons/weaponsounds_laserstrong.ogg'
|
||||
|
||||
/spell/targeted/unrestricted/mend
|
||||
name = "Mend Target"
|
||||
desc = "Mend a target over time."
|
||||
|
||||
charge_max = 100
|
||||
|
||||
hud_state = "const_mend"
|
||||
spell_obj = /obj/item/weapon/spell/unrestricted/mend
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/mend
|
||||
name = "mend target"
|
||||
desc = "Mend the wounds of a target over time"
|
||||
icon_state = "mend_wounds"
|
||||
cast_methods = CAST_MELEE
|
||||
aspect = ASPECT_UNHOLY
|
||||
light_color = "#FF5C5C"
|
||||
light_power = -2
|
||||
light_on = TRUE
|
||||
|
||||
/obj/item/weapon/spell/unrestricted/mend/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
||||
if(isliving(hit_atom))
|
||||
var/mob/living/L = hit_atom
|
||||
L.add_modifier(/datum/modifier/mend_occult, 150) //No need to change this, it does the job
|
||||
qdel(src)
|
||||
Reference in New Issue
Block a user