yeah this took way too long to do

This commit is contained in:
E
2022-01-10 23:51:03 +01:00
parent 03db13d879
commit b188540454
19 changed files with 381 additions and 4 deletions
+3 -2
View File
@@ -53,8 +53,9 @@
SCAVENGING_SPAWN_MOUSE = 10,
SCAVENGING_SPAWN_MICE = 5,
SCAVENGING_SPAWN_TOM = 1,
/obj/item/clothing/gloves/color/yellow = 0.5)
unique_loot = list(/obj/item/clothing/gloves/color/yellow = 5, SCAVENGING_SPAWN_TOM = 1)
/obj/item/clothing/gloves/color/yellow = 0.5,
/obj/item/book/granter/crafting_recipe/trash_cannon = 0.1)
unique_loot = list(/obj/item/clothing/gloves/color/yellow = 5, SCAVENGING_SPAWN_TOM = 1, /obj/item/book/granter/crafting_recipe/trash_cannon = 1)
/obj/structure/loot_pile/maint/ComponentInitialize()
var/static/safe_maint_items
@@ -6,6 +6,8 @@
mutantrace_variation = NONE
icon_state = "armorstripper"
item_state = "armorstripper"
mob_overlay_icon = 'modular_splurt/icons/mob/clothing/suit.dmi'
mutantrace_variation = NONE
armor = list("melee" = 15, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
dog_fashion = null
@@ -11,3 +11,29 @@
tools = list(TOOL_CROWBAR)
subcategory = CAT_MISCELLANEOUS
category = CAT_MISCELLANEOUS
/datum/crafting_recipe/trash_cannon
name = "Trash Cannon"
always_availible = FALSE
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER)
result = /obj/structure/cannon/trash
reqs = list(
/obj/item/melee/skateboard/improvised = 1,
/obj/item/tank/internals/oxygen = 1,
/datum/reagent/drug/maint/tar = 15,
/obj/item/restraints/handcuffs/cable = 1,
/obj/item/storage/toolbox = 1,
)
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/trashball
name = "Trashball"
always_availible = FALSE
result = /obj/item/stack/cannonball/trashball
reqs = list(
/obj/item/stack/sheet = 5,
/datum/reagent/consumable/space_cola = 10,
)
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -0,0 +1,14 @@
/obj/item/book/granter/crafting_recipe/trash_cannon
name = "diary of a demoted engineer"
desc = "A lost journal. The engineer seems very deranged about their demotion."
crafting_recipe_types = list(
/datum/crafting_recipe/trash_cannon,
/datum/crafting_recipe/trashball,
)
icon_state = "book1"
oneuse = TRUE
remarks = list("\"I'll show them! I'll build a CANNON!\"", "\"Gunpowder is ideal, but i'll have to improvise...\"", "\"I savor the look on the CE's face when I BLOW down the walls to engineering!\"", "\"If the supermatter gets loose from my rampage, so be it!\"", "\"I'VE GONE COMPLETELY MENTAL!\"")
/obj/item/book/granter/crafting_recipe/trash_cannon/recoil(mob/living/carbon/user)
to_chat(user, span_warning("The book turns to dust in your hands."))
qdel(src)
@@ -0,0 +1,138 @@
///how much projectile damage is lost when using a bad fuel
#define BAD_FUEL_DAMAGE_TAX 20
///extra chance it explodes upon firing
#define BAD_FUEL_EXPLODE_PROBABILTY 10
/obj/structure/cannon
name = "cannon"
desc = "Holemaker Deluxe: A sporty model with a good stop power. Any cannon enthusiast should be expected to start here."
density = TRUE
anchored = TRUE
icon = 'modular_splurt/icons/obj/structures/cannons.dmi'
icon_state = "falconet_patina"
max_integrity = 300
///whether the cannon can be unwrenched from the ground.
var/anchorable_cannon = TRUE
var/obj/item/stack/cannonball/loaded_cannonball = null
var/charge_ignited = FALSE
var/fire_delay = 15
var/charge_size = 15
var/fire_sound = 'modular_splurt/sound/weapons/gun/general/cannon.ogg'
/obj/structure/cannon/Initialize(mapload)
. = ..()
create_reagents(charge_size)
/obj/structure/cannon/examine(mob/user)
. = ..()
. += "<span class='notice'>[src] accepts gunpowder or welding fuel.</span>"
. += "<span class='warning'>Using welding fuel will weaken the force of the projectile fired.</span>"
/obj/structure/cannon/proc/fire()
for(var/mob/shaken_mob in urange(10, src))
if(shaken_mob.stat == CONSCIOUS)
shake_camera(shaken_mob, 3, 1)
playsound(src, fire_sound, 50, TRUE)
flick(icon_state+"_fire", src)
if(loaded_cannonball)
var/obj/item/projectile/fired_projectile = new loaded_cannonball.projectile_type(get_turf(src))
if(reagents.has_reagent(/datum/reagent/fuel, charge_size))
fired_projectile.damage = max(2, fired_projectile.damage - BAD_FUEL_DAMAGE_TAX)
QDEL_NULL(loaded_cannonball)
fired_projectile.firer = src
fired_projectile.fired_from = src
fired_projectile.fire(dir2angle(dir))
reagents.remove_all()
charge_ignited = FALSE
/obj/structure/cannon/attackby(obj/item/used_item, mob/user, params)
if(charge_ignited)
to_chat(user, "<span class='warning'>It's gonna fire!</span>")
return
var/ignition_message = used_item.ignition_effect(src, user)
if(istype(used_item, /obj/item/stack/cannonball))
if(loaded_cannonball)
to_chat(user, "<span class='warning'>[src] is already loaded!</span>")
else
var/obj/item/stack/cannonball/cannoneers_balls = used_item
loaded_cannonball = new cannoneers_balls.type(src, 1)
loaded_cannonball.copy_evidences(cannoneers_balls)
to_chat(user, "<span class='notice'>You load a [cannoneers_balls.singular_name] into \the [src].</span>")
cannoneers_balls.use(1, transfer = TRUE)
return
else if(ignition_message)
if(!reagents.has_reagent(/datum/reagent/blackpowder,charge_size) && !reagents.has_reagent(/datum/reagent/fuel,charge_size))
to_chat(user, "<span class='warning'>[src] needs [reagents.maximum_volume]u of charge!</span>")
return
visible_message(ignition_message)
log_game("Cannon fired by [key_name(user)] in [AREACOORD(src)]")
addtimer(CALLBACK(src, .proc/fire), fire_delay)
charge_ignited = TRUE
return
else if(istype(used_item, /obj/item/reagent_containers))
var/obj/item/reagent_containers/powder_keg = used_item
if(!(powder_keg.reagent_flags & OPENCONTAINER))
return ..()
if(istype(powder_keg, /obj/item/reagent_containers/rag))
return ..()
if(!powder_keg.reagents.total_volume)
to_chat(user, "<span class='warning'>[powder_keg] is empty!</span>")
return
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, "<span class='warning'[src] is full!</span>")
return
var/has_enough_gunpowder = powder_keg.reagents.has_reagent(/datum/reagent/blackpowder, charge_size)
var/has_enough_alt_fuel = powder_keg.reagents.has_reagent(/datum/reagent/fuel, charge_size)
if(!has_enough_gunpowder && !has_enough_alt_fuel)
to_chat(user, "<span class='warning'>[powder_keg] doesn't have at least 15u of fuel to fill [src]!</span>")
return
if(has_enough_gunpowder)
powder_keg.reagents.trans_id_to(src, /datum/reagent/blackpowder, amount = charge_size)
to_chat(user, "<span class='notice'>You load [src] with gunpowder.</span>")
return
if(has_enough_alt_fuel)
powder_keg.reagents.trans_id_to(src, /datum/reagent/fuel, amount = charge_size)
to_chat(user, "<span class='notice'>You load [src] with welding fuel.</span>")
return
if(anchorable_cannon && used_item.tool_behaviour == TOOL_WRENCH)
if(default_unfasten_wrench(user, used_item, time = 2 SECONDS))
return
..()
/obj/structure/cannon/trash
name = "trash cannon"
desc = "Okay, sure, you could call it a toolbox welded to an opened oxygen tank cabled to a skateboard, but it's a TRASH CANNON to us."
icon_state = "garbagegun"
anchored = FALSE
anchorable_cannon = FALSE
var/fires_before_deconstruction = 5
/obj/structure/cannon/trash/fire()
var/explode_chance = 10
var/used_alt_fuel = reagents.has_reagent(/datum/reagent/fuel, charge_size)
if(used_alt_fuel)
explode_chance += BAD_FUEL_EXPLODE_PROBABILTY
. = ..()
fires_before_deconstruction--
if(used_alt_fuel)
fires_before_deconstruction--
if(prob(explode_chance))
visible_message("<span class='warning'>[src] explodes!</span>")
explosion(src, heavy_impact_range = 1, light_impact_range = 5, flame_range = 5)
return
if(fires_before_deconstruction <= 0)
visible_message("<span class='warning'>[src] falls apart from operation!</span>")
qdel(src)
/obj/structure/cannon/trash/Destroy()
new /obj/item/stack/sheet/metal/five(src.loc)
new /obj/item/stack/rods(src.loc)
. = ..()
#undef BAD_FUEL_DAMAGE_TAX
#undef BAD_FUEL_EXPLODE_PROBABILTY
@@ -0,0 +1,70 @@
/obj/item/stack/cannonball
name = "cannonballs"
desc = "A stack of heavy plasteel cannonballs. Gunnery for the space age!"
icon = 'modular_splurt/icons/obj/stack_objects.dmi'
icon_state = "cannonballs"
max_amount = 14
singular_name = "cannonball"
merge_type = /obj/item/stack/cannonball
throwforce = 10
flags_1 = CONDUCT_1
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
resistance_flags = FIRE_PROOF
throw_speed = 5
throw_range = 3
///the type of projectile this type of cannonball item turns into.
var/obj/item/projectile/projectile_type = /obj/item/projectile/bullet/cannonball
/obj/item/stack/cannonball/update_icon_state()
. = ..()
icon_state = (amount == 1) ? "[initial(icon_state)]" : "[initial(icon_state)]_[min(amount, 14)]"
/obj/item/stack/cannonball/fourteen
amount = 14
/obj/item/stack/cannonball/shellball
name = "explosive shellballs"
singular_name = "explosive shellball"
desc = "An explosive anti-material and counter-battery projectile cannonball. Makes great work out of any wall, for easy entrances."
color = "#FF0000"
merge_type = /obj/item/stack/cannonball/shellball
projectile_type = /obj/item/projectile/bullet/cannonball/explosive
/obj/item/stack/cannonball/shellball/seven
amount = 7
/obj/item/stack/cannonball/shellball/fourteen
amount = 14
/obj/item/stack/cannonball/emp
name = "malfunction shots"
singular_name = "malfunction shot"
icon_state = "emp_cannonballs"
desc = "A shot filled with two chambers that combine on impact, creating a chemical EMP. What does any of that mean? Who knows. Modern piracy really lost its soul with these newfangled things."
max_amount = 4
merge_type = /obj/item/stack/cannonball/emp
projectile_type = /obj/item/projectile/bullet/cannonball/emp
/obj/item/stack/cannonball/the_big_one
name = "\"The Biggest Ones\""
singular_name = "\"The Biggest One\""
desc = "An insane amount of explosives jammed into a massive cannonball. The last cannonball you'll ever fire in a fight, mostly because there'll be nothing left to shoot at afterwards."
max_amount = 5
icon_state = "biggest_cannonballs"
merge_type = /obj/item/stack/cannonball/the_big_one
projectile_type = /obj/item/projectile/bullet/cannonball/biggest_one
/obj/item/stack/cannonball/the_big_one/five
amount = 5
/obj/item/stack/cannonball/trashball
name = "trashballs"
singular_name = "trashball"
desc = "A clump of tightly packed garbage. It'll work as a cannonball, but it may be unhealthy to actually put this in a real cannon."
max_amount = 4
icon_state = "trashballs"
merge_type = /obj/item/stack/cannonball/trashball
projectile_type = /obj/item/projectile/bullet/cannonball/trashball
/obj/item/stack/cannonball/trashball/four
amount = 4
@@ -0,0 +1,4 @@
/datum/spellbook_entry/summonsoap
name = "Summon Soap"
spell_type = /obj/effect/proc_holder/spell/targeted/conjure_item/soap
category = "Defensive"
@@ -182,3 +182,15 @@
else
message = "makes a very loud noise."
. = ..()
/datum/emote/living/monkeytwerk
key = "twerk"
key_third_person = "twerk"
message = "shakes it harder than James Russle himself!"
emote_type = EMOTE_AUDIBLE
muzzle_ignore = TRUE
restraint_check = FALSE
/datum/emote/living/monkeytwerk/run_emote(mob/user, params, type_override, intentional)
. = ..()
playsound(user, 'modular_splurt/sound/misc/monkey_twerk.ogg', 50, 1)
@@ -0,0 +1,66 @@
/obj/item/projectile/bullet/cannonball
name = "cannonball"
icon = 'modular_splurt/icons/obj/guns/projectiles.dmi'
icon_state = "cannonball"
damage = 110 //gets set to 100 before first mob impact.
movement_type = FLYING | UNSTOPPABLE
sharpness = NONE
wound_bonus = 0
dismemberment = 0
knockdown = 5 SECONDS
stutter = 10 SECONDS
embedding = null
hitsound = 'sound/effects/meteorimpact.ogg'
hitsound_wall = 'sound/weapons/sonic_jackhammer.ogg'
/obj/item/projectile/bullet/cannonball/prehit(atom/target)
damage -= 10
if(damage < 40)
movement_type &= ~(UNSTOPPABLE)
return ..()
/obj/item/projectile/bullet/cannonball/on_hit(atom/target, blocked = FALSE)
if(blocked == 100)
return ..()
if(isobj(target))
var/obj/hit_object = target
hit_object.take_damage(80, BRUTE, sound_effect = FALSE)
else if(isclosedturf(target))
damage -= max(damage - 30, 10) //lose extra momentum from busting through a wall
if(!isindestructiblewall(target))
var/turf/closed/hit_turf = target
hit_turf.ScrapeAway()
return ..()
/obj/item/projectile/bullet/cannonball/explosive
name = "explosive shell"
color = "#FF0000"
damage = 40 //set to 30 before first mob impact, but they're gonna be gibbed by the explosion
/obj/item/projectile/bullet/cannonball/explosive/prehit(atom/target)
. = ..()
explosion(target, devastation_range = 2, heavy_impact_range = 3, light_impact_range = 4)
/obj/item/projectile/bullet/cannonball/emp
name = "malfunction shot"
icon_state = "emp_cannonball"
damage = 15 //very low
/obj/item/projectile/bullet/cannonball/emp/prehit(atom/target)
. = ..()
empulse(src, 4, 10)
/obj/item/projectile/bullet/cannonball/biggest_one
name = "\"The Biggest One\""
icon_state = "biggest_one"
damage = 70 //low pierce
/obj/item/projectile/bullet/cannonball/biggest_one/prehit(atom/target)
. = ..()
if(damage < 50)
explosion(target, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE)
/obj/item/projectile/bullet/cannonball/trashball
name = "trashball"
icon_state = "trashball"
damage = 90 //better than the biggest one but no explosion, so kinda just a worse normal cannonball
@@ -0,0 +1,22 @@
/datum/reagent/drug/maint/tar
name = "Maintenance Tar"
description = "An unknown tar that you most likely gotten from an assistant, a bored chemist... or cooked yourself."
reagent_state = LIQUID
color = "#000000"
overdose_threshold = 30
/datum/reagent/drug/maint/tar/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
M.AdjustStun(-10 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.AdjustKnockdown(-10 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.AdjustUnconscious(-10 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.AdjustParalyzed(-10 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.AdjustImmobilized(-10 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
/datum/reagent/drug/maint/tar/overdose_process(mob/living/M, delta_time, times_fired)
. = ..()
M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
M.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
@@ -0,0 +1,7 @@
/datum/chemical_reaction/maint_tar1
results = list(/datum/reagent/toxin/acid = 1 ,/datum/reagent/drug/maint/tar = 3)
required_reagents = list(/datum/reagent/consumable/tea = 1, /datum/reagent/phenol = 1 , /datum/reagent/fuel = 1)
/datum/chemical_reaction/maint_tar2
results = list(/datum/reagent/toxin/acid = 1 ,/datum/reagent/drug/maint/tar = 3)
required_reagents = list(/datum/reagent/consumable/tea = 1, /datum/reagent/consumable/enzyme = 3 , /datum/reagent/fuel = 1)
@@ -0,0 +1,8 @@
/obj/effect/proc_holder/spell/targeted/conjure_item/soap
name = "Summon Soap"
desc = "For El Trollage. And maybe a bit of crew's anger too."
charge_max = 100
action_icon = 'icons/obj/items_and_weapons.dmi'
action_icon_state = "soapdeluxe"
item_type = /obj/item/soap/deluxe
delete_old = FALSE
Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.
Binary file not shown.
+9 -2
View File
@@ -4183,10 +4183,12 @@
#include "modular_splurt\code\game\areas\centcom.dm"
#include "modular_splurt\code\game\areas\shuttles.dm"
#include "modular_splurt\code\game\gamemodes\objectives.dm"
#include "modular_splurt\code\game\machinery\chem_alert.dm"
#include "modular_splurt\code\game\machinery\computer\slavery.dm"
#include "modular_splurt\code\game\object\effects\landmarks.dm"
#include "modular_splurt\code\game\object\items\cards_ids.dm"
#include "modular_splurt\code\game\object\items\cosmetics.dm"
#include "modular_splurt\code\game\object\items\granters.dm"
#include "modular_splurt\code\game\object\items\mesmetron.dm"
#include "modular_splurt\code\game\object\items\circuitboards\computer_circuitboards.dm"
#include "modular_splurt\code\game\object\items\devices\radio\electropack.dm"
@@ -4208,12 +4210,14 @@
#include "modular_splurt\code\game\object\structures\tables_racks.dm"
#include "modular_splurt\code\game\object\structures\bed_chairs\beds.dm"
#include "modular_splurt\code\game\object\structures\bed_chairs\chairs.dm"
#include "modular_splurt\code\game\object\structures\cannons\cannon.dm"
#include "modular_splurt\code\game\object\structures\cannons\cannonballs.dm"
#include "modular_splurt\code\game\object\structures\crates_lockers\closets\slaver.dm"
#include "modular_splurt\code\game\object\structures\crates_lockers\crates\wooden.dm"
#include "modular_splurt\code\game\turfs\simulated\floor\fancy_floor.dm"
#include "modular_splurt\code\game\turfs\simulated\wall\mineral_walls.dm"
#include "modular_splurt\code\modules\admin\verbs\discordbunker.dm"
#include "modular_splurt\code\modules\admin\playtimes.dm"
#include "modular_splurt\code\modules\admin\verbs\discordbunker.dm"
#include "modular_splurt\code\modules\admin\verbs\one_click_antag.dm"
#include "modular_splurt\code\modules\admin\verbs\randomverbs.dm"
#include "modular_splurt\code\modules\antagonists\ashwalker.dm"
@@ -4267,9 +4271,12 @@
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\ashwalker.dm"
#include "modular_splurt\code\modules\power\cell.dm"
#include "modular_splurt\code\modules\projectiles\guns\ballistic\automatic.dm"
#include "modular_splurt\code\modules\projectiles\projectile\bullets\cannonball.dm"
#include "modular_splurt\code\modules\reagents\chemistry\reagents\alcohol_reagents.dm"
#include "modular_splurt\code\modules\reagents\chemistry\reagents\cit_reagents.dm"
#include "modular_splurt\code\modules\reagents\chemistry\reagents\drug_reagents.dm"
#include "modular_splurt\code\modules\reagents\chemistry\reagents\food_reagents.dm"
#include "modular_splurt\code\modules\reagents\chemistry\recipes\drugs.dm"
#include "modular_splurt\code\modules\reagents\chemistry\recipes\lewd.dm"
#include "modular_splurt\code\modules\research\designs\biogenerator_designs.dm"
#include "modular_splurt\code\modules\research\designs\power_designs.dm"
@@ -4279,7 +4286,7 @@
#include "modular_splurt\code\modules\smithing\anvil.dm"
#include "modular_splurt\code\modules\smithing\finished_items.dm"
#include "modular_splurt\code\modules\smithing\smithed_items.dm"
#include "modular_splurt\code\modules\spell\spell_types\conjure.dm"
#include "modular_splurt\code\modules\vending\clothesmate.dm"
#include "tools\Redirector\textprocs.dm"
#include "modular_splurt\code\game\machinery\chem_alert.dm"
// END_INCLUDE