mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-31 09:08:56 +01:00
Merge branch 'master' into cleanupTwo
This commit is contained in:
+13
-3
@@ -74,11 +74,21 @@
|
||||
if(real_rank in civilian_positions)
|
||||
civ[name] = rank
|
||||
department = 1
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[name] = rank
|
||||
department = 1
|
||||
if(!department && !(name in heads))
|
||||
misc[name] = rank
|
||||
|
||||
// Synthetics don't have actual records, so we will pull them from here.
|
||||
for(var/mob/living/silicon/ai/ai in mob_list)
|
||||
bot[ai.name] = "Artificial Intelligence"
|
||||
|
||||
for(var/mob/living/silicon/robot/robot in mob_list)
|
||||
// No combat/syndicate cyborgs, no drones.
|
||||
if(robot.module && robot.module.hide_on_manifest)
|
||||
continue
|
||||
|
||||
bot[robot.name] = "[robot.modtype] [robot.braintype]"
|
||||
|
||||
|
||||
if(heads.len > 0)
|
||||
dat += "<tr><th colspan=3>Heads</th></tr>"
|
||||
for(name in heads)
|
||||
|
||||
+21
-3
@@ -61,10 +61,13 @@
|
||||
|
||||
//put this here for easier tracking ingame
|
||||
var/datum/money_account/initial_account
|
||||
|
||||
|
||||
//used for antag tcrystal trading, more info in code\game\objects\items\telecrystals.dm
|
||||
var/accept_tcrystals = 0
|
||||
|
||||
//used for optional self-objectives that antagonists can give themselves, which are displayed at the end of the round.
|
||||
var/ambitions
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
|
||||
@@ -106,6 +109,8 @@
|
||||
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
if(ambitions)
|
||||
output += "<HR><B>Ambitions:</B> [ambitions]<br>"
|
||||
recipient << browse(output,"window=memory")
|
||||
|
||||
/datum/mind/proc/edit_memory()
|
||||
@@ -139,7 +144,8 @@
|
||||
|
||||
else
|
||||
out += "None."
|
||||
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a>"
|
||||
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a><br><br>"
|
||||
out += "<b>Ambitions:</b> [ambitions ? ambitions : "None"] <a href='?src=\ref[src];amb_edit=\ref[src]'>\[edit\]</a></br>"
|
||||
usr << browse(out, "window=edit_memory[src]")
|
||||
|
||||
/datum/mind/Topic(href, href_list)
|
||||
@@ -147,7 +153,7 @@
|
||||
|
||||
if(href_list["add_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
|
||||
if(antag)
|
||||
if(antag)
|
||||
if(antag.add_antagonist(src, 1, 1, 0, 1, 1)) // Ignore equipment and role type for this.
|
||||
log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].")
|
||||
else
|
||||
@@ -179,6 +185,18 @@
|
||||
if (isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
|
||||
else if (href_list["amb_edit"])
|
||||
var/datum/mind/mind = locate(href_list["amb_edit"])
|
||||
if(!mind)
|
||||
return
|
||||
var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
|
||||
if(isnull(new_ambition))
|
||||
return
|
||||
if(mind)
|
||||
mind.ambitions = sanitize(new_ambition)
|
||||
mind.current << "<span class='warning'>Your ambitions have been changed by higher powers, they are now: [mind.ambitions]</span>"
|
||||
log_and_message_admins("made [key_name(mind.current)]'s ambitions be '[mind.ambitions]'.")
|
||||
|
||||
else if (href_list["obj_edit"] || href_list["obj_add"])
|
||||
var/datum/objective/objective
|
||||
var/objective_pos
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/datum/progressbar
|
||||
var/goal = 1
|
||||
var/image/bar
|
||||
var/shown = 0
|
||||
var/mob/user
|
||||
var/client/client
|
||||
|
||||
/datum/progressbar/New(mob/user, goal_number, atom/target)
|
||||
. = ..()
|
||||
if(!target) target = user
|
||||
if (!istype(target))
|
||||
EXCEPTION("Invalid target given")
|
||||
if (goal_number)
|
||||
goal = goal_number
|
||||
bar = image('icons/effects/progessbar.dmi', target, "prog_bar_0")
|
||||
bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
bar.pixel_y = 32
|
||||
src.user = user
|
||||
if(user)
|
||||
client = user.client
|
||||
|
||||
/datum/progressbar/Destroy()
|
||||
if (client)
|
||||
client.images -= bar
|
||||
qdel(bar)
|
||||
. = ..()
|
||||
|
||||
/datum/progressbar/proc/update(progress)
|
||||
//world << "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]"
|
||||
if (!user || !user.client)
|
||||
shown = 0
|
||||
return
|
||||
if (user.client != client)
|
||||
if (client)
|
||||
client.images -= bar
|
||||
shown = 0
|
||||
client = user.client
|
||||
|
||||
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
|
||||
shown = 1
|
||||
+51
-21
@@ -74,18 +74,33 @@
|
||||
if (items && items.len)
|
||||
var/list/checklist = list()
|
||||
checklist = items.Copy() // You should really trust Copy
|
||||
for(var/obj/O in container)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
continue // Fruit is handled in check_fruit().
|
||||
var/found = 0
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
. = 0
|
||||
if(istype(container, /obj/machinery))
|
||||
var/obj/machinery/machine = container
|
||||
for(var/obj/O in (machine.contents - machine.component_parts))
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
continue // Fruit is handled in check_fruit().
|
||||
var/found = 0
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
. = 0
|
||||
else
|
||||
for(var/obj/O in container.contents)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
continue // Fruit is handled in check_fruit().
|
||||
var/found = 0
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
. = 0
|
||||
if (checklist.len)
|
||||
. = -1
|
||||
return .
|
||||
@@ -93,9 +108,15 @@
|
||||
//general version
|
||||
/datum/recipe/proc/make(var/obj/container as obj)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
if(istype(container, /obj/machinery))
|
||||
var/obj/machinery/machine = container
|
||||
for (var/obj/O in ((machine.contents-result_obj)-machine.component_parts))
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
else
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
@@ -105,12 +126,21 @@
|
||||
world << "<span class='danger'>Recipe [type] is defined without a result, please bug this.</span>"
|
||||
return
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
if (O.reagents)
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
if(istype(container, /obj/machinery))
|
||||
var/obj/machinery/machine = container
|
||||
for (var/obj/O in ((machine.contents-result_obj)-machine.component_parts))
|
||||
if (O.reagents)
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
else
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
if (O.reagents)
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
|
||||
+23
-11
@@ -221,6 +221,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
name = "Janitorial supplies"
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bucket,
|
||||
/obj/item/weapon/mop,
|
||||
/obj/item/clothing/under/rank/janitor,
|
||||
/obj/item/weapon/cartridge/janitor,
|
||||
/obj/item/clothing/gloves/black,
|
||||
/obj/item/clothing/head/soft/purple,
|
||||
/obj/item/weapon/storage/belt/janitor,
|
||||
/obj/item/clothing/shoes/galoshes,
|
||||
/obj/item/weapon/caution,
|
||||
/obj/item/weapon/caution,
|
||||
/obj/item/weapon/caution,
|
||||
@@ -609,7 +615,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/solar_assembly,
|
||||
/obj/item/solar_assembly,
|
||||
/obj/item/solar_assembly,
|
||||
/obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller
|
||||
/obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller,
|
||||
/obj/item/weapon/circuitboard/solar_control,
|
||||
/obj/item/weapon/tracker_electronics,
|
||||
/obj/item/weapon/paper/solar)
|
||||
@@ -671,8 +677,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/mecha_ripley
|
||||
name = "Circuit Crate (\"Ripley\" APLU)"
|
||||
contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair,
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/main,
|
||||
/obj/item/weapon/circuitboard/mecha/ripley/peripherals)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "APLU \"Ripley\" Circuit Crate"
|
||||
@@ -681,8 +687,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/mecha_odysseus
|
||||
name = "Circuit Crate (\"Odysseus\")"
|
||||
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer
|
||||
/obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer
|
||||
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals,
|
||||
/obj/item/weapon/circuitboard/mecha/odysseus/main)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "\"Odysseus\" Circuit Crate"
|
||||
@@ -1001,7 +1007,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Security barrier crate"
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/securitybarriers
|
||||
/datum/supply_packs/securityshieldgen
|
||||
name = "Wall shield Generators"
|
||||
contains = list(/obj/machinery/shieldwallgen,
|
||||
/obj/machinery/shieldwallgen,
|
||||
@@ -1635,6 +1641,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
num_contained = 4
|
||||
contains = list(/obj/item/clothing/accessory/storage/black_vest,
|
||||
/obj/item/clothing/accessory/storage/brown_vest,
|
||||
/obj/item/clothing/accessory/storage/white_vest,
|
||||
/obj/item/clothing/accessory/storage/webbing)
|
||||
cost = 15
|
||||
containertype = "/obj/structure/closet/crate"
|
||||
@@ -1729,7 +1736,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/device/camera_film,
|
||||
/obj/item/device/camera_film,
|
||||
/obj/item/weapon/storage/photo_album,
|
||||
/obj/item/device/reagent_scanner)
|
||||
/obj/item/device/reagent_scanner,
|
||||
/obj/item/device/flashlight/maglight)
|
||||
cost = 35
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Forensic equipment"
|
||||
@@ -1785,7 +1793,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/clothing/accessory/storage/black_vest,
|
||||
/obj/item/clothing/head/soft/sec/corp,
|
||||
/obj/item/clothing/under/rank/security/corp,
|
||||
/obj/item/weapon/gun/energy/taser)
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
/obj/item/device/flashlight/maglight)
|
||||
cost = 30
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Officer equipment"
|
||||
@@ -1811,7 +1820,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/spray/pepper,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/storage/box/holobadge,
|
||||
/obj/item/clothing/head/beret/sec/corporate/warden)
|
||||
/obj/item/clothing/head/beret/sec/corporate/warden,
|
||||
/obj/item/device/flashlight/maglight)
|
||||
cost = 45
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Warden equipment"
|
||||
@@ -1835,7 +1845,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/clothing/accessory/holster/waist,
|
||||
/obj/item/weapon/melee/telebaton,
|
||||
/obj/item/weapon/shield/riot/tele,
|
||||
/obj/item/clothing/head/beret/sec/corporate/hos)
|
||||
/obj/item/clothing/head/beret/sec/corporate/hos,
|
||||
/obj/item/device/flashlight/maglight)
|
||||
cost = 65
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Head of security equipment"
|
||||
@@ -2069,7 +2080,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/device/healthanalyzer,
|
||||
/obj/item/weapon/cartridge/medical,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/weapon/reagent_containers/syringe)
|
||||
/obj/item/weapon/reagent_containers/syringe,
|
||||
/obj/item/clothing/accessory/storage/white_vest)
|
||||
cost = 20
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Paramedic equipment"
|
||||
|
||||
@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
|
||||
/datum/wires/alarm/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
if(A.wiresexposed && A.buildstage == 2)
|
||||
if(A.wiresexposed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user