Skip to content

Commit

Permalink
Merge branch 'SkyRatMaster' into upstreammaint
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueStationAI committed Jul 26, 2024
2 parents cb632f1 + 8887384 commit 90dec48
Show file tree
Hide file tree
Showing 59 changed files with 1,247 additions and 1,071 deletions.
661 changes: 333 additions & 328 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm

Large diffs are not rendered by default.

795 changes: 399 additions & 396 deletions _maps/map_files/tramstation/tramstation.dmm

Large diffs are not rendered by default.

346 changes: 173 additions & 173 deletions _maps/map_files/wawastation/wawastation.dmm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "7.1.2"
#define TGS_DMAPI_VERSION "7.1.3"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down
3 changes: 1 addition & 2 deletions code/__HELPERS/matrices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
decompose_matrix.rotation = arctan(cossine, sine) * flip_sign

/matrix/proc/TurnTo(old_angle, new_angle)
. = new_angle - old_angle
Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT
return Turn(new_angle - old_angle) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT

/**
* Shear the transform on either or both axes.
Expand Down
6 changes: 6 additions & 0 deletions code/controllers/subsystem/polling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ SUBSYSTEM_DEF(polling)
return
for(var/mob/dead/observer/ghost_player in GLOB.player_list)
candidates += ghost_player

#ifdef TESTING
for(var/mob/dude in GLOB.player_list)
candidates |= dude
#endif

return poll_candidates(question, role, check_jobban, poll_time, ignore_category, flashwindow, candidates, alert_pic, jump_target, role_name_text, custom_response_messages, start_signed_up, amount_to_pick, chat_text_border_icon, announce_chosen)

/datum/controller/subsystem/polling/proc/poll_ghosts_for_target(
Expand Down
14 changes: 8 additions & 6 deletions code/datums/components/spirit_holding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
///bool on if this component is currently polling for observers to inhabit the item
var/attempting_awakening = FALSE
/// Allows renaming the bound item
var/allow_renaming
var/allow_renaming = TRUE
/// Allows channeling
var/allow_channeling
var/allow_channeling = TRUE
/// Allows exorcism
var/allow_exorcism
///mob contained in the item.
Expand Down Expand Up @@ -92,7 +92,7 @@
to_chat(ghost, span_userdanger("The new vessel for your spirit has been destroyed! You remain an unbound ghost."))
return

bind_the_soule(ghost, awakener)
bind_the_soule(ghost.mind, awakener)

attempting_awakening = FALSE

Expand All @@ -119,11 +119,13 @@
* Arguments:
* * awakener: user who interacted with the blade
*/
/datum/component/spirit_holding/proc/custom_name(mob/awakener)
/datum/component/spirit_holding/proc/custom_name(mob/awakener, iteration = 1)
if(iteration > 5)
return "indecision" // The spirit of indecision
var/chosen_name = sanitize_name(tgui_input_text(bound_spirit, "What are you named?", "Spectral Nomenclature", max_length = MAX_NAME_LEN))
if(!chosen_name) // with the way that sanitize_name works, it'll actually send the error message to the awakener as well.
to_chat(awakener, span_warning("Your blade did not select a valid name! Please wait as they try again.")) // more verbose than what sanitize_name might pass in its error message
return custom_name(awakener)
to_chat(awakener, span_warning("Your blade did not select a valid name! Please wait as they try again.")) // more verbose than what sanitize_name might pass in it's error message
return custom_name(awakener, iteration++)
return chosen_name

///signal fired from a mob moving inside the parent
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/vacuum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
if (!isitem(potential_item))
continue
var/obj/item/item = potential_item
if (vacuum_bag?.attackby(item))
if (vacuum_bag.atom_storage.attempt_insert(item))
sucked = TRUE // track that we successfully sucked up something

