Skip to content

Commit

Permalink
Merge branch 'master' into fix-plating_on_catwalk_and_lattice
Browse files Browse the repository at this point in the history
  • Loading branch information
rainnspace authored Jan 19, 2025
2 parents 55dd894 + 97e99fe commit 17d0bd1
Show file tree
Hide file tree
Showing 33 changed files with 135 additions and 69 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/misc_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -732,3 +732,7 @@ do { \
#define LAVALAND_TENDRIL_COLLAPSE_RANGE 2 //! The radius of the chasm created by killed tendrils.

#define ALPHA_VISIBLE 255 // the max alpha

/// Economy account defines
#define BANK_PIN_MIN 10000
#define BANK_PIN_MAX 99999
2 changes: 1 addition & 1 deletion code/datums/station_traits/negative_traits.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/station_trait/carp_infestation
name = "Carp infestation"
trait_type = STATION_TRAIT_NEGATIVE
weight = 5
weight = 3
show_in_report = TRUE
report_message = "Dangerous fauna is present in the area of this station."

Expand Down
2 changes: 2 additions & 0 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,13 @@
ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
H.add_hud_to(owner)
owner.permanent_huds |= H
return ..()

/datum/status_effect/hippocratic_oath/on_remove()
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
owner.permanent_huds ^= H
H.remove_hud_from(owner)

/datum/status_effect/hippocratic_oath/tick()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
shootAt(H)

if(prob(10))
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container/anomaly(get_turf(src))
for(var/i in 1 to 5)
step_towards(A, pick(turf_targets))
sleep(2)
Expand Down
5 changes: 0 additions & 5 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,3 @@
keyslot1 = new /obj/item/encryptionkey/syndicate
syndiekey = keyslot1
recalculateChannels()

/obj/item/radio/headset/proc/make_epsilon() // Turns AI's and cyborgs radio to Epsilon radio!
qdel(keyslot1)
keyslot1 = new /obj/item/encryptionkey/centcom
recalculateChannels()
2 changes: 1 addition & 1 deletion code/game/objects/items/robot/robot_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Keeping it in for adminabuse but the malf one is /obj/item/melee/baton/borg_stun
*/
/obj/item/borg/stun
name = "electrically-charged arm"
icon_state = "elecarm"
icon_state = "elecarm_active"
var/charge_cost = 30

/obj/item/borg/stun/attack__legacy__attackchain(mob/living/M, mob/living/silicon/robot/user)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GLOBAL_LIST_INIT(metal_recipes, list(
new /datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("storage shelf", /obj/structure/shelf, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("metal bookcase", /obj/structure/bookcase/metal, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("gun rack", /obj/structure/gunrack, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
null,
new /datum/stack_recipe_list("airlock assemblies", list(
Expand Down Expand Up @@ -186,6 +187,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list(
new /datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 3, time = 5 SECONDS),
new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 5 SECONDS, one_per_turf = TRUE),
new /datum/stack_recipe("military bookcase", /obj/structure/bookcase/military, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 5 SECONDS, one_per_turf = TRUE),
new /datum/stack_recipe("hardened wheelchair", /obj/structure/chair/wheelchair/plasteel, 15, time = 6 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
null,
Expand Down
20 changes: 9 additions & 11 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -785,24 +785,24 @@
/obj/item/storage/belt/sheath/remove_from_storage(obj/item/W, atom/new_location)
if(!..())
return
playsound(src, 'sound/weapons/blade_unsheath.ogg', 20)
if(!length(contents)) // telekinesis grab spawns inside of the sheath and leaves it immediately...
playsound(src, 'sound/weapons/blade_unsheath.ogg', 20)

/obj/item/storage/belt/sheath/update_icon_state()
if(length(contents))
icon_state = "[icon_state]-sword"
item_state = "[item_state]-sword"
icon_state = "[base_icon_state]-sword"
item_state = "[base_icon_state]-sword"
else
icon_state = initial(icon_state)
item_state = initial(item_state)
icon_state = base_icon_state
item_state = base_icon_state
if(isliving(loc))
var/mob/living/L = loc
L.update_inv_belt()

/obj/item/storage/belt/sheath/saber
name = "saber sheath"
desc = "Can hold sabers."
icon_state = "sheath"
item_state = "sheath"
base_icon_state = "sheath"
can_hold = list(/obj/item/melee/saber)

/obj/item/storage/belt/sheath/saber/populate_contents()
Expand All @@ -812,8 +812,7 @@
/obj/item/storage/belt/sheath/snakesfang
name = "snakesfang scabbard"
desc = "Can hold scimitars."
icon_state = "snakesfangsheath"
item_state = "snakesfangsheath"
base_icon_state = "snakesfangsheath"
can_hold = list(/obj/item/melee/snakesfang)

/obj/item/storage/belt/sheath/snakesfang/populate_contents()
Expand All @@ -823,8 +822,7 @@
/obj/item/storage/belt/sheath/breach_cleaver
name = "breach cleaver scabbard"
desc = "Can hold massive cleavers."
icon_state = "breachcleaversheath"
item_state = "breachcleaversheath"
base_icon_state = "breachcleaversheath"
can_hold = list(/obj/item/melee/breach_cleaver)

/obj/item/storage/belt/sheath/breach_cleaver/populate_contents()
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/weapons/stunbaton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
/obj/item/melee/baton/loaded/borg_stun_arm
name = "electrically-charged arm"
desc = "A piece of scrap metal wired directly to your power cell."
icon = 'icons/mob/robot_items.dmi'
base_icon = "elecarm"
icon_state = "elecarm"
hitcost = 100

/obj/item/melee/baton/loaded/borg_stun_arm/screwdriver_act(mob/living/user, obj/item/I)
Expand Down
10 changes: 7 additions & 3 deletions code/game/objects/items/weapons/tanks/watertank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,8 @@
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
log_game("[key_name(user)] used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
playsound(src,'sound/items/syringeproj.ogg', 40, TRUE)
for(var/a in 1 to 6)
step_towards(A, target)
sleep(2)
A.throw_at(target, 6, 2, user)
sleep(2)
A.Smoke()
addtimer(VARSET_CALLBACK(src, nanofrost_cooldown, FALSE))
if(METAL_FOAM)
Expand Down Expand Up @@ -334,6 +333,11 @@
playsound(src, 'sound/effects/bamf.ogg', 100, TRUE)
qdel(src)

/obj/effect/nanofrost_container/anomaly
name = "nanofrost anomaly"
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area."
icon_state = "frozen_smoke_anomaly"

#undef EXTINGUISHER
#undef NANOFROST
#undef METAL_FOAM
7 changes: 7 additions & 0 deletions code/game/objects/structures/crates_lockers/crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@
var/target_temp = T0C - 40
var/cooling_power = 40

/obj/structure/closet/crate/freezer/deluxe
name = "Deluxe Freezer"
desc = "A fancy looking freezer emblazoned with the Nanotrasen logo."
icon_state = "freezerdeluxe"
icon_opened = "freezerdeluxe_open"
icon_closed = "freezerdeluxe"

/obj/structure/closet/crate/freezer/return_obj_air()
RETURN_TYPE(/datum/gas_mixture)
var/datum/gas_mixture/gas = ..()
Expand Down
8 changes: 5 additions & 3 deletions code/modules/admin/verbs/deathsquad.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
SEND_SOUND(AI, notice_sound)
AI.show_laws()
var/obj/item/radio/headset/heads/ai_integrated/ai_radio = AI.get_radio()
ai_radio.make_epsilon()
ai_radio.channels |= list("Response Team" = 1, "Special Ops" = 1)
ai_radio.config(ai_radio.channels)

for(var/mob/living/silicon/robot/R in AI.connected_robots)
R.sync()
to_chat(R, "<span class='userdanger'>Central command has uploaded a new set of laws you must follow. Make sure you follow them.</span>")
SEND_SOUND(R, notice_sound)
R.show_laws()
var/obj/item/radio/headset/heads/ai_integrated/cyberg_radio = R.get_radio()
cyberg_radio.make_epsilon()
var/obj/item/radio/borg/cyborg_radio = R.get_radio()
cyborg_radio.channels |= list("Response Team" = 1, "Special Ops" = 1)
cyborg_radio.config(cyborg_radio.channels)

// Locates commandos spawns
var/list/commando_spawn_locations = list()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/client/preference/loadout/loadout_glasses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/datum/gear/glasses/sechud
display_name = "Classic security HUD"
path = /obj/item/clothing/glasses/hud/security
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent","Magistrate")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective", "Internal Affairs Agent","Magistrate")

/datum/gear/glasses/goggles
display_name = "Goggles"
Expand All @@ -52,7 +52,7 @@
/datum/gear/glasses/goggles_job/sechudgoggles
display_name = "Security HUD goggles"
path = /obj/item/clothing/glasses/hud/security/goggles
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Internal Affairs Agent", "Magistrate")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective", "Internal Affairs Agent", "Magistrate")

/datum/gear/glasses/goggles_job/medhudgoggles
display_name = "Health HUD goggles"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preference/loadout/loadout_hat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
/datum/gear/hat/capcsec
display_name = "Security cap, corporate"
path = /obj/item/clothing/head/soft/sec/corp
allowed_roles = list("Head of Security", "Warden", "Security Officer")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective")

/datum/gear/hat/capsec
display_name = "Security cap"
path = /obj/item/clothing/head/soft/sec
allowed_roles = list("Head of Security", "Warden", "Security Officer")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective")

/datum/gear/hat/capjanigrey
display_name = "Cap, janitor grey"
Expand Down Expand Up @@ -146,7 +146,7 @@
/datum/gear/hat/cowboyhat/sec
display_name = "Cowboy hat, security"
path = /obj/item/clothing/head/cowboyhat/sec
allowed_roles = list("Head of Security", "Warden", "Security Officer")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective")

/datum/gear/hat/beret_purple
display_name = "Beret, purple"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/client/preference/loadout/loadout_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,12 @@
/datum/gear/uniform/sec/secorporate
display_name = "Security uniform, corporate"
path = /obj/item/clothing/under/rank/security/officer/corporate
allowed_roles = list("Head of Security", "Warden", "Security Officer")
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")

/datum/gear/uniform/sec/dispatch
display_name = "Security uniform, dispatch"
path = /obj/item/clothing/under/rank/security/officer/dispatch
allowed_roles = list("Head of Security", "Warden", "Security Officer")
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")

/datum/gear/uniform/sec/casual
display_name = "Security uniform, casual"
Expand Down
8 changes: 4 additions & 4 deletions code/modules/economy/economy_machinery/economy_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

/obj/machinery/economy/proc/attempt_account_authentification(datum/money_account/customer_account, attempted_pin, mob/user)
var/attempt_pin = attempted_pin
if(customer_account.security_level != ACCOUNT_SECURITY_ID && !attempted_pin)
//if pin is not given, we'll prompt them here
attempt_pin = input("Enter pin code", "Vendor transaction") as num
if(!Adjacent(user))
if(customer_account.security_level != ACCOUNT_SECURITY_ID && !attempt_pin)
// if pin is not given, we'll prompt them here
attempt_pin = tgui_input_number(user, "Enter pin code", "Vendor transaction", max_value = BANK_PIN_MAX, min_value = BANK_PIN_MIN)
if(!Adjacent(user) || !attempt_pin)
return FALSE
var/is_admin = is_admin(user)
if(!account_database.try_authenticate_login(customer_account, attempt_pin, restricted_bypass, FALSE, is_admin))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/economy/economy_machinery/eftpos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
//if security level high enough, prompt for pin
var/attempt_pin
if(D.security_level != ACCOUNT_SECURITY_ID)
attempt_pin = tgui_input_number(user, "Enter pin code", "EFTPOS transaction", max_value = 9999, min_value = 1000)
attempt_pin = tgui_input_number(user, "Enter pin code", "EFTPOS transaction", max_value = BANK_PIN_MAX, min_value = BANK_PIN_MIN)
if(!attempt_pin || !Adjacent(user))
return
//given the credentials, can the associated account be accessed right now?
Expand Down
2 changes: 1 addition & 1 deletion code/modules/economy/money_account.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
security_level = _security_level
account_number = SSeconomy.generate_account_number()
account_type = _account_type
account_pin = rand(10000, 99999)
account_pin = rand(BANK_PIN_MIN, BANK_PIN_MAX) // defines are currently housed in misc_defines.dm
//update SSeconomy stats
SSeconomy.total_space_credits += starting_balance

Expand Down
35 changes: 26 additions & 9 deletions code/modules/events/immovable_rod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
var/move_delay = 1
var/atom/start
var/atom/end
/// The minimum amount of damage dealt to walls, relative to their max HP.
var/wall_damage_min_fraction = 0.9
/// The maximum amount of damage dealt to walls, relative to their max HP. Values over 1 are useful for adjusting the probability of destroying the wall.
var/wall_damage_max_fraction = 1.4

/obj/effect/immovablerod/New(atom/_start, atom/_end, delay)
. = ..()
Expand Down Expand Up @@ -84,16 +88,28 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
audible_message("CLANG")

clong_turf(newloc)
for(var/atom/victim as anything in newloc)
clong_thing(victim)
if(isnull(newloc))
// The turf is dead, long live the turf!
newloc = loc

while(TRUE)
var/hit_something_dense = FALSE
for(var/atom/victim as anything in newloc)
clong_thing(victim)
if(victim.density)
hit_something_dense = TRUE

// Keep hitting stuff until there's nothing dense or we randomly go through it.
if(!hit_something_dense || prob(25))
break

/obj/effect/immovablerod/proc/clong_turf(turf/victim)
if(!victim.density)
return

if(iswallturf(victim))
var/turf/simulated/wall/W = victim
W.take_damage(rand(W.damage_cap / 3, W.damage_cap * 4 / 3))
W.take_damage(rand(W.damage_cap * wall_damage_min_fraction, W.damage_cap * wall_damage_max_fraction))
else
victim.ex_act(EXPLODE_LIGHT)

Expand All @@ -111,9 +127,13 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
victim.ex_act(EXPLODE_HEAVY)

/obj/effect/immovablerod/event
wall_damage_min_fraction = 0.33
wall_damage_max_fraction = 1.33
// The base chance to "damage" the floor when passing. This is not guaranteed to cause a full on hull breach.
// Chance to expose the tile to space is like 15% of this value.
// Chance to expose the tile to space is like 60% of this value.
var/floor_rip_chance = 40
// Chance to damage the floor if we didn't rip it.
var/floor_graze_chance = 50

/obj/effect/immovablerod/event/Move()
. = ..()
Expand All @@ -124,13 +144,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(!isfloorturf(victim))
return ..()

if(!prob(floor_rip_chance))
return

var/turf/simulated/floor/T = victim
if(prob(25))
if(prob(floor_rip_chance))
T.ex_act(EXPLODE_HEAVY)
else
else if(prob(floor_graze_chance))
T.ex_act(EXPLODE_LIGHT)

/obj/effect/immovablerod/deadchat_plays(mode = DEADCHAT_DEMOCRACY_MODE, cooldown = 6 SECONDS)
Expand Down
Loading

0 comments on commit 17d0bd1

Please sign in to comment.