mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-24 13:48:02 +01:00
Ports a lot of stuff from all around (#23)
* shhh * checks the thing * please don't hurt me, it is my first time * there, much better * this is huge Co-authored-by: crazyraio2 <44246096+crazyraio2@users.noreply.github.com>
This commit is contained in:
co-authored by
crazyraio2
parent
66dc5b5a7e
commit
b5f77eeb66
@@ -0,0 +1,167 @@
|
||||
/obj/machinery/autodoc
|
||||
name = "autodoc"
|
||||
desc = "An advanced machine used for inserting organs and implants into the occupant."
|
||||
density = TRUE
|
||||
state_open = FALSE
|
||||
icon = 'sandcode/icons/obj/machines/autodoc.dmi'
|
||||
icon_state = "autodoc_machine"
|
||||
verb_say = "states"
|
||||
idle_power_usage = 50
|
||||
circuit = /obj/item/circuitboard/machine/autodoc
|
||||
var/obj/item/organ/storedorgan
|
||||
var/organ_type = /obj/item/organ
|
||||
var/processing = FALSE
|
||||
var/surgerytime = 300
|
||||
|
||||
/obj/machinery/autodoc/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/autodoc/RefreshParts()
|
||||
var/max_time = 350
|
||||
for(var/obj/item/stock_parts/L in component_parts)
|
||||
max_time -= (L.rating*10)
|
||||
surgerytime = max(max_time,10)
|
||||
|
||||
/obj/machinery/autodoc/examine(mob/user)
|
||||
. = ..()
|
||||
if((obj_flags & EMAGGED) && panel_open)
|
||||
. += "<span class='warning'>[src]'s surgery protocols have been corrupted!</span>"
|
||||
if(processing)
|
||||
. += "<span class='notice'>[src] is currently inserting [storedorgan] into [occupant].</span>"
|
||||
else if(storedorgan)
|
||||
. += "<span class='notice'>[src] is prepared to insert [storedorgan].</span>"
|
||||
|
||||
/obj/machinery/autodoc/close_machine(mob/user)
|
||||
..()
|
||||
playsound(src, 'sound/machines/click.ogg', 50)
|
||||
if(occupant)
|
||||
if(!iscarbon(occupant))
|
||||
occupant.forceMove(drop_location())
|
||||
occupant = null
|
||||
return
|
||||
to_chat(occupant, "<span class='notice'>You enter [src]</span>")
|
||||
|
||||
dosurgery()
|
||||
|
||||
/obj/machinery/autodoc/proc/dosurgery()
|
||||
if(!storedorgan && !(obj_flags & EMAGGED))
|
||||
to_chat(occupant, "<span class='notice'>[src] currently has no implant stored.</span>")
|
||||
return
|
||||
|
||||
occupant.visible_message("<span class='notice'>[occupant] presses a button on [src], and you hear a mechanical noise.</span>", "<span class='notice'>You feel a sharp sting as [src] starts inserting the organ into your body.</span>")
|
||||
playsound(get_turf(occupant), 'sound/weapons/circsawhit.ogg', 50, 1)
|
||||
processing = TRUE
|
||||
update_icon()
|
||||
var/mob/living/carbon/C = occupant
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
for(var/obj/item/bodypart/BP in reverseList(C.bodyparts)) //Chest and head are first in bodyparts, so we invert it to make them suffer more
|
||||
C.emote("scream")
|
||||
if(!HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
BP.dismember()
|
||||
else
|
||||
C.apply_damage(40, BRUTE, BP)
|
||||
sleep(5) //2 seconds to get outta there before dying
|
||||
if(!processing)
|
||||
return
|
||||
|
||||
occupant.visible_message("<span class='warning'>[src] dismembers [occupant]!", "<span class='warning'>[src] saws up your body!</span>")
|
||||
|
||||
else
|
||||
sleep(surgerytime)
|
||||
if(!processing)
|
||||
return
|
||||
var/obj/item/organ/currentorgan = C.getorganslot(storedorgan.slot)
|
||||
if(currentorgan)
|
||||
currentorgan.Remove(C)
|
||||
currentorgan.forceMove(get_turf(src))
|
||||
storedorgan.Insert(occupant)//insert stored organ into the user
|
||||
storedorgan = null
|
||||
occupant.visible_message("<span class='notice'>[src] completes the surgery procedure", "<span class='notice'>[src] inserts the organ into your body.</span>")
|
||||
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, 0)
|
||||
processing = FALSE
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/autodoc/open_machine(mob/user)
|
||||
if(processing)
|
||||
occupant.visible_message("<span class='notice'>[user] cancels [src]'s procedure", "<span class='notice'>[src] stops inserting the organ into your body.</span>")
|
||||
processing = FALSE
|
||||
if(occupant)
|
||||
occupant.forceMove(drop_location())
|
||||
occupant = null
|
||||
..(FALSE)
|
||||
|
||||
/obj/machinery/autodoc/interact(mob/user)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
return
|
||||
|
||||
if(state_open)
|
||||
close_machine()
|
||||
return
|
||||
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/autodoc/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, organ_type))
|
||||
if(storedorgan)
|
||||
to_chat(user, "<span class='notice'>[src] already has an implant stored.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
storedorgan = I
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autodoc/screwdriver_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(..())
|
||||
return
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='warning'>[src] is currently occupied!</span>")
|
||||
return
|
||||
if(state_open)
|
||||
to_chat(user, "<span class='warning'>[src] must be closed to [panel_open ? "close" : "open"] its maintenance hatch!</span>")
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
if(storedorgan)
|
||||
storedorgan.forceMove(drop_location())
|
||||
storedorgan = null
|
||||
update_icon()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/autodoc/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/autodoc/update_icon()
|
||||
overlays.Cut()
|
||||
if(!state_open)
|
||||
if(processing)
|
||||
overlays += "[icon_state]_door_on"
|
||||
overlays += "[icon_state]_stack"
|
||||
overlays += "[icon_state]_smoke"
|
||||
overlays += "[icon_state]_green"
|
||||
else
|
||||
overlays += "[icon_state]_door_off"
|
||||
if(occupant)
|
||||
if(powered(EQUIP))
|
||||
overlays += "[icon_state]_stack"
|
||||
overlays += "[icon_state]_yellow"
|
||||
else
|
||||
overlays += "[icon_state]_red"
|
||||
else if(powered(EQUIP))
|
||||
overlays += "[icon_state]_red"
|
||||
if(panel_open)
|
||||
overlays += "[icon_state]_panel"
|
||||
|
||||
/obj/machinery/autodoc/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='warning'>You reprogram [src]'s surgery procedures.</span>")
|
||||
@@ -0,0 +1,98 @@
|
||||
#define REWARD_DIVISOR 1000
|
||||
// At the end of the game, the thing yields tetris_score/REWARD_DIVISOR prize tickets. Adjust accordingly.
|
||||
|
||||
/obj/machinery/computer/arcade/tetris
|
||||
name = "T.E.T.R.I.S."
|
||||
desc = "The pinnacle of human technology."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "arcade"
|
||||
circuit = /obj/item/circuitboard/computer/arcade/tetris
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/arcade/tetris/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
else
|
||||
usr.set_machine(src)
|
||||
if(href_list["tetrisScore"])
|
||||
var/temp_score = text2num(href_list["tetrisScore"])
|
||||
say("YOUR SCORE: [temp_score]!")
|
||||
var/reward = round(temp_score/REWARD_DIVISOR)
|
||||
prizevend(usr, reward)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/tetris/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/arcade/tetris/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(user.client)
|
||||
var/datum/asset/simple/C = new/datum/asset/simple/tetris()
|
||||
send_asset_list(user.client, C.assets)
|
||||
|
||||
var/dat = {"
|
||||
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
|
||||
<html><head>
|
||||
<META NAME='description' content='Tetris is a PC-Game, which is a part of the '7 by one stroke' package, written in HTML and JavaScript'>
|
||||
<META NAME='author' content='Lutz Tautenhahn'>
|
||||
<META NAME='keywords' content='Game, Tetris, Streich, Stroke, JavaScript'>
|
||||
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=iso-8859-1'>
|
||||
<title>Telemetry Enhanced Testing and Research Informatic Simulator</title>
|
||||
<script language='JavaScript'>
|
||||
function submitScore(s){
|
||||
window.location.href = 'byond://?src=\ref[src];tetrisScore=' + s;
|
||||
}
|
||||
</script>
|
||||
<script language='JavaScript1.2'>
|
||||
if (navigator.appName != 'Microsoft Internet Explorer')
|
||||
document.captureEvents(Event.KEYDOWN)
|
||||
document.onkeydown = NetscapeKeyDown;
|
||||
function NetscapeKeyDown(key)
|
||||
{ KeyDown(key.which);
|
||||
}
|
||||
</script>
|
||||
<script for=document event='onkeydown()' language='JScript'>
|
||||
if (window.event) KeyDown(window.event.keyCode);
|
||||
</script>
|
||||
<script language='JavaScript' src='tetris.js'></script>
|
||||
</head>
|
||||
<BODY bgcolor=#E0A060>
|
||||
<form name='ScoreForm'>
|
||||
<DIV ALIGN=center>
|
||||
<table noborder><tr><td>
|
||||
<script language='JavaScript' src='tetris2.js'></script>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td valign=top>
|
||||
<table border=4 cellpadding=4 cellspacing=6 bgcolor=#C0B0A0><tr><td>
|
||||
<table noborder cellpadding=2 cellspacing=2>
|
||||
<tr><td align=center><input type=button width='70' style='width:70;' value='Pause' onClick='Pause()'></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td align=center><input type=button width='70' style='width:70;' value='New' onClick='New()'></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td align=center>Score:</td></tr>
|
||||
<tr><td align=center><input type=button width='70' style='width:70; background-color:#ffffff' name='Score'></td></tr>
|
||||
<tr><td align=center>Level:</td></tr>
|
||||
<tr><td align=center><input type=button width='70' style='width:70; background-color:#ffffff' name='Level' onClick='IncreaseDifficulty()'></td></tr>
|
||||
<tr><td align=center>Lines:</td></tr>
|
||||
<tr><td align=center><input type=button width='70' style='width:70; background-color:#ffffff' name='Lines''></td></tr>
|
||||
<tr><td align=center><table border=2 cellpadding=0 cellspacing=3><tr><td><img src='tetrisp0.gif' border=0></td></tr></table></td></tr>
|
||||
</table></td></tr></table>
|
||||
</td></tr></table>
|
||||
<script language='JavaScript'>
|
||||
Init(true);
|
||||
</script>
|
||||
</DIV>
|
||||
</form>
|
||||
</BODY>
|
||||
</HTML>
|
||||
"}
|
||||
user << browse(dat, "window=tetris;size=435x550")
|
||||
user.set_machine(src)
|
||||
onclose(user, "tetris")
|
||||
@@ -0,0 +1,146 @@
|
||||
/obj/machinery/cryptominer
|
||||
name = "cryptocurrency miner"
|
||||
desc = "This handy-dandy machine will produce credits for your enjoyment."
|
||||
icon = 'sandcode/icons/obj/machines/cryptominer.dmi'
|
||||
icon_state = "off"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 200
|
||||
circuit = /obj/item/circuitboard/machine/cryptominer
|
||||
var/mining = FALSE
|
||||
var/miningtime = 3000
|
||||
var/miningpoints = 50
|
||||
var/mintemp = TCRYO // 225K equals approximately -55F or -48C
|
||||
var/midtemp = T0C // 273K equals 32F or 0C
|
||||
var/maxtemp = 500 // 500K equals approximately 440F or 226C
|
||||
var/heatingPower = 40000
|
||||
|
||||
/obj/machinery/cryptominer/update_icon()
|
||||
. = ..()
|
||||
if(!is_operational())
|
||||
icon_state = "off"
|
||||
else if(mining)
|
||||
icon_state = "loop"
|
||||
else
|
||||
icon_state = "on"
|
||||
|
||||
/obj/machinery/cryptominer/Destroy()
|
||||
STOP_PROCESSING(SSmachines,src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cryptominer/deconstruct()
|
||||
STOP_PROCESSING(SSmachines,src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cryptominer/attackby(obj/item/W, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
/obj/machinery/cryptominer/process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
if(!env)
|
||||
return
|
||||
if(!mining)
|
||||
return
|
||||
if(env.return_temperature() >= maxtemp)
|
||||
if(mining)
|
||||
playsound(loc, 'sound/machines/beep.ogg', 50, TRUE, -1)
|
||||
set_mining(FALSE)
|
||||
return
|
||||
if(env.return_temperature() <= maxtemp && env.return_temperature() >= midtemp)
|
||||
if(mining)
|
||||
produce_points(0.20)
|
||||
produce_heat()
|
||||
return
|
||||
if(env.return_temperature() <= midtemp && env.return_temperature() >= mintemp)
|
||||
if(mining)
|
||||
produce_points(1)
|
||||
produce_heat()
|
||||
return
|
||||
if(env.return_temperature() <= mintemp)
|
||||
if(mining)
|
||||
produce_points(3)
|
||||
produce_heat()
|
||||
return
|
||||
|
||||
/obj/machinery/cryptominer/proc/produce_points(number)
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, TRUE, -1)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
D.adjust_money(FLOOR(miningpoints * number,1))
|
||||
|
||||
/obj/machinery/cryptominer/proc/produce_heat()
|
||||
atmos_spawn_air("co2=10;TEMP=2000")
|
||||
|
||||
/obj/machinery/cryptominer/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(!is_operational())
|
||||
to_chat(user, "<span class='warning'>[src] has to be on to do this!</span>")
|
||||
return FALSE
|
||||
if(mining)
|
||||
set_mining(FALSE)
|
||||
visible_message("<span class='warning'>[src] slowly comes to a halt.</span>",
|
||||
"<span class='warning'>You turn off [src].</span>",
|
||||
runechat_popup = TRUE)
|
||||
return
|
||||
set_mining(TRUE)
|
||||
|
||||
/obj/machinery/cryptominer/proc/set_mining(new_value)
|
||||
if(new_value == mining)
|
||||
return //No changes
|
||||
mining = new_value
|
||||
if(mining)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
else
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/cryptominer/syndie
|
||||
name = "syndicate cryptocurrency miner"
|
||||
desc = "This handy-dandy machine will produce credits for your enjoyment. It lasts a little longer."
|
||||
icon_state = "off_syndie"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
circuit = /obj/item/circuitboard/machine/cryptominer/syndie
|
||||
miningtime = 6000
|
||||
miningpoints = 100
|
||||
|
||||
/obj/machinery/cryptominer/syndie/update_icon()
|
||||
. = ..()
|
||||
if(!is_operational())
|
||||
icon_state = "off_syndie"
|
||||
else if(mining)
|
||||
icon_state = "loop_syndie"
|
||||
else
|
||||
icon_state = "on_syndie"
|
||||
|
||||
/obj/machinery/cryptominer/nanotrasen
|
||||
name = "nanotrasen cryptocurrency miner"
|
||||
desc = "This handy-dandy machine will produce credits for your enjoyment. This doesn't turn off easily."
|
||||
icon_state = "off_nano"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 1
|
||||
active_power_usage = 1
|
||||
miningtime = 600000
|
||||
miningpoints = 1000
|
||||
|
||||
/obj/machinery/cryptominer/nanotrasen/update_icon()
|
||||
. = ..()
|
||||
if(!is_operational())
|
||||
icon_state = "off_nano"
|
||||
else if(mining)
|
||||
icon_state = "loop_nano"
|
||||
else
|
||||
icon_state = "on_nano"
|
||||
@@ -0,0 +1,142 @@
|
||||
//Power armor: now actually built!
|
||||
/datum/component/construction/unordered/mecha_chassis/powerarmor
|
||||
result = /datum/component/construction/mecha/powerarmor
|
||||
steps = list(
|
||||
/obj/item/mecha_parts/part/powerarmor_torso,
|
||||
/obj/item/mecha_parts/part/powerarmor_helmet,
|
||||
/obj/item/mecha_parts/part/powerarmor_left_arm,
|
||||
/obj/item/mecha_parts/part/powerarmor_right_arm,
|
||||
/obj/item/mecha_parts/part/powerarmor_left_leg,
|
||||
/obj/item/mecha_parts/part/powerarmor_right_leg
|
||||
)
|
||||
|
||||
/datum/component/construction/mecha/powerarmor/update_parent(step_index)
|
||||
..()
|
||||
var/atom/parent_atom = parent
|
||||
parent_atom.icon = 'sandcode/icons/mecha/mech_construction.dmi'
|
||||
|
||||
/datum/component/construction/mecha/powerarmor/spawn_result()
|
||||
if(!result)
|
||||
return
|
||||
new result(drop_location())
|
||||
SSblackbox.record_feedback("tally", "mechas_created", 1, "Power Armor")
|
||||
QDEL_NULL(parent)
|
||||
|
||||
/datum/component/construction/mecha/powerarmor
|
||||
result = /obj/item/clothing/suit/space/hardsuit/powerarmor
|
||||
base_icon = "powerarmor"
|
||||
steps = list(
|
||||
//1
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"desc" = "The parts are disconnected."
|
||||
),
|
||||
|
||||
//2
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "The parts are wrenched."
|
||||
),
|
||||
|
||||
//3
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/bluespace_crystal,
|
||||
"amount" = 5,
|
||||
"back_key" = TOOL_WELDER,
|
||||
"desc" = "The parts are welded onto the chassis."
|
||||
),
|
||||
|
||||
//4
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The bluespace crystals are slotted."
|
||||
),
|
||||
|
||||
//5
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor/quadratic,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "The bluespace crystals are secured."
|
||||
),
|
||||
|
||||
//6
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The capacitor is slotted."
|
||||
),
|
||||
|
||||
//7
|
||||
list(
|
||||
"key" = /obj/item/stack/cable_coil,
|
||||
"amount" = 10,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The capacitor is secured."
|
||||
),
|
||||
|
||||
//8
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_WIRECUTTER,
|
||||
"desc" = "The chassis is wired."
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The wiring is linked to the limbs."
|
||||
),
|
||||
)
|
||||
|
||||
/datum/component/construction/mecha/powerarmor/custom_action(obj/item/I, mob/living/user, diff)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
switch(index)
|
||||
if(1)
|
||||
user.visible_message("[user] wrenches [parent]'s parts.", "<span class='notice'>You wrench [parent]'s parts.</span>")
|
||||
if(2)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds [parent]'s parts.", "<span class='notice'>You weld [parent]'s parts</span>")
|
||||
else
|
||||
user.visible_message("[user] unwrenches [parent]'s parts.", "<span class='notice'>You unwrench [parent]'s parts.</span>")
|
||||
if(3)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] slots bluespace crystals onto [parent].", "<span class='notice'>You slot the bluespace crystals onto [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unwelds [parent]'s parts.", "<span class='notice'>You unweld [parent]'s parts.</span>")
|
||||
if(4)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the [parent]'s bluespace crystal slots.", "<span class='notice'>You secure the [parent]'s bluespace crystal slots</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the bluespace crystals from [parent].", "<span class='notice'>You remove [parent]'s bluespace crystals.</span>")
|
||||
if(5)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] slots the capacitor onto [parent].", "<span class='notice'>You slot the capacitor onto [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unsecures the bluespace crystal slots from [parent].", "<span class='notice'>You unsecure [parent]'s bluespace crystal slots.</span>")
|
||||
if(6)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures [parent]'s capacitor.", "<span class='notice'>You secure [parent]'s capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the [parent]'s capacitor.", "<span class='notice'>You remove the [parent]'s capacitor.</span>")
|
||||
if(7)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] wires the [parent].", "<span class='notice'>You wire the [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unsecures [parent]'s capacitor.", "<span class='notice'>You unsecure [parent]'s capacitor.</span>")
|
||||
if(8)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] links [parent]'s wires to the limbs.", "<span class='notice'>You link [parent]'s wires to the limbs.</span>")
|
||||
else
|
||||
user.visible_message("[user] snips off [parent]'s wires.", "<span class='notice'>You snip off [parent]'s wires.</span>")
|
||||
if(9)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds [parent]'s external armor layer.", "<span class='notice'>You weld [parent]'s external armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] unlinks [parent]'s wires from the limbs.", "<span class='notice'>You unlink [parent]'s wires from the limbs.</span>")
|
||||
return TRUE
|
||||
@@ -0,0 +1,55 @@
|
||||
//////////////////////////////
|
||||
//////Custom Mech Parts //////
|
||||
//////////////////////////////
|
||||
|
||||
///////// Power Armor (Not actually a mech but meh)
|
||||
|
||||
/obj/item/mecha_parts/chassis/powerarmor
|
||||
name = "\improper Power Armor Chassis"
|
||||
desc = "A heavy steel frame, utilized in the construction of a suit of powered armor."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_skeleton"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/powerarmor
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_torso
|
||||
name = "\improper Power Armor Torso"
|
||||
desc = "A torso comprised of advanced components, armored with flexible plasteel sheets."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_chest"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_left_arm
|
||||
name = "\improper Power Armor Left Arm"
|
||||
desc = "A powered arm component, armored with plasteel and strengthened with integrated pseudometallic bio-enhancing servos."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_arm_L"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_right_arm
|
||||
name = "\improper Power Armor Right Arm"
|
||||
desc = "A powered arm component, armored with plasteel and strengthened with integrated pseudometallic bio-enhancing servos."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_arm_R"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_left_leg
|
||||
name = "\improper Power Armor Left Leg"
|
||||
desc = "A powered leg component, armored with plasteel and enhanced with integrated kinetic-absorbing materials to give a minor spring in the user's step."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_leg_L"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_right_leg
|
||||
name = "\improper Power Armor Right Leg"
|
||||
desc = "A powered leg component, armored with plasteel and enhanced with integrated kinetic-absorbing materials to give a minor spring in the user's step."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_leg_R"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/mecha_parts/part/powerarmor_helmet
|
||||
name = "\improper Power Armor Helmet"
|
||||
desc = "An advanced, head-covering helmet desinged to offer maximum comfort and protection. Must be installed into a proper suit of Power Armor in order to be used, as it is quite heavy."
|
||||
icon = 'sandcode/icons/mecha/mech_construct.dmi'
|
||||
icon_state = "pwrarmor_helmet"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
@@ -1,3 +1,7 @@
|
||||
/obj/item/circuitboard/computer/telesci_console
|
||||
name = "Telescience Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/telescience
|
||||
build_path = /obj/machinery/computer/telescience
|
||||
|
||||
/obj/item/circuitboard/computer/arcade/tetris
|
||||
name = "Tetris (Computer Board)"
|
||||
build_path = /obj/machinery/computer/arcade/tetris
|
||||
|
||||
@@ -10,3 +10,52 @@
|
||||
/obj/item/circuitboard/machine/pacman/mclunky
|
||||
name = "McLunky-type Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/port_gen/pacman/mclunky
|
||||
|
||||
/obj/item/circuitboard/machine/autodoc
|
||||
name = "Autodoc (Machine Board)"
|
||||
build_path = /obj/machinery/autodoc
|
||||
req_components = list(/obj/item/scalpel/advanced = 1,
|
||||
/obj/item/retractor/advanced = 1,
|
||||
/obj/item/surgicaldrill/advanced = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 3,
|
||||
/obj/item/stock_parts/matter_bin = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cryptominer
|
||||
name = "Cryptocurrency Miner (Machine Board)"
|
||||
build_path = /obj/machinery/cryptominer
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stack/ore/bluespace_crystal = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/cryptominer/syndie
|
||||
name = "Syndicate Cryptocurrency Miner (Machine Board)"
|
||||
build_path = /obj/machinery/cryptominer/syndie
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stack/ore/bluespace_crystal = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/bluespace_miner
|
||||
name = "Bluespace Miner (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/bluespace_miner
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 5,
|
||||
/obj/item/stock_parts/micro_laser = 5,
|
||||
/obj/item/stock_parts/manipulator = 5,
|
||||
/obj/item/stock_parts/scanning_module = 5,
|
||||
/obj/item/stack/ore/bluespace_crystal = 5)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/message_server
|
||||
name = "Message Server (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/message_server
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1)
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
#define MATH_REWARD_EASY 1
|
||||
#define MATH_REWARD_MEDIUM 2.5
|
||||
#define MATH_REWARD_HARD 5
|
||||
|
||||
#define MATH_MULTIPLIER_SCIENCE 750 // If science points and cargo points need to be balanced seperately
|
||||
#define MATH_MULTIPLIER_CARGO 500 // Difficulty reward gets multiplied by these
|
||||
|
||||
/obj/item/computermath
|
||||
icon = 'sandcode/icons/obj/computermath.dmi'
|
||||
verb_say = "beeps"
|
||||
var/charge_count
|
||||
|
||||
/obj/item/computermath/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/computermath/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/computermath/proc/check_charges()
|
||||
return FALSE
|
||||
|
||||
/obj/item/computermath/proc/consume_charges()
|
||||
return FALSE
|
||||
|
||||
/obj/item/computermath/proc/give_question(mob/user, var/reward_type)
|
||||
if(!reward_type)
|
||||
say("Critical error. Program terminating.")
|
||||
return
|
||||
|
||||
if(!check_charges()) // Out of charges!
|
||||
say("No current problems available. Try again later.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
return
|
||||
|
||||
var/operator
|
||||
var/difficulties = list("Easy", "Medium", "Hard")
|
||||
var/query = "Please select the difficulty level. Reward scales with difficulty."
|
||||
var/difficulty = input(user, query, "Select Difficulty") as null|anything in difficulties
|
||||
if(!difficulty)
|
||||
return
|
||||
switch(difficulty)
|
||||
if("Easy")
|
||||
operator = pick("add","subtract","multiply")
|
||||
if("Medium")
|
||||
operator = pick("division", "exponent", "easy algebra")
|
||||
if("Hard")
|
||||
operator = pick("2nd polynomial", "algebra", "line intersection")
|
||||
|
||||
var/correct = FALSE
|
||||
switch(operator)
|
||||
// Easy problems. The numbers need to be so it's doable without a calculator, yet not easy.
|
||||
if("add")
|
||||
var/addnum_1 = rand(1, 500)
|
||||
var/addnum_2 = rand(1, 500)
|
||||
var/question = "What is [addnum_1] + [addnum_2]?"
|
||||
var/solution = addnum_1 + addnum_2
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
if("subtract")
|
||||
var/subnum_1 = rand(-100, 100)
|
||||
var/subnum_2 = rand(-100, 200)
|
||||
var/question = "What is [subnum_1] - [subnum_2]?"
|
||||
var/solution = subnum_1 - subnum_2
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
if("multiply")
|
||||
var/multnum_1 = rand(-50, 50)
|
||||
var/multnum_2 = rand(-250, 500)
|
||||
var/question = "What is [multnum_1] * [multnum_2]?"
|
||||
var/solution = multnum_1 * multnum_2
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
|
||||
// Medium problems
|
||||
if("division")
|
||||
var/divnum_2 = rand(3, 12)
|
||||
var/divnum_1 = rand(-50, 50) * divnum_2 // Nice numbers only.
|
||||
var/question = "What is [divnum_1] / [divnum_2]? Rounded the answer down if applicable."
|
||||
var/solution = round(divnum_1 / divnum_2)
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
|
||||
if("exponent")
|
||||
var/expnum_1 = rand(-50, 50)
|
||||
var/expnum_2 = pick(list(2, 3, 1/2)) // Also square root!
|
||||
var/question = "What is ([expnum_1]) ^ [expnum_2]? Answer is rounded down if applicable."
|
||||
var/solution
|
||||
if(expnum_2 == 1/2) // For some reason, a ** 1/2 throws a runtime error, so just use sqrt()
|
||||
solution = round(sqrt(abs(expnum_1)))
|
||||
else
|
||||
solution = round(expnum_1 ** expnum_2)
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
|
||||
if("easy algebra")
|
||||
// ax + b = c ----> x = (c-b)/a
|
||||
var/num_a = rand(1,5)
|
||||
var/num_b = rand(-5,10)
|
||||
var/num_c = rand(-10, 10)
|
||||
var/question = "[num_a]x + [num_b] = [num_c]. Solve for x."
|
||||
var/solution = (num_c - num_b)/num_a
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
|
||||
// Hard problems, where 'hard' is high school maths
|
||||
if("algebra") // everyone's favorite :)
|
||||
var/answer
|
||||
var/solution
|
||||
if(prob(50)) // 2 variants of the question
|
||||
// a/bx = c ---> x = a/bc. b and c may not be 0.
|
||||
var/num_a = rand(-100, 100)
|
||||
var/num_b = rand(-5, 5)
|
||||
if(num_b == 0)
|
||||
num_b = 12
|
||||
var/num_c = rand(1, 10)
|
||||
var/question = "[num_a]/([num_b]x) = [num_c]. Solve for x. Round down if applicable."
|
||||
solution = round(num_a / (num_b * num_c))
|
||||
answer = input(user, question, "Math Problem") as null|num
|
||||
else
|
||||
// (a-x)/b = x/c ----> x=ac/(b+c), b+c and b*c may not be 0
|
||||
var/num_a = rand(-50, 50)
|
||||
var/num_b = rand(1, 5)
|
||||
var/num_c = rand(1, 10)
|
||||
var/question = "([num_a]-x)/[num_b] = x/[num_c]. Solve for x. Round down if applicable."
|
||||
solution = round((num_a * num_c)/(num_b + num_c))
|
||||
answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution)
|
||||
correct = TRUE
|
||||
|
||||
|
||||
if("2nd polynomial")
|
||||
// Math part
|
||||
var/num_a = rand(1, 2)
|
||||
var/num_b = rand(-5, 5)
|
||||
var/num_c = rand(-25, 25)
|
||||
var/discriminant = num_b**2 - 4 * num_a * num_c
|
||||
var/solution1
|
||||
var/solution2
|
||||
if(discriminant >= 0) // positive gives 2 solutions, if D=0 then sol1=sol2 anyway
|
||||
// Quadratic formula
|
||||
solution1 = round((-num_b+sqrt(discriminant))/(2*num_a))
|
||||
solution2 = round((-num_b-sqrt(discriminant))/(2*num_a))
|
||||
else
|
||||
solution1 = 0
|
||||
solution2 = 0
|
||||
|
||||
// Answering part
|
||||
var/question = "[num_a]x^2 + [num_b]x + [num_c] = 0. Solve for x, give any real solution. Fill in 0 for no real solutions. Answers are rounded down. (-0.25 becomes -1)"
|
||||
var/answer = input(user, question, "Math Problem") as null|num
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
if(answer == solution1 || answer == solution2)
|
||||
correct = TRUE
|
||||
|
||||
if("line intersection")
|
||||
// y1=ax+b
|
||||
// y2=cx+d
|
||||
// intersect: x=(d-c)/(a-b), y=a(d-c)/(a-b)+c. So a-b or c-d may never be 0.
|
||||
var/num_a = rand(1,5)
|
||||
var/num_b = rand(-10,-1)
|
||||
var/num_c = rand(1, 10)
|
||||
var/num_d = rand(-10, -1)
|
||||
var/x_intersect = round((num_d-num_c)/(num_a-num_b))
|
||||
var/y_intersect = round(num_a * (num_d - num_c)/(num_a - num_b) + num_c)
|
||||
var/question
|
||||
var/answer
|
||||
if(prob(50)) // 50% chance to ask for x, or y
|
||||
question = "Given the lines y=[num_a]x+[num_b] and y=[num_c]x+[num_d], what is the x-value of their intersection point? Rounded down if applicable."
|
||||
answer = input(user, question, "Math Problem") as null|num
|
||||
if(answer == x_intersect)
|
||||
correct = TRUE
|
||||
else
|
||||
question = "Given the lines y=[num_a]x+[num_b] and y=[num_c]x+[num_d], what is the y-value of their intersection point? Rounded down if applicable."
|
||||
answer = input(user, question, "Math Problem") as null|num
|
||||
if(answer == y_intersect)
|
||||
correct = TRUE
|
||||
if(isnull(answer)) // User hit the cancel button
|
||||
return
|
||||
|
||||
// An answer has been submitted, remove a charge and check if it's correct!
|
||||
if(consume_charges())
|
||||
handle_reward(user, reward_type, correct, difficulty)
|
||||
else // Ran out of charges while answering due to multiple characters using the computers
|
||||
say("Error. All available problems have been resolved in the time it took to answer. Please wait for more to become available.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
return
|
||||
|
||||
/obj/item/computermath/proc/handle_reward(mob/user, var/reward_type, var/correct, var/difficulty)
|
||||
var/mob/living/LM = user
|
||||
// Calculate points
|
||||
var/points_awarded
|
||||
switch(difficulty)
|
||||
if("Easy")
|
||||
points_awarded = MATH_REWARD_EASY
|
||||
if("Medium")
|
||||
points_awarded = MATH_REWARD_MEDIUM
|
||||
if("Hard")
|
||||
points_awarded = MATH_REWARD_HARD
|
||||
switch(reward_type)
|
||||
if("Cargo")
|
||||
points_awarded *= MATH_MULTIPLIER_CARGO
|
||||
if("Science")
|
||||
points_awarded *= MATH_MULTIPLIER_SCIENCE
|
||||
|
||||
// Incorrect answer is a point penalty.
|
||||
if(!correct)
|
||||
var/points_lost = points_awarded / 4 // Penalty for failure is 1/4th success points
|
||||
say("Warning! Incorrect answer.")
|
||||
switch(reward_type)
|
||||
if("Science")
|
||||
say("Research data has been corrupted. [points_lost] science points have been lost.")
|
||||
SSresearch.science_tech.remove_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points_lost))
|
||||
if("Cargo")
|
||||
say("To solve the resulting bureaucratic error, [points_lost] cargo points have been deducted from the balance.")
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
D.adjust_money(-points_lost)
|
||||
// me fail arithmetic, me brian hurt
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
if(difficulty == "Easy") // me fail arithmetic, me brian hurt
|
||||
to_chat(user,"<span class='warning'>You feel lightheaded after failing such an easy question...</span>")
|
||||
LM.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10)
|
||||
return
|
||||
|
||||
// Award points for a correct answer.
|
||||
switch(reward_type)
|
||||
if("Science")
|
||||
say("Correct data received. Applying to research algorithms...")
|
||||
say("Completed. [points_awarded] science points added.")
|
||||
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points_awarded))
|
||||
if("Cargo")
|
||||
say("Correct data received. Updating cargo manifests...")
|
||||
say("Completed. [points_awarded] cargo points have been added to station balance.")
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
D.adjust_money(points_awarded)
|
||||
playsound(src, 'sound/machines/chime.ogg', 30, 1)
|
||||
|
||||
/obj/item/computermath/default
|
||||
name = "Unassigned Problem Computer"
|
||||
desc = "This Problem Computer has not been assigned yet. Earn points by solving math problems."
|
||||
icon_state = "defaulttab"
|
||||
|
||||
var/static/radial_cargo = image(icon = 'sandcode/icons/obj/computermath.dmi', icon_state = "cargotab")
|
||||
var/static/radial_science = image(icon = 'sandcode/icons/obj/computermath.dmi', icon_state = "sciencetab")
|
||||
|
||||
var/static/list/radial_options = list("cargo" = radial_cargo, "science" = radial_science)
|
||||
|
||||
/obj/item/computermath/default/attack_self(mob/user)
|
||||
var/choice = show_radial_menu(user, src, radial_options)
|
||||
switch(choice)
|
||||
if("cargo")
|
||||
var/obj/item/computermath/cargo/CT = new /obj/item/computermath/cargo(drop_location())
|
||||
qdel(src)
|
||||
user.put_in_active_hand(CT)
|
||||
if("science")
|
||||
var/obj/item/computermath/science/ST = new /obj/item/computermath/science(drop_location())
|
||||
qdel(src)
|
||||
user.put_in_active_hand(ST)
|
||||
|
||||
/obj/item/computermath/cargo
|
||||
name = "Cargo Problem Computer"
|
||||
desc = "Earn points by solving math problems."
|
||||
icon_state = "cargotab"
|
||||
|
||||
/obj/item/computermath/cargo/attack_self(mob/user)
|
||||
give_question(user, "Cargo")
|
||||
|
||||
/obj/item/computermath/cargo/process()
|
||||
var/old_charge_count = charge_count
|
||||
charge_count = SSshuttle.problem_computer_charges
|
||||
if(charge_count > old_charge_count)
|
||||
say("A new problem solving opportunity has become available! There are now [charge_count] problems to be solved.")
|
||||
|
||||
/obj/item/computermath/cargo/check_charges()
|
||||
if(SSshuttle.problem_computer_charges > 0)
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/obj/item/computermath/cargo/consume_charges()
|
||||
if(SSresearch.problem_computer_charges > 0)
|
||||
SSshuttle.problem_computer_charges -= 1
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/obj/item/computermath/science
|
||||
name = "Science Problem Computer"
|
||||
desc = "Earn points by solving math problems."
|
||||
icon_state = "sciencetab"
|
||||
|
||||
/obj/item/computermath/science/process()
|
||||
var/old_charge_count = charge_count
|
||||
charge_count = SSresearch.problem_computer_charges
|
||||
if(charge_count > old_charge_count)
|
||||
say("A new problem solving opportunity has become available! There are now [charge_count] problems to be solved.")
|
||||
|
||||
/obj/item/computermath/science/check_charges()
|
||||
if(SSresearch.problem_computer_charges > 0)
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/obj/item/computermath/science/consume_charges()
|
||||
if(SSresearch.problem_computer_charges > 0)
|
||||
SSresearch.problem_computer_charges -= 1
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/obj/item/computermath/science/attack_self(mob/user)
|
||||
give_question(user, "Science")
|
||||
Reference in New Issue
Block a user