Skip to content

Commit

Permalink
Merge branch 'master' into ert
Browse files Browse the repository at this point in the history
  • Loading branch information
meemofcourse authored Nov 3, 2023
2 parents 7de8b5c + 17c432f commit 41c8a40
Show file tree
Hide file tree
Showing 249 changed files with 6,005 additions and 674 deletions.
4,760 changes: 4,760 additions & 0 deletions _maps/RandomRuins/RockRuins/rockplanet_nomadcrash.dmm

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion _maps/map_catalogue.txt
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ Find the key for using this catalogue in "map_catalogue_key.txt"
Size = (x = 9)(y = 9)(z = 1)
Tags = "Boss Combat Challenge", "Major Loot", "Hazardous", "Inhospitable"

File Name = "_maps\RandomRuins\RockRuins\rockplanet_nomadcrash.dmm"
Size = (x = 58)(y = 48)(z = 1)
Tags = "Medium Combat Challenge", "Medium Loot", "Hazardous", "Hospitable"


SandRuins:
File Name = "_maps\RandomRuins\Ruins\whitesands_surface_assaultpodcrash.dmm"
Expand Down Expand Up @@ -507,6 +511,10 @@ Find the key for using this catalogue in "map_catalogue_key.txt"
Size = (x = 37)(y = 43)(z = 1)
Tags = "Medium Combat Challenge", "Medium Loot", "Liveable"

File Name = "_maps\RandomRuins\BeachRuins\beach_float_resort.dmm"
Size = (x = 38)(y = 52)(z = 1)
Tags = "No Combat", "Minor Loot", "Liveable"

Deprecated:
File Name = "_maps\RandomRuins\deprecated\jungle_surface_tumblr_sexyman.dmm"
Size = (x = 30)(y = 20)(z = 1)
Expand Down Expand Up @@ -565,7 +573,7 @@ Find the key for using this catalogue in "map_catalogue_key.txt"
Tags = "No Combat", "Medium Loot", "Shelter"


Waste Ruins:
Waste Ruins:
File name ="_maps\RandomRuins\wasteruins\wasteplanet_clowncrash.dmm"
Size = (x = 11)(y = 12)(z = 1)
Tags = "No Combat", "Minor Loot", "Shelter" "hospitable"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(/obj/item/gun)))
#define EMBED_POINTY_SUPERIOR list("embed_chance" = 100, "ignore_throwspeed_threshold" = TRUE)

//Gun weapon weight
/// Allows you to dual wield this gun and your offhand gun
#define WEAPON_LIGHT 1
/// Does not allow you to dual wield with this gun and your offhand gun
#define WEAPON_MEDIUM 2
/// You must wield the gun to fire this gun
#define WEAPON_HEAVY 3
//Gun trigger guards
#define TRIGGER_GUARD_ALLOW_ALL -1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
//Human
#define COMSIG_KB_HUMAN_QUICKEQUIP_DOWN "keybinding_human_quickequip_down"
#define COMSIG_KB_HUMAN_QUICKEQUIPBELT_DOWN "keybinding_human_quickequipbelt_down"
#define COMSIG_KB_HUMAN_UNIQUEACTION "keybinding_uniqueaction"
#define COMSIG_KB_HUMAN_BAGEQUIP_DOWN "keybinding_human_bagequip_down"
#define COMSIG_KB_HUMAN_EQUIPMENTSWAP_DOWN "keybinding_human_equipmentswap_down"
#define COMSIG_KB_HUMAN_SUITEQUIP_DOWN "keybinding_human_suitequip_down"
Expand Down
10 changes: 10 additions & 0 deletions code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@
/// Flags for the pod_flags var on /obj/structure/closet/supplypod

#define FIRST_SOUNDS (1<<0) // If it shouldn't play sounds the first time it lands, used for reverse mode


