This commit is contained in:
RavingManiac
2015-02-15 22:37:55 +08:00
74 changed files with 2848 additions and 2022 deletions

View File

@@ -1148,15 +1148,22 @@ var/global/floorIsLava = 0
switch(detail)
if(0)
return "<b>[key_name(C, link, name, highlight_special)]</b>"
if(1)
if(1) //Private Messages
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>)</b>"
if(2)
if(2) //Admins
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
if(3)
if(3) //Devs
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>)(<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
if(4) //Mentors
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
/proc/ishost(whom)
if(!whom)

View File

@@ -87,7 +87,11 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/ai_cl
if(ai_found)
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
var/mentor_msg = "\blue <b><font color=red>Request for Help: </font>[get_options_bar(mob, 0, 0, 1, 0)][ai_cl]:</b> [msg]"
//Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
// highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
var/mentor_msg = "\blue <b><font color=red>Request for Help: </font>[get_options_bar(mob, 4, 1, 1, 0)][ai_cl]:</b> [msg]"
msg = "\blue <b><font color=red>Request for Help:: </font>[get_options_bar(mob, 2, 1, 1)][ai_cl]:</b> [msg]"
var/admin_number_afk = 0

View File

@@ -1299,7 +1299,7 @@ datum/preferences
if("hair")
if(species == "Human" || species == "Unathi" || species == "Tajara" || species == "Skrell")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
if(new_hair)
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
@@ -1319,7 +1319,7 @@ datum/preferences
h_style = new_h_style
if("facial")
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as color|null
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null
if(new_facial)
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
@@ -1364,7 +1364,7 @@ datum/preferences
ShowChoices(user)
if("eyes")
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null
if(new_eyes)
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
@@ -1379,7 +1379,7 @@ datum/preferences
if("skin")
if(species == "Unathi" || species == "Tajara" || species == "Skrell")
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference") as color|null
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
if(new_skin)
r_skin = hex2num(copytext(new_skin, 2, 4))
g_skin = hex2num(copytext(new_skin, 4, 6))
@@ -1745,4 +1745,4 @@ datum/preferences
user << browse(dat, "window=saves;size=300x390")
/datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves")
user << browse(null, "window=saves")

View File

@@ -197,8 +197,8 @@
target_mob = H
if(target_mob != H)
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name].</span>"
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit\s of [charge.display_name].</span>"
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
charge.charges -= chems_to_use

View File

@@ -180,11 +180,7 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
being_cooked.warm = 1
being_cooked.reagents.add_reagent("tricordrazine", 5)
being_cooked.bitesize = 6
being_cooked.name = "Warm " + being_cooked.name
being_cooked.cooltime()
being_cooked.heat()
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = ..(container)
warm_up(being_cooked)

View File

@@ -112,7 +112,7 @@
else if(grown_seed.heat_tolerance < 10)
dat += "<br>It is very sensitive to temperature shifts."
dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen[grown_seed.ideal_light == 1 ? "" : "s"]."
dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen\s."
if(grown_seed.light_tolerance > 10)
dat += "<br>It is well adapted to a range of light levels."

View File

@@ -256,7 +256,7 @@ proc/populate_seed_list()
if(prob(90))
requires_nutrients = 1
nutrient_consumption = rand(100)*0.1
nutrient_consumption = rand(25)/100
else
requires_nutrients = 0

View File

@@ -23,7 +23,7 @@
"exotic matter" = 0
)
for(var/turf/T in oview(3,get_turf(user)))
for(var/turf/T in range(3,get_turf(user)))
if(!T.has_resources)
continue

View File

@@ -107,7 +107,7 @@
return
else
if(language)
message = language.scramble(language)
message = language.scramble(message)
else
message = stars(message)

View File

