mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Merge remote-tracking branch 'upstream/master' into smoothlattice
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
/*var/obj/effect/decal/cleanable/oil/o =*/
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
@@ -36,10 +35,10 @@
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
@@ -66,4 +65,4 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
|
||||
@@ -13,7 +13,14 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/effect/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/obj/effect/effect/Destroy()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
/*
|
||||
|
||||
@@ -12,6 +12,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
item_state = "electronic"
|
||||
w_class = 1
|
||||
slot_flags = SLOT_ID | SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
|
||||
//Main variables
|
||||
var/owner = null // String name of owner
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
item_state = "camera_bug"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
origin_tech = "syndicate=3;engineering=;1"
|
||||
|
||||
var/obj/machinery/camera/current = null
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
force = 3
|
||||
attack_verb = list("blown up", "exploded", "detonated")
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=30)
|
||||
origin_tech = "syndicate=3;combat=2,"
|
||||
|
||||
/obj/item/device/doorCharge/ex_act(severity, target)
|
||||
switch(severity)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && (H.dna.check_mutation(HULK) || NOGUNS in H.dna.species.specflags))
|
||||
if(H.dna.check_mutation(HULK) || NOGUNS in H.dna.species.specflags)
|
||||
user << "<span class='warning'>Your fingers can't press the button!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -162,8 +162,7 @@ MASS SPECTROMETER
|
||||
// Species and body temperature
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna)
|
||||
user << "<span class='info'>Species: [H.dna.species.name]</span>"
|
||||
user << "<span class='info'>Species: [H.dna.species.name]</span>"
|
||||
user << "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>"
|
||||
|
||||
// Time of death
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/tape_type = /obj/item/holotape
|
||||
var/icon_base
|
||||
var/charging = 0
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
/obj/item/holotape
|
||||
icon = 'icons/obj/holotape.dmi'
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "cyborg module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
|
||||
@@ -197,7 +196,7 @@
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
@@ -211,3 +210,85 @@
|
||||
|
||||
R.SetEmagged(1)
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
name = "self-repair module"
|
||||
desc = "This module will repair the cyborg over time."
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
var/msg_cooldown = 0
|
||||
var/on = 0
|
||||
var/powercost = 10
|
||||
var/mob/living/silicon/robot/cyborg
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return 0
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
usr << "<span class='warning'>This unit is already equipped with a self-repair module.</span>"
|
||||
return 0
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
action_button_name = "Toggle Self-Repair"
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
on = !on
|
||||
if(on)
|
||||
cyborg << "<span class='notice'>You activate the self-repair module.</span>"
|
||||
SSobj.processing |= src
|
||||
else
|
||||
cyborg << "<span class='notice'>You deactivate the self-repair module.</span>"
|
||||
SSobj.processing -= src
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
|
||||
SSobj.processing -= src
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
return
|
||||
|
||||
if( cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(cyborg.cell.charge < powercost*2)
|
||||
cyborg << "<span class='warning'>Self-repair module deactivated. Please recharge.</span>"
|
||||
deactivate()
|
||||
return
|
||||
|
||||
if(cyborg.health < cyborg.maxHealth)
|
||||
if(cyborg.health < 0)
|
||||
repair_amount = -2.5
|
||||
powercost = 30
|
||||
else
|
||||
repair_amount = -1
|
||||
powercost = 10
|
||||
cyborg.adjustBruteLoss(repair_amount)
|
||||
cyborg.adjustFireLoss(repair_amount)
|
||||
cyborg.updatehealth()
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if( (world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
cyborg << "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>"
|
||||
msg_cooldown = world.time
|
||||
else
|
||||
deactivate()
|
||||
|
||||
@@ -103,6 +103,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/stool/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
if(check_dna_integrity(M) && !(M.disabilities & NOCLONE))
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
user << "<span class='notice'>You can't modify [M]'s DNA while \he's dead.</span>"
|
||||
return
|
||||
@@ -38,7 +38,7 @@
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
updateappearance(M)
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
else
|
||||
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
||||
|
||||
@@ -87,6 +87,15 @@
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
/obj/item/weapon/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Tracking Beacon<BR>
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
/obj/item/weapon/implant/chem/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/chem/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
|
||||
@@ -78,7 +78,7 @@ Frequency:
|
||||
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
|
||||
|
||||
src.temp += "<B>Extranneous Signals:</B><BR>"
|
||||
for (var/obj/item/weapon/implant/tracking/W in world)
|
||||
for (var/obj/item/weapon/implant/tracking/W in tracking_implants)
|
||||
if (!W.implanted || !ismob(W.loc))
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
|
||||
if(istype(M))
|
||||
if(M.has_dna())
|
||||
if(M.dna.check_mutation(HULK))
|
||||
M << "<span class='warning'>You lack the grace to wield this!</span>"
|
||||
return
|
||||
|
||||
@@ -8,12 +8,16 @@
|
||||
smooth_icon(src)
|
||||
smooth_icon_neighbors(src)
|
||||
icon_state = ""
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/obj/structure/blob_act()
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/Destroy()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
if(opacity)
|
||||
UpdateAffectingLights()
|
||||
if(smooth)
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/obj/structure/displaycase
|
||||
name = "display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox1"
|
||||
desc = "A display case for prized possessions. Hooked up with an anti-theft system."
|
||||
icon_state = "glassbox0"
|
||||
desc = "A display case for prized possessions."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete the gun.
|
||||
var/health = 30
|
||||
var/occupied = 1
|
||||
var/destroyed = 0
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = 0
|
||||
var/open = 0
|
||||
var/obj/item/weapon/electronics/airlock/electronics
|
||||
|
||||
/obj/structure/displaycase/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
occupied = 0
|
||||
dump()
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
@@ -27,6 +28,13 @@
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
..()
|
||||
if(showpiece)
|
||||
user << "<span class='notice'>There's [showpiece] inside.</span>"
|
||||
if(alert)
|
||||
user << "<span class='notice'>Hooked up with an anti-theft system.</span>"
|
||||
|
||||
|
||||
/obj/structure/displaycase/bullet_act(obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
@@ -35,16 +43,17 @@
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/proc/dump()
|
||||
if (showpiece)
|
||||
showpiece.loc = src.loc
|
||||
showpiece = null
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
occupied = 0
|
||||
dump()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
@@ -55,27 +64,76 @@
|
||||
update_icon()
|
||||
|
||||
//Activate Anti-theft
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
playsound(src, "sound/effects/alert.ogg", 50, 1)
|
||||
if(alert)
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
playsound(src, "sound/effects/alert.ogg", 50, 1)
|
||||
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "glassboxb[src.occupied]"
|
||||
/obj/structure/displaycase/proc/is_directional(atom/A)
|
||||
try
|
||||
getFlatIcon(A,defdir=4)
|
||||
catch
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
|
||||
//Get flatIcon even if dir is mismatched for directionless icons
|
||||
//SLOW
|
||||
var/icon/I
|
||||
if(is_directional(A))
|
||||
I = getFlatIcon(A)
|
||||
else
|
||||
src.icon_state = "glassbox[src.occupied]"
|
||||
var/old_dir = A.dir
|
||||
A.dir = 2
|
||||
I = getFlatIcon(A)
|
||||
A.dir = old_dir
|
||||
return I
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
var/icon/I
|
||||
if(open)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
|
||||
else
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
|
||||
if(destroyed)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
|
||||
if(showpiece)
|
||||
var/icon/S = get_flat_icon_directional(showpiece)
|
||||
S.Scale(17,17)
|
||||
I.Blend(S,ICON_UNDERLAY,8,8)
|
||||
src.icon = I
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/card) && electronics && !destroyed && allowed(user))
|
||||
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
|
||||
open = !open
|
||||
update_icon()
|
||||
return
|
||||
if(!alert && istype(W,/obj/item/weapon/crowbar))
|
||||
if(destroyed && !showpiece)
|
||||
user << "<span class='notice'>You remove the destroyed case</span>"
|
||||
qdel(src)
|
||||
return
|
||||
user << "<span class='notice'>You start to [open ? "close":"open"] the [src]</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
|
||||
open = !open
|
||||
update_icon()
|
||||
else if(open)
|
||||
if(user.unEquip(W))
|
||||
W.loc = src
|
||||
showpiece = W
|
||||
user << "<span class='notice'>You put [W] on display</span>"
|
||||
update_icon()
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/attack_paw(mob/user)
|
||||
@@ -83,10 +141,9 @@
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
if (showpiece && (destroyed || open))
|
||||
dump()
|
||||
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
@@ -98,3 +155,71 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = 1
|
||||
density = 0
|
||||
name = "display case chassis"
|
||||
desc = "wooden base of display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/weapon/electronics/airlock/electronics
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/electronics/airlock))
|
||||
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(user.unEquip(I) && do_after(user, 30, target = src))
|
||||
I.loc = src
|
||||
electronics = I
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 10)
|
||||
user << "<span class='warning'>You need ten glass sheets to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [G] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(10)
|
||||
var/obj/structure/displaycase/display = new(src.loc)
|
||||
if(electronics)
|
||||
electronics.loc = display
|
||||
display.electronics = electronics
|
||||
if(electronics.use_one_access)
|
||||
display.req_one_access = electronics.conf_access
|
||||
else
|
||||
display.req_access = electronics.conf_access
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/captain
|
||||
alert = 1
|
||||
|
||||
/obj/structure/displaycase/captain/New()
|
||||
..()
|
||||
showpiece = new /obj/item/weapon/gun/energy/laser/captain (src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/labcage
|
||||
name = "lab cage"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
|
||||
/obj/structure/displaycase/labcage/New()
|
||||
..()
|
||||
var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger(src)
|
||||
A.sterile = 1
|
||||
A.name = "Lamarr"
|
||||
showpiece = A
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/obj/structure/lamarr
|
||||
name = "lab cage"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "labcage1"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete Lamarr
|
||||
var/health = 30
|
||||
var/occupied = 1
|
||||
var/destroyed = 0
|
||||
|
||||
/obj/structure/lamarr/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if (3)
|
||||
if (prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/structure/lamarr/bullet_act(obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "labcageb[src.occupied]"
|
||||
else
|
||||
src.icon_state = "labcage[src.occupied]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] kicks the lab cage.</span>", \
|
||||
"<span class='danger'>You kick the lab cage.</span>")
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc )
|
||||
A.sterile = 1
|
||||
A.name = "Lamarr"
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
@@ -148,16 +148,17 @@
|
||||
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races
|
||||
newrace = species_list[racechoice]
|
||||
|
||||
if(!newrace || !H.dna)
|
||||
if(!newrace)
|
||||
return
|
||||
|
||||
hardset_dna(H, null, null, null, null, newrace)
|
||||
H.set_species(newrace, icon_update=0)
|
||||
|
||||
if(H.dna.species.use_skintones)
|
||||
var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in skin_tones
|
||||
|
||||
if(new_s_tone)
|
||||
H.skin_tone = new_s_tone
|
||||
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||
|
||||
if(MUTCOLORS in H.dna.species.specflags)
|
||||
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
|
||||
@@ -170,7 +171,10 @@
|
||||
else
|
||||
H << "<span class='notice'>Invalid color. Your color is not bright enough.</span>"
|
||||
|
||||
H.regenerate_icons()
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
H.update_mutcolor()
|
||||
H.update_mutations_overlay() // no hulk lizard
|
||||
|
||||
if("gender")
|
||||
if(!(H.gender in list("male", "female"))) //blame the patriarchy
|
||||
@@ -180,12 +184,19 @@
|
||||
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
|
||||
H.gender = "female"
|
||||
H << "<span class='notice'>Man, you feel like a woman!</span>"
|
||||
H.regenerate_icons()
|
||||
else
|
||||
return
|
||||
|
||||
else
|
||||
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
|
||||
H.gender = "male"
|
||||
H << "<span class='notice'>Whoa man, you feel like a man!</span>"
|
||||
H.regenerate_icons()
|
||||
else
|
||||
return
|
||||
H.dna.update_ui_block(DNA_GENDER_BLOCK)
|
||||
H.update_body()
|
||||
H.update_mutations_overlay() //(hulk male/female)
|
||||
|
||||
|
||||
if("hair")
|
||||
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
|
||||
@@ -196,15 +207,17 @@
|
||||
var/new_hair_color = input(H, "Choose your hair color", "Hair Color") as null|color
|
||||
if(new_hair_color)
|
||||
H.hair_color = sanitize_hexcolor(new_hair_color)
|
||||
H.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK)
|
||||
if(H.gender == "male")
|
||||
var/new_face_color = input(H, "Choose your facial hair color", "Hair Color") as null|color
|
||||
if(new_face_color)
|
||||
H.facial_hair_color = sanitize_hexcolor(new_face_color)
|
||||
|
||||
H.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK)
|
||||
H.update_hair()
|
||||
|
||||
if("eyes")
|
||||
var/new_eye_color = input(H, "Choose your eye color", "Eye Color") as null|color
|
||||
if(new_eye_color)
|
||||
H.eye_color = sanitize_hexcolor(new_eye_color)
|
||||
H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
H.update_body()
|
||||
Reference in New Issue
Block a user