Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…l-Station-13 into master
  • Loading branch information
SandPoot committed Sep 19, 2020
2 parents 7e6983c + b29143e commit d2257ab
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 43 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/admin/keybindings.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Defines for managed input/keybinding system.
/// Max length of a keypress command before it's considered to be a forged packet/bogus command
#define MAX_KEYPRESS_COMMANDLENGTH 32
#define MAX_KEYPRESS_COMMANDLENGTH 64
/// Maximum keys that can be bound to one button
#define MAX_COMMANDS_PER_KEY 5
/// Maximum keys per keybind
Expand Down
19 changes: 0 additions & 19 deletions code/controllers/subsystem/persistence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,6 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/LoadSatchels()
var/placed_satchel = 0
var/path
if(fexists("data/npc_saves/SecretSatchels.sav")) //legacy conversion. Will only ever run once.
var/savefile/secret_satchels = new /savefile("data/npc_saves/SecretSatchels.sav")
for(var/map in secret_satchels)
var/json_file = file("data/npc_saves/SecretSatchels[map].json")
var/list/legacy_secret_satchels = splittext(secret_satchels[map],"#")
var/list/satchels = list()
for(var/i=1,i<=legacy_secret_satchels.len,i++)
var/satchel_string = legacy_secret_satchels[i]
var/list/chosen_satchel = splittext(satchel_string,"|")
if(chosen_satchel.len == 3)
var/list/data = list()
data["x"] = text2num(chosen_satchel[1])
data["y"] = text2num(chosen_satchel[2])
data["saved_obj"] = chosen_satchel[3]
satchels += list(data)
var/list/file_data = list()
file_data["data"] = satchels
WRITE_FILE(json_file, json_encode(file_data))
fdel("data/npc_saves/SecretSatchels.sav")

var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/json = list()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mutations/_mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
var/lowest_value = 256 * 8
var/text_gain_indication = ""
var/text_lose_indication = ""
var/list/mutable_appearance/visual_indicators = list()
var/list/visual_indicators = list()
var/obj/effect/proc_holder/spell/power
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
var/list/species_allowed = list() //to restrict mutation to only certain species
Expand Down
4 changes: 2 additions & 2 deletions code/datums/wires/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
/datum/wires/airlock/on_pulse(wire)
set waitfor = FALSE
var/obj/machinery/door/airlock/A = holder
if(!A.hasSiliconAccessInArea(usr) && A.isElectrified() && A.shock(usr, 100))
if(usr && !A.hasSiliconAccessInArea(usr) && A.isElectrified() && A.shock(usr, 100))
return FALSE
switch(wire)
if(WIRE_POWER1, WIRE_POWER2) // Pulse to loose power.
Expand Down Expand Up @@ -127,7 +127,7 @@

/datum/wires/airlock/on_cut(wire, mend)
var/obj/machinery/door/airlock/A = holder
if(!A.hasSiliconAccessInArea(usr) && A.isElectrified() && A.shock(usr, 100))
if(usr && !A.hasSiliconAccessInArea(usr) && A.isElectrified() && A.shock(usr, 100))
return FALSE
switch(wire)
if(WIRE_POWER1, WIRE_POWER2) // Cut to loose power, repair all to gain power.
Expand Down
3 changes: 2 additions & 1 deletion code/game/area/Space_Station_13_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //Eating up space doesn't count for victory as a blob.
considered_hull_exterior = TRUE

/area/space/nearstation
icon_state = "space_near"
Expand Down Expand Up @@ -1592,4 +1593,4 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //While part of the station, what good will it do you?
blob_allowed = FALSE //While part of the station, what good will it do you?
3 changes: 3 additions & 0 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
/// If megafauna can be spawned by natural random generation
var/megafauna_spawn_allowed = FALSE

/// Considered space for hull shielding
var/considered_hull_exterior = FALSE

var/fire = null
var/atmos = TRUE
var/atmosalm = FALSE
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/items/devices/portable_chem_mixer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@
if (loc != user)
return ..()
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
ui_interact(user)
return
INVOKE_ASYNC(src, /datum.proc/ui_interact, user)

/obj/item/storage/portable_chem_mixer/attack_self(mob/user)
if(loc == user)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@
to_chat(user, "<span class='notice'>[M] is at full health.</span>")
return FALSE
user.visible_message("<span class='green'>[user] applies \the [src] on [M].</span>", "<span class='green'>You apply \the [src] on [M].</span>")
return heal_carbon(M, user, heal_brute, heal_burn)