// if we did indeed suck up something, play a funny noise
Expand Down
9 changes: 7 additions & 2 deletions code/datums/diseases/advance/symptoms/oxygen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
stage_speed = -3
transmittable = -4
level = 6
base_message_chance = 5
base_message_chance = 3
symptom_delay_min = 1
symptom_delay_max = 1
required_organ = ORGAN_SLOT_LUNGS
Expand All @@ -40,6 +40,8 @@
if(4, 5)
infected_mob.losebreath = max(0, infected_mob.losebreath - 4)
infected_mob.adjustOxyLoss(-7)
if(prob(base_message_chance))
to_chat(infected_mob, span_notice("You realize you haven't been breathing."))
if(regenerate_blood && infected_mob.blood_volume < BLOOD_VOLUME_NORMAL)
infected_mob.blood_volume += 1
else
Expand All @@ -54,9 +56,12 @@
var/mob/living/carbon/infected_mob = advanced_disease.affected_mob
if(advanced_disease.stage >= 4)
ADD_TRAIT(infected_mob, TRAIT_NOBREATH, DISEASE_TRAIT)
to_chat(infected_mob, span_notice(pick("You realize you haven't been breathing.", "You don't feel the need to breathe.")))
if(advanced_disease.stage == 4)
to_chat(infected_mob, span_notice("You don't feel the need to breathe anymore."))
else
REMOVE_TRAIT(infected_mob, TRAIT_NOBREATH, DISEASE_TRAIT)
if(advanced_disease.stage_peaked && advanced_disease.stage == 3)
to_chat(infected_mob, span_notice("You feel the need to breathe again."))
return TRUE

/datum/symptom/oxygen/End(datum/disease/advance/advanced_disease)
Expand Down
9 changes: 5 additions & 4 deletions code/datums/elements/door_pryer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
attacker.balloon_alert(attacker, "busy!")
return COMPONENT_CANCEL_ATTACK_CHAIN

if (airlock_target.locked || airlock_target.welded || airlock_target.seal)
if (!attacker.combat_mode)
airlock_target.balloon_alert(attacker, "it's sealed!")
return COMPONENT_CANCEL_ATTACK_CHAIN
if (attacker.combat_mode)
return // Attack the door

if (airlock_target.locked || airlock_target.welded || airlock_target.seal)
airlock_target.balloon_alert(attacker, "it's sealed!")
return COMPONENT_CANCEL_ATTACK_CHAIN

INVOKE_ASYNC(src, PROC_REF(open_door), attacker, airlock_target)
return COMPONENT_CANCEL_ATTACK_CHAIN

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1478,9 +1478,9 @@
return
if(!density) //Already open
return ..()
if(user.combat_mode)
return ..()
if(locked || welded || seal) //Extremely generic, as aliens only understand the basics of how airlocks work.
if(user.combat_mode)
return ..()
to_chat(user, span_warning("[src] refuses to budge!"))
return
add_fingerprint(user)
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@
ignore_alarms = FALSE
if(!alarm_type || active) // If we have no alarm type, or are already active, go away
return
// Do we even care about temperature?
for(var/area/place in affecting_areas)
if(!place.fire_detect) // If any area is set to disable detection
return
// Otherwise, reactivate ourselves
start_activation_process(alarm_type)

Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@
my_area.fire_detect = !my_area.fire_detect
for(var/obj/machinery/firealarm/fire_panel in my_area.firealarms)
fire_panel.update_icon()
// Used to force all the firelocks to update, if the zone is not manually activated
if (my_area.fault_status != AREA_FAULT_MANUAL)
reset() // Don't send user to prevent double balloon_alert() and the action is already logged in this proc.
if (user)
balloon_alert(user, "thermal sensors [my_area.fire_detect ? "enabled" : "disabled"]")
user.log_message("[ my_area.fire_detect ? "enabled" : "disabled" ] firelock sensors using [src].", LOG_GAME)
Expand Down
18 changes: 0 additions & 18 deletions code/game/objects/items/nitrium_crystals.dm

This file was deleted.

19 changes: 5 additions & 14 deletions code/game/objects/items/robot/items/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
stored.forceMove(get_turf(usr))
return

/obj/item/borg/apparatus/get_proxy_attacker_for(atom/target, mob/user)
if(stored) // Use the stored item if available
return stored
return ..()

/**
* Attack_self will pass for the stored item.
*/
Expand All @@ -57,10 +62,6 @@
return CLICK_ACTION_SUCCESS

/obj/item/borg/apparatus/pre_attack(atom/atom, mob/living/user, params)
if(stored)
stored.melee_attack_chain(user, atom, params)
return TRUE

if(istype(atom.loc, /mob/living/silicon/robot) || istype(atom.loc, /obj/item/robot_model) || HAS_TRAIT(atom, TRAIT_NODROP))
return ..() // Borgs should not be grabbing their own modules

Expand Down Expand Up @@ -132,7 +133,6 @@
else
. += "Nothing."

