Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdGinalD committed Sep 27, 2024
2 parents 8b2f4d9 + ee73794 commit 67d721a
Show file tree
Hide file tree
Showing 36 changed files with 388 additions and 132 deletions.
30 changes: 17 additions & 13 deletions _maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,7 @@
/area/ruin/space/deepstorage)
"gq" = (
/obj/structure/rack,
/obj/effect/spawner/lootdrop/bluespace_tap/cultural,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "vault"
Expand Down Expand Up @@ -2664,9 +2665,10 @@
},
/area/ruin/space/deepstorage)
"pk" = (
/obj/structure/table/reinforced,
/obj/effect/decal/cleanable/dirt,
/obj/item/salvage/ruin/russian,
/obj/structure/rack,
/obj/item/stack/spacecash/c500,
/obj/effect/spawner/lootdrop/bluespace_tap/cultural,
/turf/simulated/floor/plasteel{
dir = 10;
icon_state = "vault"
Expand All @@ -2675,9 +2677,8 @@
"ps" = (
/obj/structure/rack,
/obj/effect/turf_decal/delivery/hollow,
/obj/item/grenade/confetti,
/obj/item/grenade/confetti,
/obj/item/grenade/confetti,
/obj/item/stack/spacecash/c500,
/obj/effect/spawner/lootdrop/bluespace_tap/organic,
/turf/simulated/floor/plasteel{
dir = 10;
icon_state = "vault"
Expand Down Expand Up @@ -3939,8 +3940,10 @@
/turf/simulated/floor/plasteel,
/area/ruin/space/deepstorage)
"ye" = (
/obj/structure/table/reinforced,
/obj/item/salvage/ruin/russian,
/obj/structure/rack,
/obj/item/grenade/confetti,
/obj/item/grenade/confetti,
/obj/item/grenade/confetti,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "vault"
Expand Down Expand Up @@ -4673,10 +4676,10 @@
/turf/simulated/floor/catwalk,
/area/ruin/space/deepstorage)
"Cn" = (
/obj/structure/safe,
/obj/effect/turf_decal/delivery/hollow,
/obj/item/stack/spacecash/c500,
/obj/effect/spawner/random/deepstorage_award,
/obj/structure/rack,
/obj/effect/spawner/random/deepstorage_reward,
/obj/effect/spawner/random/deepstorage_reward,
/turf/simulated/floor/plasteel{
dir = 10;
icon_state = "vault"
Expand Down Expand Up @@ -5482,8 +5485,8 @@
/area/ruin/space/deepstorage)
"IR" = (
/obj/effect/turf_decal/delivery/hollow,
/obj/structure/safe,
/obj/item/stack/spacecash/c500,
/obj/structure/rack,
/obj/effect/spawner/lootdrop/bluespace_tap/organic,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "vault"
Expand Down Expand Up @@ -6016,6 +6019,7 @@
/obj/structure/rack,
/obj/item/paper/researchnotes,
/obj/effect/turf_decal/delivery/hollow,
/obj/effect/spawner/random/deepstorage_reward/main,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "vault"
Expand Down Expand Up @@ -7685,7 +7689,7 @@
/area/ruin/space/deepstorage)
"Yk" = (
/obj/structure/table/reinforced,
/obj/item/salvage/ruin/nanotrasen,
/obj/item/paper/researchnotes,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "vault"
Expand Down
26 changes: 24 additions & 2 deletions _maps/map_files/stations/cerestation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -58979,6 +58979,20 @@
},
/turf/simulated/floor/wood,
/area/station/public/vacant_office)
"lwZ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/structure/cable/orange{
d1 = 1;
d2 = 2;
icon_state = "1-2"
},
/obj/structure/disposalpipe/junction/reversed{
dir = 1
},
/turf/simulated/floor/plating{
icon_state = "asteroidplating"
},
/area/station/maintenance/port2)
"lxe" = (
/obj/structure/table/reinforced,
/obj/item/transfer_valve{
Expand Down Expand Up @@ -102295,6 +102309,14 @@
/obj/machinery/hologram/holopad,
/turf/simulated/floor/carpet,
/area/station/medical/psych)
"xGy" = (
/obj/structure/disposalpipe/junction/y{
dir = 4
},
/turf/simulated/floor/plating{
icon_state = "asteroidplating"
},
/area/station/maintenance/port2)
"xGA" = (
/obj/machinery/door/airlock/atmos/glass{
autoclose = 0;
Expand Down Expand Up @@ -126615,7 +126637,7 @@ xbi
huq
huq
huq
huq
xGy
uNO
czl
baF
Expand Down Expand Up @@ -126872,7 +126894,7 @@ qoK
nxG
nxG
nxG
eiE
lwZ
wph
oZo
baF
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/riding/riding_vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
return
var/obj/tgvehicle/scooter/skateboard/S = parent
for(var/mob/living/L in S.return_occupants()) // Only one on a skateboard unless an admin var edits it. If an admin var edits it, that is on them.
if((L.staminaloss >= 60 || L.health <= 40) && !L.absorb_stun(0)) // Only injured people can be shot off. Hulks and people on stimulants can not be shot off.
if((L.getStaminaLoss() >= 60 || L.health <= 40) && !L.absorb_stun(0)) // Only injured people can be shot off. Hulks and people on stimulants can not be shot off.
S.unbuckle_mob(L)
L.KnockDown(2 SECONDS)
L.visible_message("<span class='warning'>[L] gets shot off [S] by [projectile]!</span>",
Expand Down
4 changes: 2 additions & 2 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
return TRUE

/datum/status_effect/speedlegs/tick()
if(owner.stat || owner.staminaloss >= 90 || cling.chem_charges <= (stacks + 1) * 3)
if(owner.stat || owner.getStaminaLoss() >= 90 || cling.chem_charges <= (stacks + 1) * 3)
to_chat(owner, "<span class='danger'>Our muscles relax without the energy to strengthen them.</span>")
owner.Weaken(6 SECONDS)
qdel(src)
Expand All @@ -561,7 +561,7 @@
to_chat(owner, "<span class='warning'>Our legs are really starting to hurt...</span>")

/datum/status_effect/speedlegs/before_remove()
if(stacks < 3 && !(owner.stat || owner.staminaloss >= 90 || cling.chem_charges <= (stacks + 1) * 3)) //We don't want people to turn it on and off fast, however, we need it forced off if the 3 later conditions are met.
if(stacks < 3 && !(owner.stat || owner.getStaminaLoss() >= 90 || cling.chem_charges <= (stacks + 1) * 3)) //We don't want people to turn it on and off fast, however, we need it forced off if the 3 later conditions are met.
to_chat(owner, "<span class='notice'>Our muscles just tensed up, they will not relax so fast.</span>")
return FALSE
return TRUE
Expand Down
1 change: 1 addition & 0 deletions code/datums/uplink_items/uplink_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/butcher_chainsaw
cost = 65
surplus = 0 // This has caused major problems with un-needed chainsaw massacres. Bwoink bait.
excludefrom = list(UPLINK_TYPE_NUCLEAR)

/datum/uplink_item/dangerous/universal_gun_kit
name = "Universal Self Assembling Gun Kit"
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/clonepod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
create_clone()
return

if(clone.cloneloss >= 25)
if(clone.getCloneLoss() >= 25)
clone.adjustCloneLoss(-2)
return

Expand Down Expand Up @@ -373,7 +373,7 @@
reset_cloning()
return TRUE

if(!clone.cloneloss)
if(!clone.getCloneLoss())
clone.forceMove(loc)
var/datum/mind/patient_mind = locateUID(patient_data.mindUID)
patient_mind.transfer_to(clone)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
active_power_consumption = 300 //when active, this turret takes up constant 300 Equipment power
power_channel = PW_CHANNEL_EQUIPMENT //drains power from the EQUIPMENT channel
armor = list(melee = 50, bullet = 30, laser = 30, energy = 30, bomb = 30, rad = 0, fire = 90, acid = 90)
///this will be visible when above doors/firelocks/blastdoors to prevent cheese
layer = ABOVE_OBJ_LAYER
var/raised = FALSE //if the turret cover is "open" and the turret is raised
var/raising= FALSE //if the turret is currently opening or closing its cover
var/health = 80 //the turret's health
Expand Down
6 changes: 5 additions & 1 deletion code/game/machinery/recharger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
active_power_consumption = 200
pass_flags = PASSTABLE

var/list/allowed_devices = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/rcs, /obj/item/bodyanalyzer, /obj/item/handheld_chem_dispenser, /obj/item/clothing/suit/armor/reactive)
var/list/allowed_devices = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/rcs, /obj/item/bodyanalyzer, /obj/item/handheld_chem_dispenser, /obj/item/clothing/suit/armor/reactive, /obj/item/wormhole_jaunter/wormhole_weaver)
var/recharge_coeff = 1

var/obj/item/charging = null // The item that is being charged
Expand Down Expand Up @@ -203,6 +203,10 @@
var/obj/item/clothing/suit/armor/reactive/A = I
return A.cell

if(istype(I, /obj/item/wormhole_jaunter/wormhole_weaver))
var/obj/item/wormhole_jaunter/wormhole_weaver/W = I
return W.wcell

return null

/obj/machinery/recharger/proc/check_cell_needs_recharging(obj/item/stock_parts/cell/C)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/teleporter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@
continue
if(!is_teleport_allowed(T.z) && !R.cc_beacon)
continue
if(R.wormhole_weaver)
continue
if(R.syndicate && !emagged)
continue
var/tmpname = T.loc.name
Expand Down
18 changes: 8 additions & 10 deletions code/game/machinery/vendors/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
// List of vending_product items available.
var/list/product_records = list()
var/list/hidden_records = list()
var/list/imagelist = list()

/// Unimplemented list of ads that are meant to show up somewhere, but don't.
var/list/ads_list = list()
Expand Down Expand Up @@ -160,10 +159,6 @@
if(build_inv) //non-constructable vending machine
build_inventory(products, product_records)
build_inventory(contraband, hidden_records)
for(var/datum/data/vending_product/R in (product_records + hidden_records))
var/obj/item/I = R.product_path
var/pp = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-")
imagelist[pp] = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]"

if(LAZYLEN(slogan_list))
// So not all machines speak at the exact same time.
Expand Down Expand Up @@ -645,28 +640,31 @@
data["product_records"] = list()
var/i = 1
for(var/datum/data/vending_product/R in product_records)
var/obj/item = R.product_path
var/list/data_pr = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = (R.product_path in prices) ? prices[R.product_path] : 0,
price = (item in prices) ? prices[item] : 0,
icon = item.icon,
icon_state = item.icon_state,
max_amount = R.max_amount,
is_hidden = FALSE,
inum = i++
)
data["product_records"] += list(data_pr)
data["hidden_records"] = list()
for(var/datum/data/vending_product/R in hidden_records)
var/obj/item = R.product_path
var/list/data_hr = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = (R.product_path in prices) ? prices[R.product_path] : 0,
price = (item in prices) ? prices[item] : 0,
icon = item.icon,
icon_state = item.icon_state,
max_amount = R.max_amount,
is_hidden = TRUE,
inum = i++,
premium = TRUE
)
data["hidden_records"] += list(data_hr)
data["imagelist"] = imagelist
return data

