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

This commit is contained in:
ZomgPonies
2015-12-20 06:29:28 -05:00
460 changed files with 19824 additions and 18913 deletions
+5 -1
View File
@@ -3,6 +3,10 @@ world/IsBanned(key,address,computer_id)
if (!key || !address || !computer_id)
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, please try again. Error message: Your computer provided invalid or blank information to the server on connection (BYOND Username, IP, and Computer ID). Provided information for reference: Username: '[key]' IP: '[address]' Computer ID: '[computer_id]'. If you continue to get this error, please restart byond or contact byond support.")
if (computer_id == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.")
var/admin = 0
var/ckey = ckey(key)
if((ckey in admin_datums) || (ckey in deadmins))
@@ -20,7 +24,7 @@ world/IsBanned(key,address,computer_id)
message_admins("<span class='adminnotice'>Failed Login: [key] - Banned: Tor</span>")
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of Tor", "Automated Ban", 0, 0)
var/mistakemessage = ""
var/mistakemessage = ""
if(config.banappeals)
mistakemessage = "\nIf you believe this is a mistake, please request help at [config.banappeals]."
return list("reason"="using Tor", "desc"="\nReason: The network you are using to connect has been banned.[mistakemessage]")
+7 -12
View File
@@ -401,20 +401,15 @@
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero(num2text(world.time / 600 % 60), 2)]:[add_zero(num2text(world.time / 10 % 60), 2)]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online())
if(shuttle_master.emergency.mode < SHUTTLE_CALL)
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
else
if (emergency_shuttle.wait_for_launch)
var/timeleft = emergency_shuttle.estimate_launch_time()
dat += "ETL: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
else if (emergency_shuttle.shuttle.has_arrive_time())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
dat += "Launching now..."
var/timeleft = shuttle_master.emergency.timeLeft()
if(shuttle_master.emergency.mode < SHUTTLE_DOCKED)
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
else
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
if(ticker.mode.syndicates.len)
+5
View File
@@ -119,6 +119,11 @@
<BR>
<A href='?src=\ref[src];secretsfun=rolldice'>Roll the Dice</A><BR>
<BR>
<BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=movelaborshuttle'>Move Labor Shuttle</A><BR>
<BR>
</center>"}
dat += "</center></body></html>"
var/datum/browser/popup = new(usr, "secrets", "<div align='center'>Admin Secrets</div>", 630, 670)
+42 -139
View File
@@ -261,49 +261,37 @@
switch(href_list["call_shuttle"])
if("1")
if ((!( ticker ) || !emergency_shuttle.location()))
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
shuttle_master.emergency.request()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
if("2")
if (!( ticker ) || !emergency_shuttle.location())
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
switch(shuttle_master.emergency.mode)
if(SHUTTLE_CALL)
shuttle_master.emergency.cancel()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>")
else
shuttle_master.emergency.cancel()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
else if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
href_list["secretsadmin"] = "check_antagonist"
href_list["secrets"] = "check_antagonist"
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
emergency_shuttle.launch_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1)
else
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
href_list["secretsadmin"] = "check_antagonist"
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", shuttle_master.emergency.timeLeft() ) as num
shuttle_master.emergency.setTimer(timer*10)
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds")
minor_announcement.Announce("The emergency shuttle will reach its destination in [round(shuttle_master.emergency.timeLeft(600))] minutes.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds</span>")
href_list["secrets"] = "check_antagonist"
else if(href_list["delay_round_end"])
if(!check_rights(R_SERVER)) return
@@ -2359,112 +2347,6 @@
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
if("launchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(usr)
message_admins("\blue [key_name_admin(usr)] launched the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
if("forcelaunchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShFL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force())
S.force_launch(usr)
message_admins("\blue [key_name_admin(usr)] has forced the [shuttle_tag] shuttle launch", 1)
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
if("jumpshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShJ")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes")
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return
var/move_duration = input("How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
if (confirm == "Cancel")
return
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
S.move(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
@@ -2736,6 +2618,27 @@
if("securitylevel5")
set_security_level(5)
message_admins("\blue [key_name_admin(usr)] change security level to Delta.", 1)
if("moveminingshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
if(!shuttle_master.toggleShuttle("mining","mining_home","mining_away"))
message_admins("[key_name_admin(usr)] moved mining shuttle")
log_admin("[key_name(usr)] moved the mining shuttle")
if("movelaborshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
if(!shuttle_master.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
message_admins("[key_name_admin(usr)] moved labor shuttle")
log_admin("[key_name(usr)] moved the labor shuttle")
if("moveferry")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShF")
if(!shuttle_master.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
+15
View File
@@ -1177,3 +1177,18 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
else
alert("Invalid mob")
/client/proc/reload_nanoui_resources()
set category = "Debug"
set name = "Reload NanoUI Resources"
set desc = "Force the client to redownload NanoUI Resources"
// Close open NanoUIs.
nanomanager.close_user_uis(usr)
// Re-load the assets.
var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui)
assets.register()
// Clear the user's cache so they get resent.
usr.client.cache = list()
+2 -1
View File
@@ -138,7 +138,8 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/print_jobban_old,
/client/proc/print_jobban_old_filter,
/client/proc/forceEvent,
/client/proc/nanomapgen_DumpImage
/client/proc/nanomapgen_DumpImage,
/client/proc/reload_nanoui_resources
)
/client/proc/enable_debug_verbs()
+11 -30
View File
@@ -749,10 +749,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
set category = "Admin"
set name = "Call Shuttle"
if ((!( ticker ) || !emergency_shuttle.location()))
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if(!check_rights(R_ADMIN))
@@ -761,30 +762,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
var/choice
if(emergency_shuttle.auto_recall)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
if(emergency_shuttle.no_escape)
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
var/reason = input(usr, "Optional: Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
emergency_shuttle.call_evac(reason)
else
emergency_shuttle.call_transfer()
shuttle_master.emergency.request()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
return
/client/proc/admin_cancel_shuttle()
@@ -793,17 +775,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ticker || !emergency_shuttle.can_recall())
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
emergency_shuttle.recall()
shuttle_master.emergency.cancel()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-recalled the emergency shuttle.", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
return
/client/proc/admin_deny_shuttle()
@@ -816,10 +796,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
if(shuttle_master)
shuttle_master.emergencyNoEscape = !shuttle_master.emergencyNoEscape
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
log_admin("[key_name(src)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs"
+1 -3
View File
@@ -27,9 +27,7 @@ var/global/sent_strike_team = 0
sent_strike_team = 1
if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
shuttle_master.cancelEvac()
var/commando_number = commandos_possible //for selecting a leader
var/leader_selected = 0 //when the leader is chosen. The last person spawned.
+165
View File
@@ -0,0 +1,165 @@
/obj/machinery/arcade
name = "Arcade Game"
desc = "One of the most generic arcade games ever."
icon = 'icons/obj/arcade.dmi'
icon_state = "clawmachine_on"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/tokens = 0
var/freeplay = 0 //for debugging and admin kindness
var/token_price = 0
var/last_winner = null //for letting people who to hunt down and steal prizes from
var/window_name = "arcade" //in case you want to change the window name for certain machines
/obj/machinery/arcade/New()
..()
var/choice = pick(subtypesof(/obj/machinery/arcade))
new choice(loc)
qdel(src)
/obj/machinery/arcade/examine(mob/user)
..(user)
if(freeplay)
user << "Someone enabled freeplay on this machine!"
else
if(token_price)
user << "\The [src.name] costs [token_price] credits per play."
if(!tokens)
user << "\The [src.name] has no available play credits. Better feed the machine!"
else if(tokens == 1)
user << "\The [src.name] has only 1 play credit left!"
else
user << "\The [src.name] has [tokens] play credits!"
/obj/machinery/arcade/attack_hand(mob/user as mob)
if(..())
if(in_use && src == user.machine) //this one checks if they fell down/died and closes the game
src.close_game()
return
if(in_use && src == user.machine) //this one just checks if they are playing so it doesn't eat tokens
return
interact(user)
/obj/machinery/arcade/interact(mob/user as mob)
if(stat & BROKEN || panel_open)
return
if(!tokens && !freeplay)
user << "\The [src.name] doesn't have enough credits to play! Pay first!"
return
if(!in_use && (tokens || freeplay))
in_use = 1
start_play(user)
return
if(in_use)
if(src != user.machine)
user << "Someone else is already playing this machine, please wait your turn!"
return
/obj/machinery/arcade/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/screwdriver) && anchored)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance panel."
update_icon()
return
if(!freeplay)
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = O
if(pay_with_card(C))
tokens += 1
return
else if(istype(O, /obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/C = O
if(pay_with_cash(C, user))
tokens += 1
return
if(panel_open&& component_parts && istype(O, /obj/item/weapon/crowbar))
default_deconstruction_crowbar(O)
/obj/machinery/arcade/update_icon()
return
/obj/machinery/arcade/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, var/mob/user)
if(cashmoney.get_total() < token_price)
user << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
return 0
visible_message("<span class='info'>[usr] inserts a credit chip into [src].</span>")
var/left = cashmoney.get_total() - token_price
user.unEquip(cashmoney)
qdel(cashmoney)
if(left)
dispense_cash(left, src.loc, user)
return 1
/obj/machinery/arcade/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/mob/user)
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number)
if (!customer_account)
user <<"Error: Unable to access account. Please contact technical support if problem persists."
return 0
if(customer_account.suspended)
user << "Unable to access account: account suspended."
return 0
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
user << "Unable to access account: incorrect credentials."
return 0
if(token_price > customer_account.money)
user << "Insufficient funds in account."
return 0
else
// Okay to move the money at this point
// debit money from the purchaser's account
customer_account.money -= token_price
// create entry in the purchaser's account log
var/datum/transaction/T = new()
T.target_name = "[src.name]"
T.purpose = "Purchase of [src.name] credit"
if(token_price > 0)
T.amount = "([token_price])"
else
T.amount = "[token_price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
customer_account.transaction_log.Add(T)
return 1
/obj/machinery/arcade/proc/start_play(mob/user as mob)
user.set_machine(src)
if(!freeplay)
tokens -= 1
/obj/machinery/arcade/proc/close_game()
in_use = 0
for(var/mob/user in viewers(world.view, src)) // I don't know who you are.
if(user.client && user.machine == src) // I will look for you,
user.unset_machine() // I will find you,
user << browse(null, "window=[window_name]") // And I will kill you.
return
/obj/machinery/arcade/proc/win()
return
/obj/machinery/arcade/process()
if(in_use)
src.updateUsrDialog()
if(!in_use)
src.close_game()
/obj/machinery/arcade/Destroy()
src.close_game()
return ..()
+24
View File
@@ -0,0 +1,24 @@
/obj/item/toy/prizeball
name = "prize ball"
desc = "A toy is a toy, but a prize ball could be anything! It could even be a toy!"
icon = 'icons/obj/arcade.dmi'
icon_state = "prizeball_1"
var/opening = 0
/obj/item/toy/prizeball/New()
..()
icon_state = pick("prizeball_1","prizeball_2","prizeball_3")
/obj/item/toy/prizeball/attack_self(mob/user as mob)
if(opening)
return
opening = 1
playsound(src.loc, 'sound/items/bubblewrap.ogg', 30, 1, extrarange = -4, falloff = 10)
icon_state = "prizeconfetti"
src.color = pick(random_color_list)
var/prize_inside = pick(/obj/random/carp_plushie, /obj/random/plushie, /obj/random/figure) //will add ticket bundles later
spawn(10)
user.unEquip(src)
new prize_inside(user.loc)
qdel(src)
+82
View File
@@ -0,0 +1,82 @@
/var/claw_game_html = null
/obj/machinery/arcade/claw
name = "Claw Game"
desc = "One of the most infuriating ways to win a toy."
icon = 'icons/obj/arcade.dmi'
icon_state = "clawmachine_1_on"
token_price = 15
window_name = "Claw Game"
var/machine_image = "_1"
var/bonus_prize_chance = 5 //chance to dispense a SECOND prize if you win, increased by matter bin rating
//This is to make sure the images are available
var/list/img_resources = list('icons/obj/arcade_images/backgroundsprite.png',
'icons/obj/arcade_images/clawpieces.png',
'icons/obj/arcade_images/crane_bot.png',
'icons/obj/arcade_images/crane_top.png',
'icons/obj/arcade_images/prize_inside.png',
'icons/obj/arcade_images/prizeorbs.png')
/obj/machinery/arcade/claw/New()
src.addAtProcessing()
machine_image = pick("_1", "_2")
update_icon()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clawgame(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/stack/cable_coil(null, 5)
component_parts += new /obj/item/stack/sheet/glass(null, 1)
RefreshParts()
if(!claw_game_html)
claw_game_html = file2text('code/modules/arcade/crane.html')
/obj/machinery/arcade/claw/RefreshParts()
var/bin_upgrades = 0
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
bin_upgrades = B.rating
bonus_prize_chance = bin_upgrades * 5 //equals +5% chance per matter bin rating level (+20% with rating 4)
/obj/machinery/arcade/claw/update_icon()
if(stat & BROKEN)
icon_state = "clawmachine[machine_image]_broken"
else if(panel_open)
icon_state = "clawmachine[machine_image]_open"
else if(stat & NOPOWER)
icon_state = "clawmachine[machine_image]_off"
else
icon_state = "clawmachine[machine_image]_on"
return
/obj/machinery/arcade/claw/win()
icon_state = "clawmachine[machine_image]_win"
visible_message("<span class='game say'><span class='name'>[src.name]</span> beeps, \"WINNER!\"</span>")
if(prob(bonus_prize_chance))
//double prize mania!
new /obj/item/toy/prizeball(get_turf(src))
new /obj/item/toy/prizeball(get_turf(src))
playsound(src.loc, 'sound/arcade/Win.ogg', 50, 1, extrarange = -3, falloff = 10)
spawn(10)
update_icon()
/obj/machinery/arcade/claw/start_play(mob/user as mob)
..()
user << browse_rsc('page.css')
for(var/i=1, i<=img_resources.len, i++)
user << browse_rsc(img_resources[i])
var/my_game_html = replacetext(claw_game_html, "/* ref src */", "\ref[src]")
user << browse(my_game_html, "window=[window_name];size=700x600")
/obj/machinery/arcade/claw/Topic(href, list/href_list)
if(..())
return
var/prize_won = null
prize_won = href_list["prizeWon"]
if(!isnull(prize_won))
close_game()
if(prize_won == "1")
win()
+289
View File
@@ -0,0 +1,289 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Crane game</title>
<link rel="stylesheet" type="text/css" href="page.css" />
<script src="libraries.min.js"></script>
<!-- Prize.js --><script>
function Prize(id,css, crane) {
var top = css['top'];
var left = css['left'];
var original_left = css['left'];
hspd = 15;
vspd = 5;
var state = 'falling';
var error;
var rand = Math.floor(Math.random()*10);
css['background'] = 'url(prize_inside.png) no-repeat center';
var pic = $('<div></div>').attr({'id':'prize'+id,class:'prize-ball'}).css(css);
var ball = $('<div></div>').css({height: 60,'background':'url(prizeorbs.png) no-repeat -4px -'+62*rand+'px'});
$(pic).append(ball);
$('#game').append(pic);
//console.log(crane);
this.GetState = function() {return state};
var CheckBoundaries = function () {
if(left < 52)
left = 52;
else if(left > 812)
left = 812;
if(top < 30)
top = 30;
else if(top > 347 && state !='won' && state !='hidden') {
top = 347;
state = 'resting';
} else if(top > 500 && state =='won') {
top=500;
}
};
var CheckGrabbed = function() {
var tmp = Math.floor(Math.random()*100);
if(tmp>error) {
setTimeout(function(){
state='falling';
$('#debug-streak').html(0); //reset streak
setTimeout(gameShutDown,500); //end game because you dropped it
},4*error+300);
}
state = 'is grabbed';
};
var IsGrabbed = function() {
top = crane.GetTop()+65;
if(top > 347)
top = 347;
left = crane.GetLeft()+23;
if(left <= 60) {
left = 60;
state = 'won';
}
};
this.GetError = function(offset) {
return Math.floor(160/(.1*offset+1)-60);
};
this.Update = function () {
if(crane.GetState() == 'down' && state=='resting') {
var offset = Math.abs(left - crane.GetLeft()-23);
error = this.GetError(offset);
if(error > 0) {
state = 'being grabbed';
$('#debug-errorpx').html(Math.abs(offset)+'px');
$('#debug-errordrop').html(error+'%');//debugging
}
}
if(crane.GetState() == 'up' && state=='being grabbed')
CheckGrabbed();
if((crane.GetState() == 'drop' || crane.GetState() == 'up') && state=='is grabbed')
IsGrabbed();
if(state=='falling'||state=='won')
top += vspd;
if(state=='won' && top > 460) {
$('#prize'+id).remove();//css({visibility:'hidden'});
state='hidden';
prizeWon = true;
gameShutDown();
}
CheckBoundaries();
};
this.Repaint = function () {
$('#prize'+id).css({'top':top, 'left':left});
//$('#'+id+' #crane-handle-top').css({height: handleHeight});
};
}</script>
<!-- Crane.js --><script>
function Crane(id) {
//console.log("crane created");
var top = 131; //private
var left = 100;
var hspd = 6;
var vspd = 4;
var state = false;
var handleHeight = 83;
var frames = {
normal: {'background-position': '-36px -34px',left:11},
half: {'background-position': '-36px -148px',left:6},
open: {'background-position': '-28px -270px',left:-2}
};
this.GetState = function() {return state};
this.GetLeft = function() {return left};
this.GetTop = function() {return top};
var Grab = function () {
top += (state == 'down')?vspd:-vspd;
handleHeight += (state == 'down')?vspd:-vspd;
if(top > 300 && state == 'down') { //when going down
top = 300;
//handleHeight = ;
state = 'up';
$('#'+id+' #crane-claw').css(frames['half']);
} else if(top < 131 && state == 'up') { //when going up
top = 131;
handleHeight = 83;
state = 'drop';
} else if(state == 'drop') { //when up and dropping
left -= hspd;
top = 131;
handleHeight = 83;
if(left < 30) {
left = 30;
$('#'+id+' #crane-claw').css(frames['open']);
setTimeout(function(){$('#'+id+' #crane-claw').css(frames['normal']);state = false;},500);
}
}
};
var CheckBoundaries = function () {
if(left < 30)
left = 30;
else if(left > 788)
left = 788;
};
this.Update = function () {
//console.log(left);
if(keys["left"] && !state) //left
left -= hspd;
if(keys["right"] && !state) //right
left += hspd;
if(keys["down"] && !state) { //drop
state = 'down';
$('#'+id+' #crane-claw').css(frames['open']);
}
if(state) {
Grab();
}
CheckBoundaries();
};
this.Repaint = function () {
$('#'+id).css({'top':top, 'left':left});
$('#'+id+' #crane-handle-top').css({height: handleHeight});
};
}</script>
<!-- main.js --><script>
var crane = new Crane('crane');
var keys = [];
var prizes = [];
var prizeWon = false;
window.requestAnimFrame = (function(callback){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
window.setTimeout(callback, 1000 / 30);
};
})();
function animate(){
//console.log("animate called");
crane.Update();
for(var i = 0; i< prizes.length; i++)
prizes[i].Update();
for(var i = 0; i< prizes.length; i++)
prizes[i].Repaint();
crane.Repaint();
requestAnimFrame(function(){
animate();
});
}
function joystickControlOn(direction){
//console.log(direction);
keys[direction] = true;
}
function joystickControlOff(direction){
//console.log(direction);
keys[direction] = false;
}
function gameStartUp(){ //main function
//console.log("game start!");
document.getElementById("play_btn").disabled = true; //to prevent button-mashing the start button.
for(var i = 0; i< 5; i++)
prizes[i] = new Prize(i,{top: Math.ceil(Math.random()*100),left: 400+i*100-Math.ceil(Math.random()*50)},crane);
//console.log("prize made");
//crane.Repaint();
animate();
}
function gameShutDown(){
document.getElementById("play_btn").disabled = true;
var close_game_link = '<h2>TRY AGAIN!</h2><br><a href="byond://?src=/* ref src */;prizeWon=0">\[Close Game\]</a>'
if(prizeWon)
close_game_link = '<h2>YOU WON!</h2><br><a href="byond://?src=/* ref src */;prizeWon=1">\[Close Game\]</a>'
document.getElementById('game').innerHTML = '<center><h1> GAME OVER!</h1><br>'+close_game_link+'</center>'
}
function emergencyShutDown(){
document.getElementById("close_nao").click();
}
</script>
</head>
<body onunload="emergencyShutDown()">
<div id='game' style='position: relative;'>
<div id="background"></div>
<div id="crane">
<div id="crane-handle-top"></div>
<div id="crane-handle-bottom"></div>
<div id="crane-claw"></div>
<div id="crane-center"></div>
</div>
<div id="grayorbs-chute"></div>
<div id="foreground"></div>
</div>
<div id='controls' style='position: absolute; top: 550px'>
<br><button id="play_btn" onclick="gameStartUp()">Play Now!</button> <button id="close_btn" onclick="gameShutDown()">Close Game.</button><a id="close_nao" hidden="true" href="byond://?src=/* ref src */;prizeWon=0"></a>
<br>
<button onmouseover="joystickControlOn('left')" onmouseout="joystickControlOff('left')">/==<br>\==</button>
<button onmousedown="joystickControlOn('down')" onmouseup="joystickControlOff('down')">DROP<br>CLAW</button>
<button onmouseover="joystickControlOn('right')" onmouseout="joystickControlOff('right')">==\<br>==/</button>
</div>
</body>
</html>
+84
View File
@@ -0,0 +1,84 @@
#background {
width:900px;
height:406px;
position: absolute;
background: url(backgroundsprite.png) no-repeat;
background-position: 0 -166px;
top: 62px;
}
#grayorbs-chute {
width: 902px;
height: 131px;
position: absolute;
background: url(backgroundsprite.png) no-repeat center;
background-position: 3px -15px;
top: 337px;
left: -3px;
}
#foreground {
width:900px;
height:520px;
position: absolute;
background: url(backgroundsprite.png) no-repeat center;
background-position: 0 -575px;
z-index:10;
}
#crane {
width:100px;
height:100px;
position: absolute;
top: 131px;
left: 100px;
}
#crane-handle-top {
width: 10px;
height: 83px;
position: absolute;
background: url('crane_top.png') repeat-y center;
bottom: 86px;/*top: -69px;*/
left: 47px;
}
#crane-handle-bottom {
width:10px;
height:8px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 14px;
left: 47px;
background-position: -198px -83px;
}
#crane-center{
width: 26px;
height: 27px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 22px;
left: 39px;
background-position: -190px -101px;
}
#crane-claw {
width: 110px;
height: 78px;
position: absolute;
background: url('clawpieces.png') no-repeat center;
top: 33px;
left: 11px;
background-position: -36px -34px;
}
.prize-ball {
width: 60px;
height: 60px;
//background: url('prizeorbs.png') no-repeat;
//-moz-border-radius: 30px;
//-webkit-border-radius: 30px;
//border-radius: 30px;
position: absolute;
}
+3
View File
@@ -85,6 +85,9 @@
if(bombassembly)
bombassembly.hear_talk(M, msg)
/obj/item/device/onetankbomb/hear_message(mob/living/M as mob, msg)
if(bombassembly)
bombassembly.hear_message(M, msg)
// ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ----------
+6
View File
@@ -100,6 +100,12 @@
a_left.hear_talk(M, msg)
if(a_right)
a_right.hear_talk(M, msg)
hear_message(mob/living/M as mob, msg)
if(a_left)
a_left.hear_message(M, msg)
if(a_right)
a_right.hear_message(M, msg)
proc/process_movement() // infrared beams and prox sensors
if(a_left && a_right)
+10 -2
View File
@@ -6,6 +6,7 @@
origin_tech = "magnets=1"
var/listening = 0
var/recorded = null //the activation message
var/recorded_type = 0 // 0 for say, 1 for emote
bomb_name = "voice-activated bomb"
@@ -16,15 +17,22 @@
return "[src] is deactivated."
hear_talk(mob/living/M as mob, msg)
hear_input(M, msg, 0)
hear_message(mob/living/M as mob, msg)
hear_input(M, msg, 1)
proc/hear_input(mob/living/M as mob, msg, type)
if(!istype(M,/mob/living))
return
if(listening)
recorded = msg
recorded_type = type
listening = 0
var/turf/T = get_turf(src) //otherwise it won't work in hand
T.visible_message("\icon[src] beeps, \"Activation message is '[recorded]'.\"")
T.visible_message("\icon[src] beeps, \"Activation message is [type ? "the sound when one [recorded]" : "'[recorded]'."]\"")
else
if(findtext(msg, recorded))
if(findtext(msg, recorded) && type == recorded_type)
pulse(0)
var/turf/T = get_turf(src) //otherwise it won't work in hand
T.visible_message("\icon[src] \red beeps!")
+2 -2
View File
@@ -23,7 +23,7 @@
return dat
/obj/item/weapon/implantcase/exile
name = "Glass Case- 'Exile'"
name = "\improper Glass Case- 'Exile'"
desc = "A case containing an exile implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
@@ -36,7 +36,7 @@
/obj/structure/closet/secure_closet/exile
name = "Exile Implants"
name = "exile implants"
req_access = list(access_hos)
New()
+241
View File
@@ -0,0 +1,241 @@
/*
Asset cache quick users guide:
Make a datum at the bottom of this file with your assets for your thing.
The simple subsystem will most like be of use for most cases.
Then call get_asset_datum() with the type of the datum you created and store the return
Then call .send(client) on that stored return value.
You can set verify to TRUE if you want send() to sleep until the client has the assets.
*/
// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping.
// This is doubled for the first asset, then added per asset after
#define ASSET_CACHE_SEND_TIMEOUT 7
//When sending mutiple assets, how many before we give the client a quaint little sending resources message
#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8
//List of ALL assets for the above, format is list(filename = asset).
/var/global/list/asset_cache = list()
/client
var/list/cache = list() // List of all assets sent to this client by the asset cache.
var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement.
var/list/sending = list()
var/last_asset_job = 0 // Last job done.
//This proc sends the asset to the client, but only if it needs it.
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE)
if(!istype(client))
if(ismob(client))
var/mob/M = client
if(M.client)
client = M.client
else
return 0
else
return 0
if(client.cache.Find(asset_name) || client.sending.Find(asset_name))
return 0
client << browse_rsc(asset_cache[asset_name], asset_name)
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
if (client)
client.cache += asset_name
return 1
if (!client)
return 0
client.sending |= asset_name
var/job = ++client.last_asset_job
client << browse({"
<script>
window.location.href="?asset_cache_confirm_arrival=[job]"
</script>
"}, "window=asset_cache_browser")
var/t = 0
var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
sleep(1) // Lock up the caller until this is received.
t++
if(client)
client.sending -= asset_name
client.cache |= asset_name
client.completed_asset_jobs -= job
return 1
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE)
if(!istype(client))
if(ismob(client))
var/mob/M = client
if(M.client)
client = M.client
else
return 0
else
return 0
var/list/unreceived = asset_list - (client.cache + client.sending)
if(!unreceived || !unreceived.len)
return 0
if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
client << "Sending Resources..."
for(var/asset in unreceived)
if (asset in asset_cache)
client << browse_rsc(asset_cache[asset], asset)
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
if (client)
client.cache += unreceived
return 1
if (!client)
return 0
client.sending |= unreceived
var/job = ++client.last_asset_job
client << browse({"
<script>
window.location.href="?asset_cache_confirm_arrival=[job]"
</script>
"}, "window=asset_cache_browser")
var/t = 0
var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
sleep(1) // Lock up the caller until this is received.
t++
if(client)
client.sending -= unreceived
client.cache |= unreceived
client.completed_asset_jobs -= job
return 1
//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start.
//The proc calls procs that sleep for long times.
proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
for(var/file in files)
if (!client)
break
if (register_asset)
register_asset(file,files[file])
send_asset(client,file)
sleep(-1) //queuing calls like this too quickly can cause issues in some client versions
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
//if it's an icon or something be careful, you'll have to copy it before further use.
/proc/register_asset(var/asset_name, var/asset)
asset_cache[asset_name] = asset
//From here on out it's populating the asset cache.
/proc/populate_asset_cache()
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
var/datum/asset/A = new type()
A.register()
for(var/client/C in clients)
//doing this to a client too soon after they've connected can cause issues, also the proc we call sleeps
spawn(10)
getFilesSlow(C, asset_cache, FALSE)
//These datums are used to populate the asset cache, the proc "register()" does this.
//all of our asset datums, used for referring to these later
/var/global/list/asset_datums = list()
//get a assetdatum or make a new one
/proc/get_asset_datum(var/type)
if (!(type in asset_datums))
return new type()
return asset_datums[type]
/datum/asset/New()
asset_datums[type] = src
/datum/asset/proc/register()
return
/datum/asset/proc/send(client)
return
//If you don't need anything complicated.
/datum/asset/simple
var/assets = list()
var/verify = FALSE
/datum/asset/simple/register()
for(var/asset_name in assets)
register_asset(asset_name, assets[asset_name])
/datum/asset/simple/send(client)
send_asset_list(client,assets,verify)
//DEFINITIONS FOR ASSET DATUMS START HERE.
/datum/asset/simple/paper
assets = list(
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
"talisman.png" = 'icons/paper_icons/talisman.png',
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
)
/datum/asset/nanoui
var/list/common = list()
var/list/common_dirs = list(
"nano/css/",
"nano/js/",
"nano/images/",
"nano/layouts/"
)
var/list/uncommon_dirs = list(
"nano/templates/"
)
/datum/asset/nanoui/register()
// Crawl the directories to find files.
for (var/path in common_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
if(fexists(path + filename))
common[filename] = fcopy_rsc(path + filename)
register_asset(filename, common[filename])
for (var/path in uncommon_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
if(fexists(path + filename))
register_asset(filename, fcopy_rsc(path + filename))
/datum/asset/nanoui/send(client, uncommon)
if(!islist(uncommon))
uncommon = list(uncommon)
send_asset_list(client, uncommon)
send_asset_list(client, common)
+13 -5
View File
@@ -35,6 +35,11 @@
#endif
if(href_list["asset_cache_confirm_arrival"])
//src << "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED."
var/job = text2num(href_list["asset_cache_confirm_arrival"])
completed_asset_jobs += job
return
//Reduces spamming of links by dropping calls that happen during the delay period
if(next_allowed_topic_time > world.time)
@@ -232,8 +237,6 @@
///////////
/client/New(TopicData)
TopicData = null //Prevent calls to client.Topic from connect
client_cache += src
client_cache[src] = list()
if(connection != "seeker") //Invalid connection type.
return null
@@ -303,6 +306,7 @@
if (config && config.autoconvert_notes)
convert_notes_sql(ckey)
send_resources()
if(!void)
@@ -310,6 +314,10 @@
screen += void
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
src << "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>"
//////////////
//DISCONNECT//
//////////////
@@ -414,9 +422,9 @@
'html/search.js', // Used in various non-NanoUI HTML windows for search functionality
'html/panels.css' // Used for styling certain panels, such as in the new player panel
)
// Send NanoUI resources to this client
spawn nanomanager.send_resources(src)
spawn (10)
//Precache the client with all other assets slowly, so as to not block other browse() calls
getFilesSlow(src, asset_cache, register_asset = FALSE)
//For debugging purposes
/client/proc/list_all_languages()
-84
View File
@@ -1,84 +0,0 @@
//We store a list of all clients, with a list of all file names that the client received.
/var/global/list/client_cache = list()
//List of ALL assets for the above, format is list(filename = asset).
/var/global/list/asset_cache = list()
//This proc sends the asset to the client, but only if it needs it.
/proc/send_asset(var/client/client, var/asset_name)
var/list/client_list = client_cache[client]
ASSERT(client_list)
if(asset_name in client_list)
return
//world << "sending a client the asset '[asset_name]'"
client << browse_rsc(asset_cache[asset_name], asset_name)
client_list += asset_name
/proc/send_asset_list(var/client/client, var/list/asset_list)
for(var/asset_name in asset_list)
send_asset(client, asset_name)
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
//if it's an icon or something be careful, you'll have to copy it before further use.
/proc/register_asset(var/asset_name, var/asset)
asset_cache |= asset_name
asset_cache[asset_name] = asset
//From here on out it's populating the asset cache.
/proc/populate_asset_cache()
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
var/datum/asset/A = new type()
A.register()
//These datums are used to populate the asset cache, the proc "register()" does this.
/datum/asset/proc/register()
return
//If you don't need anything complicated.
/datum/asset/simple
var/assets = list()
/datum/asset/simple/register()
for(var/asset_name in assets)
register_asset(asset_name, assets[asset_name])
//DEFINITIONS FOR ASSET DATUMS START HERE.
/datum/asset/simple/spider_os
assets = list(
"sos_1.png" = 'icons/spideros_icons/sos_1.png',
"sos_2.png" = 'icons/spideros_icons/sos_2.png',
"sos_3.png" = 'icons/spideros_icons/sos_3.png',
"sos_4.png" = 'icons/spideros_icons/sos_4.png',
"sos_5.png" = 'icons/spideros_icons/sos_5.png',
"sos_6.png" = 'icons/spideros_icons/sos_6.png',
"sos_7.png" = 'icons/spideros_icons/sos_7.png',
"sos_8.png" = 'icons/spideros_icons/sos_8.png',
"sos_9.png" = 'icons/spideros_icons/sos_9.png',
"sos_10.png" = 'icons/spideros_icons/sos_10.png',
"sos_11.png" = 'icons/spideros_icons/sos_11.png',
"sos_12.png" = 'icons/spideros_icons/sos_12.png',
"sos_13.png" = 'icons/spideros_icons/sos_13.png',
"sos_14.png" = 'icons/spideros_icons/sos_14.png'
)
/datum/asset/simple/paper
assets = list(
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
"talisman.png" = 'icons/paper_icons/talisman.png',
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
)
+2 -2
View File
@@ -433,11 +433,11 @@ datum/preferences
dat += "</center></body></html>"
// user << browse(dat, "window=preferences;size=560x580")
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 810)
popup.set_content(dat)
popup.open(0)
proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 755, height = 780)
proc/SetChoices(mob/user, limit = 12, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 760, height = 790)
if(!job_master)
return
+12 -1
View File
@@ -135,6 +135,7 @@
flags = GLASSESCOVERSEYES
slot_flags = SLOT_EYES
materials = list(MAT_GLASS = 250)
var/emagged = 0
var/vision_flags = 0
var/darkness_view = 0//Base human is 2
var/invisa_view = 0
@@ -223,6 +224,11 @@ BLIND // can't see anything
user << "Your suit will now report your vital lifesigns."
if(3)
user << "Your suit will now report your vital lifesigns as well as your coordinate position."
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.w_uniform == src)
H.update_suit_sensors()
else if (istype(src.loc, /mob))
switch(sensor_mode)
if(0)
@@ -237,6 +243,10 @@ BLIND // can't see anything
if(3)
for(var/mob/V in viewers(user, 1))
V.show_message("[user] sets [src.loc]'s sensors to maximum.", 1)
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(H.w_uniform == src)
H.update_suit_sensors()
/obj/item/clothing/under/verb/toggle()
set name = "Toggle Suit Sensors"
@@ -253,7 +263,7 @@ BLIND // can't see anything
var/blockTracking // Do we block AI tracking?
var/flash_protect = 0
var/tint = 0
var/HUDType = 0
var/HUDType = null
var/vision_flags = 0
var/see_darkness = 1
@@ -310,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
+13 -18
View File
@@ -10,7 +10,6 @@
var/prescription = 0
var/prescription_upgradable = 0
var/see_darkness = 1
var/HUDType = 0
/obj/item/clothing/glasses/New()
. = ..()
@@ -69,6 +68,19 @@
/obj/item/clothing/glasses/meson/prescription
prescription = 1
/obj/item/clothing/glasses/meson/gar
name = "gar mesons"
icon_state = "garm"
item_state = "garm"
desc = "Do the impossible, see the invisible!"
force = 10
throwforce = 10
throw_speed = 4
attack_verb = list("sliced")
hitsound = 'sound/weapons/bladeslice.ogg'
sharp = 1
edge = 1
/obj/item/clothing/glasses/meson/cyber
name = "Eye Replacement Implant"
desc = "An implanted replacement for a left eye with meson vision capabilities."
@@ -314,23 +326,6 @@
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunhud"
darkness_view = 1
flash_protect = 1
tint = 1
HUDType = SECHUD
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud/prescription
prescription = 1
/obj/item/clothing/glasses/thermal
name = "Optical Thermal Scanner"
desc = "Thermals in the shape of glasses."
+58 -11
View File
@@ -1,28 +1,43 @@
/obj/item/clothing/glasses/hud
name = "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"
HUDType = SECHUD
var/HUDType = null //Hudtype is defined on glasses.dm
prescription_upgradable = 1
var/list/icon/current = list() //the current hud icons
/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot)
if(HUDType && slot == slot_glasses)
var/datum/atom_hud/H = huds[HUDType]
H.add_hud_to(user)
/obj/item/clothing/glasses/hud/dropped(mob/living/carbon/human/user)
if(HUDType && istype(user) && user.glasses == src)
var/datum/atom_hud/H = huds[HUDType]
H.remove_hud_from(user)
/obj/item/clothing/glasses/hud/emp_act(severity)
if(emagged == 0)
emagged = 1
desc = desc + " The display flickers slightly."
/obj/item/clothing/glasses/hud/health
name = "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 = MEDHUD
HUDType = DATA_HUD_MEDICAL_ADVANCED
/obj/item/clothing/glasses/hud/health_advanced
name = "Advanced Health Scanner HUD"
/obj/item/clothing/glasses/hud/health/health_advanced
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 = MEDHUD
HUDType = DATA_HUD_MEDICAL_ADVANCED
/obj/item/clothing/glasses/hud/health/night
name = "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"
@@ -30,16 +45,31 @@
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/diagnostic
name = "Diagnostic HUD"
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits."
icon_state = "diagnostichud"
HUDType = DATA_HUD_DIAGNOSTIC
/obj/item/clothing/glasses/hud/diagnostic/night
name = "Night Vision Diagnostic HUD"
desc = "A robotics diagnostic HUD fitted with a light amplifier."
icon_state = "diagnostichudnight"
item_state = "glasses"
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/security
name = "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]
flash_protect = 1
HUDType = DATA_HUD_SECURITY_ADVANCED
/obj/item/clothing/glasses/hud/security/jensenshades
name = "Augmented shades"
name = "augmented shades"
desc = "Polarized bioneural eyewear, designed to augment your vision."
icon_state = "jensenshades"
item_state = "jensenshades"
@@ -47,9 +77,26 @@
invisa_view = 2
/obj/item/clothing/glasses/hud/security/night
name = "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
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/security/sunglasses
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunhud"
darkness_view = 1
flash_protect = 1
tint = 1
HUDType = DATA_HUD_SECURITY_ADVANCED
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/hud/security/sunglasses/prescription
prescription = 1
+1
View File
@@ -43,6 +43,7 @@
name = "blood-red magboots"
icon_state = "syndiemag0"
magboot_state = "syndiemag"
origin_tech = "magnets=2;syndicate=3"
obj/item/clothing/shoes/magboots/syndie/advance //For the Syndicate Strike Team
desc = "Reverse-engineered magboots that appear to be based on an advanced model, as they have a lighter magnetic pull. Property of Gorlex Marauders."
@@ -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
+4 -1
View File
@@ -890,7 +890,10 @@
return src
/mob/living/carbon/human/get_rig()
return back
if(istype(back,/obj/item/weapon/rig))
return back
else
return null
#undef ONLY_DEPLOY
#undef ONLY_RETRACT
+4
View File
@@ -33,6 +33,10 @@
pockets.hear_talk(M, msg)
..()
/obj/item/clothing/suit/storage/hear_message(mob/M, var/msg)
pockets.hear_message(M, msg)
..()
/obj/item/clothing/suit/storage/proc/return_inv()
var/list/L = list( )
@@ -40,6 +40,10 @@
hold.hear_talk(M, msg, verb, speaking)
..()
/obj/item/clothing/accessory/storage/hear_message(mob/M, var/msg, verb, datum/language/speaking)
hold.hear_message(M, msg)
..()
/obj/item/clothing/accessory/storage/proc/return_inv()
var/list/L = list( )
@@ -10,7 +10,7 @@
/datum/file/program/holodeck
name = "Holodeck Control Console"
name = "holodeck control console"
desc = "Used to control a nearby holodeck."
active_state = "holocontrol"
var/area/linkedholodeck = null
+16 -16
View File
@@ -14,7 +14,7 @@
/obj/machinery/computer3/security/wooden_tv
name = "security cameras"
name = "security cameras console"
desc = "An old TV hooked into the stations camera network."
icon = 'icons/obj/computer.dmi'
icon_state = "security_det"
@@ -30,7 +30,7 @@
/obj/machinery/computer3/security/mining
name = "Outpost Cameras"
name = "outpost cameras console"
desc = "Used to access the various cameras on the outpost."
spawn_files = list(/datum/file/camnet_key/miningoutpost)
@@ -80,14 +80,14 @@
name = "Telecomms Network Key"
title = "telecommunications satellite"
desc = "Connects to telecommunications satellite security cameras."
networks = list("Telecomms")
networks = list("Telecomms")
/datum/file/camnet_key/researchoutpost
name = "Research Outpost Network Key"
title = "research outpost"
desc = "Connects to research outpost security cameras."
networks = list("Research Outpost")
/datum/file/camnet_key/miningoutpost
name = "Mining Outpost Network Key"
title = "mining outpost"
@@ -100,67 +100,67 @@
title = "research"
desc = "Connects to research security cameras."
networks = list("Research")
/datum/file/camnet_key/prison
name = "Prison Network Key"
title = "prison"
desc = "Connects to prison security cameras."
networks = list("Prison")
/datum/file/camnet_key/interrogation
name = "Interrogation Network Key"
title = "interrogation"
desc = "Connects to interrogation security cameras."
networks = list("Interrogation")
/datum/file/camnet_key/supermatter
name = "Supermatter Network Key"
title = "supermatter"
desc = "Connects to supermatter security cameras."
networks = list("Supermatter")
/datum/file/camnet_key/singularity
name = "Singularity Network Key"
title = "singularity"
desc = "Connects to singularity security cameras."
networks = list("Singularity")
/datum/file/camnet_key/anomalyisolation
name = "Anomaly Isolation Network Key"
title = "anomalyisolation"
desc = "Connects to interrogation security cameras."
networks = list("Anomaly Isolation")
/datum/file/camnet_key/toxins
name = "Toxins Network Key"
title = "toxins"
desc = "Connects to toxins security cameras."
networks = list("Toxins")
/datum/file/camnet_key/telepad
name = "Telepad Network Key"
title = "telepad"
desc = "Connects to telepad security cameras."
networks = list("Telepad")
/datum/file/camnet_key/ert
name = "Emergency Response Team Network Key"
title = "emergency response team"
desc = "Connects to emergency response team security cameras."
networks = list("ERT")
/datum/file/camnet_key/centcom
name = "Central Command Network Key"
title = "central command"
desc = "Connects to central command security cameras."
networks = list("CentCom")
/datum/file/camnet_key/thunderdome
name = "Thunderdome Network Key"
title = "thunderdome"
desc = "Connects to thunderdome security cameras."
networks = list("Thunderdome")
/datum/file/camnet_key/entertainment
name = "Entertainment Network Key"
title = "entertainment"
@@ -42,9 +42,9 @@
var/status_display_freq = "1435"
var/stat_msg1
var/stat_msg2
var/datum/announcement/priority/crew_announcement = new
New()
..()
crew_announcement.newscast = 1
@@ -75,7 +75,7 @@
if(access_captain in I.GetAccess())
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if("logout" in href_list)
authenticated = 0
crew_announcement.announcer = ""
@@ -133,15 +133,13 @@
if(!input || ..(href, href_list) || !authenticated)
return
call_shuttle_proc(usr, input)
if(emergency_shuttle.online())
if(shuttle_master.emergency.timer)
post_status("shuttle")
state = STATE_DEFAULT
if("cancelshuttle" in href_list)
state = STATE_DEFAULT
if(authenticated)
cancel_call_proc(usr)
if(emergency_shuttle.online())
post_status("shuttle")
state = STATE_CANCELSHUTTLE
if("messagelist" in href_list)
currmsg = 0
@@ -284,9 +282,9 @@
proc/main_menu()
var/dat = ""
if (computer.radio.subspace)
if(emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
var/timeleft = shuttle_master.emergency.timeLeft()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
refresh = 1
else
refresh = 0
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "frame-med"
/datum/file/program/crew
name = "Crew Monitoring Console"
name = "crew monitoring console"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
active_state = "crew"
var/list/tracked = list( )
+2 -2
View File
@@ -1,7 +1,7 @@
/obj/machinery/computer3/aiupload
name = "AI Upload"
name = "\improper AI upload console"
desc = "Used to upload laws to the AI."
icon_state = "frame-rnd"
var/mob/living/silicon/ai/current = null
@@ -52,7 +52,7 @@
/obj/machinery/computer3/borgupload
name = "Cyborg Upload"
name = "cyborg upload console"
desc = "Used to upload laws to Cyborgs."
icon_state = "frame-rnd"
var/mob/living/silicon/robot/current = null
+3 -2
View File
@@ -565,8 +565,7 @@ What a mess.*/
if ("Change Criminal Status")
if (active2)
for(var/mob/living/carbon/human/H in player_list)
H.hud_updateflag |= 1 << WANTED_HUD
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -578,6 +577,8 @@ What a mess.*/
active2.fields["criminal"] = "Parolled"
if("released")
active2.fields["criminal"] = "Released"
for(var/mob/living/carbon/human/H in mob_list)
H.sec_hud_set_security_status()
if ("Delete Record (Security) Execute")
if (active2)
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/machinery/lapvend
name = "Laptop Vendor"
name = "laptop vendor"
desc = "A generic vending machine."
icon = 'icons/obj/vending.dmi'
icon_state = "robotics"
+90 -14
View File
@@ -19,20 +19,20 @@
/obj/item/weapon/claymore/fluff/IsShield()
return 0
/obj/item/weapon/crowbar/fluff/zelda_creedy_1 // Zomgponies: Griffin Rowley
name = "Zelda's Crowbar"
desc = "A pink crow bar that has an engraving that reads, 'To Zelda. Love always, Dawn'"
icon = 'icons/obj/custom_items.dmi'
icon_state = "zeldacrowbar"
item_state = "crowbar"
/obj/item/clothing/glasses/meson/fluff/book_berner_1 // Adrkiller59: Adam Cooper
name = "bespectacled mesonic surveyors"
desc = "One of the older meson scanner models retrofitted to perform like its modern counterparts."
icon = 'icons/obj/custom_items.dmi'
icon_state = "book_berner_1"
/obj/item/weapon/lighter/zippo/fluff/purple // GodOfOreos: Jason Conrad
name = "purple engraved zippo"
desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
@@ -40,7 +40,7 @@
icon_state = "purple_zippo_off"
icon_on = "purple_zippo_on"
icon_off = "purple_zippo_off"
/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 // mrbits: Callista Gold
name = "engraved lighter"
desc = "A golden lighter, engraved with some ornaments and a G."
@@ -48,7 +48,47 @@
icon_state = "guessip"
icon_on = "guessipon"
icon_off = "guessip"
/obj/item/weapon/fluff/dogwhistle //phantasmicdream: Zeke Varloss
name = "Sax's whistle"
desc = "This whistle seems to have a strange aura about it. Maybe you should blow on it?"
icon = 'icons/obj/custom_items.dmi'
icon_state = "dogwhistle"
item_state = "dogwhistle"
force = 2
/obj/item/weapon/fluff/dogwhistle/attack_self(mob/user)
user.visible_message("<span class='notice'>[user] blows on the whistle, but no sound comes out.</span>", "<span class='notice'>You blow on the whistle, but don't hear anything.</span>")
spawn(20)
var/mob/living/simple_animal/pet/corgi/C = new /mob/living/simple_animal/pet/corgi(get_turf(user))
var/obj/item/clothing/head/det_hat/D = new /obj/item/clothing/head/det_hat(C)
D.flags |= NODROP
C.inventory_head = D
C.regenerate_icons()
C.name = "Detective Sax"
C.visible_message("<span class='notice'>[C] suddenly winks into existence at [user]'s feet!</span>")
user << "<span class='danger'>[src] crumbles to dust in your hands!</span>"
qdel(src)
/obj/item/weapon/storage/toolbox/fluff/lunchbox //godoforeos: Jason Conrad
name = "lunchpail"
desc = "A simple black lunchpail."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lunch_box"
item_state = "lunch_box"
force = 5
throwforce = 5
w_class = 3
max_combined_w_class = 9
storage_slots = 3
/obj/item/weapon/storage/toolbox/fluff/lunchbox/New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/sandwich(src)
new /obj/item/weapon/reagent_containers/food/snacks/chips(src)
new /obj/item/weapon/reagent_containers/food/drinks/cans/cola(src)
//////////////////////////////////
//////////// Clothing ////////////
//////////////////////////////////
@@ -71,19 +111,25 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "polarbearpelt"
item_state = "polarbearpelt"
/obj/item/clothing/head/fluff/sparkyninja_beret // Sparkyninja: Neil Wilkinson
name = "royal marines commando beret"
desc = "Dark Green beret with an old insignia on it."
icon_state = "sparkyninja_beret"
/obj/item/clothing/head/beret/fluff/sigholt //sigholtstarsong: Sigholt Starsong
name = "Lieutenant Starsong's beret"
desc = "This beret bears insignia of the SOLGOV Marine Corps 417th Regiment, 2nd Battalion, Bravo Company. It looks meticulously maintained."
icon_state = "hosberet"
item_state = "hosberet"
//////////// Suits ////////////
/obj/item/clothing/suit/storage/labcoat/fluff/aeneas_rinil //Socialsystem: Lynn Fea
name = "Robotics labcoat"
desc = "A labcoat with a few markings denoting it as the labcoat of roboticist."
icon = 'icons/obj/custom_items.dmi'
icon_state = "aeneasrinil_open"
/obj/item/clothing/suit/jacket/fluff/kidosvest // Anxipal: Kido Qasteth
name = "Kido's Vest"
desc = "A rugged leather vest with a tag labelled \"Men of Mayhem.\""
@@ -121,13 +167,13 @@
usr << "You attempt to hit the button but can't."
return
usr.update_inv_wear_suit()
/obj/item/clothing/suit/storage/labcoat/fluff/red // Sweetjealousy: Sophie Faust-Noms
/obj/item/clothing/suit/storage/labcoat/fluff/red // Sweetjealousy: Sophie Faust-Noms
name = "red labcoat"
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
icon = 'icons/obj/custom_items.dmi'
icon_state = "labcoat_red_open"
/obj/item/clothing/suit/fluff/stobarico_greatcoat // Stobarico: F.U.R.R.Y
name = "\improper F.U.R.R.Y's Nanotrasen Greatcoat"
desc = "A greatcoat with Nanotrasen colors."
@@ -154,7 +200,7 @@
icon_state = "castile_dress"
item_state = "castile_dress"
item_color = "castile_dress"
/obj/item/clothing/under/psysuit/fluff/isaca_sirius_1 // Xilia: Isaca Sirius
name = "Isaca's suit"
desc = "Black, comfortable and nicely fitting suit. Made not to hinder the wearer in any way. Made of some exotic fabric. And some strange glowing jewel at the waist. Name labels says; Property of Isaca Sirius; The Seeder."
@@ -200,8 +246,8 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "fox_jacket"
item_state = "fox_jacket"
/obj/item/clothing/under/fluff/fox
/obj/item/clothing/under/fluff/fox
name = "Aeronautics Jumpsuit"
desc = "A jumpsuit tailor made for spacefaring fighter pilots; this one seems very old."
icon = 'icons/obj/custom_items.dmi'
@@ -230,3 +276,33 @@
body_parts_covered = HEAD
flags = BLOCKHAIR
flags_inv = HIDEFACE
/obj/item/clothing/under/fluff/tactical_suit //chronx100: Hughe O'Splash
name = "Hughe O'Splash's tactical suit"
desc = "A very comfortable suit that covers your entire body; it makes you feel very stealthy."
icon = 'icons/obj/custom_items.dmi'
icon_state = "chronx_suit"
item_state = "chronx_suit"
item_color = "chronxsuit"
/obj/item/clothing/mask/fluff/tactical_balaclava //chronx100: Hughe O'Splash
name = "Hughe O'Splash's tactical balaclava"
desc = "Keeps your face warm and tactical during those cold space winter months, sadly it's not so effective against the cold void of space itself."
icon = 'icons/obj/custom_items.dmi'
icon_state = "chronx_balaclava"
item_state = "chronx_balaclava"
flags = BLOCKHAIR
w_class = 2
/obj/item/clothing/suit/armor/vest/fluff/tactical //m3hillus: Medusa Schlofield
name = "tactical armor vest"
desc = "A tactical vest with armored plate inserts."
icon = 'icons/obj/clothing/ties.dmi'
icon_state = "vest_black"
item_state = "vest_black"
/obj/item/clothing/under/pants/fluff/combat
name = "combat pants"
desc = "Medium style tactical pants, for the fashion aware combat units out there."
icon_state = "chaps"
item_color = "combat_pants"
+1 -1
View File
@@ -14,7 +14,7 @@ log transactions
#define PRINT_DELAY 100
/obj/machinery/atm
name = "Nanotrasen Automatic Teller Machine"
name = "Nanotrasen automatic teller machine"
desc = "For all your monetary needs!"
icon = 'icons/obj/terminals.dmi'
icon_state = "atm"
+2
View File
@@ -31,6 +31,8 @@
if(ishuman(src))
var/mob/living/carbon/human/H=src
var/obj/item/weapon/card/id/I=H.get_idcard()
if(!I || !istype(I))
return null
var/attempt_pin=0
var/datum/money_account/D = get_money_account(I.associated_account_number)
if(require_pin && user)
+1 -2
View File
@@ -132,8 +132,7 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50))
)
/datum/event_container/moderate
+2 -4
View File
@@ -320,13 +320,11 @@
/area/solar,
/area/holodeck,
/area/shuttle/arrival,
/area/shuttle/escape/station,
/area/shuttle/escape,
/area/shuttle/escape_pod1/station,
/area/shuttle/escape_pod2/station,
/area/shuttle/escape_pod3/station,
/area/shuttle/escape_pod5/station,
/area/shuttle/mining/station,
/area/shuttle/transport1/station,
/area/shuttle/specops/station,
/area/shuttle/prison/station,
/area/shuttle/administration/station
@@ -361,7 +359,7 @@
if(P.client)
players++
return players
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
+34 -1
View File
@@ -429,6 +429,22 @@
user.put_in_hands(NF)
qdel(src)
return
if("nettle")
var/obj/item/weapon/grown/nettle/nettle = new /obj/item/weapon/grown/nettle(user.loc)
nettle.force = round((5 + potency / 5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(nettle)
qdel(src)
return
if("deathnettle")
var/obj/item/weapon/grown/nettle/death/DN = new /obj/item/weapon/grown/nettle/death(user.loc)
DN.force = round((5 + potency / 2.5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(DN)
qdel(src)
return
if("cashpod")
user << "You crack open the cash pod..."
var/value = round(seed.get_trait(TRAIT_POTENCY))
@@ -475,4 +491,21 @@
return
reagents.remove_any(rand(1,3)) //Todo, make it actually remove the reagents the seed uses.
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/grown/On_Consume()
if(seed && seed.get_trait(TRAIT_BATTERY_RECHARGE))
if(!reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/weapon/stock_parts/cell/C in usr.GetAllContents())
var/newcharge = (potency*0.01)*C.maxcharge
if(C.charge < newcharge)
C.charge = newcharge
if(isobj(C.loc))
var/obj/O = C.loc
O.update_icon() //update power meters and such
batteries_recharged = 1
if(batteries_recharged)
usr << "<span class='notice'>Battery has recovered.</span>"
..()
+65 -16
View File
@@ -32,28 +32,77 @@
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
/obj/item/weapon/grown/deathnettle // -- Skie
plantname = "deathnettle"
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
/obj/item/weapon/grown/nettle //abstract type
name = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
icon_state = "deathnettle"
icon_state = "nettle"
damtype = "fire"
force = 30
throwforce = 1
w_class = 2.0
force = 15
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 5
w_class = 1
throw_speed = 1
throw_range = 3
origin_tech = "combat=3"
origin_tech = "combat=1"
attack_verb = list("stung")
New()
..()
spawn(5)
force = round((5+potency/2.5), 1)
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/pickup(mob/living/user)
if(!iscarbon(user))
return 0
var/mob/living/carbon/C = user
if(ishuman(user))
var/mob/living/carbon/human/H = C
if(H.gloves)
return 0
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/obj/item/organ/external/affecting = H.get_organ(organ)
if(affecting.take_damage(0,force))
user.UpdateDamageIcon()
else
C.take_organ_damage(0,force)
C << "<span class='userdanger'>The nettle burns your bare hand!</span>"
return 1
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(force > 0)
force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
else
usr << "All the leaves have fallen off the nettle from violent whacking."
usr.unEquip(src)
qdel(src)
/obj/item/weapon/grown/nettle/death
name = "deathnettle"
desc = "The <span class='danger'>glowing</span> \black nettle incites <span class='boldannounce'>rage</span>\black in you just from looking at it!"
icon_state = "deathnettle"
force = 30
throwforce = 15
origin_tech = "combat=3"
/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
user.Paralyse(5)
user << "<span class='userdanger'>You are stunned by the Deathnettle when you try picking it up!</span>"
/obj/item/weapon/grown/nettle/death/afterattack(mob/living/carbon/M, mob/user)
if(istype(M, /mob/living))
M << "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>"
add_logs(M, user, "attacked", src)
M.eye_blurry += force/7
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
M.drop_item()
..()
/obj/item/weapon/corncob
name = "corn cob"
+4 -1
View File
@@ -43,4 +43,7 @@
plantname = "aloe"
/obj/item/weapon/reagent_containers/food/snacks/grown/comfrey
plantname = "comfrey"
plantname = "comfrey"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowcap
plantname = "glowcap"
+2 -1
View File
@@ -42,6 +42,7 @@
set_trait(TRAIT_MATURATION, 0) // Time taken before the plant is mature.
set_trait(TRAIT_PRODUCTION, 0) // Time before harvesting can be undertaken again.
set_trait(TRAIT_TELEPORTING, 0) // Uses the bluespace tomato effect.
set_trait(TRAIT_BATTERY_RECHARGE, 0) // Used for glowcaps; recharges batteries on a user.
set_trait(TRAIT_BIOLUM, 0) // Plant is bioluminescent.
set_trait(TRAIT_ALTER_TEMP, 0) // If set, the plant will periodically alter local temp by this amount.
set_trait(TRAIT_PRODUCT_ICON, 0) // Icon to use for fruit coming from this plant.
@@ -675,7 +676,7 @@
P.values["[TRAIT_EXUDE_GASSES]"] = exude_gasses
traits_to_copy = list(TRAIT_POTENCY)
if(GENE_OUTPUT)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM,TRAIT_BATTERY_RECHARGE)
if(GENE_ATMOSPHERE)
traits_to_copy = list(TRAIT_HEAT_TOLERANCE,TRAIT_LOWKPA_TOLERANCE,TRAIT_HIGHKPA_TOLERANCE)
if(GENE_HARDINESS)
+16 -1
View File
@@ -132,6 +132,7 @@
chems = list("plantmatter" = list(1,50), "sacid" = list(0,1))
kitchen_tag = "nettle"
preset_icon = "nettle"
final_form = 0
/datum/seed/nettle/New()
..()
@@ -654,7 +655,7 @@
name = "glowshroom"
seed_name = "glowshroom"
display_name = "glowshrooms"
mutants = null
mutants = list("glowcap")
chems = list("radium" = list(1,20))
preset_icon = "glowshroom"
@@ -672,6 +673,20 @@
set_trait(TRAIT_PLANT_ICON,"mushroom7")
set_trait(TRAIT_RARITY,20)
/datum/seed/mushroom/glowshroom/glowcap
name = "glowcap"
seed_name = "glowcap"
display_name = "glowcaps"
mutants = null
preset_icon = "glowcap"
/datum/seed/mushroom/glowshroom/glowcap/New()
..()
set_trait(TRAIT_BIOLUM_COLOUR,"#8E0300")
set_trait(TRAIT_PRODUCT_COLOUR,"#C65680")
set_trait(TRAIT_PLANT_COLOUR,"#B72D68")
set_trait(TRAIT_BATTERY_RECHARGE,1)
/datum/seed/mushroom/plastic
name = "plastic"
seed_name = "plastellium"
+3
View File
@@ -179,6 +179,9 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/glowshroom
seed_type = "glowshroom"
/obj/item/seeds/glowcap
seed_type = "glowcap"
/obj/item/seeds/plumpmycelium
seed_type = "plumphelmet"
+36 -30
View File
@@ -92,39 +92,41 @@
"adminordrazine" = -5
)
var/global/list/water_reagents = list(
"water" = 1,
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"fluorine" = -0.5,
"chlorine" = -0.5,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
"fishwater" = 1,
"water" = list(1, 0),
"adminordrazine" = list(1, 0),
"milk" = list(0.9, 0),
"beer" = list(0.7, 0),
"fluorine" = list(-0.5, 0),
"chlorine" = list(-0.5, 0),
"phosphorus" = list(-0.5, 0),
"water" = list(1, 0),
"sodawater" = list(1, 0),
"fishwater" = list(1, 0),
"holywater" = list(1, 0.1),
)
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
// "reagent" = list(health, yield_Mod, mut_mod),
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"facid" = list( -2, 0, 0 ),
"atrazine" = list( -2, 0, 0.2),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.25, 0.15, 0 ),
"protein" = list( 0.25, 0.15, 0 ),
"plantmatter" = list( 0.25, 0.15, 0 ),
"radium" = list( -1.5, 0, 0.2),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2)
// "reagent" = list(health, yield_Mod, mut_mod, production, potency),
"beer" = list( -0.05, 0, 0, 0, 0),
"fluorine" = list( -2, 0, 0, 0, 0),
"chlorine" = list( -1, 0, 0, 0, 0),
"phosphorus" = list( -0.75, 0, 0, 0, 0),
"sodawater" = list( 0.1, 0, 0, 0, 0),
"sacid" = list( -1, 0, 0, 0, 0),
"facid" = list( -2, 0, 0, 0, 0),
"atrazine" = list( -2, 0, 0.2, 0, 0),
"cryoxadone" = list( 3, 0, 0, 0, 0),
"ammonia" = list( 0.5, 0, 0, 0, 0),
"diethylamine" = list( 1, 0, 0, 0, 0),
"nutriment" = list( 0.25, 0.15, 0, 0, 0),
"protein" = list( 0.25, 0.15, 0, 0, 0),
"plantmatter" = list( 0.25, 0.15, 0, 0, 0),
"radium" = list( -1.5, 0, 0.2, 0, 0),
"adminordrazine" = list( 1, 1, 1, 0, 0),
"robustharvest" = list( 0, 0.2, 0, 0, 0),
"left4zed" = list( 0, 0, 0.2, 0, 0),
"saltpetre" = list( 0.25, 0, 0, -0.02, 0.01),
)
//--FalseIncarnate
@@ -274,6 +276,9 @@
health += beneficial_reagents[R.id][1] * reagent_total
yield_mod = min(100, yield_mod + (beneficial_reagents[R.id][2] * reagent_total))
mutation_mod += beneficial_reagents[R.id][3] * reagent_total
if(seed.get_trait(TRAIT_PRODUCTION) > 1)
seed.set_trait(TRAIT_PRODUCTION, max(2, seed.get_trait(TRAIT_PRODUCTION) + beneficial_reagents[R.id][4] * reagent_total))
seed.set_trait(TRAIT_POTENCY, min(100, seed.get_trait(TRAIT_POTENCY) + beneficial_reagents[R.id][5] * reagent_total))
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
@@ -303,9 +308,10 @@
// Handle water and water refilling.
var/water_added = 0
if(water_reagents[R.id])
var/water_input = water_reagents[R.id] * reagent_total
var/water_input = water_reagents[R.id][1] * reagent_total
water_added += water_input
waterlevel += water_input
health += water_reagents[R.id][2] * reagent_total
// Water dilutes toxin level.
if(water_added > 0)
@@ -234,6 +234,9 @@
if(grown_seed.get_trait(TRAIT_PRODUCES_POWER))
dat += "<br>The fruit will function as a battery if prepared appropriately."
if(grown_seed.get_trait(TRAIT_BATTERY_RECHARGE))
dat += "<br>The fruit hums with an odd electrical energy."
if(grown_seed.get_trait(TRAIT_STINGS))
dat += "<br>The fruit is covered in stinging spines."
+3 -3
View File
@@ -114,7 +114,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
/obj/machinery/librarycomp
name = "Check-In/Out Computer"
name = "check-in/out computer"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
@@ -473,7 +473,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
qdel(O)
else
..()
/client/proc/delbook()
set name = "Delete Book"
set desc = "Permamently deletes a book from the database."
@@ -485,7 +485,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/isbn = input("ISBN number?", "Delete Book") as num | null
if(!isbn)
return
var/DBQuery/query_delbook = dbcon.NewQuery("DELETE FROM [format_table_name("library")] WHERE id=[isbn]")
if(!query_delbook.Execute())
var/err = query_delbook.ErrorMsg()
+2 -1
View File
@@ -87,7 +87,8 @@
else //No light, set the turf's luminosity to 0 to remove it from view()
T.luminosity = 0
else
warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : ""]) in update_overlay() and got qdel'ed!")
//warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!") //fucking bullshit bugs means this spams when shuttles move, feel free to fix
log_debug("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!")
qdel(src)
/atom/movable/lighting_overlay/singularity_act()
+1 -1
View File
@@ -22,4 +22,4 @@
A = T.loc
if(A.lighting_use_dynamic)
var/atom/movable/lighting_overlay/O = new(T)
T.lighting_overlay = O
T.lighting_overlay = O
+116 -27
View File
@@ -19,7 +19,7 @@
var/ore_pickup_rate = 15
var/sheet_per_ore = 1
var/point_upgrade = 1
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40))
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60))
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"))
/obj/machinery/mineral/ore_redemption/New()
@@ -79,28 +79,33 @@
qdel(O) //... garbage collect
/obj/machinery/mineral/ore_redemption/process()
if(!panel_open) //If the machine is partially dissassembled, it should not process minerals
var/turf/T = get_turf(get_step(src, input_dir))
var/i
if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals
var/turf/T = get_step(src, input_dir)
var/i = 0
if(T)
if(locate(/obj/item/weapon/ore) in T)
for (i = 0; i < ore_pickup_rate; i++)
var/obj/item/weapon/ore/O = locate() in T
if(O)
process_sheet(O)
else
for(var/obj/item/weapon/ore/O in T)
if (i >= ore_pickup_rate)
break
else if (!O || !O.refined_type)
continue
else
process_sheet(O)
i++
else
var/obj/structure/ore_box/B = locate() in T
if(B)
for(var/obj/item/weapon/ore/O in B.contents)
if (i >= ore_pickup_rate)
break
else
var/obj/structure/ore_box/B = locate() in T
if(B)
for (i = 0; i < ore_pickup_rate; i++)
var/obj/item/weapon/ore/O = locate() in B.contents
if(O)
process_sheet(O)
else
break
else if (!O || !O.refined_type)
continue
else
process_sheet(O)
i++
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
if (!powered())
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I) && !istype(inserted_id))
@@ -249,7 +254,7 @@
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
var/obj/item/stack/sheet/glassstack = stack_list[/obj/item/stack/sheet/glass]
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
var/desired = input("How much?", "How much would you like to smelt?", 1) as num
var/obj/item/stack/sheet/plasmaglass/plasglassout = new
plasglassout.amount = min(desired, 50, glassstack.amount, plasmastack.amount)
@@ -287,6 +292,17 @@
s.forceMove(loc)
s.layer = initial(s.layer)
/obj/machinery/mineral/ore_redemption/power_change()
..()
update_icon()
/obj/machinery/mineral/ore_redemption/update_icon()
if(powered())
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-off"
return
/**********************Mining Equipment Locker**************************/
/obj/machinery/mineral/equipment_vendor
@@ -304,17 +320,23 @@
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 100),
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 150),
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 200),
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 250),
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 300),
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 400),
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 500),
new /datum/data/mining_equipment("Hivelord Stabilizer", /obj/item/weapon/hivelordstabilizer, 400),
new /datum/data/mining_equipment("Mining Drone", /obj/item/weapon/mining_drone_cube, 500),
new /datum/data/mining_equipment("GAR mesons", /obj/item/clothing/glasses/meson/gar, 500),
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600),
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750),
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800),
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 1200),
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 1500),
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000),
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000),
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 2500),
new /datum/data/mining_equipment("Super Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator/super, 3000),
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
)
@@ -339,6 +361,17 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/mineral/equipment_vendor/power_change()
..()
update_icon()
/obj/machinery/mineral/equipment_vendor/update_icon()
if(powered())
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-off"
return
/obj/machinery/mineral/equipment_vendor/attack_hand(user as mob)
if(..())
return
@@ -424,8 +457,7 @@
if("Resonator")
new /obj/item/weapon/resonator(src.loc)
if("Mining Drone")
new /mob/living/simple_animal/hostile/mining_drone(src.loc)
new /obj/item/weapon/weldingtool/hugetank(src.loc)
new /obj/item/weapon/storage/box/drone_kit(src.loc)
if("Advanced Scanner")
new /obj/item/device/t_scanner/adv_mining_scanner(src.loc)
qdel(voucher)
@@ -502,7 +534,6 @@
return
var/chosen_beacon = pick(L)
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon)
J.target = chosen_beacon
try_move_adjacent(J)
playsound(src,'sound/effects/sparks4.ogg',50,1)
qdel(src)
@@ -548,6 +579,13 @@
var/burst_time = 50
var/fieldlimit = 3
/obj/item/weapon/resonator/upgraded
name = "upgraded resonator"
desc = "An upgraded version of the resonator that can produce more fields at once."
icon_state = "resonator_u"
origin_tech = "magnets=3;combat=3"
fieldlimit = 5
/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator)
var/turf/T = get_turf(target)
if(locate(/obj/effect/resonance) in T)
@@ -623,6 +661,22 @@
return
/**********************Mining drone cube**********************/
/obj/item/weapon/mining_drone_cube
name = "mining drone cube"
desc = "Compressed mining drone, ready for deployment. Just press the button to activate!"
w_class = 2.0
icon = 'icons/obj/aibots.dmi'
icon_state = "minedronecube"
item_state = "electronic"
/obj/item/weapon/mining_drone_cube/attack_self(mob/user)
user.visible_message("<span class='warning'>\The [src] suddenly expands into a fully functional mining drone!</span>", \
"<span class='warning'>You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!</span>")
new /mob/living/simple_animal/hostile/mining_drone(get_turf(src))
qdel(src)
/**********************Mining drone**********************/
/mob/living/simple_animal/hostile/mining_drone
@@ -757,6 +811,22 @@
SetOffenseBehavior()
..()
/**********************Mining drone kit**********************/
/obj/item/weapon/storage/box/drone_kit
name = "Drone Kit"
desc = "A boxed kit that includes one mining drone cube and a welding tool with an increased capacity."
icon_state = "implant"
max_w_class = 3
storage_slots = 2
can_hold = list("/obj/item/weapon/mining_drone_cube","/obj/item/weapon/weldingtool/hugetank")
/obj/item/weapon/storage/box/drone_kit/New()
..()
new /obj/item/weapon/mining_drone_cube(src)
new /obj/item/weapon/weldingtool/hugetank(src)
/**********************Lazarus Injector**********************/
/obj/item/weapon/lazarus_injector
@@ -904,3 +974,22 @@
volume = 40
throw_range = 7
w_class = 3 //same as syndie harness
/*********************Hivelord stabilizer****************/
/obj/item/weapon/hivelordstabilizer
name = "hivelord stabilizer"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely."
w_class = 1
origin_tech = "biotech=1"
/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/M, mob/user)
var/obj/item/asteroid/hivelord_core/C = M
if(!istype(C, /obj/item/asteroid/hivelord_core))
user << "<span class='warning'>The stabilizer only works on hivelord cores.</span>"
return ..()
C.preserved = 1
user << "<span class='notice'>You inject the hivelord core with the stabilizer. It will no longer go inert.</span>"
qdel(src)
+18 -127
View File
@@ -1,136 +1,27 @@
var/labor_shuttle_tickstomove = 10
var/labor_shuttle_moving = 0
var/labor_shuttle_location = 0 // 0 = station 13, 1 = labor station
proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle to the station to the release button.
if(labor_shuttle_moving) return
labor_shuttle_moving = 1
spawn(labor_shuttle_tickstomove*10)
var/area/fromArea
var/area/toArea
if (labor_shuttle_location == 1)
fromArea = locate(/area/shuttle/siberia/outpost)
toArea = locate(/area/shuttle/siberia/station)
else
fromArea = locate(/area/shuttle/siberia/station)
toArea = locate(/area/shuttle/siberia/outpost)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in toArea)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
// NOTE: Commenting this out to avoid recreating mass driver glitch
/*
spawn(0)
AM.throw_at(E, 1, 1)
return
*/
if(istype(T, /turf/simulated))
qdel(T)
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
fromArea.move_contents_to(toArea)
if (labor_shuttle_location)
labor_shuttle_location = 0
else
labor_shuttle_location = 1
for(var/mob/M in toArea)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 3, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(3)
labor_shuttle_moving = 0
return
/obj/machinery/computer/labor_shuttle
name = "Labor Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
/obj/machinery/computer/shuttle/labor
name = "labor shuttle console"
desc = "Used to call and send the labor camp shuttle."
circuit = /obj/item/weapon/circuitboard/labor_shuttle
var/location = 0 //0 = station, 1 = labor camp
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(access_brig)
var/hacked = 0
/obj/machinery/computer/labor_shuttle/attack_hand(user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat
dat = text("<center><A href='?src=\ref[src];move=[1]'>Send Labor Shuttle</A></center>")
//user << browse("[dat]", "window=laborshuttle;size=200x100")
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/labor_shuttle/Topic(href, href_list)
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["move"])
if(!allowed(usr))
usr << "\red Access denied."
return
if (!labor_shuttle_moving)
usr << "\blue Shuttle recieved message and will be sent shortly."
move_labor_shuttle()
else
usr << "\blue Shuttle is already moving."
/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/emag))
src.req_access = list()
hacked = 1
usr << "You fried the consoles ID checking system. It's now available to everyone!"
else
..()
/obj/machinery/computer/labor_shuttle/one_way
name = "Prisoner Shuttle Console"
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
possible_destinations = "laborcamp_away"
circuit = /obj/item/weapon/circuitboard/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/labor_shuttle/one_way/attack_hand(user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat
dat = text("<center><A href='?src=\ref[src];move=[1]'>Summon Labor Shuttle</A></center>")
//user << browse("[dat]", "window=laborshuttle;size=200x100")
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/labor_shuttle/one_way/Topic(href, href_list)
if(href_list["move"] && labor_shuttle_location == 1)
usr << "\blue Shuttle is already at the outpost."
return
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/obj/docking_port/mobile/M = shuttle_master.getShuttle("laborcamp")
if(!M)
usr << "<span class='warning'>Cannot locate shuttle!</span>"
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
usr << "<span class='warning'>Shuttle is already at the outpost!</span>"
return 0
..()
+10 -9
View File
@@ -77,7 +77,6 @@
/obj/machinery/mineral/labor_claim_console/Topic(href, href_list)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles["Labor"]
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["choice"])
@@ -102,20 +101,22 @@
if(!alone_in_area(get_area(src), usr))
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
else
if(shuttle.location == 1)
if (shuttle.moving_status == SHUTTLE_IDLE)
switch(shuttle_master.moveShuttle("laborcamp","laborcamp_home"))
if(1)
usr << "<span class='notice'>Shuttle not found</span>"
if(2)
usr << "<span class='notice'>Shuttle already at station</span>"
if(3)
usr << "<span class='notice'>No permission to dock could be granted.</span>"
else
var/message = "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval."
announcer.autosay(message, "Labor Camp Controller", "Security")
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
shuttle.launch()
else
usr << "<span class='notice'>Shuttle is already moving.</span>"
else
usr << "<span class='notice'>Shuttle is already on-station.</span>"
if(href_list["choice"] == "release")
if(alone_in_area(get_area(loc), usr))
if(shuttle.location == 1)
var/obj/docking_port/stationary/S = shuttle_master.getDock("laborcamp_home")
if(S && S.get_docked())
if(release_door && release_door.density)
release_door.open()
else
+17 -1
View File
@@ -37,6 +37,14 @@
new /obj/item/weapon/pickaxe(src)
new /obj/item/clothing/glasses/meson(src)
/**********************Shuttle Computer**************************/
/obj/machinery/computer/shuttle/mining
name = "Mining Shuttle Console"
desc = "Used to call and send the mining shuttle."
circuit = /obj/item/weapon/circuitboard/mining_shuttle
shuttleId = "mining"
possible_destinations = "mining_home;mining_away"
/******************************Lantern*******************************/
@@ -71,6 +79,14 @@
/obj/item/weapon/pickaxe/proc/playDigSound()
playsound(src, pick(digsound),20,1)
/obj/item/weapon/pickaxe/silver
name = "silver-plated pickaxe"
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30 //mines faster than a normal pickaxe, bought from mining vendor
origin_tech = "materials=3;engineering=2"
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
/obj/item/weapon/pickaxe/diamond
name = "diamond-tipped pickaxe"
icon_state = "dpickaxe"
@@ -169,7 +185,7 @@
/obj/structure/closet/crate/miningcar
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
name = "Mining car (not for rails)"
name = "mining car (not for rails)"
icon = 'icons/obj/storage.dmi'
icon_state = "miningcar"
density = 1
+3 -1
View File
@@ -89,6 +89,7 @@ var/global/list/rockTurfEdgeCache
/turf/simulated/mineral/proc/HideRock()
if(hidden)
name = "rock"
icon_state = "rock"
return
@@ -135,6 +136,7 @@ var/global/list/rockTurfEdgeCache
if("BScrystal")
M = new/turf/simulated/mineral/bscrystal(src)
if(M)
M.mineralAmt = rand(1, 5)
src = M
M.levelupdate()
return
@@ -240,7 +242,7 @@ var/global/list/rockTurfEdgeCache
/turf/simulated/mineral/bscrystal
name = "bluespace crystal deposit"
icon_state = "rock_BScrystal"
mineralType = /obj/item/bluespace_crystal
mineralType = /obj/item/weapon/ore/bluespace_crystal
mineralName = "Bluespace crystal"
mineralAmt = 1
spreadChance = 0
+6 -6
View File
@@ -9,7 +9,7 @@
/obj/item/weapon/ore/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(15))
if(W.remove_fuel(15) && refined_type)
new refined_type(get_turf(src.loc))
qdel(src)
else if(W.isOn())
@@ -20,7 +20,7 @@
name = "uranium ore"
icon_state = "Uranium ore"
origin_tech = "materials=5"
points = 18
points = 30
refined_type = /obj/item/stack/sheet/mineral/uranium
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
@@ -63,7 +63,7 @@
name = "plasma ore"
icon_state = "Plasma ore"
origin_tech = "plasmatech=2;materials=2"
points = 36
points = 15
refined_type = /obj/item/stack/sheet/mineral/plasma
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
@@ -79,7 +79,7 @@
name = "silver ore"
icon_state = "Silver ore"
origin_tech = "materials=3"
points = 18
points = 16
refined_type = /obj/item/stack/sheet/mineral/silver
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
@@ -95,7 +95,7 @@
name = "diamond ore"
icon_state = "Diamond ore"
origin_tech = "materials=6"
points = 36
points = 50
refined_type = /obj/item/stack/sheet/mineral/diamond
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
@@ -103,7 +103,7 @@
name = "bananium ore"
icon_state = "Clown ore"
origin_tech = "materials=4"
points = 27
points = 60
refined_type = /obj/item/stack/sheet/mineral/bananium
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
+5
View File
@@ -31,6 +31,7 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_bluespace = 0
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
@@ -49,6 +50,8 @@
amt_uranium++;
if (istype(C,/obj/item/weapon/ore/bananium))
amt_clown++;
if (istype(C,/obj/item/weapon/ore/bluespace_crystal))
amt_bluespace++
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
@@ -67,6 +70,8 @@
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_bluespace)
dat += text("Bluespace crystals: [amt_bluespace]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
+35 -48
View File
@@ -23,12 +23,12 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
universal_speak = 1
var/atom/movable/following = null
var/medHUD = 0
var/secHUD = 0
var/anonsay = 0
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
var/ghostvision = 1 //is the ghost able to see things humans can't?
var/seedarkness = 1
var/data_hud_seen = 0 //this should one of the defines in __DEFINES/hud.dm
var/medhud = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -111,45 +111,28 @@ Works together with spawning an observer, noted above.
if(!loc) return
if(!client) return 0
regular_hud_updates()
if(client.images.len)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images.Remove(hud)
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src, 14))
if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
target_list += target
if(target_list.len)
assess_targets(target_list, src)
if(medHUD)
process_medHUD(src)
if(secHUD)
process_secHUD(src)
//regular_hud_updates()
//if(client.images.len)
// for(var/image/hud in client.images)
// if(copytext(hud.icon_state,1,4) == "hud")
// client.images.Remove(hud)
//if(antagHUD)
// var/list/target_list = list()
// for(var/mob/living/target in oview(src, 14))
// if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
// target_list += target
// if(target_list.len)
// assess_targets(target_list, src)
/mob/dead/proc/process_medHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/patient in oview(M, 14))
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD_OOC]
/mob/dead/proc/process_secHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/target in oview(M, 14))
C.images += target.hud_list[IMPTRACK_HUD]
C.images += target.hud_list[IMPLOYAL_HUD]
C.images += target.hud_list[IMPCHEM_HUD]
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
C.images += target.hud_list[NATIONS_HUD]
//C.images += target.hud_list[NATIONS_HUD]
for(var/mob/living/silicon/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
C.images += target.hud_list[NATIONS_HUD]
//C.images += target.hud_list[NATIONS_HUD]
return 1
@@ -236,10 +219,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//world << "DEBUG: malf mode ticker test"
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
@@ -270,18 +253,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 1
/mob/dead/observer/verb/toggle_medHUD()
set category = "Ghost"
set name = "Toggle MedicHUD"
set desc = "Toggles the medical HUD."
if(!client)
return
if(medHUD)
medHUD = 0
src << "\blue <B>Medical HUD Disabled</B>"
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_BASIC]
H.remove_hud_from(src)//out with the old..
if(medhud==0)//TOGGLE!
medhud = 1
H.add_hud_to(src)
else
medHUD = 1
src << "\blue <B>Medical HUD Enabled</B>"
medhud = 0
/mob/dead/observer/verb/toggle_antagHUD()
set category = "Ghost"
@@ -304,12 +290,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
respawnable_list -= M
if(!M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0))
M.has_enabled_antagHUD = 1
if(M.antagHUD)
M.antagHUD = 0
src << "\blue <B>AntagHUD Disabled</B>"
else
M.antagHUD = 1
src << "\blue <B>AntagHUD Enabled</B>"
var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED]
var/adding_hud = (usr in A.hudusers) ? 0 : 1
for(var/datum/atom_hud/H in huds)
if(istype(H, /datum/atom_hud/antag) || istype(H, /datum/atom_hud/data/human/security/advanced))
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
set category = "Ghost"
+19
View File
@@ -34,6 +34,25 @@
for(var/mob/living/M in contents)
M.show_message(message,m_type)
/obj/item/weapon/holder/container_resist(var/mob/living/L)
var/mob/M = src.loc //Get our mob holder (if any).
if(istype(M))
M.unEquip(src)
M << "[src] wriggles out of your grip!"
src << "You wriggle out of [M]'s grip!"
else if(istype(src.loc,/obj/item))
src << "You struggle free of [src.loc]."
src.forceMove(get_turf(src))
if(istype(M))
for(var/atom/A in M.contents)
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
return
M.status_flags &= ~PASSEMOTES
return
//Mob procs and vars for scooping up
/mob/living/var/holder_type
+31 -4
View File
@@ -181,10 +181,10 @@
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/living/carbon/alien/Stun(amount)
if(status_flags & CANSTUN)
@@ -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
@@ -14,6 +14,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(istype(loc, /mob/living))
affected_mob = loc
affected_mob.status_flags |= XENO_HOST
if(istype(affected_mob,/mob/living/carbon))
var/mob/living/carbon/H = affected_mob
H.med_hud_set_status()
processing_objects.Add(src)
spawn(0)
AddInfectionImages(affected_mob)
@@ -23,6 +26,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
/obj/item/alien_embryo/Destroy()
if(affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
if(istype(affected_mob,/mob/living/carbon))
var/mob/living/carbon/H = affected_mob
H.med_hud_set_status()
spawn(0)
RemoveInfectionImages(affected_mob)
return ..()
@@ -31,6 +37,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(!affected_mob) return
if(loc != affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
if(istype(affected_mob,/mob/living/carbon))
var/mob/living/carbon/H = affected_mob
H.med_hud_set_status()
processing_objects.Remove(src)
spawn(0)
RemoveInfectionImages(affected_mob)
+4 -14
View File
@@ -12,8 +12,9 @@
var/alien = 0
var/syndiemmi = 0 //Whether or not this is a Syndicate MMI
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/mob/living/silicon/robot = null//Appears unused.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
var/mob/living/silicon/robot/robot = null//Appears unused.
var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm.
// I'm using this for mechs giving MMIs HUDs now
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/organ/brain/crystal ))
@@ -54,6 +55,7 @@
if(brainmob)
O.attack(brainmob, user)//Oh noooeeeee
// Brainmobs can take damage, but they can't actually die. Maybe should fix.
return
..()
@@ -110,18 +112,6 @@
radio.broadcasting = 1//So it's broadcasting from the start.
verb//Allows the brain to toggle the radio functions.
Toggle_Broadcasting()
set name = "Toggle Broadcasting"
set desc = "Toggle broadcasting channel on or off."
set category = "MMI"
set src = usr.loc//In user location, or in MMI in this case.
set popup_menu = 0//Will not appear when right clicking.
if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
brainmob << "Can't do that while incapacitated or dead."
radio.broadcasting = radio.broadcasting==1 ? 0 : 1
brainmob << "\blue Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting."
Toggle_Listening()
set name = "Toggle Listening"
+28 -3
View File
@@ -54,7 +54,7 @@
if(in_contents_of(/obj/mecha))
canmove = 1
use_me = 1 //If it can move, let it emote
if(istype(loc, /obj/item/device/mmi)) canmove = 1 //mmi won't move anyways so whatever
else if(istype(loc, /obj/item/device/mmi)) canmove = 1 //mmi won't move anyways so whatever
else canmove = 0
return canmove
@@ -64,10 +64,35 @@
/mob/living/carbon/brain/blob_act()
return
/mob/living/carbon/brain/on_forcemove(atom/newloc)
if(container)
container.loc = newloc
else //something went very wrong.
CRASH("Brainmob without container.")
loc = container
loc = container
/*
This will return true if the brain has a container that leaves it less helpless than a naked brain
I'm using this for Stat to give it a more nifty interface to work with
*/
/mob/living/carbon/brain/proc/has_synthetic_assistance()
return (container && istype(container, /obj/item/device/mmi)) || in_contents_of(/obj/mecha)
/mob/living/carbon/brain/Stat()
..()
if(has_synthetic_assistance())
statpanel("Status")
stat(null, "Station Time: [worldtime2text()]")
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
if(client.statpanel == "Status")
//Knowing how well-off your mech is doing is really important as an MMI
if(istype(src.loc, /obj/mecha))
var/obj/mecha/M = src.loc
stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]")
stat("Exosuit Integrity", "[!M.health ? "0" : "[(M.health / initial(M.health)) * 100]"]%")
@@ -93,5 +93,4 @@
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
handle_hud_icons_health()
@@ -72,9 +72,7 @@
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
src.searching = 0
src.brainmob.mind = candidate.mind
//src.brainmob.key = candidate.key
src.brainmob.ckey = candidate.ckey
src.brainmob.key = candidate.key
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
+24 -15
View File
@@ -12,26 +12,35 @@
else
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
if(istype(container, /obj/item/device/mmi/radio_enabled))
var/radio_MMI_message = message //split off so the MMI can get a trimmed message without fucking up living/say()
if(!speaking)
speaking = parse_language(message)
if(speaking)
radio_MMI_message = copytext(message, 2 + length(speaking.key))
else
speaking = get_default_language()
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
spawn(0) R.radio.hear_talk(src, trim(sanitize(radio_MMI_message)), say_quote(radio_MMI_message), speaking)
..(message)
/mob/living/carbon/brain/can_speak(var/datum/language/speaking)
if(speaking == all_languages["Robot Talk"] && istype(loc, /obj/item/device/mmi/posibrain)) //so posibrains can speak binary; less messy than adding the language
if(speaking == all_languages["Robot Talk"] && (container && istype(container, /obj/item/device/mmi/posibrain))) //so posibrains can speak binary; less messy than adding the language
return 1
else return ..()
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
return (container && istype(container, /obj/item/device/mmi/posibrain))
/mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
switch(message_mode)
if("headset")
var/radio_worked = 0 // If any of the radios our brainmob could use functioned, this is set true so that we don't use any others
// I'm doing it this way so that if the mecha radio fails for some reason, a radio MMI still has the built-in fallback
if (container && istype(container,/obj/item/device/mmi))
var/obj/item/device/mmi/c = container
if (!radio_worked && c.mecha)
var/obj/mecha/metalgear = c.mecha
if(metalgear.radio)
radio_worked = metalgear.radio.talk_into(src, message, message_mode, verb, speaking)
else if(!radio_worked && istype(c, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = c
if(R.radio)
radio_worked = R.radio.talk_into(src, message, message_mode, verb, speaking)
return radio_worked
if ("whisper")
whisper_say(message, speaking, alt_name)
return 1
else return 0
+14
View File
@@ -7,6 +7,20 @@ mob/living
update_hud()
return
/mob/living/carbon/prepare_huds()
..()
prepare_data_huds()
/mob/living/carbon/proc/prepare_data_huds()
..()
med_hud_set_health()
med_hud_set_status()
/mob/living/carbon/updatehealth()
..()
med_hud_set_health()
med_hud_set_status()
/mob/living/carbon/Destroy()
for(var/atom/movable/guts in internal_organs)
qdel(guts)
@@ -1,5 +1,6 @@
/mob/living/carbon/
gender = MALE
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/list/datum/disease2/disease/virus2 = list()
+5
View File
@@ -0,0 +1,5 @@
/mob/living/carbon/death(gibbed)
losebreath = 0
med_hud_set_health()
med_hud_set_status()
..(gibbed)
@@ -15,7 +15,7 @@
for(var/obj/item/organ/I in internal_organs)
if(istype(loc,/turf))
I.removed(src)
I.removed()
spawn()
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
@@ -91,11 +91,6 @@
dizziness = 0
jitteriness = 0
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
handle_hud_list()
//Handle species-specific deaths.
if(species) species.handle_death(src)
@@ -135,6 +130,8 @@
if(client) blind.layer = 0
timeofdeath = worldtime2text()
med_hud_set_health()
med_hud_set_status()
if(mind) mind.store_memory("Time of death: [timeofdeath]", 0)
if(ticker && ticker.mode)
// log_to_dd("k")
+20 -22
View File
@@ -64,62 +64,60 @@
tie_msg += " with [english_accessory_list(U)]"
if(w_uniform.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][tie_msg]!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [w_uniform.blood_color != "#030303" ? "blood-stained":"oil-stained"] [w_uniform.name][tie_msg]!</span>\n"
else
msg += "[t_He] [t_is] wearing \icon[w_uniform] \a [w_uniform][tie_msg].\n"
//head
if(head)
if(head.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[head] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[head] [head.gender==PLURAL?"some":"a"] [head.blood_color != "#030303" ? "blood-stained":"oil-stained"] [head.name] on [t_his] head!</span>\n"
else
msg += "[t_He] [t_is] wearing \icon[head] \a [head] on [t_his] head.\n"
//suit/armour
if(wear_suit)
if(wear_suit.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_suit] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_suit] [wear_suit.gender==PLURAL?"some":"a"] [wear_suit.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_suit.name]!</span>\n"
else
msg += "[t_He] [t_is] wearing \icon[wear_suit] \a [wear_suit].\n"
//suit/armour storage
if(s_store && !skipsuitstorage)
if(s_store.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[s_store] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[s_store] [s_store.gender==PLURAL?"some":"a"] [s_store.blood_color != "#030303" ? "blood-stained":"oil-stained"] [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
else
msg += "[t_He] [t_is] carrying \icon[s_store] \a [s_store] on [t_his] [wear_suit.name].\n"
//back
if(back)
if(back.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] \icon[back] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
msg += "<span class='warning'>[t_He] [t_has] \icon[back] [back.gender==PLURAL?"some":"a"] [back.blood_color != "#030303" ? "blood-stained":"oil-stained"] [back] on [t_his] back.</span>\n"
else
msg += "[t_He] [t_has] \icon[back] \a [back] on [t_his] back.\n"
//left hand
if(l_hand && !(l_hand.flags & ABSTRACT))
if(l_hand.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in [t_his] left hand!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] [l_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [l_hand.name] in [t_his] left hand!</span>\n"
else
msg += "[t_He] [t_is] holding \icon[l_hand] \a [l_hand] in [t_his] left hand.\n"
//right hand
if(r_hand && !(r_hand.flags & ABSTRACT))
if(r_hand.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in [t_his] right hand!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] [r_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [r_hand.name] in [t_his] right hand!</span>\n"
else
msg += "[t_He] [t_is] holding \icon[r_hand] \a [r_hand] in [t_his] right hand.\n"
//gloves
if(gloves && !skipgloves)
if(gloves.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] \icon[gloves] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] \icon[gloves] [gloves.gender==PLURAL?"some":"a"] [gloves.blood_color != "#030303" ? "blood-stained":"oil-stained"] [gloves.name] on [t_his] hands!</span>\n"
else
msg += "[t_He] [t_has] \icon[gloves] \a [gloves] on [t_his] hands.\n"
else if(blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained hands!</span>\n"
//handcuffed?
msg += "<span class='warning'>[t_He] [t_has] [hand_blood_color != "#030303" ? "blood-stained":"oil-stained"] hands!</span>\n"
//handcuffed?
if(handcuffed)
@@ -133,28 +131,31 @@
//belt
if(belt)
if(belt.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] \icon[belt] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] \icon[belt] [belt.gender==PLURAL?"some":"a"] [belt.blood_color != "#030303" ? "blood-stained":"oil-stained"] [belt.name] about [t_his] waist!</span>\n"
else
msg += "[t_He] [t_has] \icon[belt] \a [belt] about [t_his] waist.\n"
//shoes
if(shoes && !skipshoes)
if(shoes.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[shoes] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[shoes] [shoes.gender==PLURAL?"some":"a"] [shoes.blood_color != "#030303" ? "blood-stained":"oil-stained"] [shoes.name] on [t_his] feet!</span>\n"
else
msg += "[t_He] [t_is] wearing \icon[shoes] \a [shoes] on [t_his] feet.\n"
else if (blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [feet_blood_color != "#030303" ? "blood-stained":"oil-stained"] feet!</span>\n"
//mask
if(wear_mask && !skipmask)
if(wear_mask.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] [wear_mask.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_mask.name] on [t_his] face!</span>\n"
else
msg += "[t_He] [t_has] \icon[wear_mask] \a [wear_mask] on [t_his] face.\n"
//eyes
if(glasses && !skipeyes)
if(glasses.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] \icon[glasses] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] \icon[glasses] [glasses.gender==PLURAL?"some":"a"] [glasses.blood_color != "#030303" ? "blood-stained":"oil-stained"] [glasses] covering [t_his] eyes!</span>\n"
else
msg += "[t_He] [t_has] \icon[glasses] \a [glasses] covering [t_his] eyes.\n"
@@ -485,20 +486,17 @@
var/mob/living/carbon/human/H = M
switch(hudtype)
if("security")
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud)
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses)
if("medical")
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health_advanced)
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health/health_advanced)
else
return 0
else if(istype(M, /mob/living/silicon))
var/mob/living/silicon/R = M
switch(hudtype)
if("security")
if(R.sensor_mode == 1)
return 1
return 1
if("medical")
if(R.sensor_mode == 2)
return 1
return 1
else
return 0
else
+24 -26
View File
@@ -6,7 +6,7 @@
icon_state = "body_m_s"
//why are these here and not in human_defines.dm
var/list/hud_list[10]
//var/list/hud_list[10]
var/datum/species/species //Contains icon generation and language information, set during New().
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
@@ -29,17 +29,6 @@
reagents = R
R.my_atom = src
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown")
hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
..()
prev_gender = gender // Debug for plural genders
@@ -55,6 +44,16 @@
sync_organ_dna() //this shouldn't be necessaaaarrrryyyyyyyy
UpdateAppearance()
/mob/living/carbon/human/prepare_data_huds()
//Update med hud images...
..()
//...sec hud images...
sec_hud_set_ID()
sec_hud_set_implants()
sec_hud_set_security_status()
//...and display them.
add_to_all_human_data_huds()
/mob/living/carbon/human/Destroy()
for(var/atom/movable/organelle in organs)
qdel(organelle)
@@ -251,10 +250,10 @@
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
if(client.statpanel == "Status")
if(locate(/obj/item/device/assembly/health) in src)
@@ -858,13 +857,12 @@
modified = 1
spawn()
hud_updateflag |= 1 << WANTED_HUD
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
//var/mob/living/carbon/human/U = usr
sec_hud_set_security_status()
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
U.handle_regular_hud_updates()
//var/mob/living/silicon/robot/U = usr
sec_hud_set_security_status()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
@@ -990,11 +988,11 @@
spawn()
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
//var/mob/living/carbon/human/U = usr
sec_hud_set_security_status()
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
U.handle_regular_hud_updates()
//var/mob/living/silicon/robot/U = usr
sec_hud_set_security_status()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
@@ -1583,7 +1581,7 @@
src << "<span class='warning'>You ran out of blood to write with!</span>"
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
W.message = message
W.add_fingerprint(src)
// Allows IPC's to change their monitor display
@@ -24,6 +24,8 @@
update_revive()
if(stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
update_revive()
med_hud_set_health()
med_hud_set_status()
/mob/living/carbon/human/adjustBrainLoss(var/amount)
if(status_flags & GODMODE)
@@ -88,7 +90,6 @@
take_overall_damage(amount, 0)
else
heal_overall_damage(-amount, 0)
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/adjustFireLoss(var/amount)
if(species && species.burn_mod)
@@ -97,7 +98,6 @@
take_overall_damage(0, amount)
else
heal_overall_damage(0, -amount)
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/proc/adjustBruteLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
if(species && species.brute_mod)
@@ -112,7 +112,6 @@
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
if(species && species.burn_mod)
@@ -127,7 +126,6 @@
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/Stun(amount)
..()
@@ -181,7 +179,6 @@
O.unmutate()
src << "<span class='notice'>Your [O.name] is shaped normally again.</span>"
hud_updateflag |= 1 << HEALTH_HUD //what even is this shit
// Defined here solely to take species flags into account without having to recast at mob/living level.
/mob/living/carbon/human/getOxyLoss()
@@ -246,7 +243,6 @@
var/obj/item/organ/external/picked = pick(parts)
if(picked.heal_damage(brute,burn))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
updatehealth()
//Damages ONE external organ, organ gets randomly selected from damagable ones.
@@ -259,7 +255,6 @@
var/obj/item/organ/external/picked = pick(parts)
if(picked.take_damage(brute,burn,sharp,edge))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
updatehealth()
speech_problem_flag = 1
@@ -283,7 +278,6 @@
parts -= picked
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
speech_problem_flag = 1
if(update)
UpdateDamageIcon()
@@ -308,7 +302,6 @@
parts -= picked
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
if(update)
UpdateDamageIcon()
@@ -335,7 +328,6 @@ This function restores all organs.
if(istype(E, /obj/item/organ/external))
if(E.heal_damage(brute, burn))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
else
return 0
@@ -409,5 +401,4 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
return 1
@@ -1,4 +1,6 @@
/mob/living/carbon/human
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Hair colour and style
var/r_hair = 0
var/g_hair = 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
@@ -89,7 +89,7 @@
stance_damage = 0
// standing is poor
if(stance_damage >= 4)
if(stance_damage >= 8)
if(!(lying || resting))
if(species && !(species.flags & NO_PAIN))
emote("scream")
@@ -150,3 +150,14 @@
var/list/all_bits = internal_organs|organs
for(var/obj/item/organ/O in all_bits)
O.set_dna(dna)
/*
Given the name of an organ, returns the external organ it's contained in
I use this to standardize shadowling dethrall code
-- Crazylemon
*/
/mob/living/carbon/human/proc/named_organ_parent(var/organ_name)
if (!(organ_name in internal_organs_by_name))
return null
var/obj/item/organ/O = internal_organs_by_name[organ_name]
return O.parent_organ
@@ -164,9 +164,11 @@
if(internals)
internals.icon_state = "internal0"
internal = null
sec_hud_set_ID()
update_inv_wear_mask()
else if(I == wear_id)
wear_id = null
sec_hud_set_ID()
update_inv_wear_id()
else if(I == wear_pda)
wear_pda = null
@@ -220,6 +222,7 @@
wear_mask = W
if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR))
update_hair(redraw_mob) //rebuild hair
sec_hud_set_ID()
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
handcuffed = W
@@ -238,6 +241,7 @@
update_inv_belt(redraw_mob)
if(slot_wear_id)
wear_id = W
sec_hud_set_ID()
update_inv_wear_id(redraw_mob)
if(slot_wear_pda)
wear_pda = W
+3 -188
View File
@@ -51,8 +51,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
loc_as_cryobag.used++
in_stasis = 1
if(mob_master.current_cycle % 30 == 15)
hud_updateflag = 1022
//if(mob_master.current_cycle % 30 == 15)
//hud_updateflag = 1022
//HudRefactor:WTF do i put here....
voice = GetVoice()
@@ -990,15 +991,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
/mob/living/carbon/human/handle_hud_icons()
species.handle_hud_icons(src)
/mob/living/carbon/human/handle_regular_hud_updates()
if(hud_updateflag)
handle_hud_list()
if(..())
if(hud_updateflag)
handle_hud_list()
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
if(!stat)
@@ -1260,183 +1252,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
*/
/mob/living/carbon/human/proc/handle_hud_list()
if(hud_updateflag & 1 << HEALTH_HUD)
var/image/holder = hud_list[HEALTH_HUD]
if(stat == 2)
holder.icon_state = "hudhealth-100" // X_X
else
holder.icon_state = "hud[RoundHealth(health)]"
hud_list[HEALTH_HUD] = holder
if(hud_updateflag & 1 << STATUS_HUD)
var/foundVirus = 0
for (var/ID in virus2)
if (ID in virusDB)
foundVirus = 1
break
var/image/holder = hud_list[STATUS_HUD]
var/image/holder2 = hud_list[STATUS_HUD_OOC]
if(stat == 2)
holder.icon_state = "huddead"
holder2.icon_state = "huddead"
else if(status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
holder2.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(has_brain_worms())
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
holder2.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
if(virus2.len)
holder2.icon_state = "hudill"
else
holder2.icon_state = "hudhealthy"
hud_list[STATUS_HUD] = holder
hud_list[STATUS_HUD_OOC] = holder2
if(hud_updateflag & 1 << ID_HUD)
var/image/holder = hud_list[ID_HUD]
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
holder.icon_state = "hud[ckey(I.GetJobName())]"
else
holder.icon_state = "hudunknown"
else
holder.icon_state = "hudunknown"
hud_list[ID_HUD] = holder
if(hud_updateflag & 1 << WANTED_HUD)
var/image/holder = hud_list[WANTED_HUD]
holder.icon_state = "hudblank"
var/perpname = name
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
holder.icon_state = "hudwanted"
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
holder.icon_state = "hudprisoner"
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
holder.icon_state = "hudparolled"
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
holder.icon_state = "hudreleased"
break
hud_list[WANTED_HUD] = holder
if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD)
var/image/holder1 = hud_list[IMPTRACK_HUD]
var/image/holder2 = hud_list[IMPLOYAL_HUD]
var/image/holder3 = hud_list[IMPCHEM_HUD]
holder1.icon_state = "hudblank"
holder2.icon_state = "hudblank"
holder3.icon_state = "hudblank"
for(var/obj/item/weapon/implant/I in src)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/tracking))
holder1.icon_state = "hud_imp_tracking"
if(istype(I,/obj/item/weapon/implant/loyalty))
holder2.icon_state = "hud_imp_loyal"
if(istype(I,/obj/item/weapon/implant/chem))
holder3.icon_state = "hud_imp_chem"
hud_list[IMPTRACK_HUD] = holder1
hud_list[IMPLOYAL_HUD] = holder2
hud_list[IMPCHEM_HUD] = holder3
if(hud_updateflag & 1 << SPECIALROLE_HUD)
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
if(mind)
switch(mind.special_role)
if("traitor","Syndicate")
holder.icon_state = "hudsyndicate"
if("Revolutionary")
holder.icon_state = "hudrevolutionary"
if("Head Revolutionary")
holder.icon_state = "hudheadrevolutionary"
if("Cultist")
holder.icon_state = "hudcultist"
if("Changeling")
holder.icon_state = "hudchangeling"
if("Wizard","Fake Wizard")
holder.icon_state = "hudwizard"
if("Death Commando")
holder.icon_state = "huddeathsquad"
if("Ninja")
holder.icon_state = "hudninja"
if("Vampire") // TODO: Check this
holder.icon_state = "hudvampire"
if("VampThrall")
holder.icon_state = "hudvampthrall"
if("head_loyalist")
holder.icon_state = "loyalist"
if("loyalist")
holder.icon_state = "loyalist"
if("head_mutineer")
holder.icon_state = "mutineer"
if("mutineer")
holder.icon_state = "mutineer"
if("Shadowling")
holder.icon_state = "hudshadowling"
if("shadowling thrall")
holder.icon_state = "hudshadowlingthrall"
hud_list[SPECIALROLE_HUD] = holder
if(hud_updateflag & 1 << NATIONS_HUD)
var/image/holder = hud_list[NATIONS_HUD]
holder.icon_state = "hudblank"
if(mind && mind.nation)
switch(mind.nation.default_name)
if("Atmosia")
holder.icon_state = "hudatmosia"
if("Brigston")
holder.icon_state = "hudbrigston"
if("Cargonia")
holder.icon_state = "hudcargonia"
if("People's Republic of Commandzakstan")
holder.icon_state = "hudcommand"
if("Servicion")
holder.icon_state = "hudservice"
if("Medistan")
holder.icon_state = "hudmedistan"
if("Scientopia")
holder.icon_state = "hudscientopia"
hud_list[NATIONS_HUD] = holder
hud_updateflag = 0
/mob/living/carbon/human/handle_silent()
if(..())
speech_problem_flag = 1
@@ -5,6 +5,4 @@
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
update_pipe_vision()
update_hud()
if(ticker && ticker.mode)
ticker.mode.update_all_synd_icons() //This proc only sounds CPU-expensive on paper. It is O(n^2), but the outer for-loop only iterates through syndicates, which are only prsenet in nuke rounds and even when they exist, there's usually 6 of them.
return
@@ -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.
@@ -62,7 +63,7 @@
var/flags = 0 // Various specific features.
var/clothing_flags = 0 // Underwear and socks.
var/bloodflags = 0
var/exotic_blood
var/bodyflags = 0
var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods
@@ -422,13 +423,13 @@
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
switch(G.HUDType)
if(SECHUD)
process_sec_hud(H,1)
if(MEDHUD)
process_med_hud(H,1)
if(ANTAGHUD)
process_antag_hud(H)
//switch(G.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.head)
if(istype(H.head, /obj/item/clothing/head))
@@ -438,13 +439,13 @@
if(!hat.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
switch(hat.HUDType)
if(SECHUD)
process_sec_hud(H,1)
if(MEDHUD)
process_med_hud(H,1)
if(ANTAGHUD)
process_antag_hud(H)
//switch(hat.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
var/obj/item/weapon/rig/rig = H.back
@@ -460,13 +461,13 @@
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
switch(G.HUDType)
if(SECHUD)
process_sec_hud(H,1)
if(MEDHUD)
process_med_hud(H,1)
if(ANTAGHUD)
process_antag_hud(H)
//switch(G.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
@@ -591,4 +592,4 @@
else
H.bodytemp.icon_state = "temp0"
return 1
return 1
@@ -319,10 +319,10 @@
flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN
clothing_flags = HAS_SOCKS
bodyflags = HAS_SKIN_COLOR
bloodflags = BLOOD_SLIME
bodyflags = HAS_SKIN_COLOR | NO_EYES
dietflags = DIET_CARN
reagent_tag = PROCESS_ORG
exotic_blood = "water"
//ventcrawler = 1 //ventcrawling commented out
has_organ = list(
@@ -571,9 +571,6 @@ var/global/list/damage_icon_parts = list()
else
overlays_standing[ID_LAYER] = null
hud_updateflag |= 1 << ID_HUD
hud_updateflag |= 1 << WANTED_HUD
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
+1 -1
View File
@@ -54,7 +54,7 @@
update_canmove()
if(client)
regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
//regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES
if(get_nations_mode())
process_nations()
+17 -118
View File
@@ -314,8 +314,6 @@
for(var/datum/reagent/R in C.reagents.reagent_list)
C.reagents.clear_reagents()
C.reagents.addiction_list.Cut()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
/mob/living/proc/update_revive() // handles revival through other means than cloning or adminbus (defib, IPC repair)
stat = CONSCIOUS
@@ -381,8 +379,6 @@
stat = CONSCIOUS
update_fire()
regenerate_icons()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
return
/mob/living/proc/UpdateDamageIcon()
@@ -481,10 +477,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
*///////////////////////
@@ -499,10 +503,6 @@
var/mob/living/L = usr
//Getting out of someone's inventory.
if(istype(src.loc,/obj/item/weapon/holder))
resist_holder()
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
resist_borer()
@@ -511,17 +511,15 @@
if ((!(L.stat) && !(L.restrained())))
resist_grab(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
// Sliding out of a morgue/crematorium
if(loc && (istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
resist_tray(L)
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
resist_buckle(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
//Breaking out of a locker?
else if(src.loc && (istype(src.loc, /obj/structure/closet)))
resist_closet()
//Breaking out of an object?
else if(src.loc && istype(src.loc, /obj) && (!isturf(src.loc)))
if(stat == CONSCIOUS && !stunned && !weakened && !paralysis)
var/obj/C = loc
C.container_resist(L)
//breaking out of handcuffs
else if(iscarbon(L))
@@ -540,28 +538,6 @@
RESIST SUBPROCS
*/////////////////////
/* resist_holder allows small mobs that can be picked up to get out of their holder, so they aren't stuck forever.
*/////
/mob/living/proc/resist_holder()
var/obj/item/weapon/holder/H = src.loc //Get our item holder.
var/mob/M = H.loc //Get our mob holder (if any).
if(istype(M))
M.unEquip(H)
M << "[H] wriggles out of your grip!"
src << "You wriggle out of [M]'s grip!"
else if(istype(H.loc,/obj/item))
src << "You struggle free of [H.loc]."
H.forceMove(get_turf(H))
if(istype(M))
for(var/atom/A in M.contents)
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
return
M.status_flags &= ~PASSEMOTES
return
/* resist_borer allows a mob to regain control of their body after a borer has assumed control.
*/////
/mob/living/proc/resist_borer()
@@ -647,87 +623,6 @@
else
L.buckled.user_unbuckle_mob(L,L)
/* resist_closet() allows a mob to break out of a welded/locked closet
*/////
/mob/living/proc/resist_closet()
var/breakout_time = 2 //2 minutes by default
var/mob/living/L = src
var/obj/structure/closet/C = L.loc
if(C.opened)
return //Door's open... wait, why are you in it's contents then?
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
else
if(!C.welded)
return //closed but not welded...
// else Meh, lets just keep it at 2 minutes for now
// breakout_time++ //Harder to get out of welded lockers than locked lockers
//okay, so the closet is either welded or locked... resist!!!
L.changeNext_move(CLICK_CD_BREAKOUT)
L.last_special = world.time + CLICK_CD_BREAKOUT
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
spawn(0)
if(do_after(usr,(breakout_time*60*10), target = C)) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return
else
if(!C.welded)
return
//Well then break it!
if(istype(usr.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
SC.desc = "It appears to be broken."
SC.icon_state = SC.icon_off
flick(SC.icon_broken, SC)
sleep(10)
flick(SC.icon_broken, SC)
sleep(10)
SC.broken = 1
SC.locked = 0
SC.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = SC.loc
BD.attack_hand(usr)
SC.open()
else
C.welded = 0
C.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = C.loc
BD.attack_hand(usr)
C.open()
// resist_tray allows a mob to slide themselves out of a morgue or crematorium
/mob/living/proc/resist_tray(var/mob/living/carbon/CM)
if(!istype(CM))
return
if (usr.stat || usr.restrained())
return
usr << "<span class='alert'>You attempt to slide yourself out of \the [loc]...</span>"
var/obj/structure/S = loc
S.attack_hand(src)
/* resist_stop_drop_roll allows a mob to stop, drop, and roll in order to put out a fire burning on them.
*/////
/mob/living/proc/resist_stop_drop_roll(var/mob/living/carbon/CM)
@@ -993,6 +888,10 @@
var/obj/mecha/M = loc
loc_temp = M.return_temperature()
else if(istype(loc, /obj/spacepod))
var/obj/spacepod/S = loc
loc_temp = S.return_temperature()
else if(istype(loc, /obj/structure/transit_tube_pod))
loc_temp = environment.temperature
+2 -2
View File
@@ -5,7 +5,6 @@
var/maxHealth = 100 //Maximum health that should be possible.
var/health = 100 //A mob's health
var/hud_updateflag = 0
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
@@ -51,4 +50,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
+1 -24
View File
@@ -11,30 +11,7 @@
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
//Should update regardless of if we can ventcrawl, since we can end up in pipes in other ways.
update_pipe_vision()
update_interface()
//Round specific stuff like hud updates
if(ticker && ticker.mode)
var/ref = "\ref[mind]"
switch(ticker.mode.name)
if("revolution")
if((mind in ticker.mode.revolutionaries) || (src.mind in ticker.mode:head_revolutionaries))
ticker.mode.update_rev_icons_added(src.mind)
if("cult")
if(mind in ticker.mode:cult)
ticker.mode.update_cult_icons_added(src.mind)
if("nuclear emergency")
if(mind in ticker.mode:syndicates)
ticker.mode.update_all_synd_icons()
if("mutiny")
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if(mode)
mode.update_all_icons()
if("vampire")
if((ref in ticker.mode.vampire_thralls) || (mind in ticker.mode.vampire_enthralled))
ticker.mode.update_vampire_icons_added(mind)
if("shadowling")
if((mind in ticker.mode.shadowling_thralls) || (mind in ticker.mode.shadows))
ticker.mode.update_shadow_icons_added(src.mind)
return .
+8 -19
View File
@@ -82,10 +82,12 @@ var/list/ai_verbs_default = list(
var/turf/waypoint //Holds the turf of the currently selected waypoint.
var/waypoint_mode = 0 //Waypoint mode is for selecting a turf via clicking.
var/obj/item/borg/sight/hud/sec/sechud = null
var/obj/item/borg/sight/hud/med/healthhud = null
//var/obj/item/borg/sight/hud/sec/sechud = null
//var/obj/item/borg/sight/hud/med/healthhud = null
var/arrivalmsg = "$name, $rank, has arrived on the station."
med_hud = DATA_HUD_MEDICAL_BASIC
sec_hud = DATA_HUD_SECURITY_BASIC
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default
@@ -175,19 +177,9 @@ var/list/ai_verbs_default = list(
new /obj/machinery/ai_powersupply(src)
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
ai_list += src
shuttle_caller_list += src
..()
return
/mob/living/silicon/ai/proc/on_mob_init()
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
@@ -229,6 +221,8 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/Destroy()
ai_list -= src
shuttle_caller_list -= src
shuttle_master.autoEvac()
qdel(eyeobj) // No AI, no Eye
return ..()
@@ -238,7 +232,7 @@ var/list/ai_verbs_default = list(
The alternative was to rewrite a bunch of AI code instead here we are.
*/
/obj/machinery/ai_powersupply
name="Power Supply"
name="\improper AI power supply"
active_power_usage=1000
use_power = 2
power_channel = EQUIP
@@ -374,11 +368,6 @@ var/list/ai_verbs_default = list(
call_shuttle_proc(src, input)
// hack to display shuttle timer
if(emergency_shuttle.online())
var/obj/machinery/computer/communications/C = locate() in machines
if(C)
C.post_status("shuttle")
return
/mob/living/silicon/ai/proc/ai_cancel_call()
+2 -30
View File
@@ -12,36 +12,8 @@
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
var/callshuttle = 0
for(var/obj/machinery/computer/communications/commconsole in world)
if((commconsole.z in config.admin_levels))
continue
if(istype(commconsole.loc,/turf))
break
callshuttle++
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
if((commboard.z in config.admin_levels))
continue
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
break
callshuttle++
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if((shuttlecaller.z in config.admin_levels))
continue
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
break
callshuttle++
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
callshuttle = 0
if(callshuttle == 3) //if all three conditions are met
emergency_shuttle.call_evac()
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
shuttle_caller_list -= src
shuttle_master.autoEvac()
if(explosive)
spawn(10)
+3 -7
View File
@@ -145,13 +145,6 @@
theAPC = null
process_queued_alarms()
regular_hud_updates()
switch(sensor_mode)
if (SEC_HUD)
process_sec_hud(src, 1, eyeobj)
if (MED_HUD)
process_med_hud(src, 1, eyeobj)
if(get_nations_mode())
process_nations_ai()
@@ -165,6 +158,9 @@
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
else
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
diag_hud_set_status()
diag_hud_set_health()
/mob/living/silicon/ai/proc/lacks_power()
var/turf/T = get_turf(src)
+4 -4
View File
@@ -1,10 +1,10 @@
/mob/living/silicon/pai/Life()
. = ..()
if(.)
if(secHUD == 1)
process_sec_hud(src, 1)
if(medHUD == 1)
process_med_hud(src, 1)
//if(secHUD == 1)
// process_sec_hud(src, 1)
////if(medHUD == 1)
// process_med_hud(src, 1)
if(silence_time)
if(world.timeofday >= silence_time)
silence_time = null
@@ -460,7 +460,9 @@
toggle(mob/living/silicon/pai/user)
user.secHUD = !user.secHUD
user.remove_med_sec_hud()
if(user.secHUD)
user.add_sec_hud()
is_active(mob/living/silicon/pai/user)
return user.secHUD
@@ -471,6 +473,9 @@
toggle(mob/living/silicon/pai/user)
user.medHUD = !user.medHUD
user.remove_med_sec_hud()
if(user.medHUD)
user.add_med_hud()
is_active(mob/living/silicon/pai/user)
return user.medHUD
@@ -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
@@ -1,5 +1,5 @@
/obj/machinery/computer/drone_control
name = "Maintenance Drone Control"
name = "maintenance drone control console"
desc = "Used to monitor the station's drone population and the assembler that services them."
icon_screen = "power"
icon_keyboard = "power_key"
+23 -21
View File
@@ -21,15 +21,17 @@
ear_deaf = 0
/mob/living/silicon/robot/proc/use_power()
if (is_component_functioning("power cell") && cell)
/mob/living/silicon/robot/proc/use_power()
if (stat == DEAD)
return
else if (is_component_functioning("power cell") && cell)
if(module)
for(var/obj/item/borg/B in module.modules)
if(B.powerneeded)
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
src << "Deactivating [B.name] due to lack of power!"
unEquip(B)
if(cell.charge <= 0)
unEquip(B)
if(cell.charge <= 0)
uneq_all()
update_headlamp(1)
stat = UNCONSCIOUS
@@ -60,20 +62,16 @@
if(!is_component_functioning("actuator"))
Paralyse(3)
eye_blind = 0
stat = 0
// Please, PLEASE be careful with statements like this - make sure they're not
// dead beforehand, for example -- Crazylemon
stat = CONSCIOUS
has_power = 1
else
uneq_all()
stat = UNCONSCIOUS
update_headlamp(1)
Paralyse(3)
/mob/living/silicon/robot/updatehealth()
if(status_flags & GODMODE)
health = maxHealth
stat = CONSCIOUS
return
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
diag_hud_set_borgcell()
/mob/living/silicon/robot/handle_regular_status_updates()
@@ -98,6 +96,7 @@
if(.) //alive
if(health <= config.health_threshold_dead)
death()
diag_hud_set_status()
return
if(!istype(src, /mob/living/silicon/robot/drone))
@@ -122,6 +121,8 @@
else
stat = CONSCIOUS
diag_hud_set_health()
diag_hud_set_status()
else //dead
eye_blind = 1
@@ -227,15 +228,15 @@
cells.icon_state = "charge-empty"
/mob/living/silicon/robot/handle_regular_hud_updates()
if(!client)
return
switch(sensor_mode)
if(SEC_HUD)
process_sec_hud(src,1)
if(MED_HUD)
process_med_hud(src,1)
/*/mob/living/silicon/robot/handle_regular_hud_updates()
// if(!client)
// return
//
// switch(sensor_mode)
// if(SEC_HUD)
// process_sec_hud(src,1)
// if(MED_HUD)
// process_med_hud(src,1)
if(syndicate)
if(ticker.mode.name == "traitor")
@@ -254,6 +255,7 @@
..()
return 1
*/
+14 -14
View File
@@ -80,6 +80,8 @@ var/list/robot_verbs_default = list(
var/updating = 0 //portable camera camerachunk update
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD,NATIONS_HUD)
var/jetpackoverlay = 0
var/magpulse = 0
@@ -141,15 +143,7 @@ var/list/robot_verbs_default = list(
cell_component.wrapped = cell
cell_component.installed = 1
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
diag_hud_set_borgcell()
scanner.Grant(src)
/mob/living/silicon/robot/proc/init(var/alien=0)
@@ -220,8 +214,10 @@ var/list/robot_verbs_default = list(
if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
if(get_nations_mode())
modules = list("Peacekeeper")
if(ticker && ticker.mode && ticker.mode.name == "nations")
var/datum/game_mode/nations/N = ticker.mode
if(N.kickoff)
modules = list("Peacekeeper")
if(mmi != null && mmi.alien)
modules = "Hunter"
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
@@ -299,12 +295,13 @@ var/list/robot_verbs_default = list(
if("Combat")
module = new /obj/item/weapon/robot_module/combat(src)
module.channels = list("Security" = 1)
module_sprites["Combat Android"] = "droidcombat"
icon_state = "droidcombat"
if("Peacekeeper")
module= new /obj/item/weapon/robot_module/peacekeeper(src)
icon_state = "droidpeace"
module.channels = list()
module_sprites["Peacekeeper Android"] = "droidpeace"
icon_state = "droidpeace"
if("Hunter")
updatename(module)
@@ -315,6 +312,7 @@ var/list/robot_verbs_default = list(
modtype = "Xeno-Hu"
feedback_inc("xeborg_hunter",1)
//languages
module.add_languages(src)
//subsystems
@@ -328,7 +326,7 @@ var/list/robot_verbs_default = list(
feedback_inc("cyborg_[lowertext(modtype)]",1)
updatename()
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat")
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat" || modtype == "Peacekeeper")
status_flags &= ~CANPUSH
choose_icon(6,module_sprites)
@@ -715,6 +713,7 @@ var/list/robot_verbs_default = list(
//This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z
C.brute_damage = 0
C.electronics_damage = 0
diag_hud_set_borgcell()
else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
if (wiresexposed)
@@ -955,6 +954,7 @@ var/list/robot_verbs_default = list(
user << "You remove \the [cell]."
cell = null
update_icons()
diag_hud_set_borgcell()
if(!opened && (!istype(user, /mob/living/silicon)))
if (user.a_intent == I_HELP)
@@ -3,9 +3,16 @@
health = maxHealth
stat = CONSCIOUS
return
health = maxHealth - (getBruteLoss() + getFireLoss())
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
if (stat == DEAD && health > 0)
update_revive()
var/mob/dead/observer/ghost = get_ghost()
if(ghost)
ghost << "<span class='ghostalert'>Your cyborg shell has been repaired, re-enter if you want to continue!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
return
/mob/living/silicon/robot/getBruteLoss()
var/amount = 0
for(var/V in components)
+45 -12
View File
@@ -8,7 +8,7 @@
var/list/stating_laws = list()// Channels laws are currently being stated on
var/list/alarms_to_show = list()
var/list/alarms_to_clear = list()
var/list/hud_list[10]
//var/list/hud_list[10]
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
var/designation = ""
@@ -19,19 +19,28 @@
var/speak_query = "queries"
var/pose //Yes, now AIs can pose too.
var/sensor_mode = 0 //Determines the current HUD.
//var/sensor_mode = 0 //Determines the current HUD.
var/next_alarm_notice
var/list/datum/alarm/queued_alarms = new()
#define SEC_HUD 1 //Security HUD mode
#define MED_HUD 2 //Medical HUD mode
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD,NATIONS_HUD)
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
var/d_hud = DATA_HUD_DIAGNOSTIC //There is only one kind of diag hud
var/local_transmit //If set, can only speak to others of the same type within a short range.
var/obj/item/device/radio/common_radio
/mob/living/silicon/New()
silicon_mob_list |= src
..()
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
diag_hud.add_to_hud(src)
diag_hud_set_status()
diag_hud_set_health()
add_language("Galactic Common")
init_subsystems()
@@ -140,10 +149,10 @@
// this function displays the shuttles ETA in the status panel if the shuttle has been called
/mob/living/silicon/proc/show_emergency_shuttle_eta()
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
@@ -252,17 +261,41 @@
/mob/living/silicon/binarycheck()
return 1
/mob/living/silicon/proc/remove_med_sec_hud()
var/datum/atom_hud/secsensor = huds[sec_hud]
var/datum/atom_hud/medsensor = huds[med_hud]
var/datum/atom_hud/diagsensor = huds[d_hud]
secsensor.remove_hud_from(src)
medsensor.remove_hud_from(src)
diagsensor.remove_hud_from(src)
/mob/living/silicon/proc/add_sec_hud()
var/datum/atom_hud/secsensor = huds[sec_hud]
secsensor.add_hud_to(src)
/mob/living/silicon/proc/add_med_hud()
var/datum/atom_hud/medsensor = huds[med_hud]
medsensor.add_hud_to(src)
/mob/living/silicon/proc/add_diag_hud()
var/datum/atom_hud/diagsensor = huds[d_hud]
diagsensor.add_hud_to(src)
/mob/living/silicon/proc/toggle_sensor_mode()
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Diagnostic","Disable")
remove_med_sec_hud()
switch(sensor_type)
if ("Security")
sensor_mode = SEC_HUD
add_sec_hud()
src << "<span class='notice'>Security records overlay enabled.</span>"
if ("Medical")
sensor_mode = MED_HUD
add_med_hud()
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
if ("Diagnostic")
add_diag_hud()
src << "<span class='notice'>Robotics diagnostic overlay enabled.</span>"
if ("Disable")
sensor_mode = 0
src << "Sensor augmentations disabled."
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
+10 -9
View File
@@ -3,6 +3,7 @@
name = "bees"
icon = 'icons/obj/apiary_bees_etc.dmi'
icon_state = "bees1"
icon_living = "bees1"
icon_dead = "bees1"
var/strength = 1
var/feral = 0
@@ -79,8 +80,8 @@
B.strength = rand(1,5)
src.strength -= B.strength
if(src.strength <= 5)
src.icon_state = "bees[src.strength]"
B.icon_state = "bees[B.strength]"
src.icon_living = "bees[src.strength]"
B.icon_living = "bees[B.strength]"
if(src.parent)
B.parent = src.parent
src.parent.owned_bee_swarms.Add(B)
@@ -117,9 +118,9 @@
if(feral > 0)
src.strength += B.strength
qdel(B)
src.icon_state = "bees[src.strength]"
src.icon_living = "bees[src.strength]"
if(strength > 5)
icon_state = "bees_swarm"
icon_living = "bees_swarm"
else if(prob(10))
//make the other swarm of bees stronger, then move away
var/total_bees = B.strength + src.strength
@@ -127,11 +128,11 @@
B.strength = min(5, total_bees)
src.strength = total_bees - B.strength
B.icon_state = "bees[B.strength]"
B.icon_living = "bees[B.strength]"
if(src.strength <= 0)
qdel(src)
return
src.icon_state = "bees[B.strength]"
src.icon_living = "bees[B.strength]"
var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8)))
density = 1
if(T.Enter(src, get_turf(src)))
@@ -180,9 +181,9 @@
if(strength <= 0)
qdel(src)
else if(strength <= 5)
icon_state = "bees[strength]"
icon_living = "bees[strength]"
//debugging
/*icon_state = "[strength]"
/*icon_living = "[strength]"
if(strength > 5)
icon_state = "unknown"*/
icon_living = "unknown"*/

Some files were not shown because too many files have changed in this diff Show More