. += span_notice(" <i>Right-clicking</i> will splash the beaker on the ground.")
. += span_notice(" <i>Alt-click</i> will drop the currently stored beaker. ")

/obj/item/borg/apparatus/beaker/update_overlays()
Expand All @@ -151,15 +151,6 @@
arm.pixel_y = arm.pixel_y - 5
. += arm

/// Secondary attack spills the content of the beaker.
/obj/item/borg/apparatus/beaker/pre_attack_secondary(atom/target, mob/living/silicon/robot/user)
var/obj/item/reagent_containers/stored_beaker = stored
if(!stored_beaker)
return ..()
stored_beaker.SplashReagents(drop_location(user))
loc.visible_message(span_notice("[user] spills the contents of [stored_beaker] all over the ground."))
return ..()

/obj/item/borg/apparatus/beaker/extra
name = "secondary beaker storage apparatus"
desc = "A supplementary beaker storage apparatus."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,22 @@
if(uses <= 0)
qdel(src)
return ITEM_INTERACT_SUCCESS

/obj/item/nitrium_crystal
desc = "A weird brown crystal, it smokes when broken"
name = "nitrium crystal"
icon = 'icons/obj/pipes_n_cables/atmos.dmi'
icon_state = "nitrium_crystal"
var/cloud_size = 1

/obj/item/nitrium_crystal/attack_self(mob/user)
. = ..()
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new
var/turf/location = get_turf(src)
create_reagents(5)
reagents.add_reagent(/datum/reagent/nitrium_low_metabolization, 3)
reagents.add_reagent(/datum/reagent/nitrium_high_metabolization, 2)
smoke.attach(location)
smoke.set_up(cloud_size, holder = src, location = location, carry = reagents, silent = TRUE)
smoke.start()
qdel(src)
43 changes: 2 additions & 41 deletions code/modules/cargo/bounties/assistant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
/datum/bounty/item/assistant/fish
name = "Fish"
description = "We need fish to populate our aquariums with. Fishes that are dead or bought from cargo will only be paid half as much."
reward = CARGO_CRATE_VALUE * 9
reward = CARGO_CRATE_VALUE * 9.5
required_count = 4
wanted_types = list(/obj/item/fish = TRUE, /obj/item/storage/fish_case = TRUE)
///the penalty for shipping dead/bought fish, which can subtract up to half the reward in total.
Expand Down Expand Up @@ -249,7 +249,7 @@

///A subtype of the fish bounty that requires fish with a specific fluid type
/datum/bounty/item/assistant/fish/fluid
reward = CARGO_CRATE_VALUE * 11
reward = CARGO_CRATE_VALUE * 12
///The required fluid type of the fish for it to be shipped
var/fluid_type

Expand All @@ -261,42 +261,3 @@

/datum/bounty/item/assistant/fish/fluid/can_ship_fish(obj/item/fish/fishie)
return compatible_fluid_type(fishie.required_fluid_type, fluid_type)

///A subtype of the fish bounty that requires specific fish types. The higher their rarity, the better the pay.
/datum/bounty/item/assistant/fish/specific
description = "Our prestigious fish collection is currently lacking a few specific species. Fishes that are dead or bought from cargo will only be paid half as much."
reward = CARGO_CRATE_VALUE * 16
required_count = 3
wanted_types = list(/obj/item/storage/fish_case = TRUE)

/datum/bounty/item/assistant/fish/specific/New()
var/static/list/choosable_fishes
if(isnull(choosable_fishes))
choosable_fishes = list()
for(var/obj/item/fish/prototype as anything in subtypesof(/obj/item/fish))
if(initial(prototype.experisci_scannable) && initial(prototype.show_in_catalog))
choosable_fishes += prototype

var/list/fishes_copylist = choosable_fishes.Copy()
///Used to calculate the extra reward
var/total_rarity = 0
var/list/name_list = list()
var/num_paths = rand(2,3)
for(var/i in 1 to num_paths)
var/obj/item/fish/chosen_path = pick_n_take(fishes_copylist)
wanted_types[chosen_path] = TRUE
name_list += initial(chosen_path.name)
total_rarity += initial(chosen_path.random_case_rarity) / num_paths
name = english_list(name_list)