@@ -1,3 +1,5 @@
#define SCRAMBLE_CACHE_LEN 20
/*
Datum based languages. Easily editable and modular.
*/
@@ -35,11 +37,21 @@
return "[trim(full_name)]"
/datum/language
var/list/scramble_cache = list()
/datum/language/proc/scramble(var/input)
if(!syllables || !syllables.len)
return stars(input)
// If the input is cached already, move it to the end of the cache and return it
if(input in scramble_cache)
var/n = scramble_cache[input]
scramble_cache -= input
scramble_cache[input] = n
return n
var/input_size = length(input)
var/scrambled_text = ""
var/capitalize = 1
@@ -64,6 +76,13 @@
var/input_ending = copytext(input, input_size)
if(input_ending in list("!","?","."))
scrambled_text += input_ending
// Add it to cache, cutting old entries if the list is too long
scramble_cache[input] = scrambled_text
if(scramble_cache.len > SCRAMBLE_CACHE_LEN)
scramble_cache.Cut(1, scramble_cache.len-SCRAMBLE_CACHE_LEN-1)
return scrambled_text
/datum/language/proc/format_message(message, verb)
@@ -496,4 +515,6 @@
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
#undef SCRAMBLE_CACHE_LEN

View File

@@ -434,7 +434,8 @@
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
if(t)
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))

View File

@@ -792,7 +792,7 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/Stat()
..()
if(statpanel("Status")) //not looking at that panel
if(statpanel("MC")) //not looking at that panel
if(client && client.holder)
stat(null,"Location:\t([x], [y], [z])")
@@ -808,6 +808,7 @@ note dizziness decrements automatically in the mob's Life() proc.
stat(null,"Obj-[master_controller.objects_cost]\t#[processing_objects.len]")
stat(null,"Net-[master_controller.networks_cost]\tPnet-[master_controller.powernets_cost]")
stat(null,"NanoUI-[master_controller.nano_cost]\t#[nanomanager.processing_uis.len]")
stat(null,"Events-[master_controller.events_cost]\t#[event_manager.active_events.len]")
stat(null,"Tick-[master_controller.ticker_cost]\tALL-[master_controller.total_cost]")
else
stat(null,"MasterController-ERROR")
@@ -1210,4 +1211,4 @@ mob/proc/yank_out_object()
/mob/verb/westfaceperm()
set hidden = 1
facing_dir = null
set_face_dir(WEST)
set_face_dir(WEST)

View File

@@ -137,3 +137,33 @@
/obj/item/weapon/pen/chameleon/get_signature(var/mob/user)
return signature ? signature : "Anonymous"
/obj/item/weapon/pen/chameleon/verb/set_colour()
set name = "Change Pen Colour"
set category = "Object"
var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red", "Invisible", "Black")
var/selected_type = input("Pick new colour.", "Pen Colour", null, null) as null|anything in possible_colours
if(selected_type)
switch(selected_type)
if("Yellow")
colour = COLOR_YELLOW
if("Green")
colour = COLOR_GREEN
if("Pink")
colour = COLOR_PINK
if("Blue")
colour = COLOR_BLUE
if("Orange")
colour = COLOR_ORANGE
if("Cyan")
colour = COLOR_CYAN
if("Red")
colour = COLOR_RED
if("Invisible")
colour = COLOR_WHITE
else
colour = COLOR_BLACK
usr << "<span class='info'>You select the [lowertext(selected_type)] ink container.</span>"

View File

@@ -86,7 +86,7 @@ var/global/photo_count = 0
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
can_hold = list(/obj/item/weapon/photo)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)

View File

@@ -893,6 +893,11 @@
if(!can_use(usr, 1))
return 1
if(!istype(usr, /mob/living/silicon) && locked)
// Shouldn't happen, this is here to prevent href exploits
usr << "You must unlock the panel to use this!"
return 1
if (href_list["lock"])
coverlocked = !coverlocked

View File