M.heal_bodypart_damage(heal_brute)
return TRUE
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")

/obj/item/stack/medical/ointment
Expand Down
3 changes: 0 additions & 3 deletions code/game/objects/obj_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
/obj/proc/acid_processing()
. = 1
if(!(resistance_flags & ACID_PROOF))
for(var/armour_value in armor)
if(armour_value != "acid" && armour_value != "fire")
armor = armor.modifyAllRatings(0 - round(sqrt(acid_level)*0.1))
if(prob(33))
playsound(loc, 'sound/items/welder.ogg', 150, 1)
take_damage(min(1 + round(sqrt(acid_level)*0.3), 300), BURN, "acid", 0)
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/simulated/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
if(prob(hardness))
playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
hulk_recoil(arm, user)
//hulk_recoil(arm, user) // citadel edit - no, hulks are already subject to stamina combat
dismantle_wall(1)

else
Expand Down
6 changes: 1 addition & 5 deletions code/modules/antagonists/bloodsucker/powers/brawn.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


/datum/action/bloodsucker/targeted/brawn
name = "Brawn"//"Cellular Emporium"
name = "Brawn"
desc = "Snap restraints with ease, or deal terrible damage with your bare hands."
button_icon_state = "power_strength"
bloodcost = 10
Expand Down Expand Up @@ -107,8 +107,6 @@
if(user_C.handcuffed)
var/obj/O = user_C.get_item_by_slot(SLOT_HANDCUFFED)
if(istype(O))
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
// "<span class='warning'>You snap [O] like it's nothing!</span>")
user_C.clear_cuffs(O,TRUE)
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
return TRUE
Expand All @@ -128,8 +126,6 @@
if(user_C.legcuffed)
var/obj/O = user_C.get_item_by_slot(SLOT_LEGCUFFED)
if(istype(O))
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
// "<span class='warning'>You snap [O] like it's nothing!</span>")
user_C.clear_cuffs(O,TRUE)
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
return TRUE
Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/bloodsucker/powers/feed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@
// Broadcast Message
if(amSilent)
//if (!iscarbon(target))
// user.visible_message("<span class='notice'>[user] shifts [target] closer to [user.p_their()] mouth.</span>", \
// "<span class='notice'>You secretly slip your fangs into [target]'s flesh.</span>", \
// user.visible_message("<span class='notice'>[user] shifts [target] closer to [user.p_their()] mouth.</span>",
// "<span class='notice'>You secretly slip your fangs into [target]'s flesh.</span>",
// vision_distance = 2, ignored_mobs=target) // Only people who AREN'T the target will notice this action.
//else
var/deadmessage = target.stat == DEAD ? "" : " <i>[target.p_they(TRUE)] looks dazed, and will not remember this.</i>"
Expand Down
9 changes: 7 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)

var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))

if(!affecting) //Maybe the bodypart is missing? Or things just went wrong..
affecting = target.get_bodypart(BODY_ZONE_CHEST) //target chest instead, as failsafe. Or hugbox? You decide.

var/miss_chance = 100//calculate the odds that a punch misses entirely. considers stamina and brute damage of the puncher. punches miss by default to prevent weird cases
if(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)
miss_chance = 0
Expand Down Expand Up @@ -1626,6 +1629,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)

/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H, attackchain_flags = NONE, damage_multiplier = 1)
var/totitemdamage = H.pre_attacked_by(I, user) * damage_multiplier

if(!affecting) //Something went wrong. Maybe the limb is missing?
affecting = H.get_bodypart(BODY_ZONE_CHEST) //If the limb is missing, or something went terribly wrong, just hit the chest instead

// Allows you to put in item-specific reactions based on species
if(user != H)
var/list/block_return = list()
Expand All @@ -1637,8 +1644,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
return 0

var/hit_area
if(!affecting) //Something went wrong. Maybe the limb is missing?
affecting = H.bodyparts[1]

hit_area = affecting.name
var/def_zone = affecting.body_zone
Expand Down
5 changes: 4 additions & 1 deletion code/modules/paperwork/ticketmachine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@

/obj/machinery/ticket_machine/attack_hand(mob/living/carbon/user)
. = ..()
INVOKE_ASYNC(src, .proc/attempt_ticket, user)

/obj/machinery/ticket_machine/proc/attempt_ticket(mob/living/carbon/user)
if(!ready)
to_chat(user,"<span class='warning'>You press the button, but nothing happens...</span>")
return
Expand Down Expand Up @@ -195,7 +198,7 @@