switch(total_rarity)
if(FISH_RARITY_NOPE to FISH_RARITY_GOOD_LUCK_FINDING_THIS)
reward += CARGO_CRATE_VALUE * 14
if(FISH_RARITY_GOOD_LUCK_FINDING_THIS to FISH_RARITY_VERY_RARE)
reward += CARGO_CRATE_VALUE * 6.5
if(FISH_RARITY_VERY_RARE to FISH_RARITY_RARE)
reward += CARGO_CRATE_VALUE * 3
if(FISH_RARITY_RARE to FISH_RARITY_BASIC-1)
reward += CARGO_CRATE_VALUE * 1

..()
10 changes: 10 additions & 0 deletions code/modules/cargo/exports/fish.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/datum/export/fish
cost = 50
unit_name = "fish"
export_types = list(/obj/item/fish)

/datum/export/fish/get_cost(obj/item/fish/fish, apply_elastic)
var/elastic_cost = ..()
var/elastic_percent = elastic_cost / init_cost
var/size_weight_exponentation = (fish.size * fish.weight * 0.01)^0.85
return round(elastic_cost + size_weight_exponentation * elastic_percent)
2 changes: 1 addition & 1 deletion code/modules/events/disease_outbreak.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
var/list/afflicted = list()

/datum/round_event/disease_outbreak/announce(fake)
if(isnull(illness_type))
if(!illness_type)
var/list/virus_candidates = list(
/datum/disease/anxiety,
/datum/disease/beesease,
Expand Down
4 changes: 2 additions & 2 deletions code/modules/events/supermatter_surge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@
end_when = rand(SURGE_DURATION_MIN, SURGE_DURATION_MAX)

/datum/round_event/supermatter_surge/announce(fake)
priority_announce("The Crystal Integrity Monitoring System has detected unusual atmospheric properties in the supermatter chamber, energy output from the supermatter crystal has increased significantly. Engineering intervention is required to stabilize the engine.", "Class [surge_class] Supermatter Surge Alert", 'sound/machines/engine_alert3.ogg')
var/class_to_announce = fake ? pick(1, 2, 3, 4) : surge_class
priority_announce("The Crystal Integrity Monitoring System has detected unusual atmospheric properties in the supermatter chamber, energy output from the supermatter crystal has increased significantly. Engineering intervention is required to stabilize the engine.", "Class [class_to_announce] Supermatter Surge Alert", 'sound/machines/engine_alert3.ogg')

/datum/round_event/supermatter_surge/start()
engine.bullet_energy = surge_class + SURGE_BULLET_ENERGY_ADDITION
sm_gas.powerloss_inhibition = (surge_class * SURGE_POWERLOSS_INHIBITION_MODIFIER) + SURGE_BASE_POWERLOSS_INHIBITION
sm_gas.heat_power_generation = (surge_class * SURGE_POWER_GENERATION_MODIFIER) - 1
sm_gas.heat_modifier = (surge_class * SURGE_HEAT_MODIFIER) - 1


/datum/round_event/supermatter_surge/end()
engine.bullet_energy = initial(engine.bullet_energy)
sm_gas.powerloss_inhibition = initial(sm_gas.powerloss_inhibition)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fishing/fish/fish_evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ GLOBAL_LIST_INIT(fish_evolutions, init_subtypes_w_path_keys(/datum/fish_evolutio
conditions_note = "The fish (and its mate) need to be unusually big both in size and weight."

/datum/fish_evolution/mastodon/check_conditions(obj/item/fish/source, obj/item/fish/mate, obj/structure/aquarium/aquarium)
if((source.size < 144 || source.weight < 4000) || (mate && (mate.size < 144 || mate.weight < 4000)))
if((source.size < 120 || source.weight < 3000) || (mate && (mate.size < 120 || mate.weight < 3000)))
return FALSE
return ..()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/fishing/fish/fish_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
sprite_height = 5
stable_population = 12
average_size = 110
average_weight = 10000
average_weight = 6000
random_case_rarity = FISH_RARITY_GOOD_LUCK_FINDING_THIS
required_temperature_min = MIN_AQUARIUM_TEMP+10
required_temperature_max = MIN_AQUARIUM_TEMP+30
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/robot/robot_model.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
if(!new_model.be_transformed_to(src, forced))
qdel(new_model)
return
cyborg.drop_all_held_items()
cyborg.model = new_model
cyborg.update_module_innate()
new_model.rebuild_modules()
Expand Down
Loading

0 comments on commit 90dec48

Please sign in to comment.