Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into forest/pred/we…
Browse files Browse the repository at this point in the history
…apons_overhaul
  • Loading branch information
realforest2001 committed Jan 13, 2024
2 parents d41c4e2 + cc1c951 commit 2db3859
Show file tree
Hide file tree
Showing 22 changed files with 137 additions and 89 deletions.
1 change: 1 addition & 0 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
/obj/item/ammo_magazine/rifle/rubber = 40,
/obj/item/ammo_magazine/rifle/m4ra/rubber = 40,
/obj/item/clothing/head/helmet/marine/MP = 8,
/obj/item/explosive/plastic/breaching_charge/rubber = 6,
)

/obj/structure/machinery/vending/sea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@
list("Falling Falcons Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch/falcon, VENDOR_ITEM_REGULAR),
list("USCM Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch, VENDOR_ITEM_REGULAR),
list("Bedroll", round(scale * 20), /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR),

list("OPTICS", -1, null, null, null),
list("Advanced Medical Optic (CORPSMAN ONLY)", round(scale * 4), /obj/item/device/helmet_visor/medical/advanced, VENDOR_ITEM_REGULAR),
list("Squad Optic", round(scale * 15), /obj/item/device/helmet_visor, VENDOR_ITEM_REGULAR),

)

//--------------SQUAD SPECIFIC VERSIONS--------------
Expand Down
24 changes: 14 additions & 10 deletions code/game/objects/items/explosives/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@
penetration = 0.60
deploying_time = 10
var/shrapnel_volume = 40
var/shrapnel_type = /datum/ammo/bullet/shrapnel/metal
var/explosion_strength = 60

/obj/item/explosive/plastic/breaching_charge/can_place(mob/user, atom/target)
if(!is_type_in_list(target, breachable))//only items on the list are allowed
Expand All @@ -347,13 +349,21 @@

/obj/item/explosive/plastic/breaching_charge/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/metal, cause_data)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle, shrapnel_type, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/proc/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 60, 60, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
cell_explosion(target_turf, explosion_strength, explosion_strength, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)

/obj/item/explosive/plastic/breaching_charge/rubber
name = "X17 riot charge"
desc = "An explosive device used to break into areas while protecting the user from the blast. Unlike the standard breaching charge, the X17 deploys a cone spray of rubber pellets to incapacitate rather than kill."
icon_state = "riot-charge"
overlay_image = "riot-active"
shrapnel_volume = 20
shrapnel_type = /datum/ammo/bullet/shrapnel/rubber

/obj/item/explosive/plastic/breaching_charge/plasma
name = "plasma charge"
desc = "An alien explosive device. Who knows what it might do."
Expand All @@ -367,18 +377,12 @@
deploying_time = 10
flags_item = NOBLUDGEON|ITEM_PREDATOR
shrapnel_volume = 10
shrapnel_type = /datum/ammo/bullet/shrapnel/plasma
explosion_strength = 90

/obj/item/explosive/plastic/breaching_charge/plasma/can_place(mob/user, atom/target)
if(!HAS_TRAIT(user, TRAIT_YAUTJA_TECH))
to_chat(user, SPAN_WARNING("You don't quite understand how the device works..."))
return FALSE
. = ..()

/obj/item/explosive/plastic/breaching_charge/plasma/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/plasma, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/plasma/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 90, 90, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)
2 changes: 1 addition & 1 deletion code/game/objects/items/stacks/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
var/obj/item/stack/flag/newflag = new src.type(T)
newflag.amount = 1
newflag.upright = TRUE
anchored = TRUE
newflag.anchored = TRUE
newflag.name = newflag.singular_name
newflag.icon_state = "[newflag.base_state]_open"
newflag.visible_message("<b>[user]</b> plants [newflag] firmly in the ground.")
Expand Down
14 changes: 14 additions & 0 deletions code/modules/cm_aliens/structures/tunnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,22 @@
if(resin_trap)
qdel(resin_trap)

if(hivenumber == XENO_HIVE_NORMAL)
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling))

SSminimaps.add_marker(src, z, get_minimap_flag_for_faction(hivenumber), "xenotunnel")

/obj/structure/tunnel/proc/forsaken_handling()
SIGNAL_HANDLER
if(is_ground_level(z))
hive.tunnels -= src
hivenumber = XENO_HIVE_FORSAKEN
set_hive_data(src, XENO_HIVE_FORSAKEN)
hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN]
hive.tunnels += src

UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

/obj/structure/tunnel/Destroy()
if(hive)
hive.tunnels -= src
Expand Down
23 changes: 12 additions & 11 deletions code/modules/cm_marines/Donator_Items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@
item_state = "merc_armor"