/obj/machinery/economy/vending/ui_act(action, params, datum/tgui/ui)
Expand Down
40 changes: 6 additions & 34 deletions code/game/objects/items/devices/painter/floor_painter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module_name = "floor painter"
module_state = "floor_painter"

var/floor_icon
var/floor_icon = 'icons/turf/floors.dmi'
var/floor_state = "floor"
var/floor_dir = SOUTH

Expand All @@ -21,23 +21,6 @@
"darkred", "darkredcorners", "darkredfull", "darkblue", "darkbluecorners", "darkbluefull", "darkgreen", "darkgreencorners",
"darkgreenfull", "darkyellow", "darkyellowcorners", "darkyellowfull", "darkbrown", "darkbrowncorners", "darkbrownfull")

// This is a double-list. First entry is the type key, second is the direction, with the final value being the b64 of the icon
var/static/list/lookup_cache = list()

/datum/painter/floor/New(obj/item/painter/parent_painter)
. = ..()
if(!length(lookup_cache))
for(var/style in allowed_states)
if(!(style in lookup_cache))
lookup_cache += style
lookup_cache[style] = list()

for(var/dir in GLOB.alldirs)
var/icon/floor_icon = icon('icons/turf/floors.dmi', style, dir)
// These indexes have to be strings otherwise it treats it as a list index not a map lookup index
lookup_cache[style] += "[dir]"
lookup_cache[style]["[dir]"] = icon2base64(floor_icon)

