mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-21 21:23:58 +01:00
Merge remote-tracking branch 'upstream/dev' into chem-kinetics
Conflicts: code/modules/reagents/Chemistry-Recipes.dm
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -778,7 +778,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(confirm != "Yes") return
|
||||
|
||||
var/choice
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "confliction")
|
||||
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
if(choice == "Confirm")
|
||||
emergency_shuttle.auto_recall = 1 //enable auto-recall
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
origin_tech = "magnets=1"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
|
||||
var/secured = 1
|
||||
var/list/attached_overlays = null
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "igniter"
|
||||
desc = "A small electronic device able to ignite combustable substances."
|
||||
icon_state = "igniter"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
|
||||
secured = 1
|
||||
wires = WIRE_RECEIVE
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
|
||||
origin_tech = "magnets=2"
|
||||
origin_tech = list(TECH_MAGNET = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
|
||||
origin_tech = "combat=1"
|
||||
origin_tech = list(TECH_COMBAT = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
|
||||
var/armed = 0
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "proximity sensor"
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
icon_state = "prox"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
|
||||
origin_tech = "magnets=1"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
desc = "Used to remotely activate devices."
|
||||
icon_state = "signaller"
|
||||
item_state = "signaler"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
|
||||
origin_tech = "magnets=1"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
|
||||
secured = 1
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "timer"
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
icon_state = "timer"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "voice analyzer"
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
origin_tech = list(TECH_MAGNET = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
var/listening = 0
|
||||
var/recorded //the activation message
|
||||
|
||||
|
||||
@@ -634,10 +634,6 @@ datum/preferences
|
||||
dat += "</br><b>Has a variety of eye colours.</b>"
|
||||
if(current_species.flags & IS_PLANT)
|
||||
dat += "</br><b>Has a plantlike physiology.</b>"
|
||||
if(current_species.flags & IS_SYNTHETIC)
|
||||
dat += "</br><b>Is machine-based.</b>"
|
||||
if(current_species.flags & REGENERATES_LIMBS)
|
||||
dat += "</br><b>Has a plantlike physiology.</b>"
|
||||
dat += "</small></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table><center><hr/>"
|
||||
|
||||
@@ -897,6 +897,12 @@ var/global/list/gear_datums = list()
|
||||
cost = 1
|
||||
slot = slot_shoes
|
||||
|
||||
/datum/gear/workboots
|
||||
display_name = "workboots"
|
||||
path = /obj/item/clothing/shoes/workboots
|
||||
cost = 1
|
||||
slot = slot_shoes
|
||||
|
||||
/datum/gear/sandal
|
||||
display_name = "sandals"
|
||||
path = /obj/item/clothing/shoes/sandal
|
||||
@@ -1035,7 +1041,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
|
||||
|
||||
|
||||
@@ -212,8 +212,6 @@ BLIND // can't see anything
|
||||
cell.charge -= 1000 / severity
|
||||
if (cell.charge < 0)
|
||||
cell.charge = 0
|
||||
if(cell.reliability != 100 && prob(50/severity))
|
||||
cell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
// Called just before an attack_hand(), in mob/UnarmedAttack()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
icon_state = "meson"
|
||||
item_state = "glasses"
|
||||
icon_action_button = "action_meson" //This doesn't actually matter, the action button is generated from the current icon_state. But, this is the only way to get it to show up.
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2)
|
||||
toggleable = 1
|
||||
vision_flags = SEE_TURFS
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
desc = "You can totally see in the dark now!"
|
||||
icon_state = "night"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
origin_tech = list(TECH_MAGNET = 2)
|
||||
darkness_view = 7
|
||||
toggleable = 1
|
||||
icon_action_button = "action_nvg"
|
||||
@@ -103,7 +103,7 @@
|
||||
icon_state = "material"
|
||||
item_state = "glasses"
|
||||
icon_action_button = "action_material"
|
||||
origin_tech = "magnets=3;engineering=3"
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3)
|
||||
toggleable = 1
|
||||
vision_flags = SEE_OBJS
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
desc = "Thermals in the shape of glasses."
|
||||
icon_state = "thermal"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=3"
|
||||
origin_tech = list(TECH_MAGNET = 3)
|
||||
toggleable = 1
|
||||
icon_action_button = "action_thermal"
|
||||
vision_flags = SEE_MOBS
|
||||
@@ -249,7 +249,7 @@
|
||||
name = "Optical Meson Scanner"
|
||||
desc = "Used for seeing walls, floors, and stuff through anything."
|
||||
icon_state = "meson"
|
||||
origin_tech = "magnets=3;syndicate=4"
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
|
||||
|
||||
/obj/item/clothing/glasses/thermal/plain
|
||||
toggleable = 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "HUD"
|
||||
desc = "A heads-up display that provides important info in (almost) real time."
|
||||
flags = null //doesn't protect eyes because it's a monocle, duh
|
||||
origin_tech = "magnets=3;biotech=2"
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2)
|
||||
var/list/icon/current = list() //the current hud icons
|
||||
|
||||
proc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
|
||||
var/obj/item/voice_changer/changer
|
||||
origin_tech = "syndicate=4"
|
||||
origin_tech = list(TECH_ILLEGAL = 4)
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/verb/Toggle_Voice_Changer()
|
||||
set category = "Object"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/obj/item/clothing/shoes/galoshes
|
||||
desc = "Rubber boots"
|
||||
name = "galoshes"
|
||||
icon_state = "galoshes"
|
||||
permeability_coefficient = 0.05
|
||||
flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/jackboots
|
||||
name = "jackboots"
|
||||
desc = "Nanotrasen-issue Security combat boots for combat scenarios or combat situations. All combat, all the time."
|
||||
icon_state = "jackboots"
|
||||
item_state = "jackboots"
|
||||
force = 3
|
||||
armor = list(melee = 30, bullet = 10, laser = 10, energy = 15, bomb = 20, bio = 0, rad = 0)
|
||||
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/workboots
|
||||
name = "workboots"
|
||||
desc = "A pair of steel-toed work boots designed for use in industrial settings. Safety first."
|
||||
icon_state = "workboots"
|
||||
item_state = "workboots"
|
||||
armor = list(melee = 40, bullet = 0, laser = 0, energy = 15, bomb = 20, bio = 0, rad = 20)
|
||||
siemens_coefficient = 0.7
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "brown"
|
||||
permeability_coefficient = 0.05
|
||||
flags = NOSLIP
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
siemens_coefficient = 0.8
|
||||
species_restricted = null
|
||||
@@ -52,15 +52,6 @@
|
||||
icon_state = "black"
|
||||
body_parts_covered = FEET
|
||||
|
||||
/obj/item/clothing/shoes/galoshes
|
||||
desc = "Rubber boots"
|
||||
name = "galoshes"
|
||||
icon_state = "galoshes"
|
||||
permeability_coefficient = 0.05
|
||||
flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes
|
||||
desc = "The prankster's standard-issue clowning shoes. Damn they're huge!"
|
||||
name = "clown shoes"
|
||||
@@ -81,21 +72,6 @@
|
||||
else
|
||||
playsound(src, "clownstep", 20, 1)
|
||||
|
||||
/obj/item/clothing/shoes/jackboots
|
||||
name = "jackboots"
|
||||
desc = "Nanotrasen-issue Security combat boots for combat scenarios or combat situations. All combat, all the time."
|
||||
icon_state = "jackboots"
|
||||
item_state = "jackboots"
|
||||
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))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
name = "mounted grenade launcher"
|
||||
desc = "A shoulder-mounted micro-explosive dispenser."
|
||||
selectable = 1
|
||||
icon_state = "grenade_launcher"
|
||||
icon_state = "grenadelauncher"
|
||||
|
||||
interface_name = "integrated grenade launcher"
|
||||
interface_desc = "Discharges loaded grenades against the wearer's location."
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
if(!target)
|
||||
if(ai_card)
|
||||
if(istype(ai_card,/obj/item/device/aicard))
|
||||
ai_card.attack_self(H)
|
||||
ai_card.ui_interact(H, state = deep_inventory_state)
|
||||
else
|
||||
eject_ai(H)
|
||||
update_verb_holder()
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
SetupStat(R)
|
||||
|
||||
/mob/proc/SetupStat(var/obj/item/weapon/rig/R)
|
||||
if(R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
|
||||
if(src == usr && R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
|
||||
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
|
||||
statpanel("Hardsuit Modules", "Suit charge", cell_status)
|
||||
for(var/obj/item/rig_module/module in R.installed_modules)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
name = "active camouflage module"
|
||||
desc = "A robust hardsuit-integrated stealth module."
|
||||
icon_state = "stealth"
|
||||
icon_state = "cloak"
|
||||
|
||||
toggleable = 1
|
||||
disruptable = 1
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0.1
|
||||
siemens_coefficient = 0.2
|
||||
permeability_coefficient = 0.1
|
||||
unacidable = 1
|
||||
|
||||
@@ -707,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
|
||||
..()
|
||||
@@ -29,8 +29,8 @@
|
||||
desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
|
||||
suit_type = "ERT engineer"
|
||||
icon_state = "ert_engineer_rig"
|
||||
|
||||
glove_type = /obj/item/clothing/gloves/rig/ert_engineer
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
siemens_coefficient = 0
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
@@ -39,10 +39,6 @@
|
||||
/obj/item/rig_module/device/rcd
|
||||
)
|
||||
|
||||
/obj/item/clothing/gloves/rig/ert_engineer
|
||||
name = "insulated gauntlets"
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/weapon/rig/ert/medical
|
||||
name = "ERT-M suit control module"
|
||||
desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,10 +29,6 @@
|
||||
pockets.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
|
||||
pockets.hear_talk(M, msg, verb, speaking)
|
||||
..()
|
||||
|
||||
//Jackets with buttons, used for labcoats, IA jackets, First Responder jackets, and brown jackets.
|
||||
/obj/item/clothing/suit/storage/toggle
|
||||
var/icon_open
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
/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.
|
||||
icon_state = "holobadge"
|
||||
var/emagged //Emagging removes Sec check.
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/cord
|
||||
icon_state = "holobadge-cord"
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
hold.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
|
||||
hold.hear_talk(M, msg, verb, speaking)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/storage/attack_self(mob/user as mob)
|
||||
user << "<span class='notice'>You empty [src].</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -72,11 +68,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)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
item_state = "bl_suit"
|
||||
worn_state = "black"
|
||||
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/under/chameleon/New()
|
||||
@@ -60,7 +60,7 @@
|
||||
icon_state = "greysoft"
|
||||
item_state = "greysoft"
|
||||
desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
body_parts_covered = 0
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
icon_state = "armor"
|
||||
item_state = "armor"
|
||||
desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/suit/chameleon/New()
|
||||
@@ -159,7 +159,7 @@
|
||||
icon_state = "black"
|
||||
item_state = "black"
|
||||
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/New()
|
||||
@@ -206,7 +206,7 @@
|
||||
icon_state = "backpack"
|
||||
item_state = "backpack"
|
||||
desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/weapon/storage/backpack/chameleon/New()
|
||||
@@ -260,7 +260,7 @@
|
||||
icon_state = "black"
|
||||
item_state = "bgloves"
|
||||
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/New()
|
||||
@@ -308,7 +308,7 @@
|
||||
icon_state = "gas_alt"
|
||||
item_state = "gas_alt"
|
||||
desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/mask/chameleon/New()
|
||||
@@ -358,7 +358,7 @@
|
||||
icon_state = "meson"
|
||||
item_state = "glasses"
|
||||
desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/New()
|
||||
@@ -407,7 +407,7 @@
|
||||
w_class = 3.0
|
||||
max_shells = 7
|
||||
caliber = ".45"
|
||||
origin_tech = "combat=2;materials=2;syndicate=8"
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
|
||||
ammo_type = "/obj/item/ammo_casing/chameleon"
|
||||
matter = list()
|
||||
var/list/gun_choices = list()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/var/global/list/event_viruses = list() // so that event viruses are kept around for admin logs, rather than being GCed
|
||||
|
||||
datum/event/viral_infection
|
||||
var/list/viruses = list()
|
||||
|
||||
@@ -40,10 +42,30 @@ datum/event/viral_infection/start()
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
var/list/used_viruses = list()
|
||||
var/list/used_candidates = list()
|
||||
severity = max(EVENT_LEVEL_MUNDANE, severity - 1)
|
||||
var/actual_severity = severity * rand(1, 3)
|
||||
while(actual_severity > 0 && candidates.len)
|
||||
var/datum/disease2/disease/D = pick(viruses)
|
||||
infect_mob(candidates[1], D.getcopy())
|
||||
used_candidates += candidates[1]
|
||||
candidates.Remove(candidates[1])
|
||||
actual_severity--
|
||||
used_viruses |= D
|
||||
|
||||
event_viruses |= used_viruses
|
||||
var/list/used_viruses_links = list()
|
||||
var/list/used_viruses_text = list()
|
||||
for(var/datum/disease2/disease/D in used_viruses)
|
||||
used_viruses_links += "<a href='?src=\ref[D];info=1'>[D.name()]</a>"
|
||||
used_viruses_text += D.name()
|
||||
|
||||
var/list/used_candidates_links = list()
|
||||
var/list/used_candidates_text = list()
|
||||
for(var/mob/M in used_candidates)
|
||||
used_candidates_links += key_name_admin(M)
|
||||
used_candidates_text += key_name(M)
|
||||
|
||||
log_admin("Virus event affecting [english_list(used_candidates_text)] started; Viruses: [english_list(used_viruses_text)]")
|
||||
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")
|
||||
|
||||
@@ -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."
|
||||
@@ -0,0 +1,114 @@
|
||||
// This system is used to grab a ghost from observers with the required preferences and
|
||||
// lack of bans set. See posibrain.dm for an example of how they are called/used. ~Z
|
||||
|
||||
var/list/ghost_traps
|
||||
|
||||
proc/get_ghost_trap(var/trap_key)
|
||||
if(!ghost_traps)
|
||||
populate_ghost_traps()
|
||||
return ghost_traps[trap_key]
|
||||
|
||||
proc/populate_ghost_traps()
|
||||
ghost_traps = list()
|
||||
for(var/traptype in typesof(/datum/ghosttrap))
|
||||
var/datum/ghosttrap/G = new traptype
|
||||
ghost_traps[G.object] = G
|
||||
|
||||
/datum/ghosttrap
|
||||
var/object = "positronic brain"
|
||||
var/list/ban_checks = list("AI","Cyborg")
|
||||
var/pref_check = BE_AI
|
||||
var/ghost_trap_message = "They are occupying a positronic brain now."
|
||||
var/ghost_trap_role = "Positronic Brain"
|
||||
|
||||
// Check for bans, proper atom types, etc.
|
||||
/datum/ghosttrap/proc/assess_candidate(var/mob/dead/observer/candidate)
|
||||
if(!istype(candidate) || !candidate.client || !candidate.ckey)
|
||||
return 0
|
||||
if(!candidate.MayRespawn())
|
||||
candidate << "You have made use of the AntagHUD and hence cannot enter play as \a [object]."
|
||||
return 0
|
||||
if(islist(ban_checks))
|
||||
for(var/bantype in ban_checks)
|
||||
if(jobban_isbanned(candidate, "[bantype]"))
|
||||
candidate << "You are banned from one or more required roles and hence cannot enter play as \a [object]."
|
||||
return 0
|
||||
return 1
|
||||
|
||||
// Print a message to all ghosts with the right prefs/lack of bans.
|
||||
/datum/ghosttrap/proc/request_player(var/mob/target, var/request_string)
|
||||
if(!target)
|
||||
return
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(!O.MayRespawn())
|
||||
continue
|
||||
if(islist(ban_checks))
|
||||
for(var/bantype in ban_checks)
|
||||
if(jobban_isbanned(O, "[bantype]"))
|
||||
continue
|
||||
if(pref_check && !(O.client.prefs.be_special & pref_check))
|
||||
continue
|
||||
if(O.client)
|
||||
O << "[request_string]<a href='?src=\ref[src];candidate=\ref[O];target=\ref[target]'>Click here</a> if you wish to play as this option."
|
||||
|
||||
// Handles a response to request_player().
|
||||
/datum/ghosttrap/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["candidate"] && href_list["target"])
|
||||
var/mob/dead/observer/candidate = locate(href_list["candidate"]) // BYOND magic.
|
||||
var/mob/target = locate(href_list["target"]) // So much BYOND magic.
|
||||
if(!target || !candidate)
|
||||
return
|
||||
if(candidate == usr && assess_candidate(candidate) && !target.ckey)
|
||||
transfer_personality(candidate,target)
|
||||
return 1
|
||||
|
||||
// Shunts the ckey/mind into the target mob.
|
||||
/datum/ghosttrap/proc/transfer_personality(var/mob/candidate, var/mob/target)
|
||||
if(!assess_candidate(candidate))
|
||||
return 0
|
||||
target.ckey = candidate.ckey
|
||||
if(target.mind)
|
||||
target.mind.assigned_role = "[ghost_trap_role]"
|
||||
announce_ghost_joinleave(candidate, 0, "[ghost_trap_message]")
|
||||
welcome_candidate(target)
|
||||
set_new_name(target)
|
||||
return 1
|
||||
|
||||
// Fluff!
|
||||
/datum/ghosttrap/proc/welcome_candidate(var/mob/target)
|
||||
target << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
target << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
target << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
target << "<b>Use say :b to speak to other artificial intelligences.</b>"
|
||||
var/turf/T = get_turf(target)
|
||||
T.visible_message("<span class='notice'>\The [src] chimes quietly.</span>")
|
||||
var/obj/item/device/mmi/digital/posibrain/P = target.loc
|
||||
if(!istype(P)) //wat
|
||||
return
|
||||
P.searching = 0
|
||||
P.name = "positronic brain ([P.brainmob.name])"
|
||||
P.icon_state = "posibrain-occupied"
|
||||
|
||||
// Allows people to set their own name. May or may not need to be removed for posibrains if people are dumbasses.
|
||||
/datum/ghosttrap/proc/set_new_name(var/mob/target)
|
||||
var/newname = sanitizeSafe(input(target,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if (newname != "")
|
||||
target.real_name = newname
|
||||
target.name = target.real_name
|
||||
|
||||
// Doona pods and walking mushrooms.
|
||||
/datum/ghosttrap/plant
|
||||
object = "living plant"
|
||||
ban_checks = list("Dionaea")
|
||||
pref_check = BE_PLANT
|
||||
ghost_trap_message = "They are occupying a living plant now."
|
||||
ghost_trap_role = "Plant"
|
||||
|
||||
/datum/ghosttrap/plant/welcome_candidate(var/mob/target)
|
||||
target << "<span class='alium><B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B></span>"
|
||||
// This is a hack, replace with some kind of species blurb proc.
|
||||
if(istype(host,/mob/living/carbon/alien/diona))
|
||||
target << "<B>You are \a [target], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
|
||||
target << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
|
||||
@@ -98,7 +98,7 @@
|
||||
descriptors |= "shiny"
|
||||
if(reagents.has_reagent("lube"))
|
||||
descriptors |= "slippery"
|
||||
if(reagents.has_reagent("pacid") || reagents.has_reagent("sacid"))
|
||||
if(reagents.has_reagent("pacid") || reagents.has_reagent("sacid") || reagents.has_reagent("hclacid"))
|
||||
descriptors |= "acidic"
|
||||
if(seed.get_trait(TRAIT_JUICY))
|
||||
descriptors |= "juicy"
|
||||
@@ -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)
|
||||
|
||||
@@ -408,7 +408,9 @@
|
||||
"slimejelly",
|
||||
"cyanide",
|
||||
"mindbreaker",
|
||||
"stoxin"
|
||||
"stoxin",
|
||||
"acetone",
|
||||
"hydrazine"
|
||||
)
|
||||
|
||||
for(var/x=1;x<=additional_chems;x++)
|
||||
@@ -678,7 +680,6 @@
|
||||
total_yield = get_trait(TRAIT_YIELD) + rand(yield_mod)
|
||||
total_yield = max(1,total_yield)
|
||||
|
||||
currently_querying = list()
|
||||
for(var/i = 0;i<total_yield;i++)
|
||||
var/obj/item/product
|
||||
if(has_mob_product)
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
/datum/seed
|
||||
var/list/currently_querying // Used to avoid asking the same ghost repeatedly.
|
||||
|
||||
// The following procs are used to grab players for mobs produced by a seed (mostly for dionaea).
|
||||
/datum/seed/proc/handle_living_product(var/mob/living/host)
|
||||
|
||||
if(!host || !istype(host)) return
|
||||
|
||||
spawn(0)
|
||||
request_player(host)
|
||||
if(istype(host,/mob/living/simple_animal))
|
||||
return
|
||||
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
|
||||
P.request_player(host, "Someone is harvesting [display_name]. ")
|
||||
|
||||
spawn(75)
|
||||
if(!host.ckey && !host.client)
|
||||
host.death() // This seems redundant, but a lot of mobs don't
|
||||
@@ -21,59 +17,3 @@
|
||||
var/obj/item/seeds/S = new(get_turf(host))
|
||||
S.seed_type = name
|
||||
S.update_seed()
|
||||
|
||||
/datum/seed/proc/request_player(var/mob/living/host)
|
||||
if(!host) return
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "Dionaea"))
|
||||
continue
|
||||
if(O.client && O.MayRespawn())
|
||||
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
|
||||
currently_querying |= O.client
|
||||
question(O.client,host)
|
||||
|
||||
/datum/seed/proc/question(var/client/C,var/mob/living/host)
|
||||
spawn(0)
|
||||
|
||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob.
|
||||
|
||||
var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.")
|
||||
|
||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer.
|
||||
|
||||
if(response == "Yes")
|
||||
transfer_personality(C,host)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PLANT
|
||||
|
||||
currently_querying -= C
|
||||
|
||||
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
|
||||
|
||||
//Something is wrong, abort.
|
||||
if(!player || !host) return
|
||||
|
||||
//Host already has a controller, pike off slowpoke.
|
||||
if(host.client && host.ckey) return
|
||||
|
||||
//Transfer them over.
|
||||
host.ckey = player.ckey
|
||||
if(player.mob && player.mob.mind)
|
||||
player.mob.mind.transfer_to(host)
|
||||
|
||||
if(host.dna) host.dna.real_name = host.real_name
|
||||
|
||||
// Update mode specific HUD icons.
|
||||
callHook("harvest_podman", list(host))
|
||||
|
||||
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
|
||||
|
||||
// This is a hack, replace with some kind of species blurb proc.
|
||||
if(istype(host,/mob/living/carbon/alien/diona))
|
||||
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
|
||||
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
|
||||
|
||||
var/newname = sanitizeSafe(input(host,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if (newname != "")
|
||||
host.real_name = newname
|
||||
host.name = host.real_name
|
||||
@@ -24,6 +24,8 @@
|
||||
vine.process()
|
||||
|
||||
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
|
||||
return
|
||||
message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
|
||||
|
||||
/obj/effect/dead_plant
|
||||
anchored = 1
|
||||
@@ -56,7 +58,7 @@
|
||||
var/growth_threshold = 0
|
||||
var/growth_type = 0
|
||||
var/max_growth = 0
|
||||
|
||||
var/sampled
|
||||
var/list/neighbors = list()
|
||||
var/obj/effect/plant/parent
|
||||
var/datum/seed/seed
|
||||
@@ -233,8 +235,13 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
|
||||
if(!seed)
|
||||
user << "There is nothing to take a sample from."
|
||||
user << "<span class='danger'>There is nothing to take a sample from.</span>"
|
||||
return
|
||||
if(sampled)
|
||||
user << "<span class='danger'>You cannot take another sample from \the [src].</span>"
|
||||
return
|
||||
if(prob(70))
|
||||
sampled = 1
|
||||
seed.harvest(user,0,1)
|
||||
health -= (rand(3,5)*10)
|
||||
else
|
||||
|
||||
@@ -47,9 +47,10 @@
|
||||
var/global/list/toxic_reagents = list(
|
||||
"anti_toxin" = -2,
|
||||
"toxin" = 2,
|
||||
"fluorine" = 2.5,
|
||||
"chlorine" = 1.5,
|
||||
"hydrazine" = 2.5,
|
||||
"acetone" = 1,
|
||||
"sacid" = 1.5,
|
||||
"hclacid" = 1.5,
|
||||
"pacid" = 3,
|
||||
"plantbgone" = 3,
|
||||
"cryoxadone" = -3,
|
||||
@@ -70,11 +71,11 @@
|
||||
"left4zed" = 1
|
||||
)
|
||||
var/global/list/weedkiller_reagents = list(
|
||||
"fluorine" = -4,
|
||||
"chlorine" = -3,
|
||||
"hydrazine" = -4,
|
||||
"phosphorus" = -2,
|
||||
"sugar" = 2,
|
||||
"sacid" = -2,
|
||||
"hclacid" = -2,
|
||||
"pacid" = -4,
|
||||
"plantbgone" = -8,
|
||||
"adminordrazine" = -5
|
||||
@@ -89,8 +90,7 @@
|
||||
"adminordrazine" = 1,
|
||||
"milk" = 0.9,
|
||||
"beer" = 0.7,
|
||||
"fluorine" = -0.5,
|
||||
"chlorine" = -0.5,
|
||||
"hydrazine" = -2,
|
||||
"phosphorus" = -0.5,
|
||||
"water" = 1,
|
||||
"sodawater" = 1,
|
||||
@@ -99,11 +99,11 @@
|
||||
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
|
||||
var/global/list/beneficial_reagents = list(
|
||||
"beer" = list( -0.05, 0, 0 ),
|
||||
"fluorine" = list( -2, 0, 0 ),
|
||||
"chlorine" = list( -1, 0, 0 ),
|
||||
"hydrazine" = list( -2, 0, 0 ),
|
||||
"phosphorus" = list( -0.75, 0, 0 ),
|
||||
"sodawater" = list( 0.1, 0, 0 ),
|
||||
"sacid" = list( -1, 0, 0 ),
|
||||
"hclacid" = list( -1, 0, 0 ),
|
||||
"pacid" = list( -2, 0, 0 ),
|
||||
"plantbgone" = list( -2, 0, 0.2),
|
||||
"cryoxadone" = list( 3, 0, 0 ),
|
||||
@@ -129,7 +129,22 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/attack_ghost(var/mob/dead/observer/user)
|
||||
|
||||
if(!(harvest && seed && seed.has_mob_product))
|
||||
return
|
||||
|
||||
var/datum/ghosttrap/plant/G = get_ghost_trap("living plant")
|
||||
if(!G.assess_candidate(user))
|
||||
return
|
||||
var/response = alert(user, "Are you sure you want to harvest this [seed.display_name]?", "Living plant request", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
harvest()
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/attack_generic(var/mob/user)
|
||||
|
||||
// Why did I ever think this was a good idea. TODO: move this onto the nymph mob.
|
||||
if(istype(user,/mob/living/carbon/alien/diona))
|
||||
var/mob/living/carbon/alien/diona/nymph = user
|
||||
|
||||
@@ -475,7 +490,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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -204,69 +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 = 2
|
||||
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")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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,159 @@
|
||||
// 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
|
||||
max_amount = 50
|
||||
|
||||
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.Copy()
|
||||
perunit = SHEET_MATERIAL_AMOUNT
|
||||
|
||||
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] = SHEET_MATERIAL_AMOUNT
|
||||
return 1
|
||||
|
||||
/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
|
||||
var/obj/item/stack/material/M = S
|
||||
if(!istype(M) || material.name != M.material.name)
|
||||
return 0
|
||||
..(S,tamount,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,5 +1,33 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// 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()
|
||||
@@ -10,42 +38,57 @@ var/list/name_to_material
|
||||
name_to_material[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
// 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]
|
||||
|
||||
/*
|
||||
Valid sprite masks:
|
||||
stone
|
||||
metal
|
||||
solid
|
||||
cult
|
||||
*/
|
||||
|
||||
// Material definition and procs follow.
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name
|
||||
var/flags = 0
|
||||
var/icon_base = "metal"
|
||||
var/icon_colour
|
||||
var/icon_reinf = "reinf_metal"
|
||||
var/stack_type
|
||||
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/shard_type = SHARD_SHRAPNEL
|
||||
var/shard_icon
|
||||
var/shard_can_repair = 1
|
||||
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
|
||||
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/list/stack_origin_tech = list(TECH_MATERIAL = 1) // Research level 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)
|
||||
@@ -53,77 +96,125 @@ var/list/name_to_material
|
||||
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)
|
||||
return new stack_type(target)
|
||||
|
||||
// As above.
|
||||
/material/proc/place_shard(var/turf/target)
|
||||
if(shard_type)
|
||||
return new /obj/item/weapon/shard(target, src)
|
||||
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 = list(TECH_MATERIAL = 5)
|
||||
door_icon_base = "stone"
|
||||
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
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 = list(TECH_MATERIAL = 6)
|
||||
|
||||
/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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 2, TECH_PHORON = 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"
|
||||
@@ -136,74 +227,118 @@ var/list/name_to_material
|
||||
|
||||
/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 = list(TECH_MATERIAL = 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/sheet/glass/phoronglass
|
||||
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 = list(TECH_MATERIAL = 3, TECH_PHORON = 2)
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 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 = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 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 = list(TECH_MATERIAL = 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
|
||||
|
||||
/material/wood
|
||||
name = "wood"
|
||||
stack_type = /obj/item/stack/sheet/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 = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
dooropen_noise = 'sound/effects/doorcreaky.ogg'
|
||||
door_icon_base = "wood"
|
||||
destruction_desc = "splinters"
|
||||
|
||||
/material/wood/holographic
|
||||
name = "holographic wood"
|
||||
@@ -211,6 +346,24 @@ var/list/name_to_material
|
||||
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 = list(TECH_MATERIAL = 1)
|
||||
door_icon_base = "wood"
|
||||
destruction_desc = "crumples"
|
||||
|
||||
/material/cloth //todo
|
||||
name = "cloth"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
door_icon_base = "wood"
|
||||
|
||||
/material/cult
|
||||
name = "cult"
|
||||
display_name = "disturbing stone"
|
||||
@@ -231,3 +384,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 = list(TECH_MATERIAL = 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
|
||||
@@ -4,8 +4,8 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
user << "You begin sweeping \the [src] about, scanning for metal deposits."
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
w_class = 4.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
var/drill_sound = 'sound/weapons/Genhit.ogg'
|
||||
var/drill_verb = "drilling"
|
||||
@@ -69,7 +69,7 @@
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=3"
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
desc = "This makes no metallurgic sense."
|
||||
|
||||
/obj/item/weapon/pickaxe/drill
|
||||
@@ -77,7 +77,7 @@
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=2;powerstorage=3;engineering=2"
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINERING = 2)
|
||||
desc = "Yours is the drill that will pierce through the rock walls."
|
||||
drill_verb = "drilling"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 20 //faster than drill, but cannot dig
|
||||
origin_tech = "materials=3;powerstorage=2;engineering=2"
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINERING = 2)
|
||||
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
|
||||
drill_verb = "hammering"
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
digspeed = 20
|
||||
origin_tech = "materials=4"
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
desc = "This makes no metallurgic sense."
|
||||
drill_verb = "picking"
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
w_class = 3.0 //it is smaller than the pickaxe
|
||||
damtype = "fire"
|
||||
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
|
||||
origin_tech = "materials=4;phorontech=3;engineering=3"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINERING = 3)
|
||||
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
drill_verb = "cutting"
|
||||
drill_sound = 'sound/items/Welder.ogg'
|
||||
@@ -118,7 +118,7 @@
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
digspeed = 10
|
||||
origin_tech = "materials=6;engineering=4"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINERING = 4)
|
||||
desc = "A pickaxe with a diamond pick head."
|
||||
drill_verb = "picking"
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 5 //Digs through walls, girders, and can dig up sand
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINERING = 5)
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
drill_verb = "drilling"
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
throwforce = 4.0
|
||||
item_state = "shovel"
|
||||
w_class = 3.0
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
edge = 1
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -9,49 +9,49 @@
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "pitchblende"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = "materials=5"
|
||||
origin_tech = list(TECH_MATERIAL = 5)
|
||||
material = "uranium"
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = "materials=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "hematite"
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = "materials=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "impure silicates"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = "materials=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "sand"
|
||||
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = "materials=2"
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
material = "phoron"
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = "materials=3"
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
material = "silver"
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = "materials=4"
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
material = "gold"
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = "materials=6"
|
||||
origin_tech = list(TECH_MATERIAL = 6)
|
||||
material = "diamond"
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
|
||||
@@ -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
|
||||
@@ -202,13 +202,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
statpanel("Status")
|
||||
if (client.statpanel == "Status")
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
if(ticker)
|
||||
if(ticker.mode)
|
||||
//world << "DEBUG: ticker not null"
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
//world << "DEBUG: malf mode ticker test"
|
||||
if(malf.revealed)
|
||||
stat(null, "Time left: [max(malf.hack_time/(malf.hacked_apcs.len/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
|
||||
+21
-50
@@ -24,8 +24,6 @@
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
var/list/seeing_obj = list() //For objs that need to see emotes. You can use see_emote(), which is based off of hear_talk()
|
||||
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
@@ -37,58 +35,31 @@
|
||||
if(findtext(message," snores.")) //Because we have so many sleeping people.
|
||||
break
|
||||
if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
M.show_message(message, m_type)
|
||||
|
||||
for(var/I in view(world.view, get_turf(usr))) //get_turf is needed to stop weirdness with x-ray.
|
||||
if(istype(I, /mob/))
|
||||
var/mob/M = I
|
||||
for(var/obj/O in M.contents)
|
||||
seeing_obj |= O
|
||||
else if(istype(I, /obj/))
|
||||
var/obj/O = I
|
||||
seeing_obj |= O
|
||||
|
||||
// Type 1 (Visual) emotes are sent to anyone in view of the item
|
||||
if (m_type & 1)
|
||||
//for (var/mob/O in viewers(src, null))
|
||||
for (var/mob/O in viewers(get_turf(src), null)) //This may break people with x-ray being able to see emotes across walls,
|
||||
//but this saves many headaches down the road, involving mechs and pAIs.
|
||||
//x-ray is so rare these days anyways.
|
||||
var/list/see = get_mobs_or_objects_in_view(world.view,src) | viewers(get_turf(src), null)
|
||||
for(var/I in see)
|
||||
if(isobj(I))
|
||||
spawn(0)
|
||||
if(I) //It's possible that it could be deleted in the meantime.
|
||||
var/obj/O = I
|
||||
O.see_emote(src, message, 1)
|
||||
else if(ismob(I))
|
||||
var/mob/M = I
|
||||
M.show_message(message, 1)
|
||||
|
||||
if(O.status_flags & PASSEMOTES)
|
||||
|
||||
for(var/obj/item/weapon/holder/H in O.contents)
|
||||
H.show_message(message, m_type)
|
||||
|
||||
for(var/mob/living/M in O.contents)
|
||||
M.show_message(message, m_type)
|
||||
|
||||
O.show_message(message, m_type)
|
||||
|
||||
for(var/obj/O in seeing_obj)
|
||||
spawn(0)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.see_emote(src, message, 1)
|
||||
|
||||
// Type 2 (Audible) emotes are sent to anyone in hear range
|
||||
// of the *LOCATION* -- this is important for AIs/pAIs to be heard
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(get_turf(src), null))
|
||||
|
||||
if(O.status_flags & PASSEMOTES)
|
||||
|
||||
for(var/obj/item/weapon/holder/H in O.contents)
|
||||
H.show_message(message, m_type)
|
||||
|
||||
for(var/mob/living/M in O.contents)
|
||||
M.show_message(message, m_type)
|
||||
|
||||
O.show_message(message, m_type)
|
||||
|
||||
for(var/obj/O in seeing_obj)
|
||||
spawn(0)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.see_emote(src, message, 2)
|
||||
var/list/hear = get_mobs_or_objects_in_view(world.view,src)
|
||||
for(var/I in hear)
|
||||
if(isobj(I))
|
||||
spawn(0)
|
||||
if(I) //It's possible that it could be deleted in the meantime.
|
||||
var/obj/O = I
|
||||
O.see_emote(src, message, 2)
|
||||
else if(ismob(I))
|
||||
var/mob/M = I
|
||||
M.show_message(message, 2)
|
||||
|
||||
/mob/proc/emote_dead(var/message)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
icon = 'icons/mob/eye.dmi'
|
||||
icon_state = "default-eye"
|
||||
alpha = 127
|
||||
density = 0
|
||||
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
slot_flags = SLOT_HEAD
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_holder.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_holder.dmi',
|
||||
)
|
||||
|
||||
/obj/item/weapon/holder/New()
|
||||
item_state = icon_state
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
@@ -32,10 +35,6 @@
|
||||
for(var/mob/M in src.contents)
|
||||
M.attackby(W,user)
|
||||
|
||||
/obj/item/weapon/holder/proc/show_message(var/message, var/m_type)
|
||||
for(var/mob/living/M in contents)
|
||||
M.show_message(message,m_type)
|
||||
|
||||
//Mob procs and vars for scooping up
|
||||
/mob/living/var/holder_type
|
||||
|
||||
@@ -51,7 +50,7 @@
|
||||
grabber << "You scoop up [src]."
|
||||
src << "[grabber] scoops you up."
|
||||
grabber.status_flags |= PASSEMOTES
|
||||
return
|
||||
return H
|
||||
|
||||
//Mob specific holders.
|
||||
|
||||
@@ -59,14 +58,14 @@
|
||||
name = "diona nymph"
|
||||
desc = "It's a tiny plant critter."
|
||||
icon_state = "nymph"
|
||||
origin_tech = "magnets=3;biotech=5"
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5)
|
||||
slot_flags = SLOT_HEAD | SLOT_OCLOTHING
|
||||
|
||||
/obj/item/weapon/holder/drone
|
||||
name = "maintenance drone"
|
||||
desc = "It's a small maintenance robot."
|
||||
icon_state = "drone"
|
||||
origin_tech = "magnets=3;engineering=5"
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 5)
|
||||
|
||||
/obj/item/weapon/holder/cat
|
||||
name = "cat"
|
||||
@@ -74,11 +73,27 @@
|
||||
icon_state = "cat"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/holder/mouse
|
||||
name = "mouse"
|
||||
desc = "It's a small rodent."
|
||||
icon_state = "mouse_gray"
|
||||
origin_tech = null
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/holder/mouse/gray
|
||||
icon_state = "mouse_gray"
|
||||
|
||||
/obj/item/weapon/holder/mouse/white
|
||||
icon_state = "mouse_white"
|
||||
|
||||
/obj/item/weapon/holder/mouse/brown
|
||||
icon_state = "mouse_brown"
|
||||
|
||||
/obj/item/weapon/holder/borer
|
||||
name = "cortical borer"
|
||||
desc = "It's a slimy brain slug. Gross."
|
||||
icon_state = "borer"
|
||||
origin_tech = "biotech=6"
|
||||
origin_tech = list(TECH_BIO = 6)
|
||||
|
||||
/obj/item/weapon/holder/monkey
|
||||
name = "monkey"
|
||||
@@ -99,3 +114,8 @@
|
||||
name = "neaera"
|
||||
desc = "It's a neaera."
|
||||
icon_state = "neara"
|
||||
|
||||
/obj/item/weapon/holder/pai
|
||||
name = "pAI"
|
||||
desc = "It's a little robot."
|
||||
icon_state = "pai"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -94,6 +94,25 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/language/machine
|
||||
name = "Encoded Audio Language"
|
||||
desc = "A language of encoded tones that allow for IPCs to communicate auditorily between each other in a manner that allows for easier transfer of information."
|
||||
speech_verb = "beeps"
|
||||
ask_verb = "beeps"
|
||||
exclaim_verb = "loudly beeps"
|
||||
colour = "changeling"
|
||||
key = "6"
|
||||
flags = RESTRICTED | NO_STUTTER
|
||||
syllables = list("beep","beep","beep","beep","beep","boop","boop","boop","bop","bop","dee","dee","doo","doo","hiss","hss","buzz","buzz","bzz","ksssh","keey","wurr","wahh","tzzz")
|
||||
space_chance = 10
|
||||
|
||||
/datum/language/machine/get_random_name()
|
||||
if(prob(70))
|
||||
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
else
|
||||
name = pick(ai_names)
|
||||
return name
|
||||
|
||||
//Syllable Lists
|
||||
/*
|
||||
This list really long, mainly because I can't make up my mind about which mandarin syllables should be removed,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(istype(M) && M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona" && do_merge(M))
|
||||
/mob/living/carbon/alien/diona/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == "help")
|
||||
if(H.species && H.species.name == "Diona" && do_merge(H))
|
||||
return
|
||||
get_scooped(M)
|
||||
get_scooped(H)
|
||||
return
|
||||
..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "mmi_empty"
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
origin_tech = list(TECH_BIO = 3)
|
||||
|
||||
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=1000,"glass"=500)
|
||||
var/construction_time = 75
|
||||
@@ -134,7 +134,7 @@
|
||||
/obj/item/device/mmi/radio_enabled
|
||||
name = "radio-enabled man-machine interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
|
||||
origin_tech = "biotech=4"
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
|
||||
var/obj/item/device/radio/radio = null//Let's give it a radio.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = "biotech=3"
|
||||
origin_tech = list(TECH_BIO = 3)
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
|
||||
@@ -92,4 +92,4 @@
|
||||
desc = "A tightly furled roll of paper, covered with indecipherable runes."
|
||||
robotic = 2
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
icon_state = "scroll"
|
||||
|
||||
@@ -4,48 +4,42 @@
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "posibrain"
|
||||
w_class = 3
|
||||
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
|
||||
|
||||
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
|
||||
var/searching = 0
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_time = 75
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
req_access = list(access_robotics)
|
||||
locked = 0
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/New()
|
||||
..()
|
||||
brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
brainmob.real_name = src.brainmob.name
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
/obj/item/device/mmi/digital/posibrain/attack_self(var/mob/user)
|
||||
if(brainmob && !brainmob.key && !searching)
|
||||
//Start the process of searching for a new user.
|
||||
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
|
||||
user << "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>"
|
||||
icon_state = "posibrain-searching"
|
||||
src.searching = 1
|
||||
src.request_player()
|
||||
searching = 1
|
||||
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
|
||||
G.request_player(brainmob, "A [src.name] has been booted by \the [user] in [get_area(user)]. ")
|
||||
spawn(600) reset_search()
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(!O.MayRespawn())
|
||||
continue
|
||||
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_AI)
|
||||
question(O.client)
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(response == "Yes")
|
||||
response = alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
|
||||
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_AI
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/attack_ghost(var/mob/dead/observer/user)
|
||||
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
|
||||
if(!G.assess_candidate(user))
|
||||
return
|
||||
var/response = alert(user, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
if(G.transfer_personality(user, brainmob))
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='notice'>\The [src] chimes quietly.</span>")
|
||||
searching = 0
|
||||
name = "positronic brain ([brainmob.name])"
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
|
||||
..()
|
||||
@@ -55,33 +49,13 @@
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/transfer_personality(var/mob/candidate)
|
||||
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
|
||||
src.searching = 0
|
||||
src.brainmob.mind = candidate.mind
|
||||
src.brainmob.ckey = candidate.ckey
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
|
||||
src.brainmob.mind.assigned_role = "Positronic Brain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain chimes quietly.")
|
||||
icon_state = "posibrain-occupied"
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
|
||||
if(src.brainmob && src.brainmob.key) return
|
||||
|
||||
src.searching = 0
|
||||
/obj/item/device/mmi/digital/posibrain/proc/reset_search()
|
||||
if(!searching || (src.brainmob && src.brainmob.key))
|
||||
return
|
||||
searching = 0
|
||||
icon_state = "posibrain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='notice'>\The [src] brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
|
||||
if(!..(user))
|
||||
@@ -115,7 +89,3 @@
|
||||
src.brainmob.emp_damage += rand(0,10)
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/New()
|
||||
..()
|
||||
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
src.brainmob.real_name = src.brainmob.name
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "mainboard"
|
||||
w_class = 3
|
||||
origin_tech = "engineering=4;materials=3;programming=4"
|
||||
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
|
||||
|
||||
/obj/item/device/mmi/digital/robot/New()
|
||||
..()
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
/mob/living/carbon/proc/breathe()
|
||||
//if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
if(species && (species.flags & NO_BREATHE || species.flags & IS_SYNTHETIC)) return
|
||||
|
||||
if(species && (species.flags & NO_BREATHE)) return
|
||||
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
|
||||
//First, check if we can breathe at all
|
||||
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
|
||||
losebreath--
|
||||
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
|
||||
@@ -17,9 +17,9 @@
|
||||
else
|
||||
//Okay, we can breathe, now check if we can get air
|
||||
breath = get_breath_from_internal() //First, check for air from internals
|
||||
if(!breath)
|
||||
if(!breath)
|
||||
breath = get_breath_from_environment() //No breath from internals so let's try to get air from our location
|
||||
|
||||
|
||||
handle_breath(breath)
|
||||
handle_post_breath(breath)
|
||||
|
||||
@@ -40,15 +40,15 @@
|
||||
|
||||
/mob/living/carbon/proc/get_breath_from_environment(var/volume_needed=BREATH_VOLUME)
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
|
||||
var/datum/gas_mixture/environment
|
||||
if(loc)
|
||||
environment = loc.return_air_for_internal_lifeform()
|
||||
|
||||
|
||||
if(environment)
|
||||
breath = environment.remove_volume(volume_needed)
|
||||
handle_chemical_smoke(environment) //handle chemical smoke while we're at it
|
||||
|
||||
|
||||
if(breath)
|
||||
//handle mask filtering
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
|
||||
|
||||
@@ -132,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
|
||||
@@ -249,7 +249,7 @@
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
if(player_logged)
|
||||
if(!client || !key || player_logged)
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
|
||||
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
|
||||
else if(lying || src.sleeping)
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
b_skin = blue
|
||||
|
||||
force_update_limbs()
|
||||
update_body()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_skin_tone(var/tone)
|
||||
@@ -127,6 +128,7 @@
|
||||
s_tone = tone
|
||||
|
||||
force_update_limbs()
|
||||
update_body()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/update_dna()
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
switch(act)
|
||||
if ("airguitar")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
|
||||
message = "is strumming the air and headbanging like a safari chimp."
|
||||
m_type = 1
|
||||
|
||||
if ("blink")
|
||||
message = "<B>[src]</B> blinks."
|
||||
message = "blinks."
|
||||
m_type = 1
|
||||
|
||||
if ("blink_r")
|
||||
message = "<B>[src]</B> blinks rapidly."
|
||||
message = "blinks rapidly."
|
||||
m_type = 1
|
||||
|
||||
if ("bow")
|
||||
@@ -44,9 +44,9 @@
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> bows to [param]."
|
||||
message = "bows to [param]."
|
||||
else
|
||||
message = "<B>[src]</B> bows."
|
||||
message = "bows."
|
||||
m_type = 1
|
||||
|
||||
if ("custom")
|
||||
@@ -94,73 +94,73 @@
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> salutes to [param]."
|
||||
message = "salutes to [param]."
|
||||
else
|
||||
message = "<B>[src]</b> salutes."
|
||||
message = "salutes."
|
||||
m_type = 1
|
||||
|
||||
if ("choke")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> clutches his throat desperately!"
|
||||
message = "clutches his throat desperately!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chokes!"
|
||||
message = "chokes!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
message = "makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("clap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> claps."
|
||||
message = "claps."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
if ("flap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps \his wings."
|
||||
message = "flaps [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] wings."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps \his wings ANGRILY!"
|
||||
message = "flaps [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] wings ANGRILY!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("drool")
|
||||
message = "<B>[src]</B> drools."
|
||||
message = "drools."
|
||||
m_type = 1
|
||||
|
||||
if ("eyebrow")
|
||||
message = "<B>[src]</B> raises an eyebrow."
|
||||
message = "raises an eyebrow."
|
||||
m_type = 1
|
||||
|
||||
if ("chuckle")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to chuckle."
|
||||
message = "appears to chuckle."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chuckles."
|
||||
message = "chuckles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
message = "makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("twitch")
|
||||
message = "<B>[src]</B> twitches violently."
|
||||
message = "twitches violently."
|
||||
m_type = 1
|
||||
|
||||
if ("twitch_s")
|
||||
message = "<B>[src]</B> twitches."
|
||||
message = "twitches."
|
||||
m_type = 1
|
||||
|
||||
if ("faint")
|
||||
message = "<B>[src]</B> faints."
|
||||
message = "faints."
|
||||
if(src.sleeping)
|
||||
return //Can't faint while asleep
|
||||
src.sleeping += 10 //Short-short nap
|
||||
@@ -168,58 +168,58 @@
|
||||
|
||||
if ("cough")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to cough!"
|
||||
message = "appears to cough!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> coughs!"
|
||||
message = "coughs!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
message = "makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("frown")
|
||||
message = "<B>[src]</B> frowns."
|
||||
message = "frowns."
|
||||
m_type = 1
|
||||
|
||||
if ("nod")
|
||||
message = "<B>[src]</B> nods."
|
||||
message = "nods."
|
||||
m_type = 1
|
||||
|
||||
if ("blush")
|
||||
message = "<B>[src]</B> blushes."
|
||||
message = "blushes."
|
||||
m_type = 1
|
||||
|
||||
if ("wave")
|
||||
message = "<B>[src]</B> waves."
|
||||
message = "waves."
|
||||
m_type = 1
|
||||
|
||||
if ("gasp")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to be gasping!"
|
||||
message = "appears to be gasping!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> gasps!"
|
||||
message = "gasps!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
message = "makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("deathgasp")
|
||||
message = "<B>[src]</B> [species.death_message]"
|
||||
message = "[species.death_message]"
|
||||
m_type = 1
|
||||
|
||||
if ("giggle")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> giggles silently!"
|
||||
message = "giggles silently!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> giggles."
|
||||
message = "giggles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
message = "makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("glare")
|
||||
@@ -233,9 +233,9 @@
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> glares at [param]."
|
||||
message = "glares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> glares."
|
||||
message = "glares."
|
||||
|
||||
if ("stare")
|
||||
var/M = null
|
||||
@@ -248,9 +248,9 @@
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> stares at [param]."
|
||||
message = "stares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> stares."
|
||||
message = "stares."
|
||||
|
||||
if ("look")
|
||||
var/M = null
|
||||
@@ -264,86 +264,86 @@
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> looks at [param]."
|
||||
message = "looks at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> looks."
|
||||
message = "looks."
|
||||
m_type = 1
|
||||
|
||||
if ("grin")
|
||||
message = "<B>[src]</B> grins."
|
||||
message = "grins."
|
||||
m_type = 1
|
||||
|
||||
if ("cry")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> cries."
|
||||
message = "cries."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> cries."
|
||||
message = "cries."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise. \He frowns."
|
||||
message = "makes a weak noise. [get_visible_gender() == MALE ? "He" : get_visible_gender() == FEMALE ? "She" : "They"] [get_visible_gender() == NEUTER ? "frown" : "frowns"]."
|
||||
m_type = 2
|
||||
|
||||
if ("sigh")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> sighs."
|
||||
message = "sighs."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sighs."
|
||||
message = "sighs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
message = "makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("laugh")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> acts out a laugh."
|
||||
message = "acts out a laugh."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> laughs."
|
||||
message = "laughs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
message = "makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("mumble")
|
||||
message = "<B>[src]</B> mumbles!"
|
||||
message = "mumbles!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("grumble")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
message = "grumbles!"
|
||||
m_type = 1
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
message = "grumbles!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
message = "makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("groan")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to groan!"
|
||||
message = "appears to groan!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> groans!"
|
||||
message = "groans!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a loud noise."
|
||||
message = "makes a loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("moan")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to moan!"
|
||||
message = "appears to moan!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> moans!"
|
||||
message = "moans!"
|
||||
m_type = 2
|
||||
|
||||
if ("johnny")
|
||||
@@ -354,10 +354,10 @@
|
||||
param = null
|
||||
else
|
||||
if(miming)
|
||||
message = "<B>[src]</B> takes a drag from a cigarette and blows \"[M]\" out in smoke."
|
||||
message = "takes a drag from a cigarette and blows \"[M]\" out in smoke."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
|
||||
message = "says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
|
||||
m_type = 2
|
||||
|
||||
if ("point")
|
||||
@@ -370,26 +370,26 @@
|
||||
break
|
||||
|
||||
if (!M)
|
||||
message = "<B>[src]</B> points."
|
||||
message = "points."
|
||||
else
|
||||
pointed(M)
|
||||
|
||||
if (M)
|
||||
message = "<B>[src]</B> points to [M]."
|
||||
message = "points to [M]."
|
||||
else
|
||||
m_type = 1
|
||||
|
||||
if ("raise")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> raises a hand."
|
||||
message = "raises a hand."
|
||||
m_type = 1
|
||||
|
||||
if("shake")
|
||||
message = "<B>[src]</B> shakes \his head."
|
||||
message = "shakes [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] head."
|
||||
m_type = 1
|
||||
|
||||
if ("shrug")
|
||||
message = "<B>[src]</B> shrugs."
|
||||
message = "shrugs."
|
||||
m_type = 1
|
||||
|
||||
if ("signal")
|
||||
@@ -397,85 +397,85 @@
|
||||
var/t1 = round(text2num(param))
|
||||
if (isnum(t1))
|
||||
if (t1 <= 5 && (!src.r_hand || !src.l_hand))
|
||||
message = "<B>[src]</B> raises [t1] finger\s."
|
||||
message = "raises [t1] finger\s."
|
||||
else if (t1 <= 10 && (!src.r_hand && !src.l_hand))
|
||||
message = "<B>[src]</B> raises [t1] finger\s."
|
||||
message = "raises [t1] finger\s."
|
||||
m_type = 1
|
||||
|
||||
if ("smile")
|
||||
message = "<B>[src]</B> smiles."
|
||||
message = "smiles."
|
||||
m_type = 1
|
||||
|
||||
if ("shiver")
|
||||
message = "<B>[src]</B> shivers."
|
||||
message = "shivers."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("pale")
|
||||
message = "<B>[src]</B> goes pale for a second."
|
||||
message = "goes pale for a second."
|
||||
m_type = 1
|
||||
|
||||
if ("tremble")
|
||||
message = "<B>[src]</B> trembles in fear!"
|
||||
message = "trembles in fear!"
|
||||
m_type = 1
|
||||
|
||||
if ("sneeze")
|
||||
if (miming)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
message = "sneezes."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
message = "sneezes."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strange noise."
|
||||
message = "makes a strange noise."
|
||||
m_type = 2
|
||||
|
||||
if ("sniff")
|
||||
message = "<B>[src]</B> sniffs."
|
||||
message = "sniffs."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("snore")
|
||||
if (miming)
|
||||
message = "<B>[src]</B> sleeps soundly."
|
||||
message = "sleeps soundly."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> snores."
|
||||
message = "snores."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
message = "makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("whimper")
|
||||
if (miming)
|
||||
message = "<B>[src]</B> appears hurt."
|
||||
message = "appears hurt."
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> whimpers."
|
||||
message = "whimpers."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
message = "makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("wink")
|
||||
message = "<B>[src]</B> winks."
|
||||
message = "winks."
|
||||
m_type = 1
|
||||
|
||||
if ("yawn")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> yawns."
|
||||
message = "yawns."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("collapse")
|
||||
Paralyse(2)
|
||||
message = "<B>[src]</B> collapses!"
|
||||
message = "collapses!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
@@ -493,9 +493,9 @@
|
||||
M = null
|
||||
|
||||
if (M)
|
||||
message = "<B>[src]</B> hugs [M]."
|
||||
message = "hugs [M]."
|
||||
else
|
||||
message = "<B>[src]</B> hugs \himself."
|
||||
message = "hugs [get_visible_gender() == MALE ? "himself" : get_visible_gender() == FEMALE ? "herself" : "themselves"]."
|
||||
|
||||
if ("handshake")
|
||||
m_type = 1
|
||||
@@ -511,9 +511,9 @@
|
||||
|
||||
if (M)
|
||||
if (M.canmove && !M.r_hand && !M.restrained())
|
||||
message = "<B>[src]</B> shakes hands with [M]."
|
||||
message = "shakes hands with [M]."
|
||||
else
|
||||
message = "<B>[src]</B> holds out \his hand to [M]."
|
||||
message = "holds out [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] hand to [M]."
|
||||
|
||||
if("dap")
|
||||
m_type = 1
|
||||
@@ -525,20 +525,20 @@
|
||||
M = A
|
||||
break
|
||||
if (M)
|
||||
message = "<B>[src]</B> gives daps to [M]."
|
||||
message = "gives daps to [M]."
|
||||
else
|
||||
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
|
||||
message = "sadly can't find anybody to give daps to, and daps [get_visible_gender() == MALE ? "himself" : get_visible_gender() == FEMALE ? "herself" : "themselves"]. Shameful."
|
||||
|
||||
if ("scream")
|
||||
if (miming)
|
||||
message = "<B>[src]</B> acts out a scream!"
|
||||
message = "acts out a scream!"
|
||||
m_type = 1
|
||||
else
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> screams!"
|
||||
message = "screams!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
message = "makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if("swish")
|
||||
@@ -569,23 +569,7 @@ wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if(!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players
|
||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in get_mobs_in_view(world.view,src))
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
|
||||
O.show_message(message, m_type)
|
||||
custom_emote(m_type,message)
|
||||
|
||||
|
||||
/mob/living/carbon/human/verb/pose()
|
||||
@@ -593,7 +577,7 @@ wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text)
|
||||
pose = sanitize(input(usr, "This is [src]. [get_visible_gender() == MALE ? "He" : get_visible_gender() == FEMALE ? "She" : "They"] [get_visible_gender() == NEUTER ? "are" : "is"]...", "Pose", null) as text)
|
||||
|
||||
/mob/living/carbon/human/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
if(!key)
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n"
|
||||
else if(!client)
|
||||
msg += "[t_He] [t_has] suddenly fallen asleep.\n"
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep.</span>\n"
|
||||
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
var/list/organ_data = species.has_limbs[organ_tag]
|
||||
var/organ_descriptor = organ_data["descriptor"]
|
||||
is_destroyed["[organ_data["descriptor"]]"] = 1
|
||||
is_destroyed["organ_descriptor"] = 1
|
||||
|
||||
var/obj/item/organ/external/E = organs_by_name[organ_tag]
|
||||
if(!E)
|
||||
@@ -264,21 +264,21 @@
|
||||
else if(E.is_stump())
|
||||
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
|
||||
else
|
||||
is_destroyed["organ_descriptor"] = 0
|
||||
continue
|
||||
|
||||
for(var/obj/item/organ/external/temp in organs)
|
||||
if(temp)
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
if(!species.flags & IS_SYNTHETIC)
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
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[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
|
||||
is_bleeding["[temp.name]"] = "<span class='danger'>[capitalize(t_his)] [temp.name] is bleeding!</span><br>"
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
if(temp.dislocated == 2)
|
||||
@@ -288,41 +288,56 @@
|
||||
|
||||
//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.
|
||||
|
||||
// ***********************************************************************************
|
||||
// THIS NEEDS TO BE ENTIRELY REWRITTEN. Commenting out for now, BADLY NEEDS REWRITING.
|
||||
// ***********************************************************************************
|
||||
|
||||
/*
|
||||
var/display_chest = 0
|
||||
var/display_shoes = 0
|
||||
var/display_gloves = 0
|
||||
|
||||
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
|
||||
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["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"]
|
||||
else if(is_bleeding["left arm"])
|
||||
display_chest = 1
|
||||
|
||||
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["left hand"]
|
||||
else if(is_bleeding["left hand"])
|
||||
display_gloves = 1
|
||||
|
||||
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["right arm"]
|
||||
else if(is_bleeding["right arm"])
|
||||
display_chest = 1
|
||||
|
||||
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
display_gloves = 1
|
||||
|
||||
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"]
|
||||
else if(is_bleeding["left leg"])
|
||||
display_chest = 1
|
||||
|
||||
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
|
||||
msg += wound_flavor_text["left foot"]
|
||||
else if(is_bleeding["left foot"])
|
||||
@@ -335,19 +350,25 @@
|
||||
msg += wound_flavor_text["right foot"]
|
||||
else if(is_bleeding["right foot"])
|
||||
display_shoes = 1
|
||||
|
||||
if(display_chest)
|
||||
msg += "<span class='danger'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(display_shoes)
|
||||
msg += "<span class='danger'>[src] has blood running from [t_his] shoes!</span>\n"
|
||||
if(display_gloves)
|
||||
msg += "<span class='danger'>[src] has blood running from under [t_his] gloves!</span>\n"
|
||||
*/
|
||||
|
||||
for(var/limb in wound_flavor_text)
|
||||
msg += wound_flavor_text[limb]
|
||||
is_bleeding[limb] = null
|
||||
for(var/limb in is_bleeding)
|
||||
msg += is_bleeding[limb]
|
||||
for(var/implant in get_visible_implants(0))
|
||||
msg += "<span class='danger'>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
|
||||
|
||||
if(hasHUD(usr,"security"))
|
||||
var/perpname = "wot"
|
||||
var/criminal = "None"
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
|
||||
stat(null, "Intent: [a_intent]")
|
||||
stat(null, "Move Mode: [m_intent]")
|
||||
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
|
||||
if(malf.revealed)
|
||||
stat(null, "Time left: [max(malf.hack_time/(malf.hacked_apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
@@ -746,10 +743,17 @@
|
||||
xylophone=0
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/check_has_mouth()
|
||||
// Todo, check stomach organ when implemented.
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
if(!H || !H.can_intake_reagents)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/vomit()
|
||||
|
||||
if(species.flags & IS_SYNTHETIC)
|
||||
return //Machines don't throw up.
|
||||
if(!check_has_mouth())
|
||||
return
|
||||
|
||||
if(!lastpuke)
|
||||
lastpuke = 1
|
||||
@@ -1026,7 +1030,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)
|
||||
@@ -1061,30 +1065,28 @@
|
||||
set src in view(1)
|
||||
var/self = 0
|
||||
|
||||
if(usr.stat == 1 || usr.restrained() || !isliving(usr)) return
|
||||
if(usr.stat || usr.restrained() || !isliving(usr)) return
|
||||
|
||||
if(usr == src)
|
||||
self = 1
|
||||
if(!self)
|
||||
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
|
||||
usr.visible_message("<span class='notice'>[usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.</span>",\
|
||||
"You begin counting [src]'s pulse")
|
||||
else
|
||||
usr.visible_message("\blue [usr] begins counting their pulse.",\
|
||||
usr.visible_message("<span class='notice'>[usr] begins counting their pulse.</span>",\
|
||||
"You begin counting your pulse.")
|
||||
|
||||
if(src.pulse)
|
||||
usr << "\blue [self ? "You have a" : "[src] has a"] pulse! Counting..."
|
||||
usr << "<span class='notice'>[self ? "You have a" : "[src] has a"] pulse! Counting...</span>"
|
||||
else
|
||||
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
|
||||
usr << "<span class='danger'>[src] has no pulse!</span>" //it is REALLY UNLIKELY that a dead person would check his own pulse
|
||||
return
|
||||
|
||||
usr << "Don't move until counting is finished."
|
||||
var/time = world.time
|
||||
sleep(60)
|
||||
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
|
||||
usr << "You moved while counting. Try again."
|
||||
usr << "You must[self ? "" : " both"] remain still until counting is finished."
|
||||
if(do_mob(usr, src, 60))
|
||||
usr << "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>"
|
||||
else
|
||||
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
|
||||
usr << "<span class='warning'>You failed to check the pulse. Try again.</span>"
|
||||
|
||||
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour)
|
||||
|
||||
@@ -1219,16 +1221,26 @@
|
||||
else
|
||||
target_zone = user.zone_sel.selecting
|
||||
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
var/obj/item/organ/external/affecting = get_organ(target_zone)
|
||||
var/fail_msg
|
||||
if(!affecting)
|
||||
. = 0
|
||||
fail_msg = "They are missing that limb."
|
||||
else if (affecting.status & ORGAN_ROBOT)
|
||||
. = 0
|
||||
fail_msg = "That limb is robotic."
|
||||
else
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
if(!. && error_msg && user)
|
||||
// Might need re-wording.
|
||||
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"
|
||||
if(!fail_msg)
|
||||
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
|
||||
user << "<span class='alert'>[fail_msg]</span>"
|
||||
|
||||
/mob/living/carbon/human/print_flavor_text(var/shrink = 1)
|
||||
var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes)
|
||||
|
||||
@@ -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)
|
||||
@@ -47,6 +48,12 @@
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
|
||||
if(!H.check_has_mouth())
|
||||
H << "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if(!check_has_mouth())
|
||||
H << "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
@@ -95,6 +102,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
|
||||
@@ -176,8 +184,13 @@
|
||||
miss_type = 2
|
||||
|
||||
// See what attack they use
|
||||
var/possible_moves = list()
|
||||
var/datum/unarmed_attack/attack = null
|
||||
for(var/datum/unarmed_attack/u_attack in H.species.unarmed_attacks)
|
||||
for(var/part in list("l_hand","r_hand","l_foot","r_foot","head"))
|
||||
var/obj/item/organ/external/E = H.get_organ(part)
|
||||
possible_moves |= E.species.unarmed_attacks
|
||||
|
||||
for(var/datum/unarmed_attack/u_attack in possible_moves)
|
||||
if(!u_attack.is_usable(H, src, hit_zone))
|
||||
continue
|
||||
else
|
||||
@@ -186,6 +199,7 @@
|
||||
if(!attack)
|
||||
return 0
|
||||
|
||||
H.do_attack_animation(src)
|
||||
if(!attack_message)
|
||||
attack.show_attack(H, src, hit_zone, rand_damage)
|
||||
else
|
||||
@@ -220,6 +234,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)
|
||||
@@ -278,6 +293,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))
|
||||
|
||||
@@ -142,12 +142,12 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/getCloneLoss()
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/setCloneLoss(var/amount)
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
else
|
||||
..()
|
||||
@@ -155,7 +155,7 @@
|
||||
/mob/living/carbon/human/adjustCloneLoss(var/amount)
|
||||
..()
|
||||
|
||||
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
|
||||
if(species.flags & (NO_SCAN))
|
||||
cloneloss = 0
|
||||
return
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
/mob/living/carbon/human/proc/get_damageable_organs()
|
||||
var/list/obj/item/organ/external/parts = list()
|
||||
for(var/obj/item/organ/external/O in organs)
|
||||
if(O.brute_dam + O.burn_dam < O.max_damage)
|
||||
if(O.is_damageable())
|
||||
parts += O
|
||||
return parts
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -179,12 +179,6 @@ emp_act
|
||||
for(var/obj/O in src)
|
||||
if(!O) continue
|
||||
O.emp_act(severity)
|
||||
for(var/obj/item/organ/external/O in organs)
|
||||
if(O.status & ORGAN_DESTROYED) continue
|
||||
O.emp_act(severity)
|
||||
for(var/obj/item/organ/I in O.internal_organs)
|
||||
if(I.robotic == 0) continue
|
||||
I.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,18 @@
|
||||
var/obj/item/organ/external/E = organs_by_name[limb_tag]
|
||||
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)))
|
||||
stance_damage += 2 // let it fail even if just foot&leg
|
||||
else if (E.is_malfunctioning() || E.is_broken() || !E.is_usable())
|
||||
else if (E.is_malfunctioning())
|
||||
//malfunctioning only happens intermittently so treat it as a missing limb when it procs
|
||||
stance_damage += 2
|
||||
if(prob(10))
|
||||
visible_message("\The [src]'s [E.name] [pick("twitches", "shudders")] and sparks!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new ()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
qdel(spark_system)
|
||||
else if (E.is_broken() || !E.is_usable())
|
||||
stance_damage += 1
|
||||
else if (E.is_dislocated())
|
||||
stance_damage += 0.5
|
||||
@@ -94,7 +105,27 @@
|
||||
Weaken(5) //can't emote while weakened, apparently.
|
||||
|
||||
/mob/living/carbon/human/proc/handle_grasp()
|
||||
if(!l_hand && !r_hand)
|
||||
return
|
||||
|
||||
// You should not be able to pick anything up, but stranger things have happened.
|
||||
if(l_hand)
|
||||
for(var/limb_tag in list("l_hand","l_arm"))
|
||||
var/obj/item/organ/external/E = get_organ(limb_tag)
|
||||
if(!E)
|
||||
visible_message("<span class='danger'>Lacking a functioning left hand, \the [src] drops \the [l_hand].</span>")
|
||||
drop_from_inventory(l_hand)
|
||||
break
|
||||
|
||||
if(r_hand)
|
||||
for(var/limb_tag in list("r_hand","r_arm"))
|
||||
var/obj/item/organ/external/E = get_organ(limb_tag)
|
||||
if(!E)
|
||||
visible_message("<span class='danger'>Lacking a functioning right hand, \the [src] drops \the [r_hand].</span>")
|
||||
drop_from_inventory(r_hand)
|
||||
break
|
||||
|
||||
// Check again...
|
||||
if(!l_hand && !r_hand)
|
||||
return
|
||||
|
||||
@@ -118,8 +149,12 @@
|
||||
else if(E.is_malfunctioning())
|
||||
|
||||
if(E.body_part == HAND_LEFT)
|
||||
if(!l_hand)
|
||||
continue
|
||||
drop_from_inventory(l_hand)
|
||||
else
|
||||
if(!r_hand)
|
||||
continue
|
||||
drop_from_inventory(r_hand)
|
||||
|
||||
emote("me", 1, "drops what they were holding, their [E.name] malfunctioning!")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -258,9 +258,6 @@
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if(species.flags & IS_SYNTHETIC) //Robots don't suffer from mutations or radloss.
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
heal_organ_damage(0,1)
|
||||
@@ -709,9 +706,9 @@
|
||||
*/
|
||||
|
||||
proc/stabilize_body_temperature()
|
||||
if (species.flags & IS_SYNTHETIC)
|
||||
bodytemperature += species.synth_temp_gain //just keep putting out heat.
|
||||
return
|
||||
|
||||
if (species.passive_temp_gain) // We produce heat naturally.
|
||||
bodytemperature += species.passive_temp_gain
|
||||
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
|
||||
@@ -858,15 +855,16 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
|
||||
if(reagents)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
var/alien = 0
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
touching.metabolize(alien, CHEM_TOUCH)
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
@@ -931,7 +929,8 @@
|
||||
take_overall_damage(2,0)
|
||||
traumatic_shock++
|
||||
|
||||
if(!(species.flags & IS_SYNTHETIC)) handle_trace_chems()
|
||||
// TODO: stomach and bloodstream organ.
|
||||
handle_trace_chems()
|
||||
|
||||
updatehealth()
|
||||
|
||||
@@ -942,7 +941,7 @@
|
||||
if(status_flags & GODMODE) return 0
|
||||
|
||||
//SSD check, if a logged player is awake put them back to sleep!
|
||||
if(player_logged && sleeping < 2)
|
||||
if((!client || !key || player_logged) && sleeping < 2)
|
||||
sleeping = 2
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
@@ -1133,7 +1132,7 @@
|
||||
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health <= 0)
|
||||
@@ -1268,7 +1267,7 @@
|
||||
if(2) healths.icon_state = "health7"
|
||||
else
|
||||
//switch(health - halloss)
|
||||
switch(100 - ((species && species.flags & NO_PAIN & !IS_SYNTHETIC) ? 0 : traumatic_shock))
|
||||
switch(100 - ((species.flags & NO_PAIN) ? 0 : traumatic_shock))
|
||||
if(100 to INFINITY) healths.icon_state = "health0"
|
||||
if(80 to 100) healths.icon_state = "health1"
|
||||
if(60 to 80) healths.icon_state = "health2"
|
||||
@@ -1363,11 +1362,11 @@
|
||||
var/obj/item/clothing/glasses/welding/O = glasses
|
||||
if(!O.up)
|
||||
found_welder = 1
|
||||
else if(istype(head, /obj/item/clothing/head/welding))
|
||||
if(!found_welder && istype(head, /obj/item/clothing/head/welding))
|
||||
var/obj/item/clothing/head/welding/O = head
|
||||
if(!O.up)
|
||||
found_welder = 1
|
||||
else if(istype(back, /obj/item/weapon/rig))
|
||||
if(!found_welder && istype(back, /obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/O = back
|
||||
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
||||
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
|
||||
@@ -1504,7 +1503,8 @@
|
||||
|
||||
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
|
||||
@@ -170,8 +170,9 @@
|
||||
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
switch(message_mode)
|
||||
if("intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
for(var/obj/item/device/radio/intercom/I in view(1))
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
I.add_fingerprint(src)
|
||||
used_radios += I
|
||||
if("headset")
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
|
||||
var/is_small
|
||||
var/show_ssd = 1
|
||||
var/virus_immune
|
||||
|
||||
// Language/culture vars.
|
||||
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
|
||||
@@ -69,7 +70,7 @@
|
||||
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
||||
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
||||
var/heat_level_3 = 1000 // Heat damage level 3 above this point.
|
||||
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
|
||||
var/passive_temp_gain = 0 // Species will gain this much temperature every second
|
||||
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
||||
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
|
||||
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
|
||||
@@ -213,14 +214,10 @@
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
O.owner = H
|
||||
|
||||
if(flags & IS_SYNTHETIC)
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
|
||||
E.robotize()
|
||||
for(var/obj/item/organ/I in H.internal_organs)
|
||||
I.robotize()
|
||||
|
||||
/datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target)
|
||||
if (target.holder_type && target.a_intent == "help" && H.a_intent == "help")
|
||||
target.get_scooped(H)
|
||||
return
|
||||
|
||||
var/t_him = "them"
|
||||
switch(target.gender)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
bump_flag = MONKEY
|
||||
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
|
||||
var/holder_type = /obj/item/weapon/holder/monkey
|
||||
|
||||
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
|
||||
if(H.stat != CONSCIOUS)
|
||||
@@ -45,6 +46,10 @@
|
||||
if(prob(1))
|
||||
H.emote(pick("scratch","jump","roll","tail"))
|
||||
|
||||
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
H.holder_type = holder_type
|
||||
|
||||
/datum/species/monkey/get_random_name()
|
||||
return "[lowertext(name)] ([rand(100,999)])"
|
||||
|
||||
@@ -60,6 +65,7 @@
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
tail = "farwatail"
|
||||
holder_type = /obj/item/weapon/holder/monkey/farwa
|
||||
|
||||
/datum/species/monkey/skrell
|
||||
name = "Neara"
|
||||
@@ -74,6 +80,7 @@
|
||||
blood_color = "#1D2CBF"
|
||||
reagent_tag = IS_SKRELL
|
||||
tail = null
|
||||
holder_type = /obj/item/weapon/holder/monkey/neaera
|
||||
|
||||
/datum/species/monkey/unathi
|
||||
name = "Stok"
|
||||
@@ -88,3 +95,4 @@
|
||||
flesh_color = "#34AF10"
|
||||
base_color = "#066000"
|
||||
reagent_tag = IS_UNATHI
|
||||
holder_type = /obj/item/weapon/holder/monkey/stok
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
language = "Sol Common" //todo?
|
||||
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
|
||||
flags = IS_RESTRICTED | NO_BLOOD | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
siemens_coefficient = 3
|
||||
darksight = 3
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
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)
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/unbreakable),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/unbreakable),
|
||||
"head" = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable)
|
||||
)
|
||||
|
||||
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
|
||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
||||
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP | REGENERATES_LIMBS
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP
|
||||
|
||||
blood_color = "#004400"
|
||||
flesh_color = "#907E4A"
|
||||
@@ -231,21 +231,28 @@
|
||||
else
|
||||
qdel(D)
|
||||
|
||||
H.visible_message("\red[H] splits apart with a wet slithering noise!")
|
||||
H.visible_message("<span class='danger'>[H] splits apart with a wet slithering noise!</span>")
|
||||
|
||||
/datum/species/machine
|
||||
name = "Machine"
|
||||
name_plural = "machines"
|
||||
|
||||
blurb = "Positronic intelligence really took off in the 26th century, and it is not uncommon to see independant, free-willed \
|
||||
robots on many human stations, particularly in fringe systems where standards are slightly lax and public opinion less relevant \
|
||||
to corporate operations. IPCs (Integrated Positronic Chassis) are a loose category of self-willed robots with a humanoid form, \
|
||||
generally self-owned after being 'born' into servitude; they are reliable and dedicated workers, albeit more than slightly \
|
||||
inhuman in outlook and perspective."
|
||||
|
||||
icobase = 'icons/mob/human_races/r_machine.dmi'
|
||||
deform = 'icons/mob/human_races/r_machine.dmi'
|
||||
language = "Tradeband"
|
||||
|
||||
language = "Encoded Audio Language"
|
||||
unarmed_types = list(/datum/unarmed_attack/punch)
|
||||
rarity_value = 2
|
||||
|
||||
eyes = "blank_eyes"
|
||||
brute_mod = 0.5
|
||||
burn_mod = 1
|
||||
brute_mod = 2.5 // 100% * 2.5 * 0.6 (robolimbs) ~= 150%
|
||||
burn_mod = 2.5 // So they take 50% extra damage from brute/burn overall.
|
||||
|
||||
warning_low_pressure = 50
|
||||
hazard_low_pressure = 0
|
||||
@@ -254,24 +261,41 @@
|
||||
cold_level_2 = -1
|
||||
cold_level_3 = -1
|
||||
|
||||
heat_level_1 = 500 //gives them about 25 seconds in space before taking damage
|
||||
heat_level_1 = 500 // Gives them about 25 seconds in space before taking damage
|
||||
heat_level_2 = 1000
|
||||
heat_level_3 = 2000
|
||||
|
||||
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
passive_temp_gain = 10 // This should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
siemens_coefficient = 0 // Insulated.
|
||||
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
|
||||
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_POISON
|
||||
|
||||
blood_color = "#1F181F"
|
||||
flesh_color = "#575757"
|
||||
virus_immune = 1
|
||||
reagent_tag = IS_MACHINE
|
||||
|
||||
has_organ = list() //TODO: Positronic brain.
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/mmi_holder/posibrain,
|
||||
"cell" = /obj/item/organ/cell
|
||||
)
|
||||
|
||||
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/ipc),
|
||||
"head" = list("path" = /obj/item/organ/external/head/ipc),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/ipc),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/ipc),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/ipc),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/ipc),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
|
||||
)
|
||||
|
||||
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
if(flags & IS_SYNTHETIC)
|
||||
H.h_style = ""
|
||||
spawn(100)
|
||||
if(H) H.update_hair()
|
||||
H.h_style = ""
|
||||
spawn(100)
|
||||
if(H) H.update_hair()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -234,15 +234,13 @@ var/global/list/damage_icon_parts = list()
|
||||
var/hulk = (HULK in src.mutations)
|
||||
var/skeleton = (SKELETON in src.mutations)
|
||||
|
||||
var/g = (gender == FEMALE ? "f" : "m")
|
||||
|
||||
//CACHING: Generate an index key from visible bodyparts.
|
||||
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
|
||||
//Create a new, blank icon for our mob to use.
|
||||
if(stand_icon)
|
||||
qdel(stand_icon)
|
||||
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
|
||||
var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]"
|
||||
var/icon_key = ""
|
||||
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||
|
||||
if(eyes)
|
||||
@@ -260,7 +258,12 @@ var/global/list/damage_icon_parts = list()
|
||||
icon_key += "3"
|
||||
else
|
||||
icon_key += "1"
|
||||
|
||||
if(part)
|
||||
icon_key += "[part.species.race_key]"
|
||||
icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]"
|
||||
icon_key += "[part.dna.GetUIValue(DNA_UI_SKIN_TONE)]"
|
||||
if(part.s_col)
|
||||
icon_key += "[rgb(part.s_col[1],part.s_col[2],part.s_col[3])]"
|
||||
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
|
||||
|
||||
var/icon/base_icon
|
||||
@@ -894,22 +897,22 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
/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)
|
||||
|
||||
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
|
||||
@@ -919,30 +922,30 @@ var/global/list/damage_icon_parts = list()
|
||||
//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()
|
||||
|
||||
@@ -951,14 +954,14 @@ var/global/list/damage_icon_parts = list()
|
||||
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()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
origin_tech = "biotech=4"
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/Uses = 1 // uses before it goes inert
|
||||
var/enhanced = 0 //has it been enhanced before?
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 2
|
||||
throw_range = 6
|
||||
origin_tech = "biotech=4"
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/POWERFLAG = 0 // sshhhhhhh
|
||||
var/Flush = 30
|
||||
var/Uses = 5 // uses before it goes inert
|
||||
@@ -327,7 +327,7 @@
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "slime egg-growing"
|
||||
bitesize = 12
|
||||
origin_tech = "biotech=4"
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/grown = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -777,20 +777,22 @@ 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
|
||||
/mob/living/touch_map_edge()
|
||||
|
||||
//check for nuke disks
|
||||
if(client && stat != DEAD) //if they are clientless and dead don't bother, the parent will treat them as any other container
|
||||
if(ticker && istype(ticker.mode, /datum/game_mode/nuclear)) //only really care if the game mode is nuclear
|
||||
var/datum/game_mode/nuclear/G = ticker.mode
|
||||
if(G.check_mob(src))
|
||||
if(x <= TRANSITIONEDGE)
|
||||
inertia_dir = 4
|
||||
else if(x >= world.maxx -TRANSITIONEDGE)
|
||||
inertia_dir = 8
|
||||
else if(y <= TRANSITIONEDGE)
|
||||
inertia_dir = 1
|
||||
else if(y >= world.maxy -TRANSITIONEDGE)
|
||||
inertia_dir = 2
|
||||
src << "<span class='warning>Something you are carrying is preventing you from leaving.</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -238,17 +238,15 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
italics = 1
|
||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||
|
||||
var/list/hear = hear(message_range, T)
|
||||
var/list/hear = get_mobs_or_objects_in_view(message_range,src)
|
||||
var/list/hearturfs = list()
|
||||
|
||||
for(var/I in hear)
|
||||
if(istype(I, /mob/))
|
||||
if(ismob(I))
|
||||
var/mob/M = I
|
||||
listening += M
|
||||
hearturfs += M.locs[1]
|
||||
for(var/obj/O in M.contents)
|
||||
listening_obj |= O
|
||||
else if(istype(I, /obj/))
|
||||
else if(isobj(I))
|
||||
var/obj/O = I
|
||||
hearturfs += O.locs[1]
|
||||
listening_obj |= O
|
||||
|
||||
@@ -56,26 +56,30 @@ var/list/ai_verbs_default = list(
|
||||
var/obj/item/device/multitool/aiMulti = null
|
||||
var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null
|
||||
var/custom_sprite = 0 //For our custom sprites
|
||||
//Hud stuff
|
||||
|
||||
//MALFUNCTION
|
||||
var/datum/AI_Module/module_picker/malf_picker
|
||||
var/processing_time = 100
|
||||
var/list/datum/AI_Module/current_modules = list()
|
||||
var/fire_res_on_core = 0
|
||||
|
||||
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
|
||||
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
|
||||
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
|
||||
var/mob/living/silicon/ai/parent = null
|
||||
|
||||
var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
|
||||
var/datum/trackable/track = null
|
||||
var/last_announcement = ""
|
||||
var/control_disabled = 0
|
||||
var/datum/announcement/priority/announcement
|
||||
var/obj/machinery/ai_powersupply/psupply = null // Backwards reference to AI's powersupply object.
|
||||
|
||||
//NEWMALF VARIABLES
|
||||
var/malfunctioning = 0 // Master var that determines if AI is malfunctioning.
|
||||
var/datum/malf_hardware/hardware = null // Installed piece of hardware.
|
||||
var/datum/malf_research/research = null // Malfunction research datum.
|
||||
var/obj/machinery/power/apc/hack = null // APC that is currently being hacked.
|
||||
var/list/hacked_apcs = null // List of all hacked APCs
|
||||
var/APU_power = 0 // If set to 1 AI runs on APU power
|
||||
var/hacking = 0 // Set to 1 if AI is hacking APC, cyborg, other AI, or running system override.
|
||||
var/system_override = 0 // Set to 1 if system override is initiated, 2 if succeeded.
|
||||
var/hack_can_fail = 1 // If 0, all abilities have zero chance of failing.
|
||||
var/hack_fails = 0 // This increments with each failed hack, and determines the warning message text.
|
||||
var/errored = 0 // Set to 1 if runtime error occurs. Only way of this happening i can think of is admin fucking up with varedit.
|
||||
var/bombing_core = 0 // Set to 1 if core auto-destruct is activated
|
||||
var/bombing_station = 0 // Set to 1 if station nuke auto-destruct is activated
|
||||
var/override_CPUStorage = 0 // Bonus/Penalty CPU Storage. For use by admins/testers.
|
||||
var/override_CPURate = 0 // Bonus/Penalty CPU generation rate. For use by admins/testers.
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/add_ai_verbs()
|
||||
src.verbs |= ai_verbs_default
|
||||
@@ -203,17 +207,6 @@ var/list/ai_verbs_default = list(
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/proc/system_integrity()
|
||||
return (health-config.health_threshold_dead)/2
|
||||
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/ai/show_system_integrity()
|
||||
// An AI doesn't become inoperable until -100% (or whatever config.health_threshold_dead is set to)
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [system_integrity()]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
/mob/living/silicon/ai/SetName(pickedName as text)
|
||||
..()
|
||||
announcement.announcer = pickedName
|
||||
@@ -240,6 +233,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
|
||||
powered_ai = ai
|
||||
powered_ai.psupply = src
|
||||
if(isnull(powered_ai))
|
||||
qdel(src)
|
||||
|
||||
@@ -250,10 +244,17 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/obj/machinery/ai_powersupply/process()
|
||||
if(!powered_ai || powered_ai.stat & DEAD)
|
||||
qdel()
|
||||
return
|
||||
if(powered_ai.psupply != src) // For some reason, the AI has different powersupply object. Delete this one, it's no longer needed.
|
||||
qdel(src)
|
||||
if(powered_ai.APU_power)
|
||||
use_power = 0
|
||||
return
|
||||
if(!powered_ai.anchored)
|
||||
loc = powered_ai.loc
|
||||
use_power = 0
|
||||
use_power(50000) // Less optimalised but only called if AI is unwrenched. This prevents usage of wrenching as method to keep AI operational without power. Intellicard is for that.
|
||||
if(powered_ai.anchored)
|
||||
use_power = 2
|
||||
|
||||
@@ -277,7 +278,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
if(Entry[1] == src.ckey && Entry[2] == src.real_name)
|
||||
custom_sprite = 1 //They're in the list? Custom sprite time
|
||||
icon = 'icons/mob/custom-synthetic.dmi'
|
||||
icon = CUSTOM_ITEM_SYNTH
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = ""
|
||||
@@ -312,14 +313,7 @@ var/list/ai_verbs_default = list(
|
||||
if("Lonestar") icon_state = "ai-lonestar"
|
||||
if("Nanotrasen") icon_state = "ai-nanotrasen"
|
||||
else icon_state = "ai"
|
||||
//else
|
||||
//usr <<"You can only change your display once!"
|
||||
//return
|
||||
|
||||
// displays the malf_ai information if the AI is the malf
|
||||
/mob/living/silicon/ai/show_malf_ai()
|
||||
if(malf && malf.hacked_apcs.len >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.hack_time/(malf.hacked_apcs/3), 0)] seconds")
|
||||
|
||||
// this verb lets the ai see the stations manifest
|
||||
/mob/living/silicon/ai/proc/ai_roster()
|
||||
@@ -420,11 +414,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/emp_act(severity)
|
||||
if (prob(30))
|
||||
switch(pick(1,2))
|
||||
if(1)
|
||||
view_core()
|
||||
if(2)
|
||||
ai_call_shuttle()
|
||||
view_core()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/Topic(href, href_list)
|
||||
@@ -545,13 +535,6 @@ var/list/ai_verbs_default = list(
|
||||
src << "\blue Switched to [network] camera network."
|
||||
//End of code by Mord_Sith
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/choose_modules()
|
||||
set category = "Malfunction"
|
||||
set name = "Choose Module"
|
||||
|
||||
malf_picker.use(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_statuschange()
|
||||
set category = "AI Commands"
|
||||
set name = "AI Status"
|
||||
@@ -711,5 +694,153 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/proc/is_in_chassis()
|
||||
return istype(loc, /turf)
|
||||
|
||||
|
||||
/mob/living/silicon/ai/ex_act(var/severity)
|
||||
if(severity == 1.0)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
// NEWMALF FUNCTIONS/PROCEDURES
|
||||
|
||||
// Sets up malfunction-related variables, research system and such.
|
||||
/mob/living/silicon/ai/proc/setup_for_malf()
|
||||
var/mob/living/silicon/ai/user = src
|
||||
// Setup Variables
|
||||
malfunctioning = 1
|
||||
research = new/datum/malf_research()
|
||||
research.owner = src
|
||||
hacked_apcs = list()
|
||||
recalc_cpu()
|
||||
|
||||
verbs += new/datum/game_mode/malfunction/verb/ai_select_hardware()
|
||||
verbs += new/datum/game_mode/malfunction/verb/ai_select_research()
|
||||
verbs += new/datum/game_mode/malfunction/verb/ai_help()
|
||||
|
||||
// And greet user with some OOC info.
|
||||
user << "You are malfunctioning, you do not have to follow any laws."
|
||||
user << "Use ai-help command to view relevant information about your abilities"
|
||||
|
||||
// Safely remove malfunction status, fixing hacked APCs and resetting variables.
|
||||
/mob/living/silicon/ai/proc/stop_malf()
|
||||
var/mob/living/silicon/ai/user = src
|
||||
// Generic variables
|
||||
malfunctioning = 0
|
||||
sleep(10)
|
||||
research = null
|
||||
// Fix hacked APCs
|
||||
if(hacked_apcs)
|
||||
for(var/obj/machinery/power/apc/A in hacked_apcs)
|
||||
A.hacker = null
|
||||
hacked_apcs = null
|
||||
// Reset our verbs
|
||||
src.verbs = null
|
||||
add_ai_verbs()
|
||||
// Let them know.
|
||||
user << "You are no longer malfunctioning. Your abilities have been removed."
|
||||
|
||||
// Called every tick. Checks if AI is malfunctioning. If yes calls Process on research datum which handles all logic.
|
||||
/mob/living/silicon/ai/proc/malf_process()
|
||||
if(!malfunctioning)
|
||||
return
|
||||
if(!research)
|
||||
if(!errored)
|
||||
errored = 1
|
||||
error("malf_process() called on AI without research datum. Report this.")
|
||||
message_admins("ERROR: malf_process() called on AI without research datum. If admin modified one of the AI's vars revert the change and don't modify variables directly, instead use ProcCall or admin panels.")
|
||||
spawn(1200)
|
||||
errored = 0
|
||||
return
|
||||
recalc_cpu()
|
||||
if(APU_power || aiRestorePowerRoutine != 0)
|
||||
research.process(1)
|
||||
else
|
||||
research.process(0)
|
||||
|
||||
// Recalculates CPU time gain and storage capacities.
|
||||
/mob/living/silicon/ai/proc/recalc_cpu()
|
||||
// AI Starts with these values.
|
||||
var/cpu_gain = 0.01
|
||||
var/cpu_storage = 10
|
||||
|
||||
// Off-Station APCs should not count towards CPU generation.
|
||||
for(var/obj/machinery/power/apc/A in hacked_apcs)
|
||||
if(A.z in config.station_levels)
|
||||
cpu_gain += 0.002
|
||||
cpu_storage += 10
|
||||
|
||||
research.max_cpu = cpu_storage + override_CPUStorage
|
||||
if(hardware && istype(hardware, /datum/malf_hardware/dual_ram))
|
||||
research.max_cpu = research.max_cpu * 1.5
|
||||
research.stored_cpu = min(research.stored_cpu, research.max_cpu)
|
||||
|
||||
research.cpu_increase_per_tick = cpu_gain + override_CPURate
|
||||
if(hardware && istype(hardware, /datum/malf_hardware/dual_cpu))
|
||||
research.cpu_increase_per_tick = research.cpu_increase_per_tick * 2
|
||||
|
||||
// Starts AI's APU generator
|
||||
/mob/living/silicon/ai/proc/start_apu(var/shutup = 0)
|
||||
if(!hardware || !istype(hardware, /datum/malf_hardware/apu_gen))
|
||||
if(!shutup)
|
||||
src << "You do not have an APU generator and you shouldn't have this verb. Report this."
|
||||
return
|
||||
if(hardware_integrity() < 50)
|
||||
if(!shutup)
|
||||
src << "<span class='notice'>Starting APU... <b>FAULT</b>(System Damaged)</span>"
|
||||
return
|
||||
if(!shutup)
|
||||
src << "Starting APU... ONLINE"
|
||||
APU_power = 1
|
||||
|
||||
// Stops AI's APU generator
|
||||
/mob/living/silicon/ai/proc/stop_apu(var/shutup = 0)
|
||||
if(!hardware || !istype(hardware, /datum/malf_hardware/apu_gen))
|
||||
return
|
||||
|
||||
if(APU_power)
|
||||
APU_power = 0
|
||||
if(!shutup)
|
||||
src << "Shutting down APU... DONE"
|
||||
|
||||
// Returns percentage of AI's remaining backup capacitor charge (maxhealth - oxyloss).
|
||||
/mob/living/silicon/ai/proc/backup_capacitor()
|
||||
return ((200 - getOxyLoss()) / 2)
|
||||
|
||||
// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss))
|
||||
/mob/living/silicon/ai/proc/hardware_integrity()
|
||||
return (health-config.health_threshold_dead)/2
|
||||
|
||||
// Shows capacitor charge and hardware integrity information to the AI in Status tab.
|
||||
/mob/living/silicon/ai/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("Hardware integrity: [hardware_integrity()]%"))
|
||||
stat(null, text("Internal capacitor: [backup_capacitor()]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
// Shows AI Malfunction related information to the AI.
|
||||
/mob/living/silicon/ai/show_malf_ai()
|
||||
if(src.is_malf())
|
||||
if(src.hacked_apcs)
|
||||
stat(null, "Hacked APCs: [src.hacked_apcs.len]")
|
||||
stat(null, "System Status: [src.hacking ? "Busy" : "Stand-By"]")
|
||||
if(src.research)
|
||||
stat(null, "Available CPU: [src.research.stored_cpu] TFlops")
|
||||
stat(null, "Maximal CPU: [src.research.max_cpu] TFlops")
|
||||
stat(null, "CPU generation rate: [src.research.cpu_increase_per_tick] TFlops/s")
|
||||
stat(null, "Current research focus: [src.research.focus ? src.research.focus.name : "None"]")
|
||||
if(src.research.focus)
|
||||
stat(null, "Research completed: [round(src.research.focus.invested, 0.1)]/[round(src.research.focus.price)]")
|
||||
if(system_override == 1)
|
||||
stat(null, "SYSTEM OVERRIDE INITIATED")
|
||||
else if(system_override == 2)
|
||||
stat(null, "SYSTEM OVERRIDE COMPLETED")
|
||||
|
||||
// Cleaner proc for creating powersupply for an AI.
|
||||
/mob/living/silicon/ai/proc/create_powersupply()
|
||||
if(psupply)
|
||||
del(psupply)
|
||||
psupply = new/obj/machinery/ai_powersupply(src)
|
||||
|
||||
#undef AI_CHECK_WIRELESS
|
||||
#undef AI_CHECK_RADIO
|
||||
|
||||
@@ -13,40 +13,6 @@
|
||||
|
||||
remove_ai_verbs(src)
|
||||
|
||||
var/callshuttle = 0
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(commconsole.z == 2)
|
||||
continue
|
||||
if(istype(commconsole.loc,/turf))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if(commboard.z == 2)
|
||||
continue
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
|
||||
if(shuttlecaller.z == 2)
|
||||
continue
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction")
|
||||
callshuttle = 0
|
||||
|
||||
if(callshuttle == 3) //if all three conditions are met
|
||||
emergency_shuttle.call_evac()
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world)
|
||||
spawn( 0 )
|
||||
O.mode = 2
|
||||
|
||||
@@ -17,15 +17,23 @@
|
||||
msg += "It looks slightly charred.\n"
|
||||
else
|
||||
msg += "<B>Its casing is melted and heat-warped!</B>\n"
|
||||
if (src.getOxyLoss())
|
||||
if (src.getOxyLoss() > 175)
|
||||
msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.</B>\n"
|
||||
else if(src.getOxyLoss() > 100)
|
||||
msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning.</B>\n"
|
||||
else
|
||||
msg += "It seems to be running on backup power.\n"
|
||||
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
if(hardware && (hardware.owner == src))
|
||||
msg += "<br>"
|
||||
msg += hardware.get_examine_desc()
|
||||
user << msg
|
||||
user.showLaws(src)
|
||||
|
||||
return
|
||||
|
||||
/mob/proc/showLaws(var/mob/living/silicon/S)
|
||||
|
||||
@@ -12,90 +12,71 @@
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
if (src.malfhack)
|
||||
if (src.malfhack.aidisabled)
|
||||
src << "\red ERROR: APC access disabled, hack attempt canceled."
|
||||
src.malfhacking = 0
|
||||
src.malfhack = null
|
||||
|
||||
|
||||
if (src.health <= config.health_threshold_dead)
|
||||
if (!hardware_integrity() || !backup_capacitor())
|
||||
death()
|
||||
return
|
||||
|
||||
// If our powersupply object was destroyed somehow, create new one.
|
||||
if(!psupply)
|
||||
create_powersupply()
|
||||
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
|
||||
// Handle power damage (oxy)
|
||||
if(src:aiRestorePowerRoutine != 0)
|
||||
// Lost power
|
||||
if(aiRestorePowerRoutine != 0 && !APU_power)
|
||||
// Lose power
|
||||
adjustOxyLoss(1)
|
||||
else
|
||||
// Gain Power
|
||||
aiRestorePowerRoutine = 0 // Necessary if AI activated it's APU AFTER losing primary power.
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
// Handle EMP-stun
|
||||
handle_stunned()
|
||||
|
||||
//stage = 1
|
||||
//if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are?
|
||||
malf_process()
|
||||
|
||||
if(APU_power && (hardware_integrity() < 50))
|
||||
src << "<span class='notice'><b>APU GENERATOR FAILURE! (System Damaged)</b></span>"
|
||||
stop_apu(1)
|
||||
|
||||
var/blind = 0
|
||||
//stage = 2
|
||||
var/area/loc = null
|
||||
if (istype(T, /turf))
|
||||
//stage = 3
|
||||
loc = T.loc
|
||||
if (istype(loc, /area))
|
||||
//stage = 4
|
||||
if (!loc.power_equip && !istype(src.loc,/obj/item))
|
||||
//stage = 5
|
||||
if (!loc.power_equip && !istype(src.loc,/obj/item) && !APU_power)
|
||||
blind = 1
|
||||
|
||||
if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P
|
||||
//I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t
|
||||
//stage = 4.5
|
||||
if (!blind)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
|
||||
//Congratulations! You've found a way for AI's to run without using power!
|
||||
//Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior
|
||||
// since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update
|
||||
// the power usage.
|
||||
//
|
||||
// We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and
|
||||
// be fine.
|
||||
/*
|
||||
var/area/home = get_area(src)
|
||||
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
|
||||
if(home.powered(EQUIP))
|
||||
home.use_power(1000, EQUIP)
|
||||
*/
|
||||
|
||||
if (src:aiRestorePowerRoutine==2)
|
||||
if (aiRestorePowerRoutine==2)
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
return
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
else if (aiRestorePowerRoutine==3)
|
||||
src << "Alert cancelled. Power has been restored."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
return
|
||||
else if (APU_power)
|
||||
aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
return
|
||||
else
|
||||
|
||||
//stage = 6
|
||||
|
||||
var/area/current_area = get_area(src)
|
||||
|
||||
if (lacks_power())
|
||||
//If our area lacks equipment power, and is not magically powered (i.e. centcom), or if we are in space and not carded, lose power.
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
if (aiRestorePowerRoutine==0)
|
||||
aiRestorePowerRoutine = 1
|
||||
|
||||
//Blind the AI
|
||||
|
||||
@@ -118,7 +99,7 @@
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
return
|
||||
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
|
||||
@@ -127,7 +108,7 @@
|
||||
sleep(50)
|
||||
if (istype(T, /turf/space))
|
||||
src << "Unable to verify! No power connection detected!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
aiRestorePowerRoutine = 2
|
||||
return
|
||||
src << "Connection verified. Searching for APC in power network."
|
||||
sleep(50)
|
||||
@@ -148,7 +129,7 @@
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0 //This, too, is a fix to issue 603
|
||||
return
|
||||
switch(PRP)
|
||||
@@ -163,9 +144,9 @@
|
||||
theAPC.operating = 1
|
||||
theAPC.equipment = 3
|
||||
theAPC.update()
|
||||
src:aiRestorePowerRoutine = 3
|
||||
aiRestorePowerRoutine = 3
|
||||
src << "Here are your current laws:"
|
||||
src.show_laws()
|
||||
show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
@@ -178,6 +159,8 @@
|
||||
process_med_hud(src,0,src.eyeobj)
|
||||
|
||||
/mob/living/silicon/ai/proc/lacks_power()
|
||||
if(APU_power)
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
return ((!A.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)
|
||||
@@ -186,11 +169,9 @@
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
setOxyLoss(0)
|
||||
else
|
||||
if(fire_res_on_core)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
|
||||
else
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
health = 100 - getFireLoss() - getBruteLoss() // Oxyloss is not part of health as it represents AIs backup power. AI is immune against ToxLoss as it is machine.
|
||||
|
||||
/mob/living/silicon/ai/rejuvenate()
|
||||
..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user