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
SatinIsle committed Nov 17, 2024
2 parents 711fda3 + 8af7a35 commit 9a261f3
Show file tree
Hide file tree
Showing 118 changed files with 1,478 additions and 888 deletions.
1 change: 1 addition & 0 deletions code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define CE_DARKSIGHT "darksight" // Gives perfect vision in dark

#define REAGENTS_PER_SHEET 20
#define REAGENTS_PER_ORE 20

// Attached to CE_ANTIBIOTIC
#define ANTIBIO_NORM 1
Expand Down
3 changes: 3 additions & 0 deletions code/__defines/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#define ACCESSORY_SLOT_ARMOR_M 0x8000
#define ACCESSORY_SLOT_HELM_C 0x10000 //24 bit - higher than 0x80000 will overflow

#define ACCESSORY_SLOT_RING 0x20000 //rings, knuckledusters
#define ACCESSORY_SLOT_WRIST 0x40000 //wristwatches, wrist PDA maybe?

// Bitmasks for the /obj/item/var/flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses.
// WARNING: The following flags apply only to the external suit!
#define HIDEGLOVES 0x1
Expand Down
1 change: 1 addition & 0 deletions code/__defines/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
#define JOB_ALT_CONSTRUCTION_ENGINEER "Construction Engineer"
#define JOB_ALT_ENGINEERING_CONTRACTOR "Engineering Contractor"
#define JOB_ALT_COMPUTER_TECHNICIAN "Computer Technician"
#define JOB_ALT_SALVAGE_TECHNICIAN "Salvage Technician"

#define JOB_ATMOSPHERIC_TECHNICIAN "Atmospheric Technician"
// Atmospheric Technician alt titles
Expand Down
5 changes: 5 additions & 0 deletions code/_helpers/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -620,3 +620,8 @@
return json_decode(data)
catch
return null

/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
/proc/sanitize_css_class_name(name)
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
return replacetext(name, regex, "")
2 changes: 1 addition & 1 deletion code/datums/autolathe/arms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@

/datum/category_item/autolathe/arms/knuckledusters
name = "knuckle dusters"
path =/obj/item/clothing/gloves/knuckledusters
path =/obj/item/clothing/accessory/knuckledusters
hidden = 1

/datum/category_item/autolathe/arms/tacknife
Expand Down
1 change: 1 addition & 0 deletions code/datums/supplypacks/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
/obj/item/toy/plushie/slimeplushie,
/obj/item/toy/plushie/box,
/obj/item/toy/plushie/borgplushie,
/obj/item/toy/plushie/borgplushie/drake/eng,
/obj/item/toy/plushie/borgplushie/medihound,
/obj/item/toy/plushie/borgplushie/scrubpuppy,
/obj/item/toy/plushie/foxbear,
Expand Down
6 changes: 3 additions & 3 deletions code/datums/supplypacks/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
/obj/item/material/knife/tacknife/survival,
/obj/item/material/knife/machete,
/obj/item/clothing/accessory/holster/machete,
/obj/item/clothing/gloves/watch/survival
/obj/item/clothing/accessory/watch/survival
)
cost=25
containertype = /obj/structure/closet/crate/secure/xion
Expand All @@ -200,7 +200,7 @@
/obj/item/clothing/head/pilot_vr,
/obj/item/clothing/under/rank/pilot1,
/obj/item/gun/energy/gun/protector/pilotgun/locked,
/obj/item/clothing/gloves/watch/survival
/obj/item/clothing/accessory/watch/survival
)
cost=20
containertype = /obj/structure/closet/crate/secure/xion
Expand Down Expand Up @@ -236,7 +236,7 @@
/obj/item/clothing/accessory/holster/machete,
/obj/item/storage/box/explorerkeys,
/obj/item/mapping_unit,
/obj/item/clothing/gloves/watch/survival
/obj/item/clothing/accessory/watch/survival
)
cost = 75
containertype = /obj/structure/closet/crate/secure/xion
Expand Down
6 changes: 0 additions & 6 deletions code/datums/uplink/stealthy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
item_cost = 20
path = /obj/item/pen/blade/fountain

/datum/uplink_item/item/stealthy_weapons/angrybuzzer
name = "Morphium Shock Ring"
desc = "An enigmatic ring used to create powerful electric shocks when punching. Can be used as a brute-force method of defibrillation."
item_cost = 40
path = /obj/item/clothing/gloves/ring/buzzer

