Skip to content

Commit

Permalink
Yet more throw fixes (#13962)
Browse files Browse the repository at this point in the history
* probably xeno throw fix

* kill unused var

* razorwire fix
  • Loading branch information
Lumipharon authored Sep 18, 2023
1 parent a68335c commit 6895a8b
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 33 deletions.
8 changes: 0 additions & 8 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,6 @@ GLOBAL_LIST_INIT(xenoupgradetiers, list(XENO_UPGRADE_BASETYPE, XENO_UPGRADE_INVA
#define CHARGE_ON 2
#define CHARGE_MAX 3

// Xeno charge types
#define CHARGE_TYPE_SMALL 1
#define CHARGE_TYPE_MEDIUM 2
#define CHARGE_TYPE_LARGE 3
#define CHARGE_TYPE_MASSIVE 4

//Hunter Defines
#define HUNTER_STEALTH_COOLDOWN 50 //5 seconds
#define HUNTER_STEALTH_WALK_PLASMADRAIN 2
Expand Down Expand Up @@ -582,9 +576,7 @@ GLOBAL_LIST_INIT(xenoupgradetiers, list(XENO_UPGRADE_BASETYPE, XENO_UPGRADE_INVA

//Ravager defines:
#define RAV_CHARGESPEED 2
#define RAV_CHARGESTRENGTH 2
#define RAV_CHARGEDISTANCE 4
#define RAV_CHARGE_TYPE 3

#define RAVAGER_ENDURE_DURATION 10 SECONDS
#define RAVAGER_ENDURE_DURATION_WARNING 0.7
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/razorwire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@


/obj/structure/razorwire/CanAllowThrough(atom/movable/mover, turf/target)
if(mover.throwing && ismob(mover))
if(mover.throwing && ismob(mover) && !(mover.pass_flags & PASS_DEFENSIVE_STRUCTURE))
return FALSE

return ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
primordial_message = "Nothing can escape our toxic cloud!"
upgrade = XENO_UPGRADE_PRIMO

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_MEDIUM

// *** Abilities *** ///
actions = list(
/datum/action/xeno_action/xeno_resting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
// *** Defense *** //
soft_armor = list(MELEE = 30, BULLET = 30, LASER = 25, ENERGY = 20, BOMB = 20, BIO = 20, FIRE = 30, ACID = 20)

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_LARGE

minimap_icon = "xenominion"

actions = list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
// *** Defense *** //
soft_armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 40, BOMB = 20, BIO = 30, FIRE = 40, ACID = 30)

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_LARGE

// *** Minimap Icon *** //
minimap_icon = "defender"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
soft_armor = list(MELEE = 55, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 0, BIO = 20, FIRE = 30, ACID = 20)

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_MEDIUM
pounce_delay = 10.0 SECONDS

// *** Stealth ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
upgrade = XENO_UPGRADE_PRIMO
primordial_message = "The strongest of acids flows through our veins, let's reduce them to dust."

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_LARGE

actions = list(
/datum/action/xeno_action/xeno_resting,
/datum/action/xeno_action/watch_xeno,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
// *** Defense *** //
soft_armor = list(MELEE = 50, BULLET = 55, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 40, FIRE = 70, ACID = 40)

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_LARGE

// *** Minimap Icon *** //
minimap_icon = "ravager"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
soft_armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 5, FIRE = 19, ACID = 5)

// *** Ranged Attack *** //
charge_type = CHARGE_TYPE_SMALL
pounce_delay = 13 SECONDS

// *** Minimap Icon *** //
Expand Down
2 changes: 0 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@
///list of datum projectile types the xeno can use.
var/list/spit_types

///numerical type of charge for a xenomorph caste
var/charge_type = 0
///amount of time between pounce ability uses
var/pounce_delay = 4 SECONDS

Expand Down
8 changes: 3 additions & 5 deletions code/modules/mob/living/carbon/xenomorph/xenoprocs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,8 @@
/mob/living/carbon/xenomorph/throw_impact(atom/hit_atom, speed)
set waitfor = FALSE

// TODO: remove charge_type check
if(!xeno_caste.charge_type || stat || (!throwing && usedPounce)) //No charge type, unconscious or dead, or not throwing but used pounce.
..() //Do the parent instead.
return FALSE
if(stat || !usedPounce)
return ..()

if(isobj(hit_atom)) //Deal with smacking into dense objects. This overwrites normal throw code.
var/obj/O = hit_atom
Expand All @@ -267,7 +265,7 @@
return FALSE
stop_throw() //Resert throwing since something was hit.
return TRUE
stop_throw() //Resert throwing since something was hit.

return ..() //Do the parent otherwise, for turfs.

/mob/living/carbon/xenomorph/proc/toggle_nightvision(new_lighting_alpha)
Expand Down

0 comments on commit 6895a8b

Please sign in to comment.