[IDED] Replaces UZI domain reward with ballistic chameleon gun (#87600)

## About The Pull Request

Replaces the mini-UZI beach battle domain reward with a ballistic
chameleon gun.

Also added a separate possible reward for an uzi bitrunning disk.
This commit is contained in:
carlarctg
2024-11-21 23:43:51 +00:00
committed by GitHub
parent 5d223fb906
commit 987aedde4c
4 changed files with 38 additions and 21 deletions
+6
View File
@@ -185,3 +185,9 @@
/obj/item/crusher_trophy/vortex_talisman,
/obj/item/crusher_trophy/ice_demon_cube,
)
/obj/item/bitrunning_disk/item/mini_uzi
name = "bitrunning gear: mini-uzi"
selectable_items = list(
/obj/item/gun/ballistic/automatic/mini_uzi,
)
@@ -13,10 +13,10 @@
/obj/item/toy/beach_ball = 2,
/obj/item/clothing/shoes/sandal = 1,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/gun/ballistic/automatic/mini_uzi = 1,
/obj/item/gun/energy/laser/chameleon/ballistic_only = 1,
/obj/item/bitrunning_disk/item/mini_uzi = 1,
)
/datum/lazy_template/virtual_domain/island_brawl/setup_domain(list/created_atoms)
for(var/obj/effect/mob_spawn/ghost_role/human/virtual_domain/islander/spawner in created_atoms)
custom_spawns += spawner
@@ -301,3 +301,7 @@
. = ..()
for(var/other_type in other_cham_types)
add_chameleon_items(other_type)
/datum/action/item_action/chameleon/change/gun/ballistic
chameleon_type = /obj/item/gun/ballistic
chameleon_name = "Gun"
@@ -11,14 +11,15 @@
/// The badmin mode. Makes your projectiles act like the real deal.
var/real_hits = FALSE
/// how it looks by default.
var/default_look = /obj/item/gun/energy/laser
/obj/item/gun/energy/laser/chameleon/Initialize(mapload)
. = ..()
recharge_newshot()
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS)
// Init order shenanigans dictate we have to do this last so we can't just use `active_type`
var/datum/action/item_action/chameleon/change/gun/gun_action = locate() in actions
gun_action?.update_look(/obj/item/gun/energy/laser)
gun_action?.update_look(default_look)
/**
* Description: Resets the currently loaded chameleon variables, essentially resetting it to brand new.
@@ -54,36 +55,34 @@
inhand_x_dimension = gun_to_set.inhand_x_dimension
inhand_y_dimension = gun_to_set.inhand_y_dimension
// We dupe this casing and then delete it at the end, to grab the projectile.
var/obj/item/ammo_casing/casing_to_dupe
if(istype(gun_to_set, /obj/item/gun/ballistic))
var/obj/item/gun/ballistic/ball_gun = gun_to_set
var/obj/item/ammo_box/ball_ammo = new ball_gun.spawn_magazine_type(gun_to_set)
qdel(ball_gun)
if(!istype(ball_ammo) || !ball_ammo.ammo_type)
qdel(ball_ammo)
return FALSE
var/obj/item/ammo_casing/ball_cartridge = new ball_ammo.ammo_type(gun_to_set)
set_chameleon_ammo(ball_cartridge)
// We also need to copy the starting magazine for ballistics.
casing_to_dupe = initial(ball_gun.spawn_magazine_type.ammo_type)
casing_to_dupe = new casing_to_dupe(src)
else if(istype(gun_to_set, /obj/item/gun/magic))
var/obj/item/gun/magic/magic_gun = gun_to_set
var/obj/item/ammo_casing/magic_cartridge = new magic_gun.ammo_type(gun_to_set)
set_chameleon_ammo(magic_cartridge)
casing_to_dupe = new magic_gun.ammo_type(src)
else if(istype(gun_to_set, /obj/item/gun/energy))
var/obj/item/gun/energy/energy_gun = gun_to_set
// Even if the energy gun has multiple ammo types, we copy the first. Energy guns always (should) have a list in ammo_type.
if(islist(energy_gun.ammo_type) && energy_gun.ammo_type.len)
var/obj/item/ammo_casing/energy_cartridge = energy_gun.ammo_type[1]
set_chameleon_ammo(energy_cartridge)
var/obj/item/first_casing = energy_gun.ammo_type[1]
casing_to_dupe = new first_casing.type(src)
else if(istype(gun_to_set, /obj/item/gun/syringe))
var/obj/item/ammo_casing/syringe_cartridge = new /obj/item/ammo_casing/syringegun(src)
set_chameleon_ammo(syringe_cartridge)
casing_to_dupe = new /obj/item/ammo_casing/syringegun(src)
else
var/obj/item/ammo_casing/default_cartridge = new /obj/item/ammo_casing(src)
set_chameleon_ammo(default_cartridge)
casing_to_dupe = new /obj/item/ammo_casing(src)
set_chameleon_ammo(casing_to_dupe)
qdel(casing_to_dupe)
/**
* Description: Sets the ammo type our gun should have.
@@ -155,3 +154,11 @@
var/obj/item/gun/new_gun = new guntype(src)
set_chameleon_gun(new_gun)
qdel(new_gun)
/obj/item/gun/energy/laser/chameleon/ballistic_only
actions_types = list(/datum/action/item_action/chameleon/change/gun/ballistic)
default_look = /obj/item/gun/ballistic/automatic/mini_uzi
/obj/item/gun/energy/laser/chameleon/ballistic_only/Initialize(mapload)
. = ..()
set_chameleon_disguise(default_look)