mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge remote-tracking branch 'upstream/master' into I_WILL_FUCKING_NUKE_THIS_GODDDDAMMMNIIITTT
This commit is contained in:
@@ -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]")
|
||||
|
||||
@@ -1177,3 +1177,18 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/reload_nanoui_resources()
|
||||
set category = "Debug"
|
||||
set name = "Reload NanoUI Resources"
|
||||
set desc = "Force the client to redownload NanoUI Resources"
|
||||
|
||||
// Close open NanoUIs.
|
||||
nanomanager.close_user_uis(usr)
|
||||
|
||||
// Re-load the assets.
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui)
|
||||
assets.register()
|
||||
|
||||
// Clear the user's cache so they get resent.
|
||||
usr.client.cache = list()
|
||||
@@ -138,7 +138,8 @@ var/list/admin_verbs_show_debug_verbs = list(
|
||||
/client/proc/print_jobban_old,
|
||||
/client/proc/print_jobban_old_filter,
|
||||
/client/proc/forceEvent,
|
||||
/client/proc/nanomapgen_DumpImage
|
||||
/client/proc/nanomapgen_DumpImage,
|
||||
/client/proc/reload_nanoui_resources
|
||||
)
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
|
||||
@@ -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 ..()
|
||||
@@ -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)
|
||||
@@ -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')
|
||||
|
||||
/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])
|
||||
var/my_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]")
|
||||
user << browse(my_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()
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
Asset cache quick users guide:
|
||||
|
||||
Make a datum at the bottom of this file with your assets for your thing.
|
||||
The simple subsystem will most like be of use for most cases.
|
||||
Then call get_asset_datum() with the type of the datum you created and store the return
|
||||
Then call .send(client) on that stored return value.
|
||||
|
||||
You can set verify to TRUE if you want send() to sleep until the client has the assets.
|
||||
*/
|
||||
|
||||
|
||||
// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping.
|
||||
// This is doubled for the first asset, then added per asset after
|
||||
#define ASSET_CACHE_SEND_TIMEOUT 7
|
||||
|
||||
//When sending mutiple assets, how many before we give the client a quaint little sending resources message
|
||||
#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8
|
||||
|
||||
//List of ALL assets for the above, format is list(filename = asset).
|
||||
/var/global/list/asset_cache = list()
|
||||
|
||||
/client
|
||||
var/list/cache = list() // List of all assets sent to this client by the asset cache.
|
||||
var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement.
|
||||
var/list/sending = list()
|
||||
var/last_asset_job = 0 // Last job done.
|
||||
|
||||
//This proc sends the asset to the client, but only if it needs it.
|
||||
//This proc blocks(sleeps) unless verify is set to false
|
||||
/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE)
|
||||
if(!istype(client))
|
||||
if(ismob(client))
|
||||
var/mob/M = client
|
||||
if(M.client)
|
||||
client = M.client
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
if(client.cache.Find(asset_name) || client.sending.Find(asset_name))
|
||||
return 0
|
||||
|
||||
client << browse_rsc(asset_cache[asset_name], asset_name)
|
||||
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
|
||||
if (client)
|
||||
client.cache += asset_name
|
||||
return 1
|
||||
if (!client)
|
||||
return 0
|
||||
|
||||
client.sending |= asset_name
|
||||
var/job = ++client.last_asset_job
|
||||
|
||||
client << browse({"
|
||||
<script>
|
||||
window.location.href="?asset_cache_confirm_arrival=[job]"
|
||||
</script>
|
||||
"}, "window=asset_cache_browser")
|
||||
|
||||
var/t = 0
|
||||
var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT
|
||||
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
|
||||
sleep(1) // Lock up the caller until this is received.
|
||||
t++
|
||||
|
||||
if(client)
|
||||
client.sending -= asset_name
|
||||
client.cache |= asset_name
|
||||
client.completed_asset_jobs -= job
|
||||
|
||||
return 1
|
||||
|
||||
//This proc blocks(sleeps) unless verify is set to false
|
||||
/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE)
|
||||
if(!istype(client))
|
||||
if(ismob(client))
|
||||
var/mob/M = client
|
||||
if(M.client)
|
||||
client = M.client
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
var/list/unreceived = asset_list - (client.cache + client.sending)
|
||||
if(!unreceived || !unreceived.len)
|
||||
return 0
|
||||
if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
|
||||
client << "Sending Resources..."
|
||||
for(var/asset in unreceived)
|
||||
if (asset in asset_cache)
|
||||
client << browse_rsc(asset_cache[asset], asset)
|
||||
|
||||
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
|
||||
if (client)
|
||||
client.cache += unreceived
|
||||
return 1
|
||||
if (!client)
|
||||
return 0
|
||||
client.sending |= unreceived
|
||||
var/job = ++client.last_asset_job
|
||||
|
||||
client << browse({"
|
||||
<script>
|
||||
window.location.href="?asset_cache_confirm_arrival=[job]"
|
||||
</script>
|
||||
"}, "window=asset_cache_browser")
|
||||
|
||||
var/t = 0
|
||||
var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len
|
||||
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
|
||||
sleep(1) // Lock up the caller until this is received.
|
||||
t++
|
||||
|
||||
if(client)
|
||||
client.sending -= unreceived
|
||||
client.cache |= unreceived
|
||||
client.completed_asset_jobs -= job
|
||||
|
||||
return 1
|
||||
|
||||
//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start.
|
||||
//The proc calls procs that sleep for long times.
|
||||
proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
for(var/file in files)
|
||||
if (!client)
|
||||
break
|
||||
if (register_asset)
|
||||
register_asset(file,files[file])
|
||||
send_asset(client,file)
|
||||
sleep(-1) //queuing calls like this too quickly can cause issues in some client versions
|
||||
|
||||
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
|
||||
//if it's an icon or something be careful, you'll have to copy it before further use.
|
||||
/proc/register_asset(var/asset_name, var/asset)
|
||||
asset_cache[asset_name] = asset
|
||||
|
||||
//From here on out it's populating the asset cache.
|
||||
/proc/populate_asset_cache()
|
||||
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
|
||||
var/datum/asset/A = new type()
|
||||
A.register()
|
||||
|
||||
for(var/client/C in clients)
|
||||
//doing this to a client too soon after they've connected can cause issues, also the proc we call sleeps
|
||||
spawn(10)
|
||||
getFilesSlow(C, asset_cache, FALSE)
|
||||
|
||||
//These datums are used to populate the asset cache, the proc "register()" does this.
|
||||
|
||||
//all of our asset datums, used for referring to these later
|
||||
/var/global/list/asset_datums = list()
|
||||
|
||||
//get a assetdatum or make a new one
|
||||
/proc/get_asset_datum(var/type)
|
||||
if (!(type in asset_datums))
|
||||
return new type()
|
||||
return asset_datums[type]
|
||||
|
||||
/datum/asset/New()
|
||||
asset_datums[type] = src
|
||||
|
||||
/datum/asset/proc/register()
|
||||
return
|
||||
|
||||
/datum/asset/proc/send(client)
|
||||
return
|
||||
|
||||
//If you don't need anything complicated.
|
||||
/datum/asset/simple
|
||||
var/assets = list()
|
||||
var/verify = FALSE
|
||||
|
||||
/datum/asset/simple/register()
|
||||
for(var/asset_name in assets)
|
||||
register_asset(asset_name, assets[asset_name])
|
||||
/datum/asset/simple/send(client)
|
||||
send_asset_list(client,assets,verify)
|
||||
|
||||
|
||||
//DEFINITIONS FOR ASSET DATUMS START HERE.
|
||||
/datum/asset/simple/paper
|
||||
assets = list(
|
||||
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
|
||||
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
|
||||
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
|
||||
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
|
||||
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
|
||||
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
|
||||
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
|
||||
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
|
||||
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
|
||||
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
|
||||
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
|
||||
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
|
||||
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
|
||||
"talisman.png" = 'icons/paper_icons/talisman.png',
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
|
||||
)
|
||||
|
||||
/datum/asset/nanoui
|
||||
var/list/common = list()
|
||||
|
||||
var/list/common_dirs = list(
|
||||
"nano/css/",
|
||||
"nano/js/",
|
||||
"nano/images/",
|
||||
"nano/layouts/"
|
||||
)
|
||||
var/list/uncommon_dirs = list(
|
||||
"nano/templates/"
|
||||
)
|
||||
|
||||
/datum/asset/nanoui/register()
|
||||
// Crawl the directories to find files.
|
||||
for (var/path in common_dirs)
|
||||
var/list/filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // Ignore directories.
|
||||
if(fexists(path + filename))
|
||||
common[filename] = fcopy_rsc(path + filename)
|
||||
register_asset(filename, common[filename])
|
||||
for (var/path in uncommon_dirs)
|
||||
var/list/filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // Ignore directories.
|
||||
if(fexists(path + filename))
|
||||
register_asset(filename, fcopy_rsc(path + filename))
|
||||
|
||||
/datum/asset/nanoui/send(client, uncommon)
|
||||
if(!islist(uncommon))
|
||||
uncommon = list(uncommon)
|
||||
|
||||
send_asset_list(client, uncommon)
|
||||
send_asset_list(client, common)
|
||||
@@ -35,6 +35,11 @@
|
||||
|
||||
#endif
|
||||
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
//src << "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED."
|
||||
var/job = text2num(href_list["asset_cache_confirm_arrival"])
|
||||
completed_asset_jobs += job
|
||||
return
|
||||
|
||||
//Reduces spamming of links by dropping calls that happen during the delay period
|
||||
if(next_allowed_topic_time > world.time)
|
||||
@@ -232,8 +237,6 @@
|
||||
///////////
|
||||
/client/New(TopicData)
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
client_cache += src
|
||||
client_cache[src] = list()
|
||||
|
||||
if(connection != "seeker") //Invalid connection type.
|
||||
return null
|
||||
@@ -310,6 +313,9 @@
|
||||
|
||||
screen += void
|
||||
|
||||
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
|
||||
src << "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>"
|
||||
|
||||
//////////////
|
||||
//DISCONNECT//
|
||||
//////////////
|
||||
@@ -415,8 +421,7 @@
|
||||
'html/panels.css' // Used for styling certain panels, such as in the new player panel
|
||||
)
|
||||
|
||||
// Send NanoUI resources to this client
|
||||
spawn nanomanager.send_resources(src)
|
||||
getFilesSlow(src, asset_cache, register_asset = FALSE)
|
||||
|
||||
//For debugging purposes
|
||||
/client/proc/list_all_languages()
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
//We store a list of all clients, with a list of all file names that the client received.
|
||||
/var/global/list/client_cache = list()
|
||||
|
||||
//List of ALL assets for the above, format is list(filename = asset).
|
||||
/var/global/list/asset_cache = list()
|
||||
|
||||
//This proc sends the asset to the client, but only if it needs it.
|
||||
/proc/send_asset(var/client/client, var/asset_name)
|
||||
var/list/client_list = client_cache[client]
|
||||
ASSERT(client_list)
|
||||
|
||||
if(asset_name in client_list)
|
||||
return
|
||||
|
||||
//world << "sending a client the asset '[asset_name]'"
|
||||
client << browse_rsc(asset_cache[asset_name], asset_name)
|
||||
client_list += asset_name
|
||||
|
||||
/proc/send_asset_list(var/client/client, var/list/asset_list)
|
||||
for(var/asset_name in asset_list)
|
||||
send_asset(client, asset_name)
|
||||
|
||||
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
|
||||
//if it's an icon or something be careful, you'll have to copy it before further use.
|
||||
/proc/register_asset(var/asset_name, var/asset)
|
||||
asset_cache |= asset_name
|
||||
asset_cache[asset_name] = asset
|
||||
|
||||
//From here on out it's populating the asset cache.
|
||||
/proc/populate_asset_cache()
|
||||
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
|
||||
var/datum/asset/A = new type()
|
||||
|
||||
A.register()
|
||||
|
||||
//These datums are used to populate the asset cache, the proc "register()" does this.
|
||||
/datum/asset/proc/register()
|
||||
return
|
||||
|
||||
//If you don't need anything complicated.
|
||||
/datum/asset/simple
|
||||
var/assets = list()
|
||||
|
||||
/datum/asset/simple/register()
|
||||
for(var/asset_name in assets)
|
||||
register_asset(asset_name, assets[asset_name])
|
||||
|
||||
//DEFINITIONS FOR ASSET DATUMS START HERE.
|
||||
/datum/asset/simple/spider_os
|
||||
assets = list(
|
||||
"sos_1.png" = 'icons/spideros_icons/sos_1.png',
|
||||
"sos_2.png" = 'icons/spideros_icons/sos_2.png',
|
||||
"sos_3.png" = 'icons/spideros_icons/sos_3.png',
|
||||
"sos_4.png" = 'icons/spideros_icons/sos_4.png',
|
||||
"sos_5.png" = 'icons/spideros_icons/sos_5.png',
|
||||
"sos_6.png" = 'icons/spideros_icons/sos_6.png',
|
||||
"sos_7.png" = 'icons/spideros_icons/sos_7.png',
|
||||
"sos_8.png" = 'icons/spideros_icons/sos_8.png',
|
||||
"sos_9.png" = 'icons/spideros_icons/sos_9.png',
|
||||
"sos_10.png" = 'icons/spideros_icons/sos_10.png',
|
||||
"sos_11.png" = 'icons/spideros_icons/sos_11.png',
|
||||
"sos_12.png" = 'icons/spideros_icons/sos_12.png',
|
||||
"sos_13.png" = 'icons/spideros_icons/sos_13.png',
|
||||
"sos_14.png" = 'icons/spideros_icons/sos_14.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/paper
|
||||
assets = list(
|
||||
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
|
||||
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
|
||||
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
|
||||
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
|
||||
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
|
||||
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
|
||||
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
|
||||
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
|
||||
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
|
||||
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
|
||||
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
|
||||
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
|
||||
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
|
||||
"talisman.png" = 'icons/paper_icons/talisman.png',
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
|
||||
)
|
||||
@@ -433,11 +433,11 @@ datum/preferences
|
||||
dat += "</center></body></html>"
|
||||
|
||||
// user << browse(dat, "window=preferences;size=560x580")
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 810)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
|
||||
proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 755, height = 780)
|
||||
proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 760, height = 790)
|
||||
if(!job_master)
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -69,6 +69,19 @@
|
||||
/obj/item/clothing/glasses/meson/prescription
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/meson/gar
|
||||
name = "gar mesons"
|
||||
icon_state = "garm"
|
||||
item_state = "garm"
|
||||
desc = "Do the impossible, see the invisible!"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
throw_speed = 4
|
||||
attack_verb = list("sliced")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/clothing/glasses/meson/cyber
|
||||
name = "Eye Replacement Implant"
|
||||
desc = "An implanted replacement for a left eye with meson vision capabilities."
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H=src
|
||||
var/obj/item/weapon/card/id/I=H.get_idcard()
|
||||
if(!I || !istype(I))
|
||||
return null
|
||||
var/attempt_pin=0
|
||||
var/datum/money_account/D = get_money_account(I.associated_account_number)
|
||||
if(require_pin && user)
|
||||
|
||||
@@ -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>"
|
||||
..()
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/ore_pickup_rate = 15
|
||||
var/sheet_per_ore = 1
|
||||
var/point_upgrade = 1
|
||||
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40))
|
||||
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60))
|
||||
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"))
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/New()
|
||||
@@ -79,28 +79,33 @@
|
||||
qdel(O) //... garbage collect
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/process()
|
||||
if(!panel_open) //If the machine is partially dissassembled, it should not process minerals
|
||||
var/turf/T = get_turf(get_step(src, input_dir))
|
||||
var/i
|
||||
if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
var/i = 0
|
||||
if(T)
|
||||
if(locate(/obj/item/weapon/ore) in T)
|
||||
for (i = 0; i < ore_pickup_rate; i++)
|
||||
var/obj/item/weapon/ore/O = locate() in T
|
||||
if(O)
|
||||
process_sheet(O)
|
||||
else
|
||||
for(var/obj/item/weapon/ore/O in T)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
else
|
||||
var/obj/structure/ore_box/B = locate() in T
|
||||
if(B)
|
||||
for(var/obj/item/weapon/ore/O in B.contents)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else
|
||||
var/obj/structure/ore_box/B = locate() in T
|
||||
if(B)
|
||||
for (i = 0; i < ore_pickup_rate; i++)
|
||||
var/obj/item/weapon/ore/O = locate() in B.contents
|
||||
if(O)
|
||||
process_sheet(O)
|
||||
else
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if (!powered())
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I) && !istype(inserted_id))
|
||||
@@ -249,7 +254,7 @@
|
||||
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
|
||||
var/obj/item/stack/sheet/glassstack = stack_list[/obj/item/stack/sheet/glass]
|
||||
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
|
||||
|
||||
|
||||
var/desired = input("How much?", "How much would you like to smelt?", 1) as num
|
||||
var/obj/item/stack/sheet/plasmaglass/plasglassout = new
|
||||
plasglassout.amount = min(desired, 50, glassstack.amount, plasmastack.amount)
|
||||
@@ -287,6 +292,17 @@
|
||||
s.forceMove(loc)
|
||||
s.layer = initial(s.layer)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/**********************Mining Equipment Locker**************************/
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor
|
||||
@@ -304,17 +320,23 @@
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 100),
|
||||
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 150),
|
||||
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 200),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 250),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 300),
|
||||
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 400),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 500),
|
||||
new /datum/data/mining_equipment("Hivelord Stabilizer", /obj/item/weapon/hivelordstabilizer, 400),
|
||||
new /datum/data/mining_equipment("Mining Drone", /obj/item/weapon/mining_drone_cube, 500),
|
||||
new /datum/data/mining_equipment("GAR mesons", /obj/item/clothing/glasses/meson/gar, 500),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 1200),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 1500),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 2500),
|
||||
new /datum/data/mining_equipment("Super Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator/super, 3000),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
|
||||
)
|
||||
|
||||
@@ -339,6 +361,17 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
@@ -424,8 +457,7 @@
|
||||
if("Resonator")
|
||||
new /obj/item/weapon/resonator(src.loc)
|
||||
if("Mining Drone")
|
||||
new /mob/living/simple_animal/hostile/mining_drone(src.loc)
|
||||
new /obj/item/weapon/weldingtool/hugetank(src.loc)
|
||||
new /obj/item/weapon/storage/box/drone_kit(src.loc)
|
||||
if("Advanced Scanner")
|
||||
new /obj/item/device/t_scanner/adv_mining_scanner(src.loc)
|
||||
qdel(voucher)
|
||||
@@ -548,6 +580,13 @@
|
||||
var/burst_time = 50
|
||||
var/fieldlimit = 3
|
||||
|
||||
/obj/item/weapon/resonator/upgraded
|
||||
name = "upgraded resonator"
|
||||
desc = "An upgraded version of the resonator that can produce more fields at once."
|
||||
icon_state = "resonator_u"
|
||||
origin_tech = "magnets=3;combat=3"
|
||||
fieldlimit = 5
|
||||
|
||||
/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator)
|
||||
var/turf/T = get_turf(target)
|
||||
if(locate(/obj/effect/resonance) in T)
|
||||
@@ -623,6 +662,22 @@
|
||||
return
|
||||
|
||||
|
||||
/**********************Mining drone cube**********************/
|
||||
|
||||
/obj/item/weapon/mining_drone_cube
|
||||
name = "mining drone cube"
|
||||
desc = "Compressed mining drone, ready for deployment. Just press the button to activate!"
|
||||
w_class = 2.0
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon_state = "minedronecube"
|
||||
item_state = "electronic"
|
||||
|
||||
/obj/item/weapon/mining_drone_cube/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [src] suddenly expands into a fully functional mining drone!</span>", \
|
||||
"<span class='warning'>You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!</span>")
|
||||
new /mob/living/simple_animal/hostile/mining_drone(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/**********************Mining drone**********************/
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone
|
||||
@@ -757,6 +812,22 @@
|
||||
SetOffenseBehavior()
|
||||
..()
|
||||
|
||||
|
||||
/**********************Mining drone kit**********************/
|
||||
|
||||
/obj/item/weapon/storage/box/drone_kit
|
||||
name = "Drone Kit"
|
||||
desc = "A boxed kit that includes one mining drone cube and a welding tool with an increased capacity."
|
||||
icon_state = "implant"
|
||||
max_w_class = 3
|
||||
storage_slots = 2
|
||||
can_hold = list("/obj/item/weapon/mining_drone_cube","/obj/item/weapon/weldingtool/hugetank")
|
||||
|
||||
/obj/item/weapon/storage/box/drone_kit/New()
|
||||
..()
|
||||
new /obj/item/weapon/mining_drone_cube(src)
|
||||
new /obj/item/weapon/weldingtool/hugetank(src)
|
||||
|
||||
/**********************Lazarus Injector**********************/
|
||||
|
||||
/obj/item/weapon/lazarus_injector
|
||||
@@ -904,3 +975,22 @@
|
||||
volume = 40
|
||||
throw_range = 7
|
||||
w_class = 3 //same as syndie harness
|
||||
|
||||
/*********************Hivelord stabilizer****************/
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer
|
||||
name = "hivelord stabilizer"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle19"
|
||||
desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely."
|
||||
w_class = 1
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/M, mob/user)
|
||||
var/obj/item/asteroid/hivelord_core/C = M
|
||||
if(!istype(C, /obj/item/asteroid/hivelord_core))
|
||||
user << "<span class='warning'>The stabilizer only works on hivelord cores.</span>"
|
||||
return ..()
|
||||
C.preserved = 1
|
||||
user << "<span class='notice'>You inject the hivelord core with the stabilizer. It will no longer go inert.</span>"
|
||||
qdel(src)
|
||||
|
||||
@@ -79,6 +79,14 @@
|
||||
/obj/item/weapon/pickaxe/proc/playDigSound()
|
||||
playsound(src, pick(digsound),20,1)
|
||||
|
||||
/obj/item/weapon/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30 //mines faster than a normal pickaxe, bought from mining vendor
|
||||
origin_tech = "materials=3;engineering=2"
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
|
||||
/obj/item/weapon/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
|
||||
@@ -89,6 +89,7 @@ var/global/list/rockTurfEdgeCache
|
||||
|
||||
/turf/simulated/mineral/proc/HideRock()
|
||||
if(hidden)
|
||||
name = "rock"
|
||||
icon_state = "rock"
|
||||
return
|
||||
|
||||
@@ -135,6 +136,7 @@ var/global/list/rockTurfEdgeCache
|
||||
if("BScrystal")
|
||||
M = new/turf/simulated/mineral/bscrystal(src)
|
||||
if(M)
|
||||
M.mineralAmt = rand(1, 5)
|
||||
src = M
|
||||
M.levelupdate()
|
||||
return
|
||||
@@ -240,7 +242,7 @@ var/global/list/rockTurfEdgeCache
|
||||
/turf/simulated/mineral/bscrystal
|
||||
name = "bluespace crystal deposit"
|
||||
icon_state = "rock_BScrystal"
|
||||
mineralType = /obj/item/bluespace_crystal
|
||||
mineralType = /obj/item/weapon/ore/bluespace_crystal
|
||||
mineralName = "Bluespace crystal"
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/obj/item/weapon/ore/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(15))
|
||||
if(W.remove_fuel(15) && refined_type)
|
||||
new refined_type(get_turf(src.loc))
|
||||
qdel(src)
|
||||
else if(W.isOn())
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "uranium ore"
|
||||
icon_state = "Uranium ore"
|
||||
origin_tech = "materials=5"
|
||||
points = 18
|
||||
points = 30
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "plasma ore"
|
||||
icon_state = "Plasma ore"
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
points = 36
|
||||
points = 15
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
name = "silver ore"
|
||||
icon_state = "Silver ore"
|
||||
origin_tech = "materials=3"
|
||||
points = 18
|
||||
points = 16
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
name = "diamond ore"
|
||||
icon_state = "Diamond ore"
|
||||
origin_tech = "materials=6"
|
||||
points = 36
|
||||
points = 50
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "bananium ore"
|
||||
icon_state = "Clown ore"
|
||||
origin_tech = "materials=4"
|
||||
points = 27
|
||||
points = 60
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/amt_plasma = 0
|
||||
var/amt_uranium = 0
|
||||
var/amt_clown = 0
|
||||
var/amt_bluespace = 0
|
||||
|
||||
for (var/obj/item/weapon/ore/C in contents)
|
||||
if (istype(C,/obj/item/weapon/ore/diamond))
|
||||
@@ -49,6 +50,8 @@
|
||||
amt_uranium++;
|
||||
if (istype(C,/obj/item/weapon/ore/bananium))
|
||||
amt_clown++;
|
||||
if (istype(C,/obj/item/weapon/ore/bluespace_crystal))
|
||||
amt_bluespace++
|
||||
|
||||
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
|
||||
if (amt_gold)
|
||||
@@ -67,6 +70,8 @@
|
||||
dat += text("Uranium ore: [amt_uranium]<br>")
|
||||
if (amt_clown)
|
||||
dat += text("Bananium ore: [amt_clown]<br>")
|
||||
if (amt_bluespace)
|
||||
dat += text("Bluespace crystals: [amt_bluespace]<br>")
|
||||
|
||||
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
|
||||
user << browse("[dat]", "window=orebox")
|
||||
|
||||
@@ -892,6 +892,10 @@
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/spacepod))
|
||||
var/obj/spacepod/S = loc
|
||||
loc_temp = S.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/structure/transit_tube_pod))
|
||||
loc_temp = environment.temperature
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -153,6 +153,11 @@
|
||||
var/ore_eaten = 1
|
||||
var/chase_time = 100
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/New()
|
||||
..()
|
||||
ore_types_eaten += pick(/obj/item/weapon/ore/silver, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/diamond)
|
||||
ore_eaten = rand(1,3)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(var/new_target)
|
||||
target = new_target
|
||||
if(target != null)
|
||||
@@ -182,8 +187,8 @@
|
||||
if(!(O.type in ore_types_eaten))
|
||||
ore_types_eaten += O.type
|
||||
qdel(O)
|
||||
if(ore_eaten > 5)//Limit the scope of the reward you can get, or else things might get silly
|
||||
ore_eaten = 5
|
||||
if(ore_eaten > 10)//Limit the scope of the reward you can get, or else things might get silly
|
||||
ore_eaten = 10
|
||||
visible_message("<span class='notice'>The ore was swallowed whole!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time
|
||||
@@ -272,11 +277,13 @@
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = "boiledrorocore"
|
||||
var/inert = 0
|
||||
var/preserved = 0
|
||||
|
||||
/obj/item/asteroid/hivelord_core/New()
|
||||
spawn(1200)
|
||||
inert = 1
|
||||
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
|
||||
spawn(2400)
|
||||
if(!preserved)
|
||||
inert = 1
|
||||
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
|
||||
|
||||
/obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -5,32 +5,6 @@
|
||||
var/open_uis[0]
|
||||
// a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
var/list/processing_uis = list()
|
||||
// a list of asset filenames which are to be sent to the client on user logon
|
||||
var/list/asset_files = list()
|
||||
|
||||
/**
|
||||
* Create a new nanomanager instance.
|
||||
* This proc generates a list of assets which are to be sent to each client on connect
|
||||
*
|
||||
* @return /nanomanager new nanomanager object
|
||||
*/
|
||||
/datum/nanomanager/New()
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
|
||||
var/list/filenames = null
|
||||
for (var/path in nano_asset_dirs)
|
||||
filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore
|
||||
if(fexists(path + filename))
|
||||
asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect
|
||||
|
||||
return
|
||||
|
||||
/**
|
||||
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
|
||||
@@ -122,8 +96,8 @@
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.nano_host())
|
||||
ui.close()
|
||||
close_count++
|
||||
return close_count
|
||||
|
||||
return close_count
|
||||
|
||||
/**
|
||||
* Update /nanoui uis belonging to user
|
||||
*
|
||||
@@ -253,18 +227,4 @@
|
||||
|
||||
oldMob.open_uis.Cut()
|
||||
|
||||
return 1 // success
|
||||
|
||||
/**
|
||||
* Sends all nano assets to the client
|
||||
* This is called on user login
|
||||
*
|
||||
* @param client /client The user's client
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
/datum/nanomanager/proc/send_resources(client)
|
||||
for(var/file in asset_files)
|
||||
client << browse_rsc(file) // send the file to the client
|
||||
|
||||
return 1 // success
|
||||
@@ -96,6 +96,9 @@ nanoui is used to open and update nano browser uis
|
||||
|
||||
add_common_assets()
|
||||
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui)
|
||||
assets.send(user, ntemplate_filename)
|
||||
|
||||
/**
|
||||
* Use this proc to add assets which are common to (and required by) all nano uis
|
||||
*
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
if(!affecting) return//If no mob is wearing the suit. I almost forgot about this variable.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/display_to = U//Who do we want to display certain messages to?
|
||||
|
||||
|
||||
if(U.client) // Send the spider OS images to the client
|
||||
var/datum/asset/simple/S = new/datum/asset/simple/spider_os()
|
||||
send_asset_list(U.client, S.assets)
|
||||
var/datum/asset/simple/S = new/datum/asset/simple/spider_os() //no longer exists ;)
|
||||
send_asset_list(U.client, S.assets)
|
||||
|
||||
var/dat = "<html><head><title>SpiderOS</title></head><body bgcolor=\"#3D5B43\" text=\"#DB2929\"><style>a, a:link, a:visited, a:active, a:hover { color: #DB2929; }img {border-style:none;}</style>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=sos_7.png> Refresh</a>"
|
||||
|
||||
@@ -59,10 +59,8 @@
|
||||
user << "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
|
||||
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1)
|
||||
set src in oview(1)
|
||||
if(user.client) // Send the paper images to the client
|
||||
var/datum/asset/simple/S = new/datum/asset/simple/paper()
|
||||
send_asset_list(user.client, S.assets)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
|
||||
assets.send(user)
|
||||
|
||||
var/data
|
||||
if((!user.say_understands(null, all_languages["Galactic Common"]) && !forceshow) || forcestars) //assuming all paper is written in common is better than hardcoded type checks
|
||||
|
||||
@@ -207,6 +207,24 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
var/overheat_time = 16
|
||||
var/recent_reload = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/super
|
||||
name = "super-kinetic accelerator"
|
||||
desc = "An upgraded, superior version of the proto-kinetic accelerator."
|
||||
icon_state = "kineticgun_u"
|
||||
projectile_type = "/obj/item/projectile/kinetic/super"
|
||||
overheat_time = 15
|
||||
fire_delay = 15
|
||||
origin_tech = "combat=3;powerstorage=2"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/hyper
|
||||
name = "hyper-kinetic accelerator"
|
||||
desc = "An upgraded, even more superior version of the proto-kinetic accelerator."
|
||||
icon_state = "kineticgun_h"
|
||||
projectile_type = "/obj/item/projectile/kinetic/hyper"
|
||||
overheat_time = 13
|
||||
fire_delay = 13
|
||||
origin_tech = "combat=4;powerstorage=3"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
flags = NODROP
|
||||
|
||||
|
||||
@@ -218,6 +218,16 @@
|
||||
damage_type = BRUTE
|
||||
flag = "bomb"
|
||||
range = 3
|
||||
var/splash = 0
|
||||
|
||||
/obj/item/projectile/kinetic/super
|
||||
damage = 11
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/kinetic/hyper
|
||||
damage = 12
|
||||
range = 5
|
||||
splash = 1
|
||||
|
||||
obj/item/projectile/kinetic/New()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
@@ -243,6 +253,11 @@ obj/item/projectile/kinetic/New()
|
||||
var/turf/simulated/mineral/M = target_turf
|
||||
M.gets_drilled(firer)
|
||||
new /obj/item/effect/kinetic_blast(target_turf)
|
||||
if(src.splash)
|
||||
for(var/turf/T in range(splash, target_turf))
|
||||
if(istype(T, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.gets_drilled(firer)
|
||||
|
||||
/obj/item/effect/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
|
||||
@@ -199,6 +199,7 @@ datum/reagent/fungus/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
description = "An old household remedy for mild illnesses."
|
||||
reagent_state = LIQUID
|
||||
color = "#B4B400"
|
||||
metabolization_rate = 0.2
|
||||
|
||||
/datum/reagent/chicken_soup/on_mob_life(var/mob/living/M as mob)
|
||||
M.nutrition += 2
|
||||
|
||||
@@ -278,6 +278,7 @@ datum/reagent/sal_acid
|
||||
description = "This is a is a standard salicylate pain reliever and fever reducer."
|
||||
reagent_state = LIQUID
|
||||
color = "#B3B3B3"
|
||||
metabolization_rate = 0.1
|
||||
shock_reduction = 25
|
||||
overdose_threshold = 25
|
||||
|
||||
@@ -285,6 +286,10 @@ datum/reagent/sal_acid/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(prob(55))
|
||||
M.adjustBruteLoss(-2*REM)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -458,6 +463,10 @@ datum/reagent/morphine/on_mob_life(var/mob/living/M as mob)
|
||||
if(36 to INFINITY)
|
||||
M.Paralyse(10)
|
||||
M.drowsyness = max(M.drowsyness, 15)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -794,7 +803,7 @@ datum/reagent/antihol/on_mob_life(var/mob/living/M as mob)
|
||||
M.drowsyness = 0
|
||||
M.slurring = 0
|
||||
M.confused = 0
|
||||
M.reagents.remove_reagent("ethanol", 8)
|
||||
M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1)
|
||||
if(M.health < 25)
|
||||
M.adjustToxLoss(-2.0)
|
||||
..()
|
||||
|
||||
@@ -454,6 +454,7 @@ datum/reagent/lipolicide
|
||||
description = "A compound found in many seedy dollar stores in the form of a weight-loss tonic."
|
||||
reagent_state = SOLID
|
||||
color = "#D1DED1"
|
||||
metabolization_rate = 0.2
|
||||
|
||||
/datum/chemical_reaction/lipolicide
|
||||
name = "lipolicide"
|
||||
@@ -465,7 +466,8 @@ datum/reagent/lipolicide
|
||||
datum/reagent/lipolicide/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!holder.has_reagent("nutriment"))
|
||||
M.adjustToxLoss(1)
|
||||
if(prob(30))
|
||||
M.adjustToxLoss(1)
|
||||
M.nutrition -= 10 * REAGENTS_METABOLISM
|
||||
M.overeatduration = 0
|
||||
if(M.nutrition < 0)//Prevent from going into negatives.
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
if(holder.my_atom)
|
||||
var/obj/item/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
var/obj/item/weapon/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
|
||||
//Cerulean
|
||||
slimepsteroid2
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
/datum/reagent/hydrocodone/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -102,27 +106,22 @@
|
||||
/datum/reagent/rezadone
|
||||
name = "Rezadone"
|
||||
id = "rezadone"
|
||||
description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects."
|
||||
description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage."
|
||||
reagent_state = SOLID
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
overdose_threshold = 30
|
||||
|
||||
/datum/reagent/rezadone/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!data) data = 1
|
||||
data++
|
||||
switch(data)
|
||||
if(1 to 15)
|
||||
M.adjustCloneLoss(-1)
|
||||
M.heal_organ_damage(1,1)
|
||||
if(15 to 35)
|
||||
M.adjustCloneLoss(-2)
|
||||
M.heal_organ_damage(2,1)
|
||||
M.status_flags &= ~DISFIGURED
|
||||
if(35 to INFINITY)
|
||||
M.adjustToxLoss(1)
|
||||
M.Dizzy(5)
|
||||
M.Jitter(5)
|
||||
/datum/reagent/rezadone/on_mob_life(mob/living/M)
|
||||
M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
|
||||
M.heal_organ_damage(1,1)
|
||||
M.status_flags &= ~DISFIGURED
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/rezadone/overdose_process(mob/living/M)
|
||||
M.adjustToxLoss(1)
|
||||
M.Dizzy(5)
|
||||
M.Jitter(5)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -132,6 +131,7 @@
|
||||
description = "An all-purpose antibiotic agent extracted from space fungus."
|
||||
reagent_state = LIQUID
|
||||
color = "#0AB478"
|
||||
metabolization_rate = 0.2
|
||||
|
||||
/datum/reagent/spaceacillin/on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
|
||||
reliability = 100
|
||||
build_path = /obj/item/bluespace_crystal/artificial
|
||||
build_path = /obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
category = list("Bluespace")
|
||||
|
||||
/datum/design/bag_holding
|
||||
|
||||
@@ -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")
|
||||
@@ -60,6 +60,36 @@
|
||||
id = "jackhammer"
|
||||
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_DIAMOND = 6000)
|
||||
materials = list(MAT_METAL = 6000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_DIAMOND = 6000)
|
||||
build_path = /obj/item/weapon/pickaxe/drill/jackhammer
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/superaccelerator
|
||||
name = "Super-Kinetic Accelerator"
|
||||
desc = "An upgraded version of the proto-kinetic accelerator, with superior damage, speed and range."
|
||||
id = "superaccelerator"
|
||||
req_tech = list("materials" = 5, "powerstorage" = 4, "engineering" = 4, "magnets" = 4, "combat" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000)
|
||||
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/super
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/hyperaccelerator
|
||||
name = "Hyper-Kinetic Accelerator"
|
||||
desc = "An upgraded version of the proto-kinetic accelerator, with even more superior damage, speed and range."
|
||||
id = "hyperaccelerator"
|
||||
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6, "combat" = 4)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 2000, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/hyper
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/superresonator
|
||||
name = "Upgraded Resonator"
|
||||
desc = "An upgraded version of the resonator that allows more fields to be active at once."
|
||||
id = "superresonator"
|
||||
req_tech = list("materials" = 4, "powerstorage" = 3, "engineering" = 3, "magnets" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 4000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000)
|
||||
build_path = /obj/item/weapon/resonator/upgraded
|
||||
category = list("Mining")
|
||||
@@ -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>"
|
||||
|
||||
@@ -1,39 +1,40 @@
|
||||
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/bluespace_crystal
|
||||
/obj/item/weapon/ore/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "bluespace_crystal"
|
||||
w_class = 1
|
||||
origin_tech = "bluespace=4;materials=3"
|
||||
points = 50
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
|
||||
/obj/item/bluespace_crystal/New()
|
||||
/obj/item/weapon/ore/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/bluespace_crystal/attack_self(var/mob/user)
|
||||
/obj/item/weapon/ore/bluespace_crystal/attack_self(var/mob/user)
|
||||
blink_mob(user)
|
||||
user.drop_item()
|
||||
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
/obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
if(L.z in config.admin_levels)
|
||||
src.visible_message("<span class=warning>[src]'s fragments begin rapidly vibrating and blink out of existence.<span>")
|
||||
qdel(src)
|
||||
return
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
/obj/item/weapon/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
// Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/bluespace_crystal/artificial
|
||||
/obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=2"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
@@ -25,8 +25,8 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
/obj/machinery/computer/telescience/initialize()
|
||||
..()
|
||||
for(var/i = 1; i <= starting_crystals; i++)
|
||||
crystals += new /obj/item/bluespace_crystal/artificial(null) // starting crystals
|
||||
crystals += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) // starting crystals
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/bluespace_crystal))
|
||||
if(istype(W, /obj/item/weapon/ore/bluespace_crystal))
|
||||
if(crystals.len >= max_crystals)
|
||||
user << "<span class='warning'>There are not enough crystal slots.</span>"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user