Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into auxtools-atmos
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
/datum/crafting_recipe/armwraps
|
||||
name = "Armwraps"
|
||||
result = /obj/item/clothing/gloves/fingerless/pugilist
|
||||
result = /obj/item/clothing/gloves/fingerless/pugilist/crafted
|
||||
time = 60
|
||||
tools = list(TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/stack/sheet/cloth = 4,
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
/datum/component/embedded/proc/jostleCheck()
|
||||
var/mob/living/carbon/victim = parent
|
||||
|
||||
var/damage = weapon.w_class * pain_mult
|
||||
var/damage = weapon.w_class * jostle_pain_mult
|
||||
var/pain_chance_current = jostle_chance
|
||||
if(victim.m_intent == MOVE_INTENT_WALK || !(victim.mobility_flags & MOBILITY_STAND))
|
||||
pain_chance_current *= 0.5
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
||||
var/turf/T = get_turf(A)
|
||||
var/datum/progressbar/progress = new(M, length(things), T)
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||
stoplag(1)
|
||||
qdel(progress)
|
||||
A.do_squish(0.8, 1.2)
|
||||
@@ -81,7 +81,7 @@
|
||||
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
||||
var/turf/T = get_turf(A)
|
||||
var/datum/progressbar/progress = new(M, length(things), T)
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||
stoplag(1)
|
||||
qdel(progress)
|
||||
A.do_squish(0.8, 1.2)
|
||||
|
||||
@@ -271,20 +271,20 @@
|
||||
var/turf/T = get_turf(A)
|
||||
var/list/things = contents()
|
||||
var/datum/progressbar/progress = new(M, length(things), T)
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||
stoplag(1)
|
||||
qdel(progress)
|
||||
A.do_squish(0.8, 1.2)
|
||||
|
||||
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE)
|
||||
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE, mob/user)
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/item/I in things)
|
||||
things -= I
|
||||
if(I.loc != real_location)
|
||||
continue
|
||||
remove_from_storage(I, target)
|
||||
if(trigger_on_found && I.on_found())
|
||||
if(trigger_on_found && user && (user.active_storage != src) && I.on_found(user))
|
||||
return FALSE
|
||||
remove_from_storage(I, target)
|
||||
if(TICK_CHECK)
|
||||
progress.update(progress.goal - length(things))
|
||||
return TRUE
|
||||
@@ -429,7 +429,7 @@
|
||||
return FALSE
|
||||
// this must come before the screen objects only block, dunno why it wasn't before
|
||||
if(over_object == M)
|
||||
user_show_to_mob(M)
|
||||
user_show_to_mob(M, trigger_on_found = TRUE)
|
||||
return
|
||||
if(isrevenant(M))
|
||||
RevenantThrow(over_object, M, source)
|
||||
@@ -448,15 +448,28 @@
|
||||
return
|
||||
A.add_fingerprint(M)
|
||||
|
||||
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE)
|
||||
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE, trigger_on_found = FALSE)
|
||||
var/atom/A = parent
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
A.add_fingerprint(M)
|
||||
if(!force && (check_locked(null, M) || !M.CanReach(parent, view_only = TRUE)))
|
||||
return FALSE
|
||||
if(trigger_on_found)
|
||||
if(check_on_found(M))
|
||||
return
|
||||
ui_show(M)
|
||||
|
||||
/**
|
||||
* Check if we should trigger on_found()
|
||||
* If this returns TRUE, it means an on_found() returned TRUE and immediately broke the chain.
|
||||
* In most contexts, this should mean to stop.
|
||||
*/
|
||||
/datum/component/storage/proc/check_on_found(mob/user)
|
||||
for(var/obj/item/I in contents())
|
||||
if(I.on_found(user))
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/proc/mousedrop_receive(datum/source, atom/movable/O, mob/M)
|
||||
if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
@@ -579,8 +592,8 @@
|
||||
/datum/component/storage/proc/show_to_ghost(datum/source, mob/dead/observer/M)
|
||||
return user_show_to_mob(M, TRUE)
|
||||
|
||||
/datum/component/storage/proc/signal_show_attempt(datum/source, mob/showto, force = FALSE)
|
||||
return user_show_to_mob(showto, force)
|
||||
/datum/component/storage/proc/signal_show_attempt(datum/source, mob/showto, force = FALSE, trigger_on_found = TRUE)
|
||||
return user_show_to_mob(showto, force, trigger_on_found = trigger_on_found)
|
||||
|
||||
/datum/component/storage/proc/on_check()
|
||||
return TRUE
|
||||
@@ -649,7 +662,7 @@
|
||||
if(A.loc == user)
|
||||
. = COMPONENT_NO_ATTACK_HAND
|
||||
if(!check_locked(source, user, TRUE))
|
||||
ui_show(user)
|
||||
user_show_to_mob(user, trigger_on_found = TRUE)
|
||||
A.do_jiggle()
|
||||
|
||||
/datum/component/storage/proc/signal_on_pickup(datum/source, mob/user)
|
||||
@@ -679,7 +692,7 @@
|
||||
var/atom/A = parent
|
||||
if(!quickdraw)
|
||||
A.add_fingerprint(user)
|
||||
user_show_to_mob(user)
|
||||
user_show_to_mob(user, trigger_on_found = TRUE)
|
||||
if(rustle_sound)
|
||||
playsound(A, "rustle", 50, 1, -5)
|
||||
return TRUE
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
var/left_hand
|
||||
var/inv_slots
|
||||
var/proctype //if present, will be invoked on headwear generation.
|
||||
var/escape_on_find = FALSE //if present, will be released upon the item being 'found' (i.e. opening a container or pocket with it present)
|
||||
|
||||
/datum/element/mob_holder/Attach(datum/target, worn_state, alt_worn, right_hand, left_hand, inv_slots = NONE, proctype)
|
||||
/datum/element/mob_holder/Attach(datum/target, worn_state, alt_worn, right_hand, left_hand, inv_slots = NONE, proctype, escape_on_find)
|
||||
. = ..()
|
||||
|
||||
if(!isliving(target))
|
||||
@@ -20,6 +21,7 @@
|
||||
src.left_hand = left_hand
|
||||
src.inv_slots = inv_slots
|
||||
src.proctype = proctype
|
||||
src.escape_on_find = escape_on_find
|
||||
|
||||
RegisterSignal(target, COMSIG_CLICK_ALT, .proc/mob_try_pickup)
|
||||
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
@@ -55,6 +57,8 @@
|
||||
to_chat(user, "<span class='notice'>You pick [source] up.</span>")
|
||||
source.drop_all_held_items()
|
||||
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(source), source, worn_state, alt_worn, right_hand, left_hand, inv_slots)
|
||||
holder.escape_on_find = escape_on_find
|
||||
|
||||
if(proctype)
|
||||
INVOKE_ASYNC(src, proctype, source, holder, user)
|
||||
user.put_in_hands(holder)
|
||||
@@ -78,6 +82,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
dynamic_hair_suffix = ""
|
||||
var/mob/living/held_mob
|
||||
var/escape_on_find
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/target, worn_state, alt_worn, right_hand, left_hand, slots = NONE)
|
||||
. = ..()
|
||||
@@ -213,3 +218,9 @@
|
||||
/obj/item/clothing/head/mob_holder/transfer_air_ratio(datum/gas_mixture/taker, ratio)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.transfer_air(taker, ratio)
|
||||
|
||||
// escape when found if applicable
|
||||
/obj/item/clothing/head/mob_holder/on_found(mob/living/finder)
|
||||
if(escape_on_find)
|
||||
finder.visible_message("[finder] accidentally releases the [held_mob]!")
|
||||
release()
|
||||
|
||||
@@ -8,23 +8,24 @@
|
||||
time_coeff = 5
|
||||
instability = 30
|
||||
|
||||
/datum/mutation/human/space_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "space_adapt", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/space_adaptation/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
|
||||
owner.add_filter("space_glow", 2, list("type" = "outline", "color" = "#ffe46bd8", "size" = 1))
|
||||
addtimer(CALLBACK(src, .proc/glow_loop, owner), rand(1,19))
|
||||
|
||||
/datum/mutation/human/space_adaptation/proc/glow_loop(mob/living/carbon/human/owner)
|
||||
var/filter = owner.get_filter("space_glow")
|
||||
if(filter)
|
||||
animate(filter, alpha = 190, time = 15, loop = -1)
|
||||
animate(alpha = 110, time = 25)
|
||||
|
||||
/datum/mutation/human/space_adaptation/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
|
||||
owner.remove_filter("space_glow")
|
||||
|
||||
|
||||
@@ -207,3 +207,101 @@
|
||||
if(!key_valid)
|
||||
GLOB.topic_status_cache = .
|
||||
|
||||
/datum/world_topic/jsonstatus
|
||||
keyword = "jsonstatus"
|
||||
|
||||
/datum/world_topic/jsonstatus/Run(list/input, addr)
|
||||
. = list()
|
||||
.["mode"] = "hidden" // GLOB.master_mode - woops we don't want people to know if there's secret/extended :)
|
||||
.["round_id"] = "[GLOB.round_id]"
|
||||
.["players"] = GLOB.clients.len
|
||||
var/list/adm = get_admin_counts()
|
||||
var/list/presentmins = adm["present"]
|
||||
var/list/afkmins = adm["afk"]
|
||||
.["admins"] = presentmins.len + afkmins.len //equivalent to the info gotten from adminwho
|
||||
.["security_level"] = "[NUM2SECLEVEL(GLOB.security_level)]"
|
||||
.["round_duration"] = WORLDTIME2TEXT("hh:mm:ss")
|
||||
.["map"] = SSmapping.config.map_name
|
||||
return json_encode(.)
|
||||
|
||||
/datum/world_topic/jsonplayers
|
||||
keyword = "jsonplayers"
|
||||
|
||||
/datum/world_topic/jsonplayers/Run(list/input, addr)
|
||||
. = list()
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.holder?.fakekey)
|
||||
. += C.holder.fakekey
|
||||
continue
|
||||
. += C.key
|
||||
return json_encode(.)
|
||||
|
||||
/datum/world_topic/jsonmanifest
|
||||
keyword = "jsonmanifest"
|
||||
|
||||
/datum/world_topic/jsonmanifest/Run(list/input, addr)
|
||||
var/list/command = list()
|
||||
var/list/security = list()
|
||||
var/list/engineering = list()
|
||||
var/list/medical = list()
|
||||
var/list/science = list()
|
||||
var/list/cargo = list()
|
||||
var/list/civilian = list()
|
||||
var/list/misc = list()
|
||||
for(var/datum/data/record/R in GLOB.data_core.general)
|
||||
var/name = R.fields["name"]
|
||||
var/rank = R.fields["rank"]
|
||||
var/real_rank = rank // make_list_rank(R.fields["real_rank"])
|
||||
if(real_rank in GLOB.security_positions)
|
||||
security[name] = rank
|
||||
else if(real_rank in GLOB.engineering_positions)
|
||||
engineering[name] = rank
|
||||
else if(real_rank in GLOB.medical_positions)
|
||||
medical[name] = rank
|
||||
else if(real_rank in GLOB.science_positions)
|
||||
science[name] = rank
|
||||
else if(real_rank in GLOB.supply_positions)
|
||||
cargo[name] = rank
|
||||
else if(real_rank in GLOB.civilian_positions)
|
||||
civilian[name] = rank
|
||||
else
|
||||
misc[name] = rank
|
||||
// mixed departments, /datum/department when
|
||||
if(real_rank in GLOB.command_positions)
|
||||
command[name] = rank
|
||||
|
||||
. = list()
|
||||
.["Command"] = command
|
||||
.["Security"] = security
|
||||
.["Engineering"] = engineering
|
||||
.["Medical"] = medical
|
||||
.["Science"] = science
|
||||
.["Cargo"] = cargo
|
||||
.["Civilian"] = civilian
|
||||
.["Misc"] = misc
|
||||
return json_encode(.)
|
||||
|
||||
/datum/world_topic/jsonrevision
|
||||
keyword = "jsonrevision"
|
||||
|
||||
/datum/world_topic/jsonrevision/Run(list/input, addr)
|
||||
var/datum/getrev/revdata = GLOB.revdata
|
||||
var/list/data = list(
|
||||
"date" = copytext(revdata.date, 1, 11),
|
||||
"dd_version" = world.byond_version,
|
||||
"dd_build" = world.byond_build,
|
||||
"dm_version" = DM_VERSION,
|
||||
"dm_build" = DM_BUILD,
|
||||
"revision" = revdata.commit,
|
||||
"round_id" = "[GLOB.round_id]",
|
||||
"testmerge_base_url" = "[CONFIG_GET(string/githuburl)]/pull/"
|
||||
)
|
||||
if (revdata.testmerge.len)
|
||||
for (var/datum/tgs_revision_information/test_merge/TM in revdata.testmerge)
|
||||
data["testmerges"] += list(list(
|
||||
"id" = TM.number,
|
||||
"desc" = TM.title,
|
||||
"author" = TM.author
|
||||
))
|
||||
|
||||
return json_encode(data)
|
||||
|
||||
Reference in New Issue
Block a user