/datum/uplink_item/item/stealthy_weapons/huntingtrap
name = "Camonetted Beartraps"
desc = "A box of unique beartraps which will partially cloak when deployed, allowing for more effective hunting."
Expand Down
4 changes: 4 additions & 0 deletions code/game/jobs/job/engineering_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
title = JOB_ALT_COMPUTER_TECHNICIAN
title_blurb = "A " + JOB_ALT_COMPUTER_TECHNICIAN + " fulfills similar duties to other engineers, but specializes in working with software and computers. They also often deal with integrated circuits."

/datum/alt_title/salvage_tech
title = JOB_ALT_SALVAGE_TECHNICIAN
title_blurb = "A " + JOB_ALT_SALVAGE_TECHNICIAN + " is responsible for breaking down debris and obsolete equipment to recover useful components and materials."

/datum/job/atmos
spawn_positions = 3
pto_type = PTO_ENGINEERING
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/computer/arcade_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
/obj/item/toy/redbutton = 2,
/obj/item/toy/gnome = 2,
/obj/item/toy/AI = 2,
/obj/item/clothing/gloves/ring/buzzer/toy = 2,
/obj/item/storage/box/handcuffs/fake = 2,
/obj/item/toy/nuke = 2,
/obj/item/toy/minigibber = 2,
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/antag_spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
to speak with your team, and learn what their plan is for today."))

R.key = C.key
// R.Namepick() // Apparnetly making someone a merc lets them pick a name, so this isn't needed.

spawn(1)
mercs.add_antagonist(R.mind, FALSE, TRUE, FALSE, FALSE, FALSE)
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/robot/robot_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@

feedback_inc("cyborg_birth",1)
callHook("borgify", list(O))
O.namepick()

qdel(src)
else
Expand Down
29 changes: 0 additions & 29 deletions code/game/objects/items/toys/toys_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -556,35 +556,6 @@
/obj/item/toy/AI/proc/cooldownreset()
cooldown = 0

/*
* Hand buzzer
*/
/obj/item/clothing/gloves/ring/buzzer/toy
name = "steel ring"
desc = "Torus shaped finger decoration. It has a small piece of metal on the palm-side."
icon_state = "seal-signet"
drop_sound = 'sound/items/drop/ring.ogg'

/obj/item/clothing/gloves/ring/buzzer/toy/Touch(var/atom/A, var/proximity)
if(proximity && istype(usr, /mob/living/carbon/human))

return zap(usr, A, proximity)
return 0

/obj/item/clothing/gloves/ring/buzzer/toy/zap(var/mob/living/carbon/human/user, var/atom/movable/target, var/proximity)
. = FALSE
if(user.a_intent == I_HELP && battery.percent() >= 50)
if(isliving(target))
var/mob/living/L = target

to_chat(L, span_warning("You feel a powerful shock!"))
if(!.)
playsound(L, 'sound/effects/sparks7.ogg', 40, 1)
L.electrocute_act(battery.percent() * 0, src)
return .

return 0

/*
* Toy cuffs
*/
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/items/weapons/material/shards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
var/light_glove_d = rand(2, 4)
var/no_glove_d = rand(4, 6)
var/list/forbidden_gloves = list(
/obj/item/clothing/gloves/sterile,
/obj/item/clothing/gloves/knuckledusters
/obj/item/clothing/gloves/sterile
)

if(src == user.l_hand)
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/weapons/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
to_chat(user, span_notice("\the [src] is too full to possibly fit anything else inside of it."))
return

if (istype(W, /obj/item/ore))
if (istype(W, /obj/item/ore) && !istype(W, /obj/item/ore/slag))
var/obj/item/ore/ore = W
stored_ore[ore.material]++
current_capacity++
Expand Down Expand Up @@ -178,6 +178,8 @@
if(current_pickup >= max_pickup)
max_pickup_reached = 1
break
if(istype(O, /obj/item/ore/slag))
continue
var/obj/item/ore/ore = O
stored_ore[ore.material]++
current_capacity++
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/random/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
prob(6);/obj/item/material/butterflyblade,
prob(6);/obj/item/material/butterflyhandle,
prob(2);/obj/item/material/butterfly/switchblade,
prob(2);/obj/item/clothing/gloves/knuckledusters,
prob(2);/obj/item/clothing/accessory/knuckledusters,
prob(1);/obj/item/material/knife/tacknife,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
prob(1);/obj/item/beartrap,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/random/mob_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
prob(4);/obj/item/storage/pill_bottle/zoom,
prob(4);/obj/item/material/butterfly,
prob(2);/obj/item/material/butterfly/switchblade,
prob(2);/obj/item/clothing/gloves/knuckledusters,
prob(2);/obj/item/clothing/accessory/knuckledusters,
prob(2);/obj/item/reagent_containers/syringe/drugs,
prob(1);/obj/item/material/knife/tacknife,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
/obj/item/radio,
/obj/item/gps/explorer,
/obj/item/gun/energy/gun/protector/pilotgun/locked,
/obj/item/clothing/gloves/watch/survival,
/obj/item/clothing/accessory/watch/survival,
/obj/item/clothing/accessory/storage/webbing/pilot1,
/obj/item/clothing/accessory/storage/webbing/pilot2,
/obj/item/emergency_beacon
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/structures/ghost_pods/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from the pod is not a crewmember."))
R.ckey = M.ckey
visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated."))
R.namepick()
log_and_message_admins("successfully opened \a [src] and got a Lost Drone.")
..()

Expand All @@ -57,7 +56,6 @@
definiton of 'your gravesite' is where your pod is."))
R.ckey = M.ckey
visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated."))
R.namepick()
..()

/obj/structure/ghost_pod/ghost_activated/swarm_drone
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/structures/ghost_pods/silicon_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from the pod is not a crewmember."))
R.ckey = M.ckey
visible_message(span_warning("As \the [src] opens, the eyes of the robot flicker as it is activated."))
R.namepick()
log_and_message_admins("successfully opened \a [src] and got a Lost Drone.")
used = TRUE
return TRUE
2 changes: 1 addition & 1 deletion code/game/objects/structures/trash_pile_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
prob(3);/obj/item/cracker,
prob(3);/obj/item/material/butterfly,
prob(3);/obj/item/material/butterfly/switchblade,
prob(3);/obj/item/clothing/gloves/knuckledusters,
prob(3);/obj/item/clothing/accessory/knuckledusters,
prob(3);/obj/item/clothing/gloves/heavy_engineer,
prob(3);/obj/item/reagent_containers/syringe/drugs,
prob(2);/obj/item/implanter/sizecontrol,
Expand Down
20 changes: 13 additions & 7 deletions code/modules/admin/modify_robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@
qdel(source)
. = ..()

/datum/eventkit/modify_robot/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/robot_icons)
)

/datum/eventkit/modify_robot/tgui_data(mob/user)
. = list()
// Target section for general data
var/datum/asset/spritesheet/robot_icons/spritesheet = get_asset_datum(/datum/asset/spritesheet/robot_icons)

if(target)
.["target"] = list()
.["target"]["name"] = target.name
Expand All @@ -62,10 +69,8 @@
// Target section for options once a module has been selected
if(target.module)
.["target"]["active"] = target.icon_selected
.["target"]["front"] = icon2base64(get_flat_icon(target,dir=SOUTH,no_anim=TRUE))
.["target"]["side"] = icon2base64(get_flat_icon(target,dir=WEST,no_anim=TRUE))
.["target"]["side_alt"] = icon2base64(get_flat_icon(target,dir=EAST,no_anim=TRUE))
.["target"]["back"] = icon2base64(get_flat_icon(target,dir=NORTH,no_anim=TRUE))
.["target"]["sprite"] = sanitize_css_class_name("[target.sprite_datum.type]")
.["target"]["sprite_size"] = spritesheet.icon_size_id(.["target"]["sprite"] + "S")
.["target"]["modules"] = get_target_items(user)
var/list/module_options = list()
for(var/module in robot_modules)
Expand Down Expand Up @@ -110,7 +115,7 @@
.["access_options"] = access_options
// Section for source data for the module we might want to salvage
if(source)
.["source"] += get_module_source(user)
.["source"] += get_module_source(user, spritesheet)
var/list/all_robots = list()
for(var/mob/living/silicon/robot/R in silicon_mob_list)
if(!R.loc)
Expand Down Expand Up @@ -573,10 +578,11 @@
target_items += list(list("name" = item.name, "ref" = "\ref[item]", "icon" = icon2html(item, user, sourceonly=TRUE), "desc" = item.desc))
return target_items

/datum/eventkit/modify_robot/proc/get_module_source(var/mob/user)
/datum/eventkit/modify_robot/proc/get_module_source(var/mob/user, var/datum/asset/spritesheet/robot_icons/spritesheet)
var/list/source_list = list()
source_list["model"] = source.module
source_list["front"] = icon2base64(get_flat_icon(source,dir=SOUTH,no_anim=TRUE))
source_list["sprite"] = sanitize_css_class_name("[source.sprite_datum.type]")
source_list["sprite_size"] = spritesheet.icon_size_id(source_list["sprite"] + "S")
var/list/source_items = list()
for(var/obj/item in (source.module.modules | source.module.emag))
var/exists
Expand Down
39 changes: 39 additions & 0 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,45 @@
Insert("bottle-[i]", 'icons/obj/chemical.dmi', "bottle-[i]")


// Robot UI sprites
/datum/asset/spritesheet/robot_icons
name = "robot_icons"

/datum/asset/spritesheet/robot_icons/create_spritesheets()
for(var/datum/robot_sprite/S as anything in typesof(/datum/robot_sprite))
if(!S.name || !S.sprite_icon_state) // snowflake out those customs... they suck
continue
var/icon/I_N = icon(S.sprite_icon, S.sprite_icon_state, NORTH)
var/icon/I_S = icon(S.sprite_icon, S.sprite_icon_state, SOUTH)
var/icon/I_W = icon(S.sprite_icon, S.sprite_icon_state, WEST)
var/icon/I_E = icon(S.sprite_icon, S.sprite_icon_state, EAST)
if(S.has_eye_sprites)
var/icon/I_NE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", NORTH)
if(I_NE)
I_N.Blend(I_NE, ICON_OVERLAY)
if(S.has_eye_sprites)
var/icon/I_SE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", SOUTH)
if(I_SE)
I_S.Blend(I_SE, ICON_OVERLAY)
if(S.has_eye_sprites)
var/icon/I_WE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", WEST)
if(I_WE)
I_W.Blend(I_WE, ICON_OVERLAY)
if(S.has_eye_sprites)
var/icon/I_EE = icon(S.sprite_icon, "[S.sprite_icon_state]-eyes", EAST)
if(I_EE)
I_E.Blend(I_EE, ICON_OVERLAY)
var/imgid = sanitize_css_class_name("[S.type]")
I_N.Scale(120, 120)
I_S.Scale(120, 120)
I_W.Scale(120, 120)
I_E.Scale(120, 120)
Insert(imgid + "N", I_N)
Insert(imgid + "S", I_S)
Insert(imgid + "W", I_W)
Insert(imgid + "E", I_E)


//Cloning pod sprites for UIs
/datum/asset/simple/cloning
assets = list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,18 +360,18 @@

/datum/gear/accessory/wristband_collection
display_name = "wristbands (selection)"
path = /obj/item/clothing/accessory/wristbandcollection
path = /obj/item/clothing/accessory/wristband/collection

/datum/gear/accessory/wristband_collection/New()
..()
var/list/wristband_lists = list(
"Green, Blue and Yellow" = /obj/item/clothing/accessory/wristbandcollection,
"Pink, Black and Red" = /obj/item/clothing/accessory/wristbandcollection/pink,
"Red and Orange" = /obj/item/clothing/accessory/wristbandcollection/les,
"White, Pink and Blue" = /obj/item/clothing/accessory/wristbandcollection/trans,
"Blue, Purple and Pink" = /obj/item/clothing/accessory/wristbandcollection/bi,
"Black, White and Grey" = /obj/item/clothing/accessory/wristbandcollection/ace,
"Spiked" = /obj/item/clothing/accessory/wristband_spiked
"Green, Blue and Yellow" = /obj/item/clothing/accessory/wristband/collection,
"Pink, Black and Red" = /obj/item/clothing/accessory/wristband/collection/pink,
"Red and Orange" = /obj/item/clothing/accessory/wristband/collection/les,
"White, Pink and Blue" = /obj/item/clothing/accessory/wristband/collection/trans,
"Blue, Purple and Pink" = /obj/item/clothing/accessory/wristband/collection/bi,
"Black, White and Grey" = /obj/item/clothing/accessory/wristband/collection/ace,
"Spiked" = /obj/item/clothing/accessory/wristband/spiked
)
gear_tweaks += new/datum/gear_tweak/path(wristband_lists)

Expand Down
Loading

0 comments on commit 9a261f3

Please sign in to comment.