diff --git a/_maps/map_files/Aetherwhisp/Aetherwhisp1.dmm b/_maps/map_files/Aetherwhisp/Aetherwhisp1.dmm index 37630b2560d..94eeb5b48c0 100644 --- a/_maps/map_files/Aetherwhisp/Aetherwhisp1.dmm +++ b/_maps/map_files/Aetherwhisp/Aetherwhisp1.dmm @@ -9172,7 +9172,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ dir = 4 }, -/obj/machinery/squad_vendor{ +/obj/machinery/squad_vendor/solgov{ density = 0; pixel_y = -32 }, @@ -30379,7 +30379,7 @@ /turf/open/floor/carpet/ship/blue, /area/medical/patients_rooms/room_a) "tLG" = ( -/obj/machinery/squad_vendor{ +/obj/machinery/squad_vendor/solgov{ density = 0; pixel_y = 26 }, diff --git a/html/changelog.html b/html/changelog.html index f061afc6bb9..be0d603b91d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,24 @@ -->
+

12 July 2024

+

Bokkiewokkie updated:

+ +

Pockets-byte updated:

+ + +

05 July 2024

+

Pockets-byte updated:

+ +

28 June 2024

DeltaFire15 updated:

GoonStation 13 Development Team diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 0c8813592bb..1d672e37bbd 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -2095,3 +2095,13 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. DeltaFire15: - code_imp: Integrity_failure variable settings removed from all overmaps. (This does nothing) +2024-07-05: + Pockets-byte: + - rscadd: Added relayed (overmap) laser projectiles for boom +2024-07-12: + Bokkiewokkie: + - bugfix: Fixed shield sprites leaving doubles when the ship gets hit + Pockets-byte: + - rscadd: Added solgov variant of the squad vendor + - rscadd: Added new fighter sprite and fighter with shields + - rscadd: Added new fighter weapon and sprite diff --git a/html/changelogs/AutoChangeLog-pr-2675.yml b/html/changelogs/AutoChangeLog-pr-2675.yml new file mode 100644 index 00000000000..8f61b83472b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2675.yml @@ -0,0 +1,4 @@ +author: Kenionatus +delete-after: true +changes: + - refactor: projectiles_fx.dm should now be slightly more readable diff --git a/html/changelogs/AutoChangeLog-pr-2676.yml b/html/changelogs/AutoChangeLog-pr-2676.yml new file mode 100644 index 00000000000..84cf6376a2b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2676.yml @@ -0,0 +1,5 @@ +author: DeltaFire15 +delete-after: true +changes: + - code_imp: Slightly improved ship weapon machinery firing code (this has no gameplay + impact) diff --git a/html/changelogs/AutoChangeLog-pr-2678.yml b/html/changelogs/AutoChangeLog-pr-2678.yml new file mode 100644 index 00000000000..795237c0c6c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2678.yml @@ -0,0 +1,5 @@ +author: DeltaFire15 +delete-after: true +changes: + - bugfix: Non-/overmap overmap objects no longer runtime if newly added to a loaded + system. diff --git a/nsv13/code/datums/weapon_types.dm b/nsv13/code/datums/weapon_types.dm index 9ee7c1a34fd..4d4f32881ce 100644 --- a/nsv13/code/datums/weapon_types.dm +++ b/nsv13/code/datums/weapon_types.dm @@ -125,6 +125,7 @@ range_modifier = 5 overmap_firing_sounds = list('nsv13/sound/effects/fighters/autocannon.ogg') + //Energy Weapons /datum/ship_weapon/burst_phaser // Little red laser @@ -293,8 +294,7 @@ special_fire_proc = /obj/structure/overmap/proc/secondary_fire ai_fire_delay = 1 SECONDS -//You don't ever actually select this. Crew act as gunners. - +///You don't ever actually select this. Crew act as gunners. /datum/ship_weapon/gauss name = "Gauss guns" default_projectile_type = /obj/item/projectile/bullet/gauss_slug @@ -310,7 +310,7 @@ ai_fire_delay = 2 SECONDS allowed_roles = OVERMAP_USER_ROLE_SECONDARY_GUNNER -/datum/ship_weapon/pdc_mount // .50 cal flavored PDC bullets, which were previously just PDC flavored .50 cal turrets +/datum/ship_weapon/pdc_mount //! .50 cal flavored PDC bullets, which were previously just PDC flavored .50 cal turrets name = "PDC" default_projectile_type = /obj/item/projectile/bullet/pdc_round burst_size = 3 diff --git a/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm b/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm index dabaa7495f4..3072234350b 100644 --- a/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm +++ b/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm @@ -481,27 +481,8 @@ * Returns projectile if successfully fired, FALSE otherwise. */ /obj/machinery/ship_weapon/proc/fire(atom/target, shots = weapon_type.burst_size, manual = TRUE) + //Fun fact: set [waitfor, etc] is special, and is inherited by child procs even if they do not call parent! set waitfor = FALSE //As to not hold up any feedback messages. - - // Energy weapons fire behavior - if(istype(src, /obj/machinery/ship_weapon/energy)) // Now 100% more modular! - if(can_fire(target, shots)) - if(manual) - linked.last_fired = overlay - for(var/i = 0, i < shots, i++) - do_animation() - - local_fire() - overmap_fire(target) - charge -= charge_per_shot - - after_fire() - if(shots > 1) - sleep(weapon_type.burst_fire_delay) - return TRUE - return FALSE - - // Default weapons fire behavior if(can_fire(target, shots)) if(manual) linked.last_fired = overlay @@ -525,6 +506,23 @@ if(semi_auto) chamber(rapidfire = TRUE) after_fire() + . = TRUE //waitfor = FALSE early return returns the current . value at the time of sleeping, so this makes it return the correct value for burst fire weapons. + if(shots > 1) + sleep(weapon_type.burst_fire_delay) + return TRUE + return FALSE + +/obj/machinery/ship_weapon/energy/fire(atom/target, shots = weapon_type.burst_size, manual = TRUE) + if(can_fire(target, shots)) + if(manual) + linked.last_fired = overlay + for(var/i = 0, i < shots, i++) + do_animation() + local_fire() + overmap_fire(target) + charge -= charge_per_shot + after_fire() + . = TRUE if(shots > 1) sleep(weapon_type.burst_fire_delay) return TRUE diff --git a/nsv13/code/modules/munitions/ship_weapons/ballistic_weapons/broadsides.dm b/nsv13/code/modules/munitions/ship_weapons/ballistic_weapons/broadsides.dm index 33aae729fbe..3ee8b764174 100644 --- a/nsv13/code/modules/munitions/ship_weapons/ballistic_weapons/broadsides.dm +++ b/nsv13/code/modules/munitions/ship_weapons/ballistic_weapons/broadsides.dm @@ -129,8 +129,9 @@ animate_projectile(target) /obj/machinery/ship_weapon/broadside/fire(atom/target, shots = weapon_type.burst_size, manual = TRUE) - ..() - new /obj/effect/particle_effect/muzzleflash(loc) + . = ..() + if(.) + new /obj/effect/particle_effect/muzzleflash(loc) /obj/machinery/ship_weapon/broadside/local_fire(shots = weapon_type.burst_size, atom/target) //For the broadside cannons, we want to eject spent casings var/obj/R = new /obj/item/ship_weapon/parts/broadside_casing(get_ranged_target_turf(src, NORTH, 4)) //Right diff --git a/nsv13/code/modules/munitions/ship_weapons/hybrid_weapons/hybrid_railgun.dm b/nsv13/code/modules/munitions/ship_weapons/hybrid_weapons/hybrid_railgun.dm index 9636688c7f1..5e787963587 100644 --- a/nsv13/code/modules/munitions/ship_weapons/hybrid_weapons/hybrid_railgun.dm +++ b/nsv13/code/modules/munitions/ship_weapons/hybrid_weapons/hybrid_railgun.dm @@ -95,7 +95,6 @@ say("Cycling complete: Configuration - 400mm Slug Selected") /obj/machinery/ship_weapon/hybrid_rail/fire(atom/target, shots = weapon_type.burst_size, manual = TRUE) - set waitfor = FALSE //As to not hold up any feedback messages. if(can_fire(target, shots)) if(manual) linked.last_fired = overlay @@ -114,6 +113,8 @@ else state = STATE_NOTLOADED after_fire() + . = TRUE + return TRUE //I don't know why it didn't return true if successful but I assume someone just forgot. return FALSE /obj/machinery/ship_weapon/hybrid_rail/can_fire(target, shots = weapon_type.burst_size) //Target is for the passed target variable, Shots is for the burst fire size diff --git a/nsv13/code/modules/overmap/FTL/ftl_jump.dm b/nsv13/code/modules/overmap/FTL/ftl_jump.dm index b95ff58cb89..01b54322efe 100644 --- a/nsv13/code/modules/overmap/FTL/ftl_jump.dm +++ b/nsv13/code/modules/overmap/FTL/ftl_jump.dm @@ -39,14 +39,13 @@ OM.forceMove(exit) if(istype(OM, /obj/structure/overmap)) OM.current_system = src //Debugging purposes only - after_enter(OM) + after_enter(OM) /datum/star_system/proc/after_enter(obj/structure/overmap/OM) SEND_SIGNAL(src, COMSIG_STAR_SYSTEM_AFTER_ENTER, OM) if(desc) OM.relay(null, "

Now entering [name]...

") OM.relay(null, "[desc]") - //If we have an audio cue, ensure it doesn't overlap with a fleet's one... //End the round upon entering O45. if(system_traits & STARSYSTEM_END_ON_ENTER) if(OM.role == MAIN_OVERMAP) @@ -57,6 +56,7 @@ SSblackbox.record_feedback("text", "nsv_endings", 1, "succeeded") if(!length(audio_cues)) return FALSE + //If we have an audio cue, ensure it doesn't overlap with a fleet's one... for(var/datum/fleet/F as() in fleets) if(length(F.audio_cues) && F.alignment != OM.faction && !F.federation_check(OM)) return TRUE diff --git a/nsv13/code/modules/overmap/fighters/_fighters.dm b/nsv13/code/modules/overmap/fighters/_fighters.dm index 33eaf79f08b..b44e62bf267 100644 --- a/nsv13/code/modules/overmap/fighters/_fighters.dm +++ b/nsv13/code/modules/overmap/fighters/_fighters.dm @@ -403,6 +403,35 @@ Been a mess since 2018, we'll fix it someday (probably) /obj/item/fighter_component/battery, /obj/item/fighter_component/primary/cannon) +/obj/structure/overmap/small_craft/combat/solgov + name = "Peregrine class attack fighter" + desc = "A Peregrine class attack fighter, solgov's only premiere fighter, mounting minature capital grade phasers and a tiny shield generator." + icon = 'nsv13/icons/overmap/new/solgov/playablefighter.dmi' + armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 30, "bomb" = 30, "bio" = 100, "rad" = 90, "fire" = 90, "acid" = 80, "overmap_light" = 5, "overmap_medium" = 0, "overmap_heavy" = 10) + sprite_size = 32 + damage_states = FALSE //temp + max_integrity = 25 //shields. + max_angular_acceleration = 200 + speed_limit = 10 + pixel_w = -16 + pixel_z = -20 + components = list(/obj/item/fighter_component/fuel_tank, + /obj/item/fighter_component/avionics, + /obj/item/fighter_component/apu, + /obj/item/fighter_component/targeting_sensor, + /obj/item/fighter_component/engine, + /obj/item/fighter_component/countermeasure_dispenser, + /obj/item/fighter_component/oxygenator, + /obj/item/fighter_component/canopy, + /obj/item/fighter_component/docking_computer, + /obj/item/fighter_component/battery, + /obj/item/fighter_component/primary/laser) // no armor because >=3, you can still install it though because this thing is made of tissue paper + +/obj/structure/overmap/small_craft/combat/solgov/Initialize(mapload) + . = ..() + AddComponent(/datum/component/overmap_shields, 125, 125, 15) //inital integrity, max integrity, and recharge rate. bound to change most likely + + /obj/structure/overmap/small_craft/escapepod name = "Escape Pod" desc = "An escape pod launched from a space faring vessel. It only has very limited thrusters and is thus very slow." @@ -508,6 +537,7 @@ Been a mess since 2018, we'll fix it someday (probably) add_overlay(canopy) update_visuals() + /obj/structure/overmap/small_craft/attackby(obj/item/W, mob/user, params) if(operators && LAZYFIND(operators, user)) to_chat(user, "You can't reach [src]'s exterior from in here.") @@ -1468,7 +1498,7 @@ As a rule of thumb, primaries are small guns that take ammo boxes, secondaries a Utility modules can be either one of these types, just ensure you set its slot to HARDPOINT_SLOT_UTILITY */ /obj/item/fighter_component/primary - name = "\improper Fuck you" + name = "\improper primary weapon" slot = HARDPOINT_SLOT_PRIMARY fire_mode = FIRE_MODE_ANTI_AIR var/overmap_select_sound = 'nsv13/sound/effects/ship/pdc_start.ogg' @@ -1590,8 +1620,55 @@ Utility modules can be either one of these types, just ensure you set its slot t burst_size = 3 fire_delay = 0.5 SECONDS +/obj/item/fighter_component/primary/laser + name = "Stinger Class Phaser Cannon" + icon_state = "lasercannon" + weight = 3 //it's a laser. it's light, but the gun is fuckhueg + accepted_ammo = null + overmap_select_sound = 'nsv13/sound/effects/ship/phaser_adjust.ogg' + overmap_firing_sounds = list('nsv13/sound/effects/ship/burst_phaser.ogg', 'nsv13/sound/effects/ship/burst_phaser2.ogg') + burst_size = 3 + fire_delay = 10 SECONDS + var/projectile = /obj/item/projectile/beam/laser/phaser + var/charge_to_fire = 2000 // this is probably not final. needs to be a good balance between having an actual mainship weapon on a fighter, and firing one shot every minute because one shot depletes your entire battery + +/obj/item/fighter_component/primary/laser/get_ammo() + var/obj/structure/overmap/small_craft/F = loc + if(!istype(F)) + return FALSE + var/obj/item/fighter_component/battery/B = F.loadout.get_slot(HARDPOINT_SLOT_BATTERY) + if(!istype(B)) + return 0 + return B.charge + +/obj/item/fighter_component/primary/laser/get_max_ammo() + var/obj/structure/overmap/small_craft/F = loc + if(!istype(F)) + return FALSE + var/obj/item/fighter_component/battery/B = F.loadout.get_slot(HARDPOINT_SLOT_BATTERY) + if(!istype(B)) + return 0 + return B.maxcharge + +/obj/item/fighter_component/primary/laser/fire(obj/structure/overmap/target) + var/obj/structure/overmap/small_craft/F = loc + if(!istype(F)) + return FALSE + var/obj/item/fighter_component/battery/B = F.loadout.get_slot(HARDPOINT_SLOT_BATTERY) + + if(B.charge < charge_to_fire) + F.relay('sound/weapons/gun_dry_fire.ogg') + return FALSE + + var/datum/ship_weapon/SW = F.weapon_types[fire_mode] + SW.default_projectile_type = projectile + SW.fire_fx_only(target, lateral = TRUE) + B.charge -= charge_to_fire + return TRUE + + /obj/item/fighter_component/secondary - name = "Fuck you" + name = "secondary weapon" slot = HARDPOINT_SLOT_SECONDARY fire_mode = FIRE_MODE_TORPEDO var/overmap_firing_sounds = list( diff --git a/nsv13/code/modules/overmap/shieldgen.dm b/nsv13/code/modules/overmap/shieldgen.dm index d0cd127dd03..55376675734 100644 --- a/nsv13/code/modules/overmap/shieldgen.dm +++ b/nsv13/code/modules/overmap/shieldgen.dm @@ -338,31 +338,38 @@ /obj/effect/temp_visual/overmap_shield_hit name = "Shield hit" - icon = 'nsv13/icons/overmap/shieldhit.dmi'; + icon = 'nsv13/icons/overmap/shieldhit.dmi' icon_state = "shieldhit" duration = 0.75 SECONDS layer = ABOVE_MOB_LAYER+0.1 animate_movement = NO_STEPS // Override the inbuilt movement engine to avoid bouncing - appearance_flags = TILE_BOUND | PIXEL_SCALE + vis_flags = VIS_INHERIT_ID var/obj/structure/overmap/overmap /obj/effect/temp_visual/overmap_shield_hit/Initialize(mapload, obj/structure/overmap/OM) . = ..() //Scale up the shield hit icon to roughly fit the overmap ship that owns us. - if(!OM) + if(!OM || !istype(OM)) + log_runtime("Shield hit effect was made with no ship!") return INITIALIZE_HINT_QDEL - overmap = OM var/matrix/desired = new() - var/icon/I = icon(overmap.icon) + var/icon/I = icon(OM.icon) var/resize_x = I.Width()/96 var/resize_y = I.Height()/96 desired.Scale(resize_x,resize_y) - desired.Turn(overmap.angle) transform = desired - overmap.vis_contents += src + //Don't even ask, this makes it fit on the ship sprite properly most of the time + if(I.Width() <= 48) + pixel_x = -24 + pixel_y = -24 + else + pixel_x += round(I.Width()/16, 1) + pixel_y += pixel_x*round(I.Height()/32, 1) + OM.overlays.Add(src) //Otherwise it won't animate with the ship nicely + overmap = OM /obj/effect/temp_visual/overmap_shield_hit/Destroy() - overmap?.vis_contents -= src + overmap?.overlays.Remove(src) overmap = null return ..() diff --git a/nsv13/code/modules/overmap/weapons/damage.dm b/nsv13/code/modules/overmap/weapons/damage.dm index ba4c36a96a5..ca785286b9d 100644 --- a/nsv13/code/modules/overmap/weapons/damage.dm +++ b/nsv13/code/modules/overmap/weapons/damage.dm @@ -23,7 +23,7 @@ Bullet reactions if(shield_result) var/damage_sound = pick('nsv13/sound/effects/ship/damage/shield_hit.ogg', 'nsv13/sound/effects/ship/damage/shield_hit2.ogg') if(!impact_sound_cooldown) - new /obj/effect/temp_visual/overmap_shield_hit(get_turf(src), src) + new /obj/effect/temp_visual/overmap_shield_hit(src, src) relay(damage_sound) if(P.damage >= 15) //Flak begone shake_everyone(5) diff --git a/nsv13/code/modules/overmap/weapons/projectiles_fx.dm b/nsv13/code/modules/overmap/weapons/projectiles_fx.dm index 22e55fbace2..96b18231f3c 100644 --- a/nsv13/code/modules/overmap/weapons/projectiles_fx.dm +++ b/nsv13/code/modules/overmap/weapons/projectiles_fx.dm @@ -3,6 +3,9 @@ /obj/item/projectile/proc/spec_overmap_hit(obj/structure/overmap/target) return +/obj/item/projectile/bullet/proc/stop_homing() + homing = FALSE + /** Misc projectile types, effects, think of this as the special FX file. @@ -22,7 +25,7 @@ Misc projectile types, effects, think of this as the special FX file. flag = "overmap_heavy" spread = 5 -/obj/item/projectile/bullet/mac_relayed_round //Projectile relayed by all default MAC shells on overmap hit. No difference for AP / others as their values don't really matter on z level. +/obj/item/projectile/bullet/mac_relayed_round //!Projectile relayed by all default MAC shells on overmap hit. No difference for AP / others as their values don't really matter on z level. icon = 'nsv13/icons/obj/projectiles_nsv.dmi' icon_state = "railgun" name = "artillery round" @@ -66,9 +69,6 @@ Misc projectile types, effects, think of this as the special FX file. else addtimer(CALLBACK(src, PROC_REF(stop_homing)), 0.2 SECONDS) //Because all deck guns apparently have slight homing. -/obj/item/projectile/bullet/proc/stop_homing() - homing = FALSE - /obj/item/projectile/bullet/mac_round/ap damage = 250 armour_penetration = 70 @@ -82,32 +82,32 @@ Misc projectile types, effects, think of this as the special FX file. homing_benefit_time = 2.5 SECONDS homing_turn_speed = 30 -//Improvised ammunition, does terrible damage but is cheap to produce +///Improvised ammunition, does terrible damage but is cheap to produce /obj/item/projectile/bullet/mac_round/cannonshot name = "cannonball" damage = 350 icon_state = "cannonshot" flag = "overmap_medium" -//You somehow loaded a magic entrapment ball into a cannon. This is your reward. +///You somehow loaded a magic entrapment ball into a cannon. This is your reward. /obj/item/projectile/bullet/mac_round/cannonshot/admin damage = 600 speed = 3 flag = "overmap_heavy" -#define DIRTY_SHELL_TURF_SLUDGE_PROB 70 //Chance for sludge to spawn on a turf within the sludge range of the detonation turf. Detonation turf always gets an epicenter sludge. -#define DIRTY_SHELL_SLUDGE_RANGE 3 //Un-random sludge event radius (for the shell detonating) -#define DIRTY_SHELL_PELLET_PROB 80 //Chance for a pellet per tile from the outer circle -#define DIRTY_SHELL_PELLET_RANGE 6 //Picks all turfs on the other circle of this range and uses them as possible targets for pellets. +#define DIRTY_SHELL_TURF_SLUDGE_PROB 70 //!Chance for sludge to spawn on a turf within the sludge range of the detonation turf. Detonation turf always gets an epicenter sludge. +#define DIRTY_SHELL_SLUDGE_RANGE 3 //!Un-random sludge event radius (for the shell detonating) +#define DIRTY_SHELL_PELLET_PROB 80 //!Chance for a pellet per tile from the outer circle +#define DIRTY_SHELL_PELLET_RANGE 6 //!Picks all turfs on the other circle of this range and uses them as possible targets for pellets. -//Dirty shell: Stage 1 - overmap projectile +///Dirty shell: Stage 1 - overmap projectile /obj/item/projectile/bullet/mac_round/dirty damage = 150 name = "dirty artillery round" relay_projectile_type = /obj/item/projectile/bullet/delayed_prime/dirty_shell_stage_two -//Delayed priming projectile parent type - useful for a few different kinds of projectiles so why not. +///Delayed priming projectile parent type - useful for a few different kinds of projectiles so why not. /obj/item/projectile/bullet/delayed_prime icon = 'nsv13/icons/obj/projectiles_nsv.dmi' icon_state = "railgun" @@ -117,7 +117,7 @@ Misc projectile types, effects, think of this as the special FX file. movement_type = FLYING projectile_piercing = ALL damage = 45 //It's on a z now, lets not instakill people / objects this happens to hit. - var/penetration_fuze = 1 //Will pen through this many things considered valid for reducing this before arming. Can overpenetrate if it happens to pen through windows or other things with not enough resistance. + var/penetration_fuze = 1 //!Will pen through this many things considered valid for reducing this before arming. Can overpenetrate if it happens to pen through windows or other things with not enough resistance. /obj/item/projectile/bullet/delayed_prime/on_hit(atom/target, blocked) . = ..() @@ -140,7 +140,7 @@ Misc projectile types, effects, think of this as the special FX file. /obj/item/projectile/bullet/delayed_prime/proc/release_payload(atom/detonation_location) return -//Dirty shell: Stage 2 - z level sludge payload projectile +///Dirty shell: Stage 2 - z level sludge payload projectile /obj/item/projectile/bullet/delayed_prime/dirty_shell_stage_two name = "dirty artillery round" icon_state = "railgun" @@ -186,7 +186,7 @@ Misc projectile types, effects, think of this as the special FX file. P.fire() -//Dirty Shell: Stage 3 - spread of irradiating pellets +///Dirty Shell: Stage 3 - spread of irradiating pellets /obj/item/projectile/energy/nuclear_particle/dirty_shell_stage_three irradiate = 300 //Less radiation than the "true" gumballs name = "irradiated pellet" @@ -354,6 +354,57 @@ Misc projectile types, effects, think of this as the special FX file. can_home = TRUE armor = list("overmap_light" = 10, "overmap_medium" = 0, "overmap_heavy" = 0) +/obj/item/projectile/guided_munition/Initialize(mapload) + . = ..() + addtimer(CALLBACK(src, PROC_REF(windup)), 1 SECONDS) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + +/obj/item/projectile/guided_munition/proc/windup() + valid_angle = 360 //Torpedoes "wind up" to hit their target + homing_turn_speed *= 5 + homing_turn_speed = CLAMP(homing_turn_speed, 0, 360) + sleep(clearance_time) //Let it get clear of the sender. + valid_angle = initial(valid_angle) + homing_turn_speed = initial(homing_turn_speed) + +//Corvid or someone please refactor this to be less messy. +/obj/item/projectile/guided_munition/on_hit(atom/target, blocked = FALSE) + ..() + if(!check_faction(target)) + return FALSE //Faction checking for overmaps. We're gonna just cut off real early and save some math if the IFF doesn't check out. + if(isovermap(target)) //Were we to explode on an actual overmap, this would oneshot the ship as it's a powerful explosion. + return BULLET_ACT_HIT + var/obj/item/projectile/P = target //This is hacky, refactor check_faction to unify both of these. I'm bodging it for now. + if(isprojectile(target) && P.faction != faction && !P.nodamage) //Because we could be in the same faction and collide with another bullet. Let's not blow ourselves up ok? + if(obj_integrity <= P.damage) //Tank the hit, take some damage + qdel(P) + explode() + return BULLET_ACT_HIT + else + take_damage(P.damage) + qdel(P) + return FALSE //Didn't take the hit + if(!isprojectile(target)) //This is lazy as shit but is necessary to prevent explosions triggering on the overmap when two bullets collide. Fix this shit please. + if(isliving(target)) + var/mob/living/living_target = target + if(living_target.client) + living_target.client.give_award(/datum/award/achievement/misc/torp_directhit, living_target) + detonate(target) + else + return FALSE + return BULLET_ACT_HIT + +/obj/item/projectile/guided_munition/bullet_act(obj/item/projectile/P) + . = ..() + on_hit(P) + +/obj/item/projectile/guided_munition/proc/detonate(atom/target) + explosion(target, 2, 4, 4) + /obj/item/projectile/guided_munition/torpedo icon_state = "torpedo" name = "plasma torpedo" @@ -404,6 +455,13 @@ Misc projectile types, effects, think of this as the special FX file. /obj/item/projectile/guided_munition/torpedo/hellfire/player_version damage = 300 //A bit less initial damage to compensate for the /guaranteed/ hellburn effect dealing hefty damage. +/obj/item/projectile/guided_munition/torpedo/hellfire/spec_overmap_hit(obj/structure/overmap/target) + if(length(target.occupying_levels)) + return //Ship with internal zs, let them burn + if(target.ai_controlled || istype(target, /obj/structure/overmap/small_craft)) + target.hullburn += 60 //hullburn DoT for AIs. Player Fighters get it too, did you expect to just eat one of these? + target.hullburn_power = max(target.hullburn_power, 6) + /obj/item/projectile/guided_munition/torpedo/plushtide name = "emotional support torpedo" damage = 0 @@ -425,85 +483,12 @@ Misc projectile types, effects, think of this as the special FX file. var/ai_disruption = 30 var/ai_disruption_cap = 120 -//Player-accessible version of the above. Weaker because reverse engineered ~~and balance~~ +///Player-accessible version of parent. Weaker because reverse engineered ~~and balance~~ /obj/item/projectile/guided_munition/torpedo/disruptor/prototype name = "prototype disruption torpedo" ai_disruption = 15 //Do you like stuncombat? Well the AI doesn't. ai_disruption_cap = 30 //Very effective if applied spaced out over time against damage-resistant ships. -//What you get from an incomplete torpedo. -/obj/item/projectile/guided_munition/torpedo/dud - icon_state = "torpedo_dud" - damage = 0 - can_home = FALSE - -/obj/item/projectile/guided_munition/Initialize(mapload) - . = ..() - addtimer(CALLBACK(src, PROC_REF(windup)), 1 SECONDS) - - var/static/list/loc_connections = list( - COMSIG_ATOM_ENTERED = PROC_REF(on_entered), - ) - AddElement(/datum/element/connect_loc, loc_connections) - -/obj/item/projectile/guided_munition/proc/windup() - valid_angle = 360 //Torpedoes "wind up" to hit their target - homing_turn_speed *= 5 - homing_turn_speed = CLAMP(homing_turn_speed, 0, 360) - sleep(clearance_time) //Let it get clear of the sender. - valid_angle = initial(valid_angle) - homing_turn_speed = initial(homing_turn_speed) - -/obj/item/projectile/guided_munition/missile - name = "\improper Triton cruise missile" - icon = 'nsv13/icons/obj/projectiles_nsv.dmi' - icon_state = "conventional_missile" - speed = 1 - damage = 175 - valid_angle = 120 - homing_turn_speed = 25 - range = 250 - flag = "overmap_medium" - impact_effect_type = /obj/effect/temp_visual/impact_effect/torpedo - spread = 5 //Helps them not get insta-bonked when launching - -/obj/effect/temp_visual/overmap_explosion - icon = 'nsv13/goonstation/icons/hugeexplosion.dmi' - icon_state = "explosion" - duration = 10 - -/obj/effect/temp_visual/overmap_explosion/alt - icon = 'nsv13/goonstation/icons/hugeexplosion2.dmi' - icon_state = "explosion" - duration = 10 - -//Corvid or someone please refactor this to be less messy. -/obj/item/projectile/guided_munition/on_hit(atom/target, blocked = FALSE) - ..() - if(!check_faction(target)) - return FALSE //Nsv13 - faction checking for overmaps. We're gonna just cut off real early and save some math if the IFF doesn't check out. - if(isovermap(target)) //Were we to explode on an actual overmap, this would oneshot the ship as it's a powerful explosion. - return BULLET_ACT_HIT - var/obj/item/projectile/P = target //This is hacky, refactor check_faction to unify both of these. I'm bodging it for now. - if(isprojectile(target) && P.faction != faction && !P.nodamage) //Because we could be in the same faction and collide with another bullet. Let's not blow ourselves up ok? - if(obj_integrity <= P.damage) //Tank the hit, take some damage - qdel(P) - explode() - return BULLET_ACT_HIT - else - take_damage(P.damage) - qdel(P) - return FALSE //Didn't take the hit - if(!isprojectile(target)) //This is lazy as shit but is necessary to prevent explosions triggering on the overmap when two bullets collide. Fix this shit please. - if(isliving(target)) - var/mob/living/living_target = target - if(living_target.client) - living_target.client.give_award(/datum/award/achievement/misc/torp_directhit, living_target) - detonate(target) - else - return FALSE - return BULLET_ACT_HIT - /obj/item/projectile/guided_munition/torpedo/disruptor/spec_overmap_hit(obj/structure/overmap/target) if(length(target.occupying_levels)) return //Detonate is gonna handle this for us. @@ -520,25 +505,29 @@ Misc projectile types, effects, think of this as the special FX file. //Neither of these? I guess just some visibility penalty it is. target.add_sensor_profile_penalty(150, 10 SECONDS) -/obj/item/projectile/guided_munition/torpedo/hellfire/spec_overmap_hit(obj/structure/overmap/target) - if(length(target.occupying_levels)) - return //Ship with internal zs, let them burn - if(target.ai_controlled || istype(target, /obj/structure/overmap/small_craft)) - target.hullburn += 60 //hullburn DoT for AIs. Player Fighters get it too, did you expect to just eat one of these? - target.hullburn_power = max(target.hullburn_power, 6) - - -/obj/item/projectile/guided_munition/bullet_act(obj/item/projectile/P) - . = ..() - on_hit(P) - -/obj/item/projectile/guided_munition/proc/detonate(atom/target) - explosion(target, 2, 4, 4) - /obj/item/projectile/guided_munition/torpedo/disruptor/detonate(atom/target) empulse(get_turf(target), 5, 12) //annoying emp. explosion(target, 0, 2, 6, 4) //but only a light explosion. +///What you get from an incomplete torpedo. +/obj/item/projectile/guided_munition/torpedo/dud + icon_state = "torpedo_dud" + damage = 0 + can_home = FALSE + +/obj/item/projectile/guided_munition/missile + name = "\improper Triton cruise missile" + icon = 'nsv13/icons/obj/projectiles_nsv.dmi' + icon_state = "conventional_missile" + speed = 1 + damage = 175 + valid_angle = 120 + homing_turn_speed = 25 + range = 250 + flag = "overmap_medium" + impact_effect_type = /obj/effect/temp_visual/impact_effect/torpedo + spread = 5 //!Helps them not get insta-bonked when launching + /* Sleep for now, we'll see you again /obj/item/projectile/guided_munition/torpedo/nuclear/detonate(atom/target) var/obj/structure/overmap/OM = target.get_overmap() //What if I just.......... @@ -550,6 +539,7 @@ Misc projectile types, effects, think of this as the special FX file. return BULLET_ACT_HIT */ + /obj/item/projectile/bullet/pdc_round icon_state = "pdc" name = "PDC round" @@ -569,12 +559,31 @@ Misc projectile types, effects, think of this as the special FX file. tracer_type = /obj/effect/projectile/tracer/disabler muzzle_type = /obj/effect/projectile/muzzle/disabler impact_type = /obj/effect/projectile/impact/disabler + relay_projectile_type = /obj/item/projectile/beam/laser/heavylaser/phaser/relayed + +/obj/item/projectile/beam/laser/heavylaser/phaser/relayed + projectile_piercing = PASSGLASS|PASSGRILLE|PASSTABLE + flag = "laser" + damage = 80 //let's give them a chance to live, instead of smiting them with the full wraith of the Enterprise + +/obj/item/projectile/beam/laser/heavylaser/phaser/relayed/on_hit(atom/target, blocked) + . = ..() + explosion(get_turf(target), 0, 2, 4, 6, flame_range = 4) //I halved the BSA's explosion, and then poked it some myself - big boom /obj/item/projectile/beam/laser/phaser/pd name = "point defense phaser" damage = 60 // Doesn't scale with power input, but fires fairly quickly especially when upgraded icon = 'nsv13/icons/obj/projectiles_nsv.dmi' icon_state = "pdphaser" + relay_projectile_type = /obj/item/projectile/beam/laser/phaser/pd/relayed + +/obj/item/projectile/beam/laser/phaser/pd/relayed + projectile_piercing = PASSGLASS|PASSGRILLE|PASSTABLE + flag = "laser" + +/obj/item/projectile/beam/laser/phaser/pd/relayed/on_hit(atom/target, blocked) + . = ..() + explosion(get_turf(target), 0, 0, 2, 3, flame_range = 2) //weak, but still damaging... I hope /obj/item/projectile/beam/laser/point_defense name = "laser pointer" @@ -587,11 +596,25 @@ Misc projectile types, effects, think of this as the special FX file. tracer_type = /obj/effect/projectile/tracer/xray muzzle_type = /obj/effect/projectile/muzzle/xray impact_type = /obj/effect/projectile/impact/xray + relay_projectile_type = /obj/item/projectile/beam/laser/point_defense/relayed -//Designed to be spammed like crazy, but can be buffed to do extremely solid damage when you overclock the guns. +/obj/item/projectile/beam/laser/point_defense/relayed + projectile_piercing = PASSGLASS|PASSGRILLE|PASSTABLE + flag = "laser" + +///Designed to be spammed like crazy, but can be buffed to do extremely solid damage when you overclock the guns. /obj/item/projectile/beam/laser/phaser damage = 30 flag = "overmap_medium" + relay_projectile_type = /obj/item/projectile/beam/laser/phaser/relayed + +/obj/item/projectile/beam/laser/phaser/relayed + projectile_piercing = PASSGLASS|PASSGRILLE|PASSTABLE + flag = "laser" + +/obj/item/projectile/beam/laser/phaser/relayed/on_hit(atom/target, blocked) + . = ..() + explosion(get_turf(target), 0, 0, 2, 3, flame_range = 2) //weak, but still damaging... I hope /obj/item/projectile/bullet/broadside name = "broadside shell" @@ -610,3 +633,13 @@ Misc projectile types, effects, think of this as the special FX file. damage = 175 armour_penetration = 10 speed = 0.4 + +/obj/effect/temp_visual/overmap_explosion + icon = 'nsv13/goonstation/icons/hugeexplosion.dmi' + icon_state = "explosion" + duration = 10 + +/obj/effect/temp_visual/overmap_explosion/alt + icon = 'nsv13/goonstation/icons/hugeexplosion2.dmi' + icon_state = "explosion" + duration = 10 diff --git a/nsv13/code/modules/squads/squad_vendor.dm b/nsv13/code/modules/squads/squad_vendor.dm index 7a1fde00433..876db0d0166 100644 --- a/nsv13/code/modules/squads/squad_vendor.dm +++ b/nsv13/code/modules/squads/squad_vendor.dm @@ -21,7 +21,7 @@ new /obj/item/crowbar(src) /obj/machinery/squad_vendor - name = "Squad Vendor" + name = "squad Vendor" desc = "A machine which can dispense equipment to squads. Kits taken from this machine must be returned before you can get a new one." icon = 'nsv13/icons/obj/computers.dmi' icon_state = "squadvend" @@ -32,13 +32,17 @@ resistance_flags = ACID_PROOF | FIRE_PROOF req_one_access = list(ACCESS_HOP, ACCESS_HOS) var/static/list/loans_info = list() - var/static/list/loadouts = list() + var/loadout_type = /datum/squad_loadout/nt + var/list/loadouts = list() var/static/list/requires_weapons_clearance = list(/obj/item/ammo_box, /obj/item/gun) +/obj/machinery/squad_vendor/solgov + loadout_type = /datum/squad_loadout/solgov + /obj/machinery/squad_vendor/Initialize(mapload) . = ..() if(!length(loadouts)) - for(var/instance in subtypesof(/datum/squad_loadout)) + for(var/instance in subtypesof(loadout_type)) loadouts += new instance /obj/machinery/squad_vendor/attackby(obj/item/I, mob/living/user, params) @@ -176,43 +180,87 @@ var/leader_only = FALSE var/list/allowed_roles = SQUAD_TYPES -/datum/squad_loadout/marine +/datum/squad_loadout/nt/marine name = "Squad Marine (Standard)" -/datum/squad_loadout/space +/datum/squad_loadout/nt/space name = "Squad Marine (Hazardous Environment)" desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." items = list(/obj/item/clothing/under/ship/marine, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) -/datum/squad_loadout/leader +/datum/squad_loadout/nt/leader name = "Squad Leader (Standard)" desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." items = list(/obj/item/clothing/under/ship/marine, /obj/item/megaphone, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad/leader, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) leader_only = TRUE -/datum/squad_loadout/leader/space +/datum/squad_loadout/nt/leader/space name = "Squad Leader (Hazardous Environment)" desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." items = list(/obj/item/clothing/under/ship/marine, /obj/item/megaphone, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) -/datum/squad_loadout/engineer +/datum/squad_loadout/nt/engineer name = "Squad Engineer (Standard)" desc = "This kit contains everything a squad engineer needs to effect repairs in non-hazardous environments. Recommended only for planetside operations where speed is necessary." items = list(/obj/item/clothing/under/ship/marine/engineer, /obj/item/storage/belt/utility/full, /obj/item/storage/box/damage_control, /obj/item/clothing/glasses/welding, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) allowed_roles = list(DC_SQUAD, MUNITIONS_SUPPORT, COMBAT_AIR_PATROL) -/datum/squad_loadout/engineer/space +/datum/squad_loadout/nt/engineer/space name = "Squad Engineer (Hazardous Environment)" desc = "For hazardous, low pressure environments. This kit contains everything a squad engineer needs to effect repairs in the heat of battle, no matter the condition of the ship they're on." items = list(/obj/item/clothing/under/ship/marine/engineer, /obj/item/storage/belt/utility/full, /obj/item/storage/box/damage_control, /obj/item/clothing/glasses/welding, /obj/item/clothing/suit/ship/squad/space,/obj/item/clothing/head/helmet/ship/squad/space, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) -/datum/squad_loadout/medic +/datum/squad_loadout/nt/medic name = "Squad Medic (Standard)" desc = "A kit containing battlefield medical equipment and light squad armour." items = list(/obj/item/clothing/under/ship/marine/medic, /obj/item/storage/firstaid/regular, /obj/item/reagent_containers/medspray/sterilizine, /obj/item/reagent_containers/medspray/styptic, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) allowed_roles = list(MEDICAL_SQUAD) -/datum/squad_loadout/medic/space +/datum/squad_loadout/nt/medic/space name = "Squad Medic (Hazardous Environment)" desc = "For hazardous, low pressure environments. This kit contains specialist equipment for treating common battlefield injuries." items = list(/obj/item/clothing/under/ship/marine/medic, /obj/item/storage/firstaid/regular, /obj/item/reagent_containers/medspray/sterilizine, /obj/item/reagent_containers/medspray/styptic, /obj/item/storage/firstaid/o2, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/ammo_box/magazine/glock/lethal, /obj/item/gun/ballistic/automatic/pistol/glock) + + + +/datum/squad_loadout/solgov/marine + name = "Squad Marine (Standard)" + items = list(/obj/item/clothing/under/ship/marine, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad, /obj/item/gun/energy/laser/retro/old) + +/datum/squad_loadout/solgov/space + name = "Squad Marine (Hazardous Environment)" + desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." + items = list(/obj/item/clothing/under/ship/marine, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/gun/energy/laser/retro/old) + +/datum/squad_loadout/solgov/leader + name = "Squad Leader (Standard)" + desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." + items = list(/obj/item/clothing/under/ship/marine, /obj/item/megaphone, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad/leader, /obj/item/gun/energy/laser/retro/old) + leader_only = TRUE + +/datum/squad_loadout/solgov/leader/space + name = "Squad Leader (Hazardous Environment)" + desc = "For hazardous, low pressure environments. This kit contains a reinforced skinsuit which, while slow, will protect marines from the elements." + items = list(/obj/item/clothing/under/ship/marine, /obj/item/megaphone, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/gun/energy/laser/retro/old) + +/datum/squad_loadout/solgov/engineer + name = "Squad Engineer (Standard)" + desc = "This kit contains everything a squad engineer needs to effect repairs in non-hazardous environments. Recommended only for planetside operations where speed is necessary." + items = list(/obj/item/clothing/under/ship/marine/engineer, /obj/item/storage/belt/utility/full, /obj/item/storage/box/damage_control, /obj/item/clothing/glasses/welding, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad, /obj/item/gun/energy/laser/retro/old) + allowed_roles = list(DC_SQUAD, MUNITIONS_SUPPORT, COMBAT_AIR_PATROL) + +/datum/squad_loadout/solgov/engineer/space + name = "Squad Engineer (Hazardous Environment)" + desc = "For hazardous, low pressure environments. This kit contains everything a squad engineer needs to effect repairs in the heat of battle, no matter the condition of the ship they're on." + items = list(/obj/item/clothing/under/ship/marine/engineer, /obj/item/storage/belt/utility/full, /obj/item/storage/box/damage_control, /obj/item/clothing/glasses/welding, /obj/item/clothing/suit/ship/squad/space,/obj/item/clothing/head/helmet/ship/squad/space, /obj/item/gun/energy/laser/retro/old) + +/datum/squad_loadout/solgov/medic + name = "Squad Medic (Standard)" + desc = "A kit containing battlefield medical equipment and light squad armour." + items = list(/obj/item/clothing/under/ship/marine/medic, /obj/item/storage/firstaid/regular, /obj/item/reagent_containers/medspray/sterilizine, /obj/item/reagent_containers/medspray/styptic, /obj/item/clothing/suit/ship/squad, /obj/item/clothing/head/helmet/ship/squad, /obj/item/gun/energy/laser/retro/old) + allowed_roles = list(MEDICAL_SQUAD) + +/datum/squad_loadout/solgov/medic/space + name = "Squad Medic (Hazardous Environment)" + desc = "For hazardous, low pressure environments. This kit contains specialist equipment for treating common battlefield injuries." + items = list(/obj/item/clothing/under/ship/marine/medic, /obj/item/storage/firstaid/regular, /obj/item/reagent_containers/medspray/sterilizine, /obj/item/reagent_containers/medspray/styptic, /obj/item/storage/firstaid/o2, /obj/item/clothing/suit/ship/squad/space, /obj/item/clothing/head/helmet/ship/squad/space, /obj/item/gun/energy/laser/retro/old) diff --git a/nsv13/icons/obj/fighter_components.dmi b/nsv13/icons/obj/fighter_components.dmi index 14e7fdfe0cb..19ab2d06627 100644 Binary files a/nsv13/icons/obj/fighter_components.dmi and b/nsv13/icons/obj/fighter_components.dmi differ diff --git a/nsv13/icons/overmap/new/solgov/fighter.dmi b/nsv13/icons/overmap/new/solgov/fighter.dmi index 1f9d3d8685e..7bddad47bf3 100644 Binary files a/nsv13/icons/overmap/new/solgov/fighter.dmi and b/nsv13/icons/overmap/new/solgov/fighter.dmi differ diff --git a/nsv13/icons/overmap/new/solgov/playablefighter.dmi b/nsv13/icons/overmap/new/solgov/playablefighter.dmi new file mode 100644 index 00000000000..e2778f38bdf Binary files /dev/null and b/nsv13/icons/overmap/new/solgov/playablefighter.dmi differ