// Bullet hit sounds
#define PROJECTILE_HITSOUND_FLESH (1<<0)
#define PROJECTILE_HITSOUND_NON_LIVING (1<<1)
#define PROJECTILE_HITSOUND_GLASS (1<<2)
#define PROJECTILE_HITSOUND_STONE (1<<3)
#define PROJECTILE_HITSOUND_METAL (1<<4)
#define PROJECTILE_HITSOUND_WOOD (1<<5)
#define PROJECTILE_HITSOUND_SNOW (1<<6)
1 change: 0 additions & 1 deletion code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_legs, GLOB.spider_legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_spinneret, GLOB.spider_spinneret_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_mandibles, GLOB.spider_mandibles_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/kepori_feathers, GLOB.kepori_feathers_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/kepori_body_feathers, GLOB.kepori_body_feathers_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/kepori_tail_feathers, GLOB.kepori_tail_feathers_list)
Expand Down
12 changes: 7 additions & 5 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_legs, GLOB.spider_legs_list)
if(!GLOB.spider_spinneret_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_spinneret, GLOB.spider_spinneret_list)
if(!GLOB.spider_mandibles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spider_mandibles, GLOB.spider_mandibles_list)
if(!GLOB.kepori_feathers_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/kepori_feathers, GLOB.kepori_feathers_list)
if(!GLOB.kepori_tail_feathers_list.len)
Expand Down Expand Up @@ -118,7 +116,6 @@
"moth_wings" = pick(GLOB.moth_wings_list),
"face_markings" = pick(GLOB.face_markings_list),
"spider_legs" = pick(GLOB.spider_legs_list),
"spider_mandibles" = pick(GLOB.spider_mandibles_list),
"spider_spinneret" = pick(GLOB.spider_spinneret_list),
"spines" = pick(GLOB.spines_list),
"squid_face" = pick(GLOB.squid_face_list),
Expand Down Expand Up @@ -244,7 +241,7 @@ GLOBAL_LIST_EMPTY(species_list)
return "unknown"

///Timed action involving two mobs, the user and the target.
/proc/do_mob(mob/user , mob/target, time = 3 SECONDS, uninterruptible = FALSE, progress = TRUE, datum/callback/extra_checks = null)
/proc/do_mob(mob/user , mob/target, time = 3 SECONDS, uninterruptible = FALSE, progress = TRUE, datum/callback/extra_checks = null, ignore_loc_change = FALSE)
if(!user || !target)
return FALSE

Expand Down Expand Up @@ -284,7 +281,12 @@ GLOBAL_LIST_EMPTY(species_list)
drifting = FALSE
user_loc = user.loc

if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_held_item() != holding || user.incapacitated() || (extra_checks && !extra_checks.Invoke()))

if(!ignore_loc_change && ((!drifting && user.loc != user_loc) || target.loc != target_loc))
. = FALSE
break

if(user.get_active_held_item() != holding || user.incapacitated() || (extra_checks && !extra_checks.Invoke()))
. = FALSE
break
if(!QDELETED(progbar))
Expand Down
21 changes: 21 additions & 0 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@
else if(dx<0)
.+=360


////Tile coordinates (x, y) to absolute coordinates (in number of pixels). Center of a tile is generally assumed to be (16,16), but can be offset.
#define ABS_COOR(c) (((c - 1) * 32) + 16)
#define ABS_COOR_OFFSET(c, o) (((c - 1) * 32) + o)

/proc/get_angle_with_scatter(atom/start, atom/end, scatter, x_offset = 16, y_offset = 16)
var/end_apx
var/end_apy
if(isliving(end)) //Center mass.
end_apx = ABS_COOR(end.x)
end_apy = ABS_COOR(end.y)
else //Exact pixel.
end_apx = ABS_COOR_OFFSET(end.x, x_offset)
end_apy = ABS_COOR_OFFSET(end.y, y_offset)
scatter = ((rand(0, min(scatter, 45))) * (prob(50) ? 1 : -1)) //Up to 45 degrees deviation to either side.
. = round((90 - ATAN2(end_apx - ABS_COOR(start.x), end_apy - ABS_COOR(start.y))), 1) + scatter
if(. < 0)
. += 360
else if(. >= 360)
. -= 360

