mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into HudRefactor
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]")
|
||||
|
||||
@@ -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')
|
||||
claw_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]")
|
||||
|
||||
/obj/machinery/arcade/claw/RefreshParts()
|
||||
var/bin_upgrades = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
bin_upgrades = B.rating
|
||||
bonus_prize_chance = bin_upgrades * 5 //equals +5% chance per matter bin rating level (+20% with rating 4)
|
||||
|
||||
/obj/machinery/arcade/claw/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "clawmachine[machine_image]_broken"
|
||||
else if(panel_open)
|
||||
icon_state = "clawmachine[machine_image]_open"
|
||||
else if(stat & NOPOWER)
|
||||
icon_state = "clawmachine[machine_image]_off"
|
||||
else
|
||||
icon_state = "clawmachine[machine_image]_on"
|
||||
return
|
||||
|
||||
/obj/machinery/arcade/claw/win()
|
||||
icon_state = "clawmachine[machine_image]_win"
|
||||
visible_message("<span class='game say'><span class='name'>[src.name]</span> beeps, \"WINNER!\"</span>")
|
||||
if(prob(bonus_prize_chance))
|
||||
//double prize mania!
|
||||
new /obj/item/toy/prizeball(get_turf(src))
|
||||
new /obj/item/toy/prizeball(get_turf(src))
|
||||
playsound(src.loc, 'sound/arcade/Win.ogg', 50, 1, extrarange = -3, falloff = 10)
|
||||
spawn(10)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/arcade/claw/start_play(mob/user as mob)
|
||||
..()
|
||||
user << browse_rsc('page.css')
|
||||
for(var/i=1, i<=img_resources.len, i++)
|
||||
user << browse_rsc(img_resources[i])
|
||||
user << browse(claw_game_html, "window=[window_name];size=700x600")
|
||||
|
||||
/obj/machinery/arcade/claw/Topic(href, list/href_list)
|
||||
if(..())
|
||||
return
|
||||
var/prize_won = null
|
||||
prize_won = href_list["prizeWon"]
|
||||
if(!isnull(prize_won))
|
||||
close_game()
|
||||
if(prize_won == "1")
|
||||
win()
|
||||
@@ -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;
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implantcase/exile
|
||||
name = "/improper Glass Case- 'Exile'"
|
||||
name = "\improper Glass Case- 'Exile'"
|
||||
desc = "A case containing an exile implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -320,6 +320,7 @@ BLIND // can't see anything
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FEET
|
||||
|
||||
var/silence_steps = 0
|
||||
|
||||
permeability_coefficient = 0.50
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/clothing/glasses/hud
|
||||
name = "/improper HUD"
|
||||
name = "\improper HUD"
|
||||
desc = "A heads-up display that provides important info in (almost) real time."
|
||||
flags = null //doesn't protect eyes because it's a monocle, duh
|
||||
origin_tech = "magnets=3;biotech=2"
|
||||
@@ -24,20 +24,20 @@
|
||||
desc = desc + " The display flickers slightly."
|
||||
|
||||
/obj/item/clothing/glasses/hud/health
|
||||
name = "/improper Health Scanner HUD"
|
||||
name = "\improper Health Scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
|
||||
icon_state = "healthhud"
|
||||
HUDType = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
/obj/item/clothing/glasses/hud/health_advanced
|
||||
name = "/improper Advanced Health Scanner HUD"
|
||||
name = "\improper Advanced Health Scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter."
|
||||
icon_state = "advmedhud"
|
||||
flash_protect = 1
|
||||
HUDType = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/night
|
||||
name = "/improper Night Vision Health Scanner HUD"
|
||||
name = "\improper Night Vision Health Scanner HUD"
|
||||
desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness."
|
||||
icon_state = "healthhudnight"
|
||||
item_state = "glasses"
|
||||
@@ -52,7 +52,7 @@
|
||||
HUDType = DATA_HUD_DIAGNOSTIC
|
||||
|
||||
/obj/item/clothing/glasses/hud/security
|
||||
name = "/improper Security HUD"
|
||||
name = "\improper Security HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
|
||||
icon_state = "securityhud"
|
||||
var/global/list/jobs[0]
|
||||
@@ -68,7 +68,7 @@
|
||||
invisa_view = 2
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/night
|
||||
name = "/improper Night Vision Security HUD"
|
||||
name = "\improper Night Vision Security HUD"
|
||||
desc = "An advanced heads-up display which provides id data and vision in complete darkness."
|
||||
icon_state = "securityhudnight"
|
||||
darkness_view = 8
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/list/clothing_choices = list()
|
||||
siemens_coefficient = 0.8
|
||||
species_restricted = null
|
||||
silence_steps = 1
|
||||
|
||||
/obj/item/clothing/shoes/mime
|
||||
name = "mime shoes"
|
||||
@@ -175,3 +176,25 @@
|
||||
icon_state = "noble_boot"
|
||||
item_color = "noble_boot"
|
||||
item_state = "noble_boot"
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/shoe_silencer))
|
||||
silence_steps = 1
|
||||
user.unEquip(I)
|
||||
qdel(I)
|
||||
else . = ..()
|
||||
|
||||
/obj/item/shoe_silencer
|
||||
name = "shoe rags"
|
||||
desc = "Looks sneaky."
|
||||
icon_state = "sheet-cloth"
|
||||
|
||||
/datum/table_recipe/shoe_rags
|
||||
name = "Shoe Rags"
|
||||
|
||||
result = /obj/item/shoe_silencer
|
||||
reqs = list(/obj/item/stack/tape_roll = 10)
|
||||
tools = list(/obj/item/weapon/wirecutters)
|
||||
|
||||
time = 40
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
||||
@@ -291,3 +291,30 @@ Des: Removes all infected images from the alien.
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
/mob/living/carbon/alien/handle_footstep(turf/T)
|
||||
if(..())
|
||||
if(T.footstep_sounds["xeno"])
|
||||
var/S = pick(T.footstep_sounds["xeno"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
var/range = -(world.view - 2)
|
||||
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
var/volume = 5
|
||||
|
||||
if(m_intent == "walk")
|
||||
return 0 //silent when walking
|
||||
|
||||
if(buckled || lying || throwing)
|
||||
return 0 //people flying, lying down or sitting do not step
|
||||
|
||||
if(!has_gravity(src))
|
||||
if(step_count % 3) //this basically says, every three moves make a noise
|
||||
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
|
||||
|
||||
playsound(T, S, volume, 1, range)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -95,4 +95,55 @@
|
||||
if(!has_gravity(loc))
|
||||
return
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
S.step_action(src)
|
||||
S.step_action(src)
|
||||
|
||||
/mob/living/carbon/human/handle_footstep(turf/T)
|
||||
if(..())
|
||||
if(T.footstep_sounds["human"])
|
||||
var/S = pick(T.footstep_sounds["human"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
var/range = -(world.view - 2)
|
||||
if(m_intent == "walk")
|
||||
range -= 0.333
|
||||
if(!shoes)
|
||||
range -= 0.333
|
||||
|
||||
//shoes + running
|
||||
//-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6)
|
||||
//running OR shoes
|
||||
//-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5)
|
||||
//walking AND no shoes
|
||||
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
|
||||
var/volume = 13
|
||||
if(m_intent == "walk")
|
||||
volume -= 4
|
||||
if(!shoes)
|
||||
volume -= 4
|
||||
|
||||
if(istype(shoes, /obj/item/clothing/shoes))
|
||||
var/obj/item/clothing/shoes/shooess = shoes
|
||||
if(shooess.silence_steps)
|
||||
return 0 //silent
|
||||
|
||||
if(!has_organ("l_foot") && !has_organ("r_foot"))
|
||||
return 0 //no feet no footsteps
|
||||
|
||||
if(buckled || lying || throwing)
|
||||
return 0 //people flying, lying down or sitting do not step
|
||||
|
||||
if(!has_gravity(src))
|
||||
if(step_count % 3) //this basically says, every three moves make a noise
|
||||
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
|
||||
|
||||
if(species.silent_steps)
|
||||
return 0 //species is silent
|
||||
|
||||
playsound(T, S, volume, 1, range)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -23,6 +23,7 @@
|
||||
var/unarmed //For empty hand harm-intent attack
|
||||
var/unarmed_type = /datum/unarmed_attack
|
||||
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
|
||||
var/silent_steps = 0 // Stops step noises
|
||||
|
||||
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
|
||||
var/poison_type = "plasma" // Poisonous air.
|
||||
@@ -591,4 +592,4 @@
|
||||
else
|
||||
H.bodytemp.icon_state = "temp0"
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -481,10 +481,18 @@
|
||||
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
|
||||
s_active.close(src)
|
||||
|
||||
handle_footstep(loc)
|
||||
step_count++
|
||||
|
||||
if(update_slimes)
|
||||
for(var/mob/living/carbon/slime/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
/mob/living/proc/handle_footstep(turf/T)
|
||||
if(istype(T))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/*//////////////////////
|
||||
START RESIST PROCS
|
||||
*///////////////////////
|
||||
|
||||
@@ -51,4 +51,5 @@
|
||||
var/list/icon/pipes_shown = list()
|
||||
var/last_played_vent
|
||||
|
||||
var/list/datum/action/actions = list()
|
||||
var/list/datum/action/actions = list()
|
||||
var/step_count = 0
|
||||
@@ -14,6 +14,7 @@
|
||||
density = 0
|
||||
req_access = list(access_engine, access_robotics)
|
||||
local_transmit = 1
|
||||
ventcrawler = 2
|
||||
|
||||
// We need to keep track of a few module items so we don't need to do list operations
|
||||
// every time we need them. These get set in New() after the module is chosen.
|
||||
@@ -211,12 +212,12 @@
|
||||
//Drones killed by damage will gib.
|
||||
/mob/living/silicon/robot/drone/handle_regular_status_updates()
|
||||
|
||||
if(health <= -35 && src.stat != 2)
|
||||
if(health <= -35 && src.stat != DEAD)
|
||||
timeofdeath = world.time
|
||||
death() //Possibly redundant, having trouble making death() cooperate.
|
||||
gib()
|
||||
return
|
||||
..()
|
||||
return ..() // If you don't return anything here, you won't update status effects, like weakening
|
||||
|
||||
/mob/living/silicon/robot/drone/death(gibbed)
|
||||
|
||||
@@ -339,4 +340,4 @@
|
||||
|
||||
/mob/living/silicon/robot/drone/update_canmove()
|
||||
. = ..()
|
||||
density = 0 //this is reset every canmove update otherwise
|
||||
density = 0 //this is reset every canmove update otherwise
|
||||
|
||||
@@ -5,9 +5,9 @@ datum/preferences
|
||||
gender = gender_override
|
||||
else
|
||||
gender = pick(MALE, FEMALE)
|
||||
underwear = random_underwear(gender)
|
||||
undershirt = random_undershirt(gender)
|
||||
socks = random_socks(gender)
|
||||
underwear = random_underwear(gender, species)
|
||||
undershirt = random_undershirt(gender, species)
|
||||
socks = random_socks(gender, species)
|
||||
if(species == "Human")
|
||||
s_tone = random_skin_tone()
|
||||
h_style = random_hair_style(gender, species)
|
||||
@@ -804,7 +804,7 @@ datum/preferences
|
||||
else if(backbag == 3 || backbag == 4)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
|
||||
|
||||
if(!current_species.bodyflags & NO_EYES)
|
||||
if(!(current_species.bodyflags & NO_EYES))
|
||||
preview_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
if(underwear_s)
|
||||
preview_icon.Blend(underwear_s, ICON_OVERLAY)
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
L[D.name] = D
|
||||
|
||||
switch(D.gender)
|
||||
if(MALE) male += D.name
|
||||
if(FEMALE) female += D.name
|
||||
if(MALE) male[D.name] = D
|
||||
if(FEMALE) female[D.name] = D
|
||||
else
|
||||
male += D.name
|
||||
female += D.name
|
||||
male[D.name] = D
|
||||
female[D.name] = D
|
||||
return L
|
||||
|
||||
/datum/sprite_accessory
|
||||
@@ -1019,7 +1019,7 @@
|
||||
/datum/sprite_accessory/underwear
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
|
||||
|
||||
nude
|
||||
name = "Nude"
|
||||
@@ -1092,7 +1092,7 @@
|
||||
/datum/sprite_accessory/undershirt
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
|
||||
|
||||
/datum/sprite_accessory/undershirt/nude
|
||||
name = "Nude"
|
||||
@@ -1331,6 +1331,7 @@
|
||||
///////////////////////
|
||||
/datum/sprite_accessory/socks
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
/datum/sprite_accessory/socks/nude
|
||||
name = "Nude"
|
||||
@@ -1343,111 +1344,95 @@
|
||||
name = "Normal White"
|
||||
icon_state = "white_norm"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/black_norm
|
||||
name = "Normal Black"
|
||||
icon_state = "black_norm"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/white_short
|
||||
name = "Short White"
|
||||
icon_state = "white_short"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/black_short
|
||||
name = "Short Black"
|
||||
icon_state = "black_short"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/white_knee
|
||||
name = "Knee-high White"
|
||||
icon_state = "white_knee"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/black_knee
|
||||
name = "Knee-high Black"
|
||||
icon_state = "black_knee"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/thin_knee
|
||||
name = "Knee-high Thin"
|
||||
icon_state = "thin_knee"
|
||||
gender = FEMALE
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/striped_knee
|
||||
name = "Knee-high Striped"
|
||||
icon_state = "striped_knee"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/rainbow_knee
|
||||
name = "Knee-high Rainbow"
|
||||
icon_state = "rainbow_knee"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/white_thigh
|
||||
name = "Thigh-high White"
|
||||
icon_state = "white_thigh"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
/datum/sprite_accessory/socks/black_thigh
|
||||
name = "Thigh-high Black"
|
||||
icon_state = "black_thigh"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/thin_thigh
|
||||
name = "Thigh-high Thin"
|
||||
icon_state = "thin_thigh"
|
||||
gender = FEMALE
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/striped_thigh
|
||||
name = "Thigh-high Striped"
|
||||
icon_state = "striped_thigh"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/rainbow_thigh
|
||||
name = "Thigh-high Rainbow"
|
||||
icon_state = "rainbow_thigh"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/pantyhose
|
||||
name = "Pantyhose"
|
||||
icon_state = "pantyhose"
|
||||
gender = FEMALE
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
|
||||
/datum/sprite_accessory/socks/black_fishnet
|
||||
name = "Black Fishnet"
|
||||
icon_state = "black_fishnet"
|
||||
gender = NEUTER
|
||||
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
|
||||
|
||||
/datum/sprite_accessory/socks/vox_white
|
||||
name = "Vox White"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "laser"
|
||||
item_state = "laser"
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
charge_cost = 830
|
||||
charge_cost = 760
|
||||
w_class = 3.0
|
||||
materials = list(MAT_METAL=2000)
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
reagents.add_reagent("blackpepper", 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/syndisauce
|
||||
name = "/improper Chef Excellence's Special Sauce"
|
||||
name = "\improper Chef Excellence's Special Sauce"
|
||||
desc = "A potent sauce extracted from the potent amanita mushrooms. Death never tasted quite so delicious."
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 50
|
||||
|
||||
@@ -245,7 +245,8 @@
|
||||
M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","<span class=\"notice\">You swallow up the last part of \the [src].")
|
||||
playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
var/mob/living/simple_animal/pet/corgi/C = M
|
||||
C.health = min(C.health + 5, C.maxHealth)
|
||||
C.adjustBruteLoss(-5)
|
||||
C.adjustFireLoss(-5)
|
||||
qdel(src)
|
||||
else
|
||||
M.visible_message("[M] takes a bite of \the [src].","<span class=\"notice\">You take a bite of \the [src].")
|
||||
@@ -257,7 +258,8 @@
|
||||
if(prob(50))
|
||||
N.visible_message("[N] nibbles away at [src].", "")
|
||||
//N.emote("nibbles away at the [src]")
|
||||
N.health = min(N.health + 1, N.maxHealth)
|
||||
N.adjustBruteLoss(-1)
|
||||
N.adjustFireLoss(-1)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -463,11 +463,21 @@
|
||||
category = list ("Misc. Machinery")
|
||||
|
||||
/datum/design/mining_equipment_vendor
|
||||
name = "Machine Design (Mining Rewards Vender Board)"
|
||||
desc = "The circuit board for a Mining Rewards Vender."
|
||||
name = "Machine Design (Mining Rewards Vendor Board)"
|
||||
desc = "The circuit board for a Mining Rewards Vendor."
|
||||
id = "mining_equipment_vendor"
|
||||
req_tech = list("programming" = 1, "engineering" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list(MAT_GLASS=1000, "sacid"=20)
|
||||
build_path = /obj/item/weapon/circuitboard/mining_equipment_vendor
|
||||
category = list ("Misc. Machinery")
|
||||
|
||||
/datum/design/clawgame
|
||||
name = "Machine Design (Claw Game Board)"
|
||||
desc = "The circuit board for a Claw Game."
|
||||
id = "clawgame"
|
||||
req_tech = list("programming" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list(MAT_GLASS=1000, "sacid"=20)
|
||||
build_path = /obj/item/weapon/circuitboard/clawgame
|
||||
category = list ("Misc. Machinery")
|
||||
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user