/obj/item/ticket_machine_ticket
name = "Ticket"
desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing."
desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "ticket"
maptext_x = 7
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@
return TRUE //Bullets don't drift in space

/obj/item/projectile/process(wait)
set waitfor = FALSE
if(!loc || !fired || !trajectory)
fired = FALSE
return PROCESS_KILL
Expand Down
2 changes: 1 addition & 1 deletion code/modules/recycling/disposal/bin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
. = ..()
if(.)
return
for(var/obj/item/I in src_object)
for(var/obj/item/I in src_object.contents())
if(user.active_storage != src_object)
if(I.on_found(user))
return
Expand Down
65 changes: 65 additions & 0 deletions code/modules/shielding/helpers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//////// HELPER FILE FOR SHIELDING /////////

// HULL SHIELD GENERATION HELPERS
/**
* Gets hull exterior adjacent tiles of a certain area
* Area method.
* EXPENSIVE.
* If the area itself is already considered exterior, it'll find all tiles inside it that's next to an interior area.
*/
/proc/hull_shielding_get_tiles_around_area(area/instance, check_tick = FALSE)
var/list/cache = list()
var/area/A
if(instance.considered_hull_exterior)
for(var/turf/potential in instance)
for(var/turf/looking in orange(1, potential))
A = looking.loc
if(!A.considered_hull_exterior)
cache[potential] = TRUE // we're the exterior area, grab the one that's reaching out
if(check_tick)
CHECK_TICK
else
for(var/turf/potential in instance)
for(var/turf/looking in orange(1, potential))
A = looking.loc
if(A.considered_hull_exterior)
cache[looking] = TRUE // we're not the exterior area, grab the one that's being reached to
if(check_tick)
CHECK_TICK
. = list()
for(var/i in cache)
. += i // strip assoc value

/**
* Gets hull adjacent exterior tiles of an entire zlevel
* EXPENSIVE.
* Gets the tiles in the exterior area touching to a non-exterior area
*/
/proc/hull_shielding_get_tiles_in_z(zlevel, check_tick = FALSE, recurse = FALSE, list/outlist = list(), list/scanned_zlevels = list())
. = outlist
if(zlevel in scanned_zlevels)
return
scanned_zlevels |= zlevel
if(recurse)
var/up = SSmapping.level_trait(zlevel, ZTRAIT_UP)
var/down = SSmapping.level_trait(zlevel, ZTRAIT_DOWN)
if(isnum(up) && (up != 0))
hull_shielding_get_tiles_in_z(up, check_tick, recurse, outlist, scanned_zlevels)
if(isnum(down) && (down != 0))
hull_shielding_get_tiles_in_z(down, check_tick, recurse, outlist, scanned_zlevels)
// sigh. why.
var/turf/potential
var/area/p_area
var/area/l_area
for(var/x in 1 to world.maxx)
for(var/y in 1 to world.maxy)
if(check_tick)
CHECK_TICK
potential = locate(x, y, zlevel)
p_area = potential.loc
if(!p_area.considered_hull_exterior)
continue
for(var/turf/looking in orange(1, potential))
l_area = looking.loc
if(!l_area.considered_hull_exterior)
outlist += potential
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-13382.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "silicons"
delete-after: True
changes:
- balance: "hulks can smash again (walls no longer break their hands)"
5 changes: 5 additions & 0 deletions html/changelogs/AutoChangeLog-pr-13394.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: "DeltaFire15"
delete-after: True
changes:
- bugfix: "Sutures work on simplemobs again."
- bugfix: "Attacking dismembered bodyparts now targets the chest instead, for weapons aswell as unarmed attacks."
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-13399.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "silicons"
delete-after: True
changes:
- rscdel: "acid no longer degrades armor"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-13401.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "MrJWhit"
delete-after: True
changes:
- rscadd: "New sprites for chess pieces! You can craft them in-game with metal sheets."
Binary file modified icons/obj/chess.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3284,6 +3284,7 @@
#include "code\modules\ruins\spaceruin_code\whiteshipruin_box.dm"
#include "code\modules\security_levels\keycard_authentication.dm"
#include "code\modules\security_levels\security_levels.dm"
#include "code\modules\shielding\helpers.dm"
#include "code\modules\shuttle\arrivals.dm"
#include "code\modules\shuttle\assault_pod.dm"
#include "code\modules\shuttle\computer.dm"
Expand Down

0 comments on commit d2257ab

Please sign in to comment.