/datum/painter/floor/paint_atom(atom/target, mob/user)
if(!istype(target, /turf/simulated/floor/plasteel))
to_chat(user, "<span class='warning'>[holder] can only be used on station flooring.</span>")
Expand Down Expand Up @@ -65,31 +48,20 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "FloorPainter", module_name)
// Disable automatic updates, because:
// 1) we are the only user of the item, and don't expect to observe external changes
// 2) generating and sending the icon each tick is a bit expensive, and creates small but noticeable lag
// Disable automatic updates, because we are the only user of the item, and don't expect to observe external changes
ui.set_autoupdate(FALSE)
ui.open()

/datum/painter/floor/ui_data(mob/user)
var/list/data = list()
data["availableStyles"] = allowed_states
data["selectedStyle"] = floor_state
data["selectedDir"] = dir2text(floor_dir)

data["directionsPreview"] = list()
for(var/dir in GLOB.alldirs)
data["directionsPreview"][dir2text(dir)] = lookup_cache[floor_state]["[dir]"]

data["selectedDir"] = floor_dir
return data


/datum/painter/floor/ui_static_data(mob/user)
var/list/data = list()
data["allStylesPreview"] = list()
for(var/style in allowed_states)
data["allStylesPreview"][style] = lookup_cache[style]["[SOUTH]"]

data["icon"] = floor_icon
data["availableStyles"] = allowed_states
return data

/datum/painter/floor/ui_act(action, params)
Expand All @@ -111,7 +83,7 @@
floor_state = allowed_states[index]

if(action == "select_direction")
var/dir = text2dir(params["direction"])
var/dir = params["direction"]
if(dir != 0)
floor_dir = dir

Expand Down
7 changes: 7 additions & 0 deletions code/game/objects/items/devices/radio/beacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
var/syndicate = FALSE
var/area_bypass = FALSE
var/cc_beacon = FALSE //set if allowed to teleport to even if on zlevel2
var/wormhole_weaver = FALSE // special beacons for wormwhole weaver

/obj/item/beacon/Initialize()
. = ..()
Expand Down Expand Up @@ -169,3 +170,9 @@
/obj/item/beacon/engine/sing
name = "Engine Beacon for Singularity"
enginetype = list(ENGTYPE_SING)

/obj/item/beacon/wormhole_weaver
name = "prototype beacon"
desc = "A beacon used by a prototype wormhole device."
wormhole_weaver = TRUE
icon_state = "beacon_wormhole_weaver"
Loading

0 comments on commit 67d721a

Please sign in to comment.