/obj/item/clothing/suit/storage/marine/fluff/steelpoint //CKEY=steelpoint (UNIQUE)
name = "M4X Armor"
desc = "Armor to the M4X!!!! DONOR ITEM"
name = "M4-X Armor"
desc = "A next generation body armor system intended for Marines fighting against xenomorphs, the system is coated in a unique acid resistant polymer coating, as well as enhanced ballistics protection. This prototype version lacks those two features. DONOR ITEM"
flags_atom = FPRINT|CONDUCT|NO_NAME_OVERRIDE
icon_state = "steelpoint_armor"
item_state = "steelpoint_armor"


/obj/item/clothing/suit/storage/marine/fluff/valentine //CKEY=markvalentine
name = "Shocky's Armor"
desc = "Shockingly good armor. DONOR ITEM"
Expand Down Expand Up @@ -842,10 +842,11 @@
flags_inv_hide = HIDEEARS|HIDEMASK|HIDEEYES|HIDEALLHAIR

/obj/item/clothing/head/helmet/marine/fluff/steelpoint //CKEY=steelpoint (UNIQUE)
name = "M4X Helmet"
desc = "Helmets to the M4X!!! DONOR ITEM"
name = "M4-X Helmet"
desc = "A next generation combat helmet intended to be paired with the M4-X armor. The full faced helmet provides complete light ballistic-resistant protection alongside enchanced acid resistance. This prototype version lacks those features. DONOR ITEM"
icon_state = "steelpoint_helmet"
item_state = "steelpoint_helmet"
flags_atom = FPRINT|CONDUCT|NO_NAME_OVERRIDE
flags_inventory = BLOCKSHARPOBJ
flags_inv_hide = HIDEEARS|HIDEMASK|HIDEEYES|HIDEALLHAIR

Expand Down Expand Up @@ -1148,8 +1149,8 @@
flags_jumpsuit = FALSE

/obj/item/clothing/under/marine/fluff/steelpoint //CKEY=steelpoint (UNIQUE)
name = "M4X Jumpsuit"
desc = "Jumpsuit to the M4X!!! DONOR ITEM"
name = "M4-X Jumpsuit"
desc = "Jumpsuit issued alongside the M4-X armor. Considered outdated compared to the more modern armor system. DONOR ITEM"
icon_state = "steelpoint_jumpsuit"
worn_state = "steelpoint_jumpsuit"
flags_jumpsuit = FALSE
Expand Down Expand Up @@ -1319,10 +1320,10 @@
item_state = "doom_boots"

/obj/item/clothing/shoes/marine/fluff/steelpoint //CKEY=steelpoint (UNIQUE)
name = "M4X Boot"
desc = "Boots to the M4X. DONOR ITEM"
icon_state = "jackboots"
item_state = "jackboots"
name = "M4-X Boot"
desc = "Standard issue boots issued alongside M4-X armor, features a special coating of acid-resistant layering to allow its operator to move through acid-dretched enviroments safely. This prototype version lacks that feature. DONOR ITEM"
icon_state = "marine"
item_state = "marine"

//GENERIC GLASSES, GLOVES, AND MISC ////////////////////

Expand Down
15 changes: 0 additions & 15 deletions code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,6 @@
return
return ..()

/datum/action/xeno_action/onclick/queen_award
name = "Give Royal Jelly (500)"
action_icon_state = "queen_award"
plasma_cost = 500

/datum/action/xeno_action/onclick/queen_award/use_ability(atom/target)
var/mob/living/carbon/xenomorph/queen/xeno = owner
if(!xeno.check_state())
return
if(!xeno.check_plasma(plasma_cost))
return
if(give_jelly_award(xeno.hive))
xeno.use_plasma(plasma_cost)
return ..()

/datum/action/xeno_action/onclick/queen_word
name = "Word of the Queen (50)"
action_icon_state = "queen_word"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/datum/action/xeno_action/onclick/deevolve
name = "De-Evolve a Xenomorph (500)"
action_icon_state = "xeno_deevolve"
plasma_cost = 500

/datum/action/xeno_action/onclick/remove_eggsac
name = "Remove Eggsac"
action_icon_state = "grow_ovipositor"
Expand Down Expand Up @@ -45,23 +40,10 @@
var/node_plant_plasma_cost = 300
var/turf_build_cooldown = 7 SECONDS

/datum/action/xeno_action/onclick/give_evo_points
name = "Trade Larva for Evolution Points (100)"
action_icon_state = "queen_give_evo_points"
plasma_cost = 100
xeno_cooldown = 60 SECONDS
var/evo_points_per_larva = 250
var/required_larva = 3

/datum/action/xeno_action/onclick/banish
name = "Banish a Xenomorph (500)"
action_icon_state = "xeno_banish"
plasma_cost = 500

/datum/action/xeno_action/onclick/readmit
name = "Readmit a Xenomorph (100)"
/datum/action/xeno_action/onclick/manage_hive
name = "Manage The Hive"
action_icon_state = "xeno_readmit"
plasma_cost = 100
plasma_cost = 0

