mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 20:46:29 +01:00
Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into newmalf-merge
This commit is contained in:
@@ -1010,6 +1010,46 @@ var/global/floorIsLava = 0
|
||||
var/datum/seed/S = plant_controller.seeds[seedtype]
|
||||
S.harvest(usr,0,0,1)
|
||||
|
||||
/datum/admins/proc/spawn_custom_item()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn a custom item."
|
||||
set name = "Spawn Custom Item"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
|
||||
if(!owner|| !custom_items[owner])
|
||||
return
|
||||
|
||||
var/list/possible_items = custom_items[owner]
|
||||
var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
|
||||
if(!item_to_spawn)
|
||||
return
|
||||
|
||||
item_to_spawn.spawn_item(get_turf(usr))
|
||||
|
||||
/datum/admins/proc/check_custom_items()
|
||||
|
||||
set category = "Debug"
|
||||
set desc = "Check the custom item list."
|
||||
set name = "Check Custom Items"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!custom_items)
|
||||
usr << "Custom item list is null."
|
||||
return
|
||||
|
||||
if(!custom_items.len)
|
||||
usr << "Custom item list not populated."
|
||||
return
|
||||
|
||||
for(var/assoc_key in custom_items)
|
||||
usr << "[assoc_key] has:"
|
||||
var/list/current_items = custom_items[assoc_key]
|
||||
for(var/datum/custom_item/item in current_items)
|
||||
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
|
||||
|
||||
/datum/admins/proc/spawn_plant()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn a spreading plant effect."
|
||||
|
||||
@@ -115,6 +115,8 @@ var/list/admin_verbs_fun = list(
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_custom_item,
|
||||
/datum/admins/proc/check_custom_items,
|
||||
/datum/admins/proc/spawn_plant,
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character,
|
||||
|
||||
@@ -597,7 +597,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/clothing/head/helmet/thunderdome(M), slot_head)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/destroyer(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/smokebomb(M), slot_r_store)
|
||||
|
||||
|
||||
@@ -620,10 +620,10 @@ 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/clothing/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(M), slot_head)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/rollingpin(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/kitchen/rollingpin(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_s_store)
|
||||
|
||||
if ("tournament janitor")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(M), slot_w_uniform)
|
||||
@@ -687,7 +687,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
|
||||
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
|
||||
|
||||
if("masked killer")
|
||||
@@ -699,10 +699,10 @@ 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/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
|
||||
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
|
||||
|
||||
for(var/obj/item/carried_item in M.contents)
|
||||
|
||||
@@ -4,7 +4,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
/client/proc/strike_team()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Strike Team"
|
||||
set desc = "Spawns a death squad if you want to run an admin event."
|
||||
set desc = "Spawns a strike team if you want to run an admin event."
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
@@ -20,12 +20,12 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
|
||||
var/datum/antagonist/deathsquad/team
|
||||
|
||||
var/choice = input(usr, "Select type of strike team:") as null|anything in list("Death Squad", "Mercenaries")
|
||||
var/choice = input(usr, "Select type of strike team:") as null|anything in list("Heavy Asset Protection", "Mercenaries")
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
if("Death Squad")
|
||||
if("Heavy Asset Protection")
|
||||
team = deathsquad
|
||||
if("Mercenaries")
|
||||
team = commandos
|
||||
|
||||
@@ -279,7 +279,7 @@ var/global/list/gear_datums = list()
|
||||
|
||||
/datum/gear/scanning_goggles
|
||||
display_name = "scanning goggles"
|
||||
path = /obj/item/clothing/glasses/fluff/uzenwa_sissra_1
|
||||
path = /obj/item/clothing/glasses/science/scanners
|
||||
cost = 1
|
||||
slot = slot_glasses
|
||||
|
||||
@@ -893,7 +893,7 @@ var/global/list/gear_datums = list()
|
||||
|
||||
/datum/gear/toeless_jackboots
|
||||
display_name = "toe-less jackboots"
|
||||
path = /obj/item/clothing/shoes/jackboots/fluff/kecer_eldraran
|
||||
path = /obj/item/clothing/shoes/jackboots/unathi
|
||||
cost = 1
|
||||
slot = slot_shoes
|
||||
|
||||
@@ -1035,7 +1035,7 @@ var/global/list/gear_datums = list()
|
||||
|
||||
/datum/gear/ashtray
|
||||
display_name = "ashtray, plastic"
|
||||
path = /obj/item/ashtray/plastic
|
||||
path = /obj/item/weapon/material/ashtray/plastic
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@
|
||||
..()
|
||||
overlay = global_hud.science
|
||||
|
||||
/obj/item/clothing/glasses/science/scanners
|
||||
name = "Scanning Goggles"
|
||||
desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it."
|
||||
icon_state = "uzenwa_sissra_1"
|
||||
|
||||
/obj/item/clothing/glasses/night
|
||||
name = "Night Vision Goggles"
|
||||
desc = "You can totally see in the dark now!"
|
||||
|
||||
@@ -89,6 +89,13 @@
|
||||
force = 3
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/shoes/jackboots/unathi
|
||||
name = "toe-less jackboots"
|
||||
desc = "Modified pair of jackboots, particularly friendly to those species whose toes hold claws."
|
||||
item_state = "digiboots"
|
||||
icon_state = "digiboots"
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/cult
|
||||
name = "boots"
|
||||
desc = "A pair of boots worn by the followers of Nar-Sie."
|
||||
|
||||
@@ -178,7 +178,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
//Handles repairs (and also upgrades).
|
||||
|
||||
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal))
|
||||
if(istype(W,/obj/item/stack/material/plastic) || istype(W,/obj/item/stack/material/steel))
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
user << "\red How do you intend to patch a hardsuit while someone is wearing it?"
|
||||
@@ -188,13 +188,13 @@ var/global/list/breach_burn_descriptors = list(
|
||||
user << "There is no surface damage on \the [src] to repair."
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/P = W
|
||||
var/obj/item/stack/material/P = W
|
||||
if(P.get_amount() < 3)
|
||||
P.use(P.get_amount())
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.get_amount() : (P.get_amount()*2) ), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/material/plastic) ? P.get_amount() : (P.get_amount()*2) ), user)
|
||||
else
|
||||
P.use(3)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? 3 : 5), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/material/plastic) ? 3 : 5), user)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
interface_name = "death blossom launcher"
|
||||
interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity."
|
||||
|
||||
var/fabrication_type = /obj/item/weapon/star/ninja
|
||||
var/fabrication_type = /obj/item/weapon/material/star/ninja
|
||||
var/fire_force = 30
|
||||
var/fire_distance = 10
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
disruptable = 1
|
||||
disruptive = 0
|
||||
|
||||
use_power_cost = 5
|
||||
active_power_cost = 1
|
||||
use_power_cost = 50
|
||||
active_power_cost = 10
|
||||
passive_power_cost = 0
|
||||
module_cooldown = 30
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!istype(H.loc, /turf))
|
||||
H << "<span class='warning'>You cannot teleport out of your current location.</span>"
|
||||
return 0
|
||||
|
||||
var/turf/T
|
||||
if(target)
|
||||
T = get_turf(target)
|
||||
@@ -187,4 +191,4 @@
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer.drop_from_inventory(src)
|
||||
qdel(holder)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
piece.unacidable = unacidable
|
||||
if(islist(armor)) piece.armor = armor.Copy()
|
||||
@@ -706,7 +707,7 @@
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src))
|
||||
if (electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
|
||||
spark_system.start()
|
||||
if(user.stunned)
|
||||
return 1
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
if(!istype(user,/mob/living)) return 0
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
|
||||
return
|
||||
|
||||
// Pass repair items on to the chestpiece.
|
||||
if(chest && (istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal) || istype(W, /obj/item/weapon/weldingtool)))
|
||||
if(chest && (istype(W,/obj/item/stack/material/plastic) || istype(W,/obj/item/stack/material/steel) || istype(W, /obj/item/weapon/weldingtool)))
|
||||
return chest.attackby(W,user)
|
||||
|
||||
// Lock or unlock the access panel.
|
||||
@@ -193,8 +191,6 @@
|
||||
/obj/item/weapon/rig/attack_hand(var/mob/user)
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
|
||||
return
|
||||
..()
|
||||
@@ -60,6 +60,7 @@
|
||||
slowdown = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/rig/light/ninja
|
||||
glove_type = /obj/item/clothing/gloves/rig/light/ninja
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
@@ -80,6 +81,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/rig/light/ninja
|
||||
name = "insulated gloves"
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light/ninja
|
||||
breach_threshold = 38 //comparable to regular hardsuits
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
item_state = "apron"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = 0
|
||||
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/fertilizer,/obj/item/weapon/minihoe)
|
||||
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/fertilizer,/obj/item/weapon/material/minihoe)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
//Captain
|
||||
/obj/item/clothing/suit/captunic
|
||||
@@ -51,14 +51,14 @@
|
||||
|
||||
//Chef
|
||||
/obj/item/clothing/suit/chef
|
||||
name = "Chef's apron"
|
||||
name = "chef's apron"
|
||||
desc = "An apron used by a high class chef."
|
||||
icon_state = "chef"
|
||||
item_state = "chef"
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
|
||||
allowed = list (/obj/item/weapon/material/knife)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Chef
|
||||
@@ -185,6 +185,14 @@
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen)
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/fr_jacket/ems
|
||||
name = "\improper EMS jacket"
|
||||
desc = "A dark blue, martian-pattern, EMS jacket. It sports high-visibility reflective stripes and a star of life on the back."
|
||||
icon_state = "ems_jacket_closed"
|
||||
item_state = "ems_jacket_closed"
|
||||
icon_open = "ems_jacket_open"
|
||||
icon_closed = "ems_jacket_closed"
|
||||
|
||||
//Mime
|
||||
/obj/item/clothing/suit/suspenders
|
||||
name = "suspenders"
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
siemens_coefficient = 1
|
||||
|
||||
/obj/item/clothing/under/stripper/mankini
|
||||
name = "the mankini"
|
||||
name = "mankini"
|
||||
desc = "No honest man would wear this abomination"
|
||||
icon_state = "mankini"
|
||||
siemens_coefficient = 1
|
||||
|
||||
@@ -9,11 +9,30 @@
|
||||
var/slot = "decor"
|
||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||
var/image/inv_overlay_mob = null
|
||||
var/overlay_state = null
|
||||
|
||||
/obj/item/clothing/accessory/New()
|
||||
..()
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[overlay_state? "[overlay_state]" : "[icon_state]"]")
|
||||
/obj/item/clothing/accessory/proc/get_inv_overlay()
|
||||
if(!inv_overlay)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_tie" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_tie"
|
||||
inv_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay
|
||||
|
||||
/obj/item/clothing/accessory/proc/get_inv_mob_overlay()
|
||||
if(!inv_overlay_mob)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_mob" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
inv_overlay_mob = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay_mob = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay_mob
|
||||
|
||||
//when user attached an accessory to S
|
||||
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
@@ -21,7 +40,7 @@
|
||||
return
|
||||
has_suit = S
|
||||
loc = has_suit
|
||||
has_suit.overlays += inv_overlay
|
||||
has_suit.overlays += get_inv_overlay()
|
||||
|
||||
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
|
||||
src.add_fingerprint(user)
|
||||
@@ -29,7 +48,7 @@
|
||||
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
|
||||
if(!has_suit)
|
||||
return
|
||||
has_suit.overlays -= inv_overlay
|
||||
has_suit.overlays -= get_inv_overlay()
|
||||
has_suit = null
|
||||
usr.put_in_hands(src)
|
||||
src.add_fingerprint(user)
|
||||
@@ -72,24 +91,42 @@
|
||||
if(MALE) their = "his"
|
||||
if(FEMALE) their = "her"
|
||||
|
||||
var/sound = "pulse"
|
||||
var/sound_strength
|
||||
|
||||
var/sound = "heartbeat"
|
||||
var/sound_strength = "cannot hear"
|
||||
var/heartbeat = 0
|
||||
if(M.species && M.species.has_organ["heart"])
|
||||
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
|
||||
if(heart && !heart.robotic)
|
||||
heartbeat = 1
|
||||
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
|
||||
sound_strength = "cannot hear"
|
||||
sound = "anything"
|
||||
else
|
||||
sound_strength = "hear a weak"
|
||||
switch(body_part)
|
||||
if("chest")
|
||||
if(M.oxyloss < 50)
|
||||
sound_strength = "hear a healthy"
|
||||
sound = "pulse and respiration"
|
||||
sound_strength = "hear"
|
||||
sound = "no heartbeat"
|
||||
if(heartbeat)
|
||||
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
|
||||
if(heart.is_bruised() || M.getOxyLoss() > 50)
|
||||
sound = "[pick("odd noises in","weak")] heartbeat"
|
||||
else
|
||||
sound = "healthy heartbeat"
|
||||
|
||||
var/obj/item/organ/heart/L = M.internal_organs_by_name["lungs"]
|
||||
if(!L || M.losebreath)
|
||||
sound += " and no respiration"
|
||||
else if(M.is_lung_ruptured() || M.getOxyLoss() > 50)
|
||||
sound += " and [pick("wheezing","gurgling")] sounds"
|
||||
else
|
||||
sound += " and healthy respiration"
|
||||
if("eyes","mouth")
|
||||
sound_strength = "cannot hear"
|
||||
sound = "anything"
|
||||
else
|
||||
sound_strength = "hear a weak"
|
||||
if(heartbeat)
|
||||
sound_strength = "hear a weak"
|
||||
sound = "pulse"
|
||||
|
||||
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
|
||||
return
|
||||
@@ -140,78 +177,3 @@
|
||||
/obj/item/clothing/accessory/medal/gold/heroism
|
||||
name = "medal of exceptional heroism"
|
||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||
|
||||
/*
|
||||
Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
||||
Security agent - the user details can be imprinted on the badge with a Security-access ID card,
|
||||
or they can be emagged to accept any ID for use in disguises.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/accessory/holobadge
|
||||
name = "holobadge"
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
icon_state = "holobadge"
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
var/stored_name = null
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/cord
|
||||
icon_state = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
user << "Waving around a badge before swiping an ID would be pretty pointless."
|
||||
return
|
||||
if(isliving(user))
|
||||
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "\red [src] is already cracked."
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "\red You swipe [O] and crack the holobadge security checks."
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
id_card = O
|
||||
else
|
||||
var/obj/item/device/pda/pda = O
|
||||
id_card = pda.id
|
||||
|
||||
if(access_security in id_card.access || emagged)
|
||||
user << "You imprint your ID details onto the badge."
|
||||
stored_name = id_card.registered_name
|
||||
name = "holobadge ([stored_name])"
|
||||
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
||||
else
|
||||
user << "[src] rejects your insufficient access rights."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(isliving(user))
|
||||
user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
|
||||
|
||||
/obj/item/weapon/storage/box/holobadge
|
||||
name = "holobadge box"
|
||||
desc = "A box claiming to contain holobadges."
|
||||
New()
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge(src)
|
||||
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Badges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
||||
Security agent - the user details can be imprinted on holobadges with a Security-access ID card,
|
||||
or they can be emagged to accept any ID for use in disguises.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/accessory/badge
|
||||
name = "detective's badge"
|
||||
desc = "NanoTrasen Security Department detective's badge, made from gold."
|
||||
icon_state = "badge"
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/stored_name
|
||||
var/badge_string = "NanoTrasen Security Department"
|
||||
|
||||
/obj/item/clothing/accessory/badge/old
|
||||
name = "faded badge"
|
||||
desc = "A faded badge, backed with leather. It bears the emblem of the Forensic division."
|
||||
icon_state = "badge_round"
|
||||
|
||||
/obj/item/clothing/accessory/badge/proc/set_name(var/new_name)
|
||||
stored_name = new_name
|
||||
name = "[initial(name)] ([stored_name])"
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack_self(mob/user as mob)
|
||||
|
||||
if(!stored_name)
|
||||
user << "You polish your old badge fondly, shining up the surface."
|
||||
set_name(user.real_name)
|
||||
return
|
||||
|
||||
if(isliving(user))
|
||||
if(stored_name)
|
||||
user.visible_message("<span class='notice'>[user] displays their [src.name].\nIt reads: [stored_name], [badge_string].</span>","<span class='notice'>You display your [src.name].\nIt reads: [stored_name], [badge_string].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] displays their [src.name].\nIt reads: [badge_string].</span>","<span class='notice'>You display your [src.name]. It reads: [badge_string].</span>")
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(isliving(user))
|
||||
user.visible_message("<span class='danger'>[user] invades [M]'s personal space, thrusting [src] into their face insistently.</span>","<span class='danger'>You invade [M]'s personal space, thrusting [src] into their face insistently.</span>")
|
||||
|
||||
//.Holobadges.
|
||||
/obj/item/clothing/accessory/badge/holo
|
||||
name = "holobadge"
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/cord
|
||||
icon_state = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
user << "Waving around a holobadge before swiping an ID would be pretty pointless."
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "<span class='danger'>[src] is already cracked.</span>"
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "<span class='danger'>You swipe [O] and crack the holobadge security checks.</span>"
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
id_card = O
|
||||
else
|
||||
var/obj/item/device/pda/pda = O
|
||||
id_card = pda.id
|
||||
|
||||
if(access_security in id_card.access || emagged)
|
||||
user << "You imprint your ID details onto the badge."
|
||||
set_name(user.real_name)
|
||||
else
|
||||
user << "[src] rejects your insufficient access rights."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/box/holobadge
|
||||
name = "holobadge box"
|
||||
desc = "A box claiming to contain holobadges."
|
||||
New()
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo(src)
|
||||
new /obj/item/clothing/accessory/badge/holo/cord(src)
|
||||
new /obj/item/clothing/accessory/badge/holo/cord(src)
|
||||
..()
|
||||
return
|
||||
@@ -0,0 +1,46 @@
|
||||
/obj/item/clothing/accessory/locket
|
||||
name = "silver locket"
|
||||
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
|
||||
icon_state = "locket"
|
||||
item_state = "locket"
|
||||
slot_flags = 0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
var/base_icon
|
||||
var/open
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
/obj/item/clothing/accessory/locket/heart
|
||||
name = "heart-shaped locket"
|
||||
desc = " A silver, heart-shaped locket. It flips open to reveal two pictures, one of a young red-headed woman and one of a brunette of similar age. Small writing is etched onto the back, reading 'M+L'. Some may regard it as cheesy."
|
||||
icon_state = "heartlocket"
|
||||
|
||||
/obj/item/clothing/accessory/locket/attack_self(mob/user as mob)
|
||||
if(!base_icon)
|
||||
base_icon = icon_state
|
||||
open = !open
|
||||
user << "You flip \the [src] [open?"open":"closed"]."
|
||||
if(open)
|
||||
icon_state = "[base_icon]_open"
|
||||
if(held)
|
||||
user << "\The [held] falls out!"
|
||||
held.loc = get_turf(user)
|
||||
src.held = null
|
||||
else
|
||||
icon_state = "[base_icon]"
|
||||
|
||||
/obj/item/clothing/accessory/locket/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
if(!open)
|
||||
user << "You have to open it first."
|
||||
return
|
||||
|
||||
if(istype(O,/obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
|
||||
if(held)
|
||||
usr << "[src] already has something inside it."
|
||||
else
|
||||
usr << "You slip [O] into [src]."
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
src.held = O
|
||||
return
|
||||
..()
|
||||
@@ -72,11 +72,11 @@
|
||||
/obj/item/clothing/accessory/storage/knifeharness/New()
|
||||
..()
|
||||
hold.max_storage_space = 4
|
||||
hold.can_hold = list(/obj/item/weapon/hatchet/unathiknife,\
|
||||
/obj/item/weapon/kitchen/utensil/knife,\
|
||||
/obj/item/weapon/kitchen/utensil/pknife,\
|
||||
/obj/item/weapon/kitchenknife,\
|
||||
/obj/item/weapon/kitchenknife/ritual)
|
||||
hold.can_hold = list(/obj/item/weapon/material/hatchet/unathiknife,\
|
||||
/obj/item/weapon/material/kitchen/utensil/knife,\
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/plastic,\
|
||||
/obj/item/weapon/material/knife,\
|
||||
/obj/item/weapon/material/knife/ritual)
|
||||
|
||||
new /obj/item/weapon/hatchet/unathiknife(hold)
|
||||
new /obj/item/weapon/hatchet/unathiknife(hold)
|
||||
new /obj/item/weapon/material/hatchet/unathiknife(hold)
|
||||
new /obj/item/weapon/material/hatchet/unathiknife(hold)
|
||||
|
||||
@@ -113,6 +113,13 @@
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/medical/paramedic
|
||||
name = "short sleeve medical jumpsuit"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one has a cross on the chest denoting that the wearer is trained medical personnel."
|
||||
icon_state = "medical_short"
|
||||
item_state = "medical_short"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
|
||||
|
||||
/obj/item/clothing/under/rank/medical/blue
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,95 +1,189 @@
|
||||
//switch this out to use a database at some point
|
||||
//list of ckey/ real_name and item paths
|
||||
//gives item to specific people when they join if it can
|
||||
//for multiple items just add mutliple entries, unless i change it to be a listlistlist
|
||||
//yes, it has to be an item, you can't pick up nonitems
|
||||
// Switch this out to use a database at some point. Each ckey is
|
||||
// associated with a list of custom item datums. When the character
|
||||
// spawns, the list is checked and all appropriate datums are spawned.
|
||||
// See config/example/custom_items.txt for a more detailed overview
|
||||
// of how the config system works.
|
||||
|
||||
// CUSTOM ITEM ICONS:
|
||||
// Inventory icons must be in CUSTOM_ITEM_OBJ with state name [item_icon].
|
||||
// On-mob icons must be in CUSTOM_ITEM_MOB with state name [item_icon].
|
||||
// Inhands must be in CUSTOM_ITEM_MOB as [icon_state]_l and [icon_state]_r.
|
||||
|
||||
// Kits must have mech icons in CUSTOM_ITEM_OBJ under [kit_icon].
|
||||
// Broken must be [kit_icon]-broken and open must be [kit_icon]-open.
|
||||
|
||||
// Kits must also have hardsuit icons in CUSTOM_ITEM_MOB as [kit_icon]_suit
|
||||
// and [kit_icon]_helmet, and in CUSTOM_ITEM_OBJ as [kit_icon].
|
||||
|
||||
/var/list/custom_items = list()
|
||||
|
||||
/hook/startup/proc/loadCustomItems()
|
||||
var/custom_items_file = file2text("config/custom_items.txt")
|
||||
custom_items = text2list(custom_items_file, "\n")
|
||||
/datum/custom_item
|
||||
var/assoc_key
|
||||
var/character_name
|
||||
var/item_icon
|
||||
var/item_desc
|
||||
var/name
|
||||
var/item_path = /obj/item
|
||||
var/req_access = 0
|
||||
var/list/req_titles = list()
|
||||
var/kit_name
|
||||
var/kit_desc
|
||||
var/kit_icon
|
||||
var/additional_data
|
||||
|
||||
/datum/custom_item/proc/spawn_item(var/newloc)
|
||||
var/obj/item/citem = new item_path(newloc)
|
||||
apply_to_item(citem)
|
||||
return citem
|
||||
|
||||
/datum/custom_item/proc/apply_to_item(var/obj/item/item)
|
||||
if(!item)
|
||||
return
|
||||
if(name)
|
||||
item.name = name
|
||||
if(item_desc)
|
||||
item.desc = item_desc
|
||||
if(item_icon)
|
||||
item.icon = CUSTOM_ITEM_OBJ
|
||||
item.icon_state = item_icon
|
||||
if(istype(item, /obj/item))
|
||||
item.icon_override = CUSTOM_ITEM_MOB
|
||||
|
||||
// Kits are dumb so this is going to have to be hardcoded/snowflake.
|
||||
if(istype(item, /obj/item/device/kit))
|
||||
var/obj/item/device/kit/K = item
|
||||
K.new_name = kit_name
|
||||
K.new_desc = kit_desc
|
||||
K.new_icon = kit_icon
|
||||
K.new_icon_file = CUSTOM_ITEM_OBJ
|
||||
if(istype(item, /obj/item/device/kit/paint))
|
||||
var/obj/item/device/kit/paint/kit = item
|
||||
kit.allowed_types = text2list(additional_data, ", ")
|
||||
else if(istype(item, /obj/item/device/kit/suit))
|
||||
var/obj/item/device/kit/suit/kit = item
|
||||
kit.new_light_overlay = additional_data
|
||||
kit.new_mob_icon_file = CUSTOM_ITEM_MOB
|
||||
|
||||
return item
|
||||
|
||||
|
||||
// Parses the config file into the custom_items list.
|
||||
/hook/startup/proc/load_custom_items()
|
||||
|
||||
var/datum/custom_item/current_data
|
||||
for(var/line in text2list(file2text("config/custom_items.txt"), "\n"))
|
||||
|
||||
line = trim(line)
|
||||
if(line == "" || !line || findtext(line, "#", 1, 2))
|
||||
continue
|
||||
|
||||
if(findtext(line, "{", 1, 2) || findtext(line, "}", 1, 2)) // New block!
|
||||
if(current_data && current_data.assoc_key)
|
||||
if(!custom_items[current_data.assoc_key])
|
||||
custom_items[current_data.assoc_key] = list()
|
||||
var/list/L = custom_items[current_data.assoc_key]
|
||||
L |= current_data
|
||||
current_data = null
|
||||
|
||||
var/split = findtext(line,":")
|
||||
if(!split)
|
||||
continue
|
||||
var/field = trim(copytext(line,1,split))
|
||||
var/field_data = trim(copytext(line,(split+1)))
|
||||
if(!field || !field_data)
|
||||
continue
|
||||
|
||||
if(!current_data)
|
||||
current_data = new()
|
||||
|
||||
switch(field)
|
||||
if("ckey")
|
||||
current_data.assoc_key = lowertext(field_data)
|
||||
if("character_name")
|
||||
current_data.character_name = lowertext(field_data)
|
||||
if("item_path")
|
||||
current_data.item_path = text2path(field_data)
|
||||
if("item_name")
|
||||
current_data.name = field_data
|
||||
if("item_icon")
|
||||
current_data.item_icon = field_data
|
||||
if("item_desc")
|
||||
current_data.item_desc = field_data
|
||||
if("req_access")
|
||||
current_data.req_access = text2num(field_data)
|
||||
if("req_titles")
|
||||
current_data.req_titles = text2list(field_data,", ")
|
||||
if("kit_name")
|
||||
current_data.kit_name = field_data
|
||||
if("kit_desc")
|
||||
current_data.kit_desc = field_data
|
||||
if("kit_icon")
|
||||
current_data.kit_icon = field_data
|
||||
if("additional_data")
|
||||
current_data.additional_data = field_data
|
||||
return 1
|
||||
|
||||
/proc/EquipCustomItems(mob/living/carbon/human/M)
|
||||
for(var/line in custom_items)
|
||||
// split & clean up
|
||||
var/list/Entry = text2list(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
//gets the relevant list for the key from the listlist if it exists, check to make sure they are meant to have it and then calls the giving function
|
||||
/proc/equip_custom_items(mob/living/carbon/human/M)
|
||||
var/list/key_list = custom_items[M.ckey]
|
||||
if(!key_list || key_list.len < 1)
|
||||
return
|
||||
|
||||
if(Entry.len < 3)
|
||||
continue;
|
||||
for(var/datum/custom_item/citem in key_list)
|
||||
|
||||
if(Entry[1] == M.ckey && Entry[2] == M.real_name)
|
||||
var/list/Paths = text2list(Entry[3], ",")
|
||||
for(var/P in Paths)
|
||||
var/ok = 0 // 1 if the item was placed successfully
|
||||
P = trim(P)
|
||||
var/path = text2path(P)
|
||||
if(!path) continue
|
||||
// Check for requisite ckey and character name.
|
||||
if((lowertext(citem.assoc_key) != lowertext(M.ckey)) || (lowertext(citem.character_name) != lowertext(M.real_name)))
|
||||
continue
|
||||
|
||||
var/obj/item/Item = new path()
|
||||
if(istype(Item,/obj/item/weapon/card/id))
|
||||
//id card needs to replace the original ID
|
||||
if(M.ckey == "nerezza" && M.real_name == "Asher Spock" && M.mind.role_alt_title && M.mind.role_alt_title != "Emergency Physician")
|
||||
//only spawn ID if asher is joining as an emergency physician
|
||||
ok = 1
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/card/id/I = Item
|
||||
for(var/obj/item/weapon/card/id/C in M)
|
||||
//default settings
|
||||
I.name = "[M.real_name]'s ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
I.registered_name = M.real_name
|
||||
I.access = C.access
|
||||
I.assignment = C.assignment
|
||||
I.blood_type = C.blood_type
|
||||
I.dna_hash = C.dna_hash
|
||||
I.fingerprint_hash = C.fingerprint_hash
|
||||
//I.pin = C.pin
|
||||
// Check for required access.
|
||||
var/obj/item/weapon/card/id/current_id = M.wear_id
|
||||
if(citem.req_access && citem.req_access > 0)
|
||||
if(!(istype(current_id) && (citem.req_access in current_id.access)))
|
||||
continue
|
||||
|
||||
//custom stuff
|
||||
if(M.ckey == "fastler" && M.real_name == "Fastler Greay") //This is a Lifetime ID
|
||||
I.name = "[M.real_name]'s Lifetime ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
else if(M.ckey == "nerezza" && M.real_name == "Asher Spock") //This is an Odysseus Specialist ID
|
||||
I.name = "[M.real_name]'s Odysseus Specialist ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
I.access += list(access_robotics) //Station-based mecha pilots need this to access the recharge bay.
|
||||
else if(M.ckey == "roaper" && M.real_name == "Ian Colm") //This is a Technician ID
|
||||
I.name = "[M.real_name]'s Technician ID ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
// Check for required job title.
|
||||
if(citem.req_titles && citem.req_titles.len > 0)
|
||||
var/has_title
|
||||
var/current_title = M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role
|
||||
for(var/title in citem.req_titles)
|
||||
if(title == current_title)
|
||||
has_title = 1
|
||||
break
|
||||
if(!has_title)
|
||||
continue
|
||||
|
||||
//replace old ID
|
||||
qdel(C)
|
||||
ok = M.equip_to_slot_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
|
||||
break
|
||||
else if(istype(Item,/obj/item/weapon/storage/belt))
|
||||
if(M.ckey == "jakksergal" && M.real_name == "Nashi Ra'hal" && M.mind.role_alt_title && M.mind.role_alt_title != "Nurse" && M.mind.role_alt_title != "Chemist")
|
||||
ok = 1
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/storage/belt/medical/fluff/nashi_belt/I = Item
|
||||
if(istype(M.belt,/obj/item/weapon/storage/belt))
|
||||
for(var/obj/item/weapon/storage/belt/B in M)
|
||||
qdel(B)
|
||||
M.belt=null
|
||||
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
|
||||
break
|
||||
if(istype(M.belt,/obj/item/device/pda))
|
||||
for(var/obj/item/device/pda/Pda in M)
|
||||
M.belt=null
|
||||
M.equip_to_slot_if_possible(Pda, slot_l_store, 0)
|
||||
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
|
||||
else if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back
|
||||
Item.loc = M.back
|
||||
ok = 1
|
||||
// ID cards and PDAs are applied directly to the existing object rather than spawned fresh.
|
||||
var/obj/item/existing_item
|
||||
if(citem.item_path == /obj/item/weapon/card/id && istype(current_id)) //Set earlier.
|
||||
existing_item = M.wear_id
|
||||
else if(citem.item_path == /obj/item/device/pda)
|
||||
existing_item = locate(/obj/item/device/pda) in M.contents
|
||||
|
||||
else
|
||||
for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob.
|
||||
if (S.contents.len < S.storage_slots)
|
||||
Item.loc = S
|
||||
ok = 1
|
||||
break
|
||||
// Spawn and equip the item.
|
||||
if(existing_item)
|
||||
citem.apply_to_item(existing_item)
|
||||
else
|
||||
place_custom_item(M,citem)
|
||||
|
||||
skip:
|
||||
if (ok == 0) // Finally, since everything else failed, place it on the ground
|
||||
Item.loc = get_turf(M.loc)
|
||||
// Places the item on the target mob.
|
||||
/proc/place_custom_item(mob/living/carbon/human/M, var/datum/custom_item/citem)
|
||||
|
||||
if(!citem) return
|
||||
var/obj/item/newitem = citem.spawn_item()
|
||||
|
||||
if(M.equip_to_appropriate_slot(newitem))
|
||||
return newitem
|
||||
|
||||
if(istype(M.back,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/backpack = M.back
|
||||
if(backpack.contents.len < backpack.storage_slots)
|
||||
newitem.loc = M.back
|
||||
return newitem
|
||||
|
||||
// Try to place it in any item that can store stuff, on the mob.
|
||||
for(var/obj/item/weapon/storage/S in M.contents)
|
||||
if (S.contents.len < S.storage_slots)
|
||||
newitem.loc = S
|
||||
return newitem
|
||||
newitem.loc = get_turf(M.loc)
|
||||
return newitem
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
|
||||
if(ismob(target) && target.reagents && reagents.total_volume)
|
||||
user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
description_info = "Made from metal sheets. You can build a grille by using it in your hand. \
|
||||
Clicking on a floor without any tiles will reinforce the floor. You can make reinforced glass by combining rods and normal glass sheets."
|
||||
|
||||
/obj/item/stack/sheet/glass
|
||||
/obj/item/stack/material/glass
|
||||
description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets."
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
/obj/item/stack/material/cyborg/glass
|
||||
description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets.<br>\
|
||||
As a synthetic, you can acquire more sheets of glass by recharging."
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage."
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg
|
||||
/obj/item/stack/material/cyborg/glass/reinforced
|
||||
description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage.<br>\
|
||||
As a synthetic, you can gain more reinforced glass by recharging."
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
/obj/item/stack/material/cyborg/steel
|
||||
description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it.<br>\
|
||||
You can replenish your supply of metal as a synthetic by recharging."
|
||||
|
||||
/obj/item/stack/sheet
|
||||
/obj/item/stack/material
|
||||
description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it."
|
||||
@@ -1,5 +1,8 @@
|
||||
// Holographic Items!
|
||||
|
||||
// Holographic tables are in code/modules/tables/presets.dm
|
||||
// Holographic racks are in code/modules/tables/rack.dm
|
||||
|
||||
/turf/simulated/floor/holofloor/
|
||||
thermal_conductivity = 0
|
||||
|
||||
@@ -40,36 +43,6 @@
|
||||
return
|
||||
// HOLOFLOOR DOES NOT GIVE A FUCK
|
||||
|
||||
/obj/structure/table/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
|
||||
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
||||
return // HOLOTABLE DOES NOT GIVE A FUCK
|
||||
|
||||
|
||||
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holotable! There are no bolts!"
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of wood standing on four wooden legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "wood_table"
|
||||
|
||||
/obj/structure/holostool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
@@ -371,22 +344,6 @@
|
||||
for(var/mob/M in currentarea)
|
||||
M << "FIGHT!"
|
||||
|
||||
//Holorack
|
||||
|
||||
/obj/structure/table/rack/holorack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
|
||||
/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holorack! You can't unwrench it!"
|
||||
return
|
||||
|
||||
//Holocarp
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck
|
||||
|
||||
@@ -192,12 +192,12 @@
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.chems)
|
||||
if(istype(W,/obj/item/weapon/hatchet) && !isnull(seed.chems["woodpulp"]))
|
||||
if(istype(W,/obj/item/weapon/material/hatchet) && !isnull(seed.chems["woodpulp"]))
|
||||
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/sheet/wood/NG = new (user.loc)
|
||||
var/obj/item/stack/material/wood/NG = new (user.loc)
|
||||
NG.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for (var/obj/item/stack/sheet/wood/G in user.loc)
|
||||
for (var/obj/item/stack/material/wood/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/material/hatchet) || istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/material/knife/ritual))
|
||||
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
||||
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
|
||||
user << "That seed is not compatible with our genetics technology."
|
||||
else
|
||||
user.remove_from_mob(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
seed = W
|
||||
user << "You load [W] into [src]."
|
||||
@@ -120,7 +120,7 @@
|
||||
user << "That disk does not have any gene data loaded."
|
||||
return
|
||||
|
||||
user.remove_from_mob(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
loaded_disk = W
|
||||
user << "You load [W] into [src]."
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
|
||||
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
|
||||
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
|
||||
|
||||
|
||||
//make vine zero start off fully matured
|
||||
var/obj/effect/plant/vine = new(T,seed)
|
||||
vine.health = vine.max_health
|
||||
vine.mature_time = 0
|
||||
vine.process()
|
||||
|
||||
|
||||
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
|
||||
|
||||
/obj/effect/dead_plant
|
||||
@@ -49,6 +49,7 @@
|
||||
icon_state = "bush4-1"
|
||||
layer = 3
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = 2
|
||||
|
||||
var/health = 10
|
||||
var/max_health = 100
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
spawn(1)
|
||||
entangle(M)
|
||||
|
||||
/obj/effect/plant/attack_hand(mob/user as mob)
|
||||
// Todo, cause damage.
|
||||
/obj/effect/plant/attack_hand(var/mob/user)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plant/attack_generic(var/mob/user)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plant/proc/trodden_on(var/mob/living/victim)
|
||||
@@ -76,7 +78,7 @@
|
||||
if(can_grab)
|
||||
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
|
||||
victim.loc = src.loc
|
||||
|
||||
|
||||
//entangling people
|
||||
if(victim.loc == src.loc)
|
||||
buckle_mob(victim)
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
else
|
||||
user << "<span class='danger'>\The [src] already has seeds in it!</span>"
|
||||
|
||||
else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe
|
||||
else if (istype(O, /obj/item/weapon/material/minihoe)) // The minihoe
|
||||
|
||||
if(weedlevel > 0)
|
||||
user.visible_message("<span class='danger'>[user] starts uprooting the weeds.</span>", "<span class='danger'>You remove the weeds from the [src].</span>")
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
else
|
||||
user << "\blue You insert [O] into [src]. Now it just needs some bees."
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/item/weapon/minihoe))
|
||||
else if(istype(O, /obj/item/weapon/material/minihoe))
|
||||
if(health > 0)
|
||||
user << "\red <b>You begin to dislodge the apiary from the tray, the bees don't like that.</b>"
|
||||
angry_swarm(user)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Handle nearby smoke if any.
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.copy_to(src, 5)
|
||||
smoke.reagents.trans_to_obj(src, 5, copy = 1)
|
||||
|
||||
//Do this even if we're not ready for a plant cycle.
|
||||
process_reagents()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
toxicity = 8
|
||||
pest_kill_str = 7
|
||||
|
||||
/obj/item/weapon/minihoe // -- Numbers
|
||||
/obj/item/weapon/material/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
switch(grown_seed.get_trait(TRAIT_CARNIVOROUS))
|
||||
if(1)
|
||||
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
|
||||
dat += "<br>It is carnivorous and will eat tray pests for sustenance."
|
||||
if(2)
|
||||
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
|
||||
|
||||
@@ -204,77 +204,3 @@
|
||||
user << browse(dat,"window=plant_analyzer")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hoe"
|
||||
item_state = "hoe"
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
//Hatchets and things to kill kudzu
|
||||
/obj/item/weapon/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
flags = CONDUCT
|
||||
force = 12.0
|
||||
w_class = 3.0
|
||||
throwforce = 15.0
|
||||
throw_speed = 4
|
||||
throw_range = 4
|
||||
sharp = 1
|
||||
edge = 1
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
//If it's a hatchet it goes here. I guess
|
||||
/obj/item/weapon/hatchet/unathiknife
|
||||
name = "duelling knife"
|
||||
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/hatchet/tacknife
|
||||
name = "tactical knife"
|
||||
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "tacknife"
|
||||
item_state = "knife"
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
|
||||
|
||||
/obj/item/weapon/scythe
|
||||
icon_state = "scythe0"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force = 13.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
w_class = 4.0
|
||||
flags = NOSHIELD
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "materials=2;combat=2"
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(A, /obj/effect/plant))
|
||||
for(var/obj/effect/plant/B in orange(A,1))
|
||||
if(prob(80))
|
||||
B.die_off(1)
|
||||
qdel(A)
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
return
|
||||
scanner.computer.inventory.Add(src)
|
||||
user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'"
|
||||
else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters))
|
||||
else if(istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/wirecutters))
|
||||
if(carved) return
|
||||
user << "<span class='notice'>You begin to carve out [title].</span>"
|
||||
if(do_after(user, 30))
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
lighting_update_lights += src
|
||||
|
||||
/datum/light_source/proc/check()
|
||||
if(!source_atom)
|
||||
if(!source_atom || !light_range || !light_power)
|
||||
destroy()
|
||||
return 1
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
light_color = source_atom.light_color
|
||||
parse_light_color()
|
||||
. = 1
|
||||
|
||||
|
||||
if(light_range && light_power && !applied)
|
||||
. = 1
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
/datum/controller/process/lighting/doWork()
|
||||
for(var/datum/light_source/L in lighting_update_lights)
|
||||
if(L.needs_update)
|
||||
if(L.destroyed)
|
||||
if(L.destroyed || L.check() || L.force_update)
|
||||
L.remove_lum()
|
||||
else if(L.check() || L.force_update)
|
||||
L.remove_lum()
|
||||
L.apply_lum()
|
||||
if(!L.destroyed) L.apply_lum()
|
||||
L.force_update = 0
|
||||
L.needs_update = 0
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/material/proc/get_recipes()
|
||||
if(!recipes)
|
||||
generate_recipes()
|
||||
return recipes
|
||||
|
||||
/material/proc/generate_recipes()
|
||||
recipes = list()
|
||||
|
||||
// If is_brittle() returns true, these are only good for a single strike.
|
||||
recipes += new/datum/stack_recipe("[display_name] baseball bat", /obj/item/weapon/material/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
if(integrity>=100)
|
||||
recipes += new/datum/stack_recipe("[display_name] door", /obj/structure/simple_door, 10, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] barricade", /obj/structure/barricade, 5, time = 50, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
if(hardness>50)
|
||||
recipes += new/datum/stack_recipe("[display_name] fork", /obj/item/weapon/material/kitchen/utensil/fork/plastic, 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] knife", /obj/item/weapon/material/kitchen/utensil/knife/plastic, 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] blade", /obj/item/weapon/material/butterflyblade, 6, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
/material/steel/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe_list("office chairs",list( \
|
||||
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1) \
|
||||
), 5)
|
||||
recipes += new/datum/stack_recipe_list("comfy chairs", list( \
|
||||
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
|
||||
), 2)
|
||||
|
||||
recipes += new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0)
|
||||
recipes += new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20)
|
||||
recipes += new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60)
|
||||
recipes += new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe_list("airlock assemblies", list( \
|
||||
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("emergency shutter", /obj/structure/firedoor_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
), 4)
|
||||
|
||||
recipes += new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade)
|
||||
recipes += new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2)
|
||||
recipes += new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1)
|
||||
recipes += new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2)
|
||||
recipes += new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2)
|
||||
recipes += new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2)
|
||||
|
||||
/material/plasteel/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/frame/rust/assembly, 12, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/frame/rust, 12, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("knife grip", /obj/item/weapon/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1)
|
||||
|
||||
/material/sandstone/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("pile of dirt", /obj/machinery/portable_atmospherics/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1)
|
||||
|
||||
/material/plastic/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0)
|
||||
recipes += new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0) // 500u
|
||||
recipes += new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0) // 250u
|
||||
recipes += new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
|
||||
|
||||
/material/wood/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1)
|
||||
recipes += new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20)
|
||||
recipes += new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0)
|
||||
recipes += new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1)
|
||||
|
||||
/material/cardboard/generate_recipes()
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("box", /obj/item/weapon/storage/box)
|
||||
recipes += new/datum/stack_recipe("donut box", /obj/item/weapon/storage/box/donut/empty)
|
||||
recipes += new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box)
|
||||
recipes += new/datum/stack_recipe("light tubes box", /obj/item/weapon/storage/box/lights/tubes)
|
||||
recipes += new/datum/stack_recipe("light bulbs box", /obj/item/weapon/storage/box/lights/bulbs)
|
||||
recipes += new/datum/stack_recipe("mouse traps box", /obj/item/weapon/storage/box/mousetraps)
|
||||
recipes += new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3)
|
||||
recipes += new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg)
|
||||
recipes += new/datum/stack_recipe("pizza box", /obj/item/pizzabox)
|
||||
recipes += new/datum/stack_recipe_list("folders",list( \
|
||||
new/datum/stack_recipe("blue folder", /obj/item/weapon/folder/blue), \
|
||||
new/datum/stack_recipe("grey folder", /obj/item/weapon/folder), \
|
||||
new/datum/stack_recipe("red folder", /obj/item/weapon/folder/red), \
|
||||
new/datum/stack_recipe("white folder", /obj/item/weapon/folder/white), \
|
||||
new/datum/stack_recipe("yellow folder", /obj/item/weapon/folder/yellow), \
|
||||
), 3)
|
||||
@@ -0,0 +1,151 @@
|
||||
// Stacked resources. They use a material datum for a lot of inherited values.
|
||||
/obj/item/stack/material
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
var/default_type = DEFAULT_WALL_MATERIAL
|
||||
var/material/material
|
||||
var/perunit
|
||||
var/apply_colour //temp pending icon rewrite
|
||||
|
||||
/obj/item/stack/material/New()
|
||||
..()
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
|
||||
if(!default_type)
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name("[default_type]")
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
// Update from material datum.
|
||||
name = "[material.display_name] sheets"
|
||||
desc = "A stack of sheets of [material.display_name]."
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
origin_tech = material.stack_origin_tech
|
||||
perunit = material.stack_per_sheet
|
||||
|
||||
if(apply_colour)
|
||||
color = material.icon_colour
|
||||
|
||||
if(material.conductive)
|
||||
flags |= CONDUCT
|
||||
|
||||
if(!islist(matter))
|
||||
matter = list()
|
||||
if(material.composite_material)
|
||||
for(var/material_string in material.composite_material)
|
||||
matter[material_string] = material.composite_material[material_string]
|
||||
else
|
||||
matter[material.name] = material.stack_per_sheet
|
||||
return 1
|
||||
|
||||
obj/item/stack/material/iron
|
||||
name = "iron"
|
||||
icon_state = "sheet-silver"
|
||||
default_type = "iron"
|
||||
apply_colour = 1
|
||||
|
||||
/obj/item/stack/material/sandstone
|
||||
name = "sandstone brick"
|
||||
singular_name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
default_type = "sandstone"
|
||||
|
||||
/obj/item/stack/material/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
default_type = "diamond"
|
||||
|
||||
/obj/item/stack/material/uranium
|
||||
name = "uranium"
|
||||
icon_state = "sheet-uranium"
|
||||
default_type = "uranium"
|
||||
|
||||
/obj/item/stack/material/phoron
|
||||
name = "solid phoron"
|
||||
icon_state = "sheet-phoron"
|
||||
default_type = "phoron"
|
||||
|
||||
/obj/item/stack/material/plastic
|
||||
name = "Plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
|
||||
/obj/item/stack/material/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
default_type = "gold"
|
||||
|
||||
/obj/item/stack/material/silver
|
||||
name = "silver"
|
||||
icon_state = "sheet-silver"
|
||||
default_type = "silver"
|
||||
|
||||
//Valuable resource, cargo can sell it.
|
||||
/obj/item/stack/material/platinum
|
||||
name = "platinum"
|
||||
icon_state = "sheet-adamantine"
|
||||
default_type = "platinum"
|
||||
|
||||
//Extremely valuable to Research.
|
||||
/obj/item/stack/material/mhydrogen
|
||||
name = "metallic hydrogen"
|
||||
icon_state = "sheet-mythril"
|
||||
default_type = "mhydrogen"
|
||||
|
||||
//Fuel for MRSPACMAN generator.
|
||||
/obj/item/stack/material/tritium
|
||||
name = "tritium"
|
||||
icon_state = "sheet-silver"
|
||||
default_type = "tritium"
|
||||
apply_colour = 1
|
||||
|
||||
/obj/item/stack/material/osmium
|
||||
name = "osmium"
|
||||
icon_state = "sheet-silver"
|
||||
default_type = "osmium"
|
||||
apply_colour = 1
|
||||
|
||||
/obj/item/stack/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
singular_name = "steel sheet"
|
||||
icon_state = "sheet-metal"
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
|
||||
/obj/item/stack/material/plasteel
|
||||
name = "plasteel"
|
||||
singular_name = "plasteel sheet"
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
default_type = "plasteel"
|
||||
|
||||
/obj/item/stack/material/wood
|
||||
name = "wooden plank"
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
default_type = "wood"
|
||||
|
||||
/obj/item/stack/material/cloth
|
||||
name = "cloth"
|
||||
singular_name = "cloth roll"
|
||||
icon_state = "sheet-cloth"
|
||||
default_type = "cloth"
|
||||
|
||||
/obj/item/stack/material/cardboard
|
||||
name = "cardboard"
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
default_type = "cardboard"
|
||||
|
||||
/obj/item/stack/material/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of mob grinding."
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
default_type = "leather"
|
||||
@@ -0,0 +1,32 @@
|
||||
// These objects are used by cyborgs to get around a lot of the limitations on stacks
|
||||
// and the weird bugs that crop up when expecting borg module code to behave sanely.
|
||||
/obj/item/stack/material/cyborg
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
gender = NEUTER
|
||||
matter = null // Don't shove it in the autholathe.
|
||||
|
||||
/obj/item/stack/material/cyborg/New()
|
||||
if(..())
|
||||
name = "[material.display_name] synthesiser"
|
||||
desc = "A device that synthesises [material.display_name]."
|
||||
matter = null
|
||||
|
||||
/obj/item/stack/material/cyborg/plastic
|
||||
default_type = "plastic"
|
||||
|
||||
/obj/item/stack/material/cyborg/steel
|
||||
default_type = "steel"
|
||||
|
||||
/obj/item/stack/material/cyborg/plasteel
|
||||
default_type = "plasteel"
|
||||
|
||||
/obj/item/stack/material/cyborg/wood
|
||||
default_type = "wood"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass/reinforced
|
||||
default_type = "reinforced glass"
|
||||
charge_costs = list(500, 1000)
|
||||
@@ -1,6 +1,35 @@
|
||||
/*
|
||||
MATERIAL DATUMS
|
||||
This data is used by various parts of the game for basic physical properties and behaviors
|
||||
of the metals/materials used for constructing many objects. Each var is commented and should be pretty
|
||||
self-explanatory but the various object types may have their own documentation. ~Z
|
||||
|
||||
PATHS THAT USE DATUMS
|
||||
/turf/simulated/wall
|
||||
/obj/item/weapon/material
|
||||
/obj/structure/barricade
|
||||
/obj/item/stack/material
|
||||
/obj/structure/table
|
||||
|
||||
VALID ICONS
|
||||
WALLS
|
||||
stone
|
||||
metal
|
||||
solid
|
||||
cult
|
||||
DOORS
|
||||
stone
|
||||
metal
|
||||
resin
|
||||
wood
|
||||
*/
|
||||
|
||||
// Assoc list containing all material datums indexed by name.
|
||||
var/list/name_to_material
|
||||
|
||||
/proc/populate_material_list()
|
||||
// Builds the datum list above.
|
||||
/proc/populate_material_list(force_remake=0)
|
||||
if(name_to_material && !force_remake) return // Already set up!
|
||||
name_to_material = list()
|
||||
for(var/type in typesof(/material) - /material)
|
||||
var/material/new_mineral = new type
|
||||
@@ -9,145 +38,334 @@ var/list/name_to_material
|
||||
name_to_material[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
/*
|
||||
Valid sprite masks:
|
||||
stone
|
||||
metal
|
||||
solid
|
||||
cult
|
||||
*/
|
||||
// Safety proc to make sure the material list exists before trying to grab from it.
|
||||
/proc/get_material_by_name(name)
|
||||
if(!name_to_material)
|
||||
populate_material_list()
|
||||
return name_to_material[name]
|
||||
|
||||
// Material definition and procs follow.
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name
|
||||
var/icon_base = "metal"
|
||||
var/icon_colour
|
||||
var/icon_reinf = "reinf_metal"
|
||||
var/stack_type
|
||||
var/unmeltable
|
||||
var/cut_delay = 0
|
||||
var/radioactivity
|
||||
var/ignition_point
|
||||
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
|
||||
var/integrity = 150 // Damage before wall falls apart, essentially.
|
||||
var/hardness = 60 // Used to determine if a hulk can punch through this wall.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
var/opacity = 1
|
||||
var/explosion_resistance = 5
|
||||
var/name // Unique name for use in indexing the list.
|
||||
var/display_name // Prettier name for display.
|
||||
var/flags = 0 // Various status modifiers.
|
||||
|
||||
// Shards/tables/structures
|
||||
var/shard_type = SHARD_SHRAPNEL // Path of debris object.
|
||||
var/shard_icon // Related to above.
|
||||
var/shard_can_repair = 1 // Can shards be turned into sheets with a welder?
|
||||
var/list/recipes // Holder for all recipes usable with a sheet of this material.
|
||||
var/destruction_desc = "breaks apart" // Fancy string for barricades/tables/objects exploding.
|
||||
|
||||
// Icons
|
||||
var/icon_colour // Colour applied to products of this material.
|
||||
var/icon_base = "metal" // Wall and table base icon tag. See header.
|
||||
var/door_icon_base = "metal" // Door base icon tag. See header.
|
||||
var/icon_reinf = "reinf_metal" // Overlay used
|
||||
var/stack_origin_tech = "materials=1" // Research level for stacks.
|
||||
var/stack_per_sheet = 2000 // perunit value for stacks.
|
||||
|
||||
// Attributes
|
||||
var/cut_delay = 0 // Delay in ticks when cutting through this wall.
|
||||
var/radioactivity // Radiation var. Used in wall and object processing to irradiate surroundings.
|
||||
var/ignition_point // Point at which the material catches on fire.
|
||||
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
|
||||
var/integrity = 150 // General-use HP value for products.
|
||||
var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors.
|
||||
var/explosion_resistance = 5 // Only used by walls currently.
|
||||
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
|
||||
var/list/composite_material // If set, object matter var will be a list containing these values.
|
||||
|
||||
// Damage values.
|
||||
var/hardness = 60 // Prob of wall destruction by hulk, used for edge damage in weapons.
|
||||
var/weight = 20 // Determines blunt damage/throwforce for weapons.
|
||||
|
||||
// Noise when someone is faceplanted onto a table made of this material.
|
||||
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
|
||||
// Noise made when a simple door made of this material opens or closes.
|
||||
var/dooropen_noise = 'sound/effects/stonedoor_openclose.ogg'
|
||||
// Path to resulting stacktype. Todo remove need for this.
|
||||
var/stack_type = /obj/item/stack/material/steel
|
||||
// Wallrot crumble message.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
|
||||
// Make sure we have a display name and shard icon even if they aren't explicitly set.
|
||||
/material/New()
|
||||
..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
if(!shard_icon)
|
||||
shard_icon = shard_type
|
||||
|
||||
// Weapons handle applying a divisor for this value locally.
|
||||
/material/proc/get_blunt_damage()
|
||||
return weight //todo
|
||||
|
||||
// As above.
|
||||
/material/proc/get_edge_damage()
|
||||
return hardness //todo
|
||||
|
||||
// Snowflakey, only checked for alien doors at the moment.
|
||||
/material/proc/can_open_material_door(var/mob/living/user)
|
||||
return 1
|
||||
|
||||
// Currently used for weapons and objects made of uranium to irradiate things.
|
||||
/material/proc/products_need_process()
|
||||
return (radioactivity>0) //todo
|
||||
|
||||
// Used by walls when qdel()ing to avoid neighbor merging.
|
||||
/material/placeholder
|
||||
name = "placeholder"
|
||||
|
||||
// Places a girder object when a wall is dismantled, also applies reinforced material.
|
||||
/material/proc/place_dismantled_girder(var/turf/target, var/material/reinf_material)
|
||||
var/obj/structure/girder/G = new(target)
|
||||
if(reinf_material)
|
||||
G.reinf_material = reinf_material
|
||||
G.reinforce_girder()
|
||||
|
||||
// General wall debris product placement.
|
||||
// Not particularly necessary aside from snowflakey cult girders.
|
||||
/material/proc/place_dismantled_product(var/turf/target,var/is_devastated)
|
||||
for(var/x=1;x<(is_devastated?2:3);x++)
|
||||
place_sheet(target)
|
||||
|
||||
// Debris product. Used ALL THE TIME.
|
||||
/material/proc/place_sheet(var/turf/target)
|
||||
if(stack_type)
|
||||
new stack_type(target)
|
||||
return new stack_type(target)
|
||||
|
||||
// As above.
|
||||
/material/proc/place_shard(var/turf/target)
|
||||
if(shard_type)
|
||||
return new /obj/item/weapon/material/shard(target, src.name)
|
||||
|
||||
// Used by walls and weapons to determine if they break or not.
|
||||
/material/proc/is_brittle()
|
||||
return !!(flags & MATERIAL_BRITTLE)
|
||||
|
||||
// Datum definitions follow.
|
||||
/material/uranium
|
||||
name = "uranium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/uranium
|
||||
stack_type = /obj/item/stack/material/uranium
|
||||
radioactivity = 12
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#007A00"
|
||||
weight = 22
|
||||
stack_origin_tech = "materials=5"
|
||||
door_icon_base = "stone"
|
||||
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
unmeltable = 1
|
||||
stack_type = /obj/item/stack/material/diamond
|
||||
flags = MATERIAL_UNMELTABLE
|
||||
cut_delay = 60
|
||||
icon_colour = "#00FFE1"
|
||||
opacity = 0.4
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 100
|
||||
stack_origin_tech = "materials=6"
|
||||
stack_per_sheet = 3750
|
||||
|
||||
/material/gold
|
||||
name = "gold"
|
||||
stack_type = /obj/item/stack/sheet/mineral/gold
|
||||
stack_type = /obj/item/stack/material/gold
|
||||
icon_colour = "#EDD12F"
|
||||
weight = 24
|
||||
hardness = 40
|
||||
stack_origin_tech = "materials=4"
|
||||
|
||||
/material/silver
|
||||
name = "silver"
|
||||
stack_type = /obj/item/stack/sheet/mineral/silver
|
||||
stack_type = /obj/item/stack/material/silver
|
||||
icon_colour = "#D1E6E3"
|
||||
weight = 22
|
||||
hardness = 50
|
||||
stack_origin_tech = "materials=3"
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/phoron
|
||||
ignition_point = 300
|
||||
stack_type = /obj/item/stack/material/phoron
|
||||
ignition_point = 100
|
||||
icon_base = "stone"
|
||||
icon_colour = "#FC2BC5"
|
||||
shard_type = SHARD_SHARD
|
||||
hardness = 30
|
||||
stack_origin_tech = "phorontech=2;materials=2"
|
||||
door_icon_base = "stone"
|
||||
|
||||
/material/sandstone
|
||||
/material/stone
|
||||
name = "sandstone"
|
||||
stack_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
stack_type = /obj/item/stack/material/sandstone
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#D9C179"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
weight = 22
|
||||
hardness = 55
|
||||
door_icon_base = "stone"
|
||||
|
||||
/material/stone/marble
|
||||
name = "marble"
|
||||
icon_colour = "#AAAAAA"
|
||||
weight = 26
|
||||
hardness = 100
|
||||
integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/sheet/metal
|
||||
stack_type = /obj/item/stack/material/steel
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
|
||||
/material/steel/holographic
|
||||
name = "holographic " + DEFAULT_WALL_MATERIAL
|
||||
display_name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/plasteel
|
||||
name = "plasteel"
|
||||
stack_type = /obj/item/stack/sheet/plasteel
|
||||
stack_type = /obj/item/stack/material/plasteel
|
||||
integrity = 800
|
||||
melting_point = 6000
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#777777"
|
||||
explosion_resistance = 25
|
||||
hardness = 80
|
||||
weight = 23
|
||||
stack_origin_tech = "materials=2"
|
||||
composite_material = list() //todo
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
stack_type = /obj/item/stack/sheet/glass
|
||||
stack_type = /obj/item/stack/material/glass
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_colour = "#00E1FF"
|
||||
opacity = 0.3
|
||||
integrity = 100
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 30
|
||||
weight = 15
|
||||
door_icon_base = "stone"
|
||||
destruction_desc = "shatters"
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
stack_origin_tech = "materials=3;phorontech=2"
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = "materials=4;phorontech=2"
|
||||
composite_material = list() //todo
|
||||
|
||||
/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
stack_type = /obj/item/stack/material/glass/reinforced
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_colour = "#00E1FF"
|
||||
opacity = 0.3
|
||||
integrity = 100
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 40
|
||||
weight = 30
|
||||
stack_origin_tech = "materials=2"
|
||||
composite_material = list() //todo
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
stack_type = /obj/item/stack/sheet/mineral/plastic
|
||||
stack_type = /obj/item/stack/material/plastic
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#CCCCCC"
|
||||
hardness = 10
|
||||
weight = 12
|
||||
stack_origin_tech = "materials=3"
|
||||
|
||||
/material/osmium
|
||||
name = "osmium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/osmium
|
||||
stack_type = /obj/item/stack/material/osmium
|
||||
icon_colour = "#9999FF"
|
||||
stack_origin_tech = "materials=5"
|
||||
|
||||
/material/tritium
|
||||
name = "tritium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/tritium
|
||||
stack_type = /obj/item/stack/material/tritium
|
||||
icon_colour = "#777777"
|
||||
stack_origin_tech = "materials=5"
|
||||
|
||||
/material/mhydrogen
|
||||
name = "mhydrogen"
|
||||
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
stack_type = /obj/item/stack/material/mhydrogen
|
||||
icon_colour = "#E6C5DE"
|
||||
stack_origin_tech = "materials=6;powerstorage=5;magnets=5"
|
||||
|
||||
/material/platinum
|
||||
name = "platinum"
|
||||
stack_type = /obj/item/stack/sheet/mineral/platinum
|
||||
stack_type = /obj/item/stack/material/platinum
|
||||
icon_colour = "#9999FF"
|
||||
weight = 27
|
||||
stack_origin_tech = "materials=2"
|
||||
|
||||
/material/iron
|
||||
name = "iron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/iron
|
||||
stack_type = /obj/item/stack/material/iron
|
||||
icon_colour = "#5C5454"
|
||||
weight = 22
|
||||
stack_per_sheet = 3750
|
||||
|
||||
/material/wood
|
||||
name = "wood"
|
||||
stack_type = /obj/item/stack/material/wood
|
||||
icon_colour = "#824B28"
|
||||
integrity = 25
|
||||
icon_base = "solid"
|
||||
explosion_resistance = 2
|
||||
shard_type = SHARD_SPLINTER
|
||||
shard_can_repair = 0 // you can't weld splinters back into planks
|
||||
hardness = 15
|
||||
weight = 18
|
||||
stack_origin_tech = "materials=1;biotech=1"
|
||||
dooropen_noise = 'sound/effects/doorcreaky.ogg'
|
||||
door_icon_base = "wood"
|
||||
destruction_desc = "splinters"
|
||||
|
||||
/material/wood/holographic
|
||||
name = "holographic wood"
|
||||
display_name = "wood"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/cardboard
|
||||
name = "cardboard"
|
||||
stack_type = /obj/item/stack/material/cardboard
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#AAAAAA"
|
||||
hardness = 1
|
||||
weight = 1
|
||||
stack_origin_tech = "materials=1"
|
||||
door_icon_base = "wood"
|
||||
destruction_desc = "crumples"
|
||||
|
||||
/material/cloth //todo
|
||||
name = "cloth"
|
||||
stack_origin_tech = "materials=2"
|
||||
door_icon_base = "wood"
|
||||
|
||||
/material/cult
|
||||
name = "cult"
|
||||
@@ -155,6 +373,7 @@ var/list/name_to_material
|
||||
icon_base = "cult"
|
||||
icon_colour = "#402821"
|
||||
icon_reinf = "reinf_cult"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
|
||||
/material/cult/place_dismantled_girder(var/turf/target)
|
||||
new /obj/structure/girder/cult(target)
|
||||
@@ -168,3 +387,25 @@ var/list/name_to_material
|
||||
|
||||
/material/cult/reinf/place_dismantled_product(var/turf/target)
|
||||
new /obj/effect/decal/remains/human(target)
|
||||
|
||||
/material/resin
|
||||
name = "resin"
|
||||
icon_colour = "#E85DD8"
|
||||
dooropen_noise = 'sound/effects/attackblob.ogg'
|
||||
door_icon_base = "resin"
|
||||
|
||||
/material/resin/can_open_material_door(var/mob/living/user)
|
||||
var/mob/living/carbon/M = user
|
||||
if(istype(M) && locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/material/leather //todo
|
||||
name = "leather"
|
||||
icon_colour = "#5C4831"
|
||||
stack_origin_tech = "materials=2"
|
||||
|
||||
/material/carpet
|
||||
name = "carpet"
|
||||
display_name = "padding"
|
||||
icon_colour = "#A83C1B"
|
||||
@@ -109,7 +109,7 @@
|
||||
if(91)
|
||||
new/obj/item/device/soulstone(src)
|
||||
if(92)
|
||||
new/obj/item/weapon/katana(src)
|
||||
new/obj/item/weapon/material/sword/katana(src)
|
||||
if(93)
|
||||
new/obj/item/weapon/dnainjector/xraymut(src) // Probably the least OP
|
||||
if(94) // Why the hell not
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"hematite" = 2
|
||||
)
|
||||
product_mod = 0.3
|
||||
product = /obj/item/stack/sheet/plasteel
|
||||
product = /obj/item/stack/material/plasteel
|
||||
|
||||
/datum/alloy/steel
|
||||
metaltag = DEFAULT_WALL_MATERIAL
|
||||
@@ -24,4 +24,4 @@
|
||||
"coal" = 1,
|
||||
"hematite" = 1
|
||||
)
|
||||
product = /obj/item/stack/sheet/metal
|
||||
product = /obj/item/stack/material/steel
|
||||
@@ -53,7 +53,7 @@
|
||||
if(href_list["release_stack"])
|
||||
if(machine.stack_storage[href_list["release_stack"]] > 0)
|
||||
var/stacktype = machine.stack_paths[href_list["release_stack"]]
|
||||
var/obj/item/stack/sheet/S = new stacktype (get_turf(machine.output))
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(machine.output))
|
||||
S.amount = machine.stack_storage[href_list["release_stack"]]
|
||||
machine.stack_storage[href_list["release_stack"]] = 0
|
||||
|
||||
@@ -81,18 +81,18 @@
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/sheet/mineral)-/obj/item/stack/sheet/mineral)
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
qdel(S)
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/sheet/glass
|
||||
stack_paths["glass"] = /obj/item/stack/material/glass
|
||||
stack_storage[DEFAULT_WALL_MATERIAL] = 0
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/sheet/metal
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/material/steel
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/sheet/plasteel
|
||||
stack_paths["plasteel"] = /obj/item/stack/material/plasteel
|
||||
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
@@ -122,7 +122,7 @@
|
||||
for(var/sheet in stack_storage)
|
||||
if(stack_storage[sheet] >= stack_amt)
|
||||
var/stacktype = stack_paths[sheet]
|
||||
var/obj/item/stack/sheet/S = new stacktype (get_turf(output))
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(output))
|
||||
S.amount = stack_amt
|
||||
stack_storage[sheet] -= stack_amt
|
||||
|
||||
|
||||
@@ -346,25 +346,25 @@
|
||||
R.amount = rand(1,5)
|
||||
|
||||
if(3)
|
||||
var/obj/item/stack/sheet/metal/R = new(src)
|
||||
var/obj/item/stack/material/steel/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
if(4)
|
||||
var/obj/item/stack/sheet/plasteel/R = new(src)
|
||||
var/obj/item/stack/material/plasteel/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
if(5)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
new /obj/item/weapon/shard(src)
|
||||
new /obj/item/weapon/material/shard(src)
|
||||
|
||||
if(6)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
new /obj/item/weapon/shard/phoron(src)
|
||||
new /obj/item/weapon/material/shard/phoron(src)
|
||||
|
||||
if(7)
|
||||
var/obj/item/stack/sheet/mineral/uranium/R = new(src)
|
||||
var/obj/item/stack/material/uranium/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
/turf/simulated/mineral/random
|
||||
|
||||
@@ -37,25 +37,25 @@
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
if ( src.input)
|
||||
var/obj/item/stack/sheet/O
|
||||
O = locate(/obj/item/stack/sheet, input.loc)
|
||||
var/obj/item/stack/material/O
|
||||
O = locate(/obj/item/stack/material, input.loc)
|
||||
if(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
if (istype(O,/obj/item/stack/material/gold))
|
||||
amt_gold += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
if (istype(O,/obj/item/stack/material/silver))
|
||||
amt_silver += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
if (istype(O,/obj/item/stack/material/diamond))
|
||||
amt_diamond += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/phoron))
|
||||
if (istype(O,/obj/item/stack/material/phoron))
|
||||
amt_phoron += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
if (istype(O,/obj/item/stack/material/uranium))
|
||||
amt_uranium += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
if (istype(O,/obj/item/stack/material/steel))
|
||||
amt_iron += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
adds a dizziness amount to a mob
|
||||
use this rather than directly changing var/dizziness
|
||||
since this ensures that the dizzy_process proc is started
|
||||
currently only humans get dizzy
|
||||
|
||||
value of dizziness ranges from 0 to 1000
|
||||
below 100 is not dizzy
|
||||
*/
|
||||
|
||||
/mob/var/dizziness = 0//Carbon
|
||||
/mob/var/is_dizzy = 0
|
||||
|
||||
/mob/proc/make_dizzy(var/amount)
|
||||
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
|
||||
return
|
||||
|
||||
dizziness = min(1000, dizziness + amount) // store what will be new value
|
||||
// clamped to max 1000
|
||||
if(dizziness > 100 && !is_dizzy)
|
||||
spawn(0)
|
||||
dizzy_process()
|
||||
|
||||
|
||||
/*
|
||||
dizzy process - wiggles the client's pixel offset over time
|
||||
spawned from make_dizzy(), will terminate automatically when dizziness gets <100
|
||||
note dizziness decrements automatically in the mob's Life() proc.
|
||||
*/
|
||||
/mob/proc/dizzy_process()
|
||||
is_dizzy = 1
|
||||
while(dizziness > 100)
|
||||
if(client)
|
||||
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
|
||||
client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
|
||||
client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
|
||||
|
||||
sleep(1)
|
||||
//endwhile - reset the pixel offsets to zero
|
||||
is_dizzy = 0
|
||||
if(client)
|
||||
client.pixel_x = 0
|
||||
client.pixel_y = 0
|
||||
|
||||
// jitteriness - copy+paste of dizziness
|
||||
/mob/var/is_jittery = 0
|
||||
/mob/var/jitteriness = 0//Carbon
|
||||
/mob/proc/make_jittery(var/amount)
|
||||
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
|
||||
return
|
||||
|
||||
jitteriness = min(1000, jitteriness + amount) // store what will be new value
|
||||
// clamped to max 1000
|
||||
if(jitteriness > 100 && !is_jittery)
|
||||
spawn(0)
|
||||
jittery_process()
|
||||
|
||||
|
||||
// Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above.
|
||||
/mob/proc/jittery_process()
|
||||
//var/old_x = pixel_x
|
||||
//var/old_y = pixel_y
|
||||
is_jittery = 1
|
||||
while(jitteriness > 100)
|
||||
// var/amplitude = jitteriness*(sin(jitteriness * 0.044 * world.time) + 1) / 70
|
||||
// pixel_x = amplitude * sin(0.008 * jitteriness * world.time)
|
||||
// pixel_y = amplitude * cos(0.008 * jitteriness * world.time)
|
||||
|
||||
var/amplitude = min(4, jitteriness / 100)
|
||||
pixel_x = old_x + rand(-amplitude, amplitude)
|
||||
pixel_y = old_y + rand(-amplitude/3, amplitude/3)
|
||||
|
||||
sleep(1)
|
||||
//endwhile - reset the pixel offsets to zero
|
||||
is_jittery = 0
|
||||
pixel_x = old_x
|
||||
pixel_y = old_y
|
||||
|
||||
|
||||
//handles up-down floaty effect in space
|
||||
/mob/var/is_floating = 0
|
||||
/mob/var/floatiness = 0
|
||||
|
||||
/mob/proc/make_floating(var/n)
|
||||
|
||||
floatiness = n
|
||||
|
||||
if(floatiness && !is_floating)
|
||||
start_floating()
|
||||
else if(!floatiness && is_floating)
|
||||
stop_floating()
|
||||
|
||||
/mob/proc/start_floating()
|
||||
|
||||
is_floating = 1
|
||||
|
||||
var/amplitude = 2 //maximum displacement from original position
|
||||
var/period = 36 //time taken for the mob to go up >> down >> original position, in deciseconds. Should be multiple of 4
|
||||
|
||||
var/top = old_y + amplitude
|
||||
var/bottom = old_y - amplitude
|
||||
var/half_period = period / 2
|
||||
var/quarter_period = period / 4
|
||||
|
||||
animate(src, pixel_y = top, time = quarter_period, easing = SINE_EASING | EASE_OUT, loop = -1) //up
|
||||
animate(pixel_y = bottom, time = half_period, easing = SINE_EASING, loop = -1) //down
|
||||
animate(pixel_y = old_y, time = quarter_period, easing = SINE_EASING | EASE_IN, loop = -1) //back
|
||||
|
||||
/mob/proc/stop_floating()
|
||||
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
|
||||
//reset the pixel offsets to zero
|
||||
is_floating = 0
|
||||
|
||||
/atom/movable/proc/do_attack_animation(atom/A)
|
||||
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
var/direction = get_dir(src, A)
|
||||
switch(direction)
|
||||
if(NORTH)
|
||||
pixel_y_diff = 8
|
||||
if(SOUTH)
|
||||
pixel_y_diff = -8
|
||||
if(EAST)
|
||||
pixel_x_diff = 8
|
||||
if(WEST)
|
||||
pixel_x_diff = -8
|
||||
if(NORTHEAST)
|
||||
pixel_x_diff = 8
|
||||
pixel_y_diff = 8
|
||||
if(NORTHWEST)
|
||||
pixel_x_diff = -8
|
||||
pixel_y_diff = 8
|
||||
if(SOUTHEAST)
|
||||
pixel_x_diff = 8
|
||||
pixel_y_diff = -8
|
||||
if(SOUTHWEST)
|
||||
pixel_x_diff = -8
|
||||
pixel_y_diff = -8
|
||||
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
|
||||
animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2)
|
||||
|
||||
/mob/do_attack_animation(atom/A)
|
||||
..()
|
||||
is_floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
|
||||
/mob/proc/spin(spintime, speed)
|
||||
spawn()
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
set_dir(D)
|
||||
spintime -= speed
|
||||
return
|
||||
@@ -218,7 +218,7 @@ var/list/slot_equipment_priority = list( \
|
||||
drop_from_inventory(I)
|
||||
return 1
|
||||
|
||||
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
||||
//Attemps to remove an object on a mob.
|
||||
/mob/proc/remove_from_mob(var/obj/O)
|
||||
src.u_equip(O)
|
||||
if (src.client)
|
||||
@@ -227,6 +227,7 @@ var/list/slot_equipment_priority = list( \
|
||||
O.screen_loc = null
|
||||
if(istype(O, /obj/item))
|
||||
var/obj/item/I = O
|
||||
I.loc = src.loc
|
||||
I.dropped(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
switch(action)
|
||||
if("weed")
|
||||
flick("farmbot_hoe", src)
|
||||
do_attack_animation(A)
|
||||
if(prob(50))
|
||||
visible_message("<span class='danger'>[src] swings wildly at [A] with a minihoe, missing completely!</span>")
|
||||
return
|
||||
@@ -241,7 +242,7 @@
|
||||
visible_message("<span class='danger'>[src] blows apart!</span>")
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
new /obj/item/weapon/minihoe(Tsec)
|
||||
new /obj/item/weapon/material/minihoe(Tsec)
|
||||
new /obj/item/weapon/reagent_containers/glass/bucket(Tsec)
|
||||
new /obj/item/device/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/device/analyzer/plant_analyzer(Tsec)
|
||||
@@ -326,7 +327,7 @@
|
||||
user.remove_from_mob(W)
|
||||
qdel(W)
|
||||
|
||||
else if((istype(W, /obj/item/weapon/minihoe)) && (build_step == 2))
|
||||
else if((istype(W, /obj/item/weapon/material/minihoe)) && (build_step == 2))
|
||||
build_step++
|
||||
user << "You add a minihoe to [src]."
|
||||
name = "farmbot assembly with bucket and minihoe"
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
target = T
|
||||
break
|
||||
if(maketiles && !target)
|
||||
for(var/obj/item/stack/sheet/metal/T in view(src))
|
||||
for(var/obj/item/stack/material/steel/T in view(src))
|
||||
if(T in ignorelist)
|
||||
continue
|
||||
target = T
|
||||
@@ -249,8 +249,8 @@
|
||||
target = null
|
||||
repairing = 0
|
||||
update_icons()
|
||||
else if(istype(A, /obj/item/stack/sheet/metal) && amount + 3 < maxAmount)
|
||||
var/obj/item/stack/sheet/metal/M = A
|
||||
else if(istype(A, /obj/item/stack/material/steel) && amount + 3 < maxAmount)
|
||||
var/obj/item/stack/material/steel/M = A
|
||||
visible_message("<span class='notice'>[src] begins to make tiles.</span>")
|
||||
repairing = 1
|
||||
update_icons()
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
update_icons()
|
||||
if(do_mob(src, H, 30))
|
||||
if(t == 1)
|
||||
reagent_glass.reagents.trans_to(H, injection_amount)
|
||||
reagent_glass.reagents.reaction(H, 2)
|
||||
reagent_glass.reagents.trans_to_mob(H, injection_amount, CHEM_BLOOD)
|
||||
else
|
||||
H.reagents.add_reagent(t, injection_amount)
|
||||
visible_message("<span class='warning'>[src] injects [H] with the syringe!</span>")
|
||||
|
||||
@@ -264,6 +264,7 @@
|
||||
if(!cuff)
|
||||
C.stun_effect_act(0, 60, null)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
do_attack_animation(C)
|
||||
is_attacking = 1
|
||||
update_icons()
|
||||
spawn(2)
|
||||
@@ -283,6 +284,7 @@
|
||||
var/mob/living/simple_animal/S = M
|
||||
S.AdjustStunned(10)
|
||||
S.adjustBruteLoss(15)
|
||||
do_attack_animation(M)
|
||||
playsound(loc, "swing_hit", 50, 1, -1)
|
||||
is_attacking = 1
|
||||
update_icons()
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
name = "[initial(name)] ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(istype(M))
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
if(istype(M) && M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona" && do_merge(M))
|
||||
return
|
||||
|
||||
get_scooped(M)
|
||||
return
|
||||
..()
|
||||
@@ -24,18 +24,21 @@
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
|
||||
|
||||
if(!M || !src || !(src.Adjacent(M))) return
|
||||
if(!M)
|
||||
src << "There is nothing nearby to merge with."
|
||||
else if(!do_merge(M))
|
||||
src << "You fail to merge with \the [M]..."
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
M.status_flags |= PASSEMOTES
|
||||
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.loc = M
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
else
|
||||
return
|
||||
/mob/living/carbon/alien/diona/proc/do_merge(var/mob/living/carbon/human/H)
|
||||
if(!istype(H) || !src || !(src.Adjacent(H)))
|
||||
return 0
|
||||
H << "You feel your being twine with that of \the [src] as it merges with your biomass."
|
||||
H.status_flags |= PASSEMOTES
|
||||
src << "You feel your being twine with that of \the [H] as you merge with its biomass."
|
||||
loc = H
|
||||
verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/diona/proc/split()
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/obj/item/organ/brain/brainobj = null //The current brain organ.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
@@ -60,7 +61,8 @@
|
||||
living_mob_list += brainmob
|
||||
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
brainobj = O
|
||||
brainobj.loc = src
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
@@ -91,7 +93,13 @@
|
||||
user << "\red You upend the MMI, but the brain is clamped into place."
|
||||
else
|
||||
user << "\blue You upend the MMI, spilling the brain onto the floor."
|
||||
var/obj/item/organ/brain/brain = new(user.loc)
|
||||
var/obj/item/organ/brain/brain
|
||||
if (brainobj) //Pull brain organ out of MMI.
|
||||
brainobj.loc = user.loc
|
||||
brain = brainobj
|
||||
brainobj = null
|
||||
else //Or make a new one if empty.
|
||||
brain = new(user.loc)
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
living_mob_list -= brainmob//Get outta here
|
||||
|
||||
@@ -105,7 +105,18 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
//First, check if we can breathe at all
|
||||
if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock
|
||||
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
@@ -65,11 +65,9 @@
|
||||
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
// I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
/mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/mob/living/carbon/New()
|
||||
create_reagents(1000)
|
||||
var/datum/reagents/R1 = new/datum/reagents(1000)
|
||||
var/datum/reagents/R2 = new/datum/reagents(1000)
|
||||
ingested = R1
|
||||
touching = R2
|
||||
R1.my_atom = src
|
||||
R2.my_atom = src
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
@@ -122,7 +132,7 @@
|
||||
/mob/living/carbon/proc/swap_hand()
|
||||
var/obj/item/item_in_hand = src.get_active_hand()
|
||||
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
|
||||
if(istype(item_in_hand,/obj/item/weapon/twohanded))
|
||||
if(istype(item_in_hand,/obj/item/weapon/material/twohanded))
|
||||
if(item_in_hand:wielded == 1)
|
||||
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
|
||||
return
|
||||
@@ -163,7 +173,7 @@
|
||||
)
|
||||
|
||||
for(var/obj/item/organ/external/org in H.organs)
|
||||
var/status = ""
|
||||
var/list/status = list()
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
if(halloss > 0)
|
||||
@@ -171,29 +181,39 @@
|
||||
brutedamage += halloss
|
||||
if(prob(30))
|
||||
burndamage += halloss
|
||||
switch(brutedamage)
|
||||
if(1 to 20)
|
||||
status += "bruised"
|
||||
if(20 to 40)
|
||||
status += "wounded"
|
||||
if(40 to INFINITY)
|
||||
status += "mangled"
|
||||
|
||||
if(brutedamage > 0)
|
||||
status = "bruised"
|
||||
if(brutedamage > 20)
|
||||
status = "bleeding"
|
||||
if(brutedamage > 40)
|
||||
status = "mangled"
|
||||
if(brutedamage > 0 && burndamage > 0)
|
||||
status += " and "
|
||||
if(burndamage > 40)
|
||||
status += "peeling away"
|
||||
switch(burndamage)
|
||||
if(1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
|
||||
else if(burndamage > 10)
|
||||
status += "blistered"
|
||||
else if(burndamage > 0)
|
||||
status += "numb"
|
||||
if(org.status & ORGAN_DESTROYED)
|
||||
status = "MISSING!"
|
||||
status += "MISSING"
|
||||
if(org.status & ORGAN_MUTATED)
|
||||
status = "weirdly shapen."
|
||||
if(status == "")
|
||||
status = "OK"
|
||||
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
|
||||
status += "weirdly shapen"
|
||||
if(org.dislocated == 2)
|
||||
status += "dislocated"
|
||||
if(org.status & ORGAN_BROKEN)
|
||||
status += "hurts when touched"
|
||||
if(org.status & ORGAN_DEAD)
|
||||
status += "is bruised and necrotic"
|
||||
if(!org.is_usable())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.",1)
|
||||
|
||||
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
else if (on_fire)
|
||||
@@ -391,25 +411,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
|
||||
//generates realistic-ish pulse output based on preset levels
|
||||
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
|
||||
var/temp = 0 //see setup.dm:694
|
||||
@@ -462,6 +463,12 @@
|
||||
Weaken(Floor(stun_duration/2))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] += magnitude
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
/mob/living/carbon/get_default_language()
|
||||
if(default_language)
|
||||
return default_language
|
||||
|
||||
@@ -17,5 +17,8 @@
|
||||
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
var/list/chem_effects = list()
|
||||
var/datum/reagents/ingested = null
|
||||
var/datum/reagents/touching = null
|
||||
|
||||
var/pulse = PULSE_NORM //current pulse level
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
handle_hud_list()
|
||||
|
||||
//Handle species-specific deaths.
|
||||
if(species) species.handle_death(src)
|
||||
species.handle_death(src)
|
||||
animate_tail_stop()
|
||||
|
||||
//Handle brain slugs.
|
||||
var/obj/item/organ/external/head = get_organ("head")
|
||||
|
||||
@@ -541,8 +541,24 @@
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if("swish")
|
||||
src.animate_tail_once()
|
||||
|
||||
if("wag", "sway")
|
||||
src.animate_tail_start()
|
||||
|
||||
if("qwag", "fastsway")
|
||||
src.animate_tail_fast()
|
||||
|
||||
if("swag", "stopsway")
|
||||
src.animate_tail_stop()
|
||||
|
||||
if ("help")
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
|
||||
src << {"blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,
|
||||
cry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,
|
||||
grin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,
|
||||
sigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,
|
||||
wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
|
||||
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
|
||||
@@ -274,76 +274,17 @@
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
|
||||
if(wound_flavor_text["[temp.name]"])
|
||||
wound_flavor_text["[temp.name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.internal && !temp.open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(this_wound_desc in wound_descriptors)
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
continue
|
||||
wound_descriptors[this_wound_desc] = W.amount
|
||||
if(wound_descriptors.len)
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
|
||||
else
|
||||
flavor_text += " a ton of [wound]\s"
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [temp.name].</span><br>"
|
||||
wound_flavor_text["[temp.name]"] = flavor_text_string
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
|
||||
else if(temp.wounds.len > 0 || temp.open)
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
|
||||
if(temp.status & ORGAN_BLEEDING)
|
||||
is_bleeding["[temp.name]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
if(temp.dislocated == 2)
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.joint] is dislocated!</span><br>"
|
||||
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.name] is dented and swollen!</span><br>"
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
|
||||
@@ -354,9 +295,9 @@
|
||||
msg += wound_flavor_text["head"]
|
||||
else if(is_bleeding["head"])
|
||||
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["chest"]
|
||||
else if(is_bleeding["chest"])
|
||||
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["upper body"]
|
||||
else if(is_bleeding["upper body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left arm"]
|
||||
@@ -374,9 +315,9 @@
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
display_gloves = 1
|
||||
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["groin"]
|
||||
else if(is_bleeding["groin"])
|
||||
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["lower body"]
|
||||
else if(is_bleeding["lower body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left leg"]
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
if(mind)
|
||||
mind.name = real_name
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
@@ -231,33 +227,41 @@
|
||||
suit = w_uniform
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
|
||||
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
|
||||
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear ? l_ear : "Nothing")]</A>
|
||||
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
|
||||
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
|
||||
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
|
||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
||||
<BR>[(suit) ? ((suit.accessories.len) ? text(" <A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
var/dat = "<B><HR><FONT size=3>[name]</FONT></B><BR><HR>"
|
||||
|
||||
for(var/entry in species.hud.gear)
|
||||
var/list/slot_ref = species.hud.gear[entry]
|
||||
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
|
||||
continue
|
||||
var/obj/item/thing_in_slot = get_equipped_item(slot_ref["slot"])
|
||||
dat += "<BR><B>[slot_ref["name"]]:</b> <a href='?src=\ref[src];item=[slot_ref["slot"]]'>[istype(thing_in_slot) ? thing_in_slot : "nothing"]</a>"
|
||||
|
||||
dat += "<BR><HR>"
|
||||
|
||||
if(species.hud.has_hands)
|
||||
dat += "<BR><b>Left hand:</b> <A href='?src=\ref[src];item=[slot_l_hand]'>[istype(l_hand) ? l_hand : "nothing"]</A>"
|
||||
dat += "<BR><b>Right hand:</b> <A href='?src=\ref[src];item=[slot_r_hand]'>[istype(r_hand) ? r_hand : "nothing"]</A>"
|
||||
|
||||
// Do they get an option to set internals?
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space))
|
||||
if(istype(back, /obj/item/weapon/tank) || istype(belt, /obj/item/weapon/tank) || istype(s_store, /obj/item/weapon/tank))
|
||||
dat += "<BR><A href='?src=\ref[src];item=internals'>Toggle internals.</A>"
|
||||
|
||||
// Other incidentals.
|
||||
if(istype(suit) && suit.has_sensor == 1)
|
||||
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors.</A>"
|
||||
if(handcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
|
||||
if(legcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
||||
|
||||
if(suit && suit.accessories.len)
|
||||
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
|
||||
dat += "<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>"
|
||||
|
||||
user << browse(dat, text("window=mob[name];size=340x540"))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
@@ -372,6 +376,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/Topic(href, href_list)
|
||||
|
||||
if (href_list["refresh"])
|
||||
if((machine)&&(in_range(src, usr)))
|
||||
show_inv(machine)
|
||||
@@ -381,18 +386,8 @@
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = usr
|
||||
O.target = src
|
||||
O.item = usr.get_active_hand()
|
||||
O.s_loc = usr.loc
|
||||
O.t_loc = loc
|
||||
O.place = href_list["item"]
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
if(href_list["item"])
|
||||
handle_strip(href_list["item"],usr)
|
||||
|
||||
if (href_list["criminal"])
|
||||
if(hasHUD(usr,"security"))
|
||||
@@ -1028,7 +1023,7 @@
|
||||
var/list/visible_implants = list()
|
||||
for(var/obj/item/organ/external/organ in src.organs)
|
||||
for(var/obj/item/weapon/O in organ.implants)
|
||||
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel))
|
||||
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/material/shard/shrapnel))
|
||||
visible_implants += O
|
||||
|
||||
return(visible_implants)
|
||||
@@ -1293,7 +1288,7 @@
|
||||
/mob/living/carbon/human/has_eyes()
|
||||
if(internal_organs_by_name["eyes"])
|
||||
var/obj/item/organ/eyes = internal_organs_by_name["eyes"]
|
||||
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
|
||||
if(eyes && istype(eyes) && !(eyes.status & ORGAN_CUT_AWAY))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -1323,7 +1318,6 @@
|
||||
var/mob/S = src
|
||||
var/mob/U = usr
|
||||
var/self = null
|
||||
|
||||
if(S == U)
|
||||
self = 1 // Removing object from yourself.
|
||||
|
||||
@@ -1332,8 +1326,7 @@
|
||||
var/obj/item/organ/external/current_limb = organs_by_name[limb]
|
||||
if(current_limb && current_limb.dislocated == 2)
|
||||
limbs |= limb
|
||||
|
||||
var/choice = input(src,"Which joint do you wish to relocate?") as null|anything in limbs
|
||||
var/choice = input(usr,"Which joint do you wish to relocate?") as null|anything in limbs
|
||||
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
if(istype(H))
|
||||
if((H != src) && check_shields(0, H.name))
|
||||
visible_message("\red <B>[H] attempted to touch [src]!</B>")
|
||||
H.do_attack_animation(src)
|
||||
return 0
|
||||
|
||||
if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove))
|
||||
|
||||
H.do_attack_animation(src)
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
@@ -46,25 +47,32 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove your mask!</B>"
|
||||
H << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove [src]'s mask!</B>"
|
||||
H << "<span class='notice'>Remove [src]'s mask!</span>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
if (!cpr_time)
|
||||
return 0
|
||||
|
||||
cpr_time = 0
|
||||
spawn(30)
|
||||
cpr_time = 1
|
||||
|
||||
H.visible_message("<span class='danger'>\The [H] is trying perform CPR on \the [src]!</span>")
|
||||
|
||||
if(!do_after(H, 30))
|
||||
return
|
||||
|
||||
adjustOxyLoss(-(min(getOxyLoss(), 5)))
|
||||
updatehealth()
|
||||
H.visible_message("<span class='danger'>\The [H] performs CPR on \the [src]!</span>")
|
||||
src << "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
|
||||
H << "<span class='warning'>Repeat at least every 7 seconds.</span>"
|
||||
|
||||
else
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
@@ -88,6 +96,7 @@
|
||||
G.synch()
|
||||
LAssailant = M
|
||||
|
||||
H.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
return 1
|
||||
@@ -179,6 +188,7 @@
|
||||
if(!attack)
|
||||
return 0
|
||||
|
||||
H.do_attack_animation(src)
|
||||
if(!attack_message)
|
||||
attack.show_attack(H, src, hit_zone, rand_damage)
|
||||
else
|
||||
@@ -213,6 +223,7 @@
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
|
||||
msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey])")
|
||||
M.do_attack_animation(src)
|
||||
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
@@ -271,6 +282,7 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
@@ -293,7 +305,7 @@
|
||||
var/dislocation_str
|
||||
if(prob(W.force))
|
||||
dislocation_str = "[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!"
|
||||
organ.dislocate()
|
||||
organ.dislocate(1)
|
||||
return dislocation_str
|
||||
|
||||
//Used to attack a joint through grabbing
|
||||
@@ -317,7 +329,7 @@
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
|
||||
if(do_after(user, 100))
|
||||
organ.dislocate()
|
||||
organ.dislocate(1)
|
||||
src.visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -43,7 +43,7 @@ emp_act
|
||||
if(P.can_embed())
|
||||
var/armor = getarmor_organ(organ, "bullet")
|
||||
if(prob(20 + max(P.damage - armor, -10)))
|
||||
var/obj/item/weapon/shard/shrapnel/SP = new()
|
||||
var/obj/item/weapon/material/shard/shrapnel/SP = new()
|
||||
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
|
||||
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
||||
SP.loc = organ
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
if(embedded_flag)
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
|
||||
if(reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
if(reagents.has_reagent("nuka_cola")) return -1
|
||||
if(CE_SPEEDBOOST in chem_effects)
|
||||
return -1
|
||||
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
@@ -253,6 +253,6 @@
|
||||
|
||||
visible_message("<span class='warning'>\The [src] quivers slightly, then splits apart with a wet slithering noise.</span>")
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_inv_glasses()
|
||||
else if (W == head)
|
||||
head = null
|
||||
|
||||
|
||||
var/update_hair = 0
|
||||
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
|
||||
update_hair = 1
|
||||
@@ -128,7 +128,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_hair(0) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
update_inv_wear_mask(0)
|
||||
|
||||
|
||||
update_inv_head()
|
||||
else if (W == l_ear)
|
||||
l_ear = null
|
||||
@@ -168,9 +168,9 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
back = null
|
||||
update_inv_back()
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
buckled.unbuckle_mob()
|
||||
update_inv_handcuffed()
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
@@ -183,7 +183,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_inv_l_hand()
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -321,7 +321,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
/mob/living/carbon/human/slot_is_accessible(var/slot, var/obj/item/I, mob/user=null)
|
||||
var/obj/item/covering = null
|
||||
var/check_flags = 0
|
||||
|
||||
|
||||
switch(slot)
|
||||
if(slot_wear_mask)
|
||||
covering = src.head
|
||||
@@ -331,7 +331,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
check_flags = HEADCOVERSEYES
|
||||
if(slot_gloves, slot_w_uniform)
|
||||
covering = src.wear_suit
|
||||
|
||||
|
||||
if(covering)
|
||||
if((covering.body_parts_covered & I.body_parts_covered) || (covering.flags & check_flags))
|
||||
user << "<span class='warning'>\The [covering] is in the way.</span>"
|
||||
@@ -340,473 +340,23 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
|
||||
/mob/living/carbon/human/get_equipped_item(var/slot)
|
||||
switch(slot)
|
||||
if(slot_wear_suit) return wear_suit
|
||||
if(slot_gloves) return gloves
|
||||
if(slot_shoes) return shoes
|
||||
if(slot_belt) return belt
|
||||
if(slot_glasses) return glasses
|
||||
if(slot_head) return head
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
if(slot_w_uniform) return w_uniform
|
||||
if(slot_wear_id) return wear_id
|
||||
if(slot_l_store) return l_store
|
||||
if(slot_r_store) return r_store
|
||||
if(slot_s_store) return s_store
|
||||
if(slot_back) return back
|
||||
if(slot_legcuffed) return legcuffed
|
||||
if(slot_handcuffed) return handcuffed
|
||||
if(slot_legcuffed) return legcuffed
|
||||
if(slot_l_store) return l_store
|
||||
if(slot_r_store) return r_store
|
||||
if(slot_wear_mask) return wear_mask
|
||||
if(slot_l_hand) return l_hand
|
||||
if(slot_r_hand) return r_hand
|
||||
if(slot_wear_id) return wear_id
|
||||
if(slot_glasses) return glasses
|
||||
if(slot_gloves) return gloves
|
||||
if(slot_head) return head
|
||||
if(slot_shoes) return shoes
|
||||
if(slot_belt) return belt
|
||||
if(slot_wear_suit) return wear_suit
|
||||
if(slot_w_uniform) return w_uniform
|
||||
if(slot_s_store) return s_store
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
return ..()
|
||||
|
||||
///Bizarre equip effect system below
|
||||
|
||||
/*
|
||||
MouseDrop human inventory menu
|
||||
*/
|
||||
|
||||
/obj/effect/equip_e
|
||||
name = "equip e"
|
||||
var/mob/source = null
|
||||
var/s_loc = null //source location
|
||||
var/t_loc = null //target location
|
||||
var/obj/item/item = null
|
||||
var/place = null
|
||||
|
||||
/obj/effect/equip_e/human
|
||||
name = "human"
|
||||
var/mob/living/carbon/human/target = null
|
||||
|
||||
/obj/effect/equip_e/process()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/proc/done()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/New()
|
||||
if (!ticker)
|
||||
qdel(src)
|
||||
spawn(100)
|
||||
qdel(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/human/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
else
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (!( target.wear_mask ))
|
||||
qdel(src)
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
qdel(src)
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
qdel(src)
|
||||
if("suit")
|
||||
if (!( target.wear_suit ))
|
||||
qdel(src)
|
||||
if("uniform")
|
||||
if (!( target.w_uniform ))
|
||||
qdel(src)
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
qdel(src)
|
||||
if("syringe")
|
||||
return
|
||||
if("pill")
|
||||
return
|
||||
if("fuel")
|
||||
return
|
||||
if("drink")
|
||||
return
|
||||
if("dnainjector")
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
qdel(src)
|
||||
if("id")
|
||||
if ((!( target.wear_id ) || !( target.w_uniform )))
|
||||
qdel(src)
|
||||
if("splints")
|
||||
var/count = 0
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = target.organs_by_name[organ]
|
||||
if(o.status & ORGAN_SPLINTED)
|
||||
count = 1
|
||||
break
|
||||
if(count == 0)
|
||||
qdel(src)
|
||||
return
|
||||
if("sensor")
|
||||
if (! target.w_uniform )
|
||||
qdel(src)
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && (istype(target.back, /obj/item/weapon/tank) || istype(target.belt, /obj/item/weapon/tank) || istype(target.s_store, /obj/item/weapon/tank)) && !( target.internal )) ) && !( target.internal )))
|
||||
qdel(src)
|
||||
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel", "sensor", "internal", "tie")
|
||||
if ((item && !( L.Find(place) )))
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
qdel(src)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
|
||||
else
|
||||
|
||||
var/target_part = null
|
||||
var/obj/item/target_item = null
|
||||
var/message = null
|
||||
|
||||
switch(place)
|
||||
if("mask")
|
||||
target_part = "head"
|
||||
target_item = target.wear_mask
|
||||
if("l_hand")
|
||||
target_part = "left hand"
|
||||
target_item = target.l_hand
|
||||
if("r_hand")
|
||||
target_part = "right hand"
|
||||
target_item = target.r_hand
|
||||
if("gloves")
|
||||
target_part = "hands"
|
||||
target_item = target.gloves
|
||||
if("eyes")
|
||||
target_part = "eyes"
|
||||
target_item = target.glasses
|
||||
if("l_ear")
|
||||
target_part = "left ear"
|
||||
target_item = target.l_ear
|
||||
if("r_ear")
|
||||
target_part = "right ear"
|
||||
target_item = target.r_ear
|
||||
if("head")
|
||||
target_part = "head"
|
||||
target_item = target.head
|
||||
if("shoes")
|
||||
target_part = "feet"
|
||||
target_item = target.shoes
|
||||
if("belt")
|
||||
target_part = "waist"
|
||||
target_item = target.belt
|
||||
if("suit")
|
||||
target_part = "body"
|
||||
target_item = target.wear_suit
|
||||
if("back")
|
||||
target_part = "back"
|
||||
target_item = target.back
|
||||
if("s_store")
|
||||
target_part = "suit"
|
||||
target_item = target.s_store
|
||||
if("id")
|
||||
target_part = "uniform"
|
||||
target_item = target.wear_id
|
||||
|
||||
if("syringe")
|
||||
message = "\red <B>[source] is trying to inject [target]!</B>"
|
||||
if("pill")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow [item]!</B>"
|
||||
if("drink")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
|
||||
if("dnainjector")
|
||||
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
|
||||
if("uniform")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
if("handcuff")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unhandcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unhandcuff [target.name]'s ([target.ckey])</font>")
|
||||
message = "\red <B>[source] is trying to unhandcuff [target]!</B>"
|
||||
if("legcuff")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unlegcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unlegcuff [target.name]'s ([target.ckey])</font>")
|
||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if(suit.accessories.len)
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their accessory ([A]) removed by [source.name] ([source.ckey])</font>"
|
||||
source.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])</font>"
|
||||
if(istype(A, /obj/item/clothing/accessory/holobadge) || istype(A, /obj/item/clothing/accessory/medal))
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message("\red <B>[source] tears off \the [A] from [target]'s [suit]!</B>" , 1)
|
||||
done()
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [A] from [target]'s [suit]!</B>"
|
||||
if("pockets")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
|
||||
if("CPR")
|
||||
if (!target.cpr_time)
|
||||
qdel(src)
|
||||
target.cpr_time = 0
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("internal")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
|
||||
if (target.internal)
|
||||
message = "\red <B>[source] is trying to remove [target]'s internals</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
|
||||
if("splints")
|
||||
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
|
||||
if("sensor")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) sensors</font>")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if (suit.has_sensor >= 2)
|
||||
source << "The controls are locked."
|
||||
return
|
||||
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
|
||||
|
||||
if(target_item)
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their [target_item] removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) [target_item]</font>")
|
||||
|
||||
if(target_item.canremove)
|
||||
message = "<span class='danger'>[source] is trying to take off \a [target_item] from [target]'s [target_part]!</span>"
|
||||
else
|
||||
source.visible_message("<span class='danger'>[source] fails to take off \a [target_item] from [target]'s [target_part]!</span>")
|
||||
return
|
||||
|
||||
source.visible_message(message)
|
||||
|
||||
spawn( HUMAN_STRIP_DELAY )
|
||||
done()
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag.
|
||||
It works in conjuction with the process() above.
|
||||
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
|
||||
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
|
||||
The else statement is for equipping stuff to empty slots.
|
||||
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
|
||||
It can still be worn/put on as normal.
|
||||
*/
|
||||
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
|
||||
target.cpr_time = 1
|
||||
if(isanimal(source)) return //animals cannot strip people
|
||||
if(!source || !target) return //Target or source no longer exist
|
||||
if(source.loc != s_loc) return //source has moved
|
||||
if(target.loc != t_loc) return //target has moved
|
||||
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
|
||||
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
|
||||
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead
|
||||
|
||||
var/slot_to_process
|
||||
var/obj/item/strip_item //this will tell us which item we will be stripping - if any.
|
||||
|
||||
switch(place) //here we go again...
|
||||
if("mask")
|
||||
slot_to_process = slot_wear_mask
|
||||
if (target.wear_mask && target.wear_mask.canremove)
|
||||
strip_item = target.wear_mask
|
||||
if("gloves")
|
||||
slot_to_process = slot_gloves
|
||||
if (target.gloves && target.gloves.canremove)
|
||||
strip_item = target.gloves
|
||||
if("eyes")
|
||||
slot_to_process = slot_glasses
|
||||
if (target.glasses)
|
||||
strip_item = target.glasses
|
||||
if("belt")
|
||||
slot_to_process = slot_belt
|
||||
if (target.belt)
|
||||
strip_item = target.belt
|
||||
if("s_store")
|
||||
slot_to_process = slot_s_store
|
||||
if (target.s_store)
|
||||
strip_item = target.s_store
|
||||
if("head")
|
||||
slot_to_process = slot_head
|
||||
if (target.head && target.head.canremove)
|
||||
strip_item = target.head
|
||||
if("l_ear")
|
||||
slot_to_process = slot_l_ear
|
||||
if (target.l_ear)
|
||||
strip_item = target.l_ear
|
||||
if("r_ear")
|
||||
slot_to_process = slot_r_ear
|
||||
if (target.r_ear)
|
||||
strip_item = target.r_ear
|
||||
if("shoes")
|
||||
slot_to_process = slot_shoes
|
||||
if (target.shoes && target.shoes.canremove)
|
||||
strip_item = target.shoes
|
||||
if("l_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
qdel(src)
|
||||
slot_to_process = slot_l_hand
|
||||
if (target.l_hand)
|
||||
strip_item = target.l_hand
|
||||
if("r_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
qdel(src)
|
||||
slot_to_process = slot_r_hand
|
||||
if (target.r_hand)
|
||||
strip_item = target.r_hand
|
||||
if("uniform")
|
||||
slot_to_process = slot_w_uniform
|
||||
if(target.w_uniform && target.w_uniform.canremove)
|
||||
strip_item = target.w_uniform
|
||||
if("suit")
|
||||
slot_to_process = slot_wear_suit
|
||||
if (target.wear_suit && target.wear_suit.canremove)
|
||||
strip_item = target.wear_suit
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
//var/obj/item/clothing/accessory/tie = suit.hastie
|
||||
/*if(tie)
|
||||
if (istype(tie,/obj/item/clothing/accessory/storage))
|
||||
var/obj/item/clothing/accessory/storage/W = tie
|
||||
if (W.hold)
|
||||
W.hold.close(usr)
|
||||
usr.put_in_hands(tie)
|
||||
suit.hastie = null*/
|
||||
if(suit && suit.accessories.len)
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
A.on_removed(usr)
|
||||
suit.accessories -= A
|
||||
target.update_inv_w_uniform()
|
||||
if("id")
|
||||
slot_to_process = slot_wear_id
|
||||
if (target.wear_id)
|
||||
strip_item = target.wear_id
|
||||
if("back")
|
||||
slot_to_process = slot_back
|
||||
if (target.back)
|
||||
strip_item = target.back
|
||||
if("handcuff")
|
||||
slot_to_process = slot_handcuffed
|
||||
if (target.handcuffed)
|
||||
strip_item = target.handcuffed
|
||||
else if (source != target && ishuman(source))
|
||||
//check that we are still grabbing them
|
||||
var/grabbing = 0
|
||||
for (var/obj/item/weapon/grab/G in target.grabbed_by)
|
||||
if (G.loc == source && G.state >= GRAB_AGGRESSIVE)
|
||||
grabbing = 1
|
||||
break
|
||||
if (!grabbing)
|
||||
slot_to_process = null
|
||||
source << "\red Your grasp was broken before you could restrain [target]!"
|
||||
|
||||
if("legcuff")
|
||||
slot_to_process = slot_legcuffed
|
||||
if (target.legcuffed)
|
||||
strip_item = target.legcuffed
|
||||
if("splints")
|
||||
var/can_reach_splints = 1
|
||||
if(target.wear_suit && istype(target.wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/suit = target.wear_suit
|
||||
if(suit.supporting_limbs && suit.supporting_limbs.len)
|
||||
source << "You cannot remove the splints - [target]'s [suit] is supporting some of the breaks."
|
||||
can_reach_splints = 0
|
||||
|
||||
if(can_reach_splints)
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = target.get_organ(organ)
|
||||
if (o && o.status & ORGAN_SPLINTED)
|
||||
var/obj/item/W = new /obj/item/stack/medical/splint(amount=1)
|
||||
o.status &= ~ORGAN_SPLINTED
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
if("CPR")
|
||||
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
|
||||
var/suff = min(target.getOxyLoss(), 5) //Pre-merge level, less healing, more prevention of dieing.
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] performs CPR on [target]!", 1)
|
||||
target << "\blue <b>You feel a breath of fresh air enter your lungs. It feels good.</b>"
|
||||
source << "\red Repeat at least every 7 seconds."
|
||||
if("dnainjector")
|
||||
var/obj/item/weapon/dnainjector/S = item
|
||||
if(S)
|
||||
S.add_fingerprint(source)
|
||||
if (!( istype(S, /obj/item/weapon/dnainjector) ))
|
||||
S.inuse = 0
|
||||
qdel(src)
|
||||
S.inject(target, source)
|
||||
if (S.s_time >= world.time + 30)
|
||||
S.inuse = 0
|
||||
qdel(src)
|
||||
S.s_time = world.time
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
|
||||
S.inuse = 0
|
||||
if("pockets")
|
||||
if (!item || (target.l_store && target.r_store)) // Only empty pockets when hand is empty or both pockets are full
|
||||
slot_to_process = slot_l_store
|
||||
strip_item = target.l_store //We'll do both
|
||||
else if (target.l_store)
|
||||
slot_to_process = slot_r_store
|
||||
else
|
||||
slot_to_process = slot_l_store
|
||||
if("sensor")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if (suit)
|
||||
if(suit.has_sensor >= 2)
|
||||
source << "The controls are locked."
|
||||
else
|
||||
suit.set_sensors(source)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal0"
|
||||
else
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
else if (istype(target.s_store, /obj/item/weapon/tank))
|
||||
target.internal = target.s_store
|
||||
else if (istype(target.belt, /obj/item/weapon/tank))
|
||||
target.internal = target.belt
|
||||
if (target.internal)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
M.show_message("[target] is now running on internals.", 1)
|
||||
target.internal.add_fingerprint(source)
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal1"
|
||||
if(slot_to_process)
|
||||
if(strip_item) //Stripping an item from the mob
|
||||
if(strip_item.mob_can_unequip(target, slot_to_process, 0))
|
||||
target.drop_from_inventory(strip_item)
|
||||
source.put_in_hands(strip_item)
|
||||
strip_item.add_fingerprint(source)
|
||||
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
|
||||
if(target.r_store)
|
||||
target.drop_from_inventory(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
|
||||
else
|
||||
source << "<span class='warning'>You fail to remove \the [strip_item] from [target]!</span>"
|
||||
else if(item)
|
||||
if(target.has_organ_for_slot(slot_to_process) && item.mob_can_equip(target, slot_to_process, 0)) //Placing an item on the mob
|
||||
source.drop_from_inventory(item)
|
||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||
else
|
||||
source << "<span class='warning'>You fail to place \the [item] on [target]!</span>"
|
||||
|
||||
if(source && target)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
qdel(src)
|
||||
@@ -859,10 +859,16 @@
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
var/alien = 0
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
reagents.metabolize(src,alien)
|
||||
touching.metabolize(alien, CHEM_TOUCH)
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
var/total_phoronloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
@@ -951,9 +957,6 @@
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
// the analgesic effect wears off slowly
|
||||
analgesic = max(0, analgesic - 1)
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
Paralyse(3)
|
||||
@@ -989,6 +992,7 @@
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
animate_tail_reset()
|
||||
if(halloss > 0)
|
||||
adjustHalLoss(-3)
|
||||
else if(sleeping)
|
||||
@@ -1003,6 +1007,7 @@
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
animate_tail_reset()
|
||||
if( prob(2) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
@@ -1257,7 +1262,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(healths)
|
||||
if (analgesic)
|
||||
if (analgesic > 100)
|
||||
healths.icon_state = "health_health_numb"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
@@ -1449,7 +1454,7 @@
|
||||
handle_shock()
|
||||
..()
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
|
||||
if(species && species.flags & NO_PAIN) return
|
||||
|
||||
if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
@@ -54,6 +54,25 @@
|
||||
var/datum/language/species_language = all_languages[default_language]
|
||||
return species_language.get_random_name(gender)
|
||||
|
||||
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
|
||||
if(!H.back)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_back)
|
||||
H.internal = H.back
|
||||
else if(!H.r_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_r_hand)
|
||||
H.internal = H.r_hand
|
||||
else if (!H.l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_l_hand)
|
||||
H.internal = H.l_hand
|
||||
H.internals.icon_state = "internal1"
|
||||
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H.back), slot_in_backpack)
|
||||
|
||||
|
||||
/datum/species/vox/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
|
||||
if(!H.mind || !H.mind.special_role) // Pariah check.
|
||||
return 0
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
var/blood_color = "#A10808" // Red.
|
||||
var/flesh_color = "#FFC896" // Pink.
|
||||
var/base_color // Used by changelings. Should also be used for icon previes..
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
var/tail // Name of tail state in species effects icon file.
|
||||
var/tail_animation // If set, the icon to obtain tail animation states from.
|
||||
var/race_key = 0 // Used for mob icon cache string.
|
||||
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
|
||||
var/is_small
|
||||
@@ -174,6 +175,12 @@
|
||||
return "unknown"
|
||||
return species_language.get_random_name(gender)
|
||||
|
||||
/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
|
||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||
|
||||
for(var/obj/item/organ/organ in H.contents)
|
||||
@@ -259,10 +266,6 @@
|
||||
/datum/species/proc/build_hud(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
// Grabs the window recieved when you click-drag someone onto you.
|
||||
/datum/species/proc/get_inventory_dialogue(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
//Used by xenos understanding larvae and dionaea understanding nymphs.
|
||||
/datum/species/proc/can_understand(var/mob/other)
|
||||
return
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
// to be drawn for the mob. This is fairly delicate, try to avoid messing with it
|
||||
// unless you know exactly what it does.
|
||||
var/list/gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"mask" = list("loc" = ui_mask, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"gloves" = list("loc" = ui_gloves, "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
|
||||
"eyes" = list("loc" = ui_glasses, "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_l_ear, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"r_ear" = list("loc" = ui_r_ear, "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_head, "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"shoes" = list("loc" = ui_shoes, "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
|
||||
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
)
|
||||
|
||||
/datum/hud_data/New()
|
||||
@@ -55,20 +55,20 @@
|
||||
/datum/hud_data/diona
|
||||
has_internals = 0
|
||||
gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_shoes, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"l_ear" = list("loc" = ui_gloves, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_oclothing, "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"l_ear" = list("loc" = ui_gloves, "name" = "Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_oclothing, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
)
|
||||
|
||||
/datum/hud_data/monkey
|
||||
gear = list(
|
||||
"mask" = list("loc" = ui_shoes, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"mask" = list("loc" = ui_shoes, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
)
|
||||
@@ -29,6 +29,20 @@
|
||||
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/slime),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/slime),
|
||||
"head" = list("path" = /obj/item/organ/external/head/slime),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/slime),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/slime),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/slime),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/slime),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/slime),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/slime),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/slime),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/slime)
|
||||
)
|
||||
|
||||
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
|
||||
spawn(1)
|
||||
if(H)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_lizard.dmi'
|
||||
language = "Sinta'unathi"
|
||||
tail = "sogtail"
|
||||
tail_animation = 'icons/mob/species/unathi/tail.dmi'
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
|
||||
primitive_form = "Stok"
|
||||
darksight = 3
|
||||
@@ -59,6 +60,10 @@
|
||||
"Your scales bristle against the cold."
|
||||
)
|
||||
|
||||
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
|
||||
|
||||
/datum/species/tajaran
|
||||
name = "Tajara"
|
||||
name_plural = "Tajaran"
|
||||
@@ -66,6 +71,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
|
||||
language = "Siik'tajr"
|
||||
tail = "tajtail"
|
||||
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
|
||||
darksight = 8
|
||||
slowdown = -1
|
||||
@@ -100,6 +106,10 @@
|
||||
)
|
||||
cold_discomfort_level = 275
|
||||
|
||||
/datum/species/tajaran/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
name_plural = "Skrell"
|
||||
@@ -198,6 +208,12 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/species/diona/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H.back), slot_in_backpack)
|
||||
|
||||
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.gender = NEUTER
|
||||
return ..()
|
||||
@@ -251,6 +267,8 @@
|
||||
|
||||
has_organ = list() //TODO: Positronic brain.
|
||||
|
||||
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
|
||||
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
if(flags & IS_SYNTHETIC)
|
||||
|
||||
@@ -54,8 +54,10 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
user << "\red \b It looks like the proboscis has been removed."
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attackby()
|
||||
Die()
|
||||
/obj/item/clothing/mask/facehugger/attackby(obj/item/I, mob/user)
|
||||
if(I.force)
|
||||
user.do_attack_animation(src)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/bullet_act()
|
||||
@@ -63,7 +65,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
if(exposed_temperature > T0C+80)
|
||||
Die()
|
||||
return
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
else
|
||||
if(istype(O, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = O
|
||||
if(W.material.unmeltable)
|
||||
if(W.material.flags & MATERIAL_UNMELTABLE)
|
||||
cannot_melt = 1
|
||||
else if(istype(O, /turf/simulated/floor/engine))
|
||||
cannot_melt = 1
|
||||
@@ -210,7 +210,7 @@
|
||||
visible_message("<span class='warning'><B>[src] vomits up a thick purple substance and begins to shape it!</B></span>", "<span class='alium'>You shape a [choice].</span>")
|
||||
switch(choice)
|
||||
if("resin door")
|
||||
new /obj/structure/mineral_door/resin(loc)
|
||||
new /obj/structure/simple_door/resin(loc)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
|
||||
@@ -303,8 +303,8 @@
|
||||
has_internals = 0
|
||||
|
||||
gear = list(
|
||||
"o_clothing" = list("loc" = ui_belt, "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
|
||||
"head" = list("loc" = ui_id, "slot" = slot_head, "state" = "hair"),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"o_clothing" = list("loc" = ui_belt, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
|
||||
"head" = list("loc" = ui_id, "name" = "Hat", "slot" = slot_head, "state" = "hair"),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
)
|
||||
@@ -47,42 +47,3 @@ Des: Removes all infected images from the alien.
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/* TODO: Convert this over.
|
||||
/mob/living/carbon/human/alien/show_inv(mob/user as mob)
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[name];size=340x480"))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
*/
|
||||
|
||||
/* TODO: Convert this over.
|
||||
/mob/living/carbon/human/alien/queen/large
|
||||
icon = 'icons/mob/alienqueen.dmi'
|
||||
icon_state = "queen_s"
|
||||
pixel_x = -16
|
||||
|
||||
/mob/living/carbon/human/alien/queen/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "queen_sleep"
|
||||
else icon_state = "queen_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
icon_state = "queen_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I*/
|
||||
@@ -0,0 +1,158 @@
|
||||
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
|
||||
|
||||
if(!slot_to_strip || !istype(user))
|
||||
return
|
||||
|
||||
var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip))
|
||||
|
||||
switch(slot_to_strip)
|
||||
// Handle things that are part of this interface but not removing/replacing a given item.
|
||||
if("pockets")
|
||||
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
empty_pockets(user)
|
||||
return
|
||||
if("splints")
|
||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s splints!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
remove_splints(user)
|
||||
return
|
||||
if("sensors")
|
||||
visible_message("<span class='danger'>\The [user] is trying to set \the [src]'s sensors!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
toggle_sensors(user)
|
||||
return
|
||||
if("internals")
|
||||
visible_message("<span class='danger'>\The [usr] is trying to set \the [src]'s internals!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
toggle_internals(user)
|
||||
return
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = w_uniform
|
||||
if(!istype(suit) || !suit.accessories.len)
|
||||
return
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
if(!istype(A))
|
||||
return
|
||||
visible_message("<span class='danger'>\The [usr] is trying to remove \the [src]'s [A.name]!</span>")
|
||||
|
||||
if(!do_after(user,HUMAN_STRIP_DELAY))
|
||||
return
|
||||
|
||||
if(!A || suit.loc != src || !(A in suit.accessories))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
|
||||
user.visible_message("<span class='danger'>\The [user] tears off \the [A] from [src]'s [suit.name]!</span>")
|
||||
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [A] removed by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [A.name]</font>"
|
||||
A.on_removed(user)
|
||||
suit.accessories -= A
|
||||
update_inv_w_uniform()
|
||||
return
|
||||
|
||||
// Are we placing or stripping?
|
||||
var/stripping
|
||||
var/obj/item/held = user.get_active_hand()
|
||||
if(!istype(held) || is_robot_module(held))
|
||||
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
|
||||
return
|
||||
if(!target_slot.canremove)
|
||||
user << "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>"
|
||||
stripping = 1
|
||||
|
||||
if(stripping)
|
||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
|
||||
|
||||
if(!do_after(user,HUMAN_STRIP_DELAY))
|
||||
return
|
||||
|
||||
if(!stripping && user.get_active_hand() != held)
|
||||
return
|
||||
|
||||
if(stripping)
|
||||
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [target_slot] removed by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [target_slot.name]</font>"
|
||||
drop_from_inventory(target_slot)
|
||||
else
|
||||
user.drop_from_inventory(held)
|
||||
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
|
||||
if(held.loc != src)
|
||||
user.put_in_hands(held)
|
||||
|
||||
// Empty out everything in the target's pockets.
|
||||
/mob/living/carbon/human/proc/empty_pockets(var/mob/living/user)
|
||||
if(!r_store && !l_store)
|
||||
user << "<span class='warning'>\The [src] has nothing in their pockets.</span>"
|
||||
return
|
||||
if(r_store)
|
||||
drop_from_inventory(r_store)
|
||||
if(l_store)
|
||||
drop_from_inventory(l_store)
|
||||
visible_message("<span class='danger'>\The [user] empties \the [src]'s pockets!</span>")
|
||||
|
||||
// Modify the current target sensor level.
|
||||
/mob/living/carbon/human/proc/toggle_sensors(var/mob/living/user)
|
||||
var/obj/item/clothing/under/suit = w_uniform
|
||||
if(!suit)
|
||||
user << "<span class='warning'>\The [src] is not wearing a suit with sensors.</span>"
|
||||
return
|
||||
if (suit.has_sensor >= 2)
|
||||
user << "<span class='warning'>\The [src]'s suit sensor controls are locked.</span>"
|
||||
return
|
||||
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [name]'s ([ckey]) sensors</font>")
|
||||
suit.set_sensors(user)
|
||||
|
||||
// Remove all splints.
|
||||
/mob/living/carbon/human/proc/remove_splints(var/mob/living/user)
|
||||
|
||||
var/can_reach_splints = 1
|
||||
if(istype(wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/suit = wear_suit
|
||||
if(suit.supporting_limbs && suit.supporting_limbs.len)
|
||||
user << "<span class='warning'>You cannot remove the splints - [src]'s [suit] is supporting some of the breaks.</span>"
|
||||
can_reach_splints = 0
|
||||
|
||||
if(can_reach_splints)
|
||||
var/removed_splint
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = get_organ(organ)
|
||||
if (o && o.status & ORGAN_SPLINTED)
|
||||
var/obj/item/W = new /obj/item/stack/medical/splint(get_turf(src), 1)
|
||||
o.status &= ~ORGAN_SPLINTED
|
||||
W.add_fingerprint(user)
|
||||
removed_splint = 1
|
||||
if(removed_splint)
|
||||
visible_message("<span class='danger'>\The [user] removes \the [src]'s splints!</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] has no splints to remove.</span>"
|
||||
|
||||
// Set internals on or off.
|
||||
/mob/living/carbon/human/proc/toggle_internals(var/mob/living/user)
|
||||
if(internal)
|
||||
internal.add_fingerprint(user)
|
||||
internal = null
|
||||
if(internals)
|
||||
internals.icon_state = "internal0"
|
||||
else
|
||||
// Check for airtight mask/helmet.
|
||||
if(!(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space)))
|
||||
return
|
||||
// Find an internal source.
|
||||
if(istype(back, /obj/item/weapon/tank))
|
||||
internal = back
|
||||
else if(istype(s_store, /obj/item/weapon/tank))
|
||||
internal = s_store
|
||||
else if(istype(belt, /obj/item/weapon/tank))
|
||||
internal = belt
|
||||
|
||||
if(internal)
|
||||
visible_message("<span class='warning'>\The [src] is now running on internals!</span>")
|
||||
internal.add_fingerprint(user)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] disables \the [src]'s internals!</span>")
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone]
|
||||
*/
|
||||
var/global/list/human_icon_cache = list()
|
||||
var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin]
|
||||
var/global/list/light_overlay_cache = list()
|
||||
|
||||
///////////////////////
|
||||
@@ -330,7 +331,7 @@ var/global/list/damage_icon_parts = list()
|
||||
overlays_standing[HAIR_LAYER] = null
|
||||
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if( !head_organ || (head_organ.status & ORGAN_DESTROYED) )
|
||||
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
@@ -468,7 +469,7 @@ var/global/list/damage_icon_parts = list()
|
||||
under_icon = w_uniform.item_icons[slot_w_uniform_str]
|
||||
else
|
||||
under_icon = INV_W_UNIFORM_DEF_ICON
|
||||
|
||||
|
||||
//determine state to use
|
||||
var/under_state
|
||||
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
|
||||
@@ -480,7 +481,7 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
//need to append _s to the icon state for legacy compatibility
|
||||
var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s")
|
||||
|
||||
|
||||
//apply blood overlay
|
||||
if(w_uniform.blood_DNA)
|
||||
var/image/bloodsies = image(icon = species.blood_mask, icon_state = "uniformblood")
|
||||
@@ -491,15 +492,14 @@ var/global/list/damage_icon_parts = list()
|
||||
var/obj/item/clothing/under/under = w_uniform
|
||||
if(under.accessories.len)
|
||||
for(var/obj/item/clothing/accessory/A in under.accessories)
|
||||
var/accessory_state = A.overlay_state? A.overlay_state : A.icon_state
|
||||
standing.overlays += image(icon = INV_ACCESSORIES_DEF_ICON, icon_state = accessory_state)
|
||||
standing.overlays |= A.get_inv_mob_overlay()
|
||||
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
|
||||
if(wear_id)
|
||||
@@ -754,7 +754,7 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
back.screen_loc = ui_back //TODO
|
||||
|
||||
|
||||
//determine the icon to use
|
||||
var/icon/overlay_icon
|
||||
if(back.icon_override)
|
||||
@@ -769,7 +769,7 @@ var/global/list/damage_icon_parts = list()
|
||||
overlay_icon = back.item_icons[slot_back_str]
|
||||
else
|
||||
overlay_icon = INV_BACK_DEF_ICON
|
||||
|
||||
|
||||
//determine state to use
|
||||
var/overlay_state
|
||||
if(back.item_state_slots && back.item_state_slots[slot_back_str])
|
||||
@@ -778,13 +778,13 @@ var/global/list/damage_icon_parts = list()
|
||||
overlay_state = back.item_state
|
||||
else
|
||||
overlay_state = back.icon_state
|
||||
|
||||
|
||||
//create the image
|
||||
overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state)
|
||||
else
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
|
||||
if(update_icons)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -822,15 +822,6 @@ var/global/list/damage_icon_parts = list()
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(r_hand.icon_override)
|
||||
t_icon = r_hand.icon_override
|
||||
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||
else
|
||||
t_icon = INV_R_HAND_DEF_ICON
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
|
||||
@@ -839,7 +830,17 @@ var/global/list/damage_icon_parts = list()
|
||||
t_state = r_hand.item_state
|
||||
else
|
||||
t_state = r_hand.icon_state
|
||||
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(r_hand.icon_override)
|
||||
t_state += "_r"
|
||||
t_icon = r_hand.icon_override
|
||||
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||
else
|
||||
t_icon = INV_R_HAND_DEF_ICON
|
||||
|
||||
overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
|
||||
if (handcuffed) drop_r_hand() //this should be moved out of icon code
|
||||
@@ -853,15 +854,6 @@ var/global/list/damage_icon_parts = list()
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(l_hand.icon_override)
|
||||
t_icon = l_hand.icon_override
|
||||
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||
else
|
||||
t_icon = INV_L_HAND_DEF_ICON
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
|
||||
@@ -870,7 +862,17 @@ var/global/list/damage_icon_parts = list()
|
||||
t_state = l_hand.item_state
|
||||
else
|
||||
t_state = l_hand.icon_state
|
||||
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(l_hand.icon_override)
|
||||
t_state += "_l"
|
||||
t_icon = l_hand.icon_override
|
||||
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||
else
|
||||
t_icon = INV_L_HAND_DEF_ICON
|
||||
|
||||
overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
|
||||
if (handcuffed) drop_l_hand() //This probably should not be here
|
||||
@@ -882,13 +884,81 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail)
|
||||
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)
|
||||
if(species.tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL))
|
||||
var/icon/tail_s = get_tail_icon()
|
||||
overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species.tail]_s")
|
||||
animate_tail_reset(0)
|
||||
|
||||
overlays_standing[TAIL_LAYER] = image(tail_s)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/get_tail_icon()
|
||||
var/icon_key = "[species.race_key][r_skin][g_skin][b_skin]"
|
||||
|
||||
var/icon/tail_icon = tail_icon_cache[icon_key]
|
||||
if(!tail_icon)
|
||||
|
||||
//generate a new one
|
||||
tail_icon = new/icon(icon = (species.tail_animation? species.tail_animation : 'icons/effects/species.dmi'))
|
||||
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
tail_icon_cache[icon_key] = tail_icon
|
||||
|
||||
return tail_icon
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/set_tail_state(var/t_state)
|
||||
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
|
||||
|
||||
if(tail_overlay && species.tail_animation)
|
||||
tail_overlay.icon_state = t_state
|
||||
return tail_overlay
|
||||
return null
|
||||
|
||||
//Not really once, since BYOND can't do that.
|
||||
//Update this if the ability to flick() images or make looping animation start at the first frame is ever added.
|
||||
/mob/living/carbon/human/proc/animate_tail_once(var/update_icons=1)
|
||||
var/t_state = "[species.tail]_once"
|
||||
|
||||
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
|
||||
if(tail_overlay && tail_overlay.icon_state == t_state)
|
||||
return //let the existing animation finish
|
||||
|
||||
tail_overlay = set_tail_state(t_state)
|
||||
if(tail_overlay)
|
||||
spawn(15)
|
||||
//check that the animation hasn't changed in the meantime
|
||||
if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state)
|
||||
animate_tail_stop()
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_slow[rand(0,9)]")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_loop[rand(0,9)]")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_reset(var/update_icons=1)
|
||||
if(stat != DEAD)
|
||||
set_tail_state("[species.tail]_idle[rand(0,9)]")
|
||||
else
|
||||
set_tail_state("[species.tail]_static")
|
||||
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_static")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -82,8 +82,18 @@
|
||||
return temp_change
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
|
||||
create_reagents(100)
|
||||
|
||||
src.colour = colour
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
@@ -398,9 +396,6 @@
|
||||
/mob/living/carbon/slime/var/co2overloadtime = null
|
||||
/mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/slime/show_inv(mob/user)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/toggle_throw_mode()
|
||||
return
|
||||
|
||||
@@ -413,14 +408,6 @@
|
||||
adjustToxLoss(-10)
|
||||
nutrition = max(nutrition, get_max_nutrition())
|
||||
|
||||
/mob/living/carbon/slime/proc/apply_water(var/amount)
|
||||
adjustToxLoss(15 + amount)
|
||||
if (!client)
|
||||
if (Target) // Like cats
|
||||
Target = null
|
||||
++Discipline
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/can_use_vents()
|
||||
if(Victim)
|
||||
return "You cannot ventcrawl while feeding."
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
del(handcuffed)
|
||||
qdel(handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
del(legcuffed)
|
||||
qdel(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
|
||||
|
||||
@@ -13,24 +13,11 @@
|
||||
1.5 * src.getFireLoss() + \
|
||||
1.2 * src.getBruteLoss() + \
|
||||
1.7 * src.getCloneLoss() + \
|
||||
2 * src.halloss
|
||||
2 * src.halloss + \
|
||||
-1 * src.analgesic
|
||||
|
||||
if(reagents.has_reagent("alkysine"))
|
||||
src.traumatic_shock -= 10
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
src.traumatic_shock -= 25
|
||||
if(reagents.has_reagent("synaptizine"))
|
||||
src.traumatic_shock -= 40
|
||||
if(reagents.has_reagent("paracetamol"))
|
||||
src.traumatic_shock -= 50
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
src.traumatic_shock -= 80
|
||||
if(reagents.has_reagent("oxycodone"))
|
||||
src.traumatic_shock -= 200
|
||||
if(src.slurring)
|
||||
src.traumatic_shock -= 20
|
||||
if(src.analgesic)
|
||||
src.traumatic_shock = 0
|
||||
|
||||
// broken or ripped off organs will add quite a bit of pain
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
|
||||
@@ -777,20 +777,3 @@ default behaviour is:
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/proc/spin(spintime, speed)
|
||||
spawn()
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
set_dir(D)
|
||||
spintime -= speed
|
||||
return
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
spawn(1) updatehealth()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -265,6 +265,13 @@
|
||||
return 0
|
||||
else if(istype(card.loc,/mob))
|
||||
var/mob/holder = card.loc
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
for(var/obj/item/organ/external/affecting in H.organs)
|
||||
if(affecting.hidden == card)
|
||||
affecting.take_damage(rand(30,50))
|
||||
H.visible_message("<span class='danger'>\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!</span>")
|
||||
break
|
||||
holder.drop_from_inventory(card)
|
||||
else if(istype(card.loc,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/holder = card.loc
|
||||
|
||||
@@ -125,16 +125,12 @@
|
||||
|
||||
var/data[0]
|
||||
// This is dumb, but NanoUI breaks if it has no data to send
|
||||
data["a"] = "a"
|
||||
|
||||
if(ui)
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
data["manifest"] = list("__json_cache" = ManifestJSON)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||
if(!ui)
|
||||
// Don't copy-paste this unless you're making a pAI software module!
|
||||
ui = new(user, user, id, "pai_manifest.tmpl", "Crew Manifest", 450, 600)
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
@@ -499,7 +495,6 @@
|
||||
if(!ui)
|
||||
// Don't copy-paste this unless you're making a pAI software module!
|
||||
ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150)
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
/obj/item/weapon/module/power_control,
|
||||
/obj/item/weapon/stock_parts,
|
||||
/obj/item/frame,
|
||||
/obj/item/weapon/table_parts,
|
||||
/obj/item/weapon/table_parts/rack,
|
||||
/obj/item/weapon/camera_assembly,
|
||||
/obj/item/weapon/tank,
|
||||
/obj/item/weapon/circuitboard,
|
||||
@@ -94,7 +92,7 @@
|
||||
icon_state = "gripper-sheet"
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/stack/sheet
|
||||
/obj/item/stack/material
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/attack_self(mob/user as mob)
|
||||
@@ -330,10 +328,10 @@
|
||||
else if(istype(W,/obj/item/ammo_casing))
|
||||
if(metal)
|
||||
metal.add_charge(1000)
|
||||
else if(istype(W,/obj/item/weapon/shard/shrapnel))
|
||||
else if(istype(W,/obj/item/weapon/material/shard/shrapnel))
|
||||
if(metal)
|
||||
metal.add_charge(1000)
|
||||
else if(istype(W,/obj/item/weapon/shard))
|
||||
else if(istype(W,/obj/item/weapon/material/shard))
|
||||
if(glass)
|
||||
glass.add_charge(1000)
|
||||
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
|
||||
@@ -1068,8 +1068,9 @@
|
||||
if(cell.charge == 0)
|
||||
return 0
|
||||
|
||||
if(cell.use(amount * CELLRATE * CYBORG_POWER_USAGE_MULTIPLIER))
|
||||
used_power_this_tick += amount * CYBORG_POWER_USAGE_MULTIPLIER
|
||||
var/power_use = amount * CYBORG_POWER_USAGE_MULTIPLIER
|
||||
if(cell.checked_use(CELLRATE * power_use))
|
||||
used_power_this_tick += power_use
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
for(var/obj/I in contents)
|
||||
for(var/mob/M in I.contents)
|
||||
M.death()
|
||||
if(istype(I,/obj/item/stack/sheet))//Only deconsturcts one sheet at a time instead of the entire stack
|
||||
var/obj/item/stack/sheet/S = I
|
||||
if(istype(I,/obj/item/stack/material))//Only deconsturcts one sheet at a time instead of the entire stack
|
||||
var/obj/item/stack/material/S = I
|
||||
if(S.get_amount() > 1)
|
||||
S.use(1)
|
||||
loaded_item = S
|
||||
@@ -129,7 +129,10 @@
|
||||
return
|
||||
if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/T = target
|
||||
T.harvest(user)
|
||||
if(T.harvest) //Try to harvest, assuming it's alive.
|
||||
T.harvest(user)
|
||||
else if(T.dead) //It's probably dead otherwise.
|
||||
T.remove_dead(user)
|
||||
else
|
||||
user << "Harvesting \a [target] is not the purpose of this tool. The [src] is for plants being grown."
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
@@ -310,7 +310,7 @@ var/global/list/robot_modules = list(
|
||||
synths += plasteel
|
||||
synths += glass
|
||||
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/steel/M = new (src)
|
||||
M.synths = list(metal)
|
||||
src.modules += M
|
||||
|
||||
@@ -318,11 +318,11 @@ var/global/list/robot_modules = list(
|
||||
R.synths = list(metal)
|
||||
src.modules += R
|
||||
|
||||
var/obj/item/stack/sheet/plasteel/cyborg/S = new /obj/item/stack/sheet/plasteel/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/plasteel/S = new (src)
|
||||
S.synths = list(plasteel)
|
||||
src.modules += S
|
||||
|
||||
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
|
||||
RG.synths = list(metal, glass)
|
||||
src.modules += RG
|
||||
|
||||
@@ -356,11 +356,11 @@ var/global/list/robot_modules = list(
|
||||
MD.glass = glass
|
||||
src.modules += MD
|
||||
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/steel/M = new (src)
|
||||
M.synths = list(metal)
|
||||
src.modules += M
|
||||
|
||||
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/glass/G = new (src)
|
||||
G.synths = list(glass)
|
||||
src.modules += G
|
||||
|
||||
@@ -376,7 +376,7 @@ var/global/list/robot_modules = list(
|
||||
S.synths = list(metal)
|
||||
src.modules += S
|
||||
|
||||
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
|
||||
RG.synths = list(metal, glass)
|
||||
src.modules += RG
|
||||
|
||||
@@ -484,8 +484,8 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/gripper/service(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
|
||||
src.modules += new /obj/item/weapon/minihoe(src)
|
||||
src.modules += new /obj/item/weapon/hatchet(src)
|
||||
src.modules += new /obj/item/weapon/material/minihoe(src)
|
||||
src.modules += new /obj/item/weapon/material/hatchet(src)
|
||||
src.modules += new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/plants(src)
|
||||
src.modules += new /obj/item/weapon/robot_harvester(src)
|
||||
@@ -494,7 +494,7 @@ var/global/list/robot_modules = list(
|
||||
M.stored_matter = 30
|
||||
src.modules += M
|
||||
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
|
||||
|
||||
var/obj/item/weapon/flame/lighter/zippo/L = new /obj/item/weapon/flame/lighter/zippo(src)
|
||||
L.lit = 1
|
||||
@@ -676,11 +676,11 @@ var/global/list/robot_modules = list(
|
||||
MD.plastic = plastic
|
||||
src.modules += MD
|
||||
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/steel/M = new (src)
|
||||
M.synths = list(metal)
|
||||
src.modules += M
|
||||
|
||||
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/glass/G = new (src)
|
||||
G.synths = list(glass)
|
||||
src.modules += G
|
||||
|
||||
@@ -696,7 +696,7 @@ var/global/list/robot_modules = list(
|
||||
S.synths = list(metal)
|
||||
src.modules += S
|
||||
|
||||
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
|
||||
RG.synths = list(metal, glass)
|
||||
src.modules += RG
|
||||
|
||||
@@ -704,11 +704,11 @@ var/global/list/robot_modules = list(
|
||||
WT.synths = list(wood)
|
||||
src.modules += WT
|
||||
|
||||
var/obj/item/stack/sheet/wood/cyborg/W = new /obj/item/stack/sheet/wood/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/wood/W = new (src)
|
||||
W.synths = list(wood)
|
||||
src.modules += W
|
||||
|
||||
var/obj/item/stack/sheet/mineral/plastic/cyborg/P = new /obj/item/stack/sheet/mineral/plastic/cyborg(src)
|
||||
var/obj/item/stack/material/cyborg/plastic/P = new (src)
|
||||
P.synths = list(plastic)
|
||||
src.modules += P
|
||||
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
if(src.Adjacent(C))
|
||||
choices += C
|
||||
|
||||
if(!choices.len)
|
||||
src << "There are no viable hosts within range..."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
|
||||
|
||||
if(!M || !src) return
|
||||
|
||||
@@ -228,6 +228,23 @@
|
||||
icon_dead = "kitten_dead"
|
||||
gender = NEUTER
|
||||
|
||||
// Leaving this here for now.
|
||||
/obj/item/weapon/holder/cat/fluff/bones
|
||||
name = "Bones"
|
||||
desc = "It's Bones! Meow."
|
||||
gender = MALE
|
||||
icon_state = "cat3"
|
||||
|
||||
/mob/living/simple_animal/cat/fluff/bones
|
||||
name = "Bones"
|
||||
desc = "That's Bones the cat. He's a laid back, black cat. Meow."
|
||||
gender = MALE
|
||||
icon_state = "cat3"
|
||||
icon_living = "cat3"
|
||||
icon_dead = "cat3_dead"
|
||||
holder_type = /obj/item/weapon/holder/cat/fluff/bones
|
||||
var/friend_name = "Erstatz Vryroxes"
|
||||
|
||||
/mob/living/simple_animal/cat/kitten/New()
|
||||
gender = pick(MALE, FEMALE)
|
||||
..()
|
||||
|
||||
@@ -40,240 +40,3 @@
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "stomps"
|
||||
|
||||
//LOOK AT THIS - ..()??
|
||||
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
if(prob(50))
|
||||
user << "\red \b This kills the crab."
|
||||
health -= 20
|
||||
death()
|
||||
else
|
||||
GetMad()
|
||||
get
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
if(health < maxHealth)
|
||||
if(MED.amount >= 1)
|
||||
health = min(maxHealth, health + MED.heal_brute)
|
||||
MED.amount -= 1
|
||||
if(MED.amount <= 0)
|
||||
qdel(MED)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\blue [user] applies the [MED] on [src]")
|
||||
else
|
||||
user << "\blue this [src] is dead, medical items won't bring it back to life."
|
||||
else
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
/mob/living/simple_animal/crab/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
name = real_name
|
||||
desc = initial(desc)
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
desc = "Free crabs!"
|
||||
src.sd_set_light(0)
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
usr << "\red It's is already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
//Many hats added, Some will probably be removed, just want to see which ones are popular.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/head/helmet,
|
||||
/obj/item/clothing/glasses/sunglasses,
|
||||
/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/collectable/captain,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/collectable/kitty,
|
||||
/obj/item/clothing/head/rabbitears,
|
||||
/obj/item/clothing/head/collectable/rabbitears,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/collectable/beret,
|
||||
/obj/item/clothing/head/det_hat,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/pirate,
|
||||
/obj/item/clothing/head/collectable/pirate,
|
||||
/obj/item/clothing/head/chefhat,
|
||||
/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/wizard/fake,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/collectable/wizard,
|
||||
/obj/item/clothing/head/hardhat,
|
||||
/obj/item/clothing/head/collectable/hardhat,
|
||||
/obj/item/clothing/head/hardhat/white,
|
||||
/obj/item/weapon/bedsheet,
|
||||
/obj/item/clothing/head/soft
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red It doesn't seem too keen on wearing that item."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_head = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
|
||||
|
||||
|
||||
switch(inventory_head && inventory_head.type)
|
||||
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
|
||||
name = "Captain [real_name]"
|
||||
desc = "Probably better than the last captain."
|
||||
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
|
||||
name = "Runtime"
|
||||
emote_see = list("coughs up a furball", "stretches")
|
||||
emote_hear = list("purrs")
|
||||
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
|
||||
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
|
||||
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
|
||||
name = "Hoppy"
|
||||
emote_see = list("twitches its nose", "hops around a bit")
|
||||
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
|
||||
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
|
||||
name = "Yann"
|
||||
desc = "Mon dieu! C'est un chien!"
|
||||
speak = list("le woof!", "le bark!", "JAPPE!!")
|
||||
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of /him")
|
||||
if(/obj/item/clothing/head/det_hat)
|
||||
name = "Detective [real_name]"
|
||||
desc = "[name] sees through your lies..."
|
||||
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
|
||||
if(/obj/item/clothing/head/nursehat)
|
||||
name = "Nurse [real_name]"
|
||||
desc = "[name] needs 100cc of beef jerky...STAT!"
|
||||
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
|
||||
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
|
||||
desc = "Yaarghh!! Thar' be a scurvy dog!"
|
||||
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
|
||||
emote_hear = list("growls ferociously", "snarls")
|
||||
speak = list("Arrrrgh!!","Grrrrrr!")
|
||||
if(/obj/item/clothing/head/collectable/police)
|
||||
name = "Officer [real_name]"
|
||||
emote_see = list("drools","looks for donuts")
|
||||
desc = "Stop right there criminal scum!"
|
||||
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
|
||||
name = "Grandwizard [real_name]"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
|
||||
if(/obj/item/weapon/bedsheet)
|
||||
name = "\improper Ghost"
|
||||
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
|
||||
emote_see = list("stumbles around", "shivers")
|
||||
emote_hear = list("howls","groans")
|
||||
desc = "Spooky!"
|
||||
if(/obj/item/clothing/head/soft)
|
||||
name = "Corgi Tech [real_name]"
|
||||
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")
|
||||
desc = "The reason your yellow gloves have chew-marks."
|
||||
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
/obj/item/device/radio
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_mask = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/crab/GetMad()
|
||||
name = "MEGAMADCRAB"
|
||||
real_name = "MEGAMADCRAB"
|
||||
desc = "OH NO YOU DUN IT NOW."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "madcrab"
|
||||
icon_living = "madcrab"
|
||||
icon_dead = "madcrab_dead"
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks with fury", "clicks angrily")
|
||||
emote_see = list("clacks")
|
||||
speak_chance = 1
|
||||
turns_per_move = 15//Gotta go fast
|
||||
maxHealth = 100//So they don't die as quickly
|
||||
health = 100
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 10//Kill them. Kill them all
|
||||
if(inventory_head)//Drops inventory so it doesn't have to be dealt with
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null*/
|
||||
@@ -49,12 +49,16 @@
|
||||
var/obj/effect/plant/SV = locate() in loc
|
||||
SV.die_off(1)
|
||||
|
||||
if(locate(/obj/machinery/portable_atmospherics/hydroponics/soil/invisible) in loc)
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/SP = locate() in loc
|
||||
qdel(SP)
|
||||
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/effect/plant) in step)
|
||||
Move(step)
|
||||
var/obj/effect/plant/food
|
||||
food = locate(/obj/effect/plant) in oview(5,loc)
|
||||
if(food)
|
||||
var/step = get_step_to(src, food, 0)
|
||||
Move(step)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
|
||||
@@ -135,19 +135,7 @@
|
||||
spawn(300) src.explode()
|
||||
|
||||
else
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
damage = 0
|
||||
adjustBruteLoss(damage)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
attacked_with_item(O, user)
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
|
||||
|
||||
|
||||
@@ -91,3 +91,82 @@
|
||||
..()
|
||||
visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...")
|
||||
playsound(src, 'sound/voice/hiss6.ogg', 100, 1)
|
||||
|
||||
// Xenoarch aliens.
|
||||
/mob/living/simple_animal/hostile/samak
|
||||
name = "samak"
|
||||
desc = "A fast, armoured predator accustomed to hiding and ambushing in cold terrain."
|
||||
faction = "samak"
|
||||
icon_state = "samak"
|
||||
icon_living = "samak"
|
||||
icon_dead = "samak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 2
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
speed = 2
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "mauled"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Hruuugh!","Hrunnph")
|
||||
emote_see = list("paws the ground","shakes its mane","stomps")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/diyaab
|
||||
name = "diyaab"
|
||||
desc = "A small pack animal. Although omnivorous, it will hunt meat on occasion."
|
||||
faction = "diyaab"
|
||||
icon_state = "diyaab"
|
||||
icon_living = "diyaab"
|
||||
icon_dead = "diyaab_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
speed = 1
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 8
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Awrr?","Aowrl!","Worrl")
|
||||
emote_see = list("sniffs the air cautiously","looks around")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/shantak
|
||||
name = "shantak"
|
||||
desc = "A piglike creature with a bright iridiscent mane that sparkles as though lit by an inner light. Don't be fooled by its beauty though."
|
||||
faction = "shantak"
|
||||
icon_state = "shantak"
|
||||
icon_living = "shantak"
|
||||
icon_dead = "shantak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = 1
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 12
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Shuhn","Shrunnph?","Shunpf")
|
||||
emote_see = list("scratches the ground","shakes out it's mane","tinkles gently")
|
||||
|
||||
/mob/living/simple_animal/yithian
|
||||
name = "yithian"
|
||||
desc = "A friendly creature vaguely resembling an oversized snail without a shell."
|
||||
icon_state = "yithian"
|
||||
icon_living = "yithian"
|
||||
icon_dead = "yithian_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
|
||||
/mob/living/simple_animal/tindalos
|
||||
name = "tindalos"
|
||||
desc = "It looks like a large, flightless grasshopper."
|
||||
icon_state = "tindalos"
|
||||
icon_living = "tindalos"
|
||||
icon_dead = "tindalos_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user