sync merge

This commit is contained in:
bear1ake
2015-07-23 21:47:13 +09:00
149 changed files with 2072 additions and 1418 deletions
+22 -8
View File
@@ -221,21 +221,21 @@ var/global/floorIsLava = 0
if(6)
dat+="<B><FONT COLOR='maroon'>ERROR: Could not submit Feed story to Network.</B></FONT><HR><BR>"
if(src.admincaster_feed_channel.channel_name=="")
dat+="<FONT COLOR='maroon'>Invalid receiving channel name.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid receiving channel name.</FONT><BR>"
if(src.admincaster_feed_message.returnBody(-1) == "" || src.admincaster_feed_message.returnBody(-1) == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid message body.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid message body.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[3]'>Return</A><BR>"
if(7)
dat+="<B><FONT COLOR='maroon'>ERROR: Could not submit Feed Channel to Network.</B></FONT><HR><BR>"
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid channel name.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid channel name.</FONT><BR>"
var/check = 0
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
check = 1
break
if(check)
dat+="<FONT COLOR='maroon'>Channel name already in use.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Channel name already in use.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[2]'>Return</A><BR>"
if(9)
dat+="<B>[admincaster_feed_channel.channel_name]: </B><FONT SIZE=1>\[created by: <FONT COLOR='maroon'>[admincaster_feed_channel.returnAuthor(-1)]</FONT>\]</FONT><HR>"
@@ -336,9 +336,9 @@ var/global/floorIsLava = 0
if(16)
dat+="<B><FONT COLOR='maroon'>ERROR: Wanted Issue rejected by Network.</B></FONT><HR><BR>"
if(src.admincaster_wanted_message.criminal =="" || src.admincaster_wanted_message.criminal == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid name for person wanted.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid name for person wanted.</FONT><BR>"
if(src.admincaster_wanted_message.body == "" || src.admincaster_wanted_message.body == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid description.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid description.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Return</A><BR>"
if(17)
dat+="<B>Wanted Issue successfully deleted from Circulation</B><BR>"
@@ -406,7 +406,7 @@ var/global/floorIsLava = 0
/datum/admins/proc/restart()
set category = "Server"
set name = "Restart"
set name = "Hard Restart"
set desc="Restarts the world immediately"
if (!usr.client.holder)
return
@@ -418,6 +418,20 @@ var/global/floorIsLava = 0
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
/datum/admins/proc/end_round()
set category = "Server"
set name = "End Round"
set desc = "Attempts to produce a round end report and then restart the server organically."
if (!usr.client.holder)
return
var/confirm = alert("End the round and restart the game world?", "End Round", "Yes", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Yes")
ticker.force_ending = 1
feedback_add_details("admin_verb","ER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/announce()
set category = "Special Verbs"
@@ -790,4 +804,4 @@ var/global/floorIsLava = 0
tomob.ckey = frommob.ckey
qdel(frommob)
return 1
return 1
+5 -2
View File
@@ -98,6 +98,7 @@ var/list/admin_verbs_spawn = list(
var/list/admin_verbs_server = list(
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
/datum/admins/proc/end_round,
/datum/admins/proc/delay,
/datum/admins/proc/toggleaban,
/client/proc/toggle_log_hrefs,
@@ -127,7 +128,8 @@ var/list/admin_verbs_debug = list(
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/proc/machine_upgrade,
/client/proc/populate_world
/client/proc/populate_world,
/client/proc/cmd_display_del_log
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -205,7 +207,8 @@ var/list/admin_verbs_hideable = list(
/client/proc/reset_all_tcs,
/client/proc/panicbunker,
/client/proc/admin_change_sec_level,
/client/proc/toggle_nuke
/client/proc/toggle_nuke,
/client/proc/cmd_display_del_log
)
/client/proc/add_admin_verbs()
+1 -1
View File
@@ -194,7 +194,7 @@
<tr id='title_tr'>
<td align='center'>
<font size='5'><b>Player panel</b></font><br>
Hover over a line to see more information - <a href='?_src_=holder;secretsadmin=check_antagonist'>Check antagonists</a> - Kick <a href='?_src_=holder;secretsadmin=kick_all_from_lobby;afkonly=0'>everyone</a>/<a href='?_src_=holder;secretsadmin=kick_all_from_lobby;afkonly=1'>AFKers</a> in lobby
Hover over a line to see more information - <a href='?_src_=holder;check_antagonist=1'>Check antagonists</a> - Kick <a href='?_src_=holder;kick_all_from_lobby=1;afkonly=0'>everyone</a>/<a href='?_src_=holder;kick_all_from_lobby=1;afkonly=1'>AFKers</a> in lobby
<p>
</td>
</tr>
-22
View File
@@ -166,11 +166,6 @@
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("check_antagonist")
if(!check_rights(R_ADMIN))
return
check_antagonists()
if("moveminingshuttle")
if(!check_rights(R_ADMIN))
return
@@ -198,23 +193,6 @@
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
if("kick_all_from_lobby")
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
var/afkonly = text2num(href_list["afkonly"])
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
usr << "Kick clients from lobby aborted"
return
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>The admin [usr.ckey] issued a 'kick all clients from lobby' command.</span>", afkonly)
var/strkicked = ""
for(var/name in listkicked)
strkicked += "[name], "
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running"
if("showailaws")
if(!check_rights(R_ADMIN))
return
+23 -1
View File
@@ -352,7 +352,6 @@
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
spawn(200) //I wish you would step back from that ledge my friend
if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
ticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
@@ -2056,3 +2055,26 @@
var/datum/newscaster/feed_message/FM = locate(href_list["ac_lock_comment"])
FM.locked ^= 1
src.access_news_network()
else if(href_list["check_antagonist"])
if(!check_rights(R_ADMIN))
return
check_antagonists()
else if(href_list["kick_all_from_lobby"])
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
var/afkonly = text2num(href_list["afkonly"])
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
usr << "Kick clients from lobby aborted"
return
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>You were kicked from the lobby by an Administrator.</span>", afkonly)
var/strkicked = ""
for(var/name in listkicked)
strkicked += "[name], "
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running"
+4 -5
View File
@@ -113,7 +113,7 @@ var/intercom_range_display_status = 0
if (!(F in view(7,I.loc)))
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list()
set category = "Mapping"
set name = "Show roundstart AT list"
@@ -121,14 +121,14 @@ var/intercom_range_display_status = 0
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
for(var/i=1; i<=active_turfs_startlist.len; i++)
dat += active_turfs_startlist[i]
dat += "<br>"
usr << browse(dat, "window=at_list")
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_debug_verbs()
set category = "Debug"
@@ -158,7 +158,6 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/disable_communication
src.verbs += /client/proc/print_pointers
src.verbs += /client/proc/count_movable_instances
src.verbs += /client/proc/cmd_display_del_log
src.verbs += /client/proc/cmd_show_at_list
//src.verbs += /client/proc/cmd_admin_rejuvenate
+3 -1
View File
@@ -21,7 +21,9 @@
return
icon_state = "off"
//prevents shuttles attempting to rotate this since it messes up sprites
/obj/machinery/gateway/shuttleRotate()
return
//this is da important part wot makes things go
/obj/machinery/gateway/centerstation
+5 -5
View File
@@ -259,7 +259,7 @@ BLIND // can't see anything
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
return 1
@@ -390,7 +390,7 @@ atom/proc/generate_female_clothing(index,t_color,icon,type)
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
/obj/item/clothing/proc/weldingvisortoggle() //Malk: proc to toggle welding visors on helmets, masks, goggles, etc.
if(can_use(usr))
@@ -414,11 +414,11 @@ atom/proc/generate_female_clothing(index,t_color,icon,type)
tint = 0
if(istype(src, /obj/item/clothing/head)) //makes the mob-overlays update
usr.update_inv_head(0)
usr.update_inv_head()
if(istype(src, /obj/item/clothing/glasses))
usr.update_inv_glasses(0)
usr.update_inv_glasses()
if(istype(src, /obj/item/clothing/mask))
usr.update_inv_wear_mask(0)
usr.update_inv_wear_mask()
/obj/item/clothing/proc/can_use(mob/user)
if(user && ismob(user))
+4 -4
View File
@@ -58,14 +58,14 @@
flags_inv |= (visor_flags_inv)
icon_state = initial(icon_state)
usr << "[toggle_message] \the [src]."
usr.update_inv_head(0)
usr.update_inv_head()
else
up = !up
flags &= ~(visor_flags)
flags_inv &= ~(visor_flags_inv)
icon_state = "[initial(icon_state)]up"
usr << "[alt_toggle_message] \the [src]"
usr.update_inv_head(0)
usr.update_inv_head()
if(active_sound)
while(up)
playsound(src.loc, "[active_sound]", 100, 0, 4)
@@ -180,7 +180,7 @@
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_head(0)
H.update_inv_head()
return
@@ -214,7 +214,7 @@
update_helmlight(user)
S.update_brightness(user)
update_icon()
usr.update_inv_head(0)
usr.update_inv_head()
verbs -= /obj/item/clothing/head/helmet/proc/toggle_helmlight
return
+1 -1
View File
@@ -38,7 +38,7 @@
else
icon_state = "[item_color]soft"
user << "<span class='notice'>You flip the hat back in normal position.</span>"
usr.update_inv_head(0) //so our mob-overlays update
usr.update_inv_head() //so our mob-overlays update
/obj/item/clothing/head/soft/examine(mob/user)
..()
+1 -1
View File
@@ -29,7 +29,7 @@
magpulse = !magpulse
icon_state = "[magboot_state][magpulse]"
user << "<span class='notice'>You [magpulse ? "enable" : "disable"] the mag-pulse traction system.</span>"
user.update_inv_shoes(0) //so our mob-overlays update
user.update_inv_shoes() //so our mob-overlays update
user.update_gravity(user.mob_has_gravity())
/obj/item/clothing/shoes/magboots/negates_gravity()
+8 -5
View File
@@ -240,6 +240,7 @@
item_state = "hostrench"
burn_state = -1 //Not Burnable
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/weapon/gun/projectile/automatic/pistol,/obj/item/weapon/gun/projectile/revolver,/obj/item/weapon/gun/projectile/revolver/detective)
/obj/item/clothing/suit/jacket/leather/overcoat
name = "leather overcoat"
@@ -264,6 +265,13 @@
cold_protection = CHEST|GROIN
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 30, rad = 0)
/obj/item/clothing/suit/jacket/miljacket
name = "military jacket"
desc = "A canvas jacket styled after classical American military garb. Feels sturdy, yet comfortable."
icon_state = "militaryjacket"
item_state = "militaryjacket"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/weapon/gun/projectile/automatic/pistol,/obj/item/weapon/gun/projectile/revolver,/obj/item/weapon/gun/projectile/revolver/detective)
/obj/item/clothing/suit/xenos
name = "xenos suit"
desc = "A suit made out of chitinous alien hide."
@@ -347,8 +355,3 @@
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"
+3 -3
View File
@@ -43,9 +43,9 @@
priority_announce("Massive bluespace translocation detected.", "Anomaly Alert")
var/list/flashers = list()
for(var/mob/living/carbon/human/M in viewers(TO, null))
if(M.flash_eyes())
flashers += M
for(var/mob/living/carbon/C in viewers(TO, null))
if(C.flash_eyes())
flashers += C
var/y_distance = TO.y - FROM.y
var/x_distance = TO.x - FROM.x
+2 -43
View File
@@ -171,47 +171,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
name = "alien hunter ([rand(1, 1000)])"
return
/obj/effect/hallucination/simple/xeno/throw_at(atom/target, range, speed) // TODO : Make diagonal trhow into proc/property
if(!target || !src || (flags & NODROP)) return 0
src.throwing = 1
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dist_travelled = 0
var/dist_since_sleep = 0
var/tdist_x = dist_x;
var/tdist_y = dist_y;
if(dist_x <= dist_y)
tdist_x = dist_y;
tdist_y = dist_x;
var/error = tdist_x/2 - tdist_y
while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src)))
if(!src.throwing) break
if(!istype(src.loc, /turf)) break
var/atom/step = get_step(src, get_dir(src,target))
if(!step)
break
src.Move(step, get_dir(src, step))
hit_check()
error += (error < 0) ? tdist_x : -tdist_y;
dist_travelled++
dist_since_sleep++
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
src.throwing = 0
src.throw_impact(get_turf(src))
return 1
/obj/effect/hallucination/simple/xeno/throw_impact(A)
update_icon("alienh_pounce")
if(A == target)
@@ -232,10 +191,10 @@ Gunshots/explosions/opening doors/less rare audio (done)
xeno = new(pump.loc,target)
sleep(10)
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32)
xeno.throw_at(target,7,1)
xeno.throw_at(target,7,1, spin = 0, diagonals_first = 1)
sleep(10)
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32)
xeno.throw_at(pump,7,1)
xeno.throw_at(pump,7,1, spin = 0, diagonals_first = 1)
sleep(10)
var/xeno_name = xeno.name
target << "<span class='notice'>[xeno_name] begins climbing into the ventilation system...</span>"
+5 -4
View File
@@ -18,10 +18,11 @@
filling_color = "#F0E68C"
/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/egg_smudge(src.loc)
reagents.reaction(hit_atom, TOUCH)
del(src) // Not qdel, because it'll hit other mobs then the floor for runtimes.
if(!..()) //was it caught by a mob?
var/turf/T = get_turf(hit_atom)
new/obj/effect/decal/cleanable/egg_smudge(T)
reagents.reaction(hit_atom, TOUCH)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W, mob/user, params)
if(istype( W, /obj/item/toy/crayon ))
+5 -4
View File
@@ -23,10 +23,11 @@
list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2)
/obj/item/weapon/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
reagents.reaction(hit_atom, TOUCH)
del(src) // Not qdel, because it'll hit other mobs then the floor for runtimes.
if(!..()) //was it caught by a mob?
var/turf/T = get_turf(hit_atom)
new/obj/effect/decal/cleanable/pie_smudge(T)
reagents.reaction(hit_atom, TOUCH)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/pie/berryclafoutis
+13 -12
View File
@@ -127,11 +127,11 @@ mob/verb/test()
/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')
client << browse_rsc('js/jquery.min.js', "jquery.min.js")
client << browse_rsc('js/bootstrap.min.js', "bootstrap.min.js")
client << browse_rsc('css/bootstrap.min.css', "bootstrap.min.css")
client << browse_rsc('css/html_interface.css', "html_interface.css")
client << browse_rsc('js/html_interface.js', "html_interface.js")
/datum/html_interface/proc/createWindow(datum/html_interface_client/hclient)
winclone(hclient.client, "window", "browser_\ref[src]")
@@ -212,14 +212,15 @@ mob/verb/test()
// causing file not found errors.
// src.sendResources(hclient.client)
if (winexists(hclient.client, "browser_\ref[src]"))
src._renderTitle(hclient, TRUE)
src._renderLayout(hclient)
else
if (!winexists(hclient.client, "browser_\ref[src]"))
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)
//src._renderTitle(hclient, TRUE)
//src._renderLayout(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)
while (hclient.client && hclient.active && !hclient.is_loaded) sleep(2)
@@ -8,6 +8,7 @@
<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="jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="html_interface.js"></script>
</head>
@@ -21,7 +21,7 @@ The client is optional and may be a /mob, /client or /html_interface_client obje
src.head = src.head + "<link rel=\"stylesheet\" type=\"text/css\" href=\"nanotrasen.css\" />"
src.updateLayout("")
/datum/html_interface/updateLayout(layout)
/datum/html_interface/nanotrasen/updateLayout(layout)
// Wrap the layout in our custom HTML
return ..("<div id=\"ntbgcenter\"></div><div id=\"content\">[layout]</div>")
+9 -9
View File
@@ -806,17 +806,16 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
bitesize = 1 + round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/proc/squish(atom/target)
new splat(src.loc)
src.visible_message("The [src.name] has been squashed.","<span class='italics'>You hear a smack.</span>")
var/turf/T = get_turf(target)
new splat(T)
visible_message("The [src.name] has been squashed.","<span class='italics'>You hear a smack.</span>")
for(var/atom/A in get_turf(target))
src.reagents.reaction(A)
reagents.reaction(A)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/throw_impact(atom/hit_atom)
..()
squish(hit_atom)
del(src) // Not qdel, because it'll hit other mobs then the floor for runtimes.
return
if(!..()) //was it caught by a mob?
squish(hit_atom)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer
seed = /obj/item/seeds/killertomatoseed
@@ -906,7 +905,8 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
..()
var/teleport_radius = potency / 10
if(isliving(squishee))
new /obj/effect/decal/cleanable/molten_item(squishee.loc) //Leave a pile of goo behind for dramatic effect...
var/turf/T = get_turf(squishee)
new /obj/effect/decal/cleanable/molten_item(T) //Leave a pile of goo behind for dramatic effect...
do_teleport(squishee, get_turf(squishee), teleport_radius)
+2 -2
View File
@@ -30,7 +30,7 @@
W.equipped(src,slot_l_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_l_hand(0)
update_inv_l_hand()
W.pixel_x = initial(W.pixel_x)
W.pixel_y = initial(W.pixel_y)
return 1
@@ -49,7 +49,7 @@
W.equipped(src,slot_r_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_r_hand(0)
update_inv_r_hand()
W.pixel_x = initial(W.pixel_x)
W.pixel_y = initial(W.pixel_y)
return 1
@@ -1,5 +1,5 @@
/mob/living/carbon/alien/hitby(atom/movable/AM)
..(AM, 1)
..(AM, skip = 1)
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
@@ -94,7 +94,7 @@ Doesn't work on other aliens/AI.*/
action_icon_state = "alien_whisper"
/obj/effect/proc_holder/alien/whisper/fire(mob/living/carbon/alien/user)
var/mob/M = input("Select who to whisper to:","Whisper to?",null) as mob in oview(user)
var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as mob in oview(user)
if(!M)
return 0
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
@@ -82,11 +82,11 @@
else //Maybe uses plasma in the future, although that wouldn't make any sense...
leaping = 1
update_icons()
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
throw_at(A,MAX_ALIEN_LEAP_DIST,1, spin=0, diagonals_first = 1)
leaping = 0
update_icons()
/mob/living/carbon/alien/humanoid/hunter/throw_impact(A)
/mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/A)
if(!leaping)
return ..()
@@ -103,60 +103,19 @@
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time) //3s by default
pounce_cooldown = !pounce_cooldown
else
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
weakened = 2
if(leaping)
leaping = 0
update_icons()
update_canmove()
/mob/living/carbon/alien/humanoid/float(on)
if(leaping)
return
..()
//Modified throw_at() that will use diagonal dirs where appropriate
//instead of locking it to cardinal dirs
/mob/living/carbon/alien/humanoid/throw_at(atom/target, range, speed)
if(!target || !src || (flags & NODROP)) return 0
src.throwing = 1
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dist_travelled = 0
var/dist_since_sleep = 0
var/tdist_x = dist_x;
var/tdist_y = dist_y;
if(dist_x <= dist_y)
tdist_x = dist_y;
tdist_y = dist_x;
var/error = tdist_x/2 - tdist_y
while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src)))
if(!src.throwing) break
if(!istype(src.loc, /turf)) break
var/atom/step = get_step(src, get_dir(src,target))
if(!step)
break
src.Move(step, get_dir(src, step))
hit_check()
error += (error < 0) ? tdist_x : -tdist_y;
dist_travelled++
dist_since_sleep++
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
src.throwing = 0
return 1
@@ -1,12 +1,3 @@
//Xeno Overlays Indexes//////////
#define X_L_HAND_LAYER 1
#define X_R_HAND_LAYER 2
#define X_FIRE_LAYER 3
#define X_TOTAL_LAYERS 3
/////////////////////////////////
/mob/living/carbon/alien/humanoid
var/list/overlays_standing[X_TOTAL_LAYERS]
/mob/living/carbon/alien/humanoid/update_icons()
update_hud() //TODO: remove the need for this to be here
@@ -50,15 +41,10 @@
pixel_y = get_standard_pixel_y_offset(lying)
/mob/living/carbon/alien/humanoid/regenerate_icons()
..()
if (notransform) return
update_inv_r_hand(0)
update_inv_l_hand(0)
update_hud()
// update_icons() //Handled in update_transform(), leaving this here as a reminder
update_fire()
update_transform()
if(!..())
update_hud()
// update_icons() //Handled in update_transform(), leaving this here as a reminder
update_transform()
/mob/living/carbon/alien/humanoid/update_transform() //The old method of updating lying/standing was update_icons(). Aliens still expect that.
if(lying > 0)
@@ -67,47 +53,12 @@
update_icons()
/mob/living/carbon/alien/humanoid/update_hud()
if(client)
client.screen |= contents
/mob/living/carbon/alien/humanoid/update_inv_r_hand(update_icons = 1)
if(r_hand)
var/t_state = r_hand.item_state
if(!t_state)
t_state = r_hand.icon_state
r_hand.screen_loc = ui_rhand
overlays_standing[X_R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state" = t_state)
else
overlays_standing[X_R_HAND_LAYER] = null
if(update_icons)
update_icons()
/mob/living/carbon/alien/humanoid/update_inv_l_hand(update_icons = 1)
if(l_hand)
var/t_state = l_hand.item_state
if(!t_state)
t_state = l_hand.icon_state
l_hand.screen_loc = ui_lhand
overlays_standing[X_L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state" = t_state)
else
overlays_standing[X_L_HAND_LAYER] = null
if(update_icons)
update_icons()
/mob/living/carbon/alien/humanoid/update_fire()
overlays -= overlays_standing[X_FIRE_LAYER]
if(on_fire)
overlays_standing[X_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -X_FIRE_LAYER)
overlays += overlays_standing[X_FIRE_LAYER]
return
else
overlays_standing[X_FIRE_LAYER] = null
//Xeno Overlays Indexes//////////
#undef X_L_HAND_LAYER
#undef X_R_HAND_LAYER
#undef X_FIRE_LAYER
#undef X_TOTAL_LAYERS
#undef FACEMASK_LAYER
#undef HEAD_LAYER
#undef BACK_LAYER
#undef LEGCUFF_LAYER
#undef HANDCUFF_LAYER
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef FIRE_LAYER
#undef TOTAL_LAYERS
@@ -22,4 +22,7 @@
icon_state = "larva[state]"
/mob/living/carbon/alien/larva/update_transform() //All this is handled in update_icons()
return update_icons()
return update_icons()
/mob/living/carbon/larva/update_inv_handcuffed()
return
+7 -7
View File
@@ -153,7 +153,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0)
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
var/damage = intensity - check_eye_prot()
if(..()) // we've been flashed
if(weakeyes)
@@ -433,13 +433,13 @@ var/const/GALOSHES_DONT_HELP = 8
handcuffed = null
if(buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob()
update_inv_handcuffed(0)
update_inv_handcuffed()
return
if(legcuffed)
legcuffed.loc = loc
legcuffed.dropped()
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
else
src << "<span class='warning'>You fail to remove [I]!</span>"
@@ -456,11 +456,11 @@ var/const/GALOSHES_DONT_HELP = 8
if(handcuffed)
handcuffed = null
update_inv_handcuffed(0)
update_inv_handcuffed()
return
else
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
else
src << "<span class='warning'>You fail to break [I]!</span>"
@@ -470,7 +470,7 @@ var/const/GALOSHES_DONT_HELP = 8
handcuffed = null
if (buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob()
update_inv_handcuffed(0)
update_inv_handcuffed()
if (client)
client.screen -= W
if (W)
@@ -481,7 +481,7 @@ var/const/GALOSHES_DONT_HELP = 8
if (legcuffed)
var/obj/item/weapon/W = legcuffed
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
if (client)
client.screen -= W
if (W)
@@ -8,8 +8,8 @@
put_in_active_hand(I)
visible_message("<span class='warning'>[src] catches [I]!</span>")
throw_mode_off()
return
..()
return 1
return ..()
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
@@ -791,11 +791,11 @@
var/mob/living/carbon/human/H = src
if(H.gloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0)
H.update_inv_gloves()
else
..() // Clear the Blood_DNA list
if(H.bloody_hands)
H.bloody_hands = 0
H.bloody_hands_mob = null
H.update_inv_gloves(0)
H.update_inv_gloves()
update_icons() //apply the now updated overlays to the mob
@@ -170,10 +170,10 @@ emp_act
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
if(H.wear_suit)
H.wear_suit.add_blood(src)
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
H.update_inv_wear_suit() //updates mob overlays to show the new blood (no refresh)
else if(H.w_uniform)
H.w_uniform.add_blood(src)
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
H.update_inv_w_uniform() //updates mob overlays to show the new blood (no refresh)
if (H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
G.add_blood(H)
@@ -194,13 +194,13 @@ emp_act
if(bloody) //Apply blood
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
update_inv_wear_mask()
if(head)
head.add_blood(src)
update_inv_head(0)
update_inv_head()
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
update_inv_glasses()
if("chest") //Easier to score a stun but lasts less time
if(stat == CONSCIOUS && I.force && prob(I.force + 10))
@@ -211,10 +211,10 @@ emp_act
if(bloody)
if(wear_suit)
wear_suit.add_blood(src)
update_inv_wear_suit(0)
update_inv_wear_suit()
if(w_uniform)
w_uniform.add_blood(src)
update_inv_w_uniform(0)
update_inv_w_uniform()
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already
@@ -455,4 +455,18 @@ emp_act
else
..()
return
/mob/living/carbon/human/hitby(atom/movable/AM)
if(throw_speed >= EMBED_THROWSPEED_THRESHOLD)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(can_embed(I))
if(prob(I.embed_chance) && !(dna && (PIERCEIMMUNE in dna.species.specflags)))
throw_alert("embeddedobject")
var/obj/item/organ/limb/L = pick(organs)
L.embedded_objects |= I
I.add_blood(src)//it embedded itself in you, of course it's bloody!
I.loc = src
L.take_damage(I.w_class*I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>\the [I.name] embeds itself in [src]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [I.name] embeds itself in your [L.getDisplayName()]!</span>")
return
return ..()
@@ -45,7 +45,7 @@
return shoes && shoes.negates_gravity()
/mob/living/carbon/human/Move(NewLoc, direct)
..()
. = ..()
if(dna)
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_move(src, NewLoc)
@@ -167,9 +167,9 @@
return
if(H.equip_to_appropriate_slot(I))
if(hand)
update_inv_l_hand(0)
update_inv_l_hand()
else
update_inv_r_hand(0)
update_inv_r_hand()
else if(s_active && s_active.can_be_inserted(I,1)) //if storage active insert there
s_active.handle_item_insertion(I)
else if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //see if we have box in other hand
@@ -250,7 +250,7 @@
wear_suit = null
if(I.flags_inv & HIDEJUMPSUIT)
update_inv_w_uniform()
update_inv_wear_suit(0)
update_inv_wear_suit()
else if(I == w_uniform)
if(r_store)
unEquip(r_store, 1) //Again, makes sense for pockets to drop.
@@ -262,45 +262,45 @@
unEquip(belt)
w_uniform = null
update_suit_sensors()
update_inv_w_uniform(0)
update_inv_w_uniform()
else if(I == gloves)
gloves = null
update_inv_gloves(0)
update_inv_gloves()
else if(I == glasses)
glasses = null
update_inv_glasses(0)
update_inv_glasses()
else if(I == ears)
ears = null
update_inv_ears(0)
update_inv_ears()
else if(I == shoes)
shoes = null
update_inv_shoes(0)
update_inv_shoes()
else if(I == belt)
belt = null
update_inv_belt(0)
update_inv_belt()
else if(I == wear_mask)
wear_mask = null
if(I.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
update_hair() //rebuild hair
if(internal)
if(internals)
internals.icon_state = "internal0"
internal = null
sec_hud_set_ID()
update_inv_wear_mask(0)
update_inv_wear_mask()
else if(I == wear_id)
wear_id = null
sec_hud_set_ID()
update_inv_wear_id(0)
update_inv_wear_id()
else if(I == r_store)
r_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == l_store)
l_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == s_store)
s_store = null
update_inv_s_store(0)
update_inv_s_store()
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
+10 -10
View File
@@ -578,17 +578,17 @@
if(H.overeatduration < 100)
H << "<span class='notice'>You feel fit again!</span>"
H.disabilities &= ~FAT
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
if(H.overeatduration > 500)
H << "<span class='danger'>You suddenly feel blubbery!</span>"
H.disabilities |= FAT
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
// nutrition decrease and satiety
if (H.nutrition > 0 && H.stat != 2)
if (H.nutrition > 0 && H.stat != DEAD)
var/hunger_rate = HUNGER_FACTOR
if(H.satiety > 0)
H.satiety--
@@ -1016,10 +1016,10 @@
if(get_dist(H, H) <= 1) //people with TK won't get smeared with blood
if(H.wear_suit)
H.wear_suit.add_blood(H)
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
H.update_inv_wear_suit() //updates mob overlays to show the new blood (no refresh)
else if(H.w_uniform)
H.w_uniform.add_blood(H)
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
H.update_inv_w_uniform() //updates mob overlays to show the new blood (no refresh)
if (H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
G.add_blood(H)
@@ -1042,13 +1042,13 @@
if(bloody) //Apply blood
if(H.wear_mask)
H.wear_mask.add_blood(H)
H.update_inv_wear_mask(0)
H.update_inv_wear_mask()
if(H.head)
H.head.add_blood(H)
H.update_inv_head(0)
H.update_inv_head()
if(H.glasses && prob(33))
H.glasses.add_blood(H)
H.update_inv_glasses(0)
H.update_inv_glasses()
if("chest") //Easier to score a stun but lasts less time
if(H.stat == CONSCIOUS && I.force && prob(I.force + 10))
@@ -1059,10 +1059,10 @@
if(bloody)
if(H.wear_suit)
H.wear_suit.add_blood(H)
H.update_inv_wear_suit(0)
H.update_inv_wear_suit()
if(H.w_uniform)
H.w_uniform.add_blood(H)
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
if(Iforce > 10 || Iforce >= 5 && prob(33))
H.forcesay(hit_appends) //forcesay checks stat already.
@@ -47,8 +47,7 @@ If you have any questions/constructive-comments/bugs-to-report
Please contact me on #coderbus IRC. ~Carnie x
//Carn can sometimes be hard to reach now. However IRC is still your best bet for getting help.
*/
//Human Overlays Indexes/////////
// Human Overlays Indexes /////////////////
#define SPECIES_LAYER 26 // mutantrace colors... these are on a seperate layer in order to prvent
#define BODY_BEHIND_LAYER 25
#define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup)
@@ -65,21 +64,11 @@ Please contact me on #coderbus IRC. ~Carnie x
#define GLASSES_LAYER 13
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 11
#define BACK_LAYER 10
#define HAIR_LAYER 9 //TODO: make part of head layer?
#define FACEMASK_LAYER 8
#define HEAD_LAYER 7
#define HANDCUFF_LAYER 6
#define LEGCUFF_LAYER 5
#define L_HAND_LAYER 4
#define R_HAND_LAYER 3 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
#define BODY_FRONT_LAYER 2
#define FIRE_LAYER 1 //If you're on fire
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
//////////////////////////////////
#define HAIR_LAYER 10 //TODO: make part of head layer?
#define BODY_FRONT_LAYER 9
/mob/living/carbon/human
var/list/overlays_standing[TOTAL_LAYERS]
//KEEP THE TOTAL_LAYER DEFINE UPDATED !
//////////////////////////////////////////
/mob/living/carbon/human/proc/update_base_icon_state()
//var/race = dna ? dna.mutantrace : null
@@ -94,17 +83,6 @@ Please contact me on #coderbus IRC. ~Carnie x
icon_state = "[base_icon_state]_s"
/mob/living/carbon/human/proc/apply_overlay(cache_index)
var/image/I = overlays_standing[cache_index]
if(I)
overlays += I
/mob/living/carbon/human/proc/remove_overlay(cache_index)
if(overlays_standing[cache_index])
overlays -= overlays_standing[cache_index]
overlays_standing[cache_index] = null
//UPDATES OVERLAYS FROM OVERLAYS_STANDING
//TODO: Remove all instances where this proc is called. It used to be the fastest way to swap between standing/lying.
/mob/living/carbon/human/update_icons()
@@ -174,12 +152,7 @@ Please contact me on #coderbus IRC. ~Carnie x
dna.species.handle_body(src)
/mob/living/carbon/human/update_fire()
remove_overlay(FIRE_LAYER)
if(on_fire)
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
apply_overlay(FIRE_LAYER)
..("Standing")
/mob/living/carbon/human/proc/update_augments()
@@ -212,33 +185,28 @@ Please contact me on #coderbus IRC. ~Carnie x
/* --------------------------------------- */
//For legacy support.
/mob/living/carbon/human/regenerate_icons()
..()
if(notransform) return
update_body()
update_hair()
update_inv_w_uniform()
update_inv_wear_id()
update_inv_gloves()
update_inv_glasses()
update_inv_ears()
update_inv_shoes()
update_inv_s_store()
update_inv_wear_mask()
update_inv_head()
update_inv_belt()
update_inv_back()
update_inv_wear_suit()
update_inv_r_hand()
update_inv_l_hand()
update_inv_handcuffed()
update_inv_legcuffed()
update_inv_pockets()
update_fire()
update_transform()
//Hud Stuff
update_hud()
// Mutantrace colors
update_mutcolor()
if(!..())
update_body()
update_hair()
update_inv_w_uniform()
update_inv_wear_id()
update_inv_gloves()
update_inv_glasses()
update_inv_ears()
update_inv_shoes()
update_inv_s_store()
update_inv_wear_mask()
update_inv_head()
update_inv_belt()
update_inv_back()
update_inv_wear_suit()
update_inv_pockets()
update_transform()
//Hud Stuff
update_hud()
// Mutantrace colors
update_mutcolor()
/* --------------------------------------- */
//vvvvvv UPDATE_INV PROCS vvvvvv
@@ -414,27 +382,12 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_head()
remove_overlay(HEAD_LAYER)
if(head)
var/obj/item/H = ..()
if(H)
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
head.screen_loc = ui_head //TODO //...draw the item in the inventory screen
client.screen += head //Either way, add the item to the HUD
var/image/standing
if(head.alternate_worn_icon)
standing = image("icon"=head.alternate_worn_icon, "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
if(!standing)
standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
standing.color = head.color // For now, this is here solely for kitty ears, but everything should do this eventually
standing.alpha = head.alpha
overlays_standing[HEAD_LAYER] = standing
if(head.blood_DNA)
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood")
H.screen_loc = ui_head //TODO //...draw the item in the inventory screen
client.screen += H //Either way, add the item to the HUD
apply_overlay(HEAD_LAYER)
@@ -491,6 +444,7 @@ Please contact me on #coderbus IRC. ~Carnie x
apply_overlay(SUIT_LAYER)
/mob/living/carbon/human/update_inv_pockets()
if(l_store)
l_store.screen_loc = ui_storage1 //TODO
@@ -503,125 +457,41 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_wear_mask()
remove_overlay(FACEMASK_LAYER)
if(istype(wear_mask, /obj/item/clothing/mask))
var/obj/item/clothing/mask/M = ..()
if(M)
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
wear_mask.screen_loc = ui_mask //TODO //...draw the item in the inventory screen
client.screen += wear_mask //Either way, add the item to the HUD
var/image/standing
if(wear_mask.alternate_worn_icon)
standing = image("icon"=wear_mask.alternate_worn_icon, "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
if(!standing)
standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
overlays_standing[FACEMASK_LAYER] = standing
if(wear_mask.blood_DNA && !istype(wear_mask, /obj/item/clothing/mask/cigarette))
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood")
M.screen_loc = ui_mask //TODO //...draw the item in the inventory screen
client.screen += M //Either way, add the item to the HUD
update_mutant_bodyparts()
apply_overlay(FACEMASK_LAYER)
/mob/living/carbon/human/update_inv_back()
remove_overlay(BACK_LAYER)
if(back)
back.screen_loc = ui_back
var/obj/item/B = ..()
if(B)
B.screen_loc = ui_back
if(client && hud_used && hud_used.hud_shown)
client.screen += back
var/image/standing
if(back.alternate_worn_icon)
standing = image("icon"=back.alternate_worn_icon, "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
if(!standing)
standing = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
overlays_standing[BACK_LAYER] = standing
client.screen += B
apply_overlay(BACK_LAYER)
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
if(client)
client.screen |= contents
if(hud_used)
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
/mob/living/carbon/human/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
drop_r_hand()
drop_l_hand()
stop_pulling() //TODO: should be handled elsewhere
if(hud_used) //hud handcuff icons
var/obj/screen/inventory/R = hud_used.adding[3]
var/obj/screen/inventory/L = hud_used.adding[4]
R.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="markus")
L.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="gabrielle")
overlays_standing[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff1", "layer"=-HANDCUFF_LAYER)
else
if(hud_used)
var/obj/screen/inventory/R = hud_used.adding[3]
var/obj/screen/inventory/L = hud_used.adding[4]
R.overlays = null
L.overlays = null
apply_overlay(HANDCUFF_LAYER)
if(..())
overlays_standing[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff1", "layer"=-HANDCUFF_LAYER)
apply_overlay(HANDCUFF_LAYER)
/mob/living/carbon/human/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
apply_overlay(LEGCUFF_LAYER)
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
if(..())
if(hud_used)
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
/mob/living/carbon/human/update_inv_r_hand()
remove_overlay(R_HAND_LAYER)
if (handcuffed)
drop_r_hand()
return
if(r_hand)
r_hand.screen_loc = ui_rhand //TODO
if(client)
client.screen += r_hand
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state"="[t_state]", "layer"=-R_HAND_LAYER)
apply_overlay(R_HAND_LAYER)
/mob/living/carbon/human/update_inv_l_hand()
remove_overlay(L_HAND_LAYER)
if (handcuffed)
drop_l_hand()
return
if(l_hand)
l_hand.screen_loc = ui_lhand //TODO
if(client)
client.screen += l_hand
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state"="[t_state]", "layer"=-L_HAND_LAYER)
apply_overlay(L_HAND_LAYER)
/mob/living/carbon/human/proc/wear_female_version(t_color, icon, layer, type)
var/index = "[t_color]_s"
@@ -652,15 +522,7 @@ Please contact me on #coderbus IRC. ~Carnie x
#undef EARS_LAYER
#undef SUIT_LAYER
#undef GLASSES_LAYER
#undef FACEMASK_LAYER
#undef BELT_LAYER
#undef SUIT_STORE_LAYER
#undef BACK_LAYER
#undef HAIR_LAYER
#undef HEAD_LAYER
#undef HANDCUFF_LAYER
#undef LEGCUFF_LAYER
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef FIRE_LAYER
#undef TOTAL_LAYERS
+6 -6
View File
@@ -25,22 +25,22 @@
if(I == head)
head = null
if(I.flags & BLOCKHAIR)
update_hair(0)
update_inv_head(0)
update_hair()
update_inv_head()
else if(I == back)
back = null
update_inv_back(0)
update_inv_back()
else if(I == wear_mask)
if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt.
return
wear_mask = null
update_inv_wear_mask(0)
update_inv_wear_mask()
else if(I == handcuffed)
handcuffed = null
if(buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob()
update_inv_handcuffed(0)
update_inv_handcuffed()
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
@@ -1,31 +1,13 @@
//Monkey Overlays Indexes////////
#define M_FIRE_LAYER 7
#define M_MASK_LAYER 6
#define M_HEAD_LAYER 5
#define M_BACK_LAYER 4
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 2
#define M_R_HAND_LAYER 1
#define M_TOTAL_LAYERS 7
/////////////////////////////////
/mob/living/carbon/monkey
var/list/overlays_standing[M_TOTAL_LAYERS]
/mob/living/carbon/monkey/regenerate_icons()
..()
update_inv_wear_mask(0)
update_inv_head(0)
update_inv_back(0)
update_inv_r_hand(0)
update_inv_l_hand(0)
update_inv_handcuffed(0)
update_fire()
update_icons()
update_transform()
//Hud Stuff
update_hud()
return
if(!..())
update_inv_wear_mask()
update_inv_head()
update_inv_back()
update_icons()
update_transform()
//Hud Stuff
update_hud()
/mob/living/carbon/monkey/update_icons()
update_hud()
@@ -35,138 +17,43 @@
overlays += I
////////
/mob/living/carbon/monkey/update_inv_wear_mask(update_icons=1)
if(wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
wear_mask.screen_loc = ui_monkey_mask
/mob/living/carbon/monkey/update_inv_wear_mask()
var/obj/item/clothing/mask/M = ..()
if(M)
M.screen_loc = ui_monkey_mask
if(client && hud_used)
client.screen += wear_mask
overlays -= overlays_standing[M_MASK_LAYER]
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]", "layer" = -M_MASK_LAYER)
if(!istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
overlays_standing[M_MASK_LAYER] = standing
overlays += overlays_standing[M_MASK_LAYER]
else
overlays -= overlays_standing[M_MASK_LAYER]
overlays_standing[M_MASK_LAYER] = null
if(update_icons) update_icons()
client.screen += M
apply_overlay(FACEMASK_LAYER)
/mob/living/carbon/monkey/update_inv_head(update_icons=1)
if(head)
head.screen_loc = ui_monkey_head
/mob/living/carbon/monkey/update_inv_head()
var/obj/item/H = ..()
if(H)
H.screen_loc = ui_monkey_head
if(client && hud_used)
client.screen += head
overlays -= overlays_standing[M_HEAD_LAYER]
var/image/standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]", "layer" = -M_HEAD_LAYER)
overlays_standing[M_HEAD_LAYER] = standing
overlays += overlays_standing[M_HEAD_LAYER]
else
overlays -= overlays_standing[M_HEAD_LAYER]
overlays_standing[M_HEAD_LAYER] = null
if(update_icons) update_icons()
client.screen += H
apply_overlay(HEAD_LAYER)
/mob/living/carbon/monkey/update_inv_r_hand(update_icons=1)
if (handcuffed)
drop_r_hand()
return
if(r_hand)
r_hand.screen_loc = ui_rhand
/mob/living/carbon/monkey/update_inv_back()
var/obj/item/B = ..()
if(B)
B.screen_loc = ui_monkey_back
if(client && hud_used)
client.screen += r_hand
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
overlays -= overlays_standing[M_R_HAND_LAYER]
var/image/standing = image("icon" = r_hand.righthand_file, "icon_state" = t_state, "layer" = -M_R_HAND_LAYER)
standing.pixel_y = 2
overlays_standing[M_R_HAND_LAYER] = standing
overlays += overlays_standing[M_R_HAND_LAYER]
else
overlays -= overlays_standing[M_R_HAND_LAYER]
overlays_standing[M_R_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_l_hand(update_icons=1)
if (handcuffed)
drop_l_hand()
return
if(l_hand)
l_hand.screen_loc = ui_lhand
if(client && hud_used)
client.screen += l_hand
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
overlays -= overlays_standing[M_L_HAND_LAYER]
var/image/standing = image("icon" = l_hand.lefthand_file, "icon_state" = t_state, "layer" = -M_L_HAND_LAYER)
standing.pixel_y = 2
overlays_standing[M_L_HAND_LAYER] = standing
overlays += overlays_standing[M_L_HAND_LAYER]
else
overlays -= overlays_standing[M_L_HAND_LAYER]
overlays_standing[M_L_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_back(update_icons=1)
if(back)
back.screen_loc = ui_monkey_back
if(client && hud_used)
client.screen += back
overlays -= overlays_standing[M_BACK_LAYER]
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]", "layer" = -M_BACK_LAYER)
overlays += overlays_standing[M_BACK_LAYER]
else
overlays -= overlays_standing[M_BACK_LAYER]
overlays_standing[M_BACK_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_handcuffed(update_icons=1)
if(handcuffed)
drop_r_hand()
drop_l_hand()
stop_pulling()
if(hud_used) //hud handcuff icons
var/obj/screen/inventory/R = hud_used.adding[4]
var/obj/screen/inventory/L = hud_used.adding[5]
R.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "markus")
L.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "gabrielle")
overlays -= overlays_standing[M_HANDCUFF_LAYER]
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1", "layer" = -M_HANDCUFF_LAYER)
overlays += overlays_standing[M_HANDCUFF_LAYER]
else
if(hud_used)
var/obj/screen/inventory/R = hud_used.adding[4]
var/obj/screen/inventory/L = hud_used.adding[5]
R.overlays = null
L.overlays = null
overlays -= overlays_standing[M_HANDCUFF_LAYER]
overlays_standing[M_HANDCUFF_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_hud()
if(client)
client.screen |= contents
client.screen += B
apply_overlay(BACK_LAYER)
/mob/living/carbon/monkey/update_fire()
overlays -= overlays_standing[M_FIRE_LAYER]
if(on_fire)
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
overlays += overlays_standing[M_FIRE_LAYER]
return
else
overlays_standing[M_FIRE_LAYER] = null
..("Monkey_burning")
/mob/living/carbon/monkey/update_inv_handcuffed()
if(..())
overlays_standing[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff1", "layer"=-HANDCUFF_LAYER)
apply_overlay(HANDCUFF_LAYER)
//Monkey Overlays Indexes////////
#undef M_FIRE_LAYER
#undef M_MASK_LAYER
#undef M_BACK_LAYER
#undef M_HANDCUFF_LAYER
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef M_TOTAL_LAYERS
/mob/living/carbon/monkey/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
if(legcuffed)
var/image/standing = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
standing.pixel_y = 8
overlays_standing[LEGCUFF_LAYER] = standing
apply_overlay(LEGCUFF_LAYER)
+149 -4
View File
@@ -1,6 +1,18 @@
//LOOK G-MA, I'VE JOINED CARBON PROCS THAT ARE IDENTICAL IN ALL CASES INTO ONE PROC, I'M BETTER THAN LIFE()
//I thought about mob/living but silicons and simple_animals don't want this just yet.
//Right now just handles lying down, but could handle other cases later.
//Carbon Overlays Indexes/////////
#define FACEMASK_LAYER 8
#define HEAD_LAYER 7
#define BACK_LAYER 6
#define LEGCUFF_LAYER 5
#define HANDCUFF_LAYER 4
#define L_HAND_LAYER 3
#define R_HAND_LAYER 2 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
#define FIRE_LAYER 1 //If you're on fire
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
//////////////////////////////////
//IMPORTANT: Multiple animate() calls do not stack well, so try to do them all at once if you can.
/mob/living/carbon/update_transform()
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
@@ -27,4 +39,137 @@
if(changed)
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
/mob/living/carbon
var/list/overlays_standing[TOTAL_LAYERS]
/mob/living/carbon/proc/apply_overlay(cache_index)
var/image/I = overlays_standing[cache_index]
if(I)
overlays += I
/mob/living/carbon/proc/remove_overlay(cache_index)
if(overlays_standing[cache_index])
overlays -= overlays_standing[cache_index]
overlays_standing[cache_index] = null
/mob/living/carbon/update_inv_r_hand()
remove_overlay(R_HAND_LAYER)
if (handcuffed)
drop_r_hand()
return
if(r_hand)
r_hand.screen_loc = ui_rhand
if(client && hud_used)
client.screen += r_hand
var/t_state = r_hand.item_state
if(!t_state)
t_state = r_hand.icon_state
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state"="[t_state]", "layer"=-R_HAND_LAYER)
apply_overlay(R_HAND_LAYER)
/mob/living/carbon/update_inv_l_hand()
remove_overlay(L_HAND_LAYER)
if (handcuffed)
drop_l_hand()
return
if(l_hand)
l_hand.screen_loc = ui_lhand
if(client && hud_used)
client.screen += l_hand
var/t_state = l_hand.item_state
if(!t_state)
t_state = l_hand.icon_state
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state"="[t_state]", "layer"=-L_HAND_LAYER)
apply_overlay(L_HAND_LAYER)
/mob/living/carbon/update_fire(var/fire_icon = "Generic_mob_burning")
remove_overlay(FIRE_LAYER)
if(on_fire)
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"= fire_icon, "layer"=-FIRE_LAYER)
apply_overlay(FIRE_LAYER)
/mob/living/carbon/update_hud()
if(client)
client.screen |= contents
return 1
/mob/living/carbon/regenerate_icons()
if(notransform)
return 1
update_inv_r_hand()
update_inv_l_hand()
update_inv_handcuffed()
update_inv_legcuffed()
update_fire()
/mob/living/carbon/update_inv_wear_mask()
remove_overlay(FACEMASK_LAYER)
if(istype(wear_mask, /obj/item/clothing/mask))
var/image/standing
if(wear_mask.alternate_worn_icon)
standing = image("icon"=wear_mask.alternate_worn_icon, "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
if(!standing)
standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
overlays_standing[FACEMASK_LAYER] = standing
if(wear_mask.blood_DNA && (wear_mask.body_parts_covered & HEAD))
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood")
return wear_mask
/mob/living/carbon/human/update_inv_back()
remove_overlay(BACK_LAYER)
if(back)
var/image/standing
if(back.alternate_worn_icon)
standing = image("icon"=back.alternate_worn_icon, "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
if(!standing)
standing = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
overlays_standing[BACK_LAYER] = standing
return back
/mob/living/carbon/human/update_inv_head()
remove_overlay(HEAD_LAYER)
if(head)
var/image/standing
if(head.alternate_worn_icon)
standing = image("icon"=head.alternate_worn_icon, "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
if(!standing)
standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
standing.color = head.color // For now, this is here solely for kitty ears, but everything should do this eventually
standing.alpha = head.alpha
overlays_standing[HEAD_LAYER] = standing
if(head.blood_DNA)
standing.overlays += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood")
return head
/mob/living/carbon/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
drop_r_hand()
drop_l_hand()
stop_pulling() //TODO: should be handled elsewhere
if(hud_used) //hud handcuff icons
var/obj/screen/inventory/R = hud_used.r_hand_hud_object
var/obj/screen/inventory/L = hud_used.l_hand_hud_object
R.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="markus")
L.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="gabrielle")
return 1
else
if(hud_used)
var/obj/screen/inventory/R = hud_used.r_hand_hud_object
var/obj/screen/inventory/L = hud_used.l_hand_hud_object
R.overlays = null
L.overlays = null
+8 -3
View File
@@ -52,13 +52,14 @@ Sorry Giacom. Please don't be mad :(
//Generic Bump(). Override MobBump() and ObjBump() instead of this.
/mob/living/Bump(atom/A, yes)
if(..()) //we are thrown onto something
return
if (buckled || !yes || now_pushing)
return
if(ismob(A))
var/mob/M = A
if(MobBump(M))
return
..()
if(isobj(A))
var/obj/O = A
if(ObjBump(O))
@@ -68,6 +69,10 @@ Sorry Giacom. Please don't be mad :(
if(PushAM(AM))
return
/mob/living/Bumped(atom/movable/AM)
..()
last_bumped = world.time
//Called when we bump onto a mob
/mob/living/proc/MobBump(mob/M)
//Even if we don't push/swap places, we "touched" them, so spread fire
@@ -376,7 +381,7 @@ Sorry Giacom. Please don't be mad :(
return 0
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0)
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, safety = 0)
return 0 //only carbon liveforms have this proc
/mob/living/emp_act(severity)
@@ -687,7 +692,7 @@ Sorry Giacom. Please don't be mad :(
floating = 0
//called when the mob receives a bright flash
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0)
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
flick("e_flash", flash)
return 1
+12 -4
View File
@@ -44,7 +44,13 @@
else
return 0
/mob/living/hitby(atom/movable/AM,mob/thrower)//Standardization and logging -Sieve
/mob/living/throw_impact(atom/hit_atom)
. = ..()
if(hit_atom.density)
Weaken(1)
take_organ_damage(10)
/mob/living/hitby(atom/movable/AM)
if(istype(AM, /obj/item))
var/obj/item/I = AM
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
@@ -71,9 +77,11 @@
"<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)].",I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, I)
if(thrower)
add_logs(thrower, src, "hit", I)
if(I.thrownby)
add_logs(I.thrownby, src, "hit", I)
else
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return ..()
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == "harm")
+3 -1
View File
@@ -47,4 +47,6 @@
var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob.
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
var/last_bumped = 0
+3
View File
@@ -823,3 +823,6 @@ var/list/ai_list = list()
loc = card//Throw AI into the card.
src << "You have been downloaded to a mobile storage device. Remote device connection severed."
user << "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
/mob/living/silicon/ai/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
return // no eyes, no flashing
+8 -4
View File
@@ -48,15 +48,19 @@
var/obj/item/radio/integrated/signal/sradio // AI's signaller
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
/mob/living/silicon/pai/New(var/obj/item/device/paicard/P)
make_laws()
canmove = 0
src.loc = paicard
card = paicard
if(!istype(P)) //when manually spawning a pai, we create a card to put it into.
var/newcardloc = P
P = new /obj/item/device/paicard(newcardloc)
P.setPersonality(src)
loc = P
card = P
sradio = new(src)
if(card)
if(!card.radio)
card.radio = new /obj/item/device/radio(src.card)
card.radio = new /obj/item/device/radio(card)
radio = card.radio
//PDA
@@ -192,9 +192,9 @@
return
/mob/living/silicon/robot/update_fire()
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing")
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
if(on_fire)
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing")
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
@@ -876,16 +876,16 @@
if(cleaned_human.lying)
if(cleaned_human.head)
cleaned_human.head.clean_blood()
cleaned_human.update_inv_head(0)
cleaned_human.update_inv_head()
if(cleaned_human.wear_suit)
cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_wear_suit(0)
cleaned_human.update_inv_wear_suit()
else if(cleaned_human.w_uniform)
cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_w_uniform(0)
cleaned_human.update_inv_w_uniform()
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
cleaned_human.update_inv_shoes()
cleaned_human.clean_blood()
cleaned_human << "<span class='danger'>[src] cleans your face!</span>"
return
+5 -4
View File
@@ -422,12 +422,13 @@
/mob/living/silicon/setEarDamage()
return
/mob/living/silicon/check_eye_prot()
return 2
/mob/living/silicon/proc/GetPhoto()
if (aicamera)
return aicamera.selectpicture(aicamera)
/mob/living/silicon/grabbedby(mob/living/user)
return
return
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(affect_silicon)
return ..()
@@ -173,8 +173,9 @@
if(cleared)
src << "--- [class] alarm in [A.name] has been cleared."
/mob/living/simple_animal/drone/check_eye_prot()
return 2
/mob/living/simple_animal/drone/handle_temperature_damage()
return
/mob/living/simple_animal/drone/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(affect_silicon)
return ..()
@@ -125,9 +125,9 @@
return
if(equip_to_appropriate_slot(I))
if(hand)
update_inv_l_hand(0)
update_inv_l_hand()
else
update_inv_r_hand(0)
update_inv_r_hand()
else if(s_active && s_active.can_be_inserted(I,1)) //if storage active insert there
s_active.handle_item_insertion(I)
else if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //see if we have box in other hand
@@ -198,10 +198,19 @@
/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets)
for(var/mob/living/target in targets)
if(target.see_invisible == SEE_INVISIBLE_LIVING)
target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
name = "Toggle Nightvision \[ON\]"
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.dna.species.invis_sight == SEE_INVISIBLE_LIVING)
H.dna.species.invis_sight = SEE_INVISIBLE_OBSERVER_NOLIGHTING
name = "Toggle Nightvision \[ON]"
else
H.dna.species.invis_sight = SEE_INVISIBLE_LIVING
name = "Toggle Nightvision \[OFF]"
else
target.see_invisible = SEE_INVISIBLE_LIVING
name = "Toggle Nightvision \[OFF\]"
return
if(target.see_invisible == SEE_INVISIBLE_LIVING)
target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
name = "Toggle Nightvision \[ON]"
else
target.see_invisible = SEE_INVISIBLE_LIVING
name = "Toggle Nightvision \[OFF]"
+7 -3
View File
@@ -421,12 +421,12 @@ var/list/slot_equipment_priority = list( \
var/obj/item/W = l_hand
if (W)
W.attack_self(src)
update_inv_l_hand(0)
update_inv_l_hand()
else
var/obj/item/W = r_hand
if (W)
W.attack_self(src)
update_inv_r_hand(0)
update_inv_r_hand()
return
/*
@@ -963,4 +963,8 @@ var/list/slot_equipment_priority = list( \
spell.action.background_icon_state = spell.action_background_icon_state
if(isliving(src))
spell.action.Grant(src)
return
return
//override to avoid rotating pixel_xy on mobs
/mob/shuttleRotate(rotation)
dir = angle2dir(rotation+dir2angle(dir))
+6 -8
View File
@@ -1,18 +1,16 @@
/mob/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover) && mover.checkpass(PASSMOB))
if(height==0)
return 1
if(istype(mover, /obj/item/projectile))
if(istype(mover, /obj/item/projectile) || mover.throwing)
return (!density || lying)
if(mover.checkpass(PASSMOB))
return 1
if(ismob(mover))
var/mob/moving_mob = mover
if ((other_mobs && moving_mob.other_mobs))
return 1
return (!mover.density || !density || lying)
else
return (!mover.density || !density || lying)
return
return (!mover.density || !density || lying)
/client/Northeast()
+31 -6
View File
@@ -82,6 +82,13 @@
if(!client) return 0
//Determines Relevent Population Cap
var/relevant_cap
if(config.hard_popcap && config.extreme_popcap)
relevant_cap = min(config.hard_popcap, config.extreme_popcap)
else
relevant_cap = max(config.hard_popcap, config.extreme_popcap)
if(href_list["show_preferences"])
client.prefs.ShowChoices(src)
return 1
@@ -126,13 +133,22 @@
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "<span class='danger'>The round is either not ready, or has already finished...</span>"
return
var/relevant_cap
if(config.hard_popcap && config.extreme_popcap)
relevant_cap = min(config.hard_popcap, config.extreme_popcap)
else
relevant_cap = max(config.hard_popcap, config.extreme_popcap)
if(relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in admin_datums))
if(href_list["late_join"] == "override")
LateChoices()
return
if(ticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in admin_datums)))
usr << "<span class='danger'>[config.hard_popcap_message]</span>"
var/queue_position = ticker.queued_players.Find(usr)
if(queue_position == 1)
usr << "<span class='notice'>You are next in line to join the game. You will be notified when a slot opens up.</span>"
else if(queue_position)
usr << "<span class='notice'>There are [queue_position-1] players in front of you in the queue to join the game.</span>"
else
ticker.queued_players += usr
usr << "<span class='notice'>You have been added to the queue to join the game. Your position in queue is [ticker.queued_players.len].</span>"
return
LateChoices()
@@ -145,6 +161,11 @@
usr << "<span class='notice'>There is an administrative lock on entering the game!</span>"
return
if(ticker.queued_players.len && !(ckey(key) in admin_datums))
if((living_player_count() >= relevant_cap) || (src != ticker.queued_players[1]))
usr << "<span class='warning'>Server is full.</span>"
return
AttemptLateSpawn(href_list["SelectedJob"])
return
@@ -234,6 +255,10 @@
src << alert("[rank] is not available. Please try another.")
return 0
//Remove the player from the join queue if he was in one and reset the timer
ticker.queued_players -= src
ticker.queue_delay = 4
SSjob.AssignRole(src, rank, 1)
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
+4
View File
@@ -36,6 +36,10 @@ var/const/GRAV_NEEDS_WRENCH = 3
..()
icon_state = "[get_status()]_[sprite_number]"
//prevents shuttles attempting to rotate this since it messes up sprites
/obj/machinery/gravity_generator/shuttleRotate()
return
/obj/machinery/gravity_generator/proc/get_status()
return "off"
@@ -43,7 +43,7 @@
/obj/machinery/field/containment/Crossed(obj/mover)
if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha))
bump(mover)
bump_field(mover)
/obj/machinery/field/containment/proc/set_master(master1,master2)
if(!master1 || !master2)
@@ -77,7 +77,7 @@
if((istype(mover, /obj/machinery) && !istype(mover, /obj/singularity)) || \
istype(mover, /obj/structure) || \
istype(mover, /obj/mecha))
bump(mover)
bump_field(mover)
return 0
return ..()
@@ -106,13 +106,13 @@
"<span class='italics'>You hear an electrical crack.</span>")
user.updatehealth()
bump(user)
bump_field(user)
spawn(5)
hasShocked = 0
return
/obj/machinery/field/proc/bump(atom/movable/AM as mob|obj)
/obj/machinery/field/proc/bump_field(atom/movable/AM as mob|obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, AM.loc)
s.start()
@@ -356,6 +356,6 @@ field_generator power level display
if(fields.len)
..()
/obj/machinery/field/generator/bump(atom/movable/AM as mob|obj)
/obj/machinery/field/generator/bump_field(atom/movable/AM as mob|obj)
if(fields.len)
..()
+24 -21
View File
@@ -223,33 +223,36 @@
/obj/item/solar_assembly/attackby(obj/item/weapon/W, mob/user, params)
if(!anchored && isturf(loc))
if(istype(W, /obj/item/weapon/wrench))
anchored = 1
if(istype(W, /obj/item/weapon/wrench) && isturf(loc))
if(isinspace())
user << "<span class='warning'>You can't secure [src] here.</span>"
return
anchored = !anchored
if(anchored)
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
return 1
else
if(istype(W, /obj/item/weapon/wrench))
anchored = 0
else
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
return 1
return 1
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/S = W
if(S.use(2))
glass_type = W.type
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] places the glass on the solar assembly.", "<span class='notice'>You place the glass on the solar assembly.</span>")
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
else
new /obj/machinery/power/solar(get_turf(src), src)
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
if(!anchored)
user << "<span class='warning'>You need to secure the assembly before you can add glass.</span>"
return
var/obj/item/stack/sheet/S = W
if(S.use(2))
glass_type = W.type
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] places the glass on the solar assembly.", "<span class='notice'>You place the glass on the solar assembly.</span>")
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
else
user << "<span class='warning'>You need two sheets of glass to put them into a solar panel!</span>"
return
return 1
new /obj/machinery/power/solar(get_turf(src), src)
else
user << "<span class='warning'>You need two sheets of glass to put them into a solar panel!</span>"
return
return 1
if(!tracker)
if(istype(W, /obj/item/weapon/tracker_electronics))
@@ -174,12 +174,11 @@
/obj/item/ammo_casing/shotgun/dart/bioterror/New()
..()
reagents.add_reagent("neurotoxin", 5)
reagents.add_reagent("morphine", 5)
reagents.add_reagent("spore", 5)
reagents.add_reagent("mutetoxin", 5) //;HELP OPS IN MAINT
reagents.add_reagent("initropidril", 5)
reagents.add_reagent("sodium_thiopental", 5)
reagents.add_reagent("neurotoxin", 6)
reagents.add_reagent("spore", 6)
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
reagents.add_reagent("coniine", 6)
reagents.add_reagent("sodium_thiopental", 6)
/obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing."
@@ -5,7 +5,6 @@
projectile_type = /obj/item/projectile/energy
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
var/select_name = "energy"
var/mod_name = null
fire_sound = 'sound/weapons/Laser.ogg'
/obj/item/ammo_casing/energy/laser
@@ -87,13 +86,11 @@
/obj/item/ammo_casing/energy/flora/yield
projectile_type = /obj/item/projectile/energy/florayield
select_name = "increase yield"
mod_name = "yield"
select_name = "yield"
/obj/item/ammo_casing/energy/flora/mut
projectile_type = /obj/item/projectile/energy/floramut
select_name = "induce mutations"
mod_name = "mut"
select_name = "mutation"
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/item/projectile/temp
+7 -2
View File
@@ -49,6 +49,11 @@
var/list/upgrades = list()
var/ammo_x_offset = 0 //used for positioning ammo count overlay on sprite
var/ammo_y_offset = 0
var/flight_x_offset = 0
var/flight_y_offset = 0
/obj/item/weapon/gun/New()
..()
if(pin)
@@ -224,9 +229,9 @@
semicd = 0
if(user.hand)
user.update_inv_l_hand(0)
user.update_inv_l_hand()
else
user.update_inv_r_hand(0)
user.update_inv_r_hand()
feedback_add_details("gun_fired","[src.name]")
/obj/item/weapon/gun/attack(mob/M as mob, mob/user)
+23 -16
View File
@@ -10,6 +10,7 @@
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
var/can_charge = 1 //Can it be charged in a recharger?
ammo_x_offset = 2
/obj/item/weapon/gun/energy/emp_act(severity)
power_supply.use(round(power_supply.charge / severity))
@@ -72,25 +73,31 @@
return
/obj/item/weapon/gun/energy/update_icon()
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = min(Ceiling(ratio*4) * 25, 100)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(power_supply.charge < shot.e_cost)
ratio = 0 //so the icon changes to empty if the charge isn't zero but not enough for a shot.
switch(modifystate)
if (0)
icon_state = "[initial(icon_state)][ratio]"
if (1)
icon_state = "[initial(icon_state)][shot.mod_name][ratio]"
if (2)
icon_state = "[initial(icon_state)][shot.select_name][ratio]"
overlays.Cut()
var/ratio = Ceiling((power_supply.charge / power_supply.maxcharge) * 4)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
var/iconState = "[icon_state]_charge"
var/itemState = null
if(!initial(item_state))
itemState = icon_state
if (modifystate)
overlays += "[icon_state]_[shot.select_name]"
iconState += "_[shot.select_name]"
if(itemState)
itemState += "[shot.select_name]"
if(power_supply.charge < shot.e_cost)
overlays += "[icon_state]_empty"
ratio = 0
for(var/i = ratio, i >= 1, i--)
overlays += image(icon = icon, icon_state = iconState, pixel_x = ammo_x_offset * (i -1))
if(F)
var/iconF = "flight"
if(F.on)
overlays += "flight-[initial(icon_state)]-on"
else
overlays += "flight-[initial(icon_state)]"
return
iconF = "flight_on"
overlays += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)
if(itemState)
itemState += "[ratio]"
item_state = itemState
/obj/item/weapon/gun/energy/ui_action_click()
toggle_gunlight()
@@ -7,6 +7,7 @@
materials = list(MAT_METAL=2000)
origin_tech = "combat=3;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
/obj/item/weapon/gun/energy/laser/practice
@@ -20,6 +21,7 @@
name ="retro laser"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
ammo_x_offset = 3
/obj/item/weapon/gun/energy/laser/captain
@@ -29,6 +31,7 @@
force = 10
origin_tech = null
var/charge_tick = 0
ammo_x_offset = 3
/obj/item/weapon/gun/energy/laser/captain/New()
..()
@@ -87,6 +90,7 @@
origin_tech = "combat=4;materials=3;powerstorage=3"
ammo_type = list(/obj/item/ammo_casing/energy/laser/heavy)
pin = null
ammo_x_offset = 3
/obj/item/weapon/gun/energy/xray
name = "xray laser gun"
@@ -96,6 +100,7 @@
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
ammo_type = list(/obj/item/ammo_casing/energy/xray)
pin = null
ammo_x_offset = 3
////////Laser Tag////////////////////
@@ -109,6 +114,7 @@
needs_permit = 0
var/charge_tick = 0
pin = /obj/item/device/firing_pin/tag/blue
ammo_x_offset = 2
/obj/item/weapon/gun/energy/laser/bluetag/New()
..()
@@ -140,6 +146,7 @@
needs_permit = 0
var/charge_tick = 0
pin = /obj/item/device/firing_pin/tag/red
ammo_x_offset = 2
/obj/item/weapon/gun/energy/laser/redtag/New()
..()
+25 -55
View File
@@ -7,6 +7,9 @@
origin_tech = "combat=3;magnets=2"
modifystate = 2
can_flashlight = 1
ammo_x_offset = 3
flight_x_offset = 15
flight_y_offset = 10
/obj/item/weapon/gun/energy/gun/attack_self(mob/living/user)
select_fire(user)
@@ -15,7 +18,6 @@
/obj/item/weapon/gun/energy/gun/hos
desc = "This is a expensive, modern recreation of a antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time."
icon_state = "hoslaser"
item_state = null
force = 10
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/disabler)
@@ -23,22 +25,36 @@
name = "DRAGnet"
desc = "The \"Dynamic Rapid-Apprehension of the Guilty\" net is a revolution in law enforcement technology."
icon_state = "dragnet"
item_state = null
origin_tech = "combat=3;magnets=3;materials=4; bluespace=4"
ammo_type = list(/obj/item/ammo_casing/energy/net, /obj/item/ammo_casing/energy/trap)
can_flashlight = 0
ammo_x_offset = 1
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
icon_state = "turretlaser"
item_state = "turretlaser"
slot_flags = null
w_class = 5
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
heavy_weapon = 1
can_flashlight = 0
trigger_guard = 0
ammo_x_offset = 2
/obj/item/weapon/gun/energy/gun/nuclear
name = "advanced energy gun"
desc = "An energy gun with an experimental miniaturized nuclear reactor that automatically charges the internal power cell."
icon_state = "nucgun"
item_state = "nucgun"
origin_tech = "combat=3;materials=5;powerstorage=3"
var/lightfail = 0
var/fail_state = 0
var/charge_tick = 0
modifystate = 0
can_flashlight = 0
pin = null
can_charge = 0
ammo_x_offset = 1
/obj/item/weapon/gun/energy/gun/nuclear/New()
..()
@@ -63,7 +79,7 @@
/obj/item/weapon/gun/energy/gun/nuclear/proc/failcheck()
lightfail = 0
fail_state = 0
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
for (var/mob/living/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
@@ -72,68 +88,22 @@
else
M << "<span class='danger'>You feel a warm sensation.</span>"
M.irradiate(rand(3,120))
lightfail = 1
fail_state = 1
else
for (var/mob/living/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
if (src in M.contents)
M << "<span class='danger'>Your gun's reactor overloads!</span>"
M << "<span class='danger'>You feel a wave of heat wash over you.</span>"
M.irradiate(300)
crit_fail = 1 //break the gun so it stops recharging
fail_state = 2 //break the gun so it stops recharging
SSobj.processing.Remove(src)
update_icon()
return 0
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge()
if (crit_fail)
overlays += "nucgun-whee"
return
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = Ceiling(ratio*4) * 25
overlays += "nucgun-[ratio]"
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor()
if(crit_fail)
overlays += "nucgun-crit"
return
if(lightfail)
overlays += "nucgun-medium"
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
overlays += "nucgun-light"
else
overlays += "nucgun-clean"
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_mode()
if (select == 1)
overlays += "nucgun-stun"
else if (select == 2)
overlays += "nucgun-kill"
/obj/item/weapon/gun/energy/gun/nuclear/emp_act(severity)
..()
reliability -= round(15/severity)
/obj/item/weapon/gun/energy/gun/nuclear/update_icon()
overlays.Cut()
update_charge()
update_reactor()
update_mode()
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
icon_state = "turretlaser"
slot_flags = null
w_class = 5
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
heavy_weapon = 1
can_flashlight = 0
trigger_guard = 0
/obj/item/weapon/gun/energy/gun/turret/update_icon()
icon_state = initial(icon_state)
..()
overlays += "[icon_state]_fail_[fail_state]"
@@ -28,6 +28,8 @@
item_state = "pulse"
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
can_flashlight = 1
flight_x_offset = 18
flight_y_offset = 12
/obj/item/weapon/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/device/firing_pin/implant/loyalty
+39 -42
View File
@@ -9,7 +9,9 @@
flags = CONDUCT
slot_flags = SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
ammo_x_offset = 3
flight_x_offset = 17
flight_y_offset = 9
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
return
@@ -18,11 +20,13 @@
name = "ion carbine"
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
icon_state = "ioncarbine"
item_state = "ioncarbine"
origin_tech = "combat=4;magnets=4;materials=4"
w_class = 3
slot_flags = SLOT_BELT
pin = null
ammo_x_offset = 2
flight_x_offset = 18
flight_y_offset = 11
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
@@ -31,6 +35,13 @@
origin_tech = "combat=5;materials=4;powerstorage=3"
ammo_type = list(/obj/item/ammo_casing/energy/declone)
pin = null
ammo_x_offset = 1
/obj/item/weapon/gun/energy/decloner/update_icon()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(power_supply.charge > shot.e_cost)
overlays += "decloner_spin"
/obj/item/weapon/gun/energy/floragun
name = "floral somatoray"
@@ -41,7 +52,6 @@
origin_tech = "materials=2;biotech=3;powerstorage=3"
modifystate = 1
var/charge_tick = 0
var/mode = 0 //0 = mutate, 1 = yield boost
/obj/item/weapon/gun/energy/floragun/New()
..()
@@ -115,6 +125,7 @@
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
icon_state = "xray"
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
ammo_x_offset = 2
/obj/item/weapon/gun/energy/kinetic_accelerator
name = "proto-kinetic accelerator"
@@ -151,6 +162,13 @@
update_icon()
return
/obj/item/weapon/gun/energy/kinetic_accelerator/update_icon()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(power_supply.charge < shot.e_cost)
icon_state = "[initial(icon_state)]_empty"
else
icon_state = initial(icon_state)
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
name = "mini energy crossbow"
desc = "A weapon favored by syndicate stealth specialists."
@@ -205,51 +223,15 @@
else
..()
/obj/item/weapon/gun/energy/plasmacutter/update_icon()
return
/obj/item/weapon/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
origin_tech = "combat=3;materials=4;magnets=3;plasmatech=3;engineering=2"
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
icon_state = "disabler"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
/obj/item/weapon/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
var/charge_tick = 0
var/recharge_time = 2.5
can_charge = 0
/obj/item/weapon/gun/energy/disabler/cyborg/New()
..()
SSobj.processing |= src
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
SSobj.processing.Remove(src)
..()
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(!power_supply) return 0 //sanity
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
power_supply.give(shot.e_cost) //... to recharge the shot
update_icon()
return 1
/obj/item/weapon/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
desc = "A projector that emits high density quantum-coupled bluespace beams."
@@ -261,6 +243,7 @@
/obj/item/weapon/gun/energy/wormhole_projector/update_icon()
icon_state = "[initial(icon_state)][select]"
item_state = icon_state
return
/obj/item/weapon/gun/energy/wormhole_projector/attack_self(mob/living/user)
@@ -333,3 +316,17 @@
power_supply.give(shot.e_cost) //...to recharge the shot
return 1
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
desc = "A gun that changes temperatures."
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
cell_type = "/obj/item/weapon/stock_parts/cell/high"
pin = null
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user)
select_fire(user)
update_icon()
return
+44 -1
View File
@@ -1,18 +1,20 @@
/obj/item/weapon/gun/energy/taser
name = "taser gun"
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 3
/obj/item/weapon/gun/energy/stunrevolver
name = "stun revolver"
desc = "A high-tech revolver that fires internal, reusable taser cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers."
icon_state = "stunrevolver"
item_state = "gun"
ammo_type = list(/obj/item/ammo_casing/energy/electrode/gun)
can_flashlight = 0
pin = null
ammo_x_offset = 1
/obj/item/weapon/gun/energy/gun/advtaser
name = "hybrid taser"
@@ -20,6 +22,7 @@
icon_state = "advtaser"
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/disabler)
origin_tech = null
ammo_x_offset = 2
/obj/item/weapon/gun/energy/gun/advtaser/cyborg
name = "cyborg taser"
@@ -52,3 +55,43 @@
update_icon()
return 1
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
icon_state = "disabler"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
ammo_x_offset = 3
/obj/item/weapon/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
var/charge_tick = 0
var/recharge_time = 2.5
can_charge = 0
/obj/item/weapon/gun/energy/disabler/cyborg/New()
..()
SSobj.processing |= src
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
SSobj.processing.Remove(src)
..()
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(!power_supply) return 0 //sanity
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
power_supply.give(shot.e_cost) //... to recharge the shot
update_icon()
return 1
@@ -1,14 +0,0 @@
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
desc = "A gun that changes temperatures."
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
cell_type = "/obj/item/weapon/stock_parts/cell/high"
pin = null
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user)
select_fire(user)
update_icon()
return
@@ -15,6 +15,9 @@
mag_type = /obj/item/ammo_box/magazine/smgm9mm
pin = null
/obj/item/weapon/gun/projectile/automatic/proto/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/projectile/automatic/update_icon()
..()
overlays.Cut()
@@ -130,6 +133,10 @@
fire_delay = 3
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/projectile/automatic/l6_saw/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user)
cover_open = !cover_open
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
@@ -262,6 +262,9 @@
pin = /obj/item/device/firing_pin/implant/pindicate
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
..()
update_icon()
+1 -1
View File
@@ -92,7 +92,7 @@
return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume
/obj/item/projectile/Bump(atom/A, yes)
if(!yes) //prevents multi bumps.
if(!yes) //prevents double bumps.
return
if(A == firer || A == src)
loc = A.loc
@@ -576,21 +576,21 @@
C.l_hand.clean_blood()
if(C.wear_mask)
if(C.wear_mask.clean_blood())
C.update_inv_wear_mask(0)
C.update_inv_wear_mask()
if(ishuman(M))
var/mob/living/carbon/human/H = C
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0)
H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0)
H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0)
H.update_inv_w_uniform()
if(H.shoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0)
H.update_inv_shoes()
M.clean_blood()
/datum/reagent/cryptobiolin
+2 -2
View File
@@ -67,8 +67,8 @@
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/H in viewers(get_turf(holder.my_atom), null))
H.flash_eyes()
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
C.flash_eyes()
for(var/i = 1, i <= amount_to_spawn, i++)
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
@@ -159,8 +159,8 @@
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
M.flash_eyes()
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
C.flash_eyes()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
@@ -191,7 +191,7 @@
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
for(var/mob/living/carbon/M in viewers(get_turf(holder.my_atom), null))
M.flash_eyes()
for(var/i = 1, i <= 4 + rand(1,2), i++)
+5 -6
View File
@@ -79,8 +79,8 @@
reagents.handle_reactions()
..()
/obj/item/weapon/reagent_containers/throw_impact(atom/target,mob/thrower)
..()
/obj/item/weapon/reagent_containers/throw_impact(atom/target)
. = ..()
if(!reagents.total_volume || !spillable)
return
@@ -96,12 +96,11 @@
R += A.id + " ("
R += num2text(A.volume) + "),"
if(thrownby)
add_logs(thrownby, M, "splashed", R)
reagents.reaction(target, TOUCH)
if(thrower)
add_logs(thrower, M, "splashed", R)
else if((!target.density || target.throwpass) && thrower && thrower.mind && thrower.mind.assigned_role == "Bartender")
else if((target.CanPass(src, get_turf(src))) && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
return
@@ -107,7 +107,7 @@
category = list("initial", "Electronics")
/datum/design/apc_board
name = "APC Power Control Module"
name = "APC module"
id = "power control"
build_type = AUTOLATHE
materials = list(MAT_METAL = 100, MAT_GLASS = 100)
@@ -122,6 +122,14 @@
build_path = /obj/item/weapon/airlock_electronics
category = list("initial", "Electronics")
/datum/design/firelock_board
name = "Firelock circuitry"
id = "firelock_board"
build_type = AUTOLATHE
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
build_path = /obj/item/weapon/firelock_board
category = list("initial", "Electronics")
/datum/design/airalarm_electronics
name = "Air alarm electronics"
id = "airalarm_electronics"
+74 -34
View File
@@ -22,7 +22,8 @@
/obj/docking_port/Destroy()
return QDEL_HINT_LETMELIVE
/obj/docking_port/shuttleRotate()
return //we don't rotate with shuttles via this code.
//returns a list(x0,y0, x1,y1) where points 0 and 1 are bounding corners of the projected rectangle
/obj/docking_port/proc/return_coords(_x, _y, _dir)
if(!_dir)
@@ -267,6 +268,27 @@
else
WARNING("shuttle \"[id]\" could not enter transit space. S0=[S0 ? S0.id : "null"] S1=[S1 ? S1.id : "null"]")
//default shuttleRotate
/atom/proc/shuttleRotate(rotation)
//rotate our direction
dir = angle2dir(rotation+dir2angle(dir))
//resmooth if need be.
if(smooth)
smooth_icon(src)
//rotate the pixel offsets too.
if (pixel_x || pixel_y)
if (rotation < 0)
rotation += 360
for (var/turntimes=rotation/90;turntimes>0;turntimes--)
var/oldPX = pixel_x
var/oldPY = pixel_y
pixel_x = oldPY
pixel_y = (oldPX*(-1))
//this is the main proc. It instantly moves our mobile port to stationary port S1
//it handles all the generic behaviour, such as sanity checks, closing doors on the shuttle, stunning mobs, etc
/obj/docking_port/mobile/proc/dock(obj/docking_port/stationary/S1)
@@ -296,6 +318,13 @@
var/list/L0 = return_ordered_turfs(x, y, z, dir, areaInstance)
var/list/L1 = return_ordered_turfs(S1.x, S1.y, S1.z, S1.dir)
var/rotation = dir2angle(S1.dir)-dir2angle(dir)
if ((rotation % 90) != 0)
rotation += (rotation % 90) //diagonal rotations not allowed, round up
rotation = SimplifyDegrees(rotation)
//remove area surrounding docking port
if(areaInstance.contents.len)
var/area/A0 = locate("[area_type]")
@@ -324,55 +353,64 @@
Ts1.copy_air_with_tile(T0)
//move mobile to new location
loc = S1.loc
dir = S1.dir
//move all objects
for(var/obj/O in T0)
if(O.invisibility >= 101)
continue
if(O == T0.lighting_object)
continue
O.loc = T1
//close open doors
if(istype(O, /obj/machinery/door))
var/obj/machinery/door/Door = O
spawn(-1)
if(Door)
Door.close()
for(var/mob/M in T0)
if(!M.move_on_shuttle)
continue
M.loc = T1
for(var/atom/movable/AM in T0)
if (rotation)
AM.shuttleRotate(rotation)
//docking turbulence
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 2, 1) // turn it down a bit come on
else
shake_camera(M, 7, 1)
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(3)
if (istype(AM,/obj))
var/obj/O = AM
if(O.invisibility >= 101)
continue
if(O == T0.lighting_object)
continue
O.loc = T1
T0.ChangeTurf(turf_type)
//close open doors
if(istype(O, /obj/machinery/door))
var/obj/machinery/door/Door = O
spawn(-1)
if(Door)
Door.close()
else if (istype(AM,/mob))
var/mob/M = AM
if(!M.move_on_shuttle)
continue
M.loc = T1
//air system updates
for(var/turf/T1 in L1)
//docking turbulence
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 2, 1) // turn it down a bit come on
else
shake_camera(M, 7, 1)
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(3)
if (rotation)
T1.shuttleRotate(rotation)
//lighting stuff
T1.redraw_lighting()
SSair.remove_from_active(T1)
T1.CalculateAdjacentTurfs()
SSair.add_to_active(T1,1)
for(var/turf/T0 in L0)
T0.ChangeTurf(turf_type)
T0.redraw_lighting()
SSair.remove_from_active(T0)
T0.CalculateAdjacentTurfs()
SSair.add_to_active(T0,1)
loc = S1.loc
dir = S1.dir
/*
if(istype(S1, /obj/docking_port/stationary/transit))
var/d = turn(dir, 180 + travelDir)
@@ -381,6 +419,8 @@
T.update_icon()
*/
/obj/docking_port/mobile/proc/findTransitDock()
var/obj/docking_port/stationary/transit/T = SSshuttle.getDock("[id]_transit")
if(T && !canDock(T))
+8 -7
View File
@@ -28,13 +28,14 @@
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
..()
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
PoolOrNew(/obj/effect/effect/sparks, loc)
playsound(src.loc, "sparks", 50, 1)
if(isliving(hit_atom))
blink_mob(hit_atom)
qdel(src)
if(!..()) // not caught in mid-air
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
var/turf/T = get_turf(hit_atom)
PoolOrNew(/obj/effect/effect/sparks, T)
playsound(src.loc, "sparks", 50, 1)
if(isliving(hit_atom))
blink_mob(hit_atom)
qdel(src)
// Artifical bluespace crystal, doesn't give you much research.