Merge branch 'master' into TGUI_Next_Nanites
This commit is contained in:
+2
-1
@@ -61,7 +61,8 @@
|
||||
/datum/beam/proc/recalculate_in(time)
|
||||
if(timing_id)
|
||||
deltimer(timing_id)
|
||||
timing_id = addtimer(CALLBACK(src, .proc/recalculate), time, TIMER_STOPPABLE)
|
||||
if(!finished)
|
||||
timing_id = addtimer(CALLBACK(src, .proc/recalculate), time, TIMER_STOPPABLE)
|
||||
|
||||
/datum/beam/proc/after_calculate()
|
||||
if((sleep_time == null) || finished) //Does not automatically recalculate.
|
||||
|
||||
@@ -64,29 +64,48 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/component/personal_crafting/proc/check_contents(datum/crafting_recipe/R, list/contents)
|
||||
/**
|
||||
* Check that the contents of the recipe meet the requirements.
|
||||
*
|
||||
* user: The /mob that initated the crafting.
|
||||
* R: The /datum/crafting_recipe being attempted.
|
||||
* contents: List of items to search for R's reqs.
|
||||
*/
|
||||
/datum/component/personal_crafting/proc/check_contents(mob/user, datum/crafting_recipe/R, list/contents)
|
||||
var/list/item_instances = contents["instances"]
|
||||
contents = contents["other"]
|
||||
main_loop:
|
||||
for(var/A in R.reqs)
|
||||
var/needed_amount = R.reqs[A]
|
||||
for(var/B in contents)
|
||||
if(ispath(B, A))
|
||||
if (R.blacklist.Find(B))
|
||||
continue
|
||||
if(contents[B] >= R.reqs[A])
|
||||
continue main_loop
|
||||
else
|
||||
needed_amount -= contents[B]
|
||||
if(needed_amount <= 0)
|
||||
continue main_loop
|
||||
else
|
||||
continue
|
||||
|
||||
var/list/requirements_list = list()
|
||||
|
||||
// Process all requirements
|
||||
for(var/requirement_path in R.reqs)
|
||||
// Check we have the appropriate amount available in the contents list
|
||||
var/needed_amount = R.reqs[requirement_path]
|
||||
for(var/content_item_path in contents)
|
||||
// Right path and not blacklisted
|
||||
if(!ispath(content_item_path, requirement_path) || R.blacklist.Find(requirement_path))
|
||||
continue
|
||||
|
||||
needed_amount -= contents[content_item_path]
|
||||
if(needed_amount <= 0)
|
||||
break
|
||||
|
||||
if(needed_amount > 0)
|
||||
return FALSE
|
||||
for(var/A in R.chem_catalysts)
|
||||
if(contents[A] < R.chem_catalysts[A])
|
||||
|
||||
// Store the instances of what we will use for R.check_requirements() for requirement_path
|
||||
var/list/instances_list = list()
|
||||
for(var/instance_path in item_instances)
|
||||
if(ispath(instance_path, requirement_path))
|
||||
instances_list += item_instances[instance_path]
|
||||
|
||||
requirements_list[requirement_path] = instances_list
|
||||
|
||||
for(var/requirement_path in R.chem_catalysts)
|
||||
if(contents[requirement_path] < R.chem_catalysts[requirement_path])
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return R.check_requirements(user, requirements_list)
|
||||
|
||||
/datum/component/personal_crafting/proc/get_environment(mob/user)
|
||||
. = list()
|
||||
@@ -110,9 +129,14 @@
|
||||
. = list()
|
||||
.["tool_behaviour"] = list()
|
||||
.["other"] = list()
|
||||
.["instances"] = list()
|
||||
for(var/obj/item/I in get_environment(user))
|
||||
if(I.flags_1 & HOLOGRAM_1)
|
||||
continue
|
||||
if(.["instances"][I.type])
|
||||
.["instances"][I.type] += I
|
||||
else
|
||||
.["instances"][I.type] = list(I)
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/S = I
|
||||
.["other"][I.type] += S.amount
|
||||
@@ -161,11 +185,11 @@
|
||||
/datum/component/personal_crafting/proc/construct_item(mob/user, datum/crafting_recipe/R)
|
||||
var/list/contents = get_surroundings(user)
|
||||
var/send_feedback = 1
|
||||
if(check_contents(R, contents))
|
||||
if(check_contents(user, R, contents))
|
||||
if(check_tools(user, R, contents))
|
||||
if(do_after(user, R.time, target = user))
|
||||
contents = get_surroundings(user)
|
||||
if(!check_contents(R, contents))
|
||||
if(!check_contents(user, R, contents))
|
||||
return ", missing component."
|
||||
if(!check_tools(user, R, contents))
|
||||
return ", missing tool."
|
||||
@@ -341,7 +365,7 @@
|
||||
if((R.category != cur_category) || (R.subcategory != cur_subcategory))
|
||||
continue
|
||||
|
||||
craftability["[REF(R)]"] = check_contents(R, surroundings)
|
||||
craftability["[REF(R)]"] = check_contents(user, R, surroundings)
|
||||
|
||||
data["craftability"] = craftability
|
||||
return data
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/pin_removal/check_requirements(mob/user, list/collected_requirements)
|
||||
var/obj/item/gun/G = collected_requirements[/obj/item/gun][1]
|
||||
if (G.no_pin_required || !G.pin)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/crafting_recipe/strobeshield
|
||||
name = "Strobe Shield"
|
||||
result = /obj/item/assembly/flash/shield
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
var/obj/screen/storage/boxes //storage display object
|
||||
var/obj/screen/close/closer //close button object
|
||||
var/current_maxscreensize
|
||||
|
||||
var/allow_big_nesting = FALSE //allow storage objects of the same or greater size.
|
||||
|
||||
@@ -362,11 +363,15 @@
|
||||
break
|
||||
closer.screen_loc = "[screen_start_x + cols]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y]"
|
||||
|
||||
/datum/component/storage/proc/show_to(mob/M)
|
||||
/datum/component/storage/proc/show_to(mob/M, set_screen_size = TRUE)
|
||||
if(!M.client)
|
||||
return FALSE
|
||||
var/list/cview = getviewsize(M.client.view)
|
||||
var/maxallowedscreensize = cview[1]-8
|
||||
if(set_screen_size)
|
||||
current_maxscreensize = maxallowedscreensize
|
||||
else if(current_maxscreensize)
|
||||
maxallowedscreensize = current_maxscreensize
|
||||
if(M.active_storage != src && (M.stat == CONSCIOUS))
|
||||
for(var/obj/item/I in accessible_items())
|
||||
if(I.on_found(M))
|
||||
@@ -547,14 +552,14 @@
|
||||
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, ghost = 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
|
||||
show_to(M)
|
||||
show_to(M, !ghost)
|
||||
|
||||
/datum/component/storage/proc/mousedrop_receive(datum/source, atom/movable/O, mob/M)
|
||||
if(isitem(O))
|
||||
@@ -665,7 +670,7 @@
|
||||
return can_be_inserted(I, silent, M)
|
||||
|
||||
/datum/component/storage/proc/show_to_ghost(datum/source, mob/dead/observer/M)
|
||||
return user_show_to_mob(M, TRUE)
|
||||
return user_show_to_mob(M, TRUE, TRUE)
|
||||
|
||||
/datum/component/storage/proc/signal_show_attempt(datum/source, mob/showto, force = FALSE)
|
||||
return user_show_to_mob(showto, force)
|
||||
|
||||
@@ -17,14 +17,10 @@
|
||||
if(HasDisease(D))
|
||||
return FALSE
|
||||
|
||||
var/can_infect = FALSE
|
||||
for(var/host_type in D.infectable_biotypes)
|
||||
if(host_type in mob_biotypes)
|
||||
can_infect = TRUE
|
||||
break
|
||||
if(!can_infect)
|
||||
if(!(D.infectable_biotypes & mob_biotypes))
|
||||
return FALSE
|
||||
|
||||
|
||||
if(!(type in D.viable_mobtypes))
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/list/required_organs = list()
|
||||
var/needs_all_cures = TRUE
|
||||
var/list/strain_data = list() //dna_spread special bullshit
|
||||
var/list/infectable_biotypes = list(MOB_ORGANIC) //if the disease can spread on organics, synthetics, or undead
|
||||
var/infectable_biotypes = MOB_ORGANIC //if the disease can spread on organics, synthetics, or undead
|
||||
var/process_dead = FALSE //if this ticks while the host is dead
|
||||
var/copy_type = null //if this is null, copies will use the type of the instance being copied
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/symptom/undead_adaptation/OnRemove(datum/disease/advance/A)
|
||||
A.process_dead = FALSE
|
||||
A.infectable_biotypes -= MOB_UNDEAD
|
||||
A.infectable_biotypes &= ~MOB_UNDEAD
|
||||
|
||||
/datum/symptom/inorganic_adaptation
|
||||
name = "Inorganic Biology"
|
||||
@@ -27,7 +27,8 @@
|
||||
severity = 0
|
||||
|
||||
/datum/symptom/inorganic_adaptation/OnAdd(datum/disease/advance/A)
|
||||
A.infectable_biotypes |= MOB_INORGANIC
|
||||
A.infectable_biotypes |= MOB_MINERAL //Mineral covers plasmamen and golems.
|
||||
|
||||
/datum/symptom/inorganic_adaptation/OnRemove(datum/disease/advance/A)
|
||||
A.infectable_biotypes -= MOB_INORGANIC
|
||||
A.infectable_biotypes &= ~MOB_MINERAL
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
desc = "If left untreated subject will regurgitate bees."
|
||||
severity = DISEASE_SEVERITY_MEDIUM
|
||||
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD) //bees nesting in corpses
|
||||
infectable_biotypes = MOB_ORGANIC|MOB_UNDEAD //bees nesting in corpses
|
||||
|
||||
/datum/disease/beesease/stage_act()
|
||||
..()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
permeability_mod = 0.75
|
||||
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
|
||||
severity = DISEASE_SEVERITY_MEDIUM
|
||||
infectable_biotypes = list(MOB_ORGANIC, MOB_ROBOTIC)
|
||||
infectable_biotypes = MOB_ORGANIC|MOB_ROBOTIC
|
||||
process_dead = TRUE
|
||||
|
||||
/datum/disease/magnitis/stage_act()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "Subject is possessed by the vengeful spirit of a parrot. Call the priest."
|
||||
severity = DISEASE_SEVERITY_MEDIUM
|
||||
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD, MOB_INORGANIC, MOB_ROBOTIC)
|
||||
infectable_biotypes = MOB_ORGANIC|MOB_UNDEAD|MOB_ROBOTIC|MOB_MINERAL
|
||||
bypasses_immunity = TRUE //2spook
|
||||
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
|
||||
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
|
||||
new_form = /mob/living/silicon/robot
|
||||
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD, MOB_ROBOTIC)
|
||||
infectable_biotypes = MOB_ORGANIC|MOB_UNDEAD|MOB_ROBOTIC
|
||||
bantype = "Cyborg"
|
||||
|
||||
/datum/disease/transformation/robot/stage_act()
|
||||
@@ -284,7 +284,7 @@
|
||||
stage4 = list("<span class='danger'>You're ravenous.</span>")
|
||||
stage5 = list("<span class='danger'>You have become a morph.</span>")
|
||||
new_form = /mob/living/simple_animal/hostile/morph
|
||||
infectable_biotypes = list(MOB_ORGANIC, MOB_INORGANIC, MOB_UNDEAD) //magic!
|
||||
infectable_biotypes = MOB_ORGANIC|MOB_MINERAL|MOB_UNDEAD //magic!
|
||||
|
||||
/datum/disease/transformation/gondola
|
||||
name = "Gondola Transformation"
|
||||
|
||||
@@ -45,4 +45,4 @@
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to_chat(user, "<span class='warning'>Your hands are full!</span>")
|
||||
return FALSE
|
||||
if(source.buckled)
|
||||
to_chat(user, "<span class='warning'>[src] is buckled to something!</span>")
|
||||
to_chat(user, "<span class='warning'>[source] is buckled to something!</span>")
|
||||
return FALSE
|
||||
if(source == user)
|
||||
to_chat(user, "<span class='warning'>You can't pick yourself up.</span>")
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
source.visible_message("<span class='warning'>[user] picks up [source]!</span>", \
|
||||
"<span class='userdanger'>[user] picks you up!</span>")
|
||||
to_chat(user, "<span class='notice'>You pick [src] up.</span>")
|
||||
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)
|
||||
if(proctype)
|
||||
@@ -101,6 +101,8 @@
|
||||
target.forceMove(src)
|
||||
var/image/I = new //work around to retain the same appearance to the mob idependently from inhands/worn states.
|
||||
I.appearance = target.appearance
|
||||
I.layer = FLOAT_LAYER //So it doesn't get screwed up by layer overrides.
|
||||
I.plane = FLOAT_PLANE //Same as above but for planes.
|
||||
I.override = TRUE
|
||||
add_overlay(I)
|
||||
name = target.name
|
||||
@@ -128,7 +130,7 @@
|
||||
if(AM == held_mob)
|
||||
held_mob.reset_perspective()
|
||||
held_mob = null
|
||||
qdel(src)
|
||||
QDEL_IN(src, 1) //To avoid a qdel loop.
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Entered(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
@@ -158,7 +160,7 @@
|
||||
/obj/item/clothing/head/mob_holder/container_resist()
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.visible_message("<span class='warning'>[src] escapes from [L]!</span>", "<span class='warning'>[src] escapes your grip!</span>")
|
||||
L.visible_message("<span class='warning'>[held_mob] escapes from [L]!</span>", "<span class='warning'>[held_mob] escapes your grip!</span>")
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/assume_air(datum/gas_mixture/env)
|
||||
@@ -170,7 +172,7 @@
|
||||
location = location.loc
|
||||
if(ismob(location))
|
||||
return location.loc.assume_air(env)
|
||||
return loc.assume_air(env)
|
||||
return location.assume_air(env)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/remove_air(amount)
|
||||
var/atom/location = loc
|
||||
@@ -181,4 +183,4 @@
|
||||
location = location.loc
|
||||
if(ismob(location))
|
||||
return location.loc.remove_air(amount)
|
||||
return loc.remove_air(amount)
|
||||
return location.remove_air(amount)
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/datum/topic_input
|
||||
var/href
|
||||
var/list/href_list
|
||||
|
||||
/datum/topic_input/New(thref,list/thref_list)
|
||||
href = thref
|
||||
href_list = thref_list.Copy()
|
||||
return
|
||||
|
||||
/datum/topic_input/proc/get(i)
|
||||
return listgetindex(href_list,i)
|
||||
|
||||
/datum/topic_input/proc/getAndLocate(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = locate(t)
|
||||
if (istext(t))
|
||||
t = null
|
||||
return t || null
|
||||
|
||||
/datum/topic_input/proc/getNum(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2num(t)
|
||||
return isnum(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getObj(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isobj(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getMob(i)
|
||||
var/t = getAndLocate(i)
|
||||
return ismob(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getTurf(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isturf(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getAtom(i)
|
||||
return getType(i, /atom)
|
||||
|
||||
/datum/topic_input/proc/getArea(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isarea(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getStr(i)//params should always be text, but...
|
||||
var/t = get(i)
|
||||
return istext(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getType(i,type)
|
||||
var/t = getAndLocate(i)
|
||||
return istype(t,type) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getPath(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2path(t)
|
||||
return ispath(t) ? t : null
|
||||
|
||||
/datum/topic_input/proc/getList(i)
|
||||
var/t = getAndLocate(i)
|
||||
return islist(t) ? t : null
|
||||
@@ -12,7 +12,12 @@
|
||||
/mob/camera/aiEye/remote/holo/setLoc()
|
||||
. = ..()
|
||||
var/obj/machinery/holopad/H = origin
|
||||
H.move_hologram(eye_user, loc)
|
||||
H?.move_hologram(eye_user, loc)
|
||||
|
||||
/obj/machinery/holopad/remove_eye_control(mob/living/user)
|
||||
if(user.client)
|
||||
user.reset_perspective(null)
|
||||
user.remote_control = null
|
||||
|
||||
//this datum manages it's own references
|
||||
|
||||
@@ -54,11 +59,6 @@
|
||||
/datum/holocall/Destroy()
|
||||
QDEL_NULL(hangup)
|
||||
|
||||
var/user_good = !QDELETED(user)
|
||||
if(user_good)
|
||||
user.reset_perspective()
|
||||
user.remote_control = null
|
||||
|
||||
if(!QDELETED(eye))
|
||||
QDEL_NULL(eye)
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ GLOBAL_LIST_INIT(huds, list(
|
||||
|
||||
/datum/atom_hud
|
||||
var/list/atom/hudatoms = list() //list of all atoms which display this hud
|
||||
var/list/mob/hudusers = list() //list with all mobs who can see the hud
|
||||
var/list/hudusers = list() //list with all mobs who can see the hud
|
||||
var/list/hud_icons = list() //these will be the indexes for the atom's hud_list
|
||||
|
||||
var/list/next_time_allowed = list() //mobs associated with the next time this hud can be added to them
|
||||
|
||||
@@ -37,22 +37,22 @@
|
||||
|
||||
/datum/map_template/ruin/station/box/engine/teg
|
||||
id = "engine_teg"
|
||||
suffix = "Box/Engine/engine_tesla.dmm"
|
||||
suffix = "Box/Engine/engine_teg.dmm"
|
||||
name = "Box TEG"
|
||||
|
||||
/datum/map_template/ruin/station/box/engine/empty
|
||||
id = "engine_empty"
|
||||
suffix = "Box/Engine/engine_tesla.dmm"
|
||||
suffix = "Box/Engine/empty.dmm"
|
||||
name = "Box Empty"
|
||||
|
||||
/datum/map_template/ruin/station/box/engine/am
|
||||
id = "engine_am"
|
||||
suffix = "Box/Engine/engine_tesla.dmm"
|
||||
suffix = "Box/Engine/engine_am.dmm"
|
||||
name = "Box Antimatter"
|
||||
|
||||
/datum/map_template/ruin/station/box/engine/budget
|
||||
id = "engine_budget"
|
||||
suffix = "Box/Engine/engine_tesla.dmm"
|
||||
suffix = "Box/Engine/budget.dmm"
|
||||
name = "Box P.A.C.M.A.N"
|
||||
|
||||
// Lavaland
|
||||
@@ -60,4 +60,4 @@
|
||||
/datum/map_template/ruin/station/lavaland/mining_base
|
||||
id = "mining_public_01"
|
||||
suffix = "Lavaland/Mining_Station/Mining_Station_Public_01.dmm"
|
||||
name = "Public Mining Base"
|
||||
name = "Public Mining Base"
|
||||
|
||||
Reference in New Issue
Block a user