mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge branch 'master' of github.com:Baystation12/Baystation12 into Airlocks
This commit is contained in:
@@ -1496,7 +1496,7 @@
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.client)
|
||||
H << "\red <B>You suddenly feel stupid.</B>"
|
||||
H.brainloss = 60
|
||||
H.setBrainLoss(60)
|
||||
message_admins("[key_name_admin(usr)] made everybody retarded")
|
||||
else
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
verbs += /client/proc/debug_variables
|
||||
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
|
||||
verbs += /client/proc/cmd_modify_ticker_variables
|
||||
verbs += /client/proc/toggleadminhelpsound
|
||||
|
||||
// Admin helpers
|
||||
verbs += /client/proc/toggle_view_range
|
||||
|
||||
@@ -437,7 +437,7 @@ datum
|
||||
M:drowsyness = max(M:drowsyness, 20)
|
||||
if(25 to INFINITY)
|
||||
M.sleeping = 1
|
||||
M.oxyloss = 0
|
||||
M.adjustOxyLoss(-M.getOxyLoss())
|
||||
M.SetWeakened(0)
|
||||
M.SetStunned(0)
|
||||
M.SetParalysis(0)
|
||||
@@ -1353,7 +1353,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom ///This can even heal dead people.
|
||||
M.cloneloss = 0
|
||||
M.setCloneLoss(0)
|
||||
M.setOxyLoss(0)
|
||||
M.radiation = 0
|
||||
M.heal_organ_damage(5,5)
|
||||
@@ -1380,7 +1380,7 @@ datum
|
||||
holder.remove_reagent("carpotoxin", 5)
|
||||
if(holder.has_reagent("zombiepowder"))
|
||||
holder.remove_reagent("zombiepowder", 5)
|
||||
M.brainloss = 0
|
||||
M.setBrainLoss(0)
|
||||
M.disabilities = 0
|
||||
M.eye_blurry = 0
|
||||
M.eye_blind = 0
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
see_face = 0.0
|
||||
var/up = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/cespace_helmet
|
||||
name = "chief engineer's space helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off."
|
||||
icon_state = "cespace_helmet"
|
||||
item_state = "cespace_helmet"
|
||||
see_face = 0.0
|
||||
var/up = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security RIG helmet"
|
||||
icon_state = "rig-security"
|
||||
@@ -48,10 +56,16 @@
|
||||
|
||||
/obj/item/clothing/suit/space/rig/engspace_suit
|
||||
name = "engineering space suit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "engspace_suit"
|
||||
item_state = "engspace_suit"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/cespace_suit
|
||||
name = "chief engineer's space suit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation and fire shielding, and Chief Engineer colours."
|
||||
icon_state = "cespace_suit"
|
||||
item_state = "cespace_suit"
|
||||
protective_temperature = 10000
|
||||
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
name = "security RIG suit"
|
||||
desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/wcoat
|
||||
name = "waistcoat"
|
||||
desc = "The height of class."
|
||||
@@ -14,7 +13,6 @@
|
||||
item_state = "wcoat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/apron
|
||||
name = "apron"
|
||||
desc = "A basic blue apron. It has a large pocket you can store things in."
|
||||
@@ -23,9 +21,8 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list (/obj/item/weapon/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/chef
|
||||
name = "Chef's apron"
|
||||
name = "chef's apron"
|
||||
desc = "An apron used by a high class chef. Has a few pockets for nic-naks."
|
||||
icon_state = "chef"
|
||||
item_state = "chef"
|
||||
@@ -36,29 +33,25 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/chef/classic
|
||||
name = "A classic chef's apron."
|
||||
name = "classic chef's apron"
|
||||
desc = "A basic, dull, white chef's apron."
|
||||
icon_state = "apronchef"
|
||||
item_state = "apronchef"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
|
||||
|
||||
/obj/item/clothing/suit/hazardvest
|
||||
name = "hazard vest"
|
||||
desc = "A high-visibility vest used in work zones."
|
||||
icon_state = "hazard"
|
||||
item_state = "hazard"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/suspenders
|
||||
name = "suspenders"
|
||||
desc = "They suspend the illusion of the mime's play."
|
||||
icon = 'belts.dmi'
|
||||
icon_state = "suspenders"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/syndicatefake
|
||||
name = "red space suit replica"
|
||||
icon_state = "syndicate"
|
||||
@@ -69,7 +62,6 @@
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/captunic
|
||||
name = "captain's parade tunic"
|
||||
desc = "Worn by a Captain to show their class."
|
||||
@@ -78,7 +70,6 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/nun
|
||||
name = "nun robe"
|
||||
desc = "Maximum piety in this star system."
|
||||
@@ -101,49 +92,49 @@
|
||||
item_state = "chaplain_hoodie"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
|
||||
|
||||
/obj/item/clothing/suit/hastur
|
||||
name = "Hastur's Robes"
|
||||
name = "Hastur's robes"
|
||||
desc = "Robes not meant to be worn by man"
|
||||
icon_state = "hastur"
|
||||
item_state = "hastur"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/imperium_monk
|
||||
name = "Imperium monk"
|
||||
name = "imperium monk robes"
|
||||
desc = "A set of strange robes."
|
||||
icon_state = "imperium_monk"
|
||||
item_state = "imperium_monk"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/chickensuit
|
||||
name = "Chicken Suit"
|
||||
name = "chicken suit"
|
||||
desc = "Bwak!"
|
||||
icon_state = "chickensuit"
|
||||
item_state = "chickensuit"
|
||||
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HEAD
|
||||
flags_inv = HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/monkeysuit
|
||||
name = "Monkey Suit"
|
||||
name = "monkey suit"
|
||||
desc = "A suit that looks like a primate"
|
||||
icon_state = "monkeysuit"
|
||||
item_state = "monkeysuit"
|
||||
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/holidaypriest
|
||||
name = "Holiday Priest"
|
||||
name = "holiday priest"
|
||||
desc = "This is a nice holiday my son."
|
||||
icon_state = "holidaypriest"
|
||||
item_state = "holidaypriest"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/patientgown
|
||||
name = "patient gown"
|
||||
desc = "A sterile gown for patient wear."
|
||||
icon_state = "patientgown"
|
||||
item_state = "patientgown"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
name = "meat"
|
||||
desc = "A slab of meat"
|
||||
icon_state = "meat"
|
||||
health = 180
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 3)
|
||||
src.bitesize = 3
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh
|
||||
name = "synthetic meat"
|
||||
desc = "A synthetic slab of flesh."
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
name = "-meat"
|
||||
var/subjectname = ""
|
||||
var/subjectjob = null
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
//same as plain meat
|
||||
@@ -1,33 +1,23 @@
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
name = "Produciton machine console"
|
||||
name = "production machine console"
|
||||
icon = 'mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/id = ""
|
||||
var/obj/machinery/mineral/processing_unit/machine = null
|
||||
var/machinedir = EAST
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
/**
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, EAST))
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
*/
|
||||
//Commented out for being horrible for mappers. -Fastler
|
||||
for(var/obj/machinery/mineral/processing_unit/M in world)
|
||||
if(M.id == src.id)
|
||||
src.machine = M
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(user as mob)
|
||||
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
/**********************Mineral stacking unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console
|
||||
name = "Stacking machine console"
|
||||
name = "stacking machine console"
|
||||
icon = 'mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/id = ""
|
||||
var/obj/machinery/mineral/stacking_machine/machine = null
|
||||
var/machinedir = SOUTHEAST
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
/**
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, SOUTHEAST))
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
*/
|
||||
//Commented out for being horrible for mappers. -Fastler
|
||||
for(var/obj/machinery/mineral/stacking_machine/M in world)
|
||||
if(M.id == src.id)
|
||||
src.machine = M
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/mob/observer/Login()
|
||||
..()
|
||||
if (!src.start)
|
||||
src.start = 1
|
||||
var/A = locate(/area/start)
|
||||
var/list/L = list( )
|
||||
for(var/turf/T in A)
|
||||
L += T
|
||||
src.loc = pick(L)
|
||||
src.client.screen = null
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
@@ -1,170 +0,0 @@
|
||||
/mob/observer/New(mob/corpse)
|
||||
set invisibility = 10
|
||||
|
||||
..()
|
||||
|
||||
if(corpse)
|
||||
src.corpse = corpse
|
||||
src.loc = get_turf(corpse.loc)
|
||||
src.real_name = corpse.real_name
|
||||
src.name = corpse.real_name
|
||||
|
||||
src.sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS
|
||||
src.see_invisible = 10
|
||||
src.see_in_dark = 100
|
||||
src.verbs += /mob/observer/proc/dead_tele
|
||||
src.verbs += /mob/observer/proc/reenter_corpse
|
||||
|
||||
/mob/proc/ghostize()
|
||||
set name = "Ghost"
|
||||
set desc = "You cannot be revived as a ghost"
|
||||
if(src.client)
|
||||
src.client.mob = new/mob/observer(src)
|
||||
return
|
||||
|
||||
/mob/observer/Move(NewLoc, direct)
|
||||
if(NewLoc)
|
||||
src.loc = NewLoc
|
||||
return
|
||||
if((direct & NORTH) && src.y < world.maxy)
|
||||
src.y++
|
||||
if((direct & SOUTH) && src.y > 1)
|
||||
src.y--
|
||||
if((direct & EAST) && src.x < world.maxx)
|
||||
src.x++
|
||||
if((direct & WEST) && src.x > 1)
|
||||
src.x--
|
||||
|
||||
/mob/observer/examine()
|
||||
if(usr) usr << src.desc
|
||||
|
||||
/mob/observer/can_use_hands() return 0
|
||||
/mob/observer/is_active() return 0
|
||||
|
||||
/mob/observer/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
if(ticker && ticker.mode)
|
||||
if (ticker.timeleft)
|
||||
stat(null, "ETA-[ticker.timeleft / 600 % 60]:[ticker.timeleft / 100 % 6][ticker.timeleft / 100 % 10]")
|
||||
|
||||
if(ticker.mode.name == "Corporate Restructuring" && ticker.target)
|
||||
var/icon = ticker.target.name
|
||||
var/icon2 = ticker.target.real_name
|
||||
var/area = get_area(ticker.target)
|
||||
stat(null, text("Target: [icon2] (as [icon]) is in [area]"))
|
||||
|
||||
if(ticker.mode.name == "AI malfunction" && ticker.processing)
|
||||
stat(null, text("Time until all [station_name()]'s systems are taken over: [(ticker.AIwin - ticker.AItime) / 600 % 60]:[(ticker.AIwin - ticker.AItime) / 100 % 6][(ticker.AIwin - ticker.AItime) / 10 % 10]"))
|
||||
|
||||
if (ticker.mode.name == "ctf")
|
||||
stat(null, text("Red Team - [ticker.red_score]"))
|
||||
stat(null, text("Green Team - [ticker.green_score]"))
|
||||
|
||||
/mob/observer/proc/reenter_corpse()
|
||||
set category = "Special Verbs"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!corpse)
|
||||
alert("You don't have a corpse!")
|
||||
return
|
||||
if(corpse.stat == 2)
|
||||
alert("Your body is dead!")
|
||||
return
|
||||
if(src.client && src.client.holder && src.client.holder.state == 2)
|
||||
var/rank = src.client.holder.rank
|
||||
src.client.clear_admin_verbs()
|
||||
src.client.holder.state = 1
|
||||
src.client.update_admins(rank)
|
||||
src.client.mob = corpse
|
||||
del(src)
|
||||
|
||||
/mob/observer/proc/dead_tele()
|
||||
set category = "Special Verbs"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport"
|
||||
if((usr.stat != 2) || !istype(usr, /mob/observer))
|
||||
usr << "Not when you're not dead!"
|
||||
return
|
||||
var/A
|
||||
usr.verbs -= /mob/observer/proc/dead_tele
|
||||
spawn(50)
|
||||
usr.verbs += /mob/observer/proc/dead_tele
|
||||
A = input("Area to jump to", "BOOYEA", A) in list("Engine","Hallways","Toxins","Storage","Maintenance","Crew Quarters","Medical","Security","Chapel","Bridge")
|
||||
|
||||
switch (A)
|
||||
if ("Engine")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/engine) && !istype(B, /area/engine/combustion) && !istype(B, /area/engine/engine_walls))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Hallways")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/hallway))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Toxins")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/toxins) && !istype(B, /area/toxins/test_chamber))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Storage")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/storage))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Maintenance")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/maintenance))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Crew Quarters")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/crew_quarters))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Medical")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/medical))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Security")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/security))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Chapel")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/chapel))
|
||||
L += B
|
||||
A = pick(L)
|
||||
if ("Bridge")
|
||||
var/list/L = list()
|
||||
for(var/area/B in world)
|
||||
if(istype(B, /area/bridge))
|
||||
L += B
|
||||
A = pick(L)
|
||||
|
||||
var/list/L = list()
|
||||
for(var/turf/T in A)
|
||||
if(!T.density)
|
||||
var/clear = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = 0
|
||||
break
|
||||
if(clear)
|
||||
L+=T
|
||||
|
||||
usr.loc = pick(L)
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/mob/observer/say_understands(var/other)
|
||||
return 1
|
||||
|
||||
/mob/observer/say(var/message)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
world.log_say("Ghost/[src.key] : [message]")
|
||||
|
||||
if (src.muted)
|
||||
return
|
||||
|
||||
. = src.say_dead(message)
|
||||
|
||||
for (var/mob/M in hearers(null, null))
|
||||
if (!M.stat)
|
||||
if(M.job == "Chaplain")
|
||||
if (prob (49))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
else
|
||||
M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
else
|
||||
if (prob(50))
|
||||
return
|
||||
else if (prob (95))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
else
|
||||
M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
@@ -91,13 +91,16 @@
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
@@ -92,13 +92,16 @@
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
@@ -58,7 +58,9 @@
|
||||
tally += 2
|
||||
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
|
||||
tally += 1
|
||||
return tally
|
||||
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
|
||||
tally = -1 // hunters go supersuperfast
|
||||
return tally + move_delay_add
|
||||
|
||||
//This needs to be fixed
|
||||
/mob/living/carbon/alien/humanoid/Stat()
|
||||
@@ -121,7 +123,7 @@
|
||||
ear_damage += 15
|
||||
ear_deaf += 60
|
||||
|
||||
bruteloss += b_loss
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
@@ -224,7 +226,7 @@
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
|
||||
adjustFireLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
@@ -472,7 +474,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
bruteloss += rand(1, 3)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
@@ -501,7 +503,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
bruteloss += rand(1, 3)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -526,7 +528,7 @@
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
@@ -566,6 +568,16 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -672,7 +684,7 @@
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
@@ -741,7 +753,7 @@ In all, this is a lot like the monkey code. /N
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
|
||||
@@ -407,13 +407,16 @@
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
@@ -585,5 +588,5 @@
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.bruteloss += 5
|
||||
M.adjustBruteLoss(5)
|
||||
src.nutrition += 10
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if(health >= 250)
|
||||
adjustToxLoss(20)
|
||||
else
|
||||
bruteloss -= 5
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
handle_regular_status_updates()
|
||||
@@ -99,7 +99,7 @@
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
if(health >= 25)
|
||||
adjustToxLoss(5)
|
||||
else
|
||||
bruteloss -= 5
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
return
|
||||
@@ -332,13 +332,16 @@
|
||||
if(resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(health < config.health_threshold_crit)
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
Paralyse(5)
|
||||
@@ -514,5 +517,5 @@
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.bruteloss += 5
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
if (prob(10))//Instant Chad Ore!
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
if (brainloss >= 60 && stat != 2)
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
if (prob(7))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
//Account for massive pressure differences. Done by Polymorph
|
||||
var/pressure = environment.return_pressure()
|
||||
if(!istype(wear_suit, /obj/item/clothing/suit/space)&&!istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
if(!istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
/*if(pressure < 20)
|
||||
if(prob(25))
|
||||
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
|
||||
|
||||
@@ -414,16 +414,16 @@
|
||||
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=10
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
|
||||
|
||||
if(src.stat != DEAD) src.stat = UNCONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0)
|
||||
if(getToxLoss()>0) adjustToxLoss(-1)
|
||||
if(getFireLoss()>0) adjustFireLoss(-1)
|
||||
if(cloneloss>0) cloneloss = max(cloneloss-1,0)
|
||||
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
|
||||
|
||||
if (src.stat == DEAD)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
|
||||
bruteloss += b_loss
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
@@ -214,7 +214,7 @@
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
|
||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
@@ -341,13 +341,24 @@
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/metroid/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
@@ -531,7 +542,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has [attack_verb]ed []!</B>", M, src), 1)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
@@ -575,7 +586,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
@@ -638,7 +649,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
@@ -71,37 +71,22 @@
|
||||
"A sharp, deep pain bathes every inch of your body!")]"
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
Victim.cloneloss += rand(1,10)
|
||||
Victim.adjustCloneLoss(rand(1,10))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
if(getToxLoss() > 0)
|
||||
adjustToxLoss(-10)
|
||||
|
||||
if(getOxyLoss() > 0)
|
||||
oxyloss = max(0, getOxyLoss()-10)
|
||||
|
||||
if(getBruteLoss() > 0)
|
||||
bruteloss = max(0, getBruteLoss()-10)
|
||||
|
||||
if(getFireLoss() > 0)
|
||||
adjustFireLoss(-10)
|
||||
|
||||
if(getCloneLoss() > 0)
|
||||
adjustCloneLoss(-10)
|
||||
adjustToxLoss(-10)
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
if(Victim)
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
|
||||
if(Metroid.Victim == M && Metroid != src)
|
||||
Metroid.Feedstop()
|
||||
|
||||
if(getToxLoss()<0) adjustToxLoss(0)
|
||||
if(getOxyLoss()<0) adjustOxyLoss(0)
|
||||
if(getBruteLoss()<0) adjustBruteLoss(0)
|
||||
if(getFireLoss()<0) adjustFireLoss(0)
|
||||
if(getCloneLoss()<0) adjustCloneLoss(0)
|
||||
|
||||
nutrition += rand(10,25)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(prob(80))
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
var/shielded = 0
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming" && !( shielded )))
|
||||
adjustFireLoss(40)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
@@ -144,7 +144,7 @@
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 5)
|
||||
if (mutations & HULK) damage += 10
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
@@ -167,7 +167,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
|
||||
var/damage = rand(1, 5)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
@@ -240,7 +240,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
|
||||
return
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
@@ -323,7 +323,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
@@ -365,11 +365,20 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
react_to_attack(M)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
@@ -392,7 +401,7 @@
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
@@ -647,7 +656,7 @@
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if(2.0)
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if(3.0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage/(blocked+1))
|
||||
if(CLONE)
|
||||
cloneloss += (damage/(blocked+1))
|
||||
adjustCloneLoss(damage/(blocked+1))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
@@ -50,7 +50,8 @@
|
||||
if(IRRADIATE)
|
||||
radiation += max((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(canstun) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(SLUR)
|
||||
slurring = max(slurring, (effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
src.oxyloss += src.health + 200
|
||||
src.adjustOxyLoss(src.health + 200)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(!src.nodamage)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss - src.halloss
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
@@ -142,25 +142,25 @@
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
|
||||
bruteloss = max(0, getBruteLoss()-brute)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
||||
bruteloss += brute
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
|
||||
bruteloss = max(0, getBruteLoss()-brute)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(var/brute, var/burn)
|
||||
bruteloss += brute
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
if (brainloss >= 60 && prob(50))
|
||||
if (getBrainLoss() >= 60 && prob(50))
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
// Special message handling
|
||||
@@ -160,7 +160,7 @@
|
||||
message = capitalize(message) //capitalize the first letter of what they actually say
|
||||
|
||||
// :downs:
|
||||
if (brainloss >= 60)
|
||||
if (getBrainLoss() >= 60)
|
||||
message = dd_replacetext(message, " am ", " ")
|
||||
message = dd_replacetext(message, " is ", " ")
|
||||
message = dd_replacetext(message, " are ", " ")
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -328,7 +328,7 @@
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
@@ -364,7 +364,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
@@ -382,6 +382,19 @@
|
||||
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.adjustOxyLoss(-1)
|
||||
src.oxyloss = 0
|
||||
return
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
@@ -91,8 +91,7 @@
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss = 0
|
||||
src.adjustOxyLoss(-1)
|
||||
return
|
||||
else
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.adjustBruteLoss(60)
|
||||
src.updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -138,7 +138,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", src.flash)
|
||||
src.bruteloss += damage
|
||||
src.adjustBruteLoss(damage)
|
||||
src.updatehealth()
|
||||
else
|
||||
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -243,7 +243,7 @@
|
||||
M.show_message(text("\red [src] has been hit by [O]"), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
@@ -354,7 +354,7 @@
|
||||
user << "There are no dents to fix here!"
|
||||
return
|
||||
else if (W:remove_fuel(0))
|
||||
bruteloss -= 30
|
||||
adjustBruteLoss(-30)
|
||||
if(getBruteLoss() < 0) bruteloss = 0
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
@@ -539,7 +539,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
@@ -587,7 +587,7 @@
|
||||
damage = rand(5, 35)
|
||||
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
@@ -617,13 +617,24 @@
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
bruteloss += M.powerlevel * rand(6,10)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj.nodamage) bruteloss += Proj.damage
|
||||
if(!Proj.nodamage) adjustBruteLoss(Proj.damage)
|
||||
Proj.on_hit(src,2)
|
||||
return 2
|
||||
|
||||
|
||||
+17
-6
@@ -1103,28 +1103,39 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/Stun(amount)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/alien)) // add some movement delay
|
||||
var/mob/living/carbon/alien/Alien = src
|
||||
Alien.move_delay_add = min(Alien.move_delay_add + round(amount / 5), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
stunned = max(amount,0)
|
||||
if(canstun)
|
||||
stunned = max(amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/AdjustStunned(amount)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(canstun)
|
||||
stunned = max(stunned + amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/Weaken(amount)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
return
|
||||
|
||||
/mob/proc/SetWeakened(amount)
|
||||
weakened = max(amount,0)
|
||||
if(canweaken)
|
||||
weakened = max(amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/AdjustWeakened(amount)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
return
|
||||
|
||||
/mob/proc/Paralyse(amount)
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
//Methods that need to be cleaned.
|
||||
/* INFORMATION
|
||||
Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// This proc has some procs that should be extracted from it. I believe we can develop some helper procs from it - Rockdtben
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
if(stat >=2) return
|
||||
if(virus.type in resistances)
|
||||
if(prob(99.9)) return
|
||||
resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus.type))
|
||||
return // two viruses of the same kind can't infect a body at once!!
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
var/fail = 1
|
||||
for(var/name in virus.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(src, mob_type))
|
||||
fail = 0
|
||||
break
|
||||
if(fail) return
|
||||
|
||||
if(skip_this == 1)
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(virus) //
|
||||
//return //
|
||||
|
||||
|
||||
/*
|
||||
var/list/clothing_areas = list()
|
||||
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
|
||||
for(var/Covers in covers)
|
||||
clothing_areas[Covers] = list()
|
||||
|
||||
for(var/obj/item/clothing/Clothing in src)
|
||||
if(Clothing)
|
||||
for(var/Covers in covers)
|
||||
if(Clothing&Covers)
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
//chances to target this zone
|
||||
var/head_ch
|
||||
var/body_ch
|
||||
var/hands_ch
|
||||
var/feet_ch
|
||||
|
||||
switch(virus.spread_type)
|
||||
if(CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
else
|
||||
head_ch = 100
|
||||
body_ch = 100
|
||||
hands_ch = 25
|
||||
feet_ch = 25
|
||||
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head))
|
||||
Cl = H.head
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Head pass [passed]"
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Mask pass [passed]"
|
||||
if(2)//arms and legs included
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
if(passed && isobj(H.slot_w_uniform))
|
||||
Cl = H.slot_w_uniform
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Uniform pass [passed]"
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Gloves pass [passed]"
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Shoes pass [passed]"
|
||||
else
|
||||
src << "Something strange's going on, something's wrong."
|
||||
|
||||
/*if("feet")
|
||||
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100)
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(passed && virus.spread_type == AIRBORNE && internals)
|
||||
passed = (prob(50*virus.permeability_mod))
|
||||
|
||||
if(passed)
|
||||
//world << "Infection in the mob [src]. YAY"
|
||||
|
||||
|
||||
/*
|
||||
var/score = 0
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:gloves) score += 5
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(wear_mask)
|
||||
score += 5
|
||||
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
|
||||
score += 5
|
||||
if(internal)
|
||||
score += 5
|
||||
if(score > 20)
|
||||
return
|
||||
else if(score == 20 && prob(95))
|
||||
return
|
||||
else if(score >= 15 && prob(75))
|
||||
return
|
||||
else if(score >= 10 && prob(55))
|
||||
return
|
||||
else if(score >= 5 && prob(35))
|
||||
return
|
||||
else if(prob(15))
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
+11
-196
@@ -257,15 +257,6 @@
|
||||
var/halloss = 0
|
||||
var/hallucination = 0
|
||||
|
||||
// TG Porting Variables
|
||||
var/canstun = 1 // determines if this mob can be stunned by things
|
||||
var/canweaken = 1 // determines if this mob can be weakened/knocked down by things
|
||||
var/nopush = 0 //Can they be shoved?
|
||||
|
||||
var/area/lastarea = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
|
||||
/*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move
|
||||
through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that
|
||||
the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/
|
||||
@@ -279,198 +270,22 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
var/UI = 'screen1_old.dmi' // For changing the UI from preferences
|
||||
|
||||
// var/obj/effect/organstructure/organStructure = null //for dem organs
|
||||
var/list/organs = list( ) //List of organs.
|
||||
|
||||
var/canstun = 1 // determines if this mob can be stunned by things
|
||||
var/canweaken = 1 // determines if this mob can be weakened/knocked down by things
|
||||
var/nopush = 0 //Can they be shoved?
|
||||
|
||||
var/area/lastarea = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
|
||||
|
||||
var/list/organs = list( ) //List of organs.
|
||||
var/list/organs2 = list()
|
||||
//Singularity wants you!
|
||||
var/grav_delay = 0
|
||||
var/being_strangled = 0
|
||||
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
if(stat >=2) return
|
||||
if(virus.type in resistances)
|
||||
if(prob(99.9)) return
|
||||
resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus.type))
|
||||
return // two viruses of the same kind can't infect a body at once!!
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
var/fail = 1
|
||||
for(var/name in virus.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(src, mob_type))
|
||||
fail = 0
|
||||
break
|
||||
if(fail) return
|
||||
|
||||
if(skip_this == 1)
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(virus) //
|
||||
//return //
|
||||
|
||||
|
||||
/*
|
||||
var/list/clothing_areas = list()
|
||||
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
|
||||
for(var/Covers in covers)
|
||||
clothing_areas[Covers] = list()
|
||||
|
||||
for(var/obj/item/clothing/Clothing in src)
|
||||
if(Clothing)
|
||||
for(var/Covers in covers)
|
||||
if(Clothing&Covers)
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
//chances to target this zone
|
||||
var/head_ch
|
||||
var/body_ch
|
||||
var/hands_ch
|
||||
var/feet_ch
|
||||
|
||||
switch(virus.spread_type)
|
||||
if(CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
else
|
||||
head_ch = 100
|
||||
body_ch = 100
|
||||
hands_ch = 25
|
||||
feet_ch = 25
|
||||
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head))
|
||||
Cl = H.head
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Head pass [passed]"
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Mask pass [passed]"
|
||||
if(2)//arms and legs included
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
if(passed && isobj(H.slot_w_uniform))
|
||||
Cl = H.slot_w_uniform
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Uniform pass [passed]"
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Gloves pass [passed]"
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Shoes pass [passed]"
|
||||
else
|
||||
src << "Something strange's going on, something's wrong."
|
||||
|
||||
/*if("feet")
|
||||
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100)
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(passed && virus.spread_type == AIRBORNE && internals)
|
||||
passed = (prob(50*virus.permeability_mod))
|
||||
|
||||
if(passed)
|
||||
//world << "Infection in the mob [src]. YAY"
|
||||
|
||||
|
||||
/*
|
||||
var/score = 0
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:gloves) score += 5
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(wear_mask)
|
||||
score += 5
|
||||
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
|
||||
score += 5
|
||||
if(internal)
|
||||
score += 5
|
||||
if(score > 20)
|
||||
return
|
||||
else if(score == 20 && prob(95))
|
||||
return
|
||||
else if(score >= 15 && prob(75))
|
||||
return
|
||||
else if(score >= 10 && prob(55))
|
||||
return
|
||||
else if(score >= 5 && prob(35))
|
||||
return
|
||||
else if(prob(15))
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
s_click(hud1)
|
||||
return
|
||||
if(M == assailant && state >= 2)
|
||||
if( ( ishuman(user) /*&& (user.mutations & FAT)*/ && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
if( ( ishuman(user) && (user.mutations & FAT) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
var/mob/living/carbon/attacker = user
|
||||
for(var/mob/N in viewers(user, null))
|
||||
if(N.client)
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
alt_name = " (died as [src.real_name])"
|
||||
|
||||
message = src.say_quote(message)
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
@@ -60,7 +59,7 @@
|
||||
return "stammers, \"[text]\"";
|
||||
if (src.slurring)
|
||||
return "slurrs, \"[text]\"";
|
||||
if (src.brainloss >= 60)
|
||||
if (src.getBrainLoss() >= 60)
|
||||
return "gibbers, \"[text]\"";
|
||||
if (ending == "?")
|
||||
return "asks, \"[text]\"";
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//Cat
|
||||
/mob/living/simple_animal/cat
|
||||
name = "cat"
|
||||
desc = "Kitty!!"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "tempcat"
|
||||
icon_living = "tempcat"
|
||||
icon_dead = "catdeath"
|
||||
speak = list("Meow!","Esp!","Purr!","HSSSSS")
|
||||
speak_emote = list("purrs", "meows")
|
||||
emote_hear = list("meows","mews")
|
||||
emote_see = list("shakes it's head", "shivers")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
|
||||
//RUNTIME! SQUEEEEEEEE~
|
||||
/mob/living/simple_animal/cat/Runtime
|
||||
name = "Runtime"
|
||||
desc = ""
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
@@ -0,0 +1,373 @@
|
||||
//Corgi
|
||||
/mob/living/simple_animal/corgi
|
||||
name = "corgi"
|
||||
real_name = "corgi"
|
||||
desc = "Puppy!!"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "corgi"
|
||||
icon_living = "corgi"
|
||||
icon_dead = "corgi_dead"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
emote_see = list("shakes it's head", "shivers")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/corgi
|
||||
meat_amount = 3
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
var/obj/item/inventory_head
|
||||
var/obj/item/inventory_back
|
||||
var/obj/item/inventory_mouth
|
||||
|
||||
/mob/living/simple_animal/corgi/update_clothing()
|
||||
overlays = list()
|
||||
|
||||
if(inventory_head)
|
||||
var/head_icon_state = inventory_head.icon_state
|
||||
if(health <= 0)
|
||||
head_icon_state += "2"
|
||||
|
||||
var/icon/head_icon = icon('corgi_head.dmi',head_icon_state)
|
||||
if(head_icon)
|
||||
overlays += head_icon
|
||||
|
||||
if(inventory_back)
|
||||
var/back_icon_state = inventory_back.icon_state
|
||||
if(health <= 0)
|
||||
back_icon_state += "2"
|
||||
|
||||
var/icon/back_icon = icon('corgi_back.dmi',back_icon_state)
|
||||
if(back_icon)
|
||||
overlays += back_icon
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/corgi/Life()
|
||||
..()
|
||||
update_clothing()
|
||||
|
||||
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
|
||||
/*
|
||||
user.machine = src
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [src]</b></div><p>"
|
||||
if(inventory_head)
|
||||
dat += "<br><b>Head:</b> [inventory_head] (<a href='?src=\ref[src];remove_inv=head'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Head:</b> <a href='?src=\ref[src];add_inv=head'>Nothing</a>"
|
||||
if(inventory_back)
|
||||
dat += "<br><b>Back:</b> [inventory_back] (<a href='?src=\ref[src];remove_inv=back'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Back:</b> <a href='?src=\ref[src];add_inv=back'>Nothing</a>"
|
||||
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[name]")
|
||||
*/
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(inventory_head && inventory_back)
|
||||
//helmet and armor = 100% protection
|
||||
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
|
||||
if( O.force )
|
||||
usr << "\red This animal is wearing too much armor. You can't cause it any damage."
|
||||
for (var/mob/M in viewers(src, null))
|
||||
M.show_message("\red \b [user] hits [src] with the [O], however [src] is too armored.")
|
||||
else
|
||||
usr << "\red This animal is wearing too much armor. You can't reach it's skin."
|
||||
for (var/mob/M in viewers(src, null))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
if(prob(15))
|
||||
emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression on it's face")
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/corgi/Topic(href, href_list)
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1)
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
name = real_name
|
||||
desc = initial(desc)
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
emote_see = list("shakes it's head", "shivers")
|
||||
desc = "It's a corgi."
|
||||
src.sd_SetLuminosity(0)
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
usr << "\red There is nothing on its [remove_from]."
|
||||
return
|
||||
if("back")
|
||||
if(inventory_back)
|
||||
inventory_back.loc = src.loc
|
||||
inventory_back = null
|
||||
else
|
||||
usr << "\red There is nothing on its [remove_from]."
|
||||
return
|
||||
|
||||
show_inv(usr)
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1)
|
||||
return
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your active hand to put in the slot."
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
switch(add_to)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
usr << "\red The [inventory_head] is already in this slot."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
//Many hats added, Some will probably be removed, just want to see which ones are popular.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/head/helmet,
|
||||
/obj/item/clothing/glasses/sunglasses,
|
||||
/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/collectable/captain,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/helmet/that,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/collectable/kitty,
|
||||
/obj/item/clothing/head/rabbitears,
|
||||
/obj/item/clothing/head/collectable/rabbitears,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/collectable/beret,
|
||||
/obj/item/clothing/head/det_hat,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/pirate,
|
||||
/obj/item/clothing/head/collectable/pirate,
|
||||
/obj/item/clothing/head/ushanka,
|
||||
/obj/item/clothing/head/chefhat,
|
||||
/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/wizard/fake,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/collectable/wizard,
|
||||
/obj/item/clothing/head/helmet/hardhat,
|
||||
/obj/item/clothing/head/collectable/hardhat,
|
||||
/obj/item/clothing/head/helmet/hardhat/white,
|
||||
/obj/item/weapon/bedsheet,
|
||||
/obj/item/clothing/head/helmet/space/santahat,
|
||||
/obj/item/clothing/head/collectable/paper
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red The corgi doesn't seem too keen on wearing that item."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_head = item_to_add
|
||||
update_clothing()
|
||||
|
||||
//Various hats and items (worn on his head) change Ian's behaviour. His attributesare reset when a HAT is removed.
|
||||
|
||||
|
||||
switch(inventory_head && inventory_head.type)
|
||||
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
|
||||
name = "Captain [real_name]"
|
||||
desc = "Probably better than the last captain."
|
||||
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
|
||||
name = "Runtime"
|
||||
emote_see = list("coughs up a furball", "stretches")
|
||||
emote_hear = list("purrs")
|
||||
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
|
||||
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
|
||||
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
|
||||
name = "Hoppy"
|
||||
emote_see = list("twitches his nose", "hops around a bit")
|
||||
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
|
||||
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
|
||||
name = "Yann"
|
||||
desc = "mon dieu! C'est un chien!"
|
||||
speak = list("le woof!", "le bark!", "JAPPE!!")
|
||||
emote_see = list("cowers in fear", "surrenders", "plays dead")
|
||||
if(/obj/item/clothing/head/det_hat)
|
||||
name = "Detective [real_name]"
|
||||
desc = "[name] sees through your lies..."
|
||||
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
|
||||
if(/obj/item/clothing/head/nursehat)
|
||||
name = "Nurse [real_name]"
|
||||
desc = "[name] needs 100cc of beef jerky...STAT!"
|
||||
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
|
||||
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibbles","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
|
||||
desc = "Yaarghh!! Thar' be a scurvy dog!"
|
||||
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
|
||||
emote_hear = list("growls ferociously", "snarls")
|
||||
speak = list("Arrrrgh!!","Grrrrrr!")
|
||||
if(/obj/item/clothing/head/ushanka)
|
||||
name = "[pick("Comrade","Commissar")] [real_name]"
|
||||
desc = "A follower of Karl Barx."
|
||||
emote_see = list("contemplates the failings of the capitalist economic model", "ponders the pros and cons of vangaurdism")
|
||||
if(/obj/item/clothing/head/collectable/police)
|
||||
name = "Officer [real_name]"
|
||||
emote_see = list("drools","looks for donuts")
|
||||
desc = "Stop right there criminal scum!"
|
||||
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
|
||||
name = "Grandwizard [real_name]"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
|
||||
if(/obj/item/weapon/bedsheet)
|
||||
name = "The ghost"
|
||||
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
|
||||
emote_see = list("stumbles around", "shivers")
|
||||
emote_hear = list("howls","groans")
|
||||
desc = "Spooky!"
|
||||
if(/obj/item/clothing/head/helmet/space/santahat)
|
||||
name = "Rudolph the Red-Nosed Corgi"
|
||||
emote_hear = list("barks christmas songs", "yaps")
|
||||
desc = "He has a very shiny nose."
|
||||
src.sd_SetLuminosity(6)
|
||||
|
||||
if("back")
|
||||
if(inventory_back)
|
||||
usr << "\red The [inventory_back] is already in this slot."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
/obj/item/device/radio
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red The object cannot fit on this animal."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_back = item_to_add
|
||||
update_clothing()
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
else
|
||||
..()
|
||||
|
||||
//IAN! SQUEEEEEEEEE~
|
||||
/mob/living/simple_animal/corgi/Ian
|
||||
name = "Ian"
|
||||
real_name = "Ian" //Intended to hold the name without altering it.
|
||||
desc = "It's a corgi."
|
||||
var/turns_since_scan = 0
|
||||
var/obj/movement_target
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
|
||||
/mob/living/simple_animal/corgi/Ian/Life()
|
||||
..()
|
||||
|
||||
//Feeding, chasing food, FOOOOODDDD
|
||||
if(alive && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/S in oview(src,3))
|
||||
if(isturf(S.loc) || ishuman(S.loc))
|
||||
movement_target = S
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = 1
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
|
||||
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
|
||||
if (movement_target.loc.x < src.x)
|
||||
dir = WEST
|
||||
else if (movement_target.loc.x > src.x)
|
||||
dir = EAST
|
||||
else if (movement_target.loc.y < src.y)
|
||||
dir = SOUTH
|
||||
else if (movement_target.loc.y > src.y)
|
||||
dir = NORTH
|
||||
else
|
||||
dir = SOUTH
|
||||
|
||||
if(isturf(movement_target.loc) )
|
||||
movement_target.attack_animal(src)
|
||||
else if(ishuman(movement_target.loc) )
|
||||
if(prob(20))
|
||||
emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face")
|
||||
|
||||
if(prob(1))
|
||||
emote("dances around")
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
|
||||
dir = i
|
||||
sleep(1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/corgi
|
||||
name = "Corgi meat"
|
||||
desc = "Tastes like... well you know..."
|
||||
|
||||
/mob/living/simple_animal/corgi/Ian/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(70))
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if(M.client)
|
||||
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/corgi
|
||||
name = "Corgi meat"
|
||||
desc = "Tastes like... well you know..."
|
||||
@@ -0,0 +1,36 @@
|
||||
//Look Sir, free crabs!
|
||||
/mob/living/simple_animal/crab
|
||||
name = "crab"
|
||||
desc = "Free crabs!"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "crab"
|
||||
icon_living = "crab"
|
||||
icon_dead = "crab_dead"
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "stomps the"
|
||||
stop_automated_movement = 1
|
||||
friendly = "pinches"
|
||||
|
||||
/mob/living/simple_animal/crab/Life()
|
||||
..()
|
||||
//CRAB movement
|
||||
if(!ckey)
|
||||
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(4,8)))
|
||||
turns_since_move = 0
|
||||
|
||||
//COFFEE! SQUEEEEEEEEE!
|
||||
/mob/living/simple_animal/crab/Coffee
|
||||
name = "Coffee"
|
||||
desc = "It's Coffee, the other pet!"
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "stomps"
|
||||
@@ -0,0 +1,289 @@
|
||||
/mob/living/simple_animal
|
||||
name = "animal"
|
||||
var/icon_living = ""
|
||||
var/icon_dead = ""
|
||||
var/max_health = 20
|
||||
var/alive = 1
|
||||
var/list/speak = list()
|
||||
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
|
||||
var/speak_chance = 0
|
||||
var/list/emote_hear = list() //EHearable emotes
|
||||
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
|
||||
health = 20
|
||||
var/turns_per_move = 1
|
||||
var/turns_since_move = 0
|
||||
universal_speak = 1
|
||||
var/meat_amount = 0
|
||||
var/meat_type
|
||||
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
|
||||
|
||||
//Interaction
|
||||
var/response_help = "You try to help"
|
||||
var/response_disarm = "You try to disarm"
|
||||
var/response_harm = "You try to hurt"
|
||||
var/harm_intent_damage = 3
|
||||
|
||||
//Temperature effect
|
||||
var/minbodytemp = 270
|
||||
var/maxbodytemp = 370
|
||||
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
|
||||
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
|
||||
var/min_oxy = 5
|
||||
var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum
|
||||
var/min_tox = 0
|
||||
var/max_tox = 1
|
||||
var/min_co2 = 0
|
||||
var/max_co2 = 5
|
||||
var/min_n2 = 0
|
||||
var/max_n2 = 0
|
||||
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
|
||||
|
||||
|
||||
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
|
||||
var/melee_damage_lower = 0
|
||||
var/melee_damage_upper = 0
|
||||
var/attacktext = "attacks"
|
||||
var/attack_sound = null
|
||||
var/friendly = "nuzzles" //If the mob does no damage with it's attack
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
verbs -= /mob/verb/observe
|
||||
|
||||
/mob/living/simple_animal/Login()
|
||||
if(src && src.client)
|
||||
src.client.screen = null
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
|
||||
//Health
|
||||
if(!alive)
|
||||
if(health > 0)
|
||||
icon_state = icon_living
|
||||
alive = 1
|
||||
stat = 0 //Alive - conscious
|
||||
density = 1
|
||||
return
|
||||
|
||||
if(health < 1)
|
||||
alive = 0
|
||||
icon_state = icon_dead
|
||||
stat = 2 //Dead
|
||||
density = 0
|
||||
return
|
||||
|
||||
if(health > max_health)
|
||||
health = max_health
|
||||
|
||||
//Movement
|
||||
if(!ckey && !stop_automated_movement)
|
||||
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(cardinal)))
|
||||
turns_since_move = 0
|
||||
|
||||
//Speaking
|
||||
if(speak_chance)
|
||||
if(prob(speak_chance))
|
||||
if(speak && (emote_hear || emote_see) )
|
||||
var/length = speak.len
|
||||
if(emote_hear)
|
||||
length += emote_hear.len
|
||||
if(emote_see)
|
||||
length += emote_see.len
|
||||
var/pick = rand(1,length)
|
||||
if(pick <= speak.len)
|
||||
say(pick(speak))
|
||||
else
|
||||
pick -= speak.len
|
||||
if(emote_see && pick <= emote_see.len)
|
||||
emote(pick(emote_see),1)
|
||||
else
|
||||
emote(pick(emote_hear),2)
|
||||
if(!speak)
|
||||
if(!emote_hear && emote_see)
|
||||
emote(pick(emote_see),1)
|
||||
if(emote_hear && !emote_see)
|
||||
emote(pick(emote_hear),2)
|
||||
if(emote_hear && emote_see)
|
||||
var/length = emote_hear.len + emote_see.len
|
||||
var/pick = rand(1,length)
|
||||
if(pick <= emote_see.len)
|
||||
emote(pick(emote_see),1)
|
||||
else
|
||||
emote(pick(emote_hear),2)
|
||||
if(speak && !(emote_see || emote_hear))
|
||||
say(pick(speak))
|
||||
|
||||
//Atmos
|
||||
var/atmos_suitable = 1
|
||||
|
||||
var/atom/A = src.loc
|
||||
if(isturf(A))
|
||||
var/turf/T = A
|
||||
var/areatemp = T.temperature
|
||||
if( abs(areatemp - bodytemperature) > 50 )
|
||||
var/diff = areatemp - bodytemperature
|
||||
diff = diff / 5
|
||||
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
|
||||
bodytemperature += diff
|
||||
|
||||
if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/ST = T
|
||||
if(ST.air)
|
||||
var/tox = ST.air.toxins
|
||||
var/oxy = ST.air.oxygen
|
||||
var/n2 = ST.air.nitrogen
|
||||
var/co2 = ST.air.carbon_dioxide
|
||||
|
||||
if(min_oxy)
|
||||
if(oxy < min_oxy)
|
||||
atmos_suitable = 0
|
||||
if(max_oxy)
|
||||
if(oxy > max_oxy)
|
||||
atmos_suitable = 0
|
||||
if(min_tox)
|
||||
if(tox < min_tox)
|
||||
atmos_suitable = 0
|
||||
if(max_tox)
|
||||
if(tox > max_tox)
|
||||
atmos_suitable = 0
|
||||
if(min_n2)
|
||||
if(n2 < min_n2)
|
||||
atmos_suitable = 0
|
||||
if(max_n2)
|
||||
if(n2 > max_n2)
|
||||
atmos_suitable = 0
|
||||
if(min_co2)
|
||||
if(co2 < min_co2)
|
||||
atmos_suitable = 0
|
||||
if(max_co2)
|
||||
if(co2 > max_co2)
|
||||
atmos_suitable = 0
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
health -= cold_damage_per_tick
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
health -= heat_damage_per_tick
|
||||
|
||||
if(!atmos_suitable)
|
||||
health -= unsuitable_atoms_damage
|
||||
|
||||
/mob/living/simple_animal/Bumped(AM as mob|obj)
|
||||
if(!AM) return
|
||||
if(isturf(src.loc) && !resting && !buckled)
|
||||
if(ismob(AM))
|
||||
var/newamloc = src.loc
|
||||
src.loc = AM:loc
|
||||
AM:loc = newamloc
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/gib()
|
||||
if(meat_amount && meat_type)
|
||||
for(var/i = 0; i < meat_amount; i++)
|
||||
new meat_type(src.loc)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/say_quote(var/text)
|
||||
if(speak_emote)
|
||||
var/emote = pick(speak_emote)
|
||||
if(emote)
|
||||
return "[emote], \"[text]\""
|
||||
return "says, \"[text]\"";
|
||||
|
||||
/mob/living/simple_animal/emote(var/act)
|
||||
if(act)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.show_message("<B>[src]</B> [act].")
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj) return
|
||||
src.health -= Proj.damage
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if (health > 0)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\blue [M] [response_help] [src]")
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
if ("hurt")
|
||||
health -= harm_intent_damage
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] [response_harm] [src]")
|
||||
|
||||
if ("disarm")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\blue [M] [response_disarm] [src]")
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(alive)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
if(health < max_health)
|
||||
if(MED.amount >= 1)
|
||||
health = min(max_health, health + MED.heal_brute)
|
||||
MED.amount -= 1
|
||||
if(MED.amount <= 0)
|
||||
del(MED)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\blue [user] applies the [MED] on [src]")
|
||||
else
|
||||
user << "\blue this [src] is dead, medical items won't bring it back to life."
|
||||
else
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
@@ -0,0 +1,46 @@
|
||||
/mob/living/simple_animal/shade
|
||||
name = "Shade"
|
||||
desc = "A bound spirit"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "shade"
|
||||
icon_living = "shade"
|
||||
icon_dead = "shade_dead"
|
||||
max_health = 50
|
||||
health = 50
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "puts their hand through"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches the"
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "drains the life from"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
|
||||
/mob/living/simple_animal/shade/Life()
|
||||
..()
|
||||
if (stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
del src
|
||||
|
||||
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/device/soulstone))
|
||||
O.transfer_soul("SHADE", src, user)
|
||||
else
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
@@ -53,6 +53,9 @@
|
||||
return
|
||||
for(var/name in organs)
|
||||
del(organs[name])
|
||||
|
||||
if(client)
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jams for AIs
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/AIize()
|
||||
|
||||
@@ -780,11 +780,11 @@
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = user
|
||||
if (istype(H))
|
||||
if(H.brainloss >= 60)
|
||||
if(H.getBrainLoss() >= 60)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M << "\red [H] stares cluelessly at [src] and drools."
|
||||
return 0
|
||||
else if(prob(H.brainloss))
|
||||
else if(prob(H.getBrainLoss()))
|
||||
user << "\red You momentarily forget how to use [src]."
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
name = "Emitter"
|
||||
desc = "A heavy duty industrial laser"
|
||||
icon = 'singularity.dmi'
|
||||
icon_state = "Emitter"
|
||||
icon_state = "emitter"
|
||||
anchored = 0
|
||||
density = 1
|
||||
req_access = list(access_engine)
|
||||
var/active = 0
|
||||
var/fire_delay = 100
|
||||
var/last_shot = 0
|
||||
var/shot_number = 0
|
||||
var/state = 0
|
||||
var/locked = 0
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 300
|
||||
|
||||
var
|
||||
active = 0
|
||||
fire_delay = 100
|
||||
last_shot = 0
|
||||
shot_number = 0
|
||||
state = 0
|
||||
locked = 0
|
||||
|
||||
|
||||
verb/rotate()
|
||||
set name = "Rotate"
|
||||
set category = "Object"
|
||||
@@ -35,9 +39,9 @@
|
||||
|
||||
update_icon()
|
||||
if (active && !(stat & (NOPOWER|BROKEN)))
|
||||
icon_state = "Emitter +a"
|
||||
icon_state = "emitter_+a"
|
||||
else
|
||||
icon_state = "Emitter"
|
||||
icon_state = "emitter"
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
@@ -56,15 +60,15 @@
|
||||
src.use_power = 2
|
||||
update_icon()
|
||||
else
|
||||
user << "The controls are locked!"
|
||||
user << "\red The controls are locked!"
|
||||
else
|
||||
user << "The [src] needs to be firmly secured to the floor first."
|
||||
user << "\red The [src] needs to be firmly secured to the floor first."
|
||||
return 1
|
||||
|
||||
|
||||
emp_act()//Emitters are hardened but still might have issues
|
||||
emp_act(var/severity)//Emitters are hardened but still might have issues
|
||||
use_power(50)
|
||||
if(prob(1)&&prob(1))
|
||||
if((severity == 1)&&prob(1)&&prob(1))
|
||||
if(src.active)
|
||||
src.active = 0
|
||||
src.use_power = 1
|
||||
@@ -87,7 +91,7 @@
|
||||
src.shot_number = 0
|
||||
use_power(1000)
|
||||
var/obj/item/projectile/beam/A = new /obj/item/projectile/beam( src.loc )
|
||||
A.icon_state = "u_laser"
|
||||
A.icon_state = "emitter"
|
||||
playsound(src.loc, 'emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
@@ -113,6 +117,7 @@
|
||||
|
||||
|
||||
attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(active)
|
||||
user << "Turn off the [src] first."
|
||||
@@ -123,27 +128,26 @@
|
||||
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the external reinforcing bolts to the floor.", \
|
||||
"You hear ratchet")
|
||||
"You hear a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
"You undo the external reinforcing bolts.", \
|
||||
"You hear ratchet")
|
||||
"You hear a ratchet")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if(active)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
return
|
||||
if(1)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
@@ -156,8 +160,7 @@
|
||||
user << "You weld the [src] to the floor."
|
||||
W:welding = 1
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
@@ -170,20 +173,36 @@
|
||||
user << "You cut the [src] free from the floor."
|
||||
W:welding = 1
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(emagged)
|
||||
user << "\red The lock seems to be broken"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
if(active)
|
||||
src.locked = !src.locked
|
||||
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
src.locked = 0 //just in case it somehow gets locked
|
||||
user << "\red The controls can only be locked when the [src] is online"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon()
|
||||
return
|
||||
@@ -67,7 +67,7 @@ PE|PE|PE
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
set src in oview(1)
|
||||
switch(src.construction_state)
|
||||
if(0)
|
||||
src.desc = text("Part of a Particle Accelerator, looks like its not attached to the flooring")
|
||||
@@ -89,6 +89,35 @@ PE|PE|PE
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
meteorhit()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
proc
|
||||
update_state()
|
||||
if(master)
|
||||
@@ -161,15 +190,16 @@ PE|PE|PE
|
||||
if(temp_state == src.construction_state)//Nothing changed
|
||||
return 0
|
||||
else
|
||||
if(src.construction_state >= 3)//Was taken apart, update state
|
||||
update_state()
|
||||
src.construction_state = temp_state
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
update_icon()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/
|
||||
|
||||
/obj/machinery/particle_accelerator
|
||||
name = "Particle Accelerator"
|
||||
desc = "Part of a Particle Accelerator."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
@@ -217,6 +247,34 @@ PE|PE|PE
|
||||
..()
|
||||
return
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
meteorhit()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
proc
|
||||
update_state()
|
||||
@@ -266,7 +324,7 @@ PE|PE|PE
|
||||
if(temp_state == src.construction_state)//Nothing changed
|
||||
return 0
|
||||
else
|
||||
if(src.construction_state >= 3)//Was taken apart, update state
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
if(use_power)
|
||||
use_power = 0
|
||||
|
||||
@@ -34,12 +34,21 @@
|
||||
connected_parts = list()
|
||||
return
|
||||
if(!part_scan())
|
||||
assembled = 0
|
||||
use_power = 1
|
||||
active = 0
|
||||
connected_parts = list()
|
||||
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
//Ignore input if we are broken, !silicon guy cant touch us, or nonai controlling from super far away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon)) || (get_dist(src, usr) > 8 && !istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=pacontrol")
|
||||
return
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=pacontrol")
|
||||
usr.machine = null
|
||||
@@ -63,6 +72,7 @@
|
||||
message_admins("[usr] decreased particle accelerator power to [strength].")
|
||||
log_admin("[usr] decreased particle accelerator power to [strength].")
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
power_change()
|
||||
@@ -74,6 +84,7 @@
|
||||
use_power = 1
|
||||
return
|
||||
|
||||
|
||||
process()
|
||||
if(src.active)
|
||||
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)
|
||||
@@ -145,8 +156,8 @@
|
||||
|
||||
|
||||
interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=pacontrol")
|
||||
return
|
||||
@@ -172,3 +183,4 @@
|
||||
|
||||
user << browse(dat, "window=pacontrol;size=420x500")
|
||||
onclose(user, "pacontrol")
|
||||
return
|
||||
|
||||
@@ -399,7 +399,7 @@ var/global/list/uneatable = list(
|
||||
|
||||
toxmob()
|
||||
var/toxrange = 10
|
||||
var/toxdamage = 4 // changed the name to toxdamage from toxloss to prevent further conflicts
|
||||
var/toxdamage = 4
|
||||
var/radiation = 5
|
||||
if (src.energy>200)
|
||||
toxdamage = round(((src.energy-150)/50)*4,1)
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
projectile_type = "/obj/item/projectile/beam"
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
projectile_type = "/obj/item/projectile/beam/practice"
|
||||
|
||||
|
||||
obj/item/weapon/gun/energy/laser/retro
|
||||
name ="\improper Retro Laser"
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
if(blocked >= 2) return 0//Full block
|
||||
if(!isliving(target)) return 0
|
||||
var/mob/living/L = target
|
||||
if(istype(L, /mob/living/simple_animal)) return 0
|
||||
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, blocked)
|
||||
return 1
|
||||
|
||||
@@ -181,4 +182,4 @@
|
||||
else
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -47,6 +47,15 @@
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/item/projectile/beam/practice
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
eyeblur = 2
|
||||
|
||||
/obj/item/projectile/beam/heavylaser
|
||||
name = "\improper Heavy Laser"
|
||||
icon_state = "heavylaser"
|
||||
|
||||
@@ -1,418 +0,0 @@
|
||||
// converyor belt
|
||||
|
||||
// moves items/mobs/movables in set direction every ptick
|
||||
|
||||
|
||||
/obj/machinery/conveyor
|
||||
icon = 'recycling.dmi'
|
||||
icon_state = "conveyor0"
|
||||
name = "conveyor belt"
|
||||
desc = "A conveyor belt."
|
||||
anchored = 1
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/basedir // this is the default (forward) direction, set by the map dir
|
||||
// note dir var can vary when the direction changes
|
||||
|
||||
var/list/affecting // the list of all items that will be moved this ptick
|
||||
var/id = "" // the control ID - must match controller ID
|
||||
// following two only used if a diverter is present
|
||||
var/divert = 0 // if non-zero, direction to divert items
|
||||
var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
|
||||
|
||||
|
||||
|
||||
// create a conveyor
|
||||
|
||||
/obj/machinery/conveyor/New()
|
||||
..()
|
||||
basedir = dir
|
||||
setdir()
|
||||
|
||||
// set the dir and target turf depending on the operating direction
|
||||
|
||||
/obj/machinery/conveyor/proc/setdir()
|
||||
if(operating == -1)
|
||||
dir = turn(basedir,180)
|
||||
else
|
||||
dir = basedir
|
||||
update()
|
||||
|
||||
|
||||
// update the icon depending on the operating condition
|
||||
|
||||
/obj/machinery/conveyor/proc/update()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "conveyor-b"
|
||||
operating = 0
|
||||
return
|
||||
if(!operable)
|
||||
operating = 0
|
||||
icon_state = "conveyor[(operating != 0) && !(stat & NOPOWER)]"
|
||||
|
||||
|
||||
// machine process
|
||||
// move items to the target location
|
||||
/obj/machinery/conveyor/process()
|
||||
if(stat & (BROKEN | NOPOWER))
|
||||
return
|
||||
if(!operating)
|
||||
return
|
||||
use_power(100)
|
||||
|
||||
var/movedir = dir // base movement dir
|
||||
if(divert && dir==divdir) // update if diverter present
|
||||
movedir = divert
|
||||
|
||||
|
||||
affecting = loc.contents - src // moved items will be all in loc
|
||||
spawn(1) // slight delay to prevent infinite propagation due to map order
|
||||
var/items_moved = 0
|
||||
for(var/atom/movable/A in affecting)
|
||||
if(!A.anchored)
|
||||
if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(M.buckled == src)
|
||||
var/obj/machinery/conveyor/C = locate() in get_step(src, dir)
|
||||
M.buckled = null
|
||||
step(M,dir)
|
||||
if(C)
|
||||
M.buckled = C
|
||||
else
|
||||
new/obj/item/weapon/cable_coil/cut(M.loc)
|
||||
else
|
||||
step(M,movedir)
|
||||
else
|
||||
step(A,movedir)
|
||||
items_moved++
|
||||
if(items_moved >= 10)
|
||||
break
|
||||
|
||||
// attack with item, place item on conveyor
|
||||
|
||||
/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/grab)) // special handling if grabbing a mob
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.Move(src.loc)
|
||||
del(G)
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/cable_coil)) // if cable, see if a mob is present
|
||||
var/mob/M = locate() in src.loc
|
||||
if(M)
|
||||
if (M == user)
|
||||
src.visible_message("\blue [M] ties \himself to the conveyor.")
|
||||
// note don't check for lying if self-tying
|
||||
else
|
||||
if(M.lying)
|
||||
user.visible_message("\blue [M] has been tied to the conveyor by [user].", "\blue You tie [M] to the converyor!")
|
||||
else
|
||||
user << "\blue [M] must be lying down to be tied to the converyor!"
|
||||
return
|
||||
M.buckled = src
|
||||
src.add_fingerprint(user)
|
||||
I:use(1)
|
||||
M.lying = 1
|
||||
return
|
||||
|
||||
// else if no mob in loc, then allow coil to be placed
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
var/mob/M = locate() in src.loc
|
||||
if(M && M.buckled == src)
|
||||
M.buckled = null
|
||||
src.add_fingerprint(user)
|
||||
if (M == user)
|
||||
src.visible_message("\blue [M] cuts \himself free from the conveyor.")
|
||||
else
|
||||
src.visible_message("\blue [M] had been cut free from the conveyor by [user].")
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
// otherwise drop and place on conveyor
|
||||
user.drop_item()
|
||||
if(I && I.loc) I.loc = src.loc
|
||||
return
|
||||
|
||||
// attack with hand, move pulled object onto conveyor
|
||||
|
||||
/obj/machinery/conveyor/attack_hand(mob/user as mob)
|
||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
||||
return
|
||||
if (user.pulling.anchored)
|
||||
return
|
||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
||||
return
|
||||
if (ismob(user.pulling))
|
||||
var/mob/M = user.pulling
|
||||
M.pulling = null
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
user.pulling = null
|
||||
else
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
user.pulling = null
|
||||
return
|
||||
|
||||
|
||||
// make the conveyor broken
|
||||
// also propagate inoperability to any connected conveyor with the same ID
|
||||
/obj/machinery/conveyor/proc/broken()
|
||||
stat |= BROKEN
|
||||
update()
|
||||
|
||||
var/obj/machinery/conveyor/C = locate() in get_step(src, basedir)
|
||||
if(C)
|
||||
C.set_operable(basedir, id, 0)
|
||||
|
||||
C = locate() in get_step(src, turn(basedir,180))
|
||||
if(C)
|
||||
C.set_operable(turn(basedir,180), id, 0)
|
||||
|
||||
|
||||
//set the operable var if ID matches, propagating in the given direction
|
||||
|
||||
/obj/machinery/conveyor/proc/set_operable(stepdir, match_id, op)
|
||||
|
||||
if(id != match_id)
|
||||
return
|
||||
operable = op
|
||||
|
||||
update()
|
||||
var/obj/machinery/conveyor/C = locate() in get_step(src, stepdir)
|
||||
if(C)
|
||||
C.set_operable(stepdir, id, op)
|
||||
|
||||
/*
|
||||
/obj/machinery/conveyor/verb/destroy()
|
||||
set src in view()
|
||||
src.broken()
|
||||
*/
|
||||
|
||||
/obj/machinery/conveyor/power_change()
|
||||
..()
|
||||
update()
|
||||
|
||||
|
||||
// converyor diverter
|
||||
// extendable arm that can be switched so items on the conveyer are diverted sideways
|
||||
// situate in same turf as conveyor
|
||||
// only works if belts is running proper direction
|
||||
//
|
||||
//
|
||||
/obj/machinery/diverter
|
||||
icon = 'recycling.dmi'
|
||||
icon_state = "diverter0"
|
||||
name = "diverter"
|
||||
desc = "A diverter arm for a conveyor belt."
|
||||
anchored = 1
|
||||
layer = FLY_LAYER
|
||||
var/obj/machinery/conveyor/conv // the conveyor this diverter works on
|
||||
var/deployed = 0 // true if diverter arm is extended
|
||||
var/operating = 0 // true if arm is extending/contracting
|
||||
var/divert_to // the dir that diverted items will be moved
|
||||
var/divert_from // the dir items must be moving to divert
|
||||
|
||||
|
||||
// create a diverter
|
||||
// set up divert_to and divert_from directions depending on dir state
|
||||
/obj/machinery/diverter/New()
|
||||
|
||||
..()
|
||||
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
divert_to = WEST // stuff will be moved to the west
|
||||
divert_from = NORTH // if entering from the north
|
||||
if(SOUTH)
|
||||
divert_to = EAST
|
||||
divert_from = NORTH
|
||||
if(EAST)
|
||||
divert_to = EAST
|
||||
divert_from = SOUTH
|
||||
if(WEST)
|
||||
divert_to = WEST
|
||||
divert_from = SOUTH
|
||||
if(NORTHEAST)
|
||||
divert_to = NORTH
|
||||
divert_from = EAST
|
||||
if(NORTHWEST)
|
||||
divert_to = NORTH
|
||||
divert_from = WEST
|
||||
if(SOUTHEAST)
|
||||
divert_to = SOUTH
|
||||
divert_from = EAST
|
||||
if(SOUTHWEST)
|
||||
divert_to = SOUTH
|
||||
divert_from = WEST
|
||||
spawn(2)
|
||||
// wait for map load then find the conveyor in this turf
|
||||
conv = locate() in src.loc
|
||||
if(conv) // divert_from dir must match possible conveyor movement
|
||||
if(conv.basedir != divert_from && conv.basedir != turn(divert_from,180) )
|
||||
del(src) // if no dir match, then delete self
|
||||
set_divert()
|
||||
update()
|
||||
|
||||
// update the icon state depending on whether the diverter is extended
|
||||
/obj/machinery/diverter/proc/update()
|
||||
icon_state = "diverter[deployed]"
|
||||
|
||||
// call to set the diversion vars of underlying conveyor
|
||||
/obj/machinery/diverter/proc/set_divert()
|
||||
if(conv)
|
||||
if(deployed)
|
||||
conv.divert = divert_to
|
||||
conv.divdir = divert_from
|
||||
else
|
||||
conv.divert= 0
|
||||
|
||||
|
||||
// *** TESTING click to toggle
|
||||
/obj/machinery/diverter/Click()
|
||||
toggle()
|
||||
|
||||
|
||||
// toggle between arm deployed and not deployed, showing animation
|
||||
//
|
||||
/obj/machinery/diverter/proc/toggle()
|
||||
if( stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(operating)
|
||||
return
|
||||
|
||||
use_power(50)
|
||||
operating = 1
|
||||
if(deployed)
|
||||
flick("diverter10",src)
|
||||
icon_state = "diverter0"
|
||||
sleep(10)
|
||||
deployed = 0
|
||||
else
|
||||
flick("diverter01",src)
|
||||
icon_state = "diverter1"
|
||||
sleep(10)
|
||||
deployed = 1
|
||||
operating = 0
|
||||
update()
|
||||
set_divert()
|
||||
|
||||
// don't allow movement into the 'backwards' direction if deployed
|
||||
/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target)
|
||||
var/direct = get_dir(O, target)
|
||||
if(direct == divert_to) // prevent movement through body of diverter
|
||||
return 0
|
||||
if(!deployed)
|
||||
return 1
|
||||
return(direct != turn(divert_from,180))
|
||||
|
||||
// don't allow movement through the arm if deployed
|
||||
/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target)
|
||||
var/direct = get_dir(O, target)
|
||||
if(direct == turn(divert_to,180)) // prevent movement through body of diverter
|
||||
return 0
|
||||
if(!deployed)
|
||||
return 1
|
||||
return(direct != divert_from)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// the conveyor control switch
|
||||
//
|
||||
//
|
||||
|
||||
/obj/machinery/conveyor_switch
|
||||
|
||||
name = "conveyor switch"
|
||||
desc = "A conveyor control switch."
|
||||
icon = 'recycling.dmi'
|
||||
icon_state = "switch-off"
|
||||
var/position = 0 // 0 off, -1 reverse, 1 forward
|
||||
var/last_pos = -1 // last direction setting
|
||||
var/operated = 1 // true if just operated
|
||||
|
||||
var/id = "" // must match conveyor IDs to control them
|
||||
|
||||
var/list/conveyors // the list of converyors that are controlled by this switch
|
||||
anchored = 1
|
||||
|
||||
|
||||
|
||||
/obj/machinery/conveyor_switch/New()
|
||||
..()
|
||||
update()
|
||||
|
||||
spawn(5) // allow map load
|
||||
conveyors = list()
|
||||
for(var/obj/machinery/conveyor/C in world)
|
||||
if(C.id == id)
|
||||
conveyors += C
|
||||
|
||||
// update the icon depending on the position
|
||||
|
||||
/obj/machinery/conveyor_switch/proc/update()
|
||||
if(position<0)
|
||||
icon_state = "switch-rev"
|
||||
else if(position>0)
|
||||
icon_state = "switch-fwd"
|
||||
else
|
||||
icon_state = "switch-off"
|
||||
|
||||
|
||||
// timed process
|
||||
// if the switch changed, update the linked conveyors
|
||||
|
||||
/obj/machinery/conveyor_switch/process()
|
||||
if(!operated)
|
||||
return
|
||||
operated = 0
|
||||
|
||||
for(var/obj/machinery/conveyor/C in conveyors)
|
||||
C.operating = position
|
||||
C.setdir()
|
||||
|
||||
// attack with hand, switch position
|
||||
/obj/machinery/conveyor_switch/attack_hand(mob/user)
|
||||
if(position == 0)
|
||||
if(last_pos < 0)
|
||||
position = 1
|
||||
last_pos = 0
|
||||
else
|
||||
position = -1
|
||||
last_pos = 0
|
||||
else
|
||||
last_pos = position
|
||||
position = 0
|
||||
|
||||
operated = 1
|
||||
update()
|
||||
|
||||
// find any switches with same id as this one, and set their positions to match us
|
||||
for(var/obj/machinery/conveyor_switch/S in world)
|
||||
if(S.id == src.id)
|
||||
S.position = position
|
||||
S.update()
|
||||
|
||||
|
||||
/obj/machinery/conveyor/turntable
|
||||
icon = 'recycling.dmi'
|
||||
icon_state = "conveyor0"
|
||||
name = "conveyor turntable"
|
||||
desc = "A conveyor belt turntable."
|
||||
/*
|
||||
anchored = 1
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/basedir // this is the default (forward) direction, set by the map dir
|
||||
// note dir var can vary when the direction changes
|
||||
|
||||
var/list/affecting // the list of all items that will be moved this ptick
|
||||
var/id = "" // the control ID - must match controller ID
|
||||
// following two only used if a diverter is present
|
||||
var/divert = 0 // if non-zero, direction to divert items
|
||||
var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
|
||||
*/
|
||||
@@ -7,7 +7,7 @@
|
||||
icon = 'disposal.dmi'
|
||||
icon_state = "conpipe-s"
|
||||
anchored = 0
|
||||
density = 1
|
||||
density = 0
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
m_amt = 1850
|
||||
level = 2
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
// attack by item places it in to disposal
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(stat & BROKEN)
|
||||
if(stat & BROKEN || !I || !user)
|
||||
return
|
||||
|
||||
//robots shouldn't be able to grab/carry stuff anyway
|
||||
@@ -517,6 +517,9 @@
|
||||
return
|
||||
|
||||
interact(mob/user)
|
||||
if(isAI(user) || isrobot(user))
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
for (var/mob/V in viewers(user))
|
||||
V.show_message("[user] eagerly drinks the toilet water!", 3)//Yum yum yum
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
// The scrap item
|
||||
// a single object type represents all combinations of size and composition of scrap
|
||||
//
|
||||
|
||||
|
||||
/obj/item/scrap
|
||||
name = "scrap"
|
||||
icon = 'scrap.dmi'
|
||||
icon_state = "1metal0"
|
||||
item_state = "scrap-metal"
|
||||
desc = "A piece of scrap"
|
||||
var/classtext = ""
|
||||
throwforce = 14.0
|
||||
m_amt = 0
|
||||
g_amt = 0
|
||||
w_amt = 0
|
||||
var/size = 1 // 1=piece, 2= few pieces, 3=small pile, 4=large pile
|
||||
var/blood = 0 // 0=none, 1=blood-stained, 2=bloody
|
||||
|
||||
throwforce = 8.0
|
||||
throw_speed = 1
|
||||
throw_range = 4
|
||||
w_class = 1
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
|
||||
#define MAX_SCRAP 15000 // maximum content amount of a scrap pile
|
||||
|
||||
|
||||
/obj/item/scrap/New()
|
||||
src.verbs -= /atom/movable/verb/pull
|
||||
..()
|
||||
update()
|
||||
|
||||
// return a copy
|
||||
/obj/item/scrap/proc/copy()
|
||||
var/obj/item/scrap/ret = new()
|
||||
ret.set_components(m_amt, g_amt, w_amt)
|
||||
return ret
|
||||
|
||||
|
||||
// set the metal, glass and waste content
|
||||
/obj/item/scrap/proc/set_components(var/m, var/g, var/w)
|
||||
m_amt = m
|
||||
g_amt = g
|
||||
w_amt = w
|
||||
update()
|
||||
|
||||
// returns the total amount of scrap in this pile
|
||||
/obj/item/scrap/proc/total()
|
||||
return m_amt + g_amt + w_amt
|
||||
|
||||
|
||||
// sets the size, appearance, and description of the scrap depending on component amounts
|
||||
/obj/item/scrap/proc/update()
|
||||
var/total = total()
|
||||
|
||||
|
||||
// determine size of pile
|
||||
if(total<=400)
|
||||
size = 1
|
||||
else if(total<=1600)
|
||||
size = 2
|
||||
else
|
||||
size = 3
|
||||
|
||||
w_class = size
|
||||
|
||||
var/sizetext = ""
|
||||
|
||||
switch(size)
|
||||
if(1)
|
||||
sizetext = "A piece of"
|
||||
if(2)
|
||||
sizetext = "A few pieces of"
|
||||
if(3)
|
||||
sizetext = "A pile of"
|
||||
|
||||
// determine bloodiness
|
||||
var/bloodtext = ""
|
||||
switch(blood)
|
||||
if(0)
|
||||
bloodtext = ""
|
||||
if(1)
|
||||
bloodtext = "blood-stained "
|
||||
if(2)
|
||||
bloodtext = "bloody "
|
||||
|
||||
|
||||
// find mixture and composition
|
||||
var/class = 0 // 0 = mixed, 1=mostly. 2=pure
|
||||
var/major = "waste" // the major component type
|
||||
|
||||
var/max = 0
|
||||
|
||||
if(m_amt > max)
|
||||
max = m_amt
|
||||
else if(g_amt > max)
|
||||
max = g_amt
|
||||
else if(w_amt > max)
|
||||
max = w_amt
|
||||
|
||||
if(max == total)
|
||||
class = 2 // pure
|
||||
else if(max/total > 0.6)
|
||||
class = 1 // mostly
|
||||
else
|
||||
class = 0 // mixed
|
||||
|
||||
if(class>0)
|
||||
var/remain = total - max
|
||||
if(m_amt > remain)
|
||||
major = "metal"
|
||||
else if(g_amt > remain)
|
||||
major = "glass"
|
||||
else
|
||||
major = "waste"
|
||||
|
||||
|
||||
if(class == 1)
|
||||
desc = "[sizetext] mostly [major] [bloodtext]scrap."
|
||||
classtext = "mostly [major] [bloodtext]"
|
||||
else
|
||||
desc = "[sizetext] [bloodtext][major] scrap."
|
||||
classtext = "[bloodtext][major] "
|
||||
icon_state = "[size][major][blood]"
|
||||
else
|
||||
desc = "[sizetext] [bloodtext]mixed scrap."
|
||||
classtext = "[bloodtext]mixed"
|
||||
icon_state = "[size]mixed[blood]"
|
||||
|
||||
if(size==0)
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
else
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
// clear or set conduction flag depending on whether scrap is mostly metal
|
||||
if(major=="metal")
|
||||
flags |= CONDUCT
|
||||
else
|
||||
flags &= ~CONDUCT
|
||||
|
||||
item_state = "scrap-[major]"
|
||||
|
||||
// add a scrap item to this one
|
||||
// if the resulting pile is too big, transfer only what will fit
|
||||
// otherwise add them and deleted the added pile
|
||||
|
||||
/obj/item/scrap/proc/add_scrap(var/obj/item/scrap/other, var/limit = MAX_SCRAP)
|
||||
var/total = total()
|
||||
var/other_total = other.total()
|
||||
|
||||
if( (total + other_total) <= limit )
|
||||
m_amt += other.m_amt
|
||||
g_amt += other.g_amt
|
||||
w_amt += other.w_amt
|
||||
|
||||
blood = (total*blood + other_total*other.blood) / (total + other_total)
|
||||
del(other)
|
||||
|
||||
else
|
||||
var/space = limit - total
|
||||
|
||||
var/m = round(other.m_amt/other_total*space, 1)
|
||||
var/g = round(other.g_amt/other_total*space, 1)
|
||||
var/w = round(other.w_amt/other_total*space, 1)
|
||||
|
||||
m_amt += m
|
||||
g_amt += g
|
||||
w_amt += w
|
||||
|
||||
other.m_amt -= m
|
||||
other.g_amt -= g
|
||||
other.w_amt -= w
|
||||
|
||||
var/other_trans = m + g + w
|
||||
other.update()
|
||||
blood = (total*blood + other_trans*other.blood) / (total + other_trans)
|
||||
|
||||
|
||||
blood = round(blood,1)
|
||||
src.update()
|
||||
|
||||
// limit this pile to maximum size
|
||||
// return any remainder as a new scrap item (or null if none)
|
||||
// note return item is not necessarily smaller than max size
|
||||
|
||||
/obj/item/scrap/proc/remainder(var/limit = MAX_SCRAP)
|
||||
var/total = total()
|
||||
if(total > limit)
|
||||
var/m = round( m_amt/total * limit, 1)
|
||||
var/g = round( g_amt/total * limit, 1)
|
||||
var/w = round( w_amt/total * limit, 1)
|
||||
|
||||
var/obj/item/scrap/S = new()
|
||||
S.set_components(m_amt - m,g_amt - g,w_amt - w)
|
||||
src.set_components(m,g,w)
|
||||
|
||||
return S
|
||||
return null
|
||||
|
||||
// if other pile of scrap tries to enter the same turf, then add that pile to this one
|
||||
|
||||
/obj/item/scrap/CanPass(var/obj/item/scrap/O)
|
||||
|
||||
if(istype(O))
|
||||
|
||||
src.add_scrap(O)
|
||||
if(O)
|
||||
return 0 // O still exists if not all could be transfered, so block it
|
||||
return 1
|
||||
|
||||
/obj/item/scrap/proc/to_text()
|
||||
return "[m_amt],[g_amt],[w_amt] ([total()])"
|
||||
|
||||
|
||||
// attack with hand removes a single piece from a pile
|
||||
/obj/item/scrap/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(src.is_single_piece())
|
||||
return ..(user)
|
||||
var/obj/item/scrap/S = src.get_single_piece()
|
||||
S.attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/scrap/attackby(obj/item/I, mob/user)
|
||||
..()
|
||||
if(istype(I, /obj/item/scrap))
|
||||
var/obj/item/scrap/S = I
|
||||
if( (S.total()+src.total() ) > MAX_SCRAP )
|
||||
user << "The pile is full."
|
||||
return
|
||||
if(ismob(src.loc)) // can't combine scrap in hand
|
||||
return
|
||||
|
||||
src.add_scrap(S)
|
||||
|
||||
// when dropped, try to make a pile if scrap is already there
|
||||
/obj/item/scrap/dropped()
|
||||
|
||||
spawn(2) // delay to allow drop postprocessing (since src may be destroyed)
|
||||
for(var/obj/item/scrap/S in oview(0,src)) // excludes src itself
|
||||
S.add_scrap(src)
|
||||
|
||||
// return true if this is a single piece of scrap
|
||||
// must be total<=400 and of single composition
|
||||
/obj/item/scrap/proc/is_single_piece()
|
||||
if(total() > 400)
|
||||
return 0
|
||||
|
||||
var/empty = (m_amt == 0) + (g_amt == 0) + (w_amt == 0)
|
||||
|
||||
return (empty==2) // must be 2 components with zero amount
|
||||
|
||||
|
||||
// get a single piece of scrap from a pile
|
||||
/obj/item/scrap/proc/get_single_piece()
|
||||
|
||||
var/obj/item/scrap/S = new()
|
||||
|
||||
var/cmp = pick(m_amt;1 , g_amt;2, w_amt;3)
|
||||
|
||||
var/amount = 400
|
||||
switch(cmp)
|
||||
if(1)
|
||||
if(m_amt < amount)
|
||||
amount = m_amt
|
||||
|
||||
S.set_components(amount, 0, 0)
|
||||
src.set_components(m_amt - amount, g_amt, w_amt)
|
||||
|
||||
if(2)
|
||||
if(g_amt < amount)
|
||||
amount = g_amt
|
||||
S.set_components(0, amount, 0)
|
||||
src.set_components(m_amt, g_amt - amount, w_amt)
|
||||
|
||||
if(3)
|
||||
if(w_amt < amount)
|
||||
amount = w_amt
|
||||
S.set_components(0, 0, amount)
|
||||
src.set_components(m_amt, g_amt, w_amt - amount)
|
||||
|
||||
|
||||
return S
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ datum
|
||||
build_path = "/obj/item/weapon/circuitboard/telecomms/receiver"
|
||||
|
||||
telecomms_bus
|
||||
name = "Circuit Design (Telecom Bus Mainframe)"
|
||||
name = "Circuit Design (Bus Mainframe)"
|
||||
desc = "Allows for the construction of Telecommunications Bus Mainframes."
|
||||
id = "s-bus"
|
||||
req_tech = list("programming" = 4, "engineering" = 4)
|
||||
@@ -547,7 +547,7 @@ datum
|
||||
build_path = "/obj/item/weapon/circuitboard/telecomms/bus"
|
||||
|
||||
telecomms_processor
|
||||
name = "Circuit Design (Telecom Processor Unit)"
|
||||
name = "Circuit Design (Processor Unit)"
|
||||
desc = "Allows for the construction of Telecommunications Processor equipment."
|
||||
id = "s-processor"
|
||||
req_tech = list("programming" = 4, "engineering" = 4)
|
||||
|
||||
Reference in New Issue
Block a user