@@ -15,7 +15,7 @@
var/power_output = 1
/obj/machinery/power/port_gen/proc/IsBroken()
return (crit_fail || (stat & BROKEN|EMPED))
return (crit_fail || (stat & (BROKEN|EMPED)))
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
return 1
@@ -68,7 +68,7 @@
if(3)
if(prob(10)) stat &= BROKEN
duration = 300
stat |= EMPED
if(duration)
spawn(duration)
@@ -84,12 +84,12 @@
//A power generator that runs on solid plasma sheets.
/obj/machinery/power/port_gen/pacman
name = "\improper P.A.C.M.A.N.-type Portable Generator"
desc = "A power generator that runs on solid plasma sheets. Rated for 80 kW max safe output."
var/sheet_name = "solid plasma sheet"
desc = "A power generator that runs on solid phoron sheets. Rated for 80 kW max safe output."
var/sheet_name = "Phoron Sheets"
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
var/board_path = "/obj/item/weapon/circuitboard/pacman"
var/board_path = "/obj/item/weapon/circuitboard/pacman"
/*
These values were chosen so that the generator can run safely up to 80 kW
A full 50 phoron sheet stack should last 20 minutes at power_output = 4
@@ -98,15 +98,16 @@
*/
power_gen = 20000 //Watts output per power_output level
var/max_power_output = 5 //The maximum power setting without emagging.
var/max_safe_output = 4 // For UI use, maximal output that won't cause overheat.
var/time_per_sheet = 96 //fuel efficiency - how long 1 sheet lasts at power level 1
var/max_sheets = 100 //max capacity of the hopper
var/max_temperature = 300 //max temperature before overheating increases
var/temperature_gain = 50 //how much the temperature increases per power output level, in degrees per level
var/sheets = 0 //How many sheets of material are loaded in the generator
var/sheet_left = 0 //How much is left of the current sheet
var/temperature = 0 //The current temperature
var/overheating = 0 //if this gets high enough the generator explodes
var/temperature = 0 //The current temperature
var/overheating = 0 //if this gets high enough the generator explodes
/obj/machinery/power/port_gen/pacman/initialize()
..()
@@ -122,8 +123,6 @@
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new board_path(src)
var/obj/sheet = new sheet_path(null)
sheet_name = sheet.name
RefreshParts()
/obj/machinery/power/port_gen/pacman/Del()
@@ -137,20 +136,20 @@
max_sheets = SP.rating * SP.rating * 50
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
temp_rating += SP.rating
var/temp_reliability = 0
var/part_count = 0
for(var/obj/item/weapon/CP in component_parts)
temp_reliability += CP.reliability
part_count++
reliability = min(round(temp_reliability / part_count), 100)
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
/obj/machinery/power/port_gen/pacman/examine(mob/user)
..(user)
user << "\The [src] appears to be producing [power_gen*power_output] W."
user << "There are [sheets] [sheet_name]\s left in the hopper."
user << "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper."
if(IsBroken()) user << "<span class='warning'>\The [src] seems to have broken down.</span>"
if(overheating) user << "<span class='danger'>\The [src] is overheating!</span>"
@@ -179,7 +178,7 @@
//how much material are we using this iteration?
var/needed_sheets = power_output / time_per_sheet
//HasFuel() should guarantee us that there is enough fuel left, so no need to check that
//the only thing we need to worry about is if we are going to rollover to the next sheet
if (needed_sheets > sheet_left)
@@ -192,7 +191,7 @@
//This should probably depend on the external temperature somehow, but whatever.
var/lower_limit = 56 + power_output * temperature_gain
var/upper_limit = 76 + power_output * temperature_gain
/*
Hot or cold environments can affect the equilibrium temperature
The lower the pressure the less effect it has. I guess it cools using a radiator or something when in vacuum.
@@ -205,16 +204,16 @@
var/ambient = environment.temperature - T20C
lower_limit += ambient*ratio
upper_limit += ambient*ratio
var/average = (upper_limit + lower_limit)/2
//calculate the temperature increase
var/bias = 0
if (temperature < lower_limit)
bias = min(round((average - temperature)/TEMPERATURE_DIVISOR, 1), TEMPERATURE_CHANGE_MAX)
else if (temperature > upper_limit)
bias = max(round((temperature - average)/TEMPERATURE_DIVISOR, 1), -TEMPERATURE_CHANGE_MAX)
temperature += rand(-7 + bias, 7 + bias)
if (temperature > max_temperature)
@@ -229,13 +228,16 @@
var/ratio = min(environment.return_pressure()/ONE_ATMOSPHERE, 1)
var/ambient = environment.temperature - T20C
cooling_temperature += ambient*ratio
if (temperature > cooling_temperature)
var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR
temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX)
temperature = max(temperature - temp_loss, cooling_temperature)
src.updateDialog()
if(overheating)
overheating--
/obj/machinery/power/port_gen/pacman/proc/overheat()
overheating++
if (overheating > 60)
@@ -249,7 +251,7 @@
var/datum/gas_mixture/environment = loc.return_air()
if (environment)
environment.adjust_gas_temp("phoron", phoron/10, temperature + T0C)
sheets = 0
sheet_left = 0
..()
@@ -261,7 +263,7 @@
if(amount < 1)
user << "\blue The [src.name] is full!"
return
user << "\blue You add [amount] [addstack.singular_name]\s to the [src.name]."
user << "\blue You add [amount] sheet\s to the [src.name]."
sheets += amount
addstack.use(amount)
updateUsrDialog()
@@ -305,11 +307,46 @@
..()
if (!anchored)
return
interact(user)
ui_interact(user)
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob)
interact(user)
ui_interact(user)
/obj/machinery/power/port_gen/pacman/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(IsBroken())
return
var/data[0]
data["active"] = active
if(istype(user, /mob/living/silicon/ai))
data["is_ai"] = 1
else if(istype(user, /mob/living/silicon/robot) && !Adjacent(user))
data["is_ai"] = 1
else
data["is_ai"] = 0
data["output_set"] = power_output
data["output_max"] = max_power_output
data["output_safe"] = max_safe_output
data["output_watts"] = power_output * power_gen
data["temperature_current"] = src.temperature
data["temperature_max"] = src.max_temperature
data["temperature_overheat"] = overheating
// 1 sheet = 1000cm3?
data["fuel_stored"] = round((sheets * 1000) + (sheet_left * 1000))
data["fuel_capacity"] = round(max_sheets * 1000, 0.1)
data["fuel_usage"] = active ? round((power_output / time_per_sheet) * 1000) : 0
data["fuel_type"] = sheet_name
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
ui.open()
ui.set_auto_update(1)
/*
/obj/machinery/power/port_gen/pacman/interact(mob/user)
if (get_dist(src, user) > 1 )
if (!istype(user, /mob/living/silicon/ai))
@@ -329,12 +366,13 @@
dat += text("Current stack: [stack_percent]% <br>")
dat += text("Power output: <A href='?src=\ref[src];action=lower_power'>-</A> [power_gen * power_output] Watts<A href='?src=\ref[src];action=higher_power'>+</A><br>")
dat += text("Power current: [(powernet == null ? "Unconnected" : "[avail()]")]<br>")
var/tempstr = "Temperature: [temperature]&deg;C<br>"
dat += (overheating)? "<span class='danger'>[tempstr]</span>" : tempstr
dat += "<br><A href='?src=\ref[src];action=close'>Close</A>"
user << browse("[dat]", "window=port_gen")
onclose(user, "port_gen")
*/
/obj/machinery/power/port_gen/pacman/Topic(href, href_list)
if(..())
@@ -346,33 +384,26 @@
if(!active && HasFuel() && !IsBroken())
active = 1
icon_state = "portgen1"
src.updateUsrDialog()
if(href_list["action"] == "disable")
if (active)
active = 0
icon_state = "portgen0"
src.updateUsrDialog()
if(href_list["action"] == "eject")
if(!active)
DropFuel()
src.updateUsrDialog()
if(href_list["action"] == "lower_power")
if (power_output > 1)
power_output--
src.updateUsrDialog()
if (href_list["action"] == "higher_power")
if (power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5)))
power_output++
src.updateUsrDialog()
if (href_list["action"] == "close")
usr << browse(null, "window=port_gen")
usr.unset_machine()
/obj/machinery/power/port_gen/pacman/super
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
desc = "A power generator that utilizes uranium sheets as fuel. Can run for much longer than the standard PACMAN type generators. Rated for 80 kW max safe output."
icon_state = "portgen1"
sheet_path = /obj/item/stack/sheet/mineral/uranium
sheet_name = "Uranium Sheets"
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
board_path = "/obj/item/weapon/circuitboard/pacman/super"
@@ -390,26 +421,28 @@
//should really fall with the square of the distance, but that makes the rads value drop too fast
//I dunno, maybe physics works different when you live in 2D -- SM radiation also works like this, apparently
L.apply_effect(max(20, round(rads/get_dist(L,src))), IRRADIATE)
explosion(src.loc, 3, 3, 5, 3)
del(src)
del(src)
/obj/machinery/power/port_gen/pacman/mrs
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
desc = "An advanced power generator that runs on tritium. Rated for 200 kW maximum safe output!"
icon_state = "portgen2"
sheet_path = /obj/item/stack/sheet/mineral/tritium
sheet_path = /obj/item/stack/sheet/mineral/tritium
sheet_name = "Tritium Fuel Sheets"
//I don't think tritium has any other use, so we might as well make this rewarding for players
//max safe power output (power level = 8) is 200 kW and lasts for 1 hour - 3 or 4 of these could power the station
power_gen = 25000 //watts
max_power_output = 10
max_safe_output = 8
time_per_sheet = 576
max_temperature = 800
temperature_gain = 90
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
/obj/machinery/power/port_gen/pacman/mrs/explode()
//no special effects, but the explosion is pretty big (same as a supermatter shard).
explosion(src.loc, 3, 6, 12, 16, 1)
del(src)
del(src)

View File

@@ -63,8 +63,10 @@
if(!src.loc)
return 0
if(!use_power)
return 1
//Don't do this. It allows machines that set use_power to 0 when off (many machines) to
//be turned on again and used after a power failure because they never gain the NOPOWER flag.
//if(!use_power)
// return 1
var/area/A = src.loc.loc // make sure it's in an area
if(!A || !isarea(A) || !A.master)

View File

@@ -315,7 +315,7 @@
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
ui = new(user, src, ui_key, "smes.tmpl", "SMES Unit", 540, 380)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window

View File

@@ -66,8 +66,10 @@
max_ammo = 10
multiple_sprites = 1
/obj/item/ammo_magazine/mc9mm/empty
max_ammo = 0
/obj/item/ammo_magazine/mc9mm/empty/New()
..()
stored_ammo = list()
update_icon()
/obj/item/ammo_magazine/c9mm
name = "Ammunition Box (9mm)"

View File

@@ -85,7 +85,7 @@
origin_tech = "combat=2;materials=2;syndicate=2"
ammo_type = "/obj/item/ammo_casing/c9mm"
load_method = MAGAZINE
mag_type = /obj/item/ammo_magazine/mc9mm/empty
mag_type = /obj/item/ammo_magazine/mc9mm
/obj/item/weapon/gun/projectile/pistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()

View File

@@ -1898,10 +1898,10 @@ datum
if(15 to 49)
if(prob(50))
M.Weaken(2)
M.drowsyness = max(M.drowsyness, 20)
M.drowsyness = max(M.drowsyness, 20)
if(50 to INFINITY)
M.Weaken(20)
M.drowsyness = max(M.drowsyness, 30)
M.sleeping = max(M.sleeping, 20)
M.drowsyness = max(M.drowsyness, 60)
data++
..()
return
@@ -1925,10 +1925,11 @@ datum
if(1)
M.confused += 2
M.drowsyness += 2
if(2 to 199)
if(2 to 20)
M.Weaken(30)
if(200 to INFINITY)
M.sleeping += 1
M.eye_blurry = max(M.eye_blurry, 10)
if(20 to INFINITY)
M.sleeping = max(M.sleeping, 30)
..()
return

View File

@@ -698,6 +698,23 @@
reagents.add_reagent("protein", 6)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket
name = "\improper Sin-pocket"
desc = "The food of choice for the veteran. Do <B>NOT</B> overconsume."
filling_color = "#6D6D00"
heated_reagents = list("doctorsdelight" = 5, "hyperzine" = 0.75, "synaptizine" = 0.25)
var/has_been_heated = 0
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket/attack_self(mob/user)
if(has_been_heated)
user << "<span class='notice'>The heating chemicals have already been spent.</span>"
return
has_been_heated = 1
user.visible_message("<span class='notice'>[user] crushes \the [src] package.</span>", "You crush \the [src] package and feel a comfortable heat build up.")
spawn(200)
user << "You think \the [src] is ready to eat about now."
heat()
/obj/item/weapon/reagent_containers/food/snacks/donkpocket
name = "Donk-pocket"
desc = "The food of choice for the seasoned traitor."
@@ -710,12 +727,22 @@
reagents.add_reagent("protein", 2)
var/warm = 0
proc/cooltime() //Not working, derp?
var/list/heated_reagents = list("tricordrazine" = 5)
proc/heat()
warm = 1
for(var/reagent in heated_reagents)
reagents.add_reagent(reagent, heated_reagents[reagent])
bitesize = 6
name = "Warm " + name
cooltime()
proc/cooltime()
if (src.warm)
spawn( 4200 )
spawn(4200)
src.warm = 0
src.reagents.del_reagent("tricordrazine")
src.name = "donk-pocket"
for(var/reagent in heated_reagents)
src.reagents.del_reagent(reagent)
src.name = initial(name)
return
/obj/item/weapon/reagent_containers/food/snacks/brainburger

View File

@@ -190,6 +190,38 @@
..()
reagents.add_reagent("dexalin", 15)
/obj/item/weapon/reagent_containers/pill/dexalin_plus
name = "Dexalin Plus pill"
desc = "Used to treat extreme oxygen deprivation."
icon_state = "pill8"
New()
..()
reagents.add_reagent("dexalin", 15)
/obj/item/weapon/reagent_containers/pill/dermaline
name = "Dermaline pill"
desc = "Used to treat burn wounds."
icon_state = "pill12"
New()
..()
reagents.add_reagent("dermaline", 15)
/obj/item/weapon/reagent_containers/pill/dylovene
name = "Dylovene pill"
desc = "A broad-spectrum anti-toxin."
icon_state = "pill13"
New()
..()
reagents.add_reagent("anti_toxin", 15)
/obj/item/weapon/reagent_containers/pill/inaprovaline
name = "Inaprovaline pill"
desc = "Used to stabilize patients."
icon_state = "pill20"
New()
..()
reagents.add_reagent("inaprovaline", 30)
/obj/item/weapon/reagent_containers/pill/bicaridine
name = "Bicaridine pill"
desc = "Used to treat physical injuries."
@@ -216,3 +248,11 @@
reagents.add_reagent("impedrezene", 10)
reagents.add_reagent("synaptizine", 5)
reagents.add_reagent("hyperzine", 5)
/obj/item/weapon/reagent_containers/pill/spaceacillin
name = "Spaceacillin"
desc = "Contains antiviral agents."
icon_state = "pill19"
New()
..()
reagents.add_reagent("spaceacillin", 15)

View File

@@ -462,10 +462,10 @@
if(prob(75))
I.loc = src
for(var/mob/M in viewers(src))
M.show_message("\the [I] lands in \the [src].", 3)
M.show_message("\The [I] lands in \the [src].", 3)
else
for(var/mob/M in viewers(src))
M.show_message("\the [I] bounces off of \the [src]'s rim!", 3)
M.show_message("\The [I] bounces off of \the [src]'s rim!", 3)
return 0
else
return ..(mover, target, height, air_group)

View File