/proc/Get_Pixel_Angle(y, x)//for getting the angle when animating something's pixel_x and pixel_y
if(!y)
return (x>=0)?90:270
Expand Down
3 changes: 1 addition & 2 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ GLOBAL_LIST_EMPTY(ipc_chassis_list)
GLOBAL_LIST_INIT(ipc_brain_list, list("Posibrain", "Man-Machine Interface"))
GLOBAL_LIST_EMPTY(spider_legs_list)
GLOBAL_LIST_EMPTY(spider_spinneret_list)
GLOBAL_LIST_EMPTY(spider_mandibles_list)
GLOBAL_LIST_EMPTY(kepori_feathers_list)
GLOBAL_LIST_EMPTY(kepori_body_feathers_list)
GLOBAL_LIST_EMPTY(kepori_tail_feathers_list)
Expand Down Expand Up @@ -128,7 +127,7 @@ GLOBAL_LIST_INIT(ai_core_display_screens, sortList(list(
"Helios",
"House",
"Inverted",
"Lamp", //WS edit, moff ai display
"Lamp",
"Matrix",
"Monochrome",
"Murica",
Expand Down
14 changes: 0 additions & 14 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,27 +134,13 @@ SUBSYSTEM_DEF(mapping)
for(var/datum/planet_type/type as anything in subtypesof(/datum/planet_type))
planet_types[initial(type.planet)] = new type

// Still supporting bans by filename
// I hate this so much. I want to kill it because I don't think ANYONE uses this
// Couldn't you just remove it on a fork or something??? come onnnnnnnnnnnn stop EXISTING already
var/list/banned = generateMapList("[global.config.directory]/lavaruinblacklist.txt")
banned += generateMapList("[global.config.directory]/spaceruinblacklist.txt")
banned += generateMapList("[global.config.directory]/iceruinblacklist.txt")
banned += generateMapList("[global.config.directory]/sandruinblacklist.txt")
banned += generateMapList("[global.config.directory]/jungleruinblacklist.txt")
banned += generateMapList("[global.config.directory]/rockruinblacklist.txt")
banned += generateMapList("[global.config.directory]/wasteruinblacklist.txt")

for(var/item in sortList(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
var/datum/map_template/ruin/ruin_type = item
// screen out the abstract subtypes
if(!initial(ruin_type.id))
continue
var/datum/map_template/ruin/R = new ruin_type()

if(R.mappath in banned)
continue

map_templates[R.name] = R
ruins_templates[R.name] = R
ruin_types_list[R.ruin_type] += list(R.name = R)
Expand Down
8 changes: 5 additions & 3 deletions code/datums/components/fullauto.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,8 @@
if(!can_shoot())
shoot_with_empty_chamber(shooter)
return FALSE
var/obj/item/bodypart/other_hand = shooter.has_hand_for_held_index(shooter.get_inactive_hand_index())
if(weapon_weight == WEAPON_HEAVY && (shooter.get_inactive_held_item() || !other_hand))
to_chat(shooter, "<span class='warning'>You need two hands to fire [src]!</span>")
if(weapon_weight == WEAPON_HEAVY && (!wielded))
to_chat(shooter, "<span class='warning'>You need a more secure grip to fire [src]!</span>")
return FALSE
return TRUE

Expand All @@ -260,6 +259,9 @@
SIGNAL_HANDLER
if(semicd || shooter.incapacitated())
return NONE
if(weapon_weight == WEAPON_HEAVY && (!wielded))
to_chat(shooter, "<span class='warning'>You need a more secure grip to fire [src]!</span>")
return NONE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
return NONE
Expand Down
2 changes: 1 addition & 1 deletion code/datums/keybinding/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
return TRUE

/datum/keybinding/carbon/hold_throw_mode
hotkey_keys = list("Space")
// hotkey_keys = list("Space")
name = "hold_throw_mode"
full_name = "Hold throw mode"
description = "Hold this to turn on throw mode, and release it to turn off throw mode"
Expand Down
16 changes: 16 additions & 0 deletions code/datums/keybinding/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@
H.quick_equip()
return TRUE

/datum/keybinding/human/unique_action
hotkey_keys = list("Space")
name = "unique_action"
full_name = "Perform unique action"
description = ""
keybind_signal = COMSIG_KB_HUMAN_UNIQUEACTION


/datum/keybinding/human/unique_action/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/current_human = user.mob
current_human.do_unique_action()
return TRUE

/datum/keybinding/human/quick_equip_belt
hotkey_keys = list("ShiftE")
name = "quick_equip_belt"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/beachplanet.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\beachruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/beachplanet
prefix = "_maps/RandomRuins/BeachRuins/"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/icemoon.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\iceruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/icemoon
prefix = "_maps/RandomRuins/IceRuins/"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/jungle.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\jungleruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/jungle
prefix = "_maps/RandomRuins/JungleRuins/"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/lavaland.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\lavaruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/lavaland
prefix = "_maps/RandomRuins/LavaRuins/"
Expand Down
8 changes: 7 additions & 1 deletion code/datums/ruins/rockplanet.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\rockruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/rockplanet
prefix = "_maps/RandomRuins/RockRuins/"
Expand Down Expand Up @@ -93,3 +93,9 @@
description = "Nanotrasen's gotta lay off some personnel, and this facility hasn't been worth the effort so far"
id = "rockplanet_budgetcuts"
suffix = "rockplanet_budgetcuts.dmm"

/datum/map_template/ruin/rockplanet/nomadcrash
name = "Nomad Crash"
description = "A Crashed Arrow & Axe Interceptor. A long forgotten Crew. They tried their best to survive..."
id = "rockplanet_nomadcrash"
suffix = "rockplanet_nomadcrash.dmm"
2 changes: 1 addition & 1 deletion code/datums/ruins/space.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\spaceruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/space
prefix = "_maps/RandomRuins/SpaceRuins/"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/wasteplanet.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\wasteruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/wasteplanet
prefix = "_maps/RandomRuins/WasteRuins/"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ruins/whitesands.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hey! Listen! Update \config\sandruinblacklist.txt with your new ruins!
// Hey! Listen! Update _maps\map_catalogue.txt with your new ruins!

/datum/map_template/ruin/whitesands
prefix = "_maps/RandomRuins/SandRuins/"
Expand Down
14 changes: 12 additions & 2 deletions code/game/area/areas/ruins/rockplanet.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/**********************Rock Planet Areas**************************/

/area/mine/rockplanet
//syndicate
/area/ruin/rockplanet/syndicate
name = "Abandoned Syndicate Mining Facility"
icon_state = "green"

/area/mine/rockplanet_nanotrasen
//budgetcuts
/area/ruin/rockplanet/nanotrasen
name = "Abandoned Mining Facility"
icon_state = "green"

//nomad
/area/ruin/rockplanet/nomad
name = "Abandoned Crash Site"
always_unpowered = FALSE
icon_state = "red"
31 changes: 31 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@
///Default Y pixel offset
var/base_pixel_y

///Wanted sound when hit by a projectile
var/hitsound_type = PROJECTILE_HITSOUND_NON_LIVING
///volume wanted for being hit
var/hitsound_volume = 50
/**
* Called when an atom is created in byond (built in engine proc)
*
Expand Down Expand Up @@ -587,6 +591,33 @@
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
. = P.on_hit(src, 0, def_zone, piercing_hit)

/atom/proc/bullet_hit_sfx(obj/projectile/hitting_projectile)
var/selected_sound = ""

if(!hitsound_volume)
return FALSE
if(!hitsound_volume)
return FALSE

switch(hitsound_type)
if(PROJECTILE_HITSOUND_FLESH)
selected_sound = hitting_projectile.hitsound
if(PROJECTILE_HITSOUND_NON_LIVING)
selected_sound = hitting_projectile.hitsound_non_living
if(PROJECTILE_HITSOUND_GLASS)
selected_sound = hitting_projectile.hitsound_glass
if(PROJECTILE_HITSOUND_STONE)
selected_sound = hitting_projectile.hitsound_stone
if(PROJECTILE_HITSOUND_METAL)
selected_sound = hitting_projectile.hitsound_metal
if(PROJECTILE_HITSOUND_WOOD)
selected_sound = hitting_projectile.hitsound_wood
if(PROJECTILE_HITSOUND_SNOW)
selected_sound = hitting_projectile.hitsound_snow

playsound(src, selected_sound, hitsound_volume, TRUE)
return TRUE

///Return true if we're inside the passed in atom
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Class Procs:
anchored = TRUE
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT

hitsound_type = PROJECTILE_HITSOUND_METAL

var/machine_stat = NONE
var/use_power = IDLE_POWER_USE
//0 = dont run the auto
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/computer/_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
///Does this computer have a unique icon_state? Prevents the changing of icons from alternative computer construction
var/unique_icon = FALSE

hitsound_type = PROJECTILE_HITSOUND_GLASS

/obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C)
. = ..()
power_change()
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/doors/windowdoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
var/cable = 1
var/list/debris = list()

hitsound_type = PROJECTILE_HITSOUND_GLASS

/obj/machinery/door/window/Initialize(mapload, set_dir)
. = ..()
flags_1 &= ~PREVENT_CLICK_UNDER_1
Expand Down
Loading

0 comments on commit 41c8a40

Please sign in to comment.