Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into HudRefactor

This commit is contained in:
Aurorablade
2015-12-10 06:47:43 -05:00
75 changed files with 1342 additions and 326 deletions
+2 -2
View File
@@ -186,9 +186,9 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
var/cache_name = state
for(var/D in cardinal)
var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D)
var/image/I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
underlays[cache_name + "[D]"] = I
for(var/pipe_color in pipe_colors)
I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D)
I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
I.color = pipe_colors[pipe_color]
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
+18 -3
View File
@@ -46,7 +46,8 @@
var/datum/gas_mixture/air
var/archived_cycle = 0
var/current_cycle = 0
var/icy = 0
var/icyoverlay
var/obj/effect/hotspot/active_hotspot
var/temperature_archived //USED ONLY FOR SOLIDS
@@ -67,6 +68,8 @@
air.temperature = temperature
update_visuals()
/turf/simulated/Destroy()
visibilityChanged()
if(active_hotspot)
@@ -209,8 +212,6 @@
air.react()
update_visuals()
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
hotspot_expose(air.temperature, CELL_VOLUME)
for(var/atom/movable/item in src)
@@ -221,6 +222,13 @@
if(consider_superconductivity(starting = 1))
remove = 0
if(air.temperature < T0C && air.return_pressure() > 10)
icy = 1
else
icy = 0
update_visuals()
if(!excited_group && remove == 1)
air_master.remove_from_active(src)
@@ -232,6 +240,13 @@
archived_cycle = air_master.current_cycle
/turf/simulated/proc/update_visuals()
if(icy && !icyoverlay)
overlays |= icemaster
icyoverlay = icemaster
else if(icyoverlay && !icy)
icyoverlay = null
overlays -= icemaster
var/new_overlay_type = tile_graphic()
if (new_overlay_type == atmos_overlay_type)
return
+2 -1
View File
@@ -56,4 +56,5 @@
#define TRAIT_BIOLUM 36
#define TRAIT_BIOLUM_COLOUR 37
#define TRAIT_IMMUTABLE 38
#define TRAIT_RARITY 39
#define TRAIT_RARITY 39
#define TRAIT_BATTERY_RECHARGE 40
+31 -13
View File
@@ -1,20 +1,38 @@
/proc/random_underwear(var/gender)
proc/random_underwear(gender, species = "Human")
var/list/pick_list = list()
switch(gender)
if(MALE) return pick(underwear_m)
if(FEMALE) return pick(underwear_f)
else return pick(underwear_list)
if(MALE) pick_list = underwear_m
if(FEMALE) pick_list = underwear_f
else pick_list = underwear_list
return pick_species_allowed_underwear(pick_list, species)
/proc/random_undershirt(var/gender)
proc/random_undershirt(gender, species = "Human")
var/list/pick_list = list()
switch(gender)
if(MALE) return pick(undershirt_m)
if(FEMALE) return pick(undershirt_f)
else return pick(undershirt_list)
if(MALE) pick_list = undershirt_m
if(FEMALE) pick_list = undershirt_f
else pick_list = undershirt_list
return pick_species_allowed_underwear(pick_list, species)
/proc/random_socks(gender)
proc/random_socks(gender, species = "Human")
var/list/pick_list = list()
switch(gender)
if(MALE) return pick(socks_m)
if(FEMALE) return pick(socks_f)
else return pick(socks_list)
if(MALE) pick_list = socks_m
if(FEMALE) pick_list = socks_f
else pick_list = socks_list
return pick_species_allowed_underwear(pick_list, species)
proc/pick_species_allowed_underwear(list/all_picks, species)
var/list/valid_picks = list()
for(var/test in all_picks)
var/datum/sprite_accessory/S = all_picks[test]
if(!(species in S.species_allowed))
continue
valid_picks += test
if(!valid_picks.len) valid_picks += "Nude"
return pick(valid_picks)
proc/random_hair_style(var/gender, species = "Human")
var/h_style = "Bald"
@@ -35,7 +53,7 @@ proc/random_hair_style(var/gender, species = "Human")
return h_style
/proc/GetOppositeDir(var/dir)
proc/GetOppositeDir(var/dir)
switch(dir)
if(NORTH) return SOUTH
if(SOUTH) return NORTH
+1
View File
@@ -1,5 +1,6 @@
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
var/global/obj/effect/overlay/icemaster = null
// nanomanager, the manager for Nano UIs
var/datum/nanomanager/nanomanager = new()
+7 -1
View File
@@ -140,4 +140,10 @@ var/global/datum/controller/process/air_system/air_master
slmaster.icon = 'icons/effects/tile_effects.dmi'
slmaster.icon_state = "sleeping_agent"
slmaster.layer = FLY_LAYER
slmaster.mouse_opacity = 0
slmaster.mouse_opacity = 0
icemaster = new /obj/effect/overlay()
icemaster.icon = 'icons/turf/overlays.dmi'
icemaster.icon_state = "snowfloor"
icemaster.layer = TURF_LAYER+0.1
icemaster.mouse_opacity = 0
+1 -1
View File
@@ -258,7 +258,7 @@
whitelist = list(/obj/item/weapon/banhammer,/obj/item/weapon/sord,/obj/item/weapon/butch,/obj/item/weapon/claymore,/obj/item/weapon/holo/esword,
/obj/item/weapon/flamethrower,/obj/item/weapon/grenade,/obj/item/weapon/gun,/obj/item/weapon/hatchet,/obj/item/weapon/katana,
/obj/item/weapon/kitchenknife,/obj/item/weapon/melee,/obj/item/weapon/nullrod,/obj/item/weapon/pickaxe,/obj/item/weapon/twohanded,
/obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/deathnettle)
/obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/nettle/death)
/datum/cargoprofile/tools
name = "Devices & Tools"
@@ -301,6 +301,8 @@ Made by Xhuis
flags = NO_BLOOD | NO_BREATHE | NO_SCAN | NO_INTORGANS
burn_mod = 1.5 //1.5x burn damage, 2x is excessive
silent_steps = 1
/datum/game_mode/proc/update_shadow_icons_added(datum/mind/shadow_mind)
var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW]
shadow_hud.join_hud(shadow_mind.current)
+4 -4
View File
@@ -120,7 +120,7 @@
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
@@ -151,7 +151,7 @@
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
@@ -181,8 +181,8 @@
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_vir(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/viro(H), slot_wear_pda)
+2 -2
View File
@@ -27,7 +27,7 @@
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/science(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
@@ -65,7 +65,7 @@
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/science(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
+1 -1
View File
@@ -90,7 +90,7 @@
if(!H) return 0
switch(H.backbag)
if(1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/botany(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
+9
View File
@@ -217,6 +217,15 @@
else
robot["cell"] = 0
var/turf/pos = get_turf(R)
var/area/bot_area = get_area(R)
robot["xpos"] = pos.x
robot["ypos"] = pos.y
robot["zpos"] = pos.z
robot["area"] = format_text(bot_area.name)
robot["health"] = round(R.health * 100 / R.maxHealth,0.1)
robot["module"] = R.module ? R.module.name : "None"
robot["master_ai"] = R.connected_ai ? R.connected_ai.name : "None"
robot["hackable"] = 0
+12 -1
View File
@@ -779,4 +779,15 @@ obj/item/weapon/circuitboard/rdserver
origin_tech = "programming=1;engineering=2"
req_components = list(
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/weapon/stock_parts/matter_bin = 3)
/obj/item/weapon/stock_parts/matter_bin = 3)
/obj/item/weapon/circuitboard/clawgame
name = "circuit board (Claw Game)"
build_path = /obj/machinery/arcade/claw
board_type = "machine"
origin_tech = "programming=2"
req_components = list(
/obj/item/weapon/stock_parts.matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/sheet/glass = 1)
+63 -69
View File
@@ -1,4 +1,5 @@
var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0)
/obj/machinery/slot_machine
name = "slot machine"
desc = "Gambling for the antisocial."
@@ -6,77 +7,70 @@ var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0)
icon_state = "slots-off"
anchored = 1
density = 1
// mats = 10
var/money = 25000
var/plays = 0
var/working = 0
var/balance=0
attack_hand(var/mob/user as mob)
if(user.mind)
if(user.mind.initial_account)
balance = user.mind.initial_account.money
user.machine = src
if (src.working)
var/dat = {"<B>Slot Machine</B><BR>
<HR><BR>
<B>Please wait!</B><BR>"}
user << browse(dat, "window=slotmachine;size=450x500")
onclose(user, "slotmachine")
else
var/dat = {"<B>Slot Machine</B><BR>
<HR><BR>
Five credits to play!<BR>
<B>Prize Money Available:</B> [src.money]<BR>
<B>Credits Remaining:</B> [balance]<BR>
[src.plays] players have tried their luck today!<BR>
<HR><BR>
<A href='?src=\ref[src];ops=1'>Play!<BR>"}
user << browse(dat, "window=slotmachine;size=400x500")
onclose(user, "slotmachine")
/obj/machinery/slot_machine/attack_hand(var/mob/user as mob)
if(user.mind)
if(user.mind.initial_account)
balance = user.mind.initial_account.money
user.machine = src
if (working)
var/dat = {"<B>Slot Machine</B><BR>
<HR><BR>
<B>Please wait!</B><BR>"}
user << browse(dat, "window=slotmachine;size=450x500")
onclose(user, "slotmachine")
else
var/dat = {"<B>Slot Machine</B><BR>
<HR><BR>
Five credits to play!<BR>
<B>Credits Remaining:</B> [balance]<BR>
[plays] players have tried their luck today!<BR>
<HR><BR>
<A href='?src=\ref[src];ops=1'>Play!<BR>"}
user << browse(dat, "window=slotmachine;size=400x500")
onclose(user, "slotmachine")
Topic(href, href_list)
if(href_list["ops"])
var/operation = text2num(href_list["ops"])
if(operation == 1) // Play
/* if (src.working == 1)
usr << "\red You need to wait until the machine stops spinning!"
return */
if (balance < 5)
usr << "\red Insufficient money to play!"
return
usr.mind.initial_account.money -= 5
src.money += 5
src.plays += 1
src.working = 1
src.icon_state = "slots-on"
usr << "Let's roll!"
var/roll = rand(1,10000)
spawn(100)
if (roll == 1)
for(var/mob/O in hearers(src, null))
O.show_message(text("<b>[]</b> says, 'JACKPOT! You win [src.money]!'", src), 1)
slotmachine_announcement.Announce("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner")
usr.mind.initial_account.money += src.money
src.money = 0
else if (roll > 1 && roll <= 10)
for(var/mob/O in hearers(src, null))
O.show_message(text("<b>[]</b> says, 'Big Winner! You win five thousand credits!'", src), 1)
usr.mind.initial_account.money += 5000
src.money -= 5000
else if (roll > 10 && roll <= 100)
for(var/mob/O in hearers(src, null))
O.show_message(text("<b>[]</b> says, 'Winner! You win five hundred credits!'", src), 1)
usr.mind.initial_account.money += 500
src.money -= 500
else if (roll > 100 && roll <= 1000)
usr << "\blue You win a free game!"
usr.mind.initial_account.money += 5
src.money -= 5
else
usr << "\red No luck!"
src.working = 0
src.icon_state = "slots-off"
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/slot_machine/Topic(href, href_list)
if(href_list["ops"])
var/operation = text2num(href_list["ops"])
if(operation == 1) // Play
if (working == 1)
usr << "<span class='warning'>You need to wait until the machine stops spinning!</span>"
return
if (balance < 5)
usr << "<span class='warning'>Insufficient money to play!</span>"
return
usr.mind.initial_account.money -= 5
plays += 1
working = 1
icon_state = "slots-on"
var/roll = rand(1,10000)
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
spawn(30)
if (roll == 1)
playsound(src.loc, 'sound/effects/engine_alert2.ogg', 50, 0)
visible_message("<b>[src]</b> says, 'JACKPOT! [usr.name] has won two hundred and fifty thousand credits!'")
slotmachine_announcement.Announce("Congratulations to [usr.name] on winning the jackpot of two hundred and fifty thousand credits!", "Jackpot Winner")
usr.mind.initial_account.money += 250000
else if (roll > 1 && roll <= 10)
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
visible_message("<b>[src]</b> says, 'Big Winner! [usr.name] has won five thousand credits!'")
usr.mind.initial_account.money += 5000
else if (roll > 10 && roll <= 100)
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
visible_message("<b>[src]</b> says, 'Winner! [usr.name] has won win five hundred credits!'")
usr.mind.initial_account.money += 500
else if (roll > 100 && roll <= 1000)
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
usr << "<span class='notice'>You win 5 credits!</span>"
usr.mind.initial_account.money += 5
else
usr << "<span class='warning'>No luck!</span>"
working = 0
icon_state = "slots-off"
add_fingerprint(usr)
updateUsrDialog()
return
+15 -39
View File
@@ -8,7 +8,6 @@
use_power = 1
idle_power_usage = 20
active_power_usage = 5000
req_access = list(access_robotics)
var/time_coeff = 1
var/resource_coeff = 1
var/time_coeff_tech = 1
@@ -92,36 +91,6 @@
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
/obj/machinery/mecha_part_fabricator/check_access(obj/item/weapon/card/id/I)
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if(!istype(I) || !I.access) //not ID or no access
return 0
for(var/req in req_access)
if(!(req in I.access)) //doesn't have this access
return 0
return 1
/obj/machinery/mecha_part_fabricator/proc/emag()
switch(emagged)
if(0)
emagged = 0.5
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
sleep(10)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"Attempting auto-repair\"")
sleep(15)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
sleep(30)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
req_access = null
emagged = 1
if(0.5)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
if(1)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"No records in User DB\"")
return
/obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name)
var/output = ""
for(var/datum/design/D in files.known_designs)
@@ -149,9 +118,9 @@
var/output
for(var/resource in resources)
var/amount = min(res_max_amount, resources[resource])
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm&sup3;"
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm&sup3;, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets"
if(amount>0)
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=1;material=[resource];custom_eject=1'>Custom</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
output += "<br/>"
return output
@@ -319,8 +288,12 @@
interact(user)
/obj/machinery/mecha_part_fabricator/attack_hand(mob/user)
if(!(..()))
return interact(user)
if(..())
return 1
if(!allowed(user) && !isobserver(user))
user << "<span class='warning'>Access denied.</span>"
return 1
return interact(user)
/obj/machinery/mecha_part_fabricator/interact(mob/user as mob)
var/dat, left_part
@@ -455,7 +428,13 @@
if(href_list["remove_mat"] && href_list["material"])
var/amount = text2num(href_list["remove_mat"])
var/material = href_list["material"]
if(amount < 0 || amount > resources[material]) //href protection
if(href_list["custom_eject"])
amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart
if (!amount)
return
amount = round(amount)
if(amount < 0 || amount > resources[material]) //href protection, except that resources[] is 2000 per sheet
return
var/removed = remove_material(material,amount)
@@ -569,8 +548,5 @@
user << "\The [src] cannot hold any more [sname] sheet\s."
return
/obj/machinery/mecha_part_fabricator/emag_act(user as mob)
emag()
/obj/machinery/mecha_part_fabricator/proc/material2name(var/ID)
return copytext(ID,2)
+7 -5
View File
@@ -111,11 +111,13 @@
else if(issilicon(M))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_logs(M, user, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!</span>")
return 1
if (R.module) // Perhaps they didn't choose a module yet
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_logs(M, user, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!</span>")
return 1
M.Weaken(rand(5,10))
add_logs(M, user, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
+5 -1
View File
@@ -217,7 +217,11 @@
return 1
var/to_transfer as num
if (user.get_inactive_hand()==src)
to_transfer = 1
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
return
desired = round(desired)
to_transfer = max(1,min(desired,S.max_amount-S.amount,src.amount))
else
to_transfer = min(src.amount, S.max_amount-S.amount)
S.amount+=to_transfer
@@ -120,6 +120,36 @@
icon_state = "engiepack"
item_state = "engiepack"
/obj/item/weapon/storage/backpack/botany
name = "botany backpack"
desc = "It's a backpack made of all-natural fibers."
icon_state = "botpack"
item_state = "botpack"
/obj/item/weapon/storage/backpack/chemistry
name = "chemistry backpack"
desc = "A backpack specially designed to repel stains and hazardous liquids."
icon_state = "chempack"
item_state = "chempack"
/obj/item/weapon/storage/backpack/genetics
name = "genetics backpack"
desc = "A bag designed to be super tough, just in case someone hulks out on you."
icon_state = "genepack"
item_state = "genepack"
/obj/item/weapon/storage/backpack/science
name = "science backpack"
desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma."
icon_state = "toxpack"
item_state = "toxpack"
/obj/item/weapon/storage/backpack/virology
name = "virology backpack"
desc = "A backpack made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey."
icon_state = "viropack"
item_state = "viropack"
/*
* Satchel Types
*/
@@ -149,13 +179,11 @@
name = "industrial satchel"
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
item_state = "engiepack"
/obj/item/weapon/storage/backpack/satchel_med
name = "medical satchel"
desc = "A sterile satchel used in medical departments."
icon_state = "satchel-med"
item_state = "medicalpack"
/obj/item/weapon/storage/backpack/satchel_vir
name = "virologist satchel"
@@ -181,18 +209,16 @@
name = "security satchel"
desc = "A robust satchel for security related needs."
icon_state = "satchel-sec"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/satchel_hyd
name = "hydroponics satchel"
desc = "A green satchel for plant related work."
icon_state = "satchel_hyd"
icon_state = "satchel-hyd"
/obj/item/weapon/storage/backpack/satchel_cap
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
item_state = "captainpack"
/obj/item/weapon/storage/backpack/satchel_flat
name = "smuggler's satchel"
@@ -11,6 +11,7 @@
New()
..()
sleep(2)
new /obj/item/weapon/storage/backpack/science(src)
new /obj/item/weapon/storage/backpack/satchel_tox(src)
new /obj/item/clothing/under/rank/scientist(src)
//new /obj/item/clothing/suit/labcoat/science(src)
@@ -373,6 +373,8 @@
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/weapon/storage/backpack/chemistry(src)
new /obj/item/weapon/storage/backpack/chemistry(src)
new /obj/item/weapon/storage/backpack/satchel_chem(src)
new /obj/item/weapon/storage/backpack/satchel_chem(src)
new /obj/item/weapon/storage/bag/chemistry(src)
@@ -394,6 +396,10 @@
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
new /obj/item/weapon/storage/backpack/genetics(src)
new /obj/item/weapon/storage/backpack/genetics(src)
new /obj/item/weapon/storage/backpack/satchel_gen(src)
new /obj/item/weapon/storage/backpack/satchel_gen(src)
return
@@ -413,6 +419,10 @@
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/weapon/storage/backpack/virology(src)
new /obj/item/weapon/storage/backpack/virology(src)
new /obj/item/weapon/storage/backpack/satchel_vir(src)
new /obj/item/weapon/storage/backpack/satchel_vir(src)
return
+1 -1
View File
@@ -205,7 +205,7 @@
icon_state = "plant-36"
/obj/structure/flora/kirbyplants/dead
name = "/improper RD's potted plant"
name = "\improper RD's potted plant"
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
icon_state = "plant-dead"
+10 -11
View File
@@ -35,7 +35,7 @@
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 0
/obj/structure/inflatable/CanAtmosPass(turf/T)
return !density
@@ -75,15 +75,15 @@
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
/obj/structure/inflatable/attack_alien(mob/user as mob)
if(islarva(user))
if(islarva(user))
return
attack_generic(user, 15)
/obj/structure/inflatable/attack_animal(mob/user as mob)
if(!isanimal(user))
if(!isanimal(user))
return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0)
if(M.melee_damage_upper <= 0)
return
attack_generic(M, M.melee_damage_upper)
@@ -94,7 +94,7 @@
attack_generic(user, rand(10, 15))
/obj/structure/inflatable/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!istype(W))
if(!istype(W))
return
if (can_puncture(W))
visible_message("\red <b>[user] pierces [src] with [W]!</b>")
@@ -119,7 +119,6 @@
src.transfer_fingerprints_to(R)
qdel(src)
else
//user << "\blue You slowly deflate the inflatable wall."
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/R = new /obj/item/inflatable(loc)
@@ -178,16 +177,16 @@
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
/obj/structure/inflatable/door/CanAtmosPass(turf/T)
return !density
/obj/structure/inflatable/door/proc/TryToSwitchState(atom/user)
if(isSwitchingStates)
if(isSwitchingStates)
return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60)
if(world.time - user.last_bumped <= 60)
return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
@@ -240,14 +239,14 @@
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc)
src.transfer_fingerprints_to(R)
qdel(src)
else
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
src.transfer_fingerprints_to(R)
qdel(src)
air_update_turf(1)
qdel(src)
/obj/item/inflatable/torn
name = "torn inflatable wall"
+16 -1
View File
@@ -115,6 +115,12 @@ var/list/wood_icons = list("wood","wood-broken")
else if(is_plating())
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
)
else if(is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
if(T.on)
@@ -193,11 +199,20 @@ var/list/wood_icons = list("wood","wood-broken")
icon_state = "carpet[connectdir]-[diagonalconnect]"
footstep_sounds = list(
"human" = list('sound/effects/footstep/carpet_human.ogg'),
"xeno" = list('sound/effects/footstep/carpet_xeno.ogg')
)
else if(is_wood_floor())
if(!broken && !burnt)
if( !(icon_state in wood_icons) )
icon_state = "wood"
//world << "[icon_state]y's got [icon_state]"
footstep_sounds = list(
"human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org
"xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org
)
/turf/simulated/floor/return_siding_icon_state()
+15
View File
@@ -31,6 +31,11 @@
icon_state = "wood"
floor_tile = new/obj/item/stack/tile/wood
footstep_sounds = list(
"human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org
"xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org
)
/turf/simulated/floor/vault
icon_state = "rockvault"
@@ -131,6 +136,11 @@
floor_tile = null
intact = 0
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
)
/turf/simulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
@@ -246,6 +256,11 @@
icon_state = "carpet"
floor_tile = new/obj/item/stack/tile/carpet
footstep_sounds = list(
"human" = list('sound/effects/footstep/carpet_human.ogg'),
"xeno" = list('sound/effects/footstep/carpet_xeno.ogg')
)
New()
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
if(!icon_state)
+2
View File
@@ -29,6 +29,8 @@
var/image/obscured //camerachunks
var/list/footstep_sounds = list()
/turf/New()
..()
for(var/atom/movable/AM in src)
+11 -39
View File
@@ -8,7 +8,6 @@
use_power = 1
idle_power_usage = 20
active_power_usage = 5000
req_access = list(access_robotics)
var/time_coeff = 1
var/resource_coeff = 1
var/time_coeff_tech = 1
@@ -97,37 +96,6 @@
T += Ml.rating
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
/obj/machinery/spod_part_fabricator/check_access(obj/item/weapon/card/id/I)
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if(!istype(I) || !I.access) //not ID or no access
return 0
for(var/req in req_access)
if(!(req in I.access)) //doesn't have this access
return 0
return 1
/obj/machinery/spod_part_fabricator/proc/emag()
switch(emagged)
if(0)
emagged = 0.5
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
sleep(10)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"Attempting auto-repair\"")
sleep(15)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
sleep(30)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
req_access = null
emagged = 1
if(0.5)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
if(1)
visible_message("\icon[src] <b>\The [src]</b> beeps: \"No records in User DB\"")
return
/obj/machinery/spod_part_fabricator/proc/output_parts_list(set_name)
var/output = ""
for(var/datum/design/D in files.known_designs)
@@ -155,9 +123,9 @@
var/output
for(var/resource in resources)
var/amount = min(res_max_amount, resources[resource])
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm&sup3;"
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm&sup3;, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets"
if(amount>0)
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=1;material=[resource];custom_eject=1'>Custom</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
output += "<br/>"
return output
@@ -322,8 +290,9 @@
return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto)
/obj/machinery/spod_part_fabricator/attack_hand(mob/user)
if(!(..()))
return interact(user)
if(..())
return 1
return interact(user)
/obj/machinery/spod_part_fabricator/interact(mob/user as mob)
var/dat, left_part
@@ -457,6 +426,12 @@
if(href_list["remove_mat"] && href_list["material"])
var/amount = text2num(href_list["remove_mat"])
var/material = href_list["material"]
if(href_list["custom_eject"])
amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart
if (!amount)
return
amount = round(amount)
if(amount < 0 || amount > resources[material]) //href protection
return
@@ -571,8 +546,5 @@
user << "\The [src] cannot hold any more [sname] sheet\s."
return
/obj/machinery/spod_part_fabricator/emag_act(user as mob)
emag()
/obj/machinery/spod_part_fabricator/proc/material2name(var/ID)
return copytext(ID,2)
+5 -1
View File
@@ -3,6 +3,10 @@ world/IsBanned(key,address,computer_id)
if (!key || !address || !computer_id)
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, please try again. Error message: Your computer provided invalid or blank information to the server on connection (BYOND Username, IP, and Computer ID). Provided information for reference: Username: '[key]' IP: '[address]' Computer ID: '[computer_id]'. If you continue to get this error, please restart byond or contact byond support.")
if (computer_id == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.")
var/admin = 0
var/ckey = ckey(key)
if((ckey in admin_datums) || (ckey in deadmins))
@@ -20,7 +24,7 @@ world/IsBanned(key,address,computer_id)
message_admins("<span class='adminnotice'>Failed Login: [key] - Banned: Tor</span>")
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of Tor", "Automated Ban", 0, 0)
var/mistakemessage = ""
var/mistakemessage = ""
if(config.banappeals)
mistakemessage = "\nIf you believe this is a mistake, please request help at [config.banappeals]."
return list("reason"="using Tor", "desc"="\nReason: The network you are using to connect has been banned.[mistakemessage]")
+165
View File
@@ -0,0 +1,165 @@
/obj/machinery/arcade
name = "Arcade Game"
desc = "One of the most generic arcade games ever."
icon = 'icons/obj/arcade.dmi'
icon_state = "clawmachine_on"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/tokens = 0
var/freeplay = 0 //for debugging and admin kindness
var/token_price = 0
var/last_winner = null //for letting people who to hunt down and steal prizes from
var/window_name = "arcade" //in case you want to change the window name for certain machines
/obj/machinery/arcade/New()
..()
var/choice = pick(subtypesof(/obj/machinery/arcade))
new choice(loc)
qdel(src)
/obj/machinery/arcade/examine(mob/user)
..(user)
if(freeplay)
user << "Someone enabled freeplay on this machine!"
else
if(token_price)
user << "\The [src.name] costs [token_price] credits per play."
if(!tokens)
user << "\The [src.name] has no available play credits. Better feed the machine!"
else if(tokens == 1)
user << "\The [src.name] has only 1 play credit left!"
else
user << "\The [src.name] has [tokens] play credits!"
/obj/machinery/arcade/attack_hand(mob/user as mob)
if(..())
if(in_use && src == user.machine) //this one checks if they fell down/died and closes the game
src.close_game()
return
if(in_use && src == user.machine) //this one just checks if they are playing so it doesn't eat tokens
return
interact(user)
/obj/machinery/arcade/interact(mob/user as mob)
if(stat & BROKEN || panel_open)
return
if(!tokens && !freeplay)
user << "\The [src.name] doesn't have enough credits to play! Pay first!"
return
if(!in_use && (tokens || freeplay))
in_use = 1
start_play(user)
return
if(in_use)
if(src != user.machine)
user << "Someone else is already playing this machine, please wait your turn!"
return
/obj/machinery/arcade/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/screwdriver) && anchored)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance panel."
update_icon()
return
if(!freeplay)
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = O
if(pay_with_card(C))
tokens += 1
return
else if(istype(O, /obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/C = O
if(pay_with_cash(C, user))
tokens += 1
return
if(panel_open&& component_parts && istype(O, /obj/item/weapon/crowbar))
default_deconstruction_crowbar(O)
/obj/machinery/arcade/update_icon()
return
/obj/machinery/arcade/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, var/mob/user)
if(cashmoney.get_total() < token_price)
user << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
return 0
visible_message("<span class='info'>[usr] inserts a credit chip into [src].</span>")
var/left = cashmoney.get_total() - token_price
user.unEquip(cashmoney)
qdel(cashmoney)
if(left)
dispense_cash(left, src.loc, user)
return 1
/obj/machinery/arcade/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/mob/user)
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number)
if (!customer_account)
user <<"Error: Unable to access account. Please contact technical support if problem persists."
return 0
if(customer_account.suspended)
user << "Unable to access account: account suspended."
return 0
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
user << "Unable to access account: incorrect credentials."
return 0
if(token_price > customer_account.money)
user << "Insufficient funds in account."
return 0
else
// Okay to move the money at this point
// debit money from the purchaser's account
customer_account.money -= token_price
// create entry in the purchaser's account log
var/datum/transaction/T = new()
T.target_name = "[src.name]"
T.purpose = "Purchase of [src.name] credit"
if(token_price > 0)
T.amount = "([token_price])"
else
T.amount = "[token_price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
customer_account.transaction_log.Add(T)
return 1
/obj/machinery/arcade/proc/start_play(mob/user as mob)
user.set_machine(src)
if(!freeplay)
tokens -= 1
/obj/machinery/arcade/proc/close_game()
in_use = 0
for(var/mob/user in viewers(world.view, src)) // I don't know who you are.
if(user.client && user.machine == src) // I will look for you,
user.unset_machine() // I will find you,
user << browse(null, "window=[window_name]") // And I will kill you.
return
/obj/machinery/arcade/proc/win()
return
/obj/machinery/arcade/process()
if(in_use)
src.updateUsrDialog()
if(!in_use)
src.close_game()
/obj/machinery/arcade/Destroy()
src.close_game()
return ..()
+24
View File
@@ -0,0 +1,24 @@
/obj/item/toy/prizeball
name = "prize ball"
desc = "A toy is a toy, but a prize ball could be anything! It could even be a toy!"
icon = 'icons/obj/arcade.dmi'
icon_state = "prizeball_1"
var/opening = 0
/obj/item/toy/prizeball/New()
..()
icon_state = pick("prizeball_1","prizeball_2","prizeball_3")
/obj/item/toy/prizeball/attack_self(mob/user as mob)
if(opening)
return
opening = 1
playsound(src.loc, 'sound/items/bubblewrap.ogg', 30, 1, extrarange = -4, falloff = 10)
icon_state = "prizeconfetti"
src.color = pick(random_color_list)
var/prize_inside = pick(/obj/random/carp_plushie, /obj/random/plushie, /obj/random/figure) //will add ticket bundles later
spawn(10)
user.unEquip(src)
new prize_inside(user.loc)
qdel(src)
+82
View File
@@ -0,0 +1,82 @@
/var/claw_game_html = null
/obj/machinery/arcade/claw
name = "Claw Game"
desc = "One of the most infuriating ways to win a toy."
icon = 'icons/obj/arcade.dmi'
icon_state = "clawmachine_1_on"
token_price = 15
window_name = "Claw Game"
var/machine_image = "_1"
var/bonus_prize_chance = 5 //chance to dispense a SECOND prize if you win, increased by matter bin rating
//This is to make sure the images are available
var/list/img_resources = list('icons/obj/arcade_images/backgroundsprite.png',
'icons/obj/arcade_images/clawpieces.png',
'icons/obj/arcade_images/crane_bot.png',
'icons/obj/arcade_images/crane_top.png',
'icons/obj/arcade_images/prize_inside.png',
'icons/obj/arcade_images/prizeorbs.png')
/obj/machinery/arcade/claw/New()
src.addAtProcessing()
machine_image = pick("_1", "_2")
update_icon()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clawgame(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/stack/cable_coil(null, 5)
component_parts += new /obj/item/stack/sheet/glass(null, 1)
RefreshParts()
if(!claw_game_html)
claw_game_html = file2text('code/modules/arcade/crane.html')
claw_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]")
/obj/machinery/arcade/claw/RefreshParts()
var/bin_upgrades = 0
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
bin_upgrades = B.rating
bonus_prize_chance = bin_upgrades * 5 //equals +5% chance per matter bin rating level (+20% with rating 4)
/obj/machinery/arcade/claw/update_icon()
if(stat & BROKEN)
icon_state = "clawmachine[machine_image]_broken"
else if(panel_open)
icon_state = "clawmachine[machine_image]_open"
else if(stat & NOPOWER)
icon_state = "clawmachine[machine_image]_off"
else
icon_state = "clawmachine[machine_image]_on"
return
/obj/machinery/arcade/claw/win()
icon_state = "clawmachine[machine_image]_win"
visible_message("<span class='game say'><span class='name'>[src.name]</span> beeps, \"WINNER!\"</span>")
if(prob(bonus_prize_chance))
//double prize mania!
new /obj/item/toy/prizeball(get_turf(src))
new /obj/item/toy/prizeball(get_turf(src))
playsound(src.loc, 'sound/arcade/Win.ogg', 50, 1, extrarange = -3, falloff = 10)
spawn(10)
update_icon()
/obj/machinery/arcade/claw/start_play(mob/user as mob)
..()
user << browse_rsc('page.css')
for(var/i=1, i<=img_resources.len, i++)
user << browse_rsc(img_resources[i])
user << browse(claw_game_html, "window=[window_name];size=700x600")
/obj/machinery/arcade/claw/Topic(href, list/href_list)
if(..())
return
var/prize_won = null
prize_won = href_list["prizeWon"]
if(!isnull(prize_won))
close_game()
if(prize_won == "1")
win()
+289
View File
@@ -0,0 +1,289 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Crane game</title>
<link rel="stylesheet" type="text/css" href="page.css" />
<script src="libraries.min.js"></script>
<!-- Prize.js --><script>
function Prize(id,css, crane) {
var top = css['top'];
var left = css['left'];
var original_left = css['left'];
hspd = 15;
vspd = 5;
var state = 'falling';
var error;
var rand = Math.floor(Math.random()*10);
css['background'] = 'url(prize_inside.png) no-repeat center';
var pic = $('<div></div>').attr({'id':'prize'+id,class:'prize-ball'}).css(css);
var ball = $('<div></div>').css({height: 60,'background':'url(prizeorbs.png) no-repeat -4px -'+62*rand+'px'});
$(pic).append(ball);
$('#game').append(pic);
//console.log(crane);
this.GetState = function() {return state};
var CheckBoundaries = function () {
if(left < 52)
left = 52;
else if(left > 812)
left = 812;
if(top < 30)
top = 30;
else if(top > 347 && state !='won' && state !='hidden') {
top = 347;
state = 'resting';
} else if(top > 500 && state =='won') {
top=500;
}
};
var CheckGrabbed = function() {
var tmp = Math.floor(Math.random()*100);
if(tmp>error) {
setTimeout(function(){
state='falling';
$('#debug-streak').html(0); //reset streak
setTimeout(gameShutDown,500); //end game because you dropped it
},4*error+300);
}
state = 'is grabbed';
};
var IsGrabbed = function() {
top = crane.GetTop()+65;
if(top > 347)
top = 347;
left = crane.GetLeft()+23;
if(left <= 60) {
left = 60;
state = 'won';
}
};
this.GetError = function(offset) {
return Math.floor(160/(.1*offset+1)-60);
};
this.Update = function () {
if(crane.GetState() == 'down' && state=='resting') {
var offset = Math.abs(left - crane.GetLeft()-23);
error = this.GetError(offset);
if(error > 0) {
state = 'being grabbed';
$('#debug-errorpx').html(Math.abs(offset)+'px');
$('#debug-errordrop').html(error+'%');//debugging
}
}
if(crane.GetState() == 'up' && state=='being grabbed')
CheckGrabbed();
if((crane.GetState() == 'drop' || crane.GetState() == 'up') && state=='is grabbed')
IsGrabbed();
if(state=='falling'||state=='won')
top += vspd;
if(state=='won' && top > 460) {
$('#prize'+id).remove();//css({visibility:'hidden'});
state='hidden';
prizeWon = true;
gameShutDown();
}
CheckBoundaries();
};
this.Repaint = function () {
$('#prize'+id).css({'top':top, 'left':left});
//$('#'+id+' #crane-handle-top').css({height: handleHeight});
};
}</script>
<!-- Crane.js --><script>
function Crane(id) {
//console.log("crane created");
var top = 131; //private
var left = 100;
var hspd = 6;
var vspd = 4;
var state = false;
var handleHeight = 83;
var frames = {
normal: {'background-position': '-36px -34px',left:11},
half: {'background-position': '-36px -148px',left:6},
open: {'background-position': '-28px -270px',left:-2}
};
this.GetState = function() {return state};
this.GetLeft = function() {return left};
this.GetTop = function() {return top};
var Grab = function () {
top += (state == 'down')?vspd:-vspd;
handleHeight += (state == 'down')?vspd:-vspd;
if(top > 300 && state == 'down') { //when going down
top = 300;
//handleHeight = ;
state = 'up';
$('#'+id+' #crane-claw').css(frames['half']);
} else if(top < 131 && state == 'up') { //when going up
top = 131;
handleHeight = 83;
state = 'drop';
} else if(state == 'drop') { //when up and dropping
left -= hspd;
top = 131;
handleHeight = 83;
if(left < 30) {
left = 30;
$('#'+id+' #crane-claw').css(frames['open']);
setTimeout(function(){$('#'+id+' #crane-claw').css(frames['normal']);state = false;},500);
}
}
};
var CheckBoundaries = function () {
if(left < 30)
left = 30;
else if(left > 788)
left = 788;
};
this.Update = function () {
//console.log(left);
if(keys["left"] && !state) //left
left -= hspd;
if(keys["right"] && !state) //right
left += hspd;
if(keys["down"] && !state) { //drop
state = 'down';
$('#'+id+' #crane-claw').css(frames['open']);
}
if(state) {
Grab();
}
CheckBoundaries();
};
this.Repaint = function () {
$('#'+id).css({'top':top, 'left':left});
$('#'+id+' #crane-handle-top').css({height: handleHeight});
};
}</script>
<!-- main.js --><script>
var crane = new Crane('crane');
var keys = [];
var prizes = [];
var prizeWon = false;
window.requestAnimFrame = (function(callback){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
window.setTimeout(callback, 1000 / 30);
};
})();
function animate(){
//console.log("animate called");
crane.Update();
for(var i = 0; i< prizes.length; i++)
prizes[i].Update();
for(var i = 0; i< prizes.length; i++)
prizes[i].Repaint();
crane.Repaint();
requestAnimFrame(function(){
animate();
});
}
function joystickControlOn(direction){
//console.log(direction);
keys[direction] = true;
}
function joystickControlOff(direction){
//console.log(direction);
keys[direction] = false;
}
function gameStartUp(){ //main function
//console.log("game start!");
document.getElementById("play_btn").disabled = true; //to prevent button-mashing the start button.
for(var i = 0; i< 5; i++)
prizes[i] = new Prize(i,{top: Math.ceil(Math.random()*100),left: 400+i*100-Math.ceil(Math.random()*50)},crane);
//console.log("prize made");
//crane.Repaint();
animate();
}
function gameShutDown(){
document.getElementById("play_btn").disabled = true;
var close_game_link = '<h2>TRY AGAIN!</h2><br><a href="byond://?src=/* ref src */;prizeWon=0">\[Close Game\]</a>'
if(prizeWon)
close_game_link = '<h2>YOU WON!</h2><br><a href="byond://?src=/* ref src */;prizeWon=1">\[Close Game\]</a>'
document.getElementById('game').innerHTML = '<center><h1> GAME OVER!</h1><br>'+close_game_link+'</center>'
}
function emergencyShutDown(){
document.getElementById("close_nao").click();
}
</script>
</head>
<body onunload="emergencyShutDown()">
<div id='game' style='position: relative;'>
<div id="background"></div>
<div id="crane">
<div id="crane-handle-top"></div>
<div id="crane-handle-bottom"></div>
<div id="crane-claw"></div>
<div id="crane-center"></div>
</div>
<div id="grayorbs-chute"></div>
<div id="foreground"></div>
</div>
<div id='controls' style='position: absolute; top: 550px'>
<br><button id="play_btn" onclick="gameStartUp()">Play Now!</button> <button id="close_btn" onclick="gameShutDown()">Close Game.</button><a id="close_nao" hidden="true" href="byond://?src=/* ref src */;prizeWon=0"></a>
<br>
<button onmouseover="joystickControlOn('left')" onmouseout="joystickControlOff('left')">/==<br>\==</button>
<button onmousedown="joystickControlOn('down')" onmouseup="joystickControlOff('down')">DROP<br>CLAW</button>
<button onmouseover="joystickControlOn('right')" onmouseout="joystickControlOff('right')">==\<br>==/</button>
</div>
</body>
</html>
+84
View File
@@ -0,0 +1,84 @@
#background {
width:900px;
height:406px;
position: absolute;
background: url(backgroundsprite.png) no-repeat;
background-position: 0 -166px;
top: 62px;
}
#grayorbs-chute {
width: 902px;
height: 131px;
position: absolute;
background: url(backgroundsprite.png) no-repeat center;
background-position: 3px -15px;
top: 337px;
left: -3px;
}
#foreground {
width:900px;
height:520px;
position: absolute;
background: url(backgroundsprite.png) no-repeat center;
background-position: 0 -575px;
z-index:10;
}
#crane {
width:100px;
height:100px;
position: absolute;
top: 131px;
left: 100px;
}
#crane-handle-top {
width: 10px;
height: 83px;
position: absolute;
background: url('crane_top.png') repeat-y center;
bottom: 86px;/*top: -69px;*/
left: 47px;
}
#crane-handle-bottom {
width:10px;
height:8px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 14px;
left: 47px;
background-position: -198px -83px;
}
#crane-center{
width: 26px;
height: 27px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 22px;
left: 39px;
background-position: -190px -101px;
}
#crane-claw {
width: 110px;
height: 78px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 33px;
left: 11px;
background-position: -36px -34px;
}
.prize-ball {
width: 60px;
height: 60px;
//background: url('prizeorbs.png') no-repeat;
//-moz-border-radius: 30px;
//-webkit-border-radius: 30px;
//border-radius: 30px;
position: absolute;
}
+1 -1
View File
@@ -23,7 +23,7 @@
return dat
/obj/item/weapon/implantcase/exile
name = "/improper Glass Case- 'Exile'"
name = "\improper Glass Case- 'Exile'"
desc = "A case containing an exile implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
+20 -7
View File
@@ -1040,7 +1040,7 @@ datum/preferences
if("input")
switch(href_list["preference"])
if("name")
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
var/new_name = reject_bad_name(raw_name)
if(new_name)
@@ -1108,6 +1108,19 @@ datum/preferences
//this shouldn't happen
f_style = facial_hair_styles_list["Shaved"]
// Don't wear another species' underwear!
var/datum/sprite_accessory/S = underwear_list[underwear]
if(!(species in S.species_allowed))
underwear = random_underwear(gender, species)
S = undershirt_list[undershirt]
if(!(species in S.species_allowed))
undershirt = random_undershirt(gender, species)
S = socks_list[socks]
if(!(species in S.species_allowed))
socks = random_socks(gender, species)
//reset hair colour and skin colour
r_hair = 0//hex2num(copytext(new_hair, 2, 4))
g_hair = 0//hex2num(copytext(new_hair, 4, 6))
@@ -1156,7 +1169,7 @@ datum/preferences
var/input = "Choose your character's hair colour:"
if(species == "Machine")
input = "Choose your character's frame colour:"
var/new_hair = input(user, input, "Character Preference") as color|null
var/new_hair = input(user, input, "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))
@@ -1193,7 +1206,7 @@ datum/preferences
body_accessory = (new_body_accessory == "None") ? null : new_body_accessory
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))
@@ -1255,7 +1268,7 @@ datum/preferences
socks = new_socks
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))
@@ -1270,7 +1283,7 @@ datum/preferences
if("skin")
if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
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))
@@ -1278,7 +1291,7 @@ datum/preferences
if("ooccolor")
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference", ooccolor) as color|null
if(new_ooccolor)
ooccolor = new_ooccolor
@@ -1423,7 +1436,7 @@ datum/preferences
UI_style = "Midnight"
if("UIcolor")
var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!") as color|null
var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null
if(!UI_style_color_new) return
UI_style_color = UI_style_color_new
+1
View File
@@ -320,6 +320,7 @@ BLIND // can't see anything
body_parts_covered = FEET
slot_flags = SLOT_FEET
var/silence_steps = 0
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
+6 -6
View File
@@ -1,5 +1,5 @@
/obj/item/clothing/glasses/hud
name = "/improper HUD"
name = "\improper HUD"
desc = "A heads-up display that provides important info in (almost) real time."
flags = null //doesn't protect eyes because it's a monocle, duh
origin_tech = "magnets=3;biotech=2"
@@ -24,20 +24,20 @@
desc = desc + " The display flickers slightly."
/obj/item/clothing/glasses/hud/health
name = "/improper Health Scanner HUD"
name = "\improper Health Scanner HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
icon_state = "healthhud"
HUDType = DATA_HUD_MEDICAL_ADVANCED
/obj/item/clothing/glasses/hud/health_advanced
name = "/improper Advanced Health Scanner HUD"
name = "\improper Advanced Health Scanner HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter."
icon_state = "advmedhud"
flash_protect = 1
HUDType = DATA_HUD_MEDICAL_ADVANCED
/obj/item/clothing/glasses/hud/health/night
name = "/improper Night Vision Health Scanner HUD"
name = "\improper Night Vision Health Scanner HUD"
desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness."
icon_state = "healthhudnight"
item_state = "glasses"
@@ -52,7 +52,7 @@
HUDType = DATA_HUD_DIAGNOSTIC
/obj/item/clothing/glasses/hud/security
name = "/improper Security HUD"
name = "\improper Security HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
icon_state = "securityhud"
var/global/list/jobs[0]
@@ -68,7 +68,7 @@
invisa_view = 2
/obj/item/clothing/glasses/hud/security/night
name = "/improper Night Vision Security HUD"
name = "\improper Night Vision Security HUD"
desc = "An advanced heads-up display which provides id data and vision in complete darkness."
icon_state = "securityhudnight"
darkness_view = 8
@@ -11,6 +11,7 @@
var/list/clothing_choices = list()
siemens_coefficient = 0.8
species_restricted = null
silence_steps = 1
/obj/item/clothing/shoes/mime
name = "mime shoes"
@@ -175,3 +176,25 @@
icon_state = "noble_boot"
item_color = "noble_boot"
item_state = "noble_boot"
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/shoe_silencer))
silence_steps = 1
user.unEquip(I)
qdel(I)
else . = ..()
/obj/item/shoe_silencer
name = "shoe rags"
desc = "Looks sneaky."
icon_state = "sheet-cloth"
/datum/table_recipe/shoe_rags
name = "Shoe Rags"
result = /obj/item/shoe_silencer
reqs = list(/obj/item/stack/tape_roll = 10)
tools = list(/obj/item/weapon/wirecutters)
time = 40
+34 -1
View File
@@ -429,6 +429,22 @@
user.put_in_hands(NF)
qdel(src)
return
if("nettle")
var/obj/item/weapon/grown/nettle/nettle = new /obj/item/weapon/grown/nettle(user.loc)
nettle.force = round((5 + potency / 5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(nettle)
qdel(src)
return
if("deathnettle")
var/obj/item/weapon/grown/nettle/death/DN = new /obj/item/weapon/grown/nettle/death(user.loc)
DN.force = round((5 + potency / 2.5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(DN)
qdel(src)
return
if("cashpod")
user << "You crack open the cash pod..."
var/value = round(seed.get_trait(TRAIT_POTENCY))
@@ -475,4 +491,21 @@
return
reagents.remove_any(rand(1,3)) //Todo, make it actually remove the reagents the seed uses.
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/grown/On_Consume()
if(seed && seed.get_trait(TRAIT_BATTERY_RECHARGE))
if(!reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/weapon/stock_parts/cell/C in usr.GetAllContents())
var/newcharge = (potency*0.01)*C.maxcharge
if(C.charge < newcharge)
C.charge = newcharge
if(isobj(C.loc))
var/obj/O = C.loc
O.update_icon() //update power meters and such
batteries_recharged = 1
if(batteries_recharged)
usr << "<span class='notice'>Battery has recovered.</span>"
..()
+65 -16
View File
@@ -32,28 +32,77 @@
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
/obj/item/weapon/grown/deathnettle // -- Skie
plantname = "deathnettle"
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
/obj/item/weapon/grown/nettle //abstract type
name = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
icon_state = "deathnettle"
icon_state = "nettle"
damtype = "fire"
force = 30
throwforce = 1
w_class = 2.0
force = 15
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 5
w_class = 1
throw_speed = 1
throw_range = 3
origin_tech = "combat=3"
origin_tech = "combat=1"
attack_verb = list("stung")
New()
..()
spawn(5)
force = round((5+potency/2.5), 1)
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/pickup(mob/living/user)
if(!iscarbon(user))
return 0
var/mob/living/carbon/C = user
if(ishuman(user))
var/mob/living/carbon/human/H = C
if(H.gloves)
return 0
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/obj/item/organ/external/affecting = H.get_organ(organ)
if(affecting.take_damage(0,force))
user.UpdateDamageIcon()
else
C.take_organ_damage(0,force)
C << "<span class='userdanger'>The nettle burns your bare hand!</span>"
return 1
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(force > 0)
force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
else
usr << "All the leaves have fallen off the nettle from violent whacking."
usr.unEquip(src)
qdel(src)
/obj/item/weapon/grown/nettle/death
name = "deathnettle"
desc = "The <span class='danger'>glowing</span> \black nettle incites <span class='boldannounce'>rage</span>\black in you just from looking at it!"
icon_state = "deathnettle"
force = 30
throwforce = 15
origin_tech = "combat=3"
/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
user.Paralyse(5)
user << "<span class='userdanger'>You are stunned by the Deathnettle when you try picking it up!</span>"
/obj/item/weapon/grown/nettle/death/afterattack(mob/living/carbon/M, mob/user)
if(istype(M, /mob/living))
M << "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>"
add_logs(M, user, "attacked", src)
M.eye_blurry += force/7
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
M.drop_item()
..()
/obj/item/weapon/corncob
name = "corn cob"
+4 -1
View File
@@ -43,4 +43,7 @@
plantname = "aloe"
/obj/item/weapon/reagent_containers/food/snacks/grown/comfrey
plantname = "comfrey"
plantname = "comfrey"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowcap
plantname = "glowcap"
+2 -1
View File
@@ -42,6 +42,7 @@
set_trait(TRAIT_MATURATION, 0) // Time taken before the plant is mature.
set_trait(TRAIT_PRODUCTION, 0) // Time before harvesting can be undertaken again.
set_trait(TRAIT_TELEPORTING, 0) // Uses the bluespace tomato effect.
set_trait(TRAIT_BATTERY_RECHARGE, 0) // Used for glowcaps; recharges batteries on a user.
set_trait(TRAIT_BIOLUM, 0) // Plant is bioluminescent.
set_trait(TRAIT_ALTER_TEMP, 0) // If set, the plant will periodically alter local temp by this amount.
set_trait(TRAIT_PRODUCT_ICON, 0) // Icon to use for fruit coming from this plant.
@@ -675,7 +676,7 @@
P.values["[TRAIT_EXUDE_GASSES]"] = exude_gasses
traits_to_copy = list(TRAIT_POTENCY)
if(GENE_OUTPUT)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM,TRAIT_BATTERY_RECHARGE)
if(GENE_ATMOSPHERE)
traits_to_copy = list(TRAIT_HEAT_TOLERANCE,TRAIT_LOWKPA_TOLERANCE,TRAIT_HIGHKPA_TOLERANCE)
if(GENE_HARDINESS)
+16 -1
View File
@@ -132,6 +132,7 @@
chems = list("plantmatter" = list(1,50), "sacid" = list(0,1))
kitchen_tag = "nettle"
preset_icon = "nettle"
final_form = 0
/datum/seed/nettle/New()
..()
@@ -654,7 +655,7 @@
name = "glowshroom"
seed_name = "glowshroom"
display_name = "glowshrooms"
mutants = null
mutants = list("glowcap")
chems = list("radium" = list(1,20))
preset_icon = "glowshroom"
@@ -672,6 +673,20 @@
set_trait(TRAIT_PLANT_ICON,"mushroom7")
set_trait(TRAIT_RARITY,20)
/datum/seed/mushroom/glowshroom/glowcap
name = "glowcap"
seed_name = "glowcap"
display_name = "glowcaps"
mutants = null
preset_icon = "glowcap"
/datum/seed/mushroom/glowshroom/glowcap/New()
..()
set_trait(TRAIT_BIOLUM_COLOUR,"#8E0300")
set_trait(TRAIT_PRODUCT_COLOUR,"#C65680")
set_trait(TRAIT_PLANT_COLOUR,"#B72D68")
set_trait(TRAIT_BATTERY_RECHARGE,1)
/datum/seed/mushroom/plastic
name = "plastic"
seed_name = "plastellium"
+3
View File
@@ -179,6 +179,9 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/glowshroom
seed_type = "glowshroom"
/obj/item/seeds/glowcap
seed_type = "glowcap"
/obj/item/seeds/plumpmycelium
seed_type = "plumphelmet"
+36 -30
View File
@@ -92,39 +92,41 @@
"adminordrazine" = -5
)
var/global/list/water_reagents = list(
"water" = 1,
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"fluorine" = -0.5,
"chlorine" = -0.5,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
"fishwater" = 1,
"water" = list(1, 0),
"adminordrazine" = list(1, 0),
"milk" = list(0.9, 0),
"beer" = list(0.7, 0),
"fluorine" = list(-0.5, 0),
"chlorine" = list(-0.5, 0),
"phosphorus" = list(-0.5, 0),
"water" = list(1, 0),
"sodawater" = list(1, 0),
"fishwater" = list(1, 0),
"holywater" = list(1, 0.1),
)
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
// "reagent" = list(health, yield_Mod, mut_mod),
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"facid" = list( -2, 0, 0 ),
"atrazine" = list( -2, 0, 0.2),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.25, 0.15, 0 ),
"protein" = list( 0.25, 0.15, 0 ),
"plantmatter" = list( 0.25, 0.15, 0 ),
"radium" = list( -1.5, 0, 0.2),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2)
// "reagent" = list(health, yield_Mod, mut_mod, production, potency),
"beer" = list( -0.05, 0, 0, 0, 0),
"fluorine" = list( -2, 0, 0, 0, 0),
"chlorine" = list( -1, 0, 0, 0, 0),
"phosphorus" = list( -0.75, 0, 0, 0, 0),
"sodawater" = list( 0.1, 0, 0, 0, 0),
"sacid" = list( -1, 0, 0, 0, 0),
"facid" = list( -2, 0, 0, 0, 0),
"atrazine" = list( -2, 0, 0.2, 0, 0),
"cryoxadone" = list( 3, 0, 0, 0, 0),
"ammonia" = list( 0.5, 0, 0, 0, 0),
"diethylamine" = list( 1, 0, 0, 0, 0),
"nutriment" = list( 0.25, 0.15, 0, 0, 0),
"protein" = list( 0.25, 0.15, 0, 0, 0),
"plantmatter" = list( 0.25, 0.15, 0, 0, 0),
"radium" = list( -1.5, 0, 0.2, 0, 0),
"adminordrazine" = list( 1, 1, 1, 0, 0),
"robustharvest" = list( 0, 0.2, 0, 0, 0),
"left4zed" = list( 0, 0, 0.2, 0, 0),
"saltpetre" = list( 0.25, 0, 0, -0.02, 0.01),
)
//--FalseIncarnate
@@ -274,6 +276,9 @@
health += beneficial_reagents[R.id][1] * reagent_total
yield_mod = min(100, yield_mod + (beneficial_reagents[R.id][2] * reagent_total))
mutation_mod += beneficial_reagents[R.id][3] * reagent_total
if(seed.get_trait(TRAIT_PRODUCTION) > 1)
seed.set_trait(TRAIT_PRODUCTION, max(2, seed.get_trait(TRAIT_PRODUCTION) + beneficial_reagents[R.id][4] * reagent_total))
seed.set_trait(TRAIT_POTENCY, min(100, seed.get_trait(TRAIT_POTENCY) + beneficial_reagents[R.id][5] * reagent_total))
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
@@ -303,9 +308,10 @@
// Handle water and water refilling.
var/water_added = 0
if(water_reagents[R.id])
var/water_input = water_reagents[R.id] * reagent_total
var/water_input = water_reagents[R.id][1] * reagent_total
water_added += water_input
waterlevel += water_input
health += water_reagents[R.id][2] * reagent_total
// Water dilutes toxin level.
if(water_added > 0)
@@ -234,6 +234,9 @@
if(grown_seed.get_trait(TRAIT_PRODUCES_POWER))
dat += "<br>The fruit will function as a battery if prepared appropriately."
if(grown_seed.get_trait(TRAIT_BATTERY_RECHARGE))
dat += "<br>The fruit hums with an odd electrical energy."
if(grown_seed.get_trait(TRAIT_STINGS))
dat += "<br>The fruit is covered in stinging spines."
@@ -291,3 +291,30 @@ Des: Removes all infected images from the alien.
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
#undef HEAT_DAMAGE_LEVEL_3
/mob/living/carbon/alien/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds["xeno"])
var/S = pick(T.footstep_sounds["xeno"])
if(S)
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 5
if(m_intent == "walk")
return 0 //silent when walking
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -95,4 +95,55 @@
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
S.step_action(src)
S.step_action(src)
/mob/living/carbon/human/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds["human"])
var/S = pick(T.footstep_sounds["human"])
if(S)
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
if(m_intent == "walk")
range -= 0.333
if(!shoes)
range -= 0.333
//shoes + running
//-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6)
//running OR shoes
//-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5)
//walking AND no shoes
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 13
if(m_intent == "walk")
volume -= 4
if(!shoes)
volume -= 4
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/shooess = shoes
if(shooess.silence_steps)
return 0 //silent
if(!has_organ("l_foot") && !has_organ("r_foot"))
return 0 //no feet no footsteps
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
if(species.silent_steps)
return 0 //species is silent
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -23,6 +23,7 @@
var/unarmed //For empty hand harm-intent attack
var/unarmed_type = /datum/unarmed_attack
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/silent_steps = 0 // Stops step noises
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "plasma" // Poisonous air.
@@ -591,4 +592,4 @@
else
H.bodytemp.icon_state = "temp0"
return 1
return 1
+8
View File
@@ -481,10 +481,18 @@
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
handle_footstep(loc)
step_count++
if(update_slimes)
for(var/mob/living/carbon/slime/M in view(1,src))
M.UpdateFeed(src)
/mob/living/proc/handle_footstep(turf/T)
if(istype(T))
return 1
return 0
/*//////////////////////
START RESIST PROCS
*///////////////////////
+2 -1
View File
@@ -51,4 +51,5 @@
var/list/icon/pipes_shown = list()
var/last_played_vent
var/list/datum/action/actions = list()
var/list/datum/action/actions = list()
var/step_count = 0
@@ -14,6 +14,7 @@
density = 0
req_access = list(access_engine, access_robotics)
local_transmit = 1
ventcrawler = 2
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
@@ -211,12 +212,12 @@
//Drones killed by damage will gib.
/mob/living/silicon/robot/drone/handle_regular_status_updates()
if(health <= -35 && src.stat != 2)
if(health <= -35 && src.stat != DEAD)
timeofdeath = world.time
death() //Possibly redundant, having trouble making death() cooperate.
gib()
return
..()
return ..() // If you don't return anything here, you won't update status effects, like weakening
/mob/living/silicon/robot/drone/death(gibbed)
@@ -339,4 +340,4 @@
/mob/living/silicon/robot/drone/update_canmove()
. = ..()
density = 0 //this is reset every canmove update otherwise
density = 0 //this is reset every canmove update otherwise
@@ -5,9 +5,9 @@ datum/preferences
gender = gender_override
else
gender = pick(MALE, FEMALE)
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks(gender)
underwear = random_underwear(gender, species)
undershirt = random_undershirt(gender, species)
socks = random_socks(gender, species)
if(species == "Human")
s_tone = random_skin_tone()
h_style = random_hair_style(gender, species)
@@ -804,7 +804,7 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(!current_species.bodyflags & NO_EYES)
if(!(current_species.bodyflags & NO_EYES))
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
@@ -28,11 +28,11 @@
L[D.name] = D
switch(D.gender)
if(MALE) male += D.name
if(FEMALE) female += D.name
if(MALE) male[D.name] = D
if(FEMALE) female[D.name] = D
else
male += D.name
female += D.name
male[D.name] = D
female[D.name] = D
return L
/datum/sprite_accessory
@@ -1019,7 +1019,7 @@
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
nude
name = "Nude"
@@ -1092,7 +1092,7 @@
/datum/sprite_accessory/undershirt
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
/datum/sprite_accessory/undershirt/nude
name = "Nude"
@@ -1331,6 +1331,7 @@
///////////////////////
/datum/sprite_accessory/socks
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/nude
name = "Nude"
@@ -1343,111 +1344,95 @@
name = "Normal White"
icon_state = "white_norm"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_norm
name = "Normal Black"
icon_state = "black_norm"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_short
name = "Short White"
icon_state = "white_short"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_short
name = "Short Black"
icon_state = "black_short"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_knee
name = "Knee-high White"
icon_state = "white_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_knee
name = "Knee-high Black"
icon_state = "black_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/thin_knee
name = "Knee-high Thin"
icon_state = "thin_knee"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/striped_knee
name = "Knee-high Striped"
icon_state = "striped_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/rainbow_knee
name = "Knee-high Rainbow"
icon_state = "rainbow_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_thigh
name = "Thigh-high White"
icon_state = "white_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_thigh
name = "Thigh-high Black"
icon_state = "black_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/thin_thigh
name = "Thigh-high Thin"
icon_state = "thin_thigh"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/striped_thigh
name = "Thigh-high Striped"
icon_state = "striped_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/rainbow_thigh
name = "Thigh-high Rainbow"
icon_state = "rainbow_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/pantyhose
name = "Pantyhose"
icon_state = "pantyhose"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_fishnet
name = "Black Fishnet"
icon_state = "black_fishnet"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/vox_white
name = "Vox White"
@@ -4,7 +4,7 @@
icon_state = "laser"
item_state = "laser"
fire_sound = 'sound/weapons/Laser.ogg'
charge_cost = 830
charge_cost = 760
w_class = 3.0
materials = list(MAT_METAL=2000)
origin_tech = "combat=3;magnets=2"
@@ -197,7 +197,7 @@
reagents.add_reagent("blackpepper", 20)
/obj/item/weapon/reagent_containers/food/condiment/syndisauce
name = "/improper Chef Excellence's Special Sauce"
name = "\improper Chef Excellence's Special Sauce"
desc = "A potent sauce extracted from the potent amanita mushrooms. Death never tasted quite so delicious."
amount_per_transfer_from_this = 5
volume = 50
@@ -245,7 +245,8 @@
M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","<span class=\"notice\">You swallow up the last part of \the [src].")
playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
var/mob/living/simple_animal/pet/corgi/C = M
C.health = min(C.health + 5, C.maxHealth)
C.adjustBruteLoss(-5)
C.adjustFireLoss(-5)
qdel(src)
else
M.visible_message("[M] takes a bite of \the [src].","<span class=\"notice\">You take a bite of \the [src].")
@@ -257,7 +258,8 @@
if(prob(50))
N.visible_message("[N] nibbles away at [src].", "")
//N.emote("nibbles away at the [src]")
N.health = min(N.health + 1, N.maxHealth)
N.adjustBruteLoss(-1)
N.adjustFireLoss(-1)
////////////////////////////////////////////////////////////////////////////////
@@ -463,11 +463,21 @@
category = list ("Misc. Machinery")
/datum/design/mining_equipment_vendor
name = "Machine Design (Mining Rewards Vender Board)"
desc = "The circuit board for a Mining Rewards Vender."
name = "Machine Design (Mining Rewards Vendor Board)"
desc = "The circuit board for a Mining Rewards Vendor."
id = "mining_equipment_vendor"
req_tech = list("programming" = 1, "engineering" = 2)
build_type = IMPRINTER
materials = list(MAT_GLASS=1000, "sacid"=20)
build_path = /obj/item/weapon/circuitboard/mining_equipment_vendor
category = list ("Misc. Machinery")
/datum/design/clawgame
name = "Machine Design (Claw Game Board)"
desc = "The circuit board for a Claw Game."
id = "clawgame"
req_tech = list("programming" = 2)
build_type = IMPRINTER
materials = list(MAT_GLASS=1000, "sacid"=20)
build_path = /obj/item/weapon/circuitboard/clawgame
category = list ("Misc. Machinery")
+61 -23
View File
@@ -508,7 +508,15 @@ proc/CallMaterialName(ID)
linked_lathe.reagents.clear_reagents()
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
var/desired_num_sheets = text2num(href_list["lathe_ejectsheet_amt"])
var/desired_num_sheets
if (href_list["lathe_ejectsheet_amt"] == "custom")
desired_num_sheets = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
desired_num_sheets = max(0,desired_num_sheets) // If you input too high of a number, the mineral datum will take care of it either way
if (!desired_num_sheets)
return
desired_num_sheets = round(desired_num_sheets) // No partial-sheet goofery
else
desired_num_sheets = text2num(href_list["lathe_ejectsheet_amt"])
var/MAT
switch(href_list["lathe_ejectsheet"])
if("metal")
@@ -531,6 +539,14 @@ proc/CallMaterialName(ID)
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
var/desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"])
if (href_list["imprinter_ejectsheet_amt"] == "custom")
desired_num_sheets = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
desired_num_sheets = max(0,desired_num_sheets) // for the imprinter they have something hacky, that still will guard against shenanigans. eh
if (!desired_num_sheets)
return
desired_num_sheets = round(desired_num_sheets) // No partial-sheet goofery
else
desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"])
var/res_amount, type
switch(href_list["imprinter_ejectsheet"])
if("glass")
@@ -921,57 +937,73 @@ proc/CallMaterialName(ID)
dat += "<h3>Material Storage:</h3><BR><HR>"
//Metal
var/m_amount = linked_lathe.materials.amount(MAT_METAL)
dat += "* [m_amount] of Metal: "
if(m_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [m_amount] of Metal, [round(m_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(m_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=custom'>C</A> "
if(m_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=5'>5x</A> "
if(m_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Glass
var/g_amount = linked_lathe.materials.amount(MAT_GLASS)
dat += "* [g_amount] of Glass: "
if(g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [g_amount] of Glass, [round(g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(g_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=custom'>C</A> "
if(g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=5'>5x</A> "
if(g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Gold
var/gold_amount = linked_lathe.materials.amount(MAT_GOLD)
dat += "* [gold_amount] of Gold: "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [gold_amount] of Gold, [round(gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=custom'>C</A> "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=5'>5x</A> "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Silver
var/silver_amount = linked_lathe.materials.amount(MAT_SILVER)
dat += "* [silver_amount] of Silver: "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [silver_amount] of Silver, [round(silver_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=custom'>C</A> "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=5'>5x</A> "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Plasma
var/plasma_amount = linked_lathe.materials.amount(MAT_PLASMA)
dat += "* [plasma_amount] of Solid Plasma: "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [plasma_amount] of Solid Plasma, [round(plasma_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=custom'>C</A> "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=5'>5x</A> "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasmalathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Uranium
var/uranium_amount = linked_lathe.materials.amount(MAT_URANIUM)
dat += "* [uranium_amount] of Uranium: "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [uranium_amount] of Uranium, [round(uranium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=custom'>C</A> "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=5'>5x</A> "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Diamond
var/diamond_amount = linked_lathe.materials.amount(MAT_DIAMOND)
dat += "* [diamond_amount] of Diamond: "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [diamond_amount] of Diamond, [round(diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=custom'>C</A> "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=5'>5x</A> "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Bananium
var/bananium_amount = linked_lathe.materials.amount(MAT_BANANIUM)
dat += "* [bananium_amount] of Bananium: "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "* [bananium_amount] of Bananium, [round(bananium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=custom'>C</A> "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=5'>5x</A> "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=50'>All</A>"
dat += "</div>"
@@ -1074,20 +1106,26 @@ proc/CallMaterialName(ID)
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><div class='statusDisplay'>"
dat += "<h3>Material Storage:</h3><BR><HR>"
//Glass
dat += "* [linked_imprinter.g_amount] glass: "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "* [linked_imprinter.g_amount] glass, [round(linked_imprinter.g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=custom'>C</A> "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=5'>5x</A> "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Gold
dat += "* [linked_imprinter.gold_amount] gold: "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "* [linked_imprinter.gold_amount] gold, [round(linked_imprinter.gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=custom'>C</A> "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=5'>5x</A> "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=50'>All</A>"
dat += "<BR>"
//Diamond
dat += "* [linked_imprinter.diamond_amount] diamond: "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "* [linked_imprinter.diamond_amount] diamond, [round(linked_imprinter.diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>Eject</A> "
dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=custom'>C</A> "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=5'>5x</A> "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=50'>All</A>"
dat += "</div>"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 76 KiB

+12
View File
@@ -27,6 +27,18 @@
<span class="itemContent">
{{:value.status}}
</span>
<span class="itemLabel">
System Integrity:
</span>
<span class="itemContent">
{{:value.health}} %
</span>
<span class="itemLabel">
Location:
</span>
<span class="itemContent">
({{:value.xpos}}, {{:value.ypos}}, {{:value.zpos}}): {{:value.area}}
</span>
<span class="itemLabel">
Master AI:
</span>
+3
View File
@@ -961,6 +961,9 @@
#include "code\modules\alarm\fire_alarm.dm"
#include "code\modules\alarm\motion_alarm.dm"
#include "code\modules\alarm\power_alarm.dm"
#include "code\modules\arcade\arcade_base.dm"
#include "code\modules\arcade\arcade_prize.dm"
#include "code\modules\arcade\claw_game.dm"
#include "code\modules\assembly\assembly.dm"
#include "code\modules\assembly\bomb.dm"
#include "code\modules\assembly\health.dm"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.