-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* seems fine? * bullet stuff!
- Loading branch information
Showing
12 changed files
with
79 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 49 additions & 27 deletions
76
code/modules/mob/living/carbon/superior_animal/roach/types/benzin.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,65 @@ | ||
/mob/living/carbon/superior_animal/roach/benzin | ||
/mob/living/carbon/superior_animal/roach/nitro | ||
name = "Benzin Roach" | ||
desc = "A monstrous, dog-sized cockroach. This one smells like welding fuel and will likely explode when shot!." | ||
desc = "A monstrous, dog-sized cockroach. This one smells like welding fuel. Likely to explode when shot!" | ||
icon_state = "boomroach" | ||
turns_per_move = 4 | ||
maxHealth = 25 | ||
health = 25 | ||
melee_damage_upper = 3 | ||
meat_type = /obj/item/reagent_containers/food/snacks/meat/roachmeat/benzin | ||
meat_type = /obj/item/reagent_containers/food/snacks/meat/roachmeat/nitro | ||
meat_amount = 3 | ||
var/fuel_amount = 50 | ||
var/leaking = FALSE | ||
var/impending_explosion = FALSE | ||
|
||
contaminant_immunity = TRUE | ||
toxin_immune = TRUE | ||
var/exploded = FALSE | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/Initialize(mapload) | ||
. = ..() | ||
set_light(0.5) | ||
reagents.maximum_volume = 40 | ||
/mob/living/carbon/superior_animal/roach/nitro/ex_act() | ||
if(!exploded) | ||
kerplode() | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/Life() | ||
if(reagents.total_volume < reagents.maximum_volume) | ||
reagents.add_reagent("fuel", 1) | ||
/mob/living/carbon/superior_animal/roach/nitro/Move() | ||
..() | ||
if(leaking && (fuel_amount > 0.5)) | ||
var/transfer = fuel_amount * 0.2 | ||
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, transfer, 1) | ||
fuel_amount -= transfer | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/bullet_act(obj/item/projectile/P, def_zone) | ||
. = ..() | ||
if(prob(80) && (!(P.testing))) | ||
explosion(src.loc, 0,1,2) //slightly weaker radius than a plasma spider, still hurts like a bitch | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/attackby(obj/item/I, mob/living/user, params) | ||
if(user.a_intent == I_HELP && istool(I)) | ||
var/obj/item/tool/T = I | ||
if(T.use_fuel_cost) | ||
return FALSE | ||
/mob/living/carbon/superior_animal/roach/nitro/bullet_act(obj/item/projectile/slug) | ||
if(!exploded && slug.ignition_source) | ||
kerplode() | ||
else | ||
. = ..() | ||
|
||
/mob/living/carbon/superior_animal/roach/nitro/fire_act() | ||
if(!exploded && !impending_explosion) | ||
impending_explosion = TRUE | ||
spawn(rand(30,150)) | ||
kerplode() | ||
. = ..() | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/fire_act() | ||
if(stat != DEAD) | ||
explosion(src.loc, 0,1,2) //slightly weaker radius than a plasma spider, still hurts like a bitch | ||
/mob/living/carbon/superior_animal/roach/nitro/proc/kerplode() | ||
impending_explosion = TRUE | ||
if(!exploded) | ||
exploded = TRUE | ||
visible_message(SPAN_DANGER("\the [src] violently explodes!")) | ||
explosion(src.loc, -1, -1, 2, 3) //explosion weaker than a welding tank | ||
gib() | ||
|
||
/mob/living/carbon/superior_animal/roach/nitro/attackby(obj/item/I) | ||
if(isflamesource(I)) | ||
kerplode() | ||
else | ||
if(I.sharp) | ||
leaking = TRUE | ||
. = ..() | ||
|
||
/mob/living/carbon/superior_animal/roach/benzin/death() | ||
/mob/living/carbon/superior_animal/roach/nitro/death() | ||
. = ..() | ||
new /obj/effect/decal/cleanable/liquid_fuel(loc, reagents.get_reagent_amount("fuel"), 1) | ||
if(src) | ||
if(!exploded && !leaking) | ||
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, max((fuel_amount - 5),2), 1) //A welderfuel tank below 50 units makes the explosion above (with no flash). | ||
leaking = TRUE | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters