Merge branch 'SPLURT-Station:master' into Snaxi-regretti

This commit is contained in:
Sara
2024-12-03 10:10:10 -07:00
committed by GitHub
41 changed files with 664 additions and 311 deletions
+105 -6
View File
@@ -1,3 +1,5 @@
#define MAX_STACK_PICKUP 30
/datum/component/storage/concrete/rped
collection_mode = COLLECT_EVERYTHING
allow_quick_gather = TRUE
@@ -9,13 +11,61 @@
max_items = 100
display_numerical_stacking = TRUE
var/static/list/allowed_material_types = list(
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/cable_coil,
)
var/static/list/allowed_bluespace_types = list(
/obj/item/stack/ore/bluespace_crystal,
/obj/item/stack/sheet/bluespace_crystal,
)
/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating())
if (!stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
if(!.)
return .
//we check how much of glass,plasteel & cable the user can insert
if(isstack(I))
//user tried to insert invalid stacktype
if(!is_type_in_list(I, allowed_material_types) && !is_type_in_list(I, allowed_bluespace_types))
return FALSE
var/obj/item/stack/the_stack = I
var/present_amount = 0
//we try to count & limit how much the user can insert of each type to prevent them from using it as an normal storage medium
for(var/obj/item/stack/stack_content in parent)
//is user trying to insert any of these listed bluespace stuff
if(is_type_in_list(I, allowed_bluespace_types))
//if yes count total bluespace stuff is the RPED and then compare the total amount to the value the user is trying to insert
if(is_type_in_list(stack_content, allowed_bluespace_types))
present_amount += stack_content.amount
//count other normal stack stuff
else if(istype(I,stack_content.type))
present_amount = stack_content.amount
break
//no more storage for this specific stack type
if(MAX_STACK_PICKUP - present_amount == 0)
return FALSE
//we want the user to insert the exact stack amount which is available so we dont have to bother subtracting & leaving left overs for the user
var/available = MAX_STACK_PICKUP-present_amount
if(available - the_stack.amount < 0)
return FALSE
else if(istype(I, /obj/item/circuitboard/machine) || istype(I, /obj/item/circuitboard/computer))
return TRUE
//check normal insertion of other stock parts
else if(!I.get_part_rating())
return FALSE
return .
/datum/component/storage/concrete/rped/quick_empty(mob/M)
var/atom/A = parent
if(!M.canUseStorage() || !A.Adjacent(M) || M.incapacitated())
@@ -52,13 +102,60 @@
max_items = 350
display_numerical_stacking = TRUE
var/static/list/allowed_material_types = list(
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/cable_coil,
)
var/static/list/allowed_bluespace_types = list(
/obj/item/stack/ore/bluespace_crystal,
/obj/item/stack/sheet/bluespace_crystal,
)
/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating())
if (!stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
if(!.)
return .
//we check how much of glass,plasteel & cable the user can insert
if(isstack(I))
//user tried to insert invalid stacktype
if(!is_type_in_list(I, allowed_material_types) && !is_type_in_list(I, allowed_bluespace_types))
return FALSE
var/obj/item/stack/the_stack = I
var/present_amount = 0
//we try to count & limit how much the user can insert of each type to prevent them from using it as an normal storage medium
for(var/obj/item/stack/stack_content in parent)
//is user trying to insert any of these listed bluespace stuff
if(is_type_in_list(I, allowed_bluespace_types))
//if yes count total bluespace stuff is the RPED and then compare the total amount to the value the user is trying to insert
if(is_type_in_list(stack_content, allowed_bluespace_types))
present_amount += stack_content.amount
//count other normal stack stuff
else if(istype(I,stack_content.type))
present_amount = stack_content.amount
break
//no more storage for this specific stack type
if(MAX_STACK_PICKUP - present_amount == 0)
return FALSE
//we want the user to insert the exact stack amount which is available so we dont have to bother subtracting & leaving left overs for the user
var/available = MAX_STACK_PICKUP-present_amount
if(available - the_stack.amount < 0)
return FALSE
else if(istype(I, /obj/item/circuitboard/machine) || istype(I, /obj/item/circuitboard/computer))
return TRUE
//check normal insertion of other stock parts
else if(!I.get_part_rating())
return FALSE
return .
/datum/component/storage/concrete/bluespace/rped/quick_empty(mob/M)
var/atom/A = parent
@@ -85,3 +182,5 @@
stoplag(1)
progress.end_progress()
A.do_squish(0.8, 1.2)
#undef MAX_STACK_PICKUP
+8 -6
View File
@@ -142,16 +142,18 @@
var/static/list/show_directions = list(SOUTH, WEST)
if(H.mind && (H.mind.assigned_role != H.mind.special_role) && (H.mind.assigned_role != "Stowaway"))
var/assignment
var/displayed_rank
if(H.mind.assigned_role)
assignment = H.mind.assigned_role
else if(H.job)
assignment = H.job
else
assignment = "Unassigned"
//Skyrat changes
if(C && C.prefs && C.prefs.alt_titles_preferences[assignment])
assignment = C.prefs.alt_titles_preferences[assignment]
//End of skyrat changes
if(C && C.prefs && C.prefs.alt_titles_preferences[assignment])
assignment = C.prefs.alt_titles_preferences[assignment]
if(assignment)
displayed_rank = C.prefs.alt_titles_preferences[assignment]
var/static/record_id_num = 1001
var/id = num2hex(record_id_num++,6)
@@ -174,7 +176,7 @@
var/datum/data/record/G = new()
G.fields["id"] = id
G.fields["name"] = H.real_name
G.fields["rank"] = assignment
G.fields["rank"] = displayed_rank
G.fields["age"] = H.age
G.fields["species"] = H.dna.species.name
G.fields["fingerprint"] = md5(H.dna.uni_identity)
@@ -221,7 +223,7 @@
var/datum/data/record/L = new()
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") //surely this should just be id, like the others?
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["rank"] = displayed_rank
L.fields["age"] = H.age
if(H.gender == MALE)
G.fields["gender"] = "Male"
+68 -61
View File
@@ -1,66 +1,73 @@
/datum/element/cleaning/Attach(datum/target)
/datum/element/cleaning
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
id_arg_index = 2
/// Range of cleaning on moving
var/range = 0
/datum/element/cleaning/Attach(atom/movable/cleaner, cleaning_range)
. = ..()
if(!ismovable(target))
if(!istype(cleaner))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(Clean))
if(cleaning_range)
range = cleaning_range
RegisterSignal(cleaner, COMSIG_MOVABLE_MOVED, PROC_REF(Clean))
/datum/element/cleaning/Detach(datum/target)
/datum/element/cleaning/Detach(atom/movable/cleaner)
. = ..()
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
UnregisterSignal(cleaner, COMSIG_MOVABLE_MOVED)
/datum/element/cleaning/proc/Clean(datum/source)
var/atom/movable/AM = source
var/turf/T = AM.loc
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
for(var/A in T)
if(is_cleanable(A))
qdel(A)
else if(isitem(A))
var/obj/item/cleaned_item = A
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_item.clean_blood()
if(ismob(cleaned_item.loc))
var/mob/M = cleaned_item.loc
M.regenerate_icons()
else if(ishuman(A))
var/mob/living/carbon/human/cleaned_human = A
if(cleaned_human.lying)
if(cleaned_human.head)
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.head.clean_blood()
cleaned_human.update_inv_head()
if(cleaned_human.wear_suit)
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_wear_suit()
else if(cleaned_human.w_uniform)
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_w_uniform()
//skyrat edit
else if(cleaned_human.w_underwear)
SEND_SIGNAL(cleaned_human.w_underwear, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_underwear.clean_blood()
cleaned_human.update_inv_w_underwear()
else if(cleaned_human.w_socks)
SEND_SIGNAL(cleaned_human.w_socks, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_socks.clean_blood()
cleaned_human.update_inv_w_socks()
else if(cleaned_human.w_shirt)
SEND_SIGNAL(cleaned_human.w_shirt, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_shirt.clean_blood()
cleaned_human.update_inv_w_shirt()
else if(cleaned_human.wrists)
SEND_SIGNAL(cleaned_human.wrists, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_shirt.clean_blood()
cleaned_human.update_inv_wrists()
//
if(cleaned_human.shoes)
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes()
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.clean_blood()
cleaned_human.wash_cream()
cleaned_human.regenerate_icons()
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
/datum/element/cleaning/proc/Clean(atom/movable/cleaner)
for (var/turf/turf in RANGE_TURFS(range, cleaner.loc))
SEND_SIGNAL(turf, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
for(var/atom/atom as anything in turf)
if(is_cleanable(atom))
qdel(atom)
else if(isitem(atom))
var/obj/item/cleaned_item = atom
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_item.clean_blood()
if(ismob(cleaned_item.loc))
var/mob/mob = cleaned_item.loc
mob.regenerate_icons()
else if(ishuman(atom))
var/mob/living/carbon/human/cleaned_human = atom
if(cleaned_human.lying)
if(cleaned_human.head)
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.head.clean_blood()
cleaned_human.update_inv_head()
if(cleaned_human.wear_suit)
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_wear_suit()
else if(cleaned_human.w_uniform)
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_w_uniform()
//skyrat edit
else if(cleaned_human.w_underwear)
SEND_SIGNAL(cleaned_human.w_underwear, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_underwear.clean_blood()
cleaned_human.update_inv_w_underwear()
else if(cleaned_human.w_socks)
SEND_SIGNAL(cleaned_human.w_socks, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_socks.clean_blood()
cleaned_human.update_inv_w_socks()
else if(cleaned_human.w_shirt)
SEND_SIGNAL(cleaned_human.w_shirt, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_shirt.clean_blood()
cleaned_human.update_inv_w_shirt()
else if(cleaned_human.wrists)
SEND_SIGNAL(cleaned_human.wrists, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.w_shirt.clean_blood()
cleaned_human.update_inv_wrists()
//
if(cleaned_human.shoes)
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes()
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
cleaned_human.clean_blood()
cleaned_human.wash_cream()
cleaned_human.regenerate_icons()
to_chat(cleaned_human, span_danger("[cleaner] cleans your face!"))
+7 -6
View File
@@ -63,12 +63,13 @@
//msg = "<b>[user]</b> " + msg //SKYRAT CHANGE
var/dchatmsg = "<span class='emote'><b>[user]</b> [msg]</span>" //SKYRAT CHANGE
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(user)
if(M.stat == DEAD && M.client && (M.client.prefs && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(T, null)) && (user.client)) //SKYRAT CHANGE - only user controlled mobs show their emotes to all-seeing ghosts, to reduce chat spam
M.show_message(dchatmsg) //SKYRAT CHANGE
if(user.client)
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(user)
if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
M.show_message(dchatmsg)
if(emote_type == EMOTE_AUDIBLE)
user.audible_message(dchatmsg, runechat_popup = chat_popup, rune_msg = msg)