@@ -1,28 +1,28 @@
/obj/item/weapon/storage/belt/archaeology
name = "excavation gear-belt"
desc = "Can hold various excavation gear."
icon_state = "gearbelt"
item_state = "utility"
can_hold = list(
"/obj/item/weapon/storage/box/samplebags",
"/obj/item/device/core_sampler",
"/obj/item/device/beacon_locator",
"/obj/item/device/radio/beacon",
"/obj/item/device/gps",
"/obj/item/device/measuring_tape",
"/obj/item/device/flashlight",
"/obj/item/weapon/pickaxe",
"/obj/item/device/depth_scanner",
"/obj/item/device/camera",
"/obj/item/weapon/paper",
"/obj/item/weapon/photo",
"/obj/item/weapon/folder",
"/obj/item/weapon/pen",
"/obj/item/weapon/folder",
"/obj/item/weapon/clipboard",
"/obj/item/weapon/anodevice",
"/obj/item/clothing/glasses",
"/obj/item/weapon/wrench",
"/obj/item/weapon/storage/box/excavation",
"/obj/item/weapon/anobattery")
/obj/item/weapon/storage/belt/archaeology
name = "excavation gear-belt"
desc = "Can hold various excavation gear."
icon_state = "gearbelt"
item_state = "utility"
can_hold = list(
/obj/item/weapon/storage/box/samplebags,
/obj/item/device/core_sampler,
/obj/item/device/beacon_locator,
/obj/item/device/radio/beacon,
/obj/item/device/gps,
/obj/item/device/measuring_tape,
/obj/item/device/flashlight,
/obj/item/weapon/pickaxe,
/obj/item/device/depth_scanner,
/obj/item/device/camera,
/obj/item/weapon/paper,
/obj/item/weapon/photo,
/obj/item/weapon/folder,
/obj/item/weapon/pen,
/obj/item/weapon/folder,
/obj/item/weapon/clipboard,
/obj/item/weapon/anodevice,
/obj/item/clothing/glasses,
/obj/item/weapon/wrench,
/obj/item/weapon/storage/box/excavation,
/obj/item/weapon/anobattery)

View File

@@ -1,36 +1,36 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Miscellaneous xenoarchaeology tools
/obj/item/device/gps
name = "relay positioning device"
desc = "Triangulates the approximate co-ordinates using a nearby satellite network."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
item_state = "locator"
w_class = 2
/obj/item/device/gps/attack_self(var/mob/user as mob)
var/turf/T = get_turf(src)
user << "\blue \icon[src] [src] flashes <i>[T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)]</i>."
/obj/item/device/measuring_tape
name = "measuring tape"
desc = "A coiled metallic tape used to check dimensions and lengths."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "measuring"
w_class = 2
//todo: dig site tape
/obj/item/weapon/storage/bag/fossils
name = "Fossil Satchel"
desc = "Transports delicate fossils in suspension so they don't break during transit."
icon = 'icons/obj/mining.dmi'
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list("/obj/item/weapon/fossil")
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Miscellaneous xenoarchaeology tools
/obj/item/device/gps
name = "relay positioning device"
desc = "Triangulates the approximate co-ordinates using a nearby satellite network."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
item_state = "locator"
w_class = 2
/obj/item/device/gps/attack_self(var/mob/user as mob)
var/turf/T = get_turf(src)
user << "\blue \icon[src] [src] flashes <i>[T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)]</i>."
/obj/item/device/measuring_tape
name = "measuring tape"
desc = "A coiled metallic tape used to check dimensions and lengths."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "measuring"
w_class = 2
//todo: dig site tape
/obj/item/weapon/storage/bag/fossils
name = "Fossil Satchel"
desc = "Transports delicate fossils in suspension so they don't break during transit."
icon = 'icons/obj/mining.dmi'
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list(/obj/item/weapon/fossil)

View File

