mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -140,6 +140,7 @@
|
||||
|
||||
|
||||
process()
|
||||
processing_objects.Remove(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -45,10 +45,6 @@
|
||||
if(scanning)
|
||||
src.overlays += text("infrared_old2")
|
||||
src.small_icon_state_overlays += text("infrared_on")
|
||||
if(master && istype(master, /obj/item/weapon/chem_grenade))
|
||||
var/obj/item/weapon/chem_grenade/M = master
|
||||
M.c_state(1)
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
@@ -87,15 +87,9 @@
|
||||
if(timing)
|
||||
overlays += text("prox_timing")
|
||||
small_icon_state_overlays += text("prox_timing")
|
||||
if(master && istype(master, /obj/item/weapon/chem_grenade))
|
||||
var/obj/item/weapon/chem_grenade/M = master
|
||||
M.c_state(1)
|
||||
if(scanning)
|
||||
overlays += text("prox_scanning")
|
||||
small_icon_state_overlays += text("prox_scanning")
|
||||
if(master && istype(master, /obj/item/weapon/chem_grenade))
|
||||
var/obj/item/weapon/chem_grenade/M = master
|
||||
M.c_state(1)
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
|
||||
@@ -64,9 +64,6 @@
|
||||
if(timing)
|
||||
overlays += text("timer_timing")
|
||||
small_icon_state_overlays += text("timer_timing")
|
||||
if(master && istype(master, /obj/item/weapon/chem_grenade))
|
||||
var/obj/item/weapon/chem_grenade/M = master
|
||||
M.c_state(1)
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
@@ -194,7 +194,7 @@ datum
|
||||
name = "Dexalin"
|
||||
id = "dexalin"
|
||||
result = "dexalin"
|
||||
required_reagents = list("oxygen" = 2)
|
||||
required_reagents = list("oxygen" = 2, "plasma" = 0.1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
result_amount = 1
|
||||
|
||||
@@ -244,7 +244,7 @@ datum
|
||||
name = "Clonexadone"
|
||||
id = "clonexadone"
|
||||
result = "clonexadone"
|
||||
required_reagents = list("cryoxadone" = 1, "sodium" = 1)
|
||||
required_reagents = list("cryoxadone" = 1, "sodium" = 1, "plasma" = 0.1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
result_amount = 2
|
||||
|
||||
|
||||
@@ -289,12 +289,6 @@
|
||||
if(beaker_two)
|
||||
beaker_two.loc = get_turf(src.loc)
|
||||
|
||||
c_state(var/i = 0)
|
||||
if(i)
|
||||
icon_state = initial(icon_state) + "_armed"
|
||||
return
|
||||
|
||||
|
||||
large
|
||||
name = "Large Chem Grenade"
|
||||
desc = "An oversized grenade that affects a larger area."
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
life_tick = 0
|
||||
isbreathing = 1
|
||||
holdbreath = 0
|
||||
lyingcheck = 0
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
set invisibility = 0
|
||||
@@ -85,7 +86,10 @@
|
||||
handle_health_updates()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
// update_clothing()
|
||||
if(lyingcheck != lying) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every
|
||||
update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
|
||||
lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal.
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
var/Tempstun = 0 // temporary temperature stuns
|
||||
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/SStun = 0 // stun variable
|
||||
var/Obstacle = 1 // determines whether the turf the metroid will head to has an obstacle
|
||||
proc
|
||||
|
||||
AIprocess() // the master AI process
|
||||
@@ -228,7 +229,9 @@
|
||||
switch(nutrition)
|
||||
if(150 to 800) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
|
||||
AIproc = 1
|
||||
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
@@ -242,63 +245,63 @@
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
if(Target)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
if(!AIproc)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
if(Target in view(1,src))
|
||||
if(!AIproc)
|
||||
break
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
if(get_obstacle_ok(Target))
|
||||
Obstacle = 0
|
||||
else Obstacle = 1
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
if(prob(80) && !Target.lying)
|
||||
if(Target in view(1,src))
|
||||
|
||||
if(Target.client && Target.health >= rand(10,30))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
if(!Obstacle)
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
|
||||
if(prob(80) && !Target.lying && Target.client && Target.health >= rand(10,30))
|
||||
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(!Obstacle)
|
||||
Target.attack_metroid(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(Target in view(30, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
if(!Atkcool && !Obstacle)
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
else
|
||||
if(Target in view(30, src))
|
||||
if(!Obstacle)
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
if(sleeptime < 1) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
|
||||
@@ -474,6 +474,7 @@
|
||||
usr << "\blue You successfully remove your handcuffs."
|
||||
usr:handcuffed:loc = usr:loc
|
||||
usr:handcuffed = null
|
||||
usr.update_clothing()
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human) && istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket) && usr:canmove && (usr.last_special <= world.time))
|
||||
usr.next_move = world.time + 200
|
||||
|
||||
@@ -464,6 +464,7 @@
|
||||
m_amt = 60
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/brightness = 2 //how much light it gives off
|
||||
var/repair_state = 0
|
||||
|
||||
/obj/item/weapon/light/tube
|
||||
name = "light tube"
|
||||
@@ -497,9 +498,15 @@
|
||||
if(LIGHT_BURNED)
|
||||
icon_state = "[base_state]-burned"
|
||||
desc = "A burnt-out [name]."
|
||||
if(repair_state == 1)
|
||||
desc += " It has some wires hanging out."
|
||||
if(LIGHT_BROKEN)
|
||||
icon_state = "[base_state]-broken"
|
||||
desc = "A broken [name]."
|
||||
if(repair_state == 1)
|
||||
desc += " It has some wires hanging out."
|
||||
else if(repair_state == 2)
|
||||
desc += " It has had new wires put in."
|
||||
|
||||
|
||||
/obj/item/weapon/light/New()
|
||||
@@ -514,8 +521,9 @@
|
||||
|
||||
// attack bulb/tube with object
|
||||
// if a syringe, can inject plasma to make it explode
|
||||
// also repairing them with wire and screwdriver
|
||||
// and glass if it's broken
|
||||
/obj/item/weapon/light/attackby(var/obj/item/I, var/mob/user)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = I
|
||||
|
||||
@@ -526,8 +534,36 @@
|
||||
rigged = 1
|
||||
|
||||
S.reagents.clear_reagents()
|
||||
else
|
||||
..()
|
||||
return
|
||||
if(status != 0)
|
||||
if(istype(I, /obj/item/weapon/cable_coil) && repair_state == 0)
|
||||
user << "You put some new wiring into the [src]."
|
||||
I:use(1)
|
||||
repair_state = 1
|
||||
update()
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && repair_state == 1)
|
||||
user << "You attach the new wiring."
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
if(status == LIGHT_BURNED)
|
||||
repair_state = 0
|
||||
status = LIGHT_OK
|
||||
else
|
||||
repair_state = 2
|
||||
update()
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/glass) && status == LIGHT_BROKEN)
|
||||
user << "You repair the glass of the [src]." //this is worded terribly
|
||||
I:use(1)
|
||||
force = 2 //because breaking it changes the force, this changes it back
|
||||
if(repair_state == 2)
|
||||
repair_state = 0
|
||||
status = LIGHT_OK
|
||||
else
|
||||
status = LIGHT_BURNED
|
||||
update()
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
// called after an attack with a light item
|
||||
|
||||
Reference in New Issue
Block a user