/datum/action/xeno_action/activable/secrete_resin/remote/queen
name = "Projected Resin (100)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// devolve a xeno - lots of old, vaguely shitty code here
/datum/action/xeno_action/onclick/deevolve/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/de_evolve_other()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_devolve = 500
if(!user_xeno.check_state())
return
if(!user_xeno.observed_xeno)
to_chat(user_xeno, SPAN_WARNING("You must overwatch the xeno you want to de-evolve."))
return

var/mob/living/carbon/xenomorph/target_xeno = user_xeno.observed_xeno
if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_devolve))
return

if(target_xeno.hivenumber != user_xeno.hivenumber)
Expand Down Expand Up @@ -130,7 +131,7 @@
SSround_recording.recorder.stop_tracking(target_xeno)
SSround_recording.recorder.track_player(new_xeno)
qdel(target_xeno)
return ..()
return

/datum/action/xeno_action/onclick/remove_eggsac/use_ability(atom/A)
var/mob/living/carbon/xenomorph/queen/X = owner
Expand Down Expand Up @@ -292,12 +293,15 @@
to_chat(X, SPAN_XENONOTICE("You channel your plasma to heal your sisters' wounds around this area."))
return ..()

/datum/action/xeno_action/onclick/give_evo_points/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/give_evo_points()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_givepoints = 100


if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_givepoints))
return

if(world.time < SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK)
Expand All @@ -308,7 +312,8 @@

if(!choice)
return

var/evo_points_per_larva = 250
var/required_larva = 3
var/mob/living/carbon/xenomorph/target_xeno

for(var/mob/living/carbon/xenomorph/xeno in user_xeno.hive.totalXenos)
Expand Down Expand Up @@ -351,14 +356,45 @@
target_xeno.evolution_stored += evo_points_per_larva

user_xeno.hive.stored_larva--
return ..()
return



/datum/action/xeno_action/onclick/manage_hive/proc/give_jelly_reward()
var/mob/living/carbon/xenomorph/queen/xeno = owner
var/plasma_cost_jelly = 500
if(!xeno.check_state())
return
if(!xeno.check_plasma(plasma_cost_jelly))
return
if(give_jelly_award(xeno.hive))
xeno.use_plasma(plasma_cost_jelly)
return
/datum/action/xeno_action/onclick/manage_hive/use_ability(atom/Atom)
var/mob/living/carbon/xenomorph/queen/queenbanish = owner
plasma_cost = 0

/datum/action/xeno_action/onclick/banish/use_ability(atom/Atom)
var/choice = tgui_input_list(queenbanish, "Manage The Hive", "Hive Management", list("Banish (500)", "Re-Admit (100)", "De-evolve (500)", "Reward Jelly (500)", "Exchange larva for evolution (100)",), theme="hive_status")
switch(choice)
if("Banish (500)")
banish()
if("Re-Admit (100)")
readmit()
if("De-evolve (500)")
de_evolve_other()
if("Reward Jelly (500)")
give_jelly_reward(queenbanish.hive)
if("Exchange larva for evolution (100)")
give_evo_points()


/datum/action/xeno_action/onclick/manage_hive/proc/banish()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_banish = 500
if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_banish))
return

var/choice = tgui_input_list(user_xeno, "Choose a xenomorph to banish:", "Banish", user_xeno.hive.totalXenos, theme="hive_status")
Expand Down Expand Up @@ -399,7 +435,7 @@
to_chat(user_xeno, SPAN_XENOWARNING("You must provide a reason for banishing [target_xeno]."))
return

if(!user_xeno.check_state() || !check_and_use_plasma_owner(plasma_cost) || target_xeno.health < 0)
if(!user_xeno.check_state() || !check_and_use_plasma_owner(plasma_cost_banish) || target_xeno.health < 0)
return

// Let everyone know they were banished
Expand All @@ -413,20 +449,21 @@
addtimer(CALLBACK(src, PROC_REF(remove_banish), user_xeno.hive, target_xeno.name), 30 MINUTES)

message_admins("[key_name_admin(user_xeno)] has banished [key_name_admin(target_xeno)]. Reason: [reason]")
return ..()
return

/datum/action/xeno_action/onclick/banish/proc/remove_banish(datum/hive_status/hive, name)
/datum/action/xeno_action/proc/remove_banish(datum/hive_status/hive, name)
hive.banished_ckeys.Remove(name)


// Readmission = un-banish

/datum/action/xeno_action/onclick/readmit/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/readmit()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_readmit = 100
if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_readmit))
return

var/choice = tgui_input_list(user_xeno, "Choose a xenomorph to readmit:", "Re-admit", user_xeno.hive.banished_ckeys, theme="hive_status")
Expand Down Expand Up @@ -470,7 +507,7 @@
target_xeno.lock_evolve = FALSE

user_xeno.hive.banished_ckeys.Remove(banished_name)
return ..()
return

/datum/action/xeno_action/onclick/eye
name = "Enter Eye Form"
Expand Down
Loading

0 comments on commit 2db3859

Please sign in to comment.