@@ -1,132 +1,132 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Excavation pickaxes - sorted in order of delicacy. Players will have to choose the right one for each part of excavation.
/obj/item/weapon/pickaxe/brush
name = "brush"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_brush"
item_state = "syringe_0"
digspeed = 20
desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)."
excavation_amount = 0.5
drill_sound = 'sound/weapons/thudswoosh.ogg'
drill_verb = "brushing"
w_class = 2
/obj/item/weapon/pickaxe/one_pick
name = "1/6 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick1"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)."
excavation_amount = 1
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/two_pick
name = "1/3 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick2"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)."
excavation_amount = 2
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/three_pick
name = "1/2 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick3"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)."
excavation_amount = 3
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/four_pick
name = "2/3 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick4"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)."
excavation_amount = 4
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/five_pick
name = "5/6 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick5"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)."
excavation_amount = 5
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/six_pick
name = "1/1 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick6"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)."
excavation_amount = 6
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/hand
name = "hand pickaxe"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_hand"
item_state = "syringe_0"
digspeed = 30
desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)."
excavation_amount = 15
drill_sound = 'sound/items/Crowbar.ogg'
drill_verb = "clearing"
w_class = 3
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Pack for holding pickaxes
/obj/item/weapon/storage/box/excavation
name = "excavation pick set"
icon = 'icons/obj/storage.dmi'
icon_state = "excavation"
desc = "A set of picks for excavation."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots = 7
w_class = 2
can_hold = list("/obj/item/weapon/pickaxe/brush",\
"/obj/item/weapon/pickaxe/one_pick",\
"/obj/item/weapon/pickaxe/two_pick",\
"/obj/item/weapon/pickaxe/three_pick",\
"/obj/item/weapon/pickaxe/four_pick",\
"/obj/item/weapon/pickaxe/five_pick",\
"/obj/item/weapon/pickaxe/six_pick")
max_combined_w_class = 17
max_w_class = 4
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/excavation/New()
..()
new /obj/item/weapon/pickaxe/brush(src)
new /obj/item/weapon/pickaxe/one_pick(src)
new /obj/item/weapon/pickaxe/two_pick(src)
new /obj/item/weapon/pickaxe/three_pick(src)
new /obj/item/weapon/pickaxe/four_pick(src)
new /obj/item/weapon/pickaxe/five_pick(src)
new /obj/item/weapon/pickaxe/six_pick(src)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Excavation pickaxes - sorted in order of delicacy. Players will have to choose the right one for each part of excavation.
/obj/item/weapon/pickaxe/brush
name = "brush"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_brush"
item_state = "syringe_0"
digspeed = 20
desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)."
excavation_amount = 0.5
drill_sound = 'sound/weapons/thudswoosh.ogg'
drill_verb = "brushing"
w_class = 2
/obj/item/weapon/pickaxe/one_pick
name = "1/6 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick1"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)."
excavation_amount = 1
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/two_pick
name = "1/3 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick2"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)."
excavation_amount = 2
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/three_pick
name = "1/2 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick3"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)."
excavation_amount = 3
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/four_pick
name = "2/3 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick4"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)."
excavation_amount = 4
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/five_pick
name = "5/6 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick5"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)."
excavation_amount = 5
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/six_pick
name = "1/1 pick"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick6"
item_state = "syringe_0"
digspeed = 20
desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)."
excavation_amount = 6
drill_sound = 'sound/items/Screwdriver.ogg'
drill_verb = "delicately picking"
w_class = 2
/obj/item/weapon/pickaxe/hand
name = "hand pickaxe"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_hand"
item_state = "syringe_0"
digspeed = 30
desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)."
excavation_amount = 15
drill_sound = 'sound/items/Crowbar.ogg'
drill_verb = "clearing"
w_class = 3
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Pack for holding pickaxes
/obj/item/weapon/storage/box/excavation
name = "excavation pick set"
icon = 'icons/obj/storage.dmi'
icon_state = "excavation"
desc = "A set of picks for excavation."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots = 7
w_class = 2
can_hold = list(/obj/item/weapon/pickaxe/brush,\
/obj/item/weapon/pickaxe/one_pick,\
/obj/item/weapon/pickaxe/two_pick,\
/obj/item/weapon/pickaxe/three_pick,\
/obj/item/weapon/pickaxe/four_pick,\
/obj/item/weapon/pickaxe/five_pick,\
/obj/item/weapon/pickaxe/six_pick)
max_combined_w_class = 17
max_w_class = 4
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/excavation/New()
..()
new /obj/item/weapon/pickaxe/brush(src)
new /obj/item/weapon/pickaxe/one_pick(src)
new /obj/item/weapon/pickaxe/two_pick(src)
new /obj/item/weapon/pickaxe/three_pick(src)
new /obj/item/weapon/pickaxe/four_pick(src)
new /obj/item/weapon/pickaxe/five_pick(src)
new /obj/item/weapon/pickaxe/six_pick(src)