Hoping this solves the merge conflict

This commit is contained in:
LaharlMontogmmery
2015-06-27 19:23:13 +02:00
351 changed files with 4346 additions and 1346 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ var/global/floorIsLava = 0
body += "<A href='?_src_=holder;newban=\ref[M]'>Ban</A> | "
body += "<A href='?_src_=holder;jobban2=\ref[M]'>Jobban</A> | "
body += "<A href='?_src_=holder;appearanceban=\ref[M]'>Identity Ban</A> | "
body += "<A href='?_src_=holder;notes=show;ckey=[M.ckey]'>Notes</A> "
body += "<A href='?_src_=holder;notes=show;ckey=[M.ckey]'>Notes</A> | "
body += "<A href='?_src_=holder;watchlist=\ref[M]'>Watchlist Flag</A> "
if(M.client)
body += "| <A href='?_src_=holder;sendtoprison=\ref[M]'>Prison</A> | "
+1 -1
View File
@@ -37,7 +37,7 @@
var/savefile/F = new(MEMOFILE)
if(F)
for(var/ckey in F.dir)
src << "<center><span class='motd'><span class='prefix'>Admin Memo</span><span class='emote'>by [F[ckey]]</span></span></center>"
src << "<center><span class='motd'><span class='prefix'>Admin Memo</span><span class='emote'> by [F[ckey]]</span></span></center>"
//delete your own or somebody else's memo
/client/proc/admin_memo_delete()
+78 -1
View File
@@ -5,8 +5,26 @@
message_admins("[usr.key] has attempted to override the admin panel!")
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
return
if(href_list["rejectadminhelp"])
if(!check_rights(R_ADMIN))
return
var/client/C = locate(href_list["rejectadminhelp"])
if(!C)
return
if (deltimer(C.adminhelptimerid))
C.giveadminhelpverb()
if(href_list["makeAntag"])
C << 'sound/effects/adminhelp.ogg'
C << "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>"
C << "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again</font>"
C << "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting."
message_admins("[key_name_admin(usr)] Rejected [C.key]'s admin help. [C.key]'s Adminhelp verb has been returned to them")
log_admin("[key_name(usr)] Rejected [C.key]'s admin help")
else if(href_list["makeAntag"])
if (!ticker.mode)
usr << "<span class='danger'>Not until the round starts!</span>"
return
@@ -1076,6 +1094,63 @@
alert(usr,"This ban has already been lifted / does not exist.","Error","Ok")
unjobbanpanel()
//Watchlist
else if(href_list["watchlist"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["watchlist"])
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
return
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
return
if(!M.ckey)
usr << "This mob has no ckey"
return
var/sql_ckey = sanitizeSQL(M.ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query.Execute()
if(query.NextRow())
switch(alert(usr, "[sql_ckey] is already on the watchlist, do you want to:", "Ckey already flagged", "Remove", "Edit reason", "Cancel"))
if("Cancel")
return
if("Remove")
var/DBQuery/query_watchdel = dbcon.NewQuery("DELETE FROM [format_table_name("watch")] WHERE ckey = '[sql_ckey]'")
if(!query_watchdel.Execute())
var/err = query_watchdel.ErrorMsg()
log_game("SQL ERROR during removing watch entry. Error : \[[err]\]\n")
return
log_admin("[key_name(usr)] has removed [key_name_admin(M)] from the watchlist")
message_admins("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist", 1)
if("Edit reason")
var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query_reason.Execute()
if(query_reason.NextRow())
var/watch_reason = query_reason.item[3]
var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text
new_reason = sanitizeSQL(new_reason)
if(!new_reason)
return
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("watch")] SET reason = '[new_reason]' WHERE (ckey = '[sql_ckey]')")
if(!update_query.Execute())
var/err = update_query.ErrorMsg()
log_game("SQL ERROR during edit watch entry reason. Error : \[[err]\]\n")
return
log_admin("[key_name(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
message_admins("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
else
var/reason = input(usr,"Reason?","reason","Metagaming") as text|null
if(!reason)
return
reason = sanitizeSQL(reason)
var/DBQuery/query_watchadd = dbcon.NewQuery("INSERT INTO [format_table_name("watch")] (ckey, reason) VALUES ('[sql_ckey]', '[reason]')")
if(!query_watchadd.Execute())
var/err = query_watchadd.ErrorMsg()
log_game("SQL ERROR during adding new watch entry. Error : \[[err]\]\n")
return
log_admin("[key_name(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]")
message_admins("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]", 1)
else if(href_list["mute"])
if(!check_rights(R_ADMIN)) return
cmd_admin_mute(href_list["mute"], text2num(href_list["mute_type"]))
@@ -1430,6 +1505,8 @@
var/mob/dead/observer/A = C.mob
sleep(2)
A.ManualFollow(M)
log_admin("[key_name(usr)] followed [key_name(M)]")
message_admins("[key_name_admin(usr)] followed [key_name_admin(M)]")
else if(href_list["adminplayerobservecoodjump"])
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
+12 -6
View File
@@ -1,8 +1,14 @@
/client/var/adminhelptimerid = 0
/client/proc/giveadminhelpverb()
src.verbs |= /client/verb/adminhelp
adminhelptimerid = 0
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as")
/client/verb/adminhelp(msg as text)
set category = "Admin"
set name = "Adminhelp"
@@ -18,17 +24,16 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
//remove out adminhelp verb temporarily to prevent spamming of admins.
src.verbs -= /client/verb/adminhelp
spawn(1200)
src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps
//clean the input msg
if(!msg) return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
var/original_msg = msg
//remove out adminhelp verb temporarily to prevent spamming of admins.
src.verbs -= /client/verb/adminhelp
adminhelptimerid = addtimer(src,"giveadminhelpverb",1200) //2 minute cooldown of admin helps
//explode the input msg into a list
var/list/msglist = text2list(msg, " ")
@@ -85,7 +90,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(!mob) return //this doesn't happen
var/ref_mob = "\ref[mob]"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font>[key_name_admin(src)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=[ref_mob]'>FLW</A>) (<A HREF='?_src_=holder;traitor=[ref_mob]'>TP</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]</span>"
var/ref_client = "\ref[src]"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font>[key_name_admin(src)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=[ref_mob]'>FLW</A>) (<A HREF='?_src_=holder;traitor=[ref_mob]'>TP</A>)[ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>):</b> [msg]</span>"
//send this msg to all admins
+2 -2
View File
@@ -885,7 +885,7 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/centhat(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/lighter(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
@@ -912,7 +912,7 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/lighter(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
var/obj/item/weapon/card/id/W = new(M)
+1 -1
View File
@@ -260,7 +260,7 @@
corpsehelmet = /obj/item/clothing/head/centhat
corpsegloves = /obj/item/clothing/gloves/combat
corpseshoes = /obj/item/clothing/shoes/combat/swat
corpsepocket1 = /obj/item/weapon/lighter/zippo
corpsepocket1 = /obj/item/weapon/lighter
corpseid = 1
corpseidjob = "Commander"
corpseidaccess = "Captain"
+3
View File
@@ -39,3 +39,6 @@
var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
preload_rsc = PRELOAD_RSC
// Used by html_interface module.
var/hi_last_pos
+13
View File
@@ -229,6 +229,11 @@ var/next_external_rsc = 0
while (query_cid.NextRow())
related_accounts_cid += "[query_cid.item[1]], "
var/DBQuery/query_watch = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query_watch.Execute()
if(query_watch.NextRow())
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]</font>")
send2irc_adminless_only("Watchlist", "[key_name(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]")
var/admin_rank = "Player"
if (src.holder && src.holder.rank)
@@ -264,6 +269,14 @@ var/next_external_rsc = 0
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
spawn
// Preload the HTML interface. This needs to be done due to BYOND bug http://www.byond.com/forum/?post=1487244
var/datum/html_interface/hi
for (var/type in typesof(/datum/html_interface))
hi = new type(null)
hi.sendResources(src)
//Send nanoui files to client
SSnano.send_resources(src)
getFiles(
+9 -4
View File
@@ -1,5 +1,6 @@
/obj/item/clothing
name = "clothing"
burn_state = 0 //Burnable
var/flash_protect = 0 //Malk: What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
var/tint = 0 //Malk: Sets the item's level of visual impairment tint, normally set to the same as flash_protect
var/up = 0 // but seperated to allow items to protect but not impair vision, like space helmets
@@ -23,6 +24,7 @@
w_class = 1.0
throwforce = 0
slot_flags = SLOT_EARS
burn_state = -1 //Not Burnable
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
@@ -32,14 +34,14 @@
flags = EARBANGPROTECT
strip_delay = 15
put_on_delay = 25
burn_state = 0 //Burnable
//Glasses
/obj/item/clothing/glasses
name = "glasses"
icon = 'icons/obj/clothing/glasses.dmi'
w_class = 2.0
flags = GLASSESCOVERSEYES
flags_cover = GLASSESCOVERSEYES
slot_flags = SLOT_EYES
var/vision_flags = 0
var/darkness_view = 2//Base human is 2
@@ -48,7 +50,7 @@
var/list/icon/current = list() //the current hud icons
strip_delay = 20
put_on_delay = 25
burn_state = -1 //Not Burnable
/*
SEE_SELF // can see self, no matter what
SEE_MOBS // can see all mobs, no matter what
@@ -167,7 +169,7 @@ BLIND // can't see anything
name = "space helmet"
icon_state = "spaceold"
desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays."
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL
item_state = "spaceold"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -179,6 +181,8 @@ BLIND // can't see anything
flash_protect = 2
strip_delay = 50
put_on_delay = 50
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
burn_state = -1 //Not Burnable
/obj/item/clothing/suit/space
name = "space suit"
@@ -200,6 +204,7 @@ BLIND // can't see anything
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
strip_delay = 80
put_on_delay = 80
burn_state = -1 //Not Burnable
//Under clothing
/obj/item/clothing/under
+4 -1
View File
@@ -6,6 +6,7 @@
siemens_coefficient = 0
permeability_coefficient = 0.05
item_color="yellow"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/gloves/color/yellow/fake
desc = "These gloves will protect the wearer from electric shock. They don't feel like rubber..."
@@ -19,6 +20,7 @@
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
permeability_coefficient = 0.05
item_color="yellow"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/gloves/color/fyellow/New()
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
@@ -33,7 +35,7 @@
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
burn_state = -1 //Won't burn in fires
/obj/item/clothing/gloves/color/black/hos
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
@@ -148,6 +150,7 @@
permeability_coefficient = 0.01
item_color="white"
transfer_prints = TRUE
burn_state = -1 //Won't burn in fires
/obj/item/clothing/gloves/color/latex/nitrile
name = "nitrile gloves"
@@ -21,6 +21,7 @@
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
burn_state = -1 //Not Burnable
/obj/item/clothing/gloves/combat
name = "combat gloves"
@@ -33,4 +34,5 @@
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
burn_state = -1 //Won't burn in fires
+4 -1
View File
@@ -58,6 +58,7 @@
desc = "A collectable welding helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this helmet is done so at the owner's own risk!"
icon_state = "welding"
item_state = "welding"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/head/collectable/slime
name = "collectable slime hat"
@@ -110,9 +111,11 @@
desc = "Go Red! I mean Green! I mean Red! No Green!"
icon_state = "thunderdome"
item_state = "thunderdome"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/head/collectable/swat
name = "collectable SWAT helmet"
desc = "That's not real blood. That's red paint." //Reference to the actual description
icon_state = "swat"
item_state = "swat"
item_state = "swat"
burn_state = -1 //Won't burn in fires
+1
View File
@@ -9,6 +9,7 @@
armor = list(melee = 15, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20)
flags_inv = 0
action_button_name = "Toggle Helmet Light"
burn_state = -1 //Won't burn in fires
attack_self(mob/user)
if(!isturf(user.loc))
+10 -6
View File
@@ -2,7 +2,7 @@
name = "helmet"
desc = "Standard Security gear. Protects the head from impacts."
icon_state = "helmet"
flags = HEADCOVERSEYES | HEADBANGPROTECT
flags = HEADBANGPROTECT
item_state = "helmet"
armor = list(melee = 25, bullet = 15, laser = 25,energy = 10, bomb = 25, bio = 0, rad = 0)
flags_inv = HIDEEARS|HIDEEYES
@@ -11,9 +11,11 @@
heat_protection = HEAD
max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT
strip_delay = 60
burn_state = -1 //Won't burn in fires
var/obj/machinery/camera/portable/helmetCam = null
var/spawnWithHelmetCam = 0
var/canAttachCam = 0
flags_cover = HEADCOVERSEYES
/obj/item/clothing/head/helmet/New()
@@ -49,7 +51,7 @@
toggle_message = "You pull the visor down on"
alt_toggle_message = "You push the visor up on"
can_toggle = 1
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|HEADBANGPROTECT
flags = HEADBANGPROTECT
armor = list(melee = 41, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
strip_delay = 80
@@ -57,6 +59,7 @@
visor_flags = HEADCOVERSEYES|HEADCOVERSMOUTH
visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE
toggle_cooldown = 0
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
/obj/item/clothing/head/helmet/attack_self()
if(usr.canmove && !usr.stat && !usr.restrained() && can_toggle)
@@ -126,7 +129,7 @@
/obj/item/clothing/head/helmet/roman
name = "roman helmet"
desc = "An ancient helmet made of bronze and leather."
flags = HEADCOVERSEYES
flags_cover = HEADCOVERSEYES
armor = list(melee = 25, bullet = 0, laser = 25, energy = 10, bomb = 10, bio = 0, rad = 0)
icon_state = "roman"
item_state = "roman"
@@ -142,15 +145,16 @@
name = "gladiator helmet"
desc = "Ave, Imperator, morituri te salutant."
icon_state = "gladiator"
flags = HEADCOVERSEYES|BLOCKHAIR
flags = BLOCKHAIR
item_state = "gladiator"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
flags_cover = HEADCOVERSEYES
/obj/item/clothing/head/helmet/redtaghelm
name = "red laser tag helmet"
desc = "They have chosen their own end."
icon_state = "redtaghelm"
flags = HEADCOVERSEYES
flags_cover = HEADCOVERSEYES
item_state = "redtaghelm"
armor = list(melee = 15, bullet = 10, laser = 20,energy = 10, bomb = 20, bio = 0, rad = 0)
// Offer about the same protection as a hardhat.
@@ -160,7 +164,7 @@
name = "blue laser tag helmet"
desc = "They'll need more men."
icon_state = "bluetaghelm"
flags = HEADCOVERSEYES
flags_cover = HEADCOVERSEYES
item_state = "bluetaghelm"
armor = list(melee = 15, bullet = 10, laser = 20,energy = 10, bomb = 20, bio = 0, rad = 0)
// Offer about the same protection as a hardhat.
+2 -1
View File
@@ -47,7 +47,8 @@
name = "nun hood"
desc = "Maximum piety in this star system."
icon_state = "nun_hood"
flags = HEADCOVERSEYES|BLOCKHAIR
flags = BLOCKHAIR
flags_cover = HEADCOVERSEYES
/obj/item/clothing/head/det_hat
name = "detective's fedora"
+6 -10
View File
@@ -41,7 +41,8 @@
name = "hastur's hood"
desc = "It's <i>unspeakably</i> stylish."
icon_state = "hasturhood"
flags = HEADCOVERSEYES|BLOCKHAIR
flags = BLOCKHAIR
flags_cover = HEADCOVERSEYES
/obj/item/clothing/head/nursehat
name = "nurse's hat"
@@ -56,19 +57,12 @@
flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
/obj/item/clothing/head/that
name = "sturdy top-hat"
desc = "It's an amish looking armored top hat."
icon_state = "tophat"
item_state = "that"
flags_inv = 0
/obj/item/clothing/head/cardborg
name = "cardborg helmet"
desc = "A helmet made out of a box."
icon_state = "cardborg_h"
item_state = "cardborg_h"
flags = HEADCOVERSEYES
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
/obj/item/clothing/head/justice
@@ -76,7 +70,8 @@
desc = "Fight for what's righteous!"
icon_state = "justicered"
item_state = "justicered"
flags = HEADCOVERSEYES|BLOCKHAIR
flags = BLOCKHAIR
flags_cover = HEADCOVERSEYES
/obj/item/clothing/head/justice/blue
icon_state = "justiceblue"
@@ -213,6 +208,7 @@
throw_range = 5
w_class = 2.0
attack_verb = list("warned", "cautioned", "smashed")
burn_state = -1 //Won't burn in fires
/obj/item/clothing/head/santa
name = "santa hat"
+5 -3
View File
@@ -15,7 +15,7 @@
name = "welding helmet"
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
icon_state = "welding"
flags = HEADCOVERSEYES | HEADCOVERSMOUTH
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
m_amt = 1750
g_amt = 400
@@ -27,6 +27,7 @@
action_button_name = "Toggle Welding Helmet"
visor_flags = HEADCOVERSEYES | HEADCOVERSMOUTH
visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
burn_state = -1 //Won't burn in fires
/obj/item/clothing/head/welding/attack_self()
toggle()
@@ -47,7 +48,7 @@
name = "cake-hat"
desc = "It's tasty looking!"
icon_state = "cake0"
flags = HEADCOVERSEYES
flags_cover = HEADCOVERSEYES
var/onfire = 0.0
var/status = 0
var/fire_resist = T0C+1300 //this is the max temp it can stand before you start to cook. although it might not burn away, you take damage
@@ -116,11 +117,12 @@
icon_state = "hardhat0_pumpkin"
item_state = "hardhat0_pumpkin"
item_color = "pumpkin"
flags = HEADCOVERSEYES | BLOCKHAIR
flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
action_button_name = "Toggle Pumpkin Light"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
brightness_on = 2 //luminosity when on
flags_cover = HEADCOVERSEYES
/*
* Kitty ears
+3 -1
View File
@@ -4,13 +4,15 @@
icon_state = "breath"
item_state = "m_mask"
body_parts_covered = 0
flags = MASKCOVERSMOUTH | MASKINTERNALS
flags = MASKINTERNALS
visor_flags = MASKCOVERSMOUTH | MASKINTERNALS
w_class = 2
gas_transfer_coefficient = 0.10
permeability_coefficient = 0.50
action_button_name = "Adjust Breath Mask"
ignore_maskadjust = 0
flags_cover = MASKCOVERSMOUTH
burn_state = -1 //Won't burn in fires
/obj/item/clothing/mask/breath/attack_self(var/mob/user)
adjustmask(user)
+25 -9
View File
@@ -2,12 +2,14 @@
name = "gas mask"
desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate
icon_state = "gas_alt"
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
w_class = 3.0
item_state = "gas_alt"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
burn_state = -1 //Won't burn in fires
// **** Welding gas mask ****
@@ -47,10 +49,11 @@
icon_state = "sechailer"
var/aggressiveness = 2
ignore_maskadjust = 0
flags = MASKCOVERSMOUTH | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags_inv = HIDEFACE
visor_flags = MASKCOVERSMOUTH | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
visor_flags_inv = HIDEFACE
flags_cover = MASKCOVERSMOUTH
/obj/item/clothing/mask/gas/sechailer/swat
name = "\improper SWAT mask"
@@ -222,9 +225,11 @@
/obj/item/clothing/mask/gas/clown_hat
name = "clown wig and mask"
desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask."
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "clown"
item_state = "clown_hat"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user)
@@ -245,30 +250,38 @@
/obj/item/clothing/mask/gas/sexyclown
name = "sexy-clown wig and mask"
desc = "A feminine clown mask for the dabbling crossdressers or female entertainers."
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "sexyclown"
item_state = "sexyclown"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/mime
name = "mime mask"
desc = "The traditional mime's mask. It has an eerie facial posture."
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "mime"
item_state = "mime"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/monkeymask
name = "monkey mask"
desc = "A mask used when acting as a monkey."
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "monkeymask"
item_state = "monkeymask"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/sexymime
name = "sexy mime mask"
desc = "A traditional female mime's mask."
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "sexymime"
item_state = "sexymime"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/death_commando
name = "Death Commando Mask"
@@ -279,9 +292,12 @@
name = "cyborg visor"
desc = "Beep boop."
icon_state = "death"
burn_state = 0 //Burnable
/obj/item/clothing/mask/gas/owl_mask
name = "owl mask"
desc = "Twoooo!"
flags = MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "owl"
flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
icon_state = "owl"
flags_cover = MASKCOVERSEYES
burn_state = 0 //Burnable
+3 -3
View File
@@ -3,7 +3,7 @@
desc = "To stop that awful noise."
icon_state = "muzzle"
item_state = "blindfold"
flags = MASKCOVERSMOUTH
flags_cover = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
put_on_delay = 20
@@ -22,7 +22,7 @@
icon_state = "sterile"
item_state = "sterile"
w_class = 1
flags = MASKCOVERSMOUTH
flags_cover = MASKCOVERSMOUTH
flags_inv = HIDEFACE
visor_flags = MASKCOVERSMOUTH
visor_flags_inv = HIDEFACE
@@ -111,7 +111,7 @@
name = "botany bandana"
desc = "A fine bandana with nanotech lining and a hydroponics pattern."
w_class = 1
flags = MASKCOVERSMOUTH
flags_cover = MASKCOVERSMOUTH
flags_inv = HIDEFACE
visor_flags = MASKCOVERSMOUTH
visor_flags_inv = HIDEFACE
+1 -1
View File
@@ -8,7 +8,7 @@
action_button_name = "Toggle Magboots"
strip_delay = 70
put_on_delay = 70
burn_state = -1 //Won't burn in fires
/obj/item/clothing/shoes/magboots/verb/toggle()
set name = "Toggle Magboots"
@@ -15,6 +15,7 @@
permeability_coefficient = 0.05
flags = NOSLIP
origin_tech = "syndicate=3"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/shoes/sneakers/mime
name = "mime shoes"
@@ -35,6 +36,7 @@
permeability_coefficient = 0.01
flags = NOSLIP
armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30)
burn_state = -1 //Won't burn in fires
/obj/item/clothing/shoes/sandal
desc = "A pair of rather plain, wooden sandals."
@@ -58,6 +60,7 @@
slowdown = SHOES_SLOWDOWN+1
strip_delay = 50
put_on_delay = 50
burn_state = -1 //Won't burn in fires
/obj/item/clothing/shoes/clown_shoes
desc = "The prankster's standard-issue clowning shoes. Damn, they're huge!"
+10 -10
View File
@@ -12,7 +12,8 @@
var/on = 0
item_color = "engineering" //Determines used sprites: hardsuit[on]-[color] and hardsuit[on]-[color]2 (lying down sprite)
action_button_name = "Toggle Helmet Light"
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
@@ -162,7 +163,8 @@
on = 0
var/obj/item/clothing/suit/space/hardsuit/syndi/linkedsuit = null
action_button_name = "Toggle Helmet Mode"
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon()
icon_state = "hardsuit[on]-[item_color]"
@@ -182,7 +184,8 @@
name = initial(name)
desc = initial(desc)
user.AddLuminosity(brightness_on)
flags |= HEADCOVERSEYES | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
flags |= STOPSPRESSUREDMAGE
flags_cover |= HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv |= HIDEMASK|HIDEEYES|HIDEFACE
cold_protection |= HEAD
else
@@ -190,7 +193,8 @@
name += " (combat)"
desc = alt_desc
user.AddLuminosity(-brightness_on)
flags &= ~(HEADCOVERSEYES| HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL)
flags &= ~(STOPSPRESSUREDMAGE)
flags_cover &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~(HIDEMASK|HIDEEYES|HIDEFACE)
cold_protection &= ~HEAD
update_icon()
@@ -204,13 +208,13 @@
linkedsuit.name = initial(linkedsuit.name)
linkedsuit.desc = initial(linkedsuit.desc)
linkedsuit.slowdown = 1
linkedsuit.flags |= STOPSPRESSUREDMAGE | THICKMATERIAL
linkedsuit.flags |= STOPSPRESSUREDMAGE
linkedsuit.cold_protection |= CHEST | GROIN | LEGS | FEET | ARMS | HANDS
else
linkedsuit.name += " (combat)"
linkedsuit.desc = linkedsuit.alt_desc
linkedsuit.slowdown = 0
linkedsuit.flags &= ~(STOPSPRESSUREDMAGE | THICKMATERIAL)
linkedsuit.flags &= ~(STOPSPRESSUREDMAGE)
linkedsuit.cold_protection &= ~(CHEST | GROIN | LEGS | FEET | ARMS | HANDS)
linkedsuit.icon_state = "hardsuit[on]-[item_color]"
@@ -233,10 +237,6 @@
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi
/obj/item/clothing/suit/space/hardsuit/syndi/ToggleHelmet()
..()
flags ^= NODROP
/obj/item/clothing/suit/space/hardsuit/syndi/New()
jetpack = new /obj/item/weapon/tank/jetpack/suit(src)
..()
@@ -96,7 +96,8 @@
name = "Santa's hat"
desc = "Ho ho ho. Merrry X-mas!"
icon_state = "santahat"
flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
flags = BLOCKHAIR | STOPSPRESSUREDMAGE
flags_cover = HEADCOVERSEYES
/obj/item/clothing/suit/space/santa
name = "Santa's suit"
@@ -115,9 +116,10 @@
icon_state = "pirate"
item_state = "pirate"
armor = list(melee = 30, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
flags = BLOCKHAIR | STOPSPRESSUREDMAGE
strip_delay = 40
put_on_delay = 20
flags_cover = HEADCOVERSEYES
/obj/item/clothing/suit/space/pirate
name = "pirate coat"
@@ -141,8 +143,9 @@
item_color = "ert_commander"
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
strip_delay = 130
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
brightness_on = 7
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
/obj/item/clothing/suit/space/hardsuit/ert
name = "emergency response team suit"
@@ -39,9 +39,10 @@
icon_state = "plasmaman_helmet0-plasma"
item_color = "plasma" //needed for the helmet lighting
item_state = "plasmaman_helmet0"
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL
//Removed the NODROP from /helmet/space/hardsuit.
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
//Removed the HIDEFACE from /helmet/space/hardsuit
basestate = "plasmaman_helmet"
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
+4 -2
View File
@@ -7,6 +7,7 @@
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
strip_delay = 60
put_on_delay = 40
burn_state = -1 //Won't burn in fires
/obj/item/clothing/suit/armor/vest
name = "armor"
@@ -45,6 +46,7 @@
cold_protection = CHEST|GROIN|ARMS|HANDS
heat_protection = CHEST|GROIN|ARMS|HANDS
strip_delay = 70
burn_state = 0 //Burnable
/obj/item/clothing/suit/armor/vest/warden/alt
name = "warden's armored jacket"
@@ -112,7 +114,7 @@
desc = "An armored vest with a detective's badge on it."
icon_state = "detective-armor"
allowed = list(/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
burn_state = 0 //Burnable
//Reactive armor
@@ -200,4 +202,4 @@
name = "thunderdome suit"
desc = "Pukish armor." //classy.
icon_state = "tdgreen"
item_state = "tdgreen"
item_state = "tdgreen"
+4 -1
View File
@@ -4,10 +4,12 @@
icon_state = "bio"
desc = "A hood that protects the head and face from biological comtaminants."
permeability_coefficient = 0.01
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
flags = BLOCKHAIR|THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
unacidable = 1
burn_state = -1 //Not Burnable
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
/obj/item/clothing/suit/bio_suit
name = "bio suit"
@@ -26,6 +28,7 @@
strip_delay = 70
put_on_delay = 70
unacidable = 1
burn_state = -1 //Not Burnable
//Standard biosuit, orange stripe
/obj/item/clothing/head/bio_hood/general
+1
View File
@@ -100,6 +100,7 @@
item_state = "hazard"
blood_overlay_type = "armor"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner,)
burn_state = -1 //Won't burn in fires
//Lawyer
/obj/item/clothing/suit/toggle/lawyer
+29 -1
View File
@@ -16,6 +16,7 @@
blood_overlay_type = "armor"
body_parts_covered = CHEST
allowed = list (/obj/item/weapon/gun/energy/laser/bluetag)
burn_state = -1 //Won't burn in fires
/obj/item/clothing/suit/redtag
name = "red laser tag armor"
@@ -25,6 +26,7 @@
blood_overlay_type = "armor"
body_parts_covered = CHEST
allowed = list (/obj/item/weapon/gun/energy/laser/redtag)
burn_state = -1 //Won't burn in fires
/*
* Costume
@@ -88,7 +90,7 @@
w_class = 3
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
burn_state = -1 //Won't burn in fires
/obj/item/clothing/suit/hastur
name = "\improper Hastur's robe"
@@ -236,6 +238,8 @@
desc = "Pompadour not included."
icon_state = "leatherjacket"
item_state = "hostrench"
burn_state = -1 //Not Burnable
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
/obj/item/clothing/suit/jacket/leather/overcoat
name = "leather overcoat"
@@ -244,6 +248,22 @@
body_parts_covered = CHEST|GROIN|ARMS|LEGS
cold_protection = CHEST|GROIN|ARMS|LEGS
/obj/item/clothing/suit/jacket/puffer
name = "puffer jacket"
desc = "A thick jacket with a rubbery, water-resistant shell."
icon_state = "pufferjacket"
item_state = "hostrench"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
/obj/item/clothing/suit/jacket/puffer/vest
name = "puffer vest"
desc = "A thick vest with a rubbery, water-resistant shell."
icon_state = "puffervest"
item_state = "armor"
body_parts_covered = CHEST|GROIN
cold_protection = CHEST|GROIN
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 30, rad = 0)
/obj/item/clothing/suit/xenos
name = "xenos suit"
desc = "A suit made out of chitinous alien hide."
@@ -252,6 +272,8 @@
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
// WINTER COATS
/obj/item/clothing/suit/hooded/wintercoat
@@ -324,3 +346,9 @@
icon_state = "coatminer"
allowed = list(/obj/item/weapon/pickaxe,/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter)
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/miljacket
name = "military jacket"
desc = "A canvas jacket styled after classical American military garb. Feels sturdy, yet comfortable."
icon_state = "militaryjacket"
item_state = "militaryjacket"
+9 -5
View File
@@ -28,6 +28,7 @@
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
strip_delay = 60
put_on_delay = 60
burn_state = -1 //Not Burnable
/obj/item/clothing/suit/fire/firefighter
icon_state = "firesuit"
@@ -55,7 +56,7 @@
name = "bomb hood"
desc = "Use in case of bomb."
icon_state = "bombsuit"
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
flags = BLOCKHAIR|THICKMATERIAL
armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
cold_protection = HEAD
@@ -64,7 +65,8 @@
max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT
strip_delay = 70
put_on_delay = 70
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
burn_state = -1 //Not Burnable
/obj/item/clothing/suit/bomb_suit
name = "bomb suit"
@@ -85,7 +87,7 @@
min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
strip_delay = 70
put_on_delay = 70
burn_state = -1 //Not Burnable
/obj/item/clothing/head/bomb_hood/security
@@ -105,11 +107,12 @@
name = "radiation hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. The label reads, 'Made with lead. Please do not consume insulation.'"
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
flags = BLOCKHAIR|THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
strip_delay = 60
put_on_delay = 60
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
burn_state = -1 //Not Burnable
/obj/item/clothing/suit/radiation
name = "radiation suit"
@@ -127,3 +130,4 @@
strip_delay = 60
put_on_delay = 60
flags_inv = HIDEJUMPSUIT
burn_state = -1 //Not Burnable
+5 -1
View File
@@ -8,6 +8,7 @@
strip_delay = 50
put_on_delay = 50
unacidable = 1
burn_state = -1 //Won't burn in fires
/obj/item/clothing/head/wizard/red
name = "red wizard hat"
@@ -63,7 +64,7 @@
strip_delay = 50
put_on_delay = 50
unacidable = 1
burn_state = -1 //Won't burn in fires
/obj/item/clothing/suit/wizrobe/red
name = "red wizard robe"
@@ -117,6 +118,7 @@
permeability_coefficient = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
unacidable = 0
burn_state = 0 //Burnable
/obj/item/clothing/head/wizard/marisa/fake
name = "witch hat"
@@ -126,6 +128,7 @@
permeability_coefficient = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
unacidable = 0
burn_state = 0 //Burnable
/obj/item/clothing/suit/wizrobe/marisa/fake
name = "witch robe"
@@ -136,3 +139,4 @@
permeability_coefficient = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
unacidable = 0
burn_state = 0 //Burnable
+1
View File
@@ -9,6 +9,7 @@
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
var/malfunctioning = 0
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/chameleon/New()
..()
+1
View File
@@ -16,6 +16,7 @@
icon_state = "black"
item_state = "bl_suit"
item_color = "black"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/color/grey
name = "grey jumpsuit"
@@ -6,6 +6,7 @@
item_state = "gy_suit"
item_color = "chief"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10)
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/rank/atmospheric_technician
desc = "It's a jumpsuit worn by atmospheric technicians."
@@ -13,6 +14,7 @@
icon_state = "atmos"
item_state = "atmos_suit"
item_color = "atmos"
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/rank/engineer
desc = "It's an orange high visibility jumpsuit worn by engineers. It has minor radiation shielding."
@@ -37,6 +37,7 @@
item_state = "armor"
can_adjust = 0
strip_delay = 100
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/waiter
name = "waiter's outfit"
@@ -115,6 +116,7 @@
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
can_adjust = 0
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/acj
name = "administrative cybernetic jumpsuit"
@@ -131,6 +133,7 @@
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
can_adjust = 0
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/owl
name = "owl uniform"
@@ -338,6 +341,7 @@
body_parts_covered = CHEST|GROIN|ARMS
fitted = NO_FEMALE_UNIFORM
can_adjust = 0
burn_state = -1 //Won't burn in fires
/obj/item/clothing/under/sundress
name = "sundress"
+1
View File
@@ -84,6 +84,7 @@
desc = "A bronze medal."
icon_state = "bronze"
item_color = "bronze"
burn_state = -1 //Won't burn in fires
//Pinning medals on people
/obj/item/clothing/tie/medal/attack(mob/living/carbon/human/M, mob/living/user)
+1 -1
View File
@@ -80,7 +80,7 @@
check_table()
var/send_feedback = 1
if(check_contents(R) && check_tools(user, R))
if(do_after(user, R.time))
if(do_after(user, R.time, target = src))
if(!check_contents(R) || !check_tools(user, R))
return 0
var/atom/movable/I = new R.result (loc)
@@ -30,7 +30,7 @@
user.visible_message("<span class='danger'>[user] has smothered \the [A] with \the [src]!</span>", "<span class='danger'>You smother \the [A] with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
else if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user,30))
if(do_after(user,30, target = A))
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
A.clean_blood()
return
+1 -1
View File
@@ -22,5 +22,5 @@
/datum/round_event/anomaly/anomaly_flux/end()
if(newAnomaly.loc)//If it hasn't been neutralized, it's time to blow up.
explosion(newAnomaly, -1, 3, 5, 5)
explosion(newAnomaly, -1, 3, 8, 10)
qdel(newAnomaly)
+11 -4
View File
@@ -47,9 +47,13 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
qdel(src)
return ..()
/obj/effect/immovablerod/ex_act(test)
return 0
/obj/effect/immovablerod/Bump(atom/clong)
playsound(src, 'sound/effects/bang.ogg', 50, 1)
audible_message("CLANG")
if(prob(10))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
audible_message("CLANG")
if(clong && prob(25))
x = clong.x
@@ -60,7 +64,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
clong.ex_act(2)
else if (istype(clong, /mob))
if(istype(clong, /mob/living/carbon/human))
var/mob/living/carbon/human/H = clong
H.visible_message("<span class='danger'>[H.name] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class ='danger'>You hear a CLANG!</span>")
H.adjustBruteLoss(160)
if(clong.density || prob(10))
clong.ex_act(2)
else
qdel(src)
return
+1 -1
View File
@@ -5,7 +5,7 @@
max_occurrences = 1
/datum/round_event/meteor_wave/meaty/announce()
priority_announce("Meaty ores have been detected on collision course with the station.", "Oh Crap, Get The Mop.",'sound/AI/meteors.ogg')
priority_announce("Meaty ores have been detected on collision course with the station.", "Oh crap, get the mop.",'sound/AI/meteors.ogg')
/datum/round_event/meteor_wave/meaty/tick()
if(IsMultiple(activeFor, 3))
+1 -1
View File
@@ -15,7 +15,7 @@
random_wave_type()
/datum/round_event/meteor_wave/proc/random_wave_type()
var/picked_wave = pickweight(list("normal" = 75, "threatening" = 20, "catastrophic" = 5))
var/picked_wave = pickweight(list("normal" = 50, "threatening" = 40, "catastrophic" = 10))
switch(picked_wave)
if("normal")
wave_type = meteors_normal
+4 -4
View File
@@ -24,13 +24,13 @@
SSshuttle.shuttle_loan = src
switch(dispatch_type)
if(HIJACK_SYNDIE)
priority_announce("The syndicate are trying to infiltrate your station. If you let them hijack your shuttle, you'll save us a headache.","Centcom Counter Intelligence")
priority_announce("Cargo: The syndicate are trying to infiltrate your station. If you let them hijack your cargo shuttle, you'll save us a headache.","Centcom Counter Intelligence")
if(RUSKY_PARTY)
priority_announce("A group of angry russians want to have a party, can you send them your cargo shuttle then make them disappear?","Centcom Russian Outreach Program")
priority_announce("Cargo: A group of angry russians want to have a party, can you send them your cargo shuttle then make them disappear?","Centcom Russian Outreach Program")
if(SPIDER_GIFT)
priority_announce("The Spider Clan has sent us a mysterious gift, can we ship it to you to see what's inside?","Centcom Diplomatic Corps")
priority_announce("Cargo: The Spider Clan has sent us a mysterious gift, can we ship it to you to see what's inside?","Centcom Diplomatic Corps")
if(DEPARTMENT_RESUPPLY)
priority_announce("Seems we've ordered doubles of our department resupply packages this month. Can we send them to you?","Centcom Supply Department")
priority_announce("Cargo: Seems we've ordered doubles of our department resupply packages this month. Can we send them to you?","Centcom Supply Department")
thanks_msg = "The shuttle will be returned in 5 minutes."
bonus_points = 0
@@ -10,6 +10,7 @@
var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it.
possible_transfer_amounts = list(5,10,25)
volume = 50
burn_state = -1
/obj/item/weapon/reagent_containers/food/drinks/New()
..()
@@ -53,7 +53,7 @@
var/mob/living/carbon/human/H = target
var/headarmor = 0 // Target's head armor
armor_block = H.run_armor_check(affecting, "melee") // For normal attack damage
armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage
//If they have a hat/helmet and the user is targeting their head.
if(istype(H.head, /obj/item/clothing/head) && affecting == "head")
@@ -77,6 +77,7 @@
armor_duration /= 10
//Apply the damage!
armor_block = min(90,armor_block)
target.apply_damage(force, BRUTE, affecting, armor_block)
// You are going to knock someone out for longer if they are not wearing a helmet.
@@ -6,6 +6,20 @@
icon_state = "glass_empty"
amount_per_transfer_from_this = 10
volume = 50
burn_state = 0 //Burnable
burntime = 5
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fire_act()
if(!reagents.total_volume)
return
..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/burn()
reagents.total_volume = 0 //Burns away all the alcohol :(
reagents.reagent_list.Cut()
on_reagent_change()
extinguish()
return
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change()
overlays.Cut()
+1
View File
@@ -4,6 +4,7 @@
/obj/item/weapon/reagent_containers/food
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
burn_state = 0 //Burnable
/obj/item/weapon/reagent_containers/food/New()
..()
@@ -106,7 +106,7 @@
user.visible_message("<span class='danger'>[user] starts to put [G.affecting] into the gibber!</span>")
src.add_fingerprint(user)
if(do_after(user, gibtime) && G && G.affecting && !occupant)
if(do_after(user, gibtime, target = src) && G && G.affecting && !occupant)
user.visible_message("<span class='danger'>[user] stuffs [G.affecting] into the gibber!</span>")
var/mob/M = G.affecting
if(M.client)
@@ -67,7 +67,7 @@
"[user] starts to fix part of the microwave.", \
"<span class='notice'>You start to fix part of the microwave...</span>" \
)
if (do_after(user,20))
if (do_after(user,20, target = src))
user.visible_message( \
"[user] fixes part of the microwave.", \
"<span class='notice'>You fix part of the microwave.</span>" \
@@ -78,7 +78,7 @@
"[user] starts to fix part of the microwave.", \
"<span class='notice'>You start to fix part of the microwave...</span>" \
)
if (do_after(user,20))
if (do_after(user,20, target = src))
user.visible_message( \
"[user] fixes the microwave.", \
"<span class='notice'>You fix the microwave.</span>" \
@@ -116,7 +116,7 @@
"[user] starts to clean the microwave.", \
"<span class='notice'>You start to clean the microwave...</span>" \
)
if (do_after(user, P.cleanspeed))
if (do_after(user, P.cleanspeed, target = src))
user.visible_message( \
"[user] has cleaned the microwave.", \
"<span class='notice'>You clean the microwave.</span>" \
+252
View File
@@ -0,0 +1,252 @@
/datum/playingcard
var/name = "playing card"
var/card_icon = "card_back"
var/suit
var/number
/* Deck */
/obj/item/weapon/deck
name = "deck of cards"
desc = "A simple deck of playing cards."
icon = 'playing_cards.dmi'
icon_state = "deck"
w_class = 2
var/list/cards = list()
/obj/item/weapon/deck/New()
. = ..()
var/color
var/datum/playingcard/card
for (var/suit in list("spades", "clubs", "diamonds", "hearts"))
if (suit == "spades" || suit == "clubs") color = "black_"
else color = "red_"
for (var/number in list("ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[color]num"
card.suit = suit
card.number = number
src.cards.Add(card)
for (var/number in list("jack", "queen", "king"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[color]col"
card.suit = suit
card.number = number
src.cards.Add(card)
for (var/i = 0, i < 2, i++)
card = new()
card.name = "joker"
card.card_icon = "joker"
card.suit = "joker"
card.number = ""
src.cards.Add(card)
/obj/item/weapon/deck/attackby(obj/O as obj, mob/user as mob)
if (istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for (var/datum/playingcard/P in H.cards) src.cards.Add(P)
qdel (O)
user.show_message("You place your cards on the bottom of the deck.")
else return ..()
/obj/item/weapon/deck/attack_self(var/mob/user as mob)
var/list/newcards = list()
var/datum/playingcard/card
while (cards.len)
card = pick(cards)
newcards.Add(card)
src.cards.Remove(card)
src.cards = newcards
user.visible_message("\The [user] shuffles [src].")
/obj/item/weapon/deck/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
if(flag) return //It's adjacent, is the user, or is on the user's person
if (istype(A, /mob/living)) src.dealTo(A, user)
else return ..()
/obj/item/weapon/deck/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (istype(M)) src.dealTo(M, user)
else return ..()
/obj/item/weapon/deck/proc/dealTo(mob/living/target, mob/living/source)
if (!src.cards.len)
source.show_message("There are no cards in the deck.")
return
var/datum/playingcard/card = src.cards[1]
src.cards.Remove(card)
var/obj/item/weapon/hand/H = new(get_turf(src))
H.concealed = 1
H.update_conceal()
H.cards.Add(card)
H.update_icon()
source.visible_message("\The [source] deals a card to \the [target].")
H.throw_at(get_step(target, target.dir), 10, 1, H)
/* Hand */
/obj/item/weapon/hand
name = "hand of cards"
desc = "Some playing cards."
icon = 'playing_cards.dmi'
icon_state = "empty"
w_class = 1
var/concealed = 0
var/list/cards = list()
var/datum/html_interface/hi
/obj/item/weapon/hand/New(loc)
. = ..()
src.hi = new/datum/html_interface/cards(src, "Your hand", 540, 302)
src.update_conceal()
/obj/item/weapon/hand/Destroy()
if (src.hi) qdel(src.hi)
return ..()
/obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob)
if(istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for(var/datum/playingcard/P in src.cards) H.cards.Add(P)
H.update_icon()
qdel(src)
else return ..()
/obj/item/weapon/hand/verb/discard(datum/playingcard/card in cards)
set category = "Object"
set name = "Discard"
set desc = "Place a card from your hand in front of you."
if (!card) return
var/obj/item/weapon/hand/H = new(src.loc)
H.concealed = 0
H.update_conceal()
H.cards.Add(card)
src.cards.Remove(card)
H.update_icon()
ASSERT(H)
usr.visible_message("\The [usr] plays \the [card.name].")
H.loc = get_step(usr,usr.dir)
src.update_icon()
/obj/item/weapon/hand/verb/toggle_conceal()
set category = "Object"
set name = "Toggle conceal"
set desc = "Toggle concealment of your hand"
src.concealed = !src.concealed
src.update_conceal()
usr.visible_message("\The [usr] [concealed ? "conceals" : "reveals"] their hand.")
src.update_icon()
/obj/item/weapon/hand/attack_self(var/mob/user as mob)
src.hi.show(user)
/obj/item/weapon/hand/examine()
. = ..()
if((!concealed || src.loc == usr) && cards.len)
usr.show_message("It contains: ")
for (var/datum/playingcard/card in cards)
usr.show_message("The [card.name].")
/obj/item/weapon/hand/proc/update_conceal()
if (src.concealed) src.hi.updateContent("headbar", "You are currently concealing your hand. <a href=\"byond://?src=\ref[hi]&action=toggle_conceal\">Reveal your hand.</a>")
else src.hi.updateContent("headbar", "You are currently revealing your hand. <a href=\"byond://?src=\ref[hi]&action=toggle_conceal\">Conceal your hand.</a>")
/obj/item/weapon/hand/update_icon()
if (!cards.len) qdel (src)
else
if(cards.len > 1)
name = "hand of cards"
desc = "Some playing cards."
else
name = "a playing card"
desc = "A playing card."
overlays.len = 0
if (cards.len == 1)
var/datum/playingcard/P = cards[1]
var/image/I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") )
I.pixel_x = I.pixel_x + (-5 + rand(10))
I.pixel_y = I.pixel_y + (-5 + rand(10))
overlays.Add(I)
else
var/origin = -12
var/offset = round(32 / cards.len)
var/i = 0
var/image/I
for(var/datum/playingcard/P in cards)
I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") )
I.pixel_x = origin + (offset * i)
overlays.Add(I)
i = i + 1
var/html = ""
for(var/datum/playingcard/card in cards)
html = html + "<a href=\"byond://?src=\ref[src.hi]&action=play_card&card=\ref[card]\" class=\"card [card.suit] [card.number]\"></a>"
src.hi.updateContent("hand", html)
/obj/item/weapon/hand/Topic(href, href_list[], datum/html_interface_client/hclient)
if (istype(hclient))
switch (href_list["action"])
if ("play_card")
var/datum/playingcard/card = locate(href_list["card"])
if (card in src.cards)
src.discard(card)
if ("toggle_conceal")
src.toggle_conceal()
// Hook for html_interface module to prevent updates to clients who don't have this in their inventory.
/obj/item/weapon/hand/proc/hiIsValidClient(datum/html_interface_client/hclient)
return (hclient.client.mob && hclient.client.mob.stat == 0 && (src in hclient.client.mob.contents))
Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+112
View File
@@ -0,0 +1,112 @@
html, body, div.wrapper > table
{
width: 100%;
height: 100%;
}
body
{
background-color: #EAEAEA;
font-family: verdana,Geneva,sans-serif;
font-size: 12px;
color: #272727;
}
a
{
color: #5353B1;
}
div.wrapper
{
position: absolute; top: 24px; left: 0px; right: 0px; bottom: 0px;
}
div#headbar
{
background-color: #B2B2B2;
border-bottom: 1px solid #C2C2C2;
height: 24px;
padding: 4px 8px;
box-sizing: border-box;
}
div#hand
{
padding: 8px 8px;
padding-bottom: 4px;
background-color: #EAEAEA;
text-align: center;
}
a.card
{
display: inline-block;
margin: 0px 2px;
background-image: url(cards.png);
background-repeat: no-repeat;
width: 94px;
height: 129px;
box-sizing: border-box;
background-position: 0px 0px;
background-origin: border-box;
text-decoration: none;
font-size: 0px;
}
a.card.clubs.ten { background-position: -5px -5px; }
a.card.diamonds.ten { background-position: -109px -5px; }
a.card.hearts.ten { background-position: -213px -5px; }
a.card.spades.ten { background-position: -317px -5px; }
a.card.clubs.two { background-position: -421px -5px; }
a.card.diamonds.two { background-position: -525px -5px; }
a.card.hearts.two { background-position: -629px -5px; }
a.card.spades.two { background-position: -733px -5px; }
a.card.clubs.three { background-position: -5px -144px; }
a.card.diamonds.three { background-position: -109px -144px; }
a.card.hearts.three { background-position: -213px -144px; }
a.card.spades.three { background-position: -317px -144px; }
a.card.clubs.four { background-position: -421px -144px; }
a.card.diamonds.four { background-position: -525px -144px; }
a.card.hearts.four { background-position: -629px -144px; }
a.card.spades.four { background-position: -733px -144px; }
a.card.clubs.five { background-position: -5px -283px; }
a.card.diamonds.five { background-position: -109px -283px; }
a.card.hearts.five { background-position: -213px -283px; }
a.card.spades.five { background-position: -317px -283px; }
a.card.clubs.six { background-position: -421px -283px; }
a.card.diamonds.six { background-position: -525px -283px; }
a.card.hearts.six { background-position: -629px -283px; }
a.card.spades.six { background-position: -733px -283px; }
a.card.clubs.seven { background-position: -5px -422px; }
a.card.diamonds.seven { background-position: -109px -422px; }
a.card.hearts.seven { background-position: -213px -422px; }
a.card.spades.seven { background-position: -317px -422px; }
a.card.clubs.eight { background-position: -421px -422px; }
a.card.diamonds.eight { background-position: -525px -422px; }
a.card.hearts.eight { background-position: -629px -422px; }
a.card.spades.eight { background-position: -733px -422px; }
a.card.clubs.nine { background-position: -5px -561px; }
a.card.diamonds.nine { background-position: -109px -561px; }
a.card.hearts.nine { background-position: -213px -561px; }
a.card.spades.nine { background-position: -317px -561px; }
a.card.clubs.ace { background-position: -421px -561px; }
a.card.diamonds.ace { background-position: -525px -561px; }
a.card.hearts.ace { background-position: -629px -561px; }
a.card.spades.ace { background-position: -733px -561px; }
a.card.clubs.jack { background-position: -5px -700px; }
a.card.diamonds.jack { background-position: -109px -700px; }
a.card.hearts.jack { background-position: -213px -700px; }
a.card.spades.jack { background-position: -317px -700px; }
a.card.clubs.king { background-position: -421px -700px; }
a.card.diamonds.king { background-position: -525px -700px; }
a.card.hearts.king { background-position: -629px -700px; }
a.card.spades.king { background-position: -733px -700px; }
a.card.clubs.queen { background-position: -837px -5px; }
a.card.diamonds.queen { background-position: -837px -144px; }
a.card.hearts.queen { background-position: -837px -283px; }
a.card.spades.queen { background-position: -837px -422px; }
a.card.joker { background-position: -837px -561px; }
@@ -0,0 +1,14 @@
// Used by playing cards; /obj/item/weapon/hand
// Subtype exists because of sendResources; these must be sent when the client connects.
/datum/html_interface/cards/New()
. = ..()
src.head = src.head + "<link rel=\"stylesheet\" type=\"text/css\" href=\"cards.css\" />"
src.updateLayout("<div id=\"headbar\"></div><div class=\"wrapper\"><table><tr><td style=\"vertical-align: middle;\"><div id=\"hand\"></div></td></tr></table></div>")
/datum/html_interface/cards/sendResources(client/client)
. = ..() // we need the default resources
client << browse_rsc('cards.css')
client << browse_rsc('cards.png')
Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

@@ -0,0 +1,11 @@
html
{
-ms-overflow-style: scrollbar;
}
body
{
font-family: Arial;
overflow-y: scroll;
overflow-x: auto;
}
@@ -0,0 +1,321 @@
/*
Author: NullQuery
Created on: 2014-09-24
** CAUTION - A WORD OF WARNING **
If there is no getter or setter available and you aren't extending my code with a sub-type, DO NOT ACCESS VARIABLES DIRECTLY!
Add a getter/setter instead, even if it does nothing but return or set the variable. Thank you for your patience with me. -NQ
** Public API **
var/datum/html_interface/hi = new/datum/html_interface(ref, title, width = 700, height = 480, head = "")
Creates a new HTML interface object with [ref] as the object and [title] as the initial title of the page. [width] and [height] is the initial width and height
of the window. The text in [head] is added just before the end </head> tag.
hi.setTitle(title)
Changes the title of the page.
hi.getTitle()
Returns the current title of the page.
hi.updateLayout(layout)
Updates the overall layout of the page (the HTML code between the body tags).
This should be used sparingly.
hi.updateContent(id, content, ignore_cache = FALSE)
Updates a portion of the page, i.e., the DOM element with the appropriate ID. The contents of the element are replaced with the provided HTML.
The content is cached on the server-side to minimize network traffic when the client "should have" the same HTML. The client may not have
the same HTML if scripts cause the content to change. In this case set the ignore_cache parameter.
hi.executeJavaScript(jscript, client = null)
Executes Javascript on the browser.
The client is optional and may be a /mob, /client or /html_interface_client object. If not specified the code is executed on all clients.
hi.show(client)
Shows the HTML interface to the provided client. This will create a window, apply the current layout and contents. It will then wait for events.
hi.hide(client)
Hides the HTML interface from the provided client. This will close the browser window.
hi.isUsed()
Returns TRUE if the interface is being used (has an active client) or FALSE if not.
** Additional notes **
When working with byond:// links make sure to reference the HTML interface object and NOT the original object. Topic() will still be called on
your object, but it will pass through the HTML interface first allowing interception at a higher level.
** Sample code **
mob/var/datum/html_interface/hi
mob/verb/test()
if (!hi) hi = new/datum/html_interface(src, "[src.key]")
hi.updateLayout("<div id=\"content\"></div>")
hi.updateContent("content", "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>")
hi.show(src)
*/
/datum/html_interface
// The atom we should report to.
var/atom/ref
// The current title of the browser window.
var/title
// A list of content elements that have been changed. This is necessary when showing the browser control to new clients.
var/list/content_elements = new/list()
// The HTML layout, typically what's in-between the <body></body> tag. May be overridden by extensions.
var/layout
// An associative list of clients currently viewing this screen. The key is the /client object, the value is the /datum/html_interface_client object.
var/list/clients
// This goes just before the closing HEAD tag. I haven't exposed any getters/setters for it because it's only being used by extensions.
var/head = ""
// The initial width of the browser control, used when the window is first shown to a client.
var/width
// The initial height of the browser control, used when the window is first shown to a client.
var/height
/datum/html_interface/New(atom/ref, title, width = 700, height = 480, head = "")
. = ..()
src.ref = ref
src.title = title
src.width = width
src.height = height
src.head = head
/datum/html_interface/Destroy()
if (src.clients)
for (var/client in src.clients)
src.hide(src.clients[client])
return ..()
/* * Hooks */
/datum/html_interface/proc/specificRenderTitle(datum/html_interface_client/hclient, ignore_cache = FALSE)
/datum/html_interface/proc/sendResources(client/client)
client << browse_rsc('jquery.min.js')
client << browse_rsc('bootstrap.min.js')
client << browse_rsc('bootstrap.min.css')
client << browse_rsc('html_interface.css')
client << browse_rsc('html_interface.js')
/datum/html_interface/proc/createWindow(datum/html_interface_client/hclient)
winclone(hclient.client, "window", "browser_\ref[src]")
var/list/params = list(
"size" = "[width]x[height]",
"statusbar" = "false",
"on-close" = "byond://?src=\ref[src]&html_interface_action=onclose"
)
if (hclient.client.hi_last_pos) params["pos"] = "[hclient.client.hi_last_pos]"
winset(hclient.client, "browser_\ref[src]", list2params(params))
winset(hclient.client, "browser_\ref[src].browser", list2params(list("parent" = "browser_\ref[src]", "type" = "browser", "pos" = "0,0", "size" = "[width]x[height]", "anchor1" = "0,0", "anchor2" = "100,100", "use-title" = "true", "auto-format" = "false")))
/* * Public API */
/datum/html_interface/proc/getTitle() return src.title
/datum/html_interface/proc/setTitle(title, ignore_cache = FALSE)
src.title = title
var/datum/html_interface_client/hclient
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderTitle(src.clients[client], ignore_cache)
/datum/html_interface/proc/executeJavaScript(jscript, datum/html_interface_client/hclient = null)
if (hclient)
hclient = getClient(hclient)
if (istype(hclient))
if (hclient.is_loaded) hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
else
for (var/client in src.clients) src.executeJavaScript(jscript, src.clients[client])
/datum/html_interface/proc/updateLayout(layout)
src.layout = layout
var/datum/html_interface_client/hclient
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderLayout(hclient)
/datum/html_interface/proc/updateContent(id, content, ignore_cache = FALSE)
src.content_elements[id] = content
var/datum/html_interface_client/hclient
for (var/client in src.clients)
hclient = src._getClient(src.clients[client])
if (hclient && hclient.active) src._renderContent(id, hclient, ignore_cache)
/datum/html_interface/proc/show(datum/html_interface_client/hclient)
hclient = getClient(hclient, TRUE)
if (istype(hclient))
// This needs to be commented out due to BYOND bug http://www.byond.com/forum/?post=1487244
// /client/proc/send_resources() executes this per client to avoid the bug, but by using it here files may be deleted just as the HTML is loaded,
// causing file not found errors.
// src.sendResources(hclient.client)
if (winexists(hclient.client, "browser_\ref[src]"))
src._renderTitle(hclient, TRUE)
src._renderLayout(hclient)
else
src.createWindow(hclient)
hclient.is_loaded = FALSE
hclient.client << output(replacetextEx(replacetextEx(file2text('html_interface.html'), "\[hsrc\]", "\ref[src]"), "</head>", "[head]</head>"), "browser_\ref[src].browser")
winshow(hclient.client, "browser_\ref[src]", TRUE)
/datum/html_interface/proc/hide(datum/html_interface_client/hclient)
hclient = getClient(hclient)
if (istype(hclient))
if (src.clients)
src.clients.Remove(hclient.client)
if (!src.clients.len) src.clients = null
hclient.client.hi_last_pos = winget(hclient.client, "browser_\ref[src]" ,"pos")
winshow(hclient.client, "browser_\ref[src]", FALSE)
winset(hclient.client, "browser_\ref[src]", "parent=none")
if (hascall(src.ref, "hiOnHide")) call(src.ref, "hiOnHide")(hclient)
// Convert a /mob to /client, and /client to /datum/html_interface_client
/datum/html_interface/proc/getClient(client, create_if_not_exist = FALSE)
if (istype(client, /datum/html_interface_client)) return src._getClient(client)
else if (ismob(client))
var/mob/mob = client
client = mob.client
if (istype(client, /client))
if (create_if_not_exist && (!src.clients || !(client in src.clients)))
if (!src.clients) src.clients = new/list()
if (!(client in src.clients)) src.clients[client] = new/datum/html_interface_client(client)
if (src.clients && (client in src.clients)) return src._getClient(src.clients[client])
else return null
else return null
/datum/html_interface/proc/enableFor(datum/html_interface_client/hclient)
hclient.active = TRUE
src.show(hclient)
/datum/html_interface/proc/disableFor(datum/html_interface_client/hclient)
hclient.active = FALSE
/datum/html_interface/proc/isUsed()
if (src.clients && src.clients.len > 0)
var/datum/html_interface_client/hclient
for (var/key in clients)
hclient = clients[key]
if (hclient.active) return TRUE
return FALSE
/* * Danger Zone */
/datum/html_interface/proc/_getClient(datum/html_interface_client/hclient)
if (hclient)
if (hclient.client)
if (hascall(src.ref, "hiIsValidClient"))
var/res = call(src.ref, "hiIsValidClient")(hclient)
if (res)
if (!hclient.active) src.enableFor(hclient)
else
if (hclient.active) src.disableFor(hclient)
return hclient
else
return null
else
return null
/datum/html_interface/proc/_renderTitle(datum/html_interface_client/hclient, ignore_cache = FALSE)
if (hclient && hclient.is_loaded)
// Only render if we have new content.
if (ignore_cache || src.title != hclient.title)
hclient.title = title
src.specificRenderTitle(hclient)
hclient.client << output(list2params(list(title)), "browser_\ref[src].browser:setTitle")
/datum/html_interface/proc/_renderLayout(datum/html_interface_client/hclient)
if (hclient && hclient.is_loaded)
var/html = src.layout
// Only render if we have new content.
if (html != hclient.layout)
hclient.layout = html
hclient.client << output(list2params(list(html)), "browser_\ref[src].browser:updateLayout")
for (var/id in src.content_elements) src._renderContent(id, hclient)
/datum/html_interface/proc/_renderContent(id, datum/html_interface_client/hclient, ignore_cache = FALSE)
if (hclient && hclient.is_loaded)
var/html = src.content_elements[id]
// Only render if we have new content.
if (ignore_cache || !(id in hclient.content_elements) || html != hclient.content_elements[id])
hclient.content_elements[id] = html
hclient.client << output(list2params(list(id, html)), "browser_\ref[src].browser:updateContent")
/datum/html_interface/Topic(href, href_list[])
var/datum/html_interface_client/hclient = getClient(usr.client)
if (istype(hclient))
if ("html_interface_action" in href_list)
switch (href_list["html_interface_action"])
if ("onload")
hclient.layout = null
hclient.content_elements.len = 0
hclient.is_loaded = TRUE
src._renderTitle(hclient, TRUE)
src._renderLayout(hclient)
if ("onclose")
src.hide(hclient)
else if (src.ref && hclient.active) src.ref.Topic(href, href_list, hclient)
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="html_interface.css" />
<script type="text/javascript">var hSrc = "[hsrc]";</script>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="html_interface.js"></script>
</head>
<body>
</body>
</html>
@@ -0,0 +1,45 @@
var is_loading = false;
var load_count = 0;
function onload()
{
if (!is_loading)
{
var count = ++load_count;
is_loading = true;
$("body").html("");
window.location.href = "byond://?src=" + hSrc + "&html_interface_action=onload";
// The request may fail which would prevent the player from refreshing the screen again. Try to detect this retry.
setTimeout(function()
{
if (count == load_count && is_loading && $("body").html() == "")
{
is_loading = false;
onload();
}
}, 500);
}
}
$(document).ready(function()
{
$(document).on("keydown", function(e)
{
if (!e.ctrlKey && e.which == 116)
{
e.preventDefault();
onload();
}
});
onload();
});
function fixText(text) { return text.replace(/ÿ/g, ""); }
function setTitle(new_title) { $("title").html(fixText(new_title)); $(window).trigger("onUpdateTitle"); }
function updateLayout(new_html) { $("body").html(fixText(new_html)); $(window).trigger("onUpdateLayout"); setTimeout(function(){ is_loading = false; }, 200); }
function updateContent(id, new_html) { $("#" + id).html(fixText(new_html)); $(window).trigger("onUpdateContent"); }
@@ -0,0 +1,43 @@
/datum/html_interface_client
// The /client object represented by this model.
var/client/client
// The layout currently visible to the client.
var/layout
// The content elements (mirrored from /datum/html_interface) currently visible to the client.
var/list/content_elements = new/list()
// The current title for this client
var/title
// TRUE if the browser control has loaded and will accept input, FALSE if not.
var/is_loaded = FALSE
// TRUE if this client should receive updates, FALSE if not.
var/active = TRUE
// A list of extra variables, for use by extensions.
var/list/extra_vars
/datum/html_interface_client/New(client/client)
. = ..()
src.client = client
/datum/html_interface_client/proc/putExtraVar(key, value)
if (!src.extra_vars) src.extra_vars = new/list()
src.extra_vars[key] = value
/datum/html_interface_client/proc/removeExtraVar(key)
if (src.extra_vars)
. = src.extra_vars[key]
src.extra_vars.Remove(key)
if (!src.extra_vars.len) src.extra_vars = null
return .
/datum/html_interface_client/proc/getExtraVar(key)
if (src.extra_vars) return src.extra_vars[key]
File diff suppressed because one or more lines are too long
@@ -0,0 +1,315 @@
body
{
background-color: #272727;
background-image: url(uiBg.png);
background-repeat: repeat-x;
background-position: center top;
font-family: verdana,Geneva,sans-serif;
font-size: 12px;
color: #FFFFFF;
line-height: 170%; /* NullQuery: 170% of what? */
}
#ntbgcenter
{
position: absolute;
top: 0px;
left: 0px;
right: 0px;
height: 246px;
background-image: url(uiBgcenter.png);
background-position: center;
background-repeat: no-repeat;
z-index: -1;
}
#content
{
padding: 8px;
font-family: Verdana, Geneva, sans-serif;
}
hr
{
background-color: #40628a;
height: 1px;
}
a, a:link, a:visited, a:active, .linkOn, .linkOff
{
color: #ffffff;
text-decoration: none;
background: #40628a;
border: 1px solid #161616;
padding: 1px 4px 1px 4px;
margin: 0 2px 0 0;
cursor:default;
}
a.nobg, a.nobg:link, a.nobg:visited, a.nobg:active
{
color: #ffffff;
text-decoration: none;
background: transparent;
border: none;
padding: 0px;
margin: 0px;
cursor:default;
font-weight:bold;
}
a.nobg:hover
{
color:#40628a;
}
a:hover
{
color: #40628a;
background: #ffffff;
}
a.white, a.white:link, a.white:visited, a.white:active
{
color: #40628a;
text-decoration: none;
background: #ffffff;
border: 1px solid #161616;
padding: 1px 4px 1px 4px;
margin: 0 2px 0 0;
cursor:default;
}
a.white:hover
{
color: #ffffff;
background: #40628a;
}
.linkOn, a.linkOn:link, a.linkOn:visited, a.linkOn:active, a.linkOn:hover
{
color: #ffffff;
background: #2f943c;
border-color: #24722e;
}
.linkOff, a.linkOff:link, a.linkOff:visited, a.linkOff:active, a.linkOff:hover
{
color: #ffffff;
background: #999999;
border-color: #666666;
}
a.icon, .linkOn.icon, .linkOff.icon
{
position: relative;
padding: 1px 4px 2px 20px;
}
a.icon img, .linkOn.icon img
{
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 18px;
}
ul
{
padding: 4px 0 0 10px;
margin: 0;
list-style-type: none;
}
li
{
padding: 0 0 2px 0;
}
img, a img
{
border-style:none;
}
h1, h2, h3, h4, h5, h6
{
margin: 0;
padding: 16px 0 8px 0;
color: #517087;
}
h1
{
font-size: 15px;
}
h2
{
font-size: 14px;
}
h3
{
font-size: 13px;
}
h4
{
font-size: 12px;
}
.good
{
color: #00ff00;
}
.average
{
color: #d09000;
}
.bad
{
color: #ff0000;
}
.highlight
{
color: #8BA5C4;
}
.dark
{
color: #272727;
}
.notice
{
position: relative;
background: #E9C183;
color: #15345A;
font-size: 10px;
font-style: italic;
padding: 2px 4px 0 4px;
margin: 4px;
}
.notice.icon
{
padding: 2px 4px 0 20px;
}
.notice img
{
position: absolute;
top: 0;
left: 0;
width: 16px;
height: 16px;
}
div.notice
{
clear: both;
}
.statusDisplay
{
background: #000000;
color: #ffffff;
border: 1px solid #40628a;
padding: 4px;
margin: 3px 0;
}
.statusLabel
{
width: 138px;
float: left;
overflow: hidden;
color: #98B0C3;
}
.statusValue
{
float: left;
}
.block
{
padding: 8px;
margin: 10px 4px 4px 4px;
border: 1px solid #40628a;
background-color: #202020;
}
.block h3
{
padding: 0;
}
.progressBar
{
width: 240px;
height: 14px;
border: 1px solid #666666;
float: left;
margin: 0 5px;
overflow: hidden;
}
.progressFill
{
width: 100%;
height: 100%;
background: #40628a;
overflow: hidden;
}
.progressFill.good
{
color: #ffffff;
background: #00ff00;
}
.progressFill.average
{
color: #ffffff;
background: #d09000;
}
.progressFill.bad
{
color: #ffffff;
background: #ff0000;
}
.progressFill.highlight
{
color: #ffffff;
background: #8BA5C4;
}
.clearBoth
{
clear: both;
}
.clearLeft
{
clear: left;
}
.clearRight
{
clear: right;
}
.line
{
width: 100%;
clear: both;
}
@@ -0,0 +1,175 @@
/*
Author: NullQuery
Created on: 2014-09-25
Extension to implement Nanotrasen styled windows.
Additional procs:
hi.setEyeColor(color, client)
Use this to set the color of the 'eye' in the top-left corner of the window.
The client is optional and may be a /mob, /client or /html_interface_client object. It must be specified, since the eye icon is specific to a client.
*/
/datum/html_interface/nanotrasen/New()
. = ..()
// Add appropriate CSS and set the default layout.
src.head = src.head + "<link rel=\"stylesheet\" type=\"text/css\" href=\"nanotrasen.css\" />"
src.updateLayout("")
/datum/html_interface/updateLayout(layout)
// Wrap the layout in our custom HTML
return ..("<div id=\"ntbgcenter\"></div><div id=\"content\">[layout]</div>")
/datum/html_interface/specificRenderTitle(datum/html_interface_client/hclient, ignore_cache = FALSE)
// Update the title in our custom header (in addition to default functionality)
winset(hclient.client, "browser_\ref[src].uiTitle", list2params(list("text" = "[src.title]")))
/datum/html_interface/nanotrasen/sendResources(client/client)
. = ..() // we need the default resources
client << browse_rsc('uiBg.png')
client << browse_rsc('uiBgcenter.png')
client << browse_rsc('nanotrasen.css')
/datum/html_interface/nanotrasen/createWindow(datum/html_interface_client/hclient)
. = ..() // we want the default window
// Remove the titlebar
winset(hclient.client, "browser_\ref[src]", list2params(list(
"titlebar" = "false"
)))
// Reposition the browser
winset(hclient.client, "browser_\ref[src].browser", list2params(list(
"pos" = "0,35",
"size" = "[width]x[height - 35]"
)))
// Add top background image
winset(hclient.client, "browser_\ref[src].topbg", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "label",
"pos" = "0,0",
"size" = "[width]x35",
"anchor1" = "0,0",
"anchor2" = "100,0",
"image" = "['uiBgtop.png']",
"image-mode" = "tile",
"is-disabled" = "true"
)))
// Add Nanotrasen logo
winset(hclient.client, "browser_\ref[src].uiTitleFluff", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "label",
"pos" = "[width - 42 - 4 - 24 - 4 - 24 - 4],5",
"size" = "42x24",
"anchor1" = "100,0",
"anchor2" = "100,0",
"image" = "['uiTitleFluff.png']",
"image-mode" = "tile",
"is-disabled" = "true"
)))
// Add Eye picture
winset(hclient.client, "browser_\ref[src].uiTitleEye", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "label",
"pos" = "8,5",
"size" = "42x24",
"anchor1" = "0,0",
"anchor2" = "0,0",
"image" = "['uiEyeGreen.png']",
"image-mode" = "tile",
"is-disabled" = "true"
)))
// Add title text
winset(hclient.client, "browser_\ref[src].uiTitle", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "label",
"is-transparent" = "true",
"pos" = "64,0",
"size" = "580x35",
"anchor1" = "0,0",
"anchor2" = "100,0",
"is-disabled" = "true",
"text" = "[src.title]",
"align" = "left",
"font-family" = "verdana,Geneva,sans-serif",
"font-size" = "12", // ~ 16px
"text-color" = "#E9C183"
)))
// Add minimize button
// TODO: Style the button (add image)
winset(hclient.client, "browser_\ref[src].uiTitleMinimize", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "button",
"is-flat" = "true",
"background-color"="#383838", // should be unnecessary if image is used
"text-color" = "#FFFFFF", // should be unnecessary if image is used
"is-transparent" = "true",
"pos" = "[width - 24 - 4 - 24 - 4],5",
"size" = "24x24",
"anchor1" = "100,0",
"anchor2" = "100,0",
"text" = "-",
"font-family" = "verdana,Geneva,sans-serif", // should be unnecessary if image is used
"font-size" = "12", // ~ 16px - should be unnecessary if image is used
// Disable resizing (disables maximizing), minimize window, bind window.on-size to catch 'restore window' button to enable resizing if restored.
"command" = ".winset \"browser_\ref[src].can-resize=false;browser_\ref[src].is-minimized=true;browser_\ref[src].on-size=\".swinset \\\"browser_\ref[src].can-resize=true;browser_\ref[src].on-size=\\\"\"\""
)))
// Add close button
// TODO: Style the button (add image)
winset(hclient.client, "browser_\ref[src].uiTitleClose", list2params(list(
"parent" = "browser_\ref[src]",
"type" = "button",
"is-flat" = "true",
"background-color"="#383838", // should be unnecessary if image is used
"text-color" = "#FFFFFF", // should be unnecessary if image is used
"command" = "byond://?src=\ref[src];html_interface_action=onclose",
"is-transparent" = "true",
"pos" = "[width - 24 - 4],5",
"size" = "24x24",
"anchor1" = "100,0",
"anchor2" = "100,0",
"text" = "X",
"font-family" = "verdana,Geneva,sans-serif", // should be unnecessary if image is used
"font-size" = "12" // ~ 16px - should be unnecessary if image is used
)))
/datum/html_interface/nanotrasen/enableFor(datum/html_interface_client/hclient)
. = ..()
src.setEyeColor("green", hclient)
/datum/html_interface/nanotrasen/disableFor(datum/html_interface_client/hclient)
hclient.active = FALSE
src.setEyeColor("red", hclient)
/datum/html_interface/nanotrasen/proc/setEyeColor(color, datum/html_interface_client/hclient)
hclient = getClient(hclient)
if (istype(hclient))
var/resource
switch (color)
if ("green") resource = 'uiEyeGreen.png'
if ("orange") resource = 'uiEyeOrange.png'
if ("red") resource = 'uiEyeRed.png'
else CRASH("Invalid color: [color]")
if (hclient.getExtraVar("eye_color") != color)
hclient.putExtraVar("eye_color", color)
winset(hclient.client, "browser_\ref[src].uiTitleEye", list2params(list("image" = "[resource]")))
else
WARNING("Invalid object passed to /datum/html_interface/nanotrasen/proc/setEyeColor")
Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

+1
View File
@@ -20,6 +20,7 @@
icon = 'icons/obj/hydroponics/harvest.dmi'
potency = -1
dried_type = -1 //bit different. saves us from having to define each stupid grown's dried_type as itself. If you don't want a plant to be driable (watermelons) set this to null in the time definition.
burn_state = 0 //Burnable
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, new_potency = 50)
..()
@@ -5,6 +5,7 @@
/obj/item/weapon/grown // Grown weapons
name = "grown_weapon"
icon = 'icons/obj/hydroponics/harvest.dmi'
burn_state = 0 //Burnable
var/seed = null
var/plantname = ""
var/product //a type path
+2 -2
View File
@@ -730,7 +730,7 @@
user.visible_message("[user] begins to wrench [src] into place.", \
"<span class='notice'>You begin to wrench [src] in place...</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 20))
if (do_after(user, 20, target = src))
if(anchored)
return
anchored = 1
@@ -740,7 +740,7 @@
user.visible_message("[user] begins to unwrench [src].", \
"<span class='notice'>You begin to unwrench [src]...</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 20))
if (do_after(user, 20, target = src))
if(!anchored)
return
anchored = 0
+1
View File
@@ -7,6 +7,7 @@
icon = 'icons/obj/hydroponics/seeds.dmi'
icon_state = "seed" //Unknown plant seed - these shouldn't exist in-game.
w_class = 1 //Pocketable.
burn_state = 0 //Burnable
var/plantname = "Plants" //Name of plant when planted.
var/product //A type path. The thing that is created when the plant is harvested.
var/species = "" //Used to update icons. Should match the name in the sprites.
+6 -3
View File
@@ -17,6 +17,8 @@
anchored = 0
density = 1
opacity = 0
burn_state = 0 //Burnable
burntime = 30
var/state = 0
var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/book) //Things allowed in the bookcase
@@ -36,13 +38,13 @@
if(0)
if(istype(I, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
if(do_after(user, 20))
if(do_after(user, 20, target = src))
user << "<span class='notice'>You wrench the frame into place.</span>"
anchored = 1
state = 1
if(istype(I, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 20))
if(do_after(user, 20, target = src))
user << "<span class='notice'>You pry the frame apart.</span>"
new /obj/item/stack/sheet/mineral/wood(loc, 4)
qdel(src)
@@ -165,6 +167,7 @@
throw_range = 5
w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever)
attack_verb = list("bashed", "whacked", "educated")
burn_state = 0 //Burnable
var/dat //Actual page content
var/due_date = 0 //Game time in 1/10th seconds
var/author //Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
@@ -253,7 +256,7 @@
else if(istype(I, /obj/item/weapon/kitchen/knife) || istype(I, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You begin to carve out [title]...</span>"
if(do_after(user, 30))
if(do_after(user, 30, target = src))
user << "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>"
var/obj/item/weapon/storage/book/B = new
B.name = src.name
+212
View File
@@ -0,0 +1,212 @@
//Originally coded by ISaidNo, later modified by Kelenius. Ported from Baystation12.
/obj/structure/closet/crate/secure/loot
name = "abandoned crate"
desc = "What could be inside?"
icon_crate = "securecrate"
icon_state = "securecrate"
var/code = null
var/lastattempt = null
var/attempts = 10
var/codelen = 4
locked = 1
/obj/structure/closet/crate/secure/loot/New()
..()
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
code = ""
for(var/i = 0, i < codelen, i++)
var/dig = pick(digits)
code += dig
digits -= dig //Player can enter codes with matching digits, but there are never matching digits in the answer
var/loot = rand(1,100) //100 different crates with varying chances of spawning
switch(loot)
if(1 to 5) //5% chance
new /obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src)
new /obj/item/weapon/lighter(src)
if(6 to 10)
new /obj/item/weapon/bedsheet(src)
new /obj/item/weapon/kitchen/knife(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/hatchet(src)
new /obj/item/weapon/crowbar(src)
if(11 to 15)
new /obj/item/weapon/reagent_containers/glass/beaker/bluespace(src)
if(16 to 20)
for(var/i = 0, i < 10, i++)
new /obj/item/weapon/ore/diamond(src)
if(21 to 25)
for(var/i = 0, i < 5, i++)
new /obj/item/weapon/contraband/poster(src)
if(26 to 30)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/reagent_containers/glass/beaker/noreact(src)
if(31 to 35)
new /obj/item/seeds/cashseed(src)
if(36 to 40)
new /obj/item/weapon/melee/baton(src)
if(41 to 45)
new /obj/item/clothing/under/shorts/red(src)
new /obj/item/clothing/under/shorts/blue(src)
if(46 to 50)
new /obj/item/clothing/under/chameleon(src)
for(var/i = 0, i < 7, i++)
new /obj/item/clothing/tie/horrible(src)
if(51 to 52) // 2% chance
new /obj/item/weapon/melee/classic_baton(src)
if(53 to 54)
new /obj/item/toy/balloon(src)
if(55 to 56)
var/newitem = pick(typesof(/obj/item/toy/prize) - /obj/item/toy/prize)
new newitem(src)
if(57 to 58)
new /obj/item/toy/syndicateballoon(src)
if(59 to 60)
new /obj/item/weapon/pickaxe/drill(src)
new /obj/item/device/taperecorder(src)
new /obj/item/clothing/suit/space(src)
new /obj/item/clothing/head/helmet/space(src)
if(61 to 62)
for(var/i = 0, i < 12, ++i)
new /obj/item/clothing/head/kitty(src)
if(63 to 64)
var/t = rand(4,7)
for(var/i = 0, i < t, ++i)
var/newcoin = pick(/obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/diamond, /obj/item/weapon/coin/plasma, /obj/item/weapon/coin/uranium)
new newcoin(src)
if(65 to 66)
new /obj/item/clothing/suit/ianshirt(src)
if(67 to 68)
var/t = rand(4,7)
for(var/i = 0, i < t, ++i)
var /newitem = pick(typesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts - /obj/item/weapon/stock_parts/subspace)
new newitem(src)
if(69 to 70)
for(var/i = 0, i < 5, ++i)
new /obj/item/bluespace_crystal(src)
if(71 to 72)
new /obj/item/weapon/pickaxe/drill(src)
if(73 to 74)
new /obj/item/weapon/pickaxe/drill/jackhammer(src)
if(75 to 76)
new /obj/item/weapon/pickaxe/diamond(src)
if(77 to 78)
new /obj/item/weapon/pickaxe/drill/diamonddrill(src)
if(79 to 80)
new /obj/item/weapon/cane(src)
new /obj/item/clothing/head/collectable/tophat(src)
if(81 to 82)
new /obj/item/weapon/gun/energy/plasmacutter(src)
if(83 to 84)
new /obj/item/toy/katana(src)
if(85 to 86)
new /obj/item/weapon/defibrillator/compact(src)
if(87) //1% chance
new /obj/item/weed_extract(src)
if(88)
new /obj/item/organ/brain(src)
if(89)
new /obj/item/organ/brain/alien(src)
if(90)
new /obj/item/organ/heart(src)
if(91)
new /obj/item/device/soulstone/anybody(src)
if(92)
new /obj/item/weapon/katana(src)
if(93)
new /obj/item/weapon/dnainjector/xraymut(src)
if(94)
new /obj/item/weapon/storage/backpack/clown(src)
new /obj/item/clothing/under/rank/clown(src)
new /obj/item/clothing/shoes/clown_shoes(src)
new /obj/item/device/pda/clown(src)
new /obj/item/clothing/mask/gas/clown_hat(src)
new /obj/item/weapon/bikehorn(src)
new /obj/item/toy/crayon/rainbow(src)
new /obj/item/weapon/reagent_containers/spray/waterflower(src)
if(95)
new /obj/item/clothing/under/rank/mime(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/device/pda/mime(src)
new /obj/item/clothing/gloves/color/white(src)
new /obj/item/clothing/mask/gas/mime(src)
new /obj/item/clothing/head/beret(src)
new /obj/item/clothing/suit/suspenders(src)
new /obj/item/toy/crayon/mime(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(src)
if(96)
new /obj/item/weapon/hand_tele(src)
if(97)
new /obj/item/clothing/mask/balaclava
new /obj/item/weapon/gun/projectile/automatic/pistol(src)
new /obj/item/ammo_box/magazine/m10mm(src)
if(98)
new /obj/item/weapon/katana/cursed(src)
if(99)
new /obj/item/weapon/storage/belt/champion(src)
new /obj/item/clothing/mask/luchador(src)
if(100)
new /obj/item/clothing/head/bearpelt(src)
/obj/structure/closet/crate/secure/loot/attack_hand(mob/user as mob)
if(locked)
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
if(user.canUseTopic(src, 1))
if (input == code)
user << "<span class='notice'>The crate unlocks!</span>"
locked = 0
overlays.Cut()
overlays += greenlight
else if (input == null || length(input) != codelen)
user << "<span class='notice'>You leave the crate alone.</span>"
else
user << "<span class='warning'>A red light flashes.</span>"
lastattempt = input
attempts--
if (attempts == 0)
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, -1, -1, 1, 1)
qdel(src)
return
else
return ..()
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/weapon/card/emag))
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, -1, -1, 1, 1)
qdel(src)
return
if (istype(W, /obj/item/device/multitool))
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
if (attempts == 1)
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
else
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
if (lastattempt != null)
var/list/guess = list()
var/bulls = 0
var/cows = 0
for(var/i = 1, i < codelen + 1, i++)
var/a = copytext(lastattempt, i, i+1) //Stuff the code into the list
guess += a
guess[a] = i
for(var/i in guess) //Go through list and count matches
var/a = findtext(code, i)
if(a == guess[i])
++bulls
else if(a)
++cows
user << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
else ..()
else ..()
+1 -1
View File
@@ -431,7 +431,7 @@ var/global/list/rockTurfEdgeCache
user << "<span class='notice'>You start picking...</span>"
P.playDigSound()
if(do_after(user,P.digspeed))
if(do_after(user,P.digspeed, target = src))
if(istype(src, /turf/simulated/mineral)) //sanity check against turf being deleted during digspeed delay
user << "<span class='notice'>You finish cutting into the rock.</span>"
P.update_icon()
+2
View File
@@ -8,6 +8,8 @@
force = 10.0
throwforce = 0
w_class = 4.0
burn_state = 0 //Burnable
burntime = 20
/obj/item/weapon/moneybag/attack_hand(user as mob)
var/amt_gold = 0
+1 -1
View File
@@ -326,7 +326,7 @@
flick("coin_[cmineral]_flip", src)
icon_state = "coin_[cmineral]_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
if(do_after(user, 15))
if(do_after(user, 15, target = src))
user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
"<span class='italics'>You hear the clattering of loose change.</span>")
@@ -84,7 +84,9 @@
overlays.Cut()
if(stat == DEAD)
icon_state = "queen_dead"
else if(stat == UNCONSCIOUS || lying || resting)
else if((stat == UNCONSCIOUS && !sleeping) || weakened)
icon_state = "queen_l"
else if(sleeping || lying || resting)
icon_state = "queen_sleep"
else
icon_state = "queen_s"
@@ -64,4 +64,5 @@
return 1
/mob/living/carbon/alien/CheckStamina()
setStaminaLoss(max((staminaloss - 2), 0))
return
@@ -15,9 +15,10 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
flags = MASKINTERNALS
throw_range = 5
tint = 3
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
+1 -1
View File
@@ -41,7 +41,7 @@
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>"
return
if(!user.unEquip(src))
if(!user.unEquip(O))
return
var/mob/living/carbon/brain/B = newbrain.brainmob
if(!B.key)
@@ -51,7 +51,7 @@
return ..()
var/mob/living/carbon/human/H = M
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
user << "<span class='warning'>You're going to need to remove their head cover first!</span>"
return
@@ -78,17 +78,13 @@ var/global/posibrain_notif_cooldown = 0
return
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
if(brainmob && brainmob.key) //Prevents hostile takeover if two ghosts get the prompt for the same brain.
if(brainmob && brainmob.key) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain.
candidate << "This brain has already been taken! Please try your possesion again later!"
return
notified = 0
brainmob.mind = candidate.mind
brainmob.ckey = candidate.ckey
name = "positronic brain ([brainmob.name])"
brainmob.mind.remove_all_antag()
brainmob.mind.wipe_memory()
brainmob << "<span class='warning'>ALL PAST LIVES ARE FORGOTTEN.</span>"
brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
+9 -7
View File
@@ -38,9 +38,10 @@
/mob/living/carbon/relaymove(var/mob/user, direction)
if(user in src.stomach_contents)
if(prob(40))
audible_message("<span class='warning'>You hear something rumbling inside [src]'s stomach...</span>", \
"<span class='warning'>You hear something rumbling.</span>", 4,\
"<span class='userdanger'>Something is rumbling inside your stomach!</span>")
if(prob(25))
audible_message("<span class='warning'>You hear something rumbling inside [src]'s stomach...</span>", \
"<span class='warning'>You hear something rumbling.</span>", 4,\
"<span class='userdanger'>Something is rumbling inside your stomach!</span>")
var/obj/item/I = user.get_active_hand()
if(I && I.force)
var/d = rand(round(I.force / 4), I.force)
@@ -407,7 +408,7 @@ var/const/GALOSHES_DONT_HELP = 8
last_special = world.time + CLICK_CD_BREAKOUT
visible_message("<span class='warning'>[src] attempts to unbuckle themself!</span>", \
"<span class='notice'>You attempt to unbuckle yourself... (This will take around one minute and you need to stay still.)</span>")
if(do_after(src, 600, needhand = 0))
if(do_after(src, 600, needhand = 0, target = src))
if(!buckled)
return
buckled.user_unbuckle_mob(src,src)
@@ -450,7 +451,7 @@ var/const/GALOSHES_DONT_HELP = 8
if(!cuff_break)
visible_message("<span class='warning'>[src] attempts to remove [I]!</span>")
src << "<span class='notice'>You attempt to remove [I]... (This will take around [displaytime] minutes and you need to stand still.)</span>"
if(do_after(src, breakouttime, 10, 0))
if(do_after(src, breakouttime, 10, 0, target = src))
if(I.loc != src || buckled)
return
visible_message("<span class='danger'>[src] manages to remove [I]!</span>")
@@ -466,6 +467,7 @@ var/const/GALOSHES_DONT_HELP = 8
return
if(legcuffed)
legcuffed.loc = loc
legcuffed.dropped()
legcuffed = null
update_inv_legcuffed(0)
else
@@ -475,7 +477,7 @@ var/const/GALOSHES_DONT_HELP = 8
breakouttime = 50
visible_message("<span class='warning'>[src] is trying to break [I]!</span>")
src << "<span class='notice'>You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)</span>"
if(do_after(src, breakouttime, needhand = 0))
if(do_after(src, breakouttime, needhand = 0, target = src))
if(!I.loc || buckled)
return
visible_message("<span class='danger'>[src] manages to break [I]!</span>")
@@ -493,7 +495,7 @@ var/const/GALOSHES_DONT_HELP = 8
src << "<span class='warning'>You fail to break [I]!</span>"
/mob/living/carbon/proc/is_mouth_covered(head_only = 0, mask_only = 0)
if( (!mask_only && head && (head.flags & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)) )
if( (!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)) )
return 1
/mob/living/carbon/get_standard_pixel_y_offset(lying = 0)
@@ -116,17 +116,17 @@
gib()
return
else
shred_clothing(1,150)
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(target, 200, 4)
//return
// var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
//user.throw_at(target, 200, 4)
if (2.0)
b_loss += 60
f_loss += 60
shred_clothing(1,50)
if (prob(getarmor(null, "bomb")))
b_loss = b_loss/1.5
f_loss = f_loss/1.5
@@ -140,6 +140,8 @@
b_loss += 30
if (prob(getarmor(null, "bomb")))
b_loss = b_loss/2
else
shred_clothing(1,10)
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(15,60)
if (prob(50))
@@ -284,7 +286,7 @@
return
var/time_taken = I.embedded_unsafe_removal_time*I.w_class
usr.visible_message("<span class='warning'>[usr] attempts to remove [I] from their [L.getDisplayName()].</span>","<span class='notice'>You attempt to remove [I] from your [L.getDisplayName()]... (It will take [time_taken/10] seconds.)</span>")
if(do_after(usr, time_taken, needhand = 1))
if(do_after(usr, time_taken, needhand = 1, target = src))
L.embedded_objects -= I
L.take_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus.
I.loc = get_turf(src)
@@ -14,7 +14,7 @@
"<span class='userdanger'>[M] has lunged at [src]!</span>")
return 0
var/obj/item/organ/limb/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
var/armor_block = run_armor_check(affecting, "melee","","",10)
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
@@ -10,9 +10,10 @@
total_brute += O.brute_dam
total_burn += O.burn_dam
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
//TODO: fix husking
if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD )
ChangeToHusk()
if(bodytemperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
shred_clothing()
med_hud_set_health()
med_hud_set_status()
return
@@ -50,7 +51,7 @@
var/loose = 40
if(stat || (status_flags & FAKEDEATH))
multiplier = 2
if(H.flags & (HEADCOVERSEYES | HEADCOVERSMOUTH) || H.flags_inv & (HIDEEYES | HIDEFACE))
if(H.flags_cover & (HEADCOVERSEYES | HEADCOVERSMOUTH) || H.flags_inv & (HIDEEYES | HIDEFACE))
loose = 0
return loose * multiplier
@@ -151,8 +151,9 @@ emp_act
else
return 0
var/armor = run_armor_check(affecting, "melee", "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>")
if(armor >= 100) return 0
var/armor = run_armor_check(affecting, "melee", "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>", I.armour_penetration)
armor = min(90,armor) //cap damage reduction at 90%
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
apply_damage(I.force, I.damtype, affecting, armor , I)
@@ -188,7 +189,7 @@ emp_act
visible_message("<span class='danger'>[src] has been knocked unconscious!</span>", \
"<span class='userdanger'>[src] has been knocked unconscious!</span>")
apply_effect(20, PARALYZE, armor)
if(prob(I.force + ((100 - src.health)/2)) && src != user && I.damtype == BRUTE)
if(prob(I.force + min(100,100 - src.health)) && src != user && I.damtype == BRUTE)
ticker.mode.remove_revolutionary(mind)
ticker.mode.remove_gangster(mind, exclude_bosses=1)
if(bloody) //Apply blood
@@ -384,8 +385,6 @@ emp_act
var/armor = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor)
updatehealth()
/* if(armor >= 2) //why is this here?
return */
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
@@ -390,3 +390,83 @@
src << "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
return
//Cycles through all clothing slots and tests them for destruction
/mob/living/carbon/human/proc/shred_clothing(var/bomb,var/shock)
var/covered_parts //The body parts that are protected by exterior clothing/armor
var/head_absorbed = 0 //How much of the shock the headgear absorbs when it is shredded. -1=it survives
var/suit_absorbed = 0 //How much of the shock the exosuit absorbs when it is shredded. -1=it survives
//Backpacks can never be protected but are annoying as fuck to lose, so they get a lower chance to be shredded
if(back)
back.shred(bomb,shock-30,src)
if(head)
covered_parts |= head.flags_inv
head_absorbed = head.shred(bomb,shock,src)
if(wear_mask)
var/absorbed = ((covered_parts & HIDEMASK) ? head_absorbed : 0) //Check if clothing covering this part absorbed any of the shock
if(!(absorbed < 0))
//Masks can be used to shield other parts, but are simplified to simply add their absorbsion to the head armor if it covers the face
var/mask_absorbed = wear_mask.shred(bomb,shock-absorbed,src)
if(wear_mask.flags_inv & HIDEFACE)
covered_parts |= wear_mask.flags_inv
if(mask_absorbed < 0) //If the mask didn't get shredded, everything else on the head is protected
head_absorbed = -1
else
head_absorbed += mask_absorbed
if(ears)
var/absorbed = ((covered_parts & HIDEEARS) ? head_absorbed : 0)
if(!(absorbed < 0))
ears.shred(bomb,shock-absorbed,src)
if(glasses)
var/absorbed = ((covered_parts & HIDEEYES) ? head_absorbed : 0)
if(!(absorbed < 0))
glasses.shred(bomb,shock-absorbed,src)
if(wear_suit)
covered_parts |= wear_suit.flags_inv
suit_absorbed = wear_suit.shred(bomb,shock,src)
if(gloves)
var/absorbed = ((covered_parts & HIDEGLOVES) ? suit_absorbed : 0)
if(!(absorbed < 0))
gloves.shred(bomb,shock-absorbed,src)
if(shoes)
var/absorbed = ((covered_parts & HIDESHOES) ? suit_absorbed : 0)
if(!(absorbed < 0))
shoes.shred(bomb,shock-absorbed,src)
if(w_uniform)
var/absorbed = ((covered_parts & HIDEJUMPSUIT) ? suit_absorbed : 0)
if(!(absorbed < 0))
w_uniform.shred(bomb,shock-absorbed,src)
/obj/item/proc/shred(var/bomb,var/shock,var/mob/living/carbon/human/Human)
var/shredded
if(!bomb)
if(burn_state != -1)
shredded = 1 //No heat protection, it burns
else
shredded = -1 //Heat protection = Fireproof
else if(shock > 0)
if(prob(min(90,max(10,shock))))
shredded = armor["bomb"] + 10 //It gets shredded, but it also absorbs the shock the clothes underneath would recieve by this amount
else
shredded = -1 //It survives explosion
if(shredded > 0)
if(Human) //Unequip if equipped
Human.unEquip(src)
if(bomb)
for(var/obj/item/Item in contents) //Empty out the contents
Item.loc = src.loc
spawn(1) //so the shreds aren't instantly deleted by the explosion
var/obj/effect/decal/cleanable/shreds/Shreds = new(loc)
Shreds.name = "shredded [src.name]"
Shreds.desc = "The sad remains of what used to be a glorious [src.name]."
qdel(src)
else
burn()
return shredded
@@ -923,8 +923,8 @@
else
return 0
var/armor = H.run_armor_check(affecting, "melee", "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>")
if(armor >= 100) return 0
var/armor = H.run_armor_check(affecting, "melee", "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>",I.armour_penetration)
armor = min(90,armor) //cap damage reduction at 90%
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
apply_damage(I.force, I.damtype, affecting, armor, H)
@@ -1,6 +1,8 @@
/mob/living/carbon/human/whisper(message as text)
if(!IsVocal())
return
if(!message)
return
if(say_disabled) //This is here to try to identify lag problems
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
@@ -9,18 +11,18 @@
if(stat == DEAD)
return
message = trim(html_encode(message))
if(!can_speak(message))
return
message = "[message]"
message = "[message]"
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)
if (src.client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot whisper (muted).</span>"
return
return
log_whisper("[src.name]/[src.key] : [message]")
@@ -66,13 +68,17 @@
var/spans = list(SPAN_ITALICS)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[attach_spans(message, spans)]\"</span></span>"
for(var/mob/M in listening)
M.Hear(rendered, src, languages, message, , spans)
for(var/atom/movable/AM in listening)
if(istype(AM,/obj/item/device/radio))
continue
AM.Hear(rendered, src, languages, message, , spans)
message = stars(message)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[attach_spans(message, spans)]\"</span></span>"
for(var/mob/M in eavesdropping)
M.Hear(rendered, src, languages, message, , spans)
for(var/atom/movable/AM in eavesdropping)
if(istype(AM,/obj/item/device/radio))
continue
AM.Hear(rendered, src, languages, message, , spans)
if(critical) //Dying words.
succumb(1)
+1 -1
View File
@@ -5,7 +5,7 @@
return message
/mob/living/carbon/can_speak_basic(message)
/mob/living/carbon/can_speak_vocal(message)
if(silent)
return 0
return ..()
+3 -2
View File
@@ -3,6 +3,9 @@
//Intended to be called by a higher up emote proc if the requested emote isn't in the custom emotes.
/mob/living/emote(var/act, var/m_type=1, var/message = null)
if(stat)
return
var/param = null
if (findtext(act, "-", 1, null))
@@ -150,8 +153,6 @@
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
else
+1
View File
@@ -62,6 +62,7 @@
return
/mob/living/proc/handle_mutations_and_radiation()
radiation = 0 //so radiation don't accumulate in simple animals
return
/mob/living/proc/handle_chemicals_in_body()
+5 -2
View File
@@ -673,10 +673,13 @@ Sorry Giacom. Please don't be mad :(
/mob/living/proc/float(on)
if(throwing)
return
if(on && !floating)
var/fixed = 0
if(anchored || (buckled && buckled.anchored))
fixed = 1
if(on && !floating && !fixed)
animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1)
floating = 1
else if(!on && floating)
else if(((!on || fixed) && floating))
var/final_pixel_y = get_standard_pixel_y_offset(lying)
animate(src, pixel_y = final_pixel_y, time = 10)
floating = 0
+13 -4
View File
@@ -1,5 +1,14 @@
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = null, soften_text = null)
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = null, soften_text = null, var/armour_penetration, var/penetrated_text)
var/armor = getarmor(def_zone, attack_flag)
//the if "armor" check is because this is used for everything on /living, including humans
if(armor && armour_penetration)
armor = max(0, armor - armour_penetration)
if(penetrated_text)
src << "<span class='userdanger'>[penetrated_text]</span>"
else
src << "<span class='userdanger'>Your armor was penetrated!</span>"
if(armor >= 100)
if(absorb_text)
src << "<span class='userdanger'>[absorb_text]</span>"
@@ -20,7 +29,7 @@
return
/mob/living/bullet_act(obj/item/projectile/P, def_zone)
var/armor = run_armor_check(def_zone, P.flag)
var/armor = run_armor_check(def_zone, P.flag, "","",P.armour_penetration)
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, armor)
return P.on_hit(src, armor, def_zone)
@@ -60,7 +69,7 @@
visible_message("<span class='danger'>[src] has been hit by [I].</span>", \
"<span class='userdanger'>[src] has been hit by [I].</span>")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, I)
if(!I.fingerprintslast)
return
@@ -219,7 +228,7 @@
return 0
if (M.a_intent == "harm")
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags & MASKCOVERSMOUTH))
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
M << "<span class='warning'>You can't bite with your mouth covered!</span>"
return 0
M.do_attack_animation(src)
+7 -12
View File
@@ -56,6 +56,8 @@ var/list/department_radio_keys = list(
":ï" = "changeling", "#ï" = "changeling", ".ï" = "changeling"
)
var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
/mob/living/say(message, bubble_type,)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
@@ -63,18 +65,17 @@ var/list/department_radio_keys = list(
say_dead(message)
return
if(stat)
return
if(check_emote(message))
return
if(!can_speak_basic(message)) //Stat is seperate so I can handle whispers properly.
src << "<span class='warning'>You find yourself unable to speak!</span>"
return
var/message_mode = get_message_mode(message)
if(stat && !(message_mode in crit_allowed_modes))
return
if(message_mode == MODE_HEADSET || message_mode == MODE_ROBOT)
message = copytext(message, 2)
else if(message_mode)
@@ -86,14 +87,14 @@ var/list/department_radio_keys = list(
return
if(!can_speak_vocal(message))
src << "<span class='warning'>You find yourself unable to speak!</span>" //repetition intended
src << "<span class='warning'>You find yourself unable to speak!</span>"
return
message = treat_message(message)
var/spans = list()
spans += get_spans()
if(!message || message == "")
if(!message)
return
var/message_range = 7
@@ -163,9 +164,6 @@ var/list/department_radio_keys = list(
return 1
/mob/living/proc/can_speak_basic(message) //Check BEFORE handling of xeno and ling channels
if(!message || message == "")
return 0
if(client)
if(client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot speak in IC (muted).</span>"
@@ -176,9 +174,6 @@ var/list/department_radio_keys = list(
return 1
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
if(!message)
return 0
if(disabilities & MUTE)
return 0

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