mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-02 05:23:01 +00:00
Merge branch 'master' into swordsandbow
This commit is contained in:
@@ -148,12 +148,13 @@
|
||||
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
if(!user || !user.client) return
|
||||
/proc/onclose(client/user, windowid, atom/ref)
|
||||
user = resolve_client(user)
|
||||
if (!user)
|
||||
return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
param = "\ref[ref]"
|
||||
|
||||
winset(user, windowid, "on-close=\".windowclose [param]\"")
|
||||
|
||||
//to_world("OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]")
|
||||
|
||||
@@ -301,6 +301,8 @@
|
||||
// If we need to consume some amount of it
|
||||
if(amt > 0)
|
||||
var/datum/reagent/RG = RC.reagents.get_reagent(id)
|
||||
if (!istype (RG))
|
||||
continue
|
||||
var/A = min(RG.volume, amt)
|
||||
RC.reagents.remove_reagent(id, A)
|
||||
amt -= A
|
||||
|
||||
@@ -126,4 +126,63 @@
|
||||
result = /obj/item/weapon/storage/bag/quiver
|
||||
reqs = list(list(/obj/item/stack/material/leather = 8))
|
||||
time = 60
|
||||
category = CAT_STORAGE
|
||||
category = CAT_STORAGE
|
||||
|
||||
/datum/crafting_recipe/material_armor
|
||||
name = "Material Armor Plate"
|
||||
result = /obj/item/clothing/accessory/material/advanced
|
||||
reqs = list(
|
||||
list(/obj/item/weapon/material/armor_plating/insert = 1),
|
||||
list(/datum/reagent/toxin/plasticide = 5),
|
||||
list(/datum/reagent/glycerol = 10),
|
||||
list(/datum/reagent/silicon = 10)
|
||||
)
|
||||
parts = list(
|
||||
/obj/item/weapon/material/armor_plating/insert = 1
|
||||
)
|
||||
machinery = list(
|
||||
/obj/machinery/r_n_d/protolathe = CRAFTING_MACHINERY_USE
|
||||
)
|
||||
always_available = FALSE
|
||||
time = 80
|
||||
category = CAT_CLOTHING
|
||||
|
||||
|
||||
/datum/crafting_recipe/material_armor/chestplate
|
||||
name = "Material armor plate"
|
||||
result = /obj/item/clothing/accessory/material/advanced
|
||||
always_available = TRUE
|
||||
|
||||
|
||||
/datum/crafting_recipe/material_armor/legguards
|
||||
name = "Material armor arm-guards"
|
||||
result = /obj/item/clothing/accessory/material/advanced/armguards
|
||||
reqs = list(
|
||||
list(/obj/item/weapon/material/armor_plating/insert = 1),
|
||||
list(/datum/reagent/toxin/plasticide = 5),
|
||||
list(/datum/reagent/glycerol = 10),
|
||||
list(/datum/reagent/silicon = 10)
|
||||
)
|
||||
always_available = TRUE
|
||||
|
||||
|
||||
/datum/crafting_recipe/material_armor/armguards
|
||||
name = "Material armor leg-guards"
|
||||
result = /obj/item/clothing/accessory/material/advanced/legguards
|
||||
reqs = list(
|
||||
list(/obj/item/weapon/material/armor_plating/insert = 1),
|
||||
list(/datum/reagent/toxin/plasticide = 5),
|
||||
list(/datum/reagent/glycerol = 10),
|
||||
list(/datum/reagent/silicon = 10)
|
||||
)
|
||||
always_available = TRUE
|
||||
|
||||
|
||||
/datum/crafting_recipe/material_armor/on_craft_completion(mob/user, obj/item/clothing/result)
|
||||
var/obj/item/weapon/material/armor_plating/insert/insert = locate() in result
|
||||
var/material_name = insert?.material?.name
|
||||
if (!material_name)
|
||||
qdel(result)
|
||||
return
|
||||
result.set_material(material_name)
|
||||
qdel(insert)
|
||||
|
||||
@@ -115,10 +115,6 @@
|
||||
if (O.orbiter)
|
||||
O.orbiter.stop_orbit()
|
||||
|
||||
/atom/movable/Destroy(force = FALSE)
|
||||
. = ..()
|
||||
if (orbiting)
|
||||
stop_orbit()
|
||||
|
||||
/*
|
||||
/atom/movable/proc/transfer_observers_to(atom/movable/target)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
|
||||
|
||||
/proc/angle_between_points(datum/point/a, datum/point/b)
|
||||
return ATAN2((b.y - a.y), (b.x - a.x))
|
||||
return arctan((b.y - a.y), (b.x - a.x))
|
||||
|
||||
/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP!
|
||||
var/x = 0
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
shown = 0
|
||||
client = user.client
|
||||
|
||||
progress = CLAMP(progress, 0, goal)
|
||||
progress = clamp(progress, 0, goal)
|
||||
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
||||
if (!shown && user.is_preference_enabled(/datum/client_preference/show_progress_bar))
|
||||
user.client.images += bar
|
||||
|
||||
Reference in New Issue
Block a user