Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relayed BSA is more 'fun' and also random fixes. #2628

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _maps/map_files/Eclipse/Eclipse1.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
destination.dna.features = features.Copy()
destination.dna.real_name = real_name
destination.dna.temporary_mutations = temporary_mutations.Copy()
destination.flavour_text = destination.client.prefs.active_character.flavor_text //Update the flavor_text to use new dna text //NSV13
destination.flavour_text = holder ? holder.flavour_text : "" //Update the flavor_text to use new dna text //NSV13
if(transfer_SE)
destination.dna.mutation_index = mutation_index
destination.dna.default_mutation_genes = default_mutation_genes
Expand Down
20 changes: 19 additions & 1 deletion code/game/turfs/closed/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

var/list/dent_decals

//NSV13 - avoid runtiming from doafter stack.
///Is this wall currently being interacted with (cleaned / deconned / etc)
var/interacting = FALSE
//NSV13 end

/turf/closed/wall/Initialize(mapload)
. = ..()
if(is_station_level(z))
Expand Down Expand Up @@ -175,13 +180,26 @@
if(!isturf(user.loc))
return //can't do this stuff whilst inside objects and such


if(interacting) //NSV 13 - the doafters in here can change the type of the turf, which WILL runtime if you let them stack.
return

add_fingerprint(user)

var/turf/T = user.loc //get user's location for delay checks

//NSV13 - src type changes which must be accounted for here.
interacting = TRUE
//the istype cascade has been spread among various procs for easy overriding
if(try_clean(W, user, T) || try_wallmount(W, user, T) || try_decon(W, user, T) || try_destroy(W, user, T))
if(try_clean(W, user, T) || try_wallmount(W, user, T))
interacting = FALSE
return
if(try_decon(W, user, T) || try_destroy(W, user, T))
if(istype(src, /turf/closed/wall)) //I hate this.
interacting = FALSE //Set interacting only if the wall is still a wall.
return
interacting = FALSE
//NSV13 end.

return ..()

Expand Down
7 changes: 6 additions & 1 deletion code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,12 @@
if(clipboard.pen)
holding = clipboard.pen

data["held_item_details"] = holding?.get_writing_implement_details()
//NSV13 - Old part here runtimes.
if(holding)
data["held_item_details"] = holding.get_writing_implement_details()
else
data["held_item_details"] = null //Overriding old data, otherwise data would not get changed.
//NSV13 end.
Bokkiewokkie marked this conversation as resolved.
Show resolved Hide resolved

// If the paper is on an unwritable noticeboard, clear the held item details so it's read-only.
if(istype(loc, /obj/structure/noticeboard))
Expand Down
11 changes: 11 additions & 0 deletions nsv13/code/modules/munitions/ship_weapons/energy_weapons/bsa.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
impact_type = /obj/effect/projectile/impact/bsa
movement_type = FLYING
projectile_piercing = ALL
relay_projectile_type = /obj/item/projectile/beam/laser/heavylaser/bsa/relayed

/obj/effect/projectile/muzzle/bsa
alpha = 0
Expand All @@ -216,3 +217,13 @@
/obj/effect/projectile/impact/bsa
name = "bsa"
icon_state = "bsa_impact"

/obj/item/projectile/beam/laser/heavylaser/bsa/relayed
projectile_piercing = PASSGLASS|PASSGRILLE|PASSTABLE

/obj/item/projectile/beam/laser/heavylaser/bsa/relayed/on_hit(atom/target, blocked)
. = ..()
if(isliving(target))
var/mob/living/goodbye = target
goodbye.dust(TRUE, FALSE)
explosion(get_turf(target), 6, 8, 9, 12, ignorecap = TRUE, flame_range = 6) //I have to keep myself from letting it just truncate ships because thats a bit annoying to fix for the receiving side, even if accurate to appearance.
16 changes: 8 additions & 8 deletions nsv13/code/modules/overmap/traders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,24 +284,24 @@
stonks -= x
qdel(x)
sold_items = list()
while(iter)
var/fails = 0
while(iter && fails < 10)
iter--
var/datum/trader_item/item = new
var/obj/item/a_gift/anything/generator = new
var/initialtype = generator.get_gift_type()
var/obj/item/soldtype = new initialtype
if(!soldtype) //spawned something that deleted itself, try again
log_runtime("Randy failed to spawn [initialtype]!")
var/obj/item/initialtype = generator.get_gift_type() //If you put any non-items in here I will haunt you.
if(!initialtype) //failed to select something, try again
log_runtime("Randy failed to select an item!")
qdel(item)
iter++
fails++ //DO NOT loop forever.
continue
item.unlock_path = initialtype
item.name = soldtype.name
item.desc = soldtype.desc
item.name = initial(initialtype.name)
item.desc = initial(initialtype.desc)
item.price = rand(1000, 100000000)
item.stock = rand(1, 5)
item.owner = src
qdel(soldtype)
sold_items += item

var/datum/trader_item/yellow_pages/pages = new
Expand Down
2 changes: 1 addition & 1 deletion nsv13/code/modules/power/stormdrive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ Control Rods
var/datum/gas_mixture/air1 = airs[1]
var/nucleium_power_reduction = 0

var/fuel_check = ((air1.get_moles(GAS_PLASMA) + air1.get_moles(GAS_CONSTRICTED_PLASMA) + air1.get_moles(GAS_TRITIUM)) / air1.total_moles()) * 100
var/fuel_check = air1.total_moles() <= 0 ? 0 : ((air1.get_moles(GAS_PLASMA) + air1.get_moles(GAS_CONSTRICTED_PLASMA) + air1.get_moles(GAS_TRITIUM)) / air1.total_moles()) * 100
if(air1.total_moles() >= reaction_rate && fuel_check >= 12.5) //1:8 ratio
var/datum/gas_mixture/reaction_chamber_gases = air1.remove(reaction_rate)

Expand Down
14 changes: 8 additions & 6 deletions nsv13/code/modules/squads/squad_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ GLOBAL_DATUM_INIT(squad_manager, /datum/squad_manager, new)

// Try to find a squad that's not already tasked that can do the job
/datum/squad_manager/proc/assign_squad(role)
var/datum/squad/assigned = role_squad_map[role]
if(assigned && length(assigned.members))
assigned.lowpop_retasked = TRUE
assigned.access_enabled = TRUE // They won't be much help without this
return

var/list/assigned_list = role_squad_map[role]
if(length(assigned_list))
for(var/datum/squad/assigned in assigned_list)
if(!istype(assigned) || !length(assigned.members))
continue
assigned.lowpop_retasked = TRUE
assigned.access_enabled = TRUE // They won't be much help without this
return
//Prefer DC squads by default. Make sure there are people in them and we haven't tasked them already
var/list/possible = role_squad_map[DC_SQUAD]
for(var/datum/squad/S in possible)
Expand Down
Loading