mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 14:15:22 +01:00
Merge remote-tracking branch 'origin/master' into bay_examine
# Conflicts: # code/game/objects/structures/displaycase.dm
This commit is contained in:
@@ -606,7 +606,7 @@ var/global/nologevent = 0
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num
|
||||
if(!delay)
|
||||
if(isnull(delay))
|
||||
delay = 50
|
||||
else
|
||||
delay = delay * 10
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
set name = "Broken Sprite List"
|
||||
set category = "Debug"
|
||||
|
||||
var/icon/IL = new('icons/mob/items_lefthand.dmi')
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new('icons/mob/items_righthand.dmi')
|
||||
var/list/Rstates = IR.IconStates()
|
||||
|
||||
|
||||
var/text
|
||||
for(var/A in typesof(/obj/item))
|
||||
var/obj/item/O = new A( locate(1,1,1) )
|
||||
if(!O) continue
|
||||
var/icon/IL = new(O.lefthand_file)
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new(O.righthand_file)
|
||||
var/list/Rstates = IR.IconStates()
|
||||
var/icon/J = new(O.icon)
|
||||
var/list/istates = J.IconStates()
|
||||
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state))
|
||||
|
||||
@@ -704,7 +704,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/proto(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_l_store)
|
||||
|
||||
if ("tournament chef") //Steven Seagal FTW
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
X << msg
|
||||
|
||||
usr << "Your prayers have been received by the gods."
|
||||
@@ -37,7 +37,7 @@
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
X << msg
|
||||
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
@@ -53,12 +53,16 @@
|
||||
msg = "\blue <b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
X << msg
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
admins << "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
X << msg
|
||||
X << "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>"
|
||||
|
||||
@@ -160,7 +160,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/grenade/empgrenade(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/m2411(src), slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/pistol/m2411(src), slot_belt)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/l6_saw(src), slot_r_hand)
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/datum/alarm_handler/burglar
|
||||
category = "Burglar Alarms"
|
||||
@@ -128,6 +128,7 @@ datum/preferences
|
||||
var/species = "Human"
|
||||
var/language = "None" //Secondary language
|
||||
|
||||
var/body_accessory = null
|
||||
|
||||
var/speciesprefs = 0//I hate having to do this, I really do (Using this for oldvox code, making names universal I guess
|
||||
|
||||
@@ -366,10 +367,14 @@ datum/preferences
|
||||
dat += "<br><b>Eyes</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]'><tr><td>__</td></tr></table></font><br>"
|
||||
|
||||
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People" || species == "Vulpkanin")
|
||||
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People" || species == "Vulpkanin" || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
|
||||
dat += "<br><b>Body Color</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font>"
|
||||
|
||||
if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
dat += "<br><b>Body Accessory</b><br>"
|
||||
dat += "Accessory: <a href='?_src_=prefs;preference=body_accessory;task=input'>[body_accessory ? "[body_accessory]" : "None"]</a><br>"
|
||||
|
||||
dat += "</td></tr></table><hr><center>"
|
||||
|
||||
if (1) // General Preferences
|
||||
@@ -1165,10 +1170,27 @@ datum/preferences
|
||||
|
||||
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
|
||||
|
||||
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles
|
||||
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles
|
||||
if(new_h_style)
|
||||
h_style = new_h_style
|
||||
|
||||
if("body_accessory")
|
||||
var/list/possible_body_accessories = list()
|
||||
if(check_rights(R_ADMIN, 1, user))
|
||||
possible_body_accessories = body_accessory_by_name.Copy()
|
||||
else
|
||||
for(var/B in body_accessory_by_name)
|
||||
var/datum/body_accessory/accessory = body_accessory_by_name[B]
|
||||
if(!istype(accessory))
|
||||
possible_body_accessories += "None" //the only null entry should be the "None" option
|
||||
continue
|
||||
if(species in accessory.allowed_species)
|
||||
possible_body_accessories += B
|
||||
|
||||
var/new_body_accessory = input(user, "Choose your body accessory:", "Character Preference") as null|anything in possible_body_accessories
|
||||
if(new_body_accessory)
|
||||
body_accessory = new_body_accessory
|
||||
|
||||
if("facial")
|
||||
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as color|null
|
||||
if(new_facial)
|
||||
@@ -1246,7 +1268,7 @@ datum/preferences
|
||||
s_tone = 35 - max(min( round(new_s_tone), 220),1)
|
||||
|
||||
if("skin")
|
||||
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People"|| species == "Vulpkanin")
|
||||
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People"|| species == "Vulpkanin" || body_accessory_by_species[species] || check_rights(R_ADMIN, 1, user))
|
||||
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference") as color|null
|
||||
if(new_skin)
|
||||
r_skin = hex2num(copytext(new_skin, 2, 4))
|
||||
@@ -1571,6 +1593,9 @@ datum/preferences
|
||||
character.undershirt = undershirt
|
||||
character.socks = socks
|
||||
|
||||
if(body_accessory)
|
||||
character.body_accessory = body_accessory_by_name["[body_accessory]"]
|
||||
|
||||
if(backbag > 4 || backbag < 1)
|
||||
backbag = 1 //Same as above
|
||||
character.backbag = backbag
|
||||
|
||||
@@ -151,7 +151,8 @@
|
||||
|
||||
//socks
|
||||
socks = query.item[54]
|
||||
|
||||
body_accessory = query.item[55]
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
@@ -200,7 +201,7 @@
|
||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||
|
||||
socks = sanitize_text(socks, initial(socks))
|
||||
|
||||
body_accessory = sanitize_text(body_accessory, initial(body_accessory))
|
||||
|
||||
// if(isnull(disabilities)) disabilities = 0
|
||||
if(!player_alt_titles) player_alt_titles = new()
|
||||
@@ -274,7 +275,8 @@
|
||||
rlimb_data='[rlimblist]',
|
||||
nanotrasen_relation='[nanotrasen_relation]',
|
||||
speciesprefs='[speciesprefs]',
|
||||
socks='[socks]'
|
||||
socks='[socks]',
|
||||
body_accessory='[body_accessory]'
|
||||
WHERE ckey='[C.ckey]'
|
||||
AND slot='[default_slot]'"}
|
||||
)
|
||||
@@ -302,7 +304,9 @@
|
||||
job_karma_high, job_karma_med, job_karma_low,
|
||||
flavor_text, med_record, sec_record, gen_record,
|
||||
player_alt_titles, be_special,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs, socks)
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs,
|
||||
socks, body_accessory)
|
||||
|
||||
VALUES
|
||||
('[C.ckey]', '[default_slot]', '[sql_sanitize_text(metadata)]', '[sql_sanitize_text(real_name)]', '[be_random_name]','[gender]',
|
||||
'[age]', '[sql_sanitize_text(species)]', '[sql_sanitize_text(language)]',
|
||||
@@ -319,7 +323,9 @@
|
||||
'[job_karma_high]', '[job_karma_med]', '[job_karma_low]',
|
||||
'[sql_sanitize_text(flavor_text)]', '[sql_sanitize_text(med_record)]', '[sql_sanitize_text(sec_record)]', '[sql_sanitize_text(gen_record)]',
|
||||
'[playertitlelist]', '[be_special]',
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]','[socks]')
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]',
|
||||
'[socks]', '[body_accessory]')
|
||||
|
||||
"}
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. vox wearing jumpsuits).
|
||||
*/
|
||||
var/list/sprite_sheets_refit = null
|
||||
lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
|
||||
|
||||
//BS12: Species-restricted clothing check.
|
||||
/obj/item/clothing/mob_can_equip(M as mob, slot)
|
||||
|
||||
@@ -174,3 +174,23 @@
|
||||
desc = "An EVA suit specifically designed for the clown. SPESSHONK!"
|
||||
icon_state = "spaceclown_suit"
|
||||
item_state = "spaceclown_items"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/freedom
|
||||
name = "eagle helmet"
|
||||
desc = "An advanced, space-proof helmet. It appears to be modeled after an old-world eagle."
|
||||
icon_state = "griffinhat"
|
||||
item_state = "griffinhat"
|
||||
armor = list(melee = 40, bullet = 40, laser = 30, energy = 25, bomb = 100, bio = 100, rad = 100)
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
unacidable = 1
|
||||
|
||||
/obj/item/clothing/suit/space/freedom
|
||||
name = "eagle suit"
|
||||
desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be integrated into the suit and the wings appear to be stuck in 'freedom' mode."
|
||||
icon_state = "freedom"
|
||||
item_state = "freedom"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
|
||||
armor = list(melee = 40, bullet = 40, laser = 30,energy = 25, bomb = 100, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
unacidable = 1
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
icon_state = "blue_pyjamas"
|
||||
_color = "blue_pyjamas"
|
||||
item_state = "w_suit"
|
||||
|
||||
/obj/item/clothing/under/patriotsuit
|
||||
name = "Patriotic Suit"
|
||||
desc = "Motorcycle not included."
|
||||
icon_state = "ek"
|
||||
item_state = "ek"
|
||||
_color = "ek"
|
||||
|
||||
/obj/item/clothing/under/captain_fly
|
||||
name = "rogue captains uniform"
|
||||
|
||||
@@ -148,3 +148,10 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
|
||||
/datum/controller/plants/proc/remove_plant(var/obj/effect/plant/plant)
|
||||
plant_queue -= plant
|
||||
|
||||
/client/proc/list_plant_sprites()
|
||||
if(!plant_controller || !plant_controller.plant_sprites || !plant_controller.plant_sprites.len)
|
||||
world << "Cannot list plant sprites, plant controller or plant sprites list may not be initialized."
|
||||
|
||||
for(var/base in plant_controller.plant_sprites)
|
||||
world << "[base] : [plant_controller.plant_sprites[base]] growth states"
|
||||
@@ -43,10 +43,11 @@
|
||||
kitchen_tag = "ghostchili"
|
||||
preset_icon = "ghostchilipepper"
|
||||
|
||||
/datum/seed/chili/ice/New()
|
||||
/datum/seed/chili/ghost/New()
|
||||
..()
|
||||
set_trait(TRAIT_MATURATION,4)
|
||||
set_trait(TRAIT_PRODUCTION,4)
|
||||
set_trait(TRAIT_MATURATION,10)
|
||||
set_trait(TRAIT_PRODUCTION,10)
|
||||
set_trait(TRAIT_YIELD,3)
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#00EDC6")
|
||||
|
||||
// Berry plants/variants.
|
||||
|
||||
@@ -133,6 +133,8 @@
|
||||
)
|
||||
//--FalseIncarnate
|
||||
|
||||
var/last_plant_ikey //This is for debugging reference, and is otherwise useless. --FalseIncarnate
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/AltClick()
|
||||
if(mechanical && !usr.stat && !usr.lying && Adjacent(usr))
|
||||
close_lid(usr)
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
if(age >= seed.get_trait(TRAIT_MATURATION))
|
||||
overlay_stage = seed.growth_stages
|
||||
else
|
||||
var/maturation = round(seed.get_trait(TRAIT_MATURATION)/seed.growth_stages)
|
||||
var/maturation = seed.get_trait(TRAIT_MATURATION)/seed.growth_stages
|
||||
if(maturation < 1)
|
||||
maturation = 1
|
||||
overlay_stage = maturation ? max(1,round(age/maturation)) : 1
|
||||
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-[overlay_stage]"
|
||||
var/image/plant_overlay = plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
|
||||
@@ -45,6 +47,7 @@
|
||||
plant_overlay.color = seed.get_trait(TRAIT_PLANT_COLOUR)
|
||||
plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"] = plant_overlay
|
||||
overlays |= plant_overlay
|
||||
last_plant_ikey = ikey
|
||||
|
||||
if(harvest && overlay_stage == seed.growth_stages)
|
||||
ikey = "[seed.get_trait(TRAIT_PRODUCT_ICON)]"
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
var/new_type = pick(
|
||||
200; /obj/item/weapon/hatchet, \
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol, \
|
||||
/obj/item/weapon/gun/projectile/automatic/deagle, \
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle, \
|
||||
/obj/item/weapon/gun/projectile/revolver/russian, \
|
||||
)
|
||||
new new_type(C)
|
||||
|
||||
@@ -101,22 +101,23 @@
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
empty_content()
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O)
|
||||
@@ -253,7 +254,7 @@
|
||||
while(s.amount > s.max_amount)
|
||||
new s.type(loc,s.max_amount)
|
||||
s.use(s.max_amount)
|
||||
s.loc = loc
|
||||
s.forceMove(loc)
|
||||
s.layer = initial(s.layer)
|
||||
|
||||
/**********************Mining Equipment Locker**************************/
|
||||
@@ -734,7 +735,6 @@
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
icon_state = "lazarus_hypo"
|
||||
item_state = "hypo"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throwforce = 0
|
||||
w_class = 2.0
|
||||
throw_speed = 3
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "Gibtonite ore"
|
||||
item_state = "Gibtonite ore"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 4
|
||||
throw_range = 0
|
||||
anchored = 1 //Forces people to carry it by hand, no pulling!
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(!istype(W))
|
||||
return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
W.forceMove(src) //TODO: move to equipped?
|
||||
l_hand = W
|
||||
W.layer = 20 //TODO: move to equipped?
|
||||
// l_hand.screen_loc = ui_lhand
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!istype(W))
|
||||
return 0
|
||||
if(!r_hand)
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
r_hand = W
|
||||
W.layer = 20
|
||||
// r_hand.screen_loc = ui_rhand
|
||||
@@ -71,7 +71,7 @@
|
||||
//This is probably the main one you need to know :)
|
||||
//Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD.
|
||||
/mob/proc/put_in_hands(obj/item/W)
|
||||
W.loc = get_turf(src)
|
||||
W.forceMove(get_turf(src))
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped()
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if(I)
|
||||
if(client)
|
||||
client.screen -= I
|
||||
I.loc = loc
|
||||
I.forceMove(loc)
|
||||
I.dropped(src)
|
||||
if(I)
|
||||
I.layer = initial(I.layer)
|
||||
@@ -249,13 +249,13 @@
|
||||
if (src.back && istype(src.back, /obj/item/weapon/storage/backpack))
|
||||
var/obj/item/weapon/storage/backpack/B = src.back
|
||||
if(B.contents.len < B.storage_slots && W.w_class <= B.max_w_class)
|
||||
W.loc = B
|
||||
W.forceMove(B)
|
||||
equipped = 1
|
||||
|
||||
if(equipped)
|
||||
W.layer = 20
|
||||
if(src.back && W.loc != src.back)
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
else
|
||||
if (del_on_fail)
|
||||
qdel(W)
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
#define AUTOHISS_OFF 0
|
||||
#define AUTOHISS_BASIC 1
|
||||
#define AUTOHISS_FULL 2
|
||||
|
||||
#define AUTOHISS_NUM 3
|
||||
|
||||
|
||||
/mob/living/proc/handle_autohiss(message, datum/language/L)
|
||||
return message // no autohiss at this level
|
||||
|
||||
/mob/living/carbon/human/handle_autohiss(message, datum/language/L)
|
||||
if(!client || client.autohiss_mode == AUTOHISS_OFF) // no need to process if there's no client or they have autohiss off
|
||||
return message
|
||||
return species.handle_autohiss(message, L, client.autohiss_mode)
|
||||
|
||||
/client
|
||||
var/autohiss_mode = AUTOHISS_OFF
|
||||
|
||||
/client/verb/toggle_autohiss()
|
||||
set name = "Toggle Auto-Accent"
|
||||
set desc = "Toggle automatic accents for your species"
|
||||
set category = "OOC"
|
||||
|
||||
autohiss_mode = (autohiss_mode + 1) % AUTOHISS_NUM
|
||||
switch(autohiss_mode)
|
||||
if(AUTOHISS_OFF)
|
||||
src << "Auto-hiss is now OFF."
|
||||
if(AUTOHISS_BASIC)
|
||||
src << "Auto-hiss is now BASIC."
|
||||
if(AUTOHISS_FULL)
|
||||
src << "Auto-hiss is now FULL."
|
||||
else
|
||||
autohiss_mode = AUTOHISS_OFF
|
||||
src << "Auto-hiss is now OFF."
|
||||
|
||||
/datum/species
|
||||
var/list/autohiss_basic_map = null
|
||||
var/list/autohiss_extra_map = null
|
||||
var/list/autohiss_exempt = null
|
||||
|
||||
/datum/species/unathi
|
||||
autohiss_basic_map = list(
|
||||
"s" = list("ss", "sss", "ssss")
|
||||
)
|
||||
autohiss_extra_map = list(
|
||||
"x" = list("ks", "kss", "ksss")
|
||||
)
|
||||
autohiss_exempt = list("Sinta'unathi")
|
||||
|
||||
/datum/species/tajaran
|
||||
autohiss_basic_map = list(
|
||||
"r" = list("rr", "rrr", "rrrr")
|
||||
)
|
||||
autohiss_exempt = list("Siik'tajr")
|
||||
|
||||
/datum/species/plasmaman
|
||||
autohiss_basic_map = list(
|
||||
"s" = list("ss", "sss", "ssss")
|
||||
)
|
||||
|
||||
/datum/species/kidan
|
||||
autohiss_basic_map = list(
|
||||
"z" = list("zz", "zzz", "zzzz"),
|
||||
"v" = list("vv", "vvv", "vvvv")
|
||||
)
|
||||
autohiss_extra_map = list(
|
||||
"s" = list("z", "zs", "zzz", "zzsz")
|
||||
)
|
||||
autohiss_exempt = list("Chittin")
|
||||
|
||||
|
||||
/datum/species/proc/handle_autohiss(message, datum/language/lang, mode)
|
||||
if(!autohiss_basic_map)
|
||||
return message
|
||||
if(autohiss_exempt && (lang.name in autohiss_exempt))
|
||||
return message
|
||||
|
||||
var/map = autohiss_basic_map.Copy()
|
||||
if(mode == AUTOHISS_FULL && autohiss_extra_map)
|
||||
map |= autohiss_extra_map
|
||||
|
||||
. = list()
|
||||
|
||||
while(length(message))
|
||||
var/min_index = 10000 // if the message is longer than this, the autohiss is the least of your problems
|
||||
var/min_char = null
|
||||
for(var/char in map)
|
||||
var/i = findtext(message, char)
|
||||
if(!i) // no more of this character anywhere in the string, don't even bother searching next time
|
||||
map -= char
|
||||
else if(i < min_index)
|
||||
min_index = i
|
||||
min_char = char
|
||||
if(!min_char) // we didn't find any of the mapping characters
|
||||
. += message
|
||||
break
|
||||
. += copytext(message, 1, min_index)
|
||||
if(copytext(message, min_index, min_index+1) == uppertext(min_char))
|
||||
. += capitalize(pick(map[min_char]))
|
||||
else
|
||||
. += pick(map[min_char])
|
||||
message = copytext(message, min_index + 1)
|
||||
|
||||
return list2text(.)
|
||||
|
||||
#undef AUTOHISS_OFF
|
||||
#undef AUTOHISS_BASIC
|
||||
#undef AUTOHISS_FULL
|
||||
#undef AUTOHISS_NUM
|
||||
@@ -143,7 +143,7 @@
|
||||
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" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
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()
|
||||
@@ -153,7 +153,7 @@
|
||||
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" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
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()
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
|
||||
var/global/list/body_accessory_by_name = list("None" = null)
|
||||
|
||||
/hook/startup/proc/initalize_body_accessories()
|
||||
|
||||
// __init_body_accessory(/datum/body_accessory/body)
|
||||
__init_body_accessory(/datum/body_accessory/tail)
|
||||
|
||||
if(body_accessory_by_name.len)
|
||||
if(initialize_body_accessory_by_species())
|
||||
return 1
|
||||
|
||||
return 0 //fail if no bodies are found
|
||||
|
||||
var/global/list/body_accessory_by_species = list("None" = null)
|
||||
|
||||
/proc/initialize_body_accessory_by_species()
|
||||
for(var/B in body_accessory_by_name)
|
||||
var/datum/body_accessory/accessory = body_accessory_by_name[B]
|
||||
if(!istype(accessory)) continue
|
||||
|
||||
for(var/species in accessory.allowed_species)
|
||||
if(!body_accessory_by_species["[species]"]) body_accessory_by_species["[species]"] = list()
|
||||
body_accessory_by_species["[species]"] += accessory
|
||||
|
||||
if(body_accessory_by_species.len)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/__init_body_accessory(var/ba_path)
|
||||
if(ispath(ba_path))
|
||||
var/_added_counter = 0
|
||||
|
||||
for(var/A in subtypesof(ba_path))
|
||||
var/datum/body_accessory/B = new A
|
||||
if(istype(B))
|
||||
body_accessory_by_name[B.name] += B
|
||||
++_added_counter
|
||||
|
||||
if(_added_counter)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/datum/body_accessory
|
||||
var/name = "default"
|
||||
|
||||
var/icon = null
|
||||
var/icon_state = ""
|
||||
|
||||
var/animated_icon = null
|
||||
var/animated_icon_state = ""
|
||||
|
||||
var/blend_mode = null
|
||||
|
||||
var/pixel_x_offset = 0
|
||||
var/pixel_y_offset = 0
|
||||
|
||||
var/list/allowed_species = list()
|
||||
|
||||
/datum/body_accessory/proc/try_restrictions(var/mob/living/carbon/human/H)
|
||||
return 1
|
||||
|
||||
/datum/body_accessory/proc/get_animated_icon() //return animated if it has it, return static if it does not.
|
||||
if(animated_icon)
|
||||
return animated_icon
|
||||
|
||||
else return icon
|
||||
|
||||
/datum/body_accessory/proc/get_animated_icon_state()
|
||||
if(animated_icon_state)
|
||||
return animated_icon_state
|
||||
|
||||
else return icon_state
|
||||
|
||||
/*
|
||||
//Bodies
|
||||
/datum/body_accessory/body
|
||||
blend_mode = ICON_MULTIPLY
|
||||
|
||||
/datum/body_accessory/body/snake
|
||||
name = "Snake"
|
||||
|
||||
icon = 'icons/mob/body_accessory_64.dmi'
|
||||
icon_state = "naga"
|
||||
|
||||
pixel_x_offset = -16*/
|
||||
|
||||
//Tails
|
||||
/datum/body_accessory/tail
|
||||
icon = 'icons/mob/body_accessory.dmi'
|
||||
animated_icon = 'icons/mob/body_accessory.dmi'
|
||||
blend_mode = ICON_ADD
|
||||
|
||||
/datum/body_accessory/tail/try_restrictions(var/mob/living/carbon/human/H)
|
||||
if(!H.wear_suit || !(H.wear_suit.flags_inv & HIDETAIL) && !istype(H.wear_suit, /obj/item/clothing/suit/space))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//vulpakin
|
||||
/datum/body_accessory/tail/vulpkanin_2
|
||||
name = "Vulpkanin Alt 1 (Bushy)"
|
||||
|
||||
icon_state = "vulptail2"
|
||||
animated_icon_state = "vulptail2_a"
|
||||
allowed_species = list("Vulpkanin")
|
||||
|
||||
/datum/body_accessory/tail/vulpkanin_3
|
||||
name = "Vulpkanin Alt 2 (Straight)"
|
||||
|
||||
icon_state = "vulptail3"
|
||||
animated_icon_state = "vulptail3_a"
|
||||
allowed_species = list("Vulpkanin")
|
||||
|
||||
/datum/body_accessory/tail/vulpkanin_4
|
||||
name = "Vulpkanin Alt 3 (Tiny)"
|
||||
|
||||
icon_state = "vulptail4"
|
||||
animated_icon_state = "vulptail4_a"
|
||||
allowed_species = list("Vulpkanin")
|
||||
|
||||
/datum/body_accessory/tail/vulpkanin_5
|
||||
name = "Vulpkanin Alt 4 (Short)"
|
||||
|
||||
icon_state = "vulptail5"
|
||||
animated_icon_state = "vulptail5_a"
|
||||
allowed_species = list("Vulpkanin")
|
||||
@@ -116,7 +116,12 @@
|
||||
m_type = 1
|
||||
|
||||
if("wag")
|
||||
if(species.bodyflags & TAIL_WAGGING)
|
||||
if(body_accessory)
|
||||
if(body_accessory.try_restrictions(src))
|
||||
message = "<B>[src]</B> starts wagging \his tail."
|
||||
start_tail_wagging(1)
|
||||
|
||||
else if(species.bodyflags & TAIL_WAGGING)
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
message = "<B>[src]</B> starts wagging \his tail."
|
||||
src.start_tail_wagging(1)
|
||||
@@ -126,7 +131,7 @@
|
||||
return
|
||||
|
||||
if("swag")
|
||||
if(species.bodyflags & TAIL_WAGGING)
|
||||
if(species.bodyflags & TAIL_WAGGING || body_accessory)
|
||||
message = "<B>[src]</B> stops wagging \his tail."
|
||||
src.stop_tail_wagging(1)
|
||||
else
|
||||
|
||||
@@ -1779,4 +1779,9 @@
|
||||
if(I.body_parts_covered & HEAD)
|
||||
prot["head"] = max(1 - I.permeability_coefficient, prot["head"])
|
||||
var/protection = (prot["head"] + prot["arms"] + prot["feet"] + prot["legs"] + prot["groin"] + prot["chest"] + prot["hands"])/7
|
||||
return protection
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/proc/get_full_print()
|
||||
if(!dna || !dna.uni_identity)
|
||||
return
|
||||
return md5(dna.uni_identity)
|
||||
@@ -82,4 +82,6 @@
|
||||
var/lastFart = 0 // Toxic fart cooldown.
|
||||
|
||||
var/fire_dmi = 'icons/mob/OnFire.dmi'
|
||||
var/fire_sprite = "Standing"
|
||||
var/fire_sprite = "Standing"
|
||||
|
||||
var/datum/body_accessory/body_accessory = null
|
||||
|
||||
@@ -1,152 +1,10 @@
|
||||
/mob/living/carbon/human/say(var/message)
|
||||
|
||||
var/verb = "says"
|
||||
var/alt_name = ""
|
||||
var/message_range = world.view
|
||||
var/italics = 0
|
||||
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat)
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
return
|
||||
|
||||
if (is_muzzled())
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = " (as [get_id_name("Unknown")])"
|
||||
|
||||
//parse the radio code and consume it
|
||||
if (message_mode)
|
||||
if (message_mode == "headset")
|
||||
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
|
||||
else
|
||||
message = copytext(message,3)
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if(speaking)
|
||||
message = copytext(message,2+length(speaking.key))
|
||||
else
|
||||
speaking = get_default_language()
|
||||
|
||||
var/ending = copytext(message, length(message))
|
||||
if (speaking)
|
||||
// This is broadcast to all mobs with the language,
|
||||
// irrespective of distance or anything else.
|
||||
if(speaking.flags & HIVEMIND)
|
||||
speaking.broadcast(src,trim(message))
|
||||
return
|
||||
//If we've gotten this far, keep going!
|
||||
verb = speaking.get_spoken_verb(ending)
|
||||
else
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
|
||||
switch (message_mode)
|
||||
if("headset")
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = l_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = r_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
if("right ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
R = r_ear
|
||||
has_radio = 1
|
||||
if(r_hand && istype(r_hand, /obj/item/device/radio))
|
||||
R = r_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
|
||||
if("left ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
R = l_ear
|
||||
has_radio = 1
|
||||
if(l_hand && istype(l_hand,/obj/item/device/radio))
|
||||
R = l_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
if("intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
used_radios += I
|
||||
if("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
return
|
||||
else
|
||||
if(message_mode)
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
l_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
r_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
var/sound/speech_sound
|
||||
var/sound_vol
|
||||
if(species.speech_sounds && prob(species.speech_chance))
|
||||
speech_sound = sound(pick(species.speech_sounds))
|
||||
sound_vol = 50
|
||||
|
||||
//speaking into radios
|
||||
if(used_radios.len)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
if(speaking)
|
||||
message_range = speaking.get_talkinto_msg_range(message)
|
||||
var/msg
|
||||
if(!speaking || !(speaking.flags & NO_TALK_MSG))
|
||||
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
|
||||
for(var/mob/living/M in hearers(5, src))
|
||||
if((M != src) && msg)
|
||||
M.show_message(msg)
|
||||
if (speech_sound)
|
||||
sound_vol *= 0.5
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
|
||||
..(message, alt_name = alt_name) //ohgod we should really be passing a datum here.
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append)
|
||||
if(stat == CONSCIOUS)
|
||||
@@ -207,7 +65,7 @@
|
||||
// return 0
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/HasVoiceChanger()
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
|
||||
if(!gear)
|
||||
@@ -216,7 +74,7 @@
|
||||
if(changer && changer.active && changer.voice)
|
||||
return changer.voice
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
var/has_changer = HasVoiceChanger()
|
||||
if(has_changer)
|
||||
@@ -240,15 +98,6 @@
|
||||
return special_voice
|
||||
|
||||
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
@@ -257,27 +106,27 @@
|
||||
verb = speaking.get_spoken_verb(ending)
|
||||
else
|
||||
if(ending == "!")
|
||||
verb = "exclaims"
|
||||
else if(ending == "?")
|
||||
verb = "asks"
|
||||
return pick("exclaims", "shouts", "yells")
|
||||
if(ending == "?")
|
||||
return "asks"
|
||||
|
||||
return verb
|
||||
|
||||
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
|
||||
|
||||
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb)
|
||||
var/list/returns[3]
|
||||
var/verb = "says"
|
||||
var/handled = 0
|
||||
var/speech_problem_flag = 0
|
||||
|
||||
if(silent || (sdisabilities & MUTE))
|
||||
message = ""
|
||||
handled = 1
|
||||
speech_problem_flag = 1
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
verb = pick("whinnies","neighs", "says")
|
||||
handled = 1
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
verb = pick("whinnies","neighs", "says")
|
||||
speech_problem_flag = 1
|
||||
|
||||
if(dna)
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
@@ -285,25 +134,18 @@
|
||||
continue
|
||||
if(gene.is_active(src))
|
||||
message = gene.OnSay(src,message)
|
||||
handled = 1
|
||||
speech_problem_flag = 1
|
||||
|
||||
if(message != "")
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
handled = 1
|
||||
if(slurring)
|
||||
message = slur(message)
|
||||
verb = "slurs"
|
||||
handled = 1
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
verb = "stammers"
|
||||
handled = 1
|
||||
var/list/parent = ..()
|
||||
message = parent[1]
|
||||
verb = parent[2]
|
||||
if(parent[3])
|
||||
speech_problem_flag = 1
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if(braindam >= 60)
|
||||
handled = 1
|
||||
speech_problem_flag = 1
|
||||
if(prob(braindam/4))
|
||||
message = stutter(message)
|
||||
verb = "gibbers"
|
||||
@@ -311,9 +153,70 @@
|
||||
message = uppertext(message)
|
||||
verb = "yells loudly"
|
||||
|
||||
if(COMIC in mutations)
|
||||
message = "<span class='sans'>[message]</span>"
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
returns[3] = handled
|
||||
returns[3] = speech_problem_flag
|
||||
return returns
|
||||
|
||||
/mob/living/carbon/human/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
|
||||
switch(message_mode)
|
||||
if("intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
used_radios += I
|
||||
|
||||
if("headset")
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = l_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = r_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
if("right ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
R = r_ear
|
||||
has_radio = 1
|
||||
if(r_hand && istype(r_hand, /obj/item/device/radio))
|
||||
R = r_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
|
||||
if("left ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
R = l_ear
|
||||
has_radio = 1
|
||||
if(l_hand && istype(l_hand,/obj/item/device/radio))
|
||||
R = l_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
if("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
return 1
|
||||
else
|
||||
if(message_mode)
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
l_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
r_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
/mob/living/carbon/human/handle_speech_sound()
|
||||
var/list/returns[2]
|
||||
if(species.speech_sounds && prob(species.speech_chance))
|
||||
returns[1] = sound(pick(species.speech_sounds))
|
||||
returns[2] = 50
|
||||
return returns
|
||||
@@ -35,7 +35,8 @@
|
||||
"antennae" = /obj/item/organ/wryn/hivenode
|
||||
)
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
|
||||
flags = IS_WHITELISTED | HAS_LIPS | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too
|
||||
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
var/has_fine_manipulation = 1 // Can use small items.
|
||||
|
||||
var/flags = 0 // Various specific features.
|
||||
var/clothing_flags = 0 // Underwear and socks.
|
||||
var/bloodflags = 0
|
||||
var/bodyflags = 0
|
||||
var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
primitive_form = "Monkey"
|
||||
path = /mob/living/carbon/human/human
|
||||
language = "Sol Common"
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
flags = HAS_LIPS | CAN_BE_FAT
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = HAS_SKIN_TONE
|
||||
dietflags = DIET_OMNI
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
@@ -37,7 +38,8 @@
|
||||
else, frequently even their own lives. They prefer warmer temperatures than most species and \
|
||||
their native tongue is a heavy hissing laungage called Sinta'Unathi."
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
flags = HAS_LIPS
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
|
||||
dietflags = DIET_CARN
|
||||
|
||||
@@ -88,7 +90,8 @@
|
||||
|
||||
primitive_form = "Farwa"
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
flags = HAS_LIPS | CAN_BE_FAT
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
@@ -119,7 +122,8 @@
|
||||
to the degree it can cause conflict with more rigorous and strict authorities. They speak a guttural language known as 'Canilunzt' \
|
||||
which has a heavy emphasis on utilizing tail positioning and ear twitches to communicate intent."
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
flags = HAS_LIPS
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
@@ -148,7 +152,8 @@
|
||||
herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \
|
||||
the secrets of their empire to their allies."
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
flags = HAS_LIPS
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = HAS_SKIN_COLOR
|
||||
dietflags = DIET_HERB
|
||||
|
||||
@@ -190,6 +195,7 @@
|
||||
poison_type = "oxygen"
|
||||
|
||||
flags = NO_SCAN | IS_WHITELISTED
|
||||
clothing_flags = HAS_SOCKS
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
blood_color = "#2299FC"
|
||||
@@ -278,6 +284,7 @@
|
||||
brute_mod = 0.8
|
||||
|
||||
flags = IS_WHITELISTED
|
||||
clothing_flags = HAS_SOCKS
|
||||
bodyflags = FEET_CLAWS
|
||||
dietflags = DIET_HERB
|
||||
|
||||
@@ -295,6 +302,7 @@
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN
|
||||
clothing_flags = HAS_SOCKS
|
||||
bodyflags = HAS_SKIN_COLOR
|
||||
bloodflags = BLOOD_SLIME
|
||||
dietflags = DIET_CARN
|
||||
@@ -322,7 +330,8 @@
|
||||
default_genes = list(REMOTE_TALK)
|
||||
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
dietflags = DIET_HERB
|
||||
|
||||
reagent_tag = PROCESS_ORG
|
||||
@@ -373,6 +382,7 @@
|
||||
water and other radiation."
|
||||
|
||||
flags = NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | NO_BLOOD | NO_PAIN
|
||||
clothing_flags = HAS_SOCKS
|
||||
dietflags = 0 //Diona regenerate nutrition in light, no diet necessary
|
||||
|
||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
||||
@@ -467,6 +477,7 @@
|
||||
passive_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA_RAD
|
||||
clothing_flags = HAS_SOCKS
|
||||
dietflags = 0 //IPCs can't eat, so no diet
|
||||
blood_color = "#1F181F"
|
||||
flesh_color = "#AAAAAA"
|
||||
|
||||
@@ -317,18 +317,18 @@ var/global/list/damage_icon_parts = list()
|
||||
stand_icon.Blend(base_icon,ICON_OVERLAY)
|
||||
|
||||
//Underwear
|
||||
if(underwear && species.flags & HAS_UNDERWEAR)
|
||||
if(underwear && species.clothing_flags & HAS_UNDERWEAR)
|
||||
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
|
||||
if(U)
|
||||
stand_icon.Blend(new /icon(U.icon, "uw_[U.icon_state]_s"), ICON_OVERLAY)
|
||||
|
||||
if(undershirt && species.flags & HAS_UNDERWEAR)
|
||||
if(undershirt && species.clothing_flags & HAS_UNDERSHIRT)
|
||||
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
|
||||
if(U2)
|
||||
stand_icon.Blend(new /icon(U2.icon, "us_[U2.icon_state]_s"), ICON_OVERLAY)
|
||||
|
||||
|
||||
if(socks)
|
||||
if(socks && species.clothing_flags & HAS_SOCKS)
|
||||
var/datum/sprite_accessory/socks/U3 = socks_list[socks]
|
||||
if(U3)
|
||||
stand_icon.Blend(new /icon(U3.icon, "sk_[U3.icon_state]_s"), ICON_OVERLAY)
|
||||
@@ -344,7 +344,7 @@ var/global/list/damage_icon_parts = list()
|
||||
stand_icon.Blend(lips, ICON_OVERLAY)
|
||||
|
||||
//tail
|
||||
update_tail_showing(0)
|
||||
update_tail_layer(0)
|
||||
|
||||
|
||||
//HAIR OVERLAY
|
||||
@@ -763,12 +763,12 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
update_tail_showing(0)
|
||||
update_tail_layer(0)
|
||||
|
||||
else
|
||||
overlays_standing[SUIT_LAYER] = null
|
||||
|
||||
update_tail_showing(0)
|
||||
update_tail_layer(0)
|
||||
|
||||
update_collar(0)
|
||||
|
||||
@@ -868,15 +868,10 @@ var/global/list/damage_icon_parts = list()
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
|
||||
if(r_hand.icon_override)
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(r_hand.sprite_sheets && r_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
var/image/I = image("icon" = r_hand.righthand_file, "icon_state"="[t_state]", "layer"=-R_HAND_LAYER)
|
||||
I = center_image(I, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
|
||||
overlays_standing[R_HAND_LAYER] = I
|
||||
|
||||
if (handcuffed) drop_r_hand()
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
@@ -889,24 +884,29 @@ var/global/list/damage_icon_parts = list()
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
|
||||
if(l_hand.icon_override)
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(l_hand.sprite_sheets && l_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
var/image/I = image("icon" = l_hand.lefthand_file, "icon_state"="[t_state]", "layer"=-L_HAND_LAYER)
|
||||
I = center_image(I, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)
|
||||
overlays_standing[L_HAND_LAYER] = I
|
||||
|
||||
if (handcuffed) drop_l_hand()
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/update_tail_layer(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
if(body_accessory)
|
||||
if(body_accessory.try_restrictions(src))
|
||||
var/icon/accessory_s = new/icon("icon" = body_accessory.icon, "icon_state" = body_accessory.icon_state)
|
||||
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
|
||||
|
||||
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
|
||||
|
||||
|
||||
else if(species.tail && species.bodyflags & HAS_TAIL) //no tailless tajaran
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
@@ -920,7 +920,13 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/proc/start_tail_wagging(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
if(body_accessory)
|
||||
var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state())
|
||||
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
|
||||
|
||||
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
|
||||
|
||||
else if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]w_s")
|
||||
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
@@ -932,14 +938,11 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/proc/stop_tail_wagging(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
update_tail_layer(update_icons) //just trigger a full update for normal stationary sprites
|
||||
|
||||
overlays_standing[TAIL_LAYER] = image(tail_s)
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
/mob/living/carbon/human/handle_transform_change()
|
||||
..()
|
||||
update_tail_layer()
|
||||
|
||||
//Adds a collar overlay above the helmet layer if the suit has one
|
||||
// Suit needs an identically named sprite in icons/mob/collar.dmi
|
||||
|
||||
@@ -141,26 +141,26 @@
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustToxLoss(200)
|
||||
else
|
||||
adjustToxLoss(301) //The config.health_threshold_dead is -100 by default, and slimes have 150hp (200hp for adults),
|
||||
else //so the ToxLoss needs to be 300 or above to guarrantee an instant death
|
||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
|
||||
/*moved after the temperature damage code so freeze beams can instantly kill slimes -Deity Link*/
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
if(src.stat != DEAD)
|
||||
src.stat = UNCONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
if(prob(30)) //I think this is meant to allow slimes to starve to death
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
|
||||
@@ -28,4 +28,8 @@
|
||||
|
||||
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().
|
||||
handle_transform_change()
|
||||
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/proc/handle_transform_change()
|
||||
return
|
||||
@@ -67,7 +67,125 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
/mob/living/proc/get_default_language()
|
||||
return default_language
|
||||
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/sound/speech_sound, var/sound_vol)
|
||||
/mob/living/proc/handle_speech_problems(var/message, var/verb)
|
||||
var/list/returns[3]
|
||||
var/speech_problem_flag = 0
|
||||
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
speech_problem_flag = 1
|
||||
|
||||
if(COMIC in mutations)
|
||||
message = "<span class='sans'>[message]</span>"
|
||||
|
||||
if(slurring)
|
||||
message = slur(message)
|
||||
verb = "slurs"
|
||||
speech_problem_flag = 1
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
verb = "stammers"
|
||||
speech_problem_flag = 1
|
||||
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
returns[3] = speech_problem_flag
|
||||
return returns
|
||||
|
||||
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
return 0
|
||||
|
||||
/mob/living/proc/handle_speech_sound()
|
||||
var/list/returns[2]
|
||||
returns[1] = null
|
||||
returns[2] = null
|
||||
return returns
|
||||
|
||||
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb = "says", var/alt_name="")
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat)
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
return
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
//parse the radio code and consume it
|
||||
if (message_mode)
|
||||
if (message_mode == "headset")
|
||||
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
|
||||
else
|
||||
message = copytext(message,3)
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
//parse the language code and consume it
|
||||
if(!speaking)
|
||||
speaking = parse_language(message)
|
||||
if(speaking)
|
||||
message = copytext(message, 2 + length(speaking.key))
|
||||
else
|
||||
speaking = get_default_language()
|
||||
|
||||
// This is broadcast to all mobs with the language,
|
||||
// irrespective of distance or anything else.
|
||||
if(speaking && (speaking.flags & HIVEMIND))
|
||||
speaking.broadcast(src,trim(message))
|
||||
return 1
|
||||
|
||||
verb = say_quote(message, speaking)
|
||||
|
||||
if(is_muzzled())
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
message = handle_autohiss(message, speaking)
|
||||
|
||||
var/list/handle_s = handle_speech_problems(message, verb)
|
||||
message = handle_s[1]
|
||||
verb = handle_s[2]
|
||||
|
||||
if(!message || message == "")
|
||||
return 0
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name))
|
||||
return 1
|
||||
|
||||
var/list/handle_v = handle_speech_sound()
|
||||
var/sound/speech_sound = handle_v[1]
|
||||
var/sound_vol = handle_v[2]
|
||||
|
||||
var/italics = 0
|
||||
var/message_range = world.view
|
||||
|
||||
//speaking into radios
|
||||
if(used_radios.len)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
if(speaking)
|
||||
message_range = speaking.get_talkinto_msg_range(message)
|
||||
var/msg
|
||||
if(!speaking || !(speaking.flags & NO_TALK_MSG))
|
||||
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
|
||||
for(var/mob/living/M in hearers(5, src))
|
||||
if((M != src) && msg)
|
||||
M.show_message(msg)
|
||||
if (speech_sound)
|
||||
sound_vol *= 0.5
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
|
||||
@@ -538,7 +538,6 @@
|
||||
return
|
||||
H.icon_state = "pai-[icon_state]"
|
||||
H.item_state = "pai-[icon_state]"
|
||||
H.icon_override = 'icons/mob/in-hand/paiheld.dmi'//I have these in diffrent DMI so i am overriding
|
||||
grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work
|
||||
grabber.update_inv_l_hand()
|
||||
grabber.update_inv_r_hand()
|
||||
@@ -546,13 +545,22 @@
|
||||
return H
|
||||
|
||||
/mob/living/silicon/pai/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == I_HELP)
|
||||
get_scooped(H)
|
||||
//return
|
||||
var/mob/living/carbon/human/H = over_object //changed to human to avoid stupid issues like xenos holding pAIs.
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(usr == src)
|
||||
switch(alert(H, "[src] wants you to pick them up. Do it?",,"Yes","No"))
|
||||
if("Yes")
|
||||
if(Adjacent(H))
|
||||
get_scooped(H)
|
||||
else
|
||||
src << "<span class='warning'>You need to stay in reaching distance to be picked up.</span>"
|
||||
if("No")
|
||||
src << "<span class='warning'>[H] decided not to pick you up.</span>"
|
||||
else
|
||||
return ..()
|
||||
if(Adjacent(H))
|
||||
get_scooped(H)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/pai/on_forcemove(atom/newloc)
|
||||
if(card)
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/mob/living/silicon/robot/drone/say(var/message)
|
||||
if(local_transmit)
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return 0
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
message = sanitize(message)
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if(copytext(message,1,2) == ";")
|
||||
var/datum/language/L = all_languages["Drone Talk"]
|
||||
if(istype(L))
|
||||
return L.broadcast(src,trim(copytext(message,2)))
|
||||
|
||||
//Must be concious to speak
|
||||
if (stat)
|
||||
return 0
|
||||
|
||||
var/list/listeners = hearers(5,src)
|
||||
listeners |= src
|
||||
|
||||
for(var/mob/living/silicon/D in listeners)
|
||||
if(D.client && D.local_transmit)
|
||||
D << "<b>[src]</b> transmits, \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
|
||||
return 1
|
||||
return ..(message, 0)
|
||||
@@ -1,3 +1,38 @@
|
||||
/mob/living/silicon/say(var/message, var/sanitize = 1)
|
||||
return ..(sanitize ? sanitize(message) : message)
|
||||
|
||||
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
..()
|
||||
if(message_mode)
|
||||
if(!is_component_functioning("radio"))
|
||||
src << "<span class='warning'>Your radio isn't functional at this time.</span>"
|
||||
return 0
|
||||
if(message_mode == "general")
|
||||
message_mode = null
|
||||
return radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
..()
|
||||
if(message_mode == "department")
|
||||
return holopad_talk(message, verb, speaking)
|
||||
else if(message_mode)
|
||||
if (aiRadio.disabledAi || aiRestorePowerRoutine || stat)
|
||||
src << "<span class='danger'>System Error - Transceiver Disabled.</span>"
|
||||
return 0
|
||||
if(message_mode == "general")
|
||||
message_mode = null
|
||||
return aiRadio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
..()
|
||||
if(message_mode)
|
||||
if(message_mode == "general")
|
||||
message_mode = null
|
||||
return radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
@@ -23,137 +58,6 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/say(var/message)
|
||||
if (!message)
|
||||
return 0
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return 0
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
var/bot_type = 0 //Let's not do a fuck ton of type checks, thanks.
|
||||
if(istype(src, /mob/living/silicon/ai))
|
||||
bot_type = IS_AI
|
||||
else if(istype(src, /mob/living/silicon/robot))
|
||||
bot_type = IS_ROBOT
|
||||
else if(istype(src, /mob/living/silicon/pai))
|
||||
bot_type = IS_PAI
|
||||
|
||||
var/mob/living/silicon/ai/AI = src //and let's not declare vars over and over and over for these guys.
|
||||
var/mob/living/silicon/robot/R = src
|
||||
var/mob/living/silicon/pai/P = src
|
||||
|
||||
//Must be concious to speak
|
||||
if (stat)
|
||||
return 0
|
||||
|
||||
var/verb = say_quote(message)
|
||||
|
||||
//parse radio key and consume it
|
||||
var/message_mode = parse_message_mode(message, "general")
|
||||
if (message_mode)
|
||||
if (message_mode == "general")
|
||||
message = trim(copytext(message,2))
|
||||
else
|
||||
message = trim(copytext(message,3))
|
||||
|
||||
//parse language key and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
|
||||
message = trim(copytext(message,2+length(speaking.key)))
|
||||
else
|
||||
speaking = get_default_language()
|
||||
|
||||
if (speaking)
|
||||
verb = speaking.speech_verb
|
||||
// This is broadcast to all mobs with the language,
|
||||
// irrespective of distance or anything else.
|
||||
if(speaking.flags & HIVEMIND)
|
||||
speaking.broadcast(src,trim(message))
|
||||
return 1
|
||||
|
||||
// Currently used by drones.
|
||||
if(local_transmit)
|
||||
var/list/listeners = hearers(5,src)
|
||||
listeners |= src
|
||||
|
||||
for(var/mob/living/silicon/D in listeners)
|
||||
if(D.client && istype(D,src.type))
|
||||
D << "<b>[src]</b> transmits, \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
|
||||
return 1
|
||||
|
||||
if(message_mode && bot_type == IS_ROBOT && !R.is_component_functioning("radio"))
|
||||
src << "\red Your radio isn't functional at this time."
|
||||
return 0
|
||||
|
||||
switch(message_mode)
|
||||
if("department")
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
return AI.holopad_talk(message, verb, speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
return 0
|
||||
|
||||
if("general")
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
if (AI.aiRadio.disabledAi || AI.aiRestorePowerRoutine || AI.stat)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return 0
|
||||
else
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return AI.aiRadio.talk_into(src,message,null,verb,speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,null,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,null,verb,speaking)
|
||||
return 0
|
||||
|
||||
else
|
||||
if(message_mode)
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
if (AI.aiRadio.disabledAi || AI.aiRestorePowerRoutine || AI.stat)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return 0
|
||||
else
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return AI.aiRadio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
return 0
|
||||
|
||||
return ..(message,speaking,verb)
|
||||
|
||||
//For holopads only. Usable by AI.
|
||||
/mob/living/silicon/ai/proc/holopad_talk(var/message, verb, datum/language/speaking)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(!register_alarms)
|
||||
return
|
||||
|
||||
var/list/register_to = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
var/list/register_to = list(atmosphere_alarm, burglar_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
for(var/datum/alarm_handler/AH in register_to)
|
||||
AH.register(src, /mob/living/silicon/proc/receive_alarm)
|
||||
queued_alarms[AH] = list() // Makes sure alarms remain listed in consistent order
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/araneus
|
||||
name = "Sergeant Araneus"
|
||||
real_name = "Sergeant Araneus"
|
||||
voice_name = "unidentifiable voice"
|
||||
desc = "A fierce companion for any person of power, this spider has been carefully trained by Nanotrasen specialists. Its beady, staring eyes send shivers down your spine."
|
||||
faction = list("spiders")
|
||||
icon_state = "guard"
|
||||
icon_living = "guard"
|
||||
icon_dead = "guard_dead"
|
||||
icon_gib = "guard_dead"
|
||||
turns_per_move = 8
|
||||
response_help = "pets"
|
||||
emote_hear = list("chitters")
|
||||
maxHealth = 250
|
||||
health = 200
|
||||
harm_intent_damage = 3
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 20
|
||||
|
||||
min_oxy = 5
|
||||
max_tox = 2
|
||||
max_co2 = 5
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
/obj/machinery/suit_storage_unit, /obj/machinery/clonepod, \
|
||||
/obj/machinery/dna_scannernew, /obj/machinery/telecomms, \
|
||||
/obj/machinery/nuclearbomb, /obj/machinery/particle_accelerator, \
|
||||
/obj/machinery/recharge_station, /obj/machinery/smartfridge)
|
||||
/obj/machinery/recharge_station, /obj/machinery/smartfridge, \
|
||||
/obj/machinery/computer)
|
||||
|
||||
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
|
||||
var/obj/item/held_item = null
|
||||
|
||||
@@ -544,21 +544,10 @@
|
||||
gib()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/say(var/message,var/datum/language/speaking,var/verb)
|
||||
if(stat)
|
||||
return
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if(stat)
|
||||
return
|
||||
|
||||
verb = "says"
|
||||
/mob/living/simple_animal/say(var/message)
|
||||
var/verb = "says"
|
||||
|
||||
if(speak_emote.len)
|
||||
verb = pick(speak_emote)
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, speaking, verb)
|
||||
..(message, null, verb)
|
||||
@@ -1248,7 +1248,7 @@ mob/proc/yank_out_object()
|
||||
var/mob/living/carbon/human/human_user = U
|
||||
human_user.bloody_hands(H)
|
||||
|
||||
selection.loc = get_turf(src)
|
||||
selection.forceMove(get_turf(src))
|
||||
if(!(U.l_hand && U.r_hand))
|
||||
U.put_in_hands(selection)
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if(!mob.control_object) return
|
||||
mob.control_object.dir = direct
|
||||
else
|
||||
mob.control_object.loc = get_step(mob.control_object,direct)
|
||||
mob.control_object.forceMove(get_step(mob.control_object,direct))
|
||||
return
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
var/mob/living/L = mob
|
||||
switch(L.incorporeal_move)
|
||||
if(1)
|
||||
L.loc = get_step(L, direct)
|
||||
L.forceMove(get_step(L, direct))
|
||||
L.dir = direct
|
||||
if(2)
|
||||
if(prob(50))
|
||||
@@ -420,7 +420,7 @@
|
||||
return
|
||||
else
|
||||
return
|
||||
L.loc = locate(locx,locy,mobloc.z)
|
||||
L.forceMove(locate(locx,locy,mobloc.z))
|
||||
spawn(0)
|
||||
var/limit = 2//For only two trailing shadows.
|
||||
for(var/turf/T in getline(mobloc, L.loc))
|
||||
@@ -431,7 +431,7 @@
|
||||
else
|
||||
spawn(0)
|
||||
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,L.dir)
|
||||
L.loc = get_step(L, direct)
|
||||
L.forceMove(get_step(L, direct))
|
||||
L.dir = direct
|
||||
if(3) //Incorporeal move, but blocked by holy-watered tiles
|
||||
var/turf/simulated/floor/stepTurf = get_step(L, direct)
|
||||
@@ -441,7 +441,7 @@
|
||||
spawn(2)
|
||||
L.notransform = 0
|
||||
else
|
||||
L.loc = get_step(L, direct)
|
||||
L.forceMove(get_step(L, direct))
|
||||
L.dir = direct
|
||||
return 1
|
||||
|
||||
|
||||
@@ -254,19 +254,19 @@ datum/preferences
|
||||
|
||||
|
||||
var/icon/underwear_s = null
|
||||
if(underwear && current_species.flags & HAS_UNDERWEAR)
|
||||
if(underwear && current_species.clothing_flags & HAS_UNDERWEAR)
|
||||
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
|
||||
if(U)
|
||||
underwear_s = new/icon(U.icon, "[U.icon_state]_s", ICON_OVERLAY)
|
||||
|
||||
var/icon/undershirt_s = null
|
||||
if(undershirt && current_species.flags & HAS_UNDERWEAR)
|
||||
if(undershirt && current_species.clothing_flags & HAS_UNDERSHIRT)
|
||||
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
|
||||
if(U2)
|
||||
undershirt_s = new/icon(U2.icon, "[U2.icon_state]_s", ICON_OVERLAY)
|
||||
|
||||
var/icon/socks_s = null
|
||||
if(socks)
|
||||
if(socks && current_species.clothing_flags & HAS_SOCKS)
|
||||
var/datum/sprite_accessory/socks/U3 = socks_list[socks]
|
||||
if(U3)
|
||||
socks_s = new/icon(U3.icon, "[U3.icon_state]_s", ICON_OVERLAY)
|
||||
@@ -402,7 +402,7 @@ datum/preferences
|
||||
if(LAWYER)
|
||||
clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
@@ -569,7 +569,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
@@ -655,7 +655,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
|
||||
@@ -81,14 +81,6 @@
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
/mob/proc/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
|
||||
@@ -3,60 +3,6 @@
|
||||
H.dna.SetSEState(MONKEYBLOCK,1)
|
||||
domutcheck(H, null)
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/proc/monkeyize()
|
||||
if (notransform)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
if (W==w_uniform) // will be torn
|
||||
continue
|
||||
unEquip(W)
|
||||
regenerate_icons()
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
stunned = 1
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/t in organs)
|
||||
del(t)
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
flick("h2monkey", animation)
|
||||
sleep(48)
|
||||
//animation = null
|
||||
|
||||
if(!species.primitive) //If the creature in question has no primitive set, this is going to be messy.
|
||||
gib()
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/O = null
|
||||
|
||||
O = new species.primitive(loc)
|
||||
|
||||
O.dna = dna.Clone()
|
||||
O.dna.SetSEState(MONKEYBLOCK,1)
|
||||
O.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
|
||||
O.loc = loc
|
||||
O.viruses = viruses
|
||||
O.a_intent = I_HARM
|
||||
|
||||
|
||||
if (client)
|
||||
client.mob = O
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
|
||||
O << "<B>You are now [O]. </B>"
|
||||
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
del(animation)
|
||||
|
||||
return O
|
||||
*/
|
||||
|
||||
/mob/new_player/AIize()
|
||||
spawning = 1
|
||||
return ..()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/datum/nano_module/alarm_monitor/all/New()
|
||||
..()
|
||||
alarm_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
alarm_handlers = list(atmosphere_alarm, burglar_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
|
||||
/datum/nano_module/alarm_monitor/engineering/New()
|
||||
..()
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/datum/nano_module/alarm_monitor/security/New()
|
||||
..()
|
||||
alarm_handlers = list(camera_alarm, motion_alarm)
|
||||
alarm_handlers = list(burglar_alarm, camera_alarm, motion_alarm)
|
||||
|
||||
/datum/nano_module/alarm_monitor/proc/register(var/object, var/procName)
|
||||
for(var/datum/alarm_handler/AH in alarm_handlers)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A katana infused with a strong energy"
|
||||
icon_state = "energy_katana"
|
||||
item_state = "energy_katana"
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
force = 40
|
||||
throwforce = 20
|
||||
var/cooldown = 0 // Because spam aint cool, yo.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
item_state = "pen"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/perapc = 0 // per-apc avilability
|
||||
var/perapc_excess = 0
|
||||
var/netexcess = 0 // excess power on the powernet (typically avail-load)
|
||||
|
||||
|
||||
var/problem = 0 // If either of these is set to 1 there is some sort of issue at the powernet.
|
||||
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
..()
|
||||
|
||||
/datum/powernet/Destroy()
|
||||
//Go away references, you suck!
|
||||
for(var/obj/structure/cable/C in cables)
|
||||
cables -= C
|
||||
C.powernet = null
|
||||
for(var/obj/machinery/power/M in nodes)
|
||||
nodes -= M
|
||||
M.powernet = null
|
||||
|
||||
powernets -= src
|
||||
return ..()
|
||||
|
||||
@@ -76,7 +84,7 @@
|
||||
M.disconnect_from_network()//..remove it
|
||||
M.powernet = src
|
||||
nodes[M] = M
|
||||
|
||||
|
||||
// Triggers warning for certain amount of ticks
|
||||
/datum/powernet/proc/trigger_warning(var/duration_ticks = 20)
|
||||
problem = max(duration_ticks, problem)
|
||||
@@ -85,7 +93,7 @@
|
||||
//called every ticks by the powernet controller
|
||||
/datum/powernet/proc/reset()
|
||||
var/numapc = 0
|
||||
|
||||
|
||||
if(problem > 0)
|
||||
problem = max(problem - 1, 0)
|
||||
|
||||
|
||||
@@ -183,9 +183,9 @@
|
||||
caliber = "a762"
|
||||
projectile_type = "/obj/item/projectile/bullet"
|
||||
|
||||
/obj/item/ammo_casing/a545
|
||||
desc = "A 5.45mm bullet casing."
|
||||
caliber = "a545"
|
||||
/obj/item/ammo_casing/a556
|
||||
desc = "A 5.56mm bullet casing."
|
||||
caliber = "a556"
|
||||
projectile_type = "/obj/item/projectile/bullet/heavybullet"
|
||||
|
||||
/obj/item/ammo_casing/rocket
|
||||
|
||||
@@ -116,6 +116,17 @@
|
||||
..()
|
||||
icon_state = "[initial(icon_state)]-[ammo_count() ? "8" : "0"]"
|
||||
|
||||
/obj/item/ammo_box/magazine/uzim9mm
|
||||
name = "uzi magazine (9mm)"
|
||||
icon_state = "uzi9mm-32"
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
caliber = "9mm"
|
||||
max_ammo = 32
|
||||
|
||||
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
|
||||
..()
|
||||
icon_state = "uzi9mm-[round(ammo_count(),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm
|
||||
name = "SMG magazine (9mm)"
|
||||
icon_state = "smg9mm"
|
||||
@@ -163,17 +174,14 @@
|
||||
multiple_sprites = 2
|
||||
max_ammo = 8
|
||||
|
||||
/obj/item/ammo_box/magazine/m545
|
||||
name = "box magazine (5.45mm)"
|
||||
icon_state = "5.45m"
|
||||
/obj/item/ammo_box/magazine/m556
|
||||
name = "toploader magazine (5.56mm)"
|
||||
icon_state = "5.56m"
|
||||
origin_tech = "combat=5;syndicate=1"
|
||||
ammo_type = "/obj/item/ammo_casing/a545"
|
||||
caliber = "a545"
|
||||
ammo_type = /obj/item/ammo_casing/a556
|
||||
caliber = "a556"
|
||||
max_ammo = 30
|
||||
|
||||
/obj/item/ammo_box/magazine/m545/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)]-[round(ammo_count(),10)]"
|
||||
multiple_sprites = 2
|
||||
|
||||
/obj/item/ammo_box/magazine/m762
|
||||
name = "box magazine (7.62mm)"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=2000)
|
||||
@@ -43,6 +45,8 @@
|
||||
var/can_flashlight = 0
|
||||
var/heavy_weapon = 0
|
||||
var/randomspread = 0
|
||||
|
||||
var/burst_size = 1
|
||||
|
||||
proc/ready_to_fire()
|
||||
if(world.time >= last_fired + fire_delay)
|
||||
@@ -124,9 +128,6 @@
|
||||
user << "<span class='warning'>[src] is not ready to fire again!"
|
||||
return
|
||||
|
||||
if(!process_chambered()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
if(heavy_weapon)
|
||||
if(user.get_inactive_hand())
|
||||
recoil = 4 //one-handed kick
|
||||
@@ -142,48 +143,55 @@
|
||||
|
||||
var/spread = 0
|
||||
var/turf/targloc = get_turf(target)
|
||||
if(chambered)
|
||||
for (var/i = max(1, chambered.pellets), i > 0, i--) //Previous way of doing it fucked up math for spreading. This way, even the first projectile is part of the spread code.
|
||||
if(i != max(1, chambered.pellets)) //Have we fired the initial chambered bullet yet?
|
||||
in_chamber = new chambered.projectile_type()
|
||||
for(var/f = 1 to burst_size)
|
||||
if(!process_chambered()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
if(chambered)
|
||||
for (var/i = max(1, chambered.pellets), i > 0, i--) //Previous way of doing it fucked up math for spreading. This way, even the first projectile is part of the spread code.
|
||||
if(i != max(1, chambered.pellets)) //Have we fired the initial chambered bullet yet?
|
||||
in_chamber = new chambered.projectile_type()
|
||||
ready_projectile(target, user)
|
||||
prepare_shot(in_chamber)
|
||||
if(chambered.deviation)
|
||||
if(randomspread) //Random spread
|
||||
spread = (rand() - 0.5) * chambered.deviation
|
||||
else //Smart spread
|
||||
spread = (i / chambered.pellets - 0.5) * chambered.deviation
|
||||
if(!process_projectile(targloc, user, params, spread))
|
||||
return 0
|
||||
else
|
||||
ready_projectile(target, user)
|
||||
prepare_shot(in_chamber)
|
||||
if(chambered.deviation)
|
||||
if(randomspread) //Random spread
|
||||
spread = (rand() - 0.5) * chambered.deviation
|
||||
else //Smart spread
|
||||
spread = (i / chambered.pellets - 0.5) * chambered.deviation
|
||||
if(!process_projectile(targloc, user, params, spread))
|
||||
return 0
|
||||
else
|
||||
ready_projectile(target, user)
|
||||
prepare_shot(in_chamber)
|
||||
if(!process_projectile(targloc, user, params, spread))
|
||||
return 0
|
||||
|
||||
if(recoil)
|
||||
spawn()
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
if(recoil)
|
||||
spawn()
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
|
||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
if(f == 1) // Only print this once
|
||||
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
|
||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
|
||||
if(heavy_weapon)
|
||||
if(user.get_inactive_hand())
|
||||
if(prob(15))
|
||||
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
|
||||
user.drop_item()
|
||||
if(heavy_weapon)
|
||||
if(user.get_inactive_hand())
|
||||
if(prob(15))
|
||||
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
|
||||
user.drop_item()
|
||||
break
|
||||
|
||||
update_icon()
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
update_icon()
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
sleep(fire_delay)
|
||||
|
||||
/obj/item/weapon/gun/proc/ready_projectile(atom/target as mob|obj|turf, mob/living/user)
|
||||
in_chamber.firer = user
|
||||
@@ -204,6 +212,7 @@
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.current = curloc
|
||||
in_chamber.OnFired()
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
if(params)
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
|
||||
|
||||
icon = 'icons/obj/gun.dmi' //Actual on-sprite is handled by icon_override.
|
||||
icon_override = 'icons/mob/vox.dmi'
|
||||
icon_state = "noisecannon"
|
||||
item_state = "noisecannon"
|
||||
recoil = 1
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A hybrid taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
origin_tech = null
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/obj/item/weapon/gun/energy/hos
|
||||
name = "head of security's energy gun"
|
||||
name = "\improper X-01 MultiPhase Energy Gun"
|
||||
desc = "This is a modern recreation of the captain's antique laser gun. This gun has several unique fire modes, but lacks the ability to recharge over time."
|
||||
icon_state = "hoslaser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
force = 10
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
clumsy_check = 0
|
||||
|
||||
obj/item/weapon/gun/energy/laser/retro
|
||||
name ="retro laser"
|
||||
name ="retro laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain
|
||||
name = "\improper QSJ-01 premium laser pistol"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
|
||||
force = 10
|
||||
origin_tech = null
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
|
||||
icon_state = "ionrifle"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
fire_sound = 'sound/weapons/IonRifle.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 5.0
|
||||
@@ -36,7 +35,7 @@
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
icon_state = "floramut100"
|
||||
item_state = "obj/item/gun.dmi"
|
||||
item_state = "gun"
|
||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/floramut"
|
||||
origin_tech = "materials=2;biotech=3;powerstorage=3"
|
||||
@@ -128,11 +127,13 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
item_state = "pen"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
w_class = 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/mindflayer
|
||||
name = "mind flayer"
|
||||
name = "\improper Mind Flayer"
|
||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||
icon_state = "xray"
|
||||
projectile_type = "/obj/item/projectile/beam/mindflayer"
|
||||
@@ -231,7 +232,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified for extreme power output to crush rocks, but often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
|
||||
icon_state = "kineticgun"
|
||||
item_state = "kineticgun"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
projectile_type = "/obj/item/projectile/kinetic"
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
charge_cost = 5000
|
||||
@@ -309,7 +309,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
charge_cost = 250
|
||||
fire_delay = 15
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
|
||||
@@ -389,7 +388,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to far off locations."
|
||||
icon_state = "telegun"
|
||||
item_state = "ionrifle"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
fire_sound = 'sound/weapons/wave.ogg'
|
||||
origin_tech = "combat=6;materials=7;powerstorage=5;bluespace=5;syndicate=4"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
|
||||
@@ -1,80 +1,182 @@
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
icon = 'icons/obj/gun_temperature.dmi'
|
||||
icon_state = "tempgun_4"
|
||||
item_state = "tempgun_4"
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
desc = "A gun that changes temperatures."
|
||||
var/temperature = T20C
|
||||
var/current_temperature = T20C
|
||||
charge_cost = 100
|
||||
desc = "A gun that changes the body temperature of its targets."
|
||||
var/temperature = 300
|
||||
var/target_temperature = 300
|
||||
charge_cost = 90
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
|
||||
projectile_type = "/obj/item/projectile/temp"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
projectile_type = /obj/item/projectile/temp
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/temperaturegun
|
||||
|
||||
var/powercost = ""
|
||||
var/powercostcolor = ""
|
||||
|
||||
var/emagged = 0 //ups the temperature cap from 500 to 1000, targets hit by beams over 500 Kelvin will burst into flames
|
||||
var/dat = ""
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/New()
|
||||
..()
|
||||
update_icon()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
/obj/item/weapon/gun/energy/temperature/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
update_dat()
|
||||
|
||||
user << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x120")
|
||||
onclose(user, "tempgun")
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
/obj/item/weapon/gun/energy/temperature/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
emagged = 1
|
||||
user << "<span class='caution'>You double the gun's temperature cap! Targets hit by searing beams will burst into flames!</span>"
|
||||
desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked."
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
target_temperature = min((500 + 500*emagged), target_temperature+amount)
|
||||
else
|
||||
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
|
||||
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
|
||||
Current output temperature: [temp_text]<BR>
|
||||
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
||||
"}
|
||||
target_temperature = max(0, target_temperature+amount)
|
||||
if (istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
user << browse(dat, "window=freezegun;size=450x300;can_resize=1;can_close=1;can_minimize=1")
|
||||
onclose(user, "window=freezegun", src)
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min(500, src.current_temperature+amount)
|
||||
/obj/item/weapon/gun/energy/temperature/process()
|
||||
switch(temperature)
|
||||
if(0 to 100)
|
||||
charge_cost = 300
|
||||
powercost = "High"
|
||||
if(100 to 250)
|
||||
charge_cost = 180
|
||||
powercost = "Medium"
|
||||
if(251 to 300)
|
||||
charge_cost = 90
|
||||
powercost = "Low"
|
||||
if(301 to 400)
|
||||
charge_cost = 180
|
||||
powercost = "Medium"
|
||||
if(401 to 1000)
|
||||
charge_cost = 300
|
||||
powercost = "High"
|
||||
switch(powercost)
|
||||
if("High") powercostcolor = "orange"
|
||||
if("Medium") powercostcolor = "green"
|
||||
else powercostcolor = "blue"
|
||||
if(target_temperature != temperature)
|
||||
var/difference = abs(target_temperature - temperature)
|
||||
if(difference >= (10 + 40*emagged)) //so emagged temp guns adjust their temperature much more quickly
|
||||
if(target_temperature < temperature)
|
||||
temperature -= (10 + 40*emagged)
|
||||
else
|
||||
src.current_temperature = max(0, src.current_temperature+amount)
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
temperature += (10 + 40*emagged)
|
||||
else
|
||||
temperature = target_temperature
|
||||
update_icon()
|
||||
|
||||
if (istype(loc, /mob/living/carbon))
|
||||
var /mob/living/carbon/M = loc
|
||||
if (src == M.machine)
|
||||
update_dat()
|
||||
M << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x102")
|
||||
|
||||
|
||||
process()
|
||||
switch(temperature)
|
||||
if(0 to 100) charge_cost = 1000
|
||||
if(100 to 250) charge_cost = 500
|
||||
if(251 to 300) charge_cost = 100
|
||||
if(301 to 400) charge_cost = 500
|
||||
if(401 to 500) charge_cost = 1000
|
||||
if(power_supply)
|
||||
power_supply.give(50)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(current_temperature != temperature)
|
||||
var/difference = abs(current_temperature - temperature)
|
||||
if(difference >= 10)
|
||||
if(current_temperature < temperature)
|
||||
temperature -= 10
|
||||
else
|
||||
temperature += 10
|
||||
else
|
||||
temperature = current_temperature
|
||||
return
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_dat()
|
||||
dat = ""
|
||||
dat += "Current output temperature: "
|
||||
if(temperature > 500)
|
||||
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
dat += "<FONT color=red><B> SEARING!</B></FONT>"
|
||||
else if(temperature > (T0C + 50))
|
||||
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
else if(temperature > (T0C - 50))
|
||||
dat += "<FONT color=black><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
else
|
||||
dat += "<FONT color=blue><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
dat += "<BR>"
|
||||
dat += "Target output temperature: " //might be string idiocy, but at least it's easy to read
|
||||
dat += "<A href='?src=\ref[src];temp=-100'>-</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=-10'>-</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=-1'>-</A> "
|
||||
dat += "[target_temperature] "
|
||||
dat += "<A href='?src=\ref[src];temp=1'>+</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=10'>+</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=100'>+</A>"
|
||||
dat += "<BR>"
|
||||
dat += "Power cost: "
|
||||
dat += "<FONT color=[powercostcolor]><B>[powercost]</B></FONT>"
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_temperature()
|
||||
switch(temperature)
|
||||
if(501 to INFINITY)
|
||||
item_state = "tempgun_8"
|
||||
if(400 to 500)
|
||||
item_state = "tempgun_7"
|
||||
if(360 to 400)
|
||||
item_state = "tempgun_6"
|
||||
if(335 to 360)
|
||||
item_state = "tempgun_5"
|
||||
if(295 to 335)
|
||||
item_state = "tempgun_4"
|
||||
if(260 to 295)
|
||||
item_state = "tempgun_3"
|
||||
if(200 to 260)
|
||||
item_state = "tempgun_2"
|
||||
if(120 to 260)
|
||||
item_state = "tempgun_1"
|
||||
if(-INFINITY to 120)
|
||||
item_state = "tempgun_0"
|
||||
icon_state = item_state
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_charge()
|
||||
var/charge = power_supply.charge
|
||||
switch(charge)
|
||||
if(900 to INFINITY) overlays += "900"
|
||||
if(800 to 900) overlays += "800"
|
||||
if(700 to 800) overlays += "700"
|
||||
if(600 to 700) overlays += "600"
|
||||
if(500 to 600) overlays += "500"
|
||||
if(400 to 500) overlays += "400"
|
||||
if(300 to 400) overlays += "300"
|
||||
if(200 to 300) overlays += "200"
|
||||
if(100 to 200) overlays += "100"
|
||||
if(-INFINITY to 100) overlays += "0"
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_user()
|
||||
if (istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = loc
|
||||
M.update_inv_back()
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/update_icon()
|
||||
overlays = 0
|
||||
update_temperature()
|
||||
update_user()
|
||||
update_charge()
|
||||
@@ -4,10 +4,12 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = CONDUCT
|
||||
w_class = 5
|
||||
var/projectile_type = "/obj/item/projectile/magic"
|
||||
var/projectile_type = /obj/item/projectile/magic
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
|
||||
@@ -14,7 +14,6 @@ obj/item/weapon/gun/magic/staff/animate
|
||||
projectile_type = "/obj/item/projectile/magic/animate"
|
||||
icon_state = "staffofanimation"
|
||||
item_state = "staffofanimation"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
obj/item/weapon/gun/magic/staff/healing
|
||||
name = "staff of healing"
|
||||
@@ -22,7 +21,6 @@ obj/item/weapon/gun/magic/staff/healing
|
||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
||||
icon_state = "staffofhealing"
|
||||
item_state = "staffofhealing"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
obj/item/weapon/gun/magic/staff/chaos
|
||||
name = "staff of chaos"
|
||||
@@ -30,7 +28,6 @@ obj/item/weapon/gun/magic/staff/chaos
|
||||
projectile_type = "/obj/item/projectile/magic"
|
||||
icon_state = "staffofchaos"
|
||||
item_state = "staffofchaos"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
max_charges = 10
|
||||
recharge_rate = 2
|
||||
|
||||
@@ -49,7 +46,6 @@ obj/item/weapon/gun/magic/staff/door
|
||||
projectile_type = "/obj/item/projectile/magic/door"
|
||||
icon_state = "staffofdoor"
|
||||
item_state = "staffofdoor"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
max_charges = 10
|
||||
recharge_rate = 2
|
||||
|
||||
|
||||
@@ -1,25 +1,73 @@
|
||||
/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
|
||||
name = "prototype SMG"
|
||||
desc = "A lightweight, prototype 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
|
||||
icon_state = "saber"
|
||||
/obj/item/weapon/gun/projectile/automatic
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=4;materials=2"
|
||||
automatic = 1
|
||||
mag_type = "/obj/item/ammo_box/magazine/smgm9mm"
|
||||
var/alarmed = 0
|
||||
var/select = 1
|
||||
can_suppress = 1
|
||||
fire_delay = 0
|
||||
isHandgun()
|
||||
return 0
|
||||
burst_size = 3
|
||||
fire_delay = 2
|
||||
action_button_name = "Toggle Firemode"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/isHandgun()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/proto
|
||||
name = "\improper Nanotrasen Saber SMG"
|
||||
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
|
||||
icon_state = "saber"
|
||||
mag_type = "/obj/item/ammo_box/magazine/smgm9mm"
|
||||
origin_tech = "combat=4;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(!select)
|
||||
overlays += "[initial(icon_state)]semi"
|
||||
if(select == 1)
|
||||
overlays += "[initial(icon_state)]burst"
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
if(..() && chambered)
|
||||
alarmed = 0
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
if(istype(AM, text2path(mag_type)))
|
||||
if(magazine)
|
||||
user << "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>"
|
||||
magazine.forceMove(get_turf(src.loc))
|
||||
magazine.update_icon()
|
||||
magazine = null
|
||||
else
|
||||
user << "<span class='notice'>You insert the magazine into \the [src].</span>"
|
||||
user.remove_from_mob(AM)
|
||||
magazine = AM
|
||||
magazine.forceMove(src)
|
||||
chamber_round()
|
||||
A.update_icon()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/ui_action_click()
|
||||
burst_select()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/verb/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
user << "<span class='notice'>You switch to semi-automatic.</span>"
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
user << "<span class='notice'>You switch to [burst_size] round burst.</span>"
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/proc/empty_alarm()
|
||||
if(!chambered && !get_ammo() && !alarmed)
|
||||
@@ -29,13 +77,15 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r
|
||||
name = "syndicate SMG"
|
||||
desc = "A lightweight, bullpup .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
|
||||
name = "\improper C-20r SMG"
|
||||
desc = "A two-round burst .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
|
||||
icon_state = "c20r"
|
||||
item_state = "c20r"
|
||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||
mag_type = "/obj/item/ammo_box/magazine/smgm45"
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_delay = 2
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/New()
|
||||
..()
|
||||
@@ -52,9 +102,16 @@
|
||||
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mini_uzi
|
||||
name = "\improper 'Type U3' Uzi"
|
||||
desc = "A lightweight, burst-fire submachine gun, for when you really want someone dead. Uses 9mm rounds."
|
||||
icon_state = "mini-uzi"
|
||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||
mag_type = "/obj/item/ammo_box/magazine/uzim9mm"
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw
|
||||
name = "syndicate LMG"
|
||||
name = "\improper L6 SAW LMG"
|
||||
desc = "A heavily modified 7.62 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation."
|
||||
icon_state = "l6closed100"
|
||||
item_state = "l6closedmag"
|
||||
@@ -66,19 +123,17 @@
|
||||
|
||||
var/cover_open = 0
|
||||
can_suppress = 0
|
||||
|
||||
|
||||
|
||||
burst_size = 5
|
||||
fire_delay = 3
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob)
|
||||
cover_open = !cover_open
|
||||
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
|
||||
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? round(magazine.ammo_count() * 2, 25) : "-empty"]"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
|
||||
if(cover_open)
|
||||
user << "<span class='notice'>[src]'s cover is open! Close it before firing!</span>"
|
||||
@@ -86,7 +141,6 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_hand(mob/user as mob)
|
||||
if(loc != user)
|
||||
..()
|
||||
@@ -109,113 +163,77 @@
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/bulldog
|
||||
name = "syndicate shotgun"
|
||||
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=5;materials=4;syndicate=6"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m12g"
|
||||
fire_sound = 'sound/weapons/Gunshot4.ogg'
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/bulldog/New()
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/bulldog/proc/update_magazine()
|
||||
if(magazine)
|
||||
src.overlays = 0
|
||||
overlays += "[magazine.icon_state]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/bulldog/update_icon()
|
||||
src.overlays = 0
|
||||
update_magazine()
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl
|
||||
name = "syndicate assault rifle"
|
||||
desc = "A bullpup and compact 5.45x39 assault rifle with a unique toploading design, designated 'C-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
|
||||
icon_state = "c90gl"
|
||||
item_state = "c90gl"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
/obj/item/weapon/gun/projectile/automatic/m90
|
||||
name = "\improper M-90gl Carbine"
|
||||
desc = "A three-round burst 5.56 toploading carbine, designated 'M-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
|
||||
icon_state = "m90"
|
||||
item_state = "m90"
|
||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m545"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m556"
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
action_button_name = "Toggle Grenade Launcher"
|
||||
can_suppress = 0
|
||||
var/select = 1 //1 for boolets, 0 for explosions.
|
||||
var/obj/item/weapon/gun/projectile/revolver/grenadelauncher/underbarrel
|
||||
burst_size = 3
|
||||
fire_delay = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/New()
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/New()
|
||||
..()
|
||||
underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(select)
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(select == 2)
|
||||
underbarrel.afterattack(target, user, flag, params)
|
||||
else
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/attackby(var/obj/item/A, mob/user, params)
|
||||
if(istype(A, /obj/item/ammo_casing))
|
||||
if(istype(A, text2path(underbarrel.magazine.ammo_type)))
|
||||
underbarrel.attack_self()
|
||||
underbarrel.attackby(A, user, params)
|
||||
else
|
||||
underbarrel.afterattack(target, user, flag, params)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/attackby(var/obj/item/A, mob/user, params)
|
||||
if(select)
|
||||
..()
|
||||
else
|
||||
underbarrel.attackby(A, user, params)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/attack_self(var/mob/living/user)
|
||||
if(select)
|
||||
..()
|
||||
else
|
||||
underbarrel.attack_self(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/update_icon()
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(select)
|
||||
overlays += "c90prim"
|
||||
else
|
||||
overlays += "c90gren"
|
||||
icon_state = "c90gl[magazine ? "-[Ceiling(get_ammo(0)/6)*6]" : ""][chambered ? "" : "-e"]"
|
||||
switch(select)
|
||||
if(0)
|
||||
overlays += "[initial(icon_state)]semi"
|
||||
if(1)
|
||||
overlays += "[initial(icon_state)]burst"
|
||||
if(2)
|
||||
overlays += "[initial(icon_state)]gren"
|
||||
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/proc/underbarrel_swap()
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(select)
|
||||
select = 0
|
||||
user << "<span class='notice'>You switch to grenades.</span>"
|
||||
else
|
||||
select = 1
|
||||
user << "<span class='notice'>You switch to bullets.</span>"
|
||||
|
||||
switch(select)
|
||||
if(0)
|
||||
select = 1
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
user << "<span class='notice'>You switch to [burst_size] round burst.</span>"
|
||||
if(1)
|
||||
select = 2
|
||||
user << "<span class='notice'>You switch to grenades.</span>"
|
||||
if(2)
|
||||
select = 0
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
user << "<span class='notice'>You switch to semi-auto.</span>"
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/ui_action_click()
|
||||
underbarrel_swap()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/tommygun
|
||||
name = "tommy gun"
|
||||
name = "\improper Thompson SMG"
|
||||
desc = "A genuine 'Chicago Typewriter'."
|
||||
icon_state = "tommygun"
|
||||
item_state = "tommygun"
|
||||
@@ -223,4 +241,20 @@
|
||||
origin_tech = "combat=5;materials=1;syndicate=2"
|
||||
mag_type = "/obj/item/ammo_box/magazine/tommygunm45"
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
can_suppress = 0
|
||||
fire_delay = 1
|
||||
burst_size = 4
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/ar
|
||||
name = "ARG"
|
||||
desc = "A robust assault rile used by Nanotrasen fighting forces."
|
||||
icon_state = "arg"
|
||||
item_state = "arg"
|
||||
slot_flags = 0
|
||||
origin_tech = "combat=5;materials=1"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m556"
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
burst_size = 3
|
||||
fire_delay = 1
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol
|
||||
name = "gyrojet pistol"
|
||||
name = "\improper Gyrojet rocket pistol"
|
||||
desc = "A prototype pistol designed to fire self propelled rockets."
|
||||
icon_state = "gyropistol"
|
||||
fire_sound = 'sound/effects/Explosion1.ogg'
|
||||
origin_tech = "combat=3"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m75"
|
||||
isHandgun()
|
||||
return 1
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/New()
|
||||
..()
|
||||
@@ -36,6 +39,7 @@
|
||||
icon_state = "dshotgun-sawn"
|
||||
item_state = "gun"
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher"
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
w_class = 3
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user, params)
|
||||
@@ -48,7 +52,6 @@
|
||||
name = "multi grenade launcher"
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg
|
||||
|
||||
@@ -1,56 +1,50 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol
|
||||
name = "syndicate pistol"
|
||||
name = "\improper FK-69 pistol"
|
||||
desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors."
|
||||
icon_state = "pistol"
|
||||
w_class = 2
|
||||
origin_tech = "combat=2;materials=2;syndicate=2"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m10mm"
|
||||
can_suppress = 1
|
||||
isHandgun()
|
||||
return 1
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
action_button_name = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m2411
|
||||
name = "M2411"
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/m2411
|
||||
name = "\improper M2411 pistol"
|
||||
desc = "John Browning's classic updated for the modern day. Uses .45 rounds."
|
||||
icon_state = "m2411"
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=3;materials=2"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m45"
|
||||
isHandgun()
|
||||
return 1
|
||||
can_suppress = 0
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m2411/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/deagle
|
||||
name = "desert eagle"
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
|
||||
name = "\improper Desert Eagle pistol"
|
||||
desc = "A robust .50 AE handgun."
|
||||
icon_state = "deagle"
|
||||
force = 14.0
|
||||
mag_type = "/obj/item/ammo_box/magazine/m50"
|
||||
isHandgun()
|
||||
return 1
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/deagle/update_icon()
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/deagle/gold
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/gold
|
||||
desc = "A gold plated desert eagle folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
|
||||
icon_state = "deagleg"
|
||||
item_state = "deagleg"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/deagle/camo
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/camo
|
||||
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
|
||||
icon_state = "deaglecamo"
|
||||
item_state = "deagleg"
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/weapon/gun/projectile/revolver
|
||||
name = "\improper .357 revolver"
|
||||
desc = "A suspicious revolver. Uses .357 ammo."
|
||||
name = "revolver"
|
||||
icon_state = "revolver"
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder"
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
user << "[get_ammo(0,0)] of those are live rounds."
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective
|
||||
name = "\improper .38 Mars Special"
|
||||
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
|
||||
name = "revolver"
|
||||
icon_state = "detective"
|
||||
@@ -154,8 +155,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/mateba
|
||||
name = "autorevolver"
|
||||
desc = "A retro high-powered mateba autorevolver typically used by officers of the New Russia military. Uses .357 ammo." //>10mm hole >.357
|
||||
name = "\improper Unica 6 auto-revolver"
|
||||
desc = "A retro high-powered autorevolver typically used by officers of the New Russia military. Uses .357 ammo." //>10mm hole >.357
|
||||
icon_state = "mateba"
|
||||
origin_tech = "combat=2;materials=2"
|
||||
|
||||
@@ -163,7 +164,7 @@
|
||||
// You can spin the chamber to randomize the position of the bullet.
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian
|
||||
name = "Russian Revolver"
|
||||
name = "\improper Russian Revolver"
|
||||
desc = "A Russian-made revolver for drinking games. Uses .357 ammo, and has a mechanism that spins the chamber before each trigger pull."
|
||||
origin_tech = "combat=2;materials=2"
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/rus357"
|
||||
|
||||
@@ -104,11 +104,10 @@
|
||||
///////////////////////
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
name = "bolt action rifle"
|
||||
name = "\improper Mosin Nagant rifle"
|
||||
desc = "This piece of junk looks like something that could have been used 700 years ago."
|
||||
icon_state = "moistnugget"
|
||||
item_state = "moistnugget"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
slot_flags = 0 //no SLOT_BACK sprite, alas
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/boltaction"
|
||||
var/bolt_open = 0
|
||||
@@ -238,3 +237,39 @@
|
||||
return
|
||||
else
|
||||
sawn_state = SAWN_INTACT
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
|
||||
name = "\improper MLG-12 'Bulldog' Shotgun"
|
||||
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=5;materials=4;syndicate=6"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m12g"
|
||||
fire_sound = 'sound/weapons/Gunshot4.ogg'
|
||||
can_suppress = 0
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
action_button_name = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
|
||||
if(magazine)
|
||||
overlays.Cut()
|
||||
overlays += "[magazine.icon_state]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/update_icon()
|
||||
overlays.Cut()
|
||||
update_magazine()
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
var/mob/living/L = target
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, agony, blocked, stamina, jitter)
|
||||
|
||||
proc/OnFired() //if assigned, allows for code when the projectile gets fired
|
||||
return 1
|
||||
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
|
||||
@@ -44,17 +44,59 @@
|
||||
|
||||
/obj/item/projectile/temp
|
||||
name = "freeze beam"
|
||||
icon_state = "ice_2"
|
||||
icon_state = "temp_4"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
flag = "energy"
|
||||
var/temperature = 300
|
||||
var/obj/item/weapon/gun/energy/temperature/T = null
|
||||
|
||||
OnFired()
|
||||
T = shot_from
|
||||
temperature = T.temperature
|
||||
switch(temperature)
|
||||
if(501 to INFINITY)
|
||||
name = "searing beam" //if emagged
|
||||
icon_state = "temp_8"
|
||||
if(400 to 500)
|
||||
name = "burning beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_2
|
||||
icon_state = "temp_7"
|
||||
if(360 to 400)
|
||||
name = "hot beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_1
|
||||
icon_state = "temp_6"
|
||||
if(335 to 360)
|
||||
name = "warm beam" //temp at which players get notified of their high body temp
|
||||
icon_state = "temp_5"
|
||||
if(295 to 335)
|
||||
name = "ambient beam"
|
||||
icon_state = "temp_4"
|
||||
if(260 to 295)
|
||||
name = "cool beam" //temp at which players get notified of their low body temp
|
||||
icon_state = "temp_3"
|
||||
if(200 to 260)
|
||||
name = "cold beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_1
|
||||
icon_state = "temp_2"
|
||||
if(120 to 260)
|
||||
name = "ice beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_2
|
||||
icon_state = "temp_1"
|
||||
if(-INFINITY to 120)
|
||||
name = "freeze beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_3
|
||||
icon_state = "temp_0"
|
||||
else
|
||||
name = "temperature beam"//failsafe
|
||||
icon_state = "temp_4"
|
||||
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/M = target
|
||||
var/mob/living/M = target
|
||||
M.bodytemperature = temperature
|
||||
if(temperature > 500)//emagged
|
||||
M.adjust_fire_stacks(0.5)
|
||||
M.on_fire = 1
|
||||
M.update_icon = 1
|
||||
playsound(M.loc, 'sound/effects/bamf.ogg', 50, 0)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/meteor
|
||||
|
||||
@@ -628,6 +628,7 @@ atom/proc/create_reagents(var/max_vol)
|
||||
reagents.my_atom = src
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
..()
|
||||
processing_objects.Remove(src)
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
qdel(R)
|
||||
@@ -635,4 +636,4 @@ atom/proc/create_reagents(var/max_vol)
|
||||
reagent_list = null
|
||||
if(my_atom && my_atom.reagents == src)
|
||||
my_atom.reagents = null
|
||||
return ..()
|
||||
return QDEL_HINT_QUEUE
|
||||
@@ -69,7 +69,6 @@
|
||||
/obj/item/weapon/gun/grenadelauncher/piecannon
|
||||
name = "pie cannon"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
icon_state = "piecannon1"
|
||||
item_state = "piecannon1"
|
||||
w_class = 4.0
|
||||
|
||||
@@ -214,11 +214,12 @@
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
|
||||
M.bodytemperature -= 140
|
||||
M << "\blue You feel a chill!"
|
||||
spawn(50)
|
||||
if(holder && holder.my_atom)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
|
||||
M.bodytemperature -= 140
|
||||
M << "\blue You feel a chill!"
|
||||
|
||||
//Orange
|
||||
slimecasp
|
||||
@@ -242,10 +243,11 @@
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 50)
|
||||
spawn(50)
|
||||
if(holder && holder.my_atom)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 50)
|
||||
|
||||
//Yellow
|
||||
slimeoverload
|
||||
@@ -387,8 +389,9 @@
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
explosion(get_turf(holder.my_atom), 1 ,3, 6)
|
||||
spawn(50)
|
||||
if(holder && holder.my_atom)
|
||||
explosion(get_turf(holder.my_atom), 1 ,3, 6)
|
||||
//Light Pink
|
||||
slimepotion2
|
||||
name = "Slime Potion 2"
|
||||
|
||||
@@ -78,5 +78,6 @@
|
||||
return
|
||||
|
||||
/datum/reagent/Destroy()
|
||||
..()
|
||||
holder = null
|
||||
return ..()
|
||||
return QDEL_HINT_QUEUE
|
||||
@@ -8,7 +8,6 @@
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
|
||||
@@ -112,19 +112,19 @@
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/smg
|
||||
name = "Prototype Submachine Gun"
|
||||
name = "Nanotrasen Saber SMG"
|
||||
desc = "A prototype weapon made using lightweight materials on a traditional frame, designed to fire standard 9mm rounds."
|
||||
id = "smg"
|
||||
req_tech = list("combat" = 4, "materials" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_SILVER = 2000, MAT_DIAMOND = 1000)
|
||||
build_path = /obj/item/weapon/gun/projectile/automatic
|
||||
build_path = /obj/item/weapon/gun/projectile/automatic/proto
|
||||
locked = 1
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/mag_smg
|
||||
name = "Prototype Submachine Gun Magazine (9mm)"
|
||||
desc = "A 20-round magazine for the prototype submachine gun."
|
||||
name = "Saber Submachine Gun Magazine (9mm)"
|
||||
desc = "A 20-round magazine for the Saber submachine gun."
|
||||
id = "mag_smg"
|
||||
req_tech = list("combat" = 4, "materials" = 3)
|
||||
build_type = PROTOLATHE
|
||||
@@ -165,13 +165,12 @@
|
||||
|
||||
/datum/design/temp_gun
|
||||
name = "Temperature Gun"
|
||||
desc = "A gun that shoots temperature bullet energy things to change temperature."//Change it if you want
|
||||
desc = "A gun that changes the body temperature of its targets."
|
||||
id = "temp_gun"
|
||||
req_tech = list("combat" = 3, "materials" = 4, "powerstorage" = 3, "magnets" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 500, MAT_SILVER = 3000)
|
||||
build_path = /obj/item/weapon/gun/energy/temperature
|
||||
locked = 1
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/suppressor
|
||||
@@ -190,7 +189,7 @@
|
||||
id = "techshotshell"
|
||||
req_tech = list("combat" = 3, "materials" = 3, "powerstorage" = 4, "magnets" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 200, MAT_SILVER = 300)
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 200)
|
||||
build_path = /obj/item/ammo_casing/shotgun/techshell
|
||||
category